target
stringlengths 5
300
| feat_repo_name
stringlengths 6
76
| text
stringlengths 26
1.05M
|
|---|---|---|
src/SparklinesBars.js
|
samsface/react-sparklines
|
import React from 'react';
export default class SparklinesBars extends React.Component {
static propTypes = {
style: React.PropTypes.object
};
static defaultProps = {
style: { fill: 'slategray' }
};
render() {
const { points, width, height, margin, style } = this.props;
const barWidth = points.length >= 2 ? points[1].x - points[0].x : 0;
return (
<g>
{points.map((p, i) =>
<rect
key={i}
x={p.x} y={p.y}
width={barWidth} height={height - p.y}
style={style} />
)}
</g>
)
}
}
|
files/rtc/3.3.0/rtc.min.js
|
dlueth/jsdelivr
|
!function(n){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.RTC=n()}}(function(){return function n(e,t,r){function o(c,u){if(!t[c]){if(!e[c]){var a="function"==typeof require&&require;if(!u&&a)return a(c,!0);if(i)return i(c,!0);var s=new Error("Cannot find module '"+c+"'");throw s.code="MODULE_NOT_FOUND",s}var f=t[c]={exports:{}};e[c][0].call(f.exports,function(n){var t=e[c][1][n];return o(t?t:n)},f,f.exports,n,e,t,r)}return t[c].exports}for(var i="function"==typeof require&&require,c=0;c<r.length;c++)o(r[c]);return o}({1:[function(n,e,t){e.exports={constraints:{video:!0,audio:!0},signaller:"https://switchboard.rtc.io/",room:void 0,ice:[],channels:{},localContainer:"#l-video",remoteContainer:"#r-video",plugins:[],options:{}}},{}],2:[function(n,e,t){function r(n){return function(e){e.dataset.peer=n}}function o(n,e){m(e)("capture",["constraints","options"],l)("attach",["capture","options"],f.local)("render-local",["attach"],d([h("+rtc"),h("+localvideo"),v.to((e||{}).localContainer||"#l-video")]))("start-conference",["capture"],n.addStream).on("error",u(n,e))}function i(n,e){return function(t,o){m(s({stream:o},e))("attach",["stream","options"],f)("render-remote",["attach"],d([h("+rtc"),h("+remotevideo"),r(t),v.to((e||{}).remoteContainer||"#r-video")])).on("error",u(n,e))}}function c(n){g('[data-peer="'+n+'"]').forEach(function(n){n.parentNode.removeChild(n)})}function u(n,e){return function(n){console.error(n)}}var a=n("cog/defaults"),s=n("cog/extend"),f=n("rtc-attach"),l=n("rtc-capture"),p=n("rtc-quickconnect"),d=n("whisk/chain"),v=n("fdom/append"),h=n("fdom/classtweak"),g=n("fdom/qsa"),m=n("kgo");e.exports=function(e){var t;return e=a({},e,n("./defaultconfig.js")),e.options=s({room:e.room,ice:e.ice,plugins:e.plugins,expectedLocalStreams:e.constraints?1:0},e.options),t=p(e.signaller,e.options),t.on("call:ended",c).on("stream:added",i(t,e)),Object.keys(e.channels||{}).forEach(function(n){var r=e.channels[n];t.createDataChannel(n,r===!0?null:r)}),e.constraints&&o(t,e),t}},{"./defaultconfig.js":1,"cog/defaults":5,"cog/extend":6,"fdom/append":11,"fdom/classtweak":12,"fdom/qsa":13,kgo:14,"rtc-attach":16,"rtc-capture":17,"rtc-quickconnect":22,"whisk/chain":69}],3:[function(n,e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(n){return"function"==typeof n}function i(n){return"number"==typeof n}function c(n){return"object"==typeof n&&null!==n}function u(n){return void 0===n}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(n){if(!i(n)||0>n||isNaN(n))throw TypeError("n must be a positive number");return this._maxListeners=n,this},r.prototype.emit=function(n){var e,t,r,i,a,s;if(this._events||(this._events={}),"error"===n&&(!this._events.error||c(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(t=this._events[n],u(t))return!1;if(o(t))switch(arguments.length){case 1:t.call(this);break;case 2:t.call(this,arguments[1]);break;case 3:t.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),a=1;r>a;a++)i[a-1]=arguments[a];t.apply(this,i)}else if(c(t)){for(r=arguments.length,i=new Array(r-1),a=1;r>a;a++)i[a-1]=arguments[a];for(s=t.slice(),r=s.length,a=0;r>a;a++)s[a].apply(this,i)}return!0},r.prototype.addListener=function(n,e){var t;if(!o(e))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",n,o(e.listener)?e.listener:e),this._events[n]?c(this._events[n])?this._events[n].push(e):this._events[n]=[this._events[n],e]:this._events[n]=e,c(this._events[n])&&!this._events[n].warned){var t;t=u(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,t&&t>0&&this._events[n].length>t&&(this._events[n].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[n].length),"function"==typeof console.trace&&console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(n,e){function t(){this.removeListener(n,t),r||(r=!0,e.apply(this,arguments))}if(!o(e))throw TypeError("listener must be a function");var r=!1;return t.listener=e,this.on(n,t),this},r.prototype.removeListener=function(n,e){var t,r,i,u;if(!o(e))throw TypeError("listener must be a function");if(!this._events||!this._events[n])return this;if(t=this._events[n],i=t.length,r=-1,t===e||o(t.listener)&&t.listener===e)delete this._events[n],this._events.removeListener&&this.emit("removeListener",n,e);else if(c(t)){for(u=i;u-->0;)if(t[u]===e||t[u].listener&&t[u].listener===e){r=u;break}if(0>r)return this;1===t.length?(t.length=0,delete this._events[n]):t.splice(r,1),this._events.removeListener&&this.emit("removeListener",n,e)}return this},r.prototype.removeAllListeners=function(n){var e,t;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[n]&&delete this._events[n],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(t=this._events[n],o(t))this.removeListener(n,t);else for(;t.length;)this.removeListener(n,t[t.length-1]);return delete this._events[n],this},r.prototype.listeners=function(n){var e;return e=this._events&&this._events[n]?o(this._events[n])?[this._events[n]]:this._events[n].slice():[]},r.listenerCount=function(n,e){var t;return t=n._events&&n._events[e]?o(n._events[e])?1:n._events[e].length:0}},{}],4:[function(n,e,t){function r(){if(!u){u=!0;for(var n,e=c.length;e;){n=c,c=[];for(var t=-1;++t<e;)n[t]();e=c.length}u=!1}}function o(){}var i=e.exports={},c=[],u=!1;i.nextTick=function(n){c.push(n),u||setTimeout(r,0)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=o,i.addListener=o,i.once=o,i.off=o,i.removeListener=o,i.removeAllListeners=o,i.emit=o,i.binding=function(n){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(n){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],5:[function(n,e,t){"use strict";e.exports=function(n){return n=n||{},[].slice.call(arguments,1).forEach(function(e){if(e)for(var t in e)void 0===n[t]&&(n[t]=e[t])}),n}},{}],6:[function(n,e,t){"use strict";e.exports=function(n){return[].slice.call(arguments,1).forEach(function(e){if(e)for(var t in e)n[t]=e[t]}),n}},{}],7:[function(n,e,t){e.exports=function(n){function e(e){return n[e]}function t(e,t){n[e]=t}function r(e){return delete n[e]}function o(){return Object.keys(n)}function i(){return Object.keys(n).map(function(e){return n[e]})}return"object"!=typeof n?n:{get:e,set:t,remove:r,delete:r,keys:o,values:i}}},{}],8:[function(n,e,t){"use strict";e.exports=function(n){var e,t,r,o="string"==typeof n||n instanceof String,i=/^\-?\d+\.?\d*$/;if(!o||n.length<2)return o&&i.test(n)?parseFloat(n):n;if("true"===n||"false"===n)return"true"===n;if("null"===n)return null;if(t=n.charAt(0),r=n.charAt(n.length-1),e="{"==t&&"}"==r||"["==t&&"]"==r||'"'==t&&'"'==r)try{return JSON.parse(n)}catch(n){}return i.test(n)?parseFloat(n):n}},{}],9:[function(n,e,t){"use strict";var r=[],o=[],i=[console],c=e.exports=function(n){function e(){return t=r.indexOf("*")>=0||r.indexOf(n)>=0}var t=e();return o[o.length]=e,function(){var e=[].slice.call(arguments);("string"==typeof e[0]||e[0]instanceof String)&&(e[0]=n+": "+e[0]),t&&i.forEach(function(n){n.log.apply(n,e)})}};c.reset=function(){return i=[],r=[],c.enable()},c.to=function(n){return i=i.concat(n||[]),c},c.enable=function(){return r=r.concat([].slice.call(arguments)),o.forEach(function(n){n()}),c}},{}],10:[function(n,e,t){"use strict";e.exports=function(n,e,t){function r(){n.apply(c,i||[]),u=Date.now()}var o,i,c,u=(t||{}).leading!==!1?0:Date.now(),a=(t||{}).trailing;return a=a||void 0===a,function(){var t=Date.now(),s=t-u;return clearTimeout(o),e>s?(i=[].slice.call(arguments,0),c=this,a&&(o=setTimeout(r,e-s))):(u=t,void n.apply(this,arguments))}}},{}],11:[function(n,e,t){"use strict";var r=e.exports=function(){return console.log("not yet implemented"),!1};r.to=function(n,e){function t(e){var t=n;return("string"==typeof t||t instanceof String)&&(t=document.querySelector(t)),t&&"function"==typeof t.appendChild?(t.appendChild(e),e):void 0}return e?t(e):t}},{}],12:[function(n,e,t){"use strict";var r=/[\s\,]\s*/,o={"+":"add","-":"remove","~":"toggle","!":"toggle"};e.exports=function(n,e){function t(n){return n.classList?(i.forEach(function(e){n.classList[e.op](e.cls)}),n):n}var i=n.trim().split(r).map(function(n){return{op:o[n.charAt(0)],cls:n.slice(1)}}).filter(function(n){return n.op});return e?t(e):t}},{}],13:[function(n,e,t){"use strict";var r=/^\.([\w\-]+)$/,o=/^#([\w\-]+)$/,i=/^[\w\-]+$/;e.exports=function(n,e){var t;return e=e||document,t=e===document&&o.test(n),t?[e.getElementById(RegExp.$1)]:Array.prototype.slice.call(r.test(n)?e.getElementsByClassName(RegExp.$1):i.test(n)?e.getElementsByTagName(n):e.querySelectorAll(n))}},{}],14:[function(n,e,t){function r(){function n(){if(e)throw"No tasks or defaults may be set after kgo is in flight";for(var o=0;"string"==typeof arguments[o];)o++;var i,c,s=Array.prototype.slice.call(arguments,0,o);if(s.length||s.push((r++).toString()+"__returnless"),"object"==typeof arguments[o]&&!Array.isArray(arguments[o])){var f=arguments[o];if(t)throw"Defaults may be defined only once per kgo";for(var l in f){if(l in u)throw"A task is already defined for "+l;a[l]=f[l]}return t=!0,n}if(Array.isArray(arguments[o])&&(i=arguments[o],o++),"function"==typeof arguments[o]&&(c=arguments[o]),"function"!=typeof c)throw new Error("No function provided for task number "+Object.keys(u).length+" ("+s+")");for(var p=0;p<s.length;p++)if(s[p]in a)throw"A default with the same name as this task ("+s[p]+") has already been set";return u[s]={names:s,args:i||[],fn:c},n}var e,t,r=0,u={},a={};for(var s in i.prototype)n[s]=i.prototype[s];return n.apply(null,arguments),c(function(){e=!0,o(u,a,n)}),n}var o=n("./run"),i=n("events").EventEmitter,c="function"==typeof setImmediate?setImmediate:setTimeout;e.exports=r},{"./run":15,events:3}],15:[function(n,e,t){function r(n,e,t){this._task=n,this._args=e,this._done=t}function o(n,e,t,o){var i=n.names,c=n.args,a=(n.fn,[]);if(c)for(var s=0;s<c.length;s++){var f=c[s],l=f.match(u);if(l&&(f=f.slice(1)),!(f in e))return;l||a.push(e[f])}var p=new r(n,a,function(n,e){o(i,n,e)});t(i),p.run()}function i(n,e,t){var r,c=!0;if(!t._complete){for(var u in n)c=!1,r=n[u],o(r,e,function(e){delete n[e]},function(r,o,c){if(!t._complete){if(o)return t._complete=!0,t.emit("error",o,r),void t.emit("complete");for(var u=0;u<r.length;u++)e[r[u]]=c[u];i(n,e,t)}});c&&(t._complete=!0,t.emit("complete"))}}function c(n,e,t){var r={};for(var o in n)r[o]=n[o];i(r,e,t)}var u=/^\!.+/;r.prototype.run=function(){var n,e=this;this._task.fn.apply(this,this._args.concat([function(t){var r=Array.prototype.slice.call(arguments,1);t?(n=!0,e.done(t)):n||e.done(null,r)}]))},r.prototype.done=function(n,e){return n?this._done(n):void this._done(null,e)},e.exports=c},{}],16:[function(n,e,t){var r=n("rtc-core/plugin"),o=n("cog/extend"),i=e.exports=function(n,e,t){function o(n,e){return(e||{}).muted&&(n.muted=!0,n.setAttribute("muted","")),(e||{}).mirror&&n.setAttribute("data-mirrored",!0),n}function i(e,t){var r=(t||{}).autoplay,i="audio",c=(t||{}).el||(t||{}).target,a=e&&"function"==typeof e.getVideoTracks;return a&&e.getVideoTracks().length>0&&(i="video"),c&&"function"!=typeof c.play&&(c=null),c=c||document.createElement(i),u&&u.createObjectURL?c.src=u.createObjectURL(n):c.srcObject?c.srcObject=n:c.mozSrcObject&&(c.mozSrcObject=n),(void 0===r||r)&&(c.setAttribute("autoplay",""),c.play()),o(c,t)}var c,u="undefined"!=typeof window&&window.URL;return"function"==typeof e&&(t=e,e={}),(c=r((e||{}).plugins))?c.init(e,function(r){return r?t(r):"function"!=typeof c.attach?t(new Error("plugin must support the attach function")):void t(null,o(c.attach(n,e),e))}):void t(null,i(n,e))};i.local=function(n,e,t){"function"==typeof e&&(t=e,e={}),i(n,o({muted:!0,mirror:!0},e),t)}},{"cog/extend":6,"rtc-core/plugin":21}],17:[function(n,e,t){var r=n("rtc-core/plugin"),o=n("rtc-core/detect");navigator.getUserMedia=navigator.getUserMedia||o.call(navigator,"getUserMedia"),e.exports=function(n,e,t){function o(n){t(null,n)}var i;return"function"==typeof e&&(t=e,e={}),(i=r((e||{}).plugins))?i.init(e,function(e){return e?t(e):"function"!=typeof navigator.getUserMedia?t(new Error("plugin does not support media capture")):void navigator.getUserMedia(n,o,t)}):"function"!=typeof navigator.getUserMedia?t(new Error("getUserMedia not supported")):void navigator.getUserMedia(n,o,t)}},{"rtc-core/detect":18,"rtc-core/plugin":21}],18:[function(n,e,t){"use strict";var r=n("detect-browser"),o=e.exports=function(n,e){var t,r,i,c=(e||{}).attach,u=this||("undefined"!=typeof window?window:void 0),a=((e||{}).prefixes||["ms","o","moz","webkit"]).concat("");if(u)for(t=a.length;t--;)if(r=a[t],i=r+(r?n.charAt(0).toUpperCase()+n.slice(1):n),"undefined"!=typeof u[i])return o.browser=o.browser||r.toLowerCase(),c&&(u[n]=u[i]),u[i]};o.moz="undefined"!=typeof navigator&&!!navigator.mozGetUserMedia,o.browser=r.name,o.browserVersion=o.version=r.version},{"detect-browser":20}],19:[function(n,e,t){e.exports=function(n,e){var t=(n||{}).ice,r=(n||{}).iceServers;return"function"==typeof t?t(n,e):Array.isArray(t)?e(null,[].concat(t)):void e(null,[].concat(r||[]))}},{}],20:[function(n,e,t){function r(n){return n.concat(n[1].exec(navigator.userAgent))}function o(n){return!!n[2]}for(var i=[["chrome",/Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+)\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/iPad\;\sCPU\sOS\s([0-9\._]+)/],["ios",/iPhone\;\sCPU\siPhone\sOS\s([0-9\._]+)/],["safari",/Safari\/([0-9\._]+)/]],r=i.map(r).filter(o)[0],c=r&&r[3].split(/[._]/).slice(0,3);c&&c.length<3;)c.push("0");t.name=r&&r[0],t.version=c&&c.join(".")},{}],21:[function(n,e,t){function r(n){return n&&"function"==typeof n.supported&&n.supported(i)}function o(n){var e=c.filter(function(e){return"function"==typeof n[e]});return e.length===c.length}var i=n("./detect"),c=["init"];e.exports=function(n){return[].concat(n||[]).filter(r).filter(o)[0]}},{"./detect":18}],22:[function(n,e,t){"use strict";var r=n("rtc-tools"),o=n("mbus"),i=n("rtc-core/plugin"),c=r.logger("rtc-quickconnect"),u=n("cog/extend");e.exports=function(e,t){function a(){clearTimeout(M),E||S&&(!F||m)&&g&&(D&&L.length<D||(M=setTimeout(function(){var n=u({room:k},A);w.announce(n),E=!0},0)))}function s(n){var e,i,a=b(n);a.room===k&&(T.end(n),e=r.createConnection(u({},t,{iceServers:g}),(t||{}).constraints),w("peer:connect",a.id,e,a),T.create(a.id,e),L.forEach(function(n){e.addStream(n)}),w.isMaster(a.id)?(c("is master, creating data channels: ",Object.keys(C)),Object.keys(C).forEach(function(n){l(e.createDataChannel(n,C[n]),e,a)})):e.ondatachannel=function(t){var r=t&&t.channel;r&&void 0!==C[r.label]&&l(r,e,b(n))},c("coupling "+w.id+" to "+a.id),i=r.couple(e,n,w,u({},t,{logger:o("pc."+n,w)})),w("peer:couple",n,e,a,i),i.once("connected",T.start.bind(null,n,e,a)),i.once("closed",T.end.bind(null,n)),w.isMaster(n)&&i.createOffer())}function f(n){var e=T.get(n);if(!e)throw new Error("No active call for peer: "+n);return e}function l(n,e,t){function r(){var r=T.get(t.id),i=[t.id,n,t,e];c('reporting channel "'+n.label+'" ready, have call: '+!!r),clearInterval(o),n.onopen=null,r&&r.channels.set(n.label,n),c("triggering channel:opened events for channel: "+n.label),w.apply(w,["channel:opened"].concat(i)),w.apply(w,["channel:opened:"+n.label].concat(i))}var o;return c("channel "+n.label+" discovered for peer: "+t.id),"open"===n.readyState?r():(c("channel not ready, current state = "+n.readyState),n.onopen=r,void(o=setInterval(function(){c("checking channel state, current state = "+n.readyState),"open"===n.readyState&&r()},500)))}function p(){return F&&F.init(t,function(n){return n?console.error("Could not initialize plugin: ",n):(m=!0,void a())})}function d(n){n&&"undefined"!=typeof n.room&&(k=n.room)}function v(n,e){e.allow=e.allow&&L.length>=D}function h(n){var e=n&&n.id,t=e&&T.get(e);return e&&!t?(c("received peer update from peer "+e+", no active calls"),w.to(e).send("/reconnect"),s(e)):void 0}var g,m,y="undefined"!=typeof location&&location.hash.slice(1),w=n("rtc-pluggable-signaller")(u({signaller:e,endpoints:["/","/primus"]},t)),b=n("./lib/getpeerdata")(w.peers),x=(t||{}).ns||"",k=(t||{}).room,_=(t||{}).debug,S=!(t||{}).manualJoin,A={},E=!1,L=[],T=w.calls=n("./lib/calls")(w,t),C={},O=w.plugins=(t||{}).plugins||[],F=i(O),D=parseInt((t||{}).expectedLocalStreams,10)||0,M=0,j=0;return k||("undefined"==typeof location||y||(y=location.hash=""+Math.pow(2,53)*Math.random()),k=x+"#"+y),_&&r.logger.enable.apply(r.logger,Array.isArray(c)?_:["*"]),w.on("peer:announce",function(n){s(n.id)}),w.on("peer:update",h),w.on("message:reconnect",function(n){s(n.id)}),w.broadcast=w.addStream=function(n){return L.push(n),T.values().forEach(function(e){e.pc.addStream(n)}),a(),w},w.endCalls=function(){T.keys().forEach(T.end)},w.close=function(){w.endCalls(),w.leave()},w.createDataChannel=function(n,e){return T.keys().forEach(function(t){var r,o=T.get(t);o&&o.pc&&w.isMaster(t)&&(r=o.pc.createDataChannel(n,e),l(r,o.pc,b(t)))}),C[n]=e||null,w},w.join=function(){S=!0,a()},w.get=function(n){return A[n]},w.getLocalStreams=function(){return[].concat(L)},w.reactive=function(){return t=t||{},t.reactive=!0,w},w.removeStream=function(n){var e=L.indexOf(n);return T.values().forEach(function(e){e.pc.removeStream(n)}),e>=0&&L.splice(e,1),w},w.requestChannel=function(n,e,t){var r=f(n),o=r&&r.channels.get(e);return o?(t(null,o),w):(w.once("channel:opened:"+e,function(n,e){t(null,e)}),w)},w.requestStream=function(n,e,t){function r(c){c===n&&(o=i.pc.getRemoteStreams()[e],o&&(w.removeListener("stream:added",r),t(null,o)))}var o,i=f(n);return(o=i.pc.getRemoteStreams()[e])?(t(null,o),w):(w.on("stream:added",r),w)},w.profile=function(n){return u(A,n),E&&(clearTimeout(j),j=setTimeout(function(){w.announce(A)},(t||{}).updateDelay||1e3)),w},w.waitForCall=function(n,e){var t=T.get(n);return t&&t.active?(e(null,t.pc),w):void w.on("call:started",function t(r){r===n&&(w.removeListener("call:started",t),e(null,T.get(r).pc))})},D&&w.on("peer:filter",v),w.on("local:announce",d),w.on("message:ping",T.ping),n("rtc-core/genice")(t,function(n,e){return n?console.error("could not find iceServers: ",n):(g=e,void a())}),F&&p(),w}},{"./lib/calls":23,"./lib/getpeerdata":24,"cog/extend":6,mbus:26,"rtc-core/genice":19,"rtc-core/plugin":21,"rtc-pluggable-signaller":27,"rtc-tools":60}],23:[function(n,e,t){(function(t){var r=n("rtc-tools"),o=r.logger("rtc-quickconnect"),i=n("rtc-tools/cleanup"),c=n("cog/getable");e.exports=function(e,r){function u(n,e){m.set(n,{active:!1,pc:e,channels:c({}),streams:[],lastping:Date.now()})}function a(n){return function(e){o("peer "+n+" added stream"),h(n),p(n)(e.stream)}}function s(n){return function(t){o("peer "+n+" removed stream"),h(n),e("stream:removed",n,t.stream)}}function f(n){var t=m.get(n);t&&(t.channels.keys().forEach(function(r){var o=t.channels.get(r),i=[n,o,r];e.apply(e,["channel:closed"].concat(i)),e.apply(e,["channel:closed:"+r].concat(i)),o.onopen=null}),t.streams.forEach(function(t){e("stream:removed",n,t)}),m.delete(n),0===m.keys().length&&d(),e("call:ended",n,t.pc),i(t.pc))}function l(n){var e=m.get(n&&n.id);e&&(e.lastping=Date.now())}function p(n){return function(t){e("stream:added",n,t,y(n))}}function d(){clearInterval(g),g=0}function v(i,c,u){var f=m.get(i),l=[].concat(c.getRemoteStreams());f.active=!0,f.streams=[].concat(c.getRemoteStreams()),c.onaddstream=a(i),c.onremovestream=s(i),o(e.id+" - "+i+" call start: "+l.length+" streams"),e("call:started",i,c,u),g=g||n("./heartbeat")(e,m,r),t.nextTick(function(){l.forEach(p(i))})}function h(n){var e=m.get(n);e&&e.pc&&(e.streams=[].concat(e.pc.getRemoteStreams()))}var g,m=c({}),y=n("./getpeerdata")(e.peers);return m.create=u,m.end=f,m.ping=l,m.start=v,m}}).call(this,n("_process"))},{"./getpeerdata":24,"./heartbeat":25,_process:4,"cog/getable":7,"rtc-tools":60,"rtc-tools/cleanup":56}],24:[function(n,e,t){e.exports=function(n){return function(e){var t=n.get(e);return t&&t.data}}},{}],25:[function(n,e,t){e.exports=function(n,e,t){function r(){var t=Date.now()-4*o;e.keys().forEach(function(r){var o=e.get(r);return o.lastping<t?e.end(r):void n.to(r).send("/ping")})}var o=(t||{}).heartbeat||2500;return o?setInterval(r,o):void 0}},{}],26:[function(n,e,t){var r=/[\.\:]/,o=e.exports=function(n,e,t){function i(e){var r,o=[].slice.call(arguments,1),c=a(e),u=p[c]||[];return d.forEach(function(n){n({name:c,args:o})}),r=[].concat(u).map(function(n){return n.apply(t||this,o)}),i.parent&&(r=r.concat(i.parent.apply(t||this,[(n?n+".":"")+c].concat(o)))),r}function c(n){n?delete p[a(n)]:p={}}function u(n){function e(){d.splice(d.indexOf(n),1)}return d.push(n),e}function a(n){return(Array.isArray(n)?n:n.split(r)).join(".")}function s(n,e){var t=p[a(n)]||[],r=t?t.indexOf(e._actual||e):-1;r>=0&&t.splice(r,1)}function f(n,e){var t;return n=a(n),t=p[n],t?t.push(e):p[n]=[e],i}function l(n,e){function t(){var r=e.apply(this,arguments);return i.off(n,t),r}return e._actual=t,f(n,t)}var p={},d=[];return"function"==typeof n&&(e=n,n=""),n=a(n||""),i.clear=i.removeAllListeners=c,i.feed=u,i.on=i.addListener=f,i.once=l,i.off=i.removeListener=s,i.parent=e||n&&o(),i}},{}],27:[function(n,e,t){e.exports=function(e){var t=(e||{}).signaller,r=(e||{}).messenger||n("rtc-switchboard-messenger");return"string"==typeof t||t instanceof String?n("rtc-signaller")(r(t,e),e):t}},{"rtc-signaller":28,"rtc-switchboard-messenger":47}],28:[function(n,e,t){"use strict";var r=(n("rtc-core/detect"),n("cog/extend"),n("mbus"),n("cog/getable"),n("cuid"),n("pull-stream")),o=(n("pull-pushable"),n("rtc-signal/prepare"),n("pull-pushable")),i=0,c=1,u=2,a={version:"6.2.1"};e.exports=function(e,t){function s(n){d.push(n),y!==i||void 0!==l&&!l||w()}function f(){(void 0===p||p)&&setTimeout(w,50)}var l=(t||{}).autoconnect,p=(t||{}).reconnect,d=o(),v=0,h=n("rtc-signal/signaller")(t,s),g=!1,m=0,y=i,w=h.connect=function(){y!==c&&(y=c,e(function(n,e,t){return n?(y=i,h("error",n)):(v+=1,y=u,r(e,r.through(null,function(){d=o(),y=i,h("disconnected")}),r.drain(h._process)),r(d,t),h.removeListener("disconnected",f),h.on("disconnected",f),h("connected"),void(g&&v>1&&h._announce()))}))};return h.announce=function(n){return g=!0,h._update(n),clearTimeout(m),m=setTimeout(h._announce,(t||{}).announceDelay||10)},h.leave=h.close=function(){h.send("/leave",{id:h.id}),h.removeListener("disconnected",f),h.removeListener("connected",h._announce),d.end(),y=i},h._update({agent:"signaller@"+a.version}),(void 0===l||l)&&w(),h}},{"cog/extend":6,"cog/getable":7,cuid:29,mbus:26,"pull-pushable":30,"pull-stream":37,"rtc-core/detect":18,"rtc-signal/prepare":44,"rtc-signal/signaller":46}],29:[function(n,e,t){!function(n){"use strict";var t="cuid",r=0,o=4,i=36,c=Math.pow(i,o),u=function(n,e){var t="000000000"+n;return t.substr(t.length-e)},a=function(){return u((Math.random()*c<<0).toString(i),o)},s=function(){return r=c>r?r:0,r++,r-1},f=function(){var n,e="c",t=(new Date).getTime().toString(i),r=f.fingerprint(),c=a()+a();return n=u(s().toString(i),o),e+t+n+r+c};f.slug=function(){var n,e=(new Date).getTime().toString(36),t=f.fingerprint().slice(0,1)+f.fingerprint().slice(-1),r=a().slice(-2);return n=s().toString(36).slice(-4),e.slice(-2)+n+t+r},f.globalCount=function(){var n=function(){var n,e=0;for(n in window)e++;return e}();return f.globalCount=function(){return n},n},f.fingerprint=function(){return u((navigator.mimeTypes.length+navigator.userAgent.length).toString(36)+f.globalCount().toString(36),4)},n.register?n.register(t,f):"undefined"!=typeof e?e.exports=f:n[t]=f}(this.applitude||this)},{}],30:[function(n,e,t){var r=n("pull-stream");e.exports=r.Source(function(n){function e(){for(var n;c.length&&((n=o.length)||r);){var e=o.shift(),t=i.shift();c.shift()(n?null:r,e),t&&t(r===!0?null:r)}}function t(t,o){r=r||t,c.push(o),e(),r&&n&&n(r===!0?null:r)}var r,o=[],i=[],c=[];return t.push=function(n,t){return r?t&&t(r===!0?null:r):(o.push(n),i.push(t),void e())},t.end=function(t,o){"function"==typeof t&&(o=t,t=!0),r=r||t||!0,o&&i.push(o),e(),r&&n&&n(r===!0?null:r)},t})},{"pull-stream":31}],31:[function(n,e,t){var r=n("./sources"),o=n("./sinks"),i=n("./throughs"),c=n("pull-core");for(var u in r)t[u]=c.Source(r[u]);for(var u in i)t[u]=c.Through(i[u]);for(var u in o)t[u]=c.Sink(o[u]);var a=n("./maybe")(t);for(var u in a)t[u]=a[u];t.Duplex=t.Through=t.pipeable=c.Through,t.Source=t.pipeableSource=c.Source,t.Sink=t.pipeableSink=c.Sink},{"./maybe":32,"./sinks":34,"./sources":35,"./throughs":36,"pull-core":33}],32:[function(n,e,t){var r=n("pull-core"),o=r.prop,i=r.id,c=r.maybeSink;e.exports=function(n){{var e={},t=n.drain,r=(e.find=function(n,e){return c(function(e){var r=!1;return e?n=o(n)||i:(e=n,n=i),t(function(t){return n(t)?(r=!0,e(null,t),!1):void 0},function(n){r||e(n===!0?null:n,null)})},e)},e.reduce=function(n,e,r){return c(function(r){return t(function(t){e=n(e,t)},function(n){r(n,e)})},r)});e.collect=e.writeArray=function(n){return r(function(n,e){return n.push(e),n},[],n)}}return e}},{"pull-core":33}],33:[function(n,e,t){function r(n){return"function"!=typeof n?n:(n.pipe=n.pipe||function(e){if("function"!=typeof e)throw new Error("must pipe to reader");return r(e(n))},n.type="Source",n)}t.id=function(n){return n},t.prop=function(n){if("string"==typeof n){var e=n;return function(n){return n[e]}}return n},t.tester=function(n){return n?"object"==typeof n&&"function"==typeof n.test?n.test.bind(n):t.prop(n)||t.id:t.id},t.addPipe=r;var o=(t.Source=function(n){function e(){var e=[].slice.call(arguments);return r(n.apply(null,e))}return e.type="Source",e},t.Through=function(n){return function(){function e(e){for(t.unshift(e),e=n.apply(null,t);r.length;)e=r.shift()(e);return e}var t=[].slice.call(arguments),r=[];return e.pipe=function(n){if(r.push(n),"Source"===n.type)throw new Error("cannot pipe "+e.type+" to Source");return e.type="Sink"===n.type?"Sink":"Through",e},e.type="Through",e}}),i=t.Sink=function(n){return function(){function e(e){return t.unshift(e),n.apply(null,t)}var t=[].slice.call(arguments);if(!n)throw new Error("must be createReader function");return e.type="Sink",e}};t.maybeSink=t.maybeDrain=function(n,e){return e?i(function(t){return n(e)(t)})():o(function(e){var t;return function(r,o){return r?e(r,o):t?o(t):void n(function(n,e){t=n||!0,n?o(t):o(null,e)})(e)}})()}},{}],34:[function(n,e,t){{var r=t.drain=function(n,e,t){!function r(){for(var o=!0,i=!1;o;)if(i=!1,n(null,function(c,u){i=!0,c?(o=!1,t&&t(c===!0?null:c)):e&&!1===e(u)?(o=!1,n(!0,t||function(){})):o||r()}),!i)return void(o=!1)}()};t.onEnd=function(n,e){return r(n,null,e)},t.log=function(n,e){return r(n,function(n){console.log(n)},e)}}},{}],35:[function(n,e,t){{var r=(t.keys=function(n){return o(Object.keys(n))},t.once=function(n){return function(e,t){if(e)return t(e);if(null!=n){var r=n;n=null,t(null,r)}else t(!0)}}),o=t.values=t.readArray=function(n){Array.isArray(n)||(n=Object.keys(n).map(function(e){return n[e]}));var e=0;return function(t,r){return t?r&&r(t):void r(e>=n.length||null,n[e++])}};t.count=function(n){var e=0;return n=n||1/0,function(t,r){return t?r&&r(t):e>n?r(!0):void r(null,e++)}},t.infinite=function(n){return n=n||Math.random,function(e,t){return e?t&&t(e):t(null,n())}},t.defer=function(){var n,e,t=[],r=function(r,o){n?n(r,o):(e=r,t.push(o))};return r.resolve=function(r){if(n)throw new Error("already resolved");if(n=r,!n)throw new Error("no read cannot resolve!"+n);for(;t.length;)n(e,t.shift())},r.abort=function(n){r.resolve(function(e,t){t(n||!0)})},r},t.empty=function(){return function(n,e){e(!0)}},t.depthFirst=function(n,e){var t=[];return t.unshift(r(n)),function n(r,o){return t.length?void t[0](r,function(r,i){return r?(t.shift(),n(null,o)):(t.unshift(e(i)),void o(r,i))}):o(!0)}},t.widthFirst=function(n,e){var t=[];return t.push(r(n)),function n(r,o){return t.length?void t[0](r,function(r,i){return r?(t.shift(),n(null,o)):(t.push(e(i)),void o(r,i))}):o(!0)}},t.leafFirst=function(n,e){var t=[],o=[];return t.push(r(n)),function n(r,i){t[0](r,function(r,c){return r?(t.shift(),o.length?i(null,o.shift()):i(!0)):(t.unshift(e(c)),o.unshift(c),void n(null,i))})}}}},{}],36:[function(n,e,t){(function(e){{var r=n("pull-core"),o=n("./sources"),i=n("./sinks"),c=r.prop,u=r.id,a=r.tester,s=(t.map=function(n,e){return e=c(e)||u,function(t,r){n(t,function(n,t){var t=n?null:e(t);r(n,t)})}},t.asyncMap=function(n,e){return e?function(t,r){return t?n(t,r):void n(null,function(n,t){return n?r(n,t):void e(t,r)})}:n},t.paraMap=function(n,e,t){function r(){if(i){var n=i;return i=null,u.length?n(null,u.shift()):c&&!a?n(c):void(i=n)}}function o(){n(null,function(n,i){return n?(c=n,r()):(a++,e(i,function(n,e){a--,u.push(e),r()}),void(t>a&&!c&&o()))})}if(!e)return n;var i,c=!1,u=[],a=0;return function(e,t){return e?n(e,t):(i=t,void(u.length||c?(o(),r()):o()))}},t.filter=function(n,e){return e=a(e),function t(r,o){n(r,function(n,r){return n||e(r)?void o(n,r):t(n,o)})}}),f=(t.filterNot=function(n,e){return e=a(e),s(n,function(n){return!e(n)})},t.through=function(n,e,t){function r(n){!o&&t&&(o=!0,t(n===!0?null:n))}var o=!1;return function(t,o){return t&&r(t),n(t,function(n,t){n?r(n):e&&e(t),o(n,t)})}},t.take=function(n,e){var t=!1;if("number"==typeof e){var r=e;e=function(){return r--}}return function(r,o){return t?o(t):(t=r)?n(t,o):void n(null,function(r,i){return(t=t||r)?o(t):void(e(i)?o(null,i):(t=!0,n(!0,function(n,e){o(t,e)})))})}},t.unique=function(n,e,t){e=c(e)||u;var r={};return s(n,function(n){var o=e(n);return r[o]?!!t:(r[o]=!0,!t)})}),l=(t.nonUnique=function(n,e){return f(n,e,!0)},t.group=function(n,e){var t;e=e||5;var r=[];return function(o,i){return o?n(t=o,i):t?i(t):void n(null,function o(c,u){if(t=t||c){if(!r.length)return i(t);var a=r;return r=[],i(null,a)}if(r.push(u),r.length<e)return n(null,o);var a=r;r=[],i(null,a)})}},t.flatten=function(n){var e;return function(t,r){function i(){e(null,function(n,e){n?c():r(null,e)})}function c(){n(null,function(n,t){if(n)return r(n);if(Array.isArray(t))t=o.values(t);else if("function"!=typeof t)throw new Error("expected stream of streams");e=t,i()})}e?i():c()}},t.prepend=function(n,e){return function(t,r){if(null!==e){if(t)return n(t,r);var o=e;e=null,r(null,o)}else n(t,r)}},t._reduce=function(n,e,t){return function(r,o){return r?n(r,o):ended?o(ended):void i.drain(function(n){t=e(t,n)},function(n,e){ended=n||!0,n?o(ended):o(null,t)})(n)}},e.nextTick);t.highWaterMark=function(n,e){function t(){for(;c.length&&(i.length||o);)c.shift()(o,o?null:i.shift())}function r(){return o||u||i.length>=e?void 0:(u=!0,n(o,function(n,e){u=!1,o=o||n,null!=e&&i.push(e),r(),t()}))}var o,i=[],c=[],u=!1;return e=e||10,l(r),function(n,e){o=o||n,c.push(e),r(),t()}}}}).call(this,n("_process"))},{"./sinks":34,"./sources":35,_process:4,"pull-core":33}],37:[function(n,e,t){function r(n){return"function"==typeof n}function o(n){return n&&("Through"===n.type||1===n.length)}var i=n("./sources"),c=n("./sinks"),u=n("./throughs"),a=n("pull-core"),t=e.exports=function n(){function e(){var n=t.shift();return null==n?e():r(n)?n:function(e){return n.sink(e),
n.source}}var t=[].slice.call(arguments);if(o(t[0]))return function(e){return t.unshift(e),n.apply(null,t)};var i=t.shift();for(r(i.source)&&(i=i.source);t.length;)i=e()(i);return i};for(var s in i)t[s]=a.Source(i[s]);for(var s in u)t[s]=a.Through(u[s]);for(var s in c)t[s]=a.Sink(c[s]);var f=n("./maybe")(t);for(var s in f)t[s]=f[s];t.Duplex=t.Through=t.pipeable=a.Through,t.Source=t.pipeableSource=a.Source,t.Sink=t.pipeableSink=a.Sink},{"./maybe":38,"./sinks":40,"./sources":41,"./throughs":42,"pull-core":39}],38:[function(n,e,t){var r=n("pull-core"),o=r.prop,i=r.id,c=r.maybeSink;e.exports=function(n){{var e={},t=n.drain,r=(e.find=function(n,e){return c(function(e){var r=!1;return e?n=o(n)||i:(e=n,n=i),t(function(t){return n(t)?(r=!0,e(null,t),!1):void 0},function(n){r||e(n===!0?null:n,null)})},e)},e.reduce=function(n,e,r){return c(function(r){return t(function(t){e=n(e,t)},function(n){r(n,e)})},r)});e.collect=e.writeArray=function(n){return r(function(n,e){return n.push(e),n},[],n)},e.concat=function(n){return r(function(n,e){return n+e},"",n)}}return e}},{"pull-core":39}],39:[function(n,e,t){arguments[4][33][0].apply(t,arguments)},{dup:33}],40:[function(n,e,t){{var r=t.drain=function(n,e,t){!function r(){for(var o=!0,i=!1;o;)if(i=!1,n(null,function(c,u){if(i=!0,c){if(o=!1,t)t(c===!0?null:c);else if(c&&c!==!0)throw c}else e&&!1===e(u)?(o=!1,n(!0,t||function(){})):o||r()}),!i)return void(o=!1)}()};t.onEnd=function(n,e){return r(n,null,e)},t.log=function(n,e){return r(n,function(n){console.log(n)},e)}}},{}],41:[function(n,e,t){{var r=(t.keys=function(n){return o(Object.keys(n))},t.once=function(n){return function(e,t){if(e)return t(e);if(null!=n){var r=n;n=null,t(null,r)}else t(!0)}}),o=t.values=t.readArray=function(n){Array.isArray(n)||(n=Object.keys(n).map(function(e){return n[e]}));var e=0;return function(t,r){return t?r&&r(t):void r(e>=n.length||null,n[e++])}};t.count=function(n){var e=0;return n=n||1/0,function(t,r){return t?r&&r(t):e>n?r(!0):void r(null,e++)}},t.infinite=function(n){return n=n||Math.random,function(e,t){return e?t&&t(e):t(null,n())}},t.defer=function(){var n,e,t=[],r=function(r,o){n?n(r,o):(e=r,t.push(o))};return r.resolve=function(r){if(n)throw new Error("already resolved");if(n=r,!n)throw new Error("no read cannot resolve!"+n);for(;t.length;)n(e,t.shift())},r.abort=function(n){r.resolve(function(e,t){t(n||!0)})},r},t.empty=function(){return function(n,e){e(!0)}},t.error=function(n){return function(e,t){t(n)}},t.depthFirst=function(n,e){var t=[];return t.unshift(r(n)),function n(r,o){return t.length?void t[0](r,function(r,i){return r?(t.shift(),n(null,o)):(t.unshift(e(i)),void o(r,i))}):o(!0)}},t.widthFirst=function(n,e){var t=[];return t.push(r(n)),function n(r,o){return t.length?void t[0](r,function(r,i){return r?(t.shift(),n(null,o)):(t.push(e(i)),void o(r,i))}):o(!0)}},t.leafFirst=function(n,e){var t=[],o=[];return t.push(r(n)),function n(r,i){t[0](r,function(r,c){return r?(t.shift(),o.length?i(null,o.shift()):i(!0)):(t.unshift(e(c)),o.unshift(c),void n(null,i))})}}}},{}],42:[function(n,e,t){(function(e){{var r=n("pull-core"),o=n("./sources"),i=n("./sinks"),c=r.prop,u=r.id,a=r.tester,s=(t.map=function(n,e){return e=c(e)||u,function(t,r){n(t,function(t,o){try{o=t?null:e(o)}catch(e){return n(e,function(){return r(e)})}r(t,o)})}},t.asyncMap=function(n,e){return e?function(t,r){return t?n(t,r):void n(null,function(n,t){return n?r(n,t):void e(t,r)})}:n},t.paraMap=function(n,e,t){function r(){if(i){var n=i;return i=null,u.length?n(null,u.shift()):c&&!a?n(c):void(i=n)}}function o(){n(null,function(n,i){return n?(c=n,r()):(a++,e(i,function(n,e){a--,u.push(e),r()}),void(t>a&&!c&&o()))})}if(!e)return n;var i,c=!1,u=[],a=0;return function(e,t){return e?n(e,t):(i=t,void(u.length||c?(o(),r()):o()))}},t.filter=function(n,e){return e=a(e),function t(r,o){for(var i,c=!0;c;)c=!1,i=!0,n(r,function(n,r){return n||e(r)?void o(n,r):i?c=!0:t(n,o)}),i=!1}}),f=(t.filterNot=function(n,e){return e=a(e),s(n,function(n){return!e(n)})},t.through=function(n,e,t){function r(n){!o&&t&&(o=!0,t(n===!0?null:n))}var o=!1;return function(t,o){return t&&r(t),n(t,function(n,t){n?r(n):e&&e(t),o(n,t)})}},t.take=function(n,e){var t=!1;if("number"==typeof e){var r=e;e=function(){return r--}}return function(r,o){return t?o(t):(t=r)?n(t,o):void n(null,function(r,i){return(t=t||r)?o(t):void(e(i)?o(null,i):(t=!0,n(!0,function(n,e){o(t,e)})))})}},t.unique=function(n,e,t){e=c(e)||u;var r={};return s(n,function(n){var o=e(n);return r[o]?!!t:(r[o]=!0,!t)})});t.nonUnique=function(n,e){return f(n,e,!0)},t.group=function(n,e){var t;e=e||5;var r=[];return function(o,i){return o?n(t=o,i):t?i(t):void n(null,function o(c,u){if(t=t||c){if(!r.length)return i(t);var a=r;return r=[],i(null,a)}if(r.push(u),r.length<e)return n(null,o);var a=r;r=[],i(null,a)})}},t.flatten=function(n){var e;return function(t,r){function i(){e(null,function(n,e){n?c():r(null,e)})}function c(){n(null,function(n,t){if(n)return r(n);if(Array.isArray(t)||t&&"object"==typeof t)t=o.values(t);else if("function"!=typeof t)throw new Error("expected stream of streams");e=t,i()})}e?i():c()}},t.prepend=function(n,e){return function(t,r){if(null!==e){if(t)return n(t,r);var o=e;e=null,r(null,o)}else n(t,r)}},t._reduce=function(n,e,t){return function(r,o){return r?n(r,o):ended?o(ended):void i.drain(function(n){t=e(t,n)},function(n,e){ended=n||!0,n?o(ended):o(null,t)})(n)}},e.nextTick,t.highWaterMark=function(n,t){function r(){for(;a.length&&(u.length||i);)a.shift()(i,i?null:u.shift());!u.length&&c&&(i=c)}function o(){return i||c||s||u.length>=t?void 0:(s=!0,n(i||c,function(n,e){s=!1,c=c||n,null!=e&&u.push(e),o(),r()}))}var i,c,u=[],a=[],s=!1;return t=t||10,e.nextTick(o),function(n,e){i=i||n,a.push(e),o(),r()}},t.flatMap=function(n,e){e=e||u;var t,r=[];return function(o,i){return r.length?i(null,r.shift()):t?i(t):void n(o,function o(c,u){if(c)t=c;else for(var a=e(u);a&&a.length;)r.push(a.shift());r.length?i(null,r.shift()):t?i(t):n(null,o)})}}}}).call(this,n("_process"))},{"./sinks":40,"./sources":41,_process:4,"pull-core":39}],43:[function(n,e,t){var r=n("cog/extend");e.exports=function(n){function e(e){var t=r({allow:!0},e);return n("peer:filter",e.id,t),t.allow}return function(t,o,i,c,u){var a,s=t[0];if(s&&s.id&&s.id!==n.id){if(!e(s))return;return a=n.peers.get(s.id),n("peer:connected",s.id,s),a?(r(a.data,s),n("peer:update",s,i)):(a={id:s.id,roleIdx:[s.id,n.id].sort().indexOf(s.id),data:{}},r(a.data,s),n.peers.set(s.id,a),n.autoreply&&!u&&n.to(s.id).send("/announce",n.attributes),n("peer:announce",s,a))}}}},{"cog/extend":6}],44:[function(n,e,t){function r(n){return"object"!=typeof n||n instanceof String?"function"==typeof n?null:n:JSON.stringify(n)}e.exports=function(n){return n.map(r).join("|")}},{}],45:[function(n,e,t){var r=n("cog/jsonparse");e.exports=function(e,t){function o(n,t,o){var i="message:"+n[0].slice(1),c=n.slice(2).map(r);e.apply(e,[i].concat(c).concat([t,o]))}var i={announce:n("./handlers/announce")(e,t)};return function(n){var t,c,u,a,s=n,f=!0,l=!1;if(!s||"primus"!==s.slice(0,6)){var p=e.id+"";if("/to"===s.slice(0,3)&&(f=s.slice(4,p.length+4)===p,f&&(t=s.slice(5+p.length).split("|").map(r),l=!0,t=t.map(r))),f&&(e("rawdata",s),t=t||s.split("|").map(r),"string"==typeof t[0])){if(u=t[1],u===e.id)return console.warn("got data from ourself, discarding");a=e.peers.get(u)||u,"/"===t[0].charAt(0)?(c=i[t[0].slice(1)],"function"==typeof c?c(t.slice(2),t[0].slice(1),u,a,l):o(t,a,n)):e("data",t.slice(0,1).concat(t.slice(2)),u,a,l)}}}}},{"./handlers/announce":43,"cog/jsonparse":8}],46:[function(n,e,t){var r=n("rtc-core/detect"),o=n("cog/extend"),i=n("cog/getable"),c=n("cuid"),u=n("mbus"),a=n("./prepare");e.exports=function(e,t){function s(n){return function(){var e=n.concat([].slice.call(arguments));e.splice(3,0,l.id),t(a(e))}}var f=(e||{}).autoreply,l=u("",(e||{}).logger),p=l.peers=i({}),d=l.attributes={browser:r.browser,browserVersion:r.browserVersion,agent:"unknown"};return l.id=(e||{}).id||c(),l.isMaster=function(n){var e=p.get(n);return e&&0!==e.roleIdx},l.send=function(){var n=[].slice.call(arguments);n.splice(1,0,l.id),t(a(n))},l.to=function(n){return{send:s(["/to",n])}},l._announce=function(){l.send("/announce",d),l("local:announce",d)},l._process=n("./process")(l),l._update=function(n){o(d,n,{id:l.id})},l.autoreply=void 0===f||f,l}},{"./prepare":44,"./process":45,"cog/extend":6,"cog/getable":7,cuid:29,mbus:26,"rtc-core/detect":18}],47:[function(n,e,t){var r=n("cog/extend");e.exports=function(e,t){return n("messenger-ws")(e,r({endpoints:(t||{}).endpoints||["/"]},t))}},{"cog/extend":6,"messenger-ws":48}],48:[function(n,e,t){var r=n("ws"),o=n("wsurl"),i=n("pull-ws"),c=(n("cog/defaults"),/\/$/),u=[];e.exports=function(n,e){function t(t){function c(){if(!b){if(0===w.length)return t(new Error("Unable to connect to url: "+n));v=new r(o(w.shift())),v.addEventListener("message",u),v.addEventListener("error",p),v.addEventListener("close",l),v.addEventListener("open",d),m=v.removeEventListener||v.removeListener,h=setTimeout(c,a)}}function u(){b||(clearTimeout(h),clearTimeout(g),m.call(v,"open",d),m.call(v,"close",l),m.call(v,"error",p),m.call(v,"message",u),b=!0,t(null,y,i.sink(v,e)))}function l(n){var e=n.wasClean&&(void 0===n.code||s.indexOf(n.code)<0);return e?(clearTimeout(g),void clearTimeout(h)):p()}function p(){clearTimeout(g),clearTimeout(h),c()}function d(){y=i.source(v,e),g=setTimeout(u,100)}var v,h,g,m,y,w=[].concat(f),b=!1;c()}var a=(e||{}).timeout||1e3,s=(e||{}).failcodes||u,f=((e||{}).endpoints||["/"]).map(function(e){return n.replace(c,"")+e});return t}},{"cog/defaults":5,"pull-ws":49,ws:54,wsurl:55}],49:[function(n,e,t){function r(n,e){return{source:t.source(n),sink:t.sink(n,e)}}t=e.exports=r,t.source=n("./source"),t.sink=n("./sink")},{"./sink":52,"./source":53}],50:[function(n,e,t){function r(n){return"function"!=typeof n?n:(n.pipe=n.pipe||function(e){if("function"!=typeof e&&"function"!=typeof e.sink)throw new Error("must pipe to reader");var t=r(e.sink?e.sink(n):e(n));return e.source||t},n.type="Source",n)}t.id=function(n){return n},t.prop=function(n){if("string"==typeof n){var e=n;return function(n){return n[e]}}return n},t.tester=function(n){return n?"object"==typeof n&&"function"==typeof n.test?n.test.bind(n):t.prop(n)||t.id:t.id},t.addPipe=r;var o=(t.Source=function(n){function e(){var e=[].slice.call(arguments);return r(n.apply(null,e))}return e.type="Source",e},t.Through=function(n){return function(){function e(e){for(t.unshift(e),e=n.apply(null,t);r.length;)e=r.shift()(e);return e}var t=[].slice.call(arguments),r=[];return e.pipe=function(n){if(r.push(n),"Source"===n.type)throw new Error("cannot pipe "+e.type+" to Source");return e.type="Sink"===n.type?"Sink":"Through",e},e.type="Through",e}}),i=t.Sink=function(n){return function(){function e(e){return t.unshift(e),n.apply(null,t)}var t=[].slice.call(arguments);if(!n)throw new Error("must be createReader function");return e.type="Sink",e}};t.maybeSink=t.maybeDrain=function(n,e){return e?i(function(t){return n(e)(t)})():o(function(e){var t;return function(r,o){return r?e(r,o):t?o(t):void n(function(n,e){t=n||!0,n?o(t):o(null,e)})(e)}})()}},{}],51:[function(n,e,t){e.exports=function(n,e){function t(){"function"==typeof i&&(i.call(n,"open",r),i.call(n,"error",o))}function r(n){t(),e()}function o(n){t(),e(n)}var i=n&&(n.removeEventListener||n.removeListener);return n.readyState>=2?e(!0):1===n.readyState?e():(n.addEventListener("open",r),void n.addEventListener("error",o))}},{}],52:[function(n,e,t){(function(t){var r=n("pull-core"),o=n("./ready");e.exports=r.Sink(function(n,e,r){function i(r,a){return r?void(c&&e.readyState<=1&&(u&&e.addEventListener("close",function(n){if(n.wasClean)u();else{var e=new Error("ws error");e.event=n,u(e)}}),e.close())):void o(e,function(r){return r?n(r,function(){}):(e.send(a),void t.nextTick(function(){n(null,i)}))})}r=r||{};var c=r.closeOnEnd!==!1,u="function"==typeof r?r:r.onClose;n(null,i)})}).call(this,n("_process"))},{"./ready":51,_process:4,"pull-core":50}],53:[function(n,e,t){var r=n("pull-core"),o=n("./ready");e.exports=r.Source(function(n){function e(e,c){return t=null,r?c(r):e?(t=c,n.close()):void o(n,function(n){return n?c(r=n):r&&r!==!0?c(r):i.length>0?c(null,i.shift()):r?c(!0):void(t=c)})}var t,r,i=[];return n.addEventListener("message",function(n){return t?t(null,n.data):void i.push(n.data)}),n.addEventListener("close",function(n){return r?void 0:t?t(r=!0):void 0}),n.addEventListener("error",function(n){r||(r=n,t&&t(r))}),e})},{"./ready":51,"pull-core":50}],54:[function(n,e,t){function r(n,e,t){var r;return r=e?new i(n,e):new i(n)}var o=function(){return this}(),i=o.WebSocket||o.MozWebSocket;e.exports=i?r:null,i&&(r.prototype=i.prototype)},{}],55:[function(n,e,t){var r=/^http(.*)$/;e.exports=function(n,e){var t=(e||{}).current||"undefined"!=typeof location&&location.href,o=t&&t.slice(0,t.indexOf(":")),i=(e||{}).insecure,c="//"==n.slice(0,2),u=!o||"file:"===o;return c?u?(i?"ws:":"wss:")+n:o.replace(r,"ws$1")+":"+n:n.replace(r,"ws$1")}},{}],56:[function(n,e,t){"use strict";var r=n("cog/logger")("rtc/cleanup"),o=["closed"],i=["addstream","datachannel","icecandidate","negotiationneeded","removestream","signalingstatechange"],c=["iceconnectionstatechange"];e.exports=function(n){function e(e){e.forEach(function(e){n["on"+e]&&(n["on"+e]=null)})}var t=n.iceConnectionState,u=o.indexOf(t)<0;e(i),u&&(r("attempting connection close, current state: "+n.iceConnectionState),n.close()),setTimeout(function(){e(c)},100)}},{"cog/logger":9}],57:[function(n,e,t){"use strict";function r(e,t,r,s){function d(){S("decoupling "+r.id+" from "+t),A.stop(),c(e),r.removeListener("sdp",h),r.removeListener("candidate",v),r.removeListener("negotiate",b),r.removeListener("message:sdp",h),r.removeListener("message:candidate",v),r.removeListener("message:negotiate",b)}function v(n){F.addIceCandidate(n)}function h(n,e){E("sdp.remote",n),e&&e.id===t&&F.setRemoteDescription(n)}function g(){S("captured pc close, iceConnectionState = "+e.iceConnectionState),d()}function m(){S("captured pc disconnect, monitoring connection status"),k=setTimeout(function(){S("manually closing connection after disconnect timeout"),c(e)},C),A.on("statechange",y)}function y(){return S("connection state changed to: "+e.iceConnectionState),p.indexOf(e.iceConnectionState)>=0?void 0:(x(),l.indexOf(e.iceConnectionState)>=0?A("closed"):void A.once("disconnect",m))}function w(n){var e=n.candidate&&f(n.candidate);n.candidate?(x(),E("ice.local",e),r.to(t).send("/candidate",e),T=!1):T||(T=!0,E("ice.gathercomplete"),r.to(t).send("/endofcandidates",{}))}function b(n){n.id===t&&(E("negotiate.request",n.id),M())}function x(){A.off("statechange",y),S("reset disconnect timer, state: "+e.iceConnectionState),clearTimeout(k)}var k,_=(s||{}).debugLabel||"rtc",S=n("cog/logger")(_+"/couple"),A=u(e,t,r,(s||{}).logger),E=o("",A),L=(s||{}).reactive,T=!0,C=(s||{}).disconnectTimeout||1e4,O=r.isMaster(t),F=i(e,s),D=a(function(){return O?void F.createOffer():r.to(t).send("/negotiate")},100,{leading:!1}),M=a(F.createOffer,100,{leading:!1});return L&&(e.onnegotiationneeded=function(){E("negotiate.renegotiate"),D()}),e.onicecandidate=w,F.on("sdp.local",function(n){r.to(t).send("/sdp",n)}),r.on("sdp",h),r.on("candidate",v),r.on("message:sdp",h),r.on("message:candidate",v),O&&(r.on("negotiate",b),r.on("message:negotiate",b)),A.once("closed",g),A.once("disconnected",m),A.createOffer=D,A}var o=n("mbus"),i=n("rtc-taskqueue"),c=n("./cleanup"),u=n("./monitor"),a=n("cog/throttle"),s=n("whisk/pluck"),f=s("candidate","sdpMid","sdpMLineIndex"),l=["closed","failed"],p=["checking"];e.exports=r},{"./cleanup":56,"./monitor":61,"cog/logger":9,"cog/throttle":10,mbus:26,"rtc-taskqueue":62,"whisk/pluck":74}],58:[function(n,e,t){"use strict";e.exports=n("rtc-core/detect")},{"rtc-core/detect":18}],59:[function(n,e,t){"use strict";var r=n("cog/logger")("generators"),o=n("./detect"),i=n("cog/defaults"),c={create:{dtls:function(n){o.moz||(n.optional=(n.optional||[]).concat({DtlsSrtpKeyAgreement:!0}))}}};t.config=function(n){var e=(n||{}).iceServerGenerator;return i({},n,{iceServers:"function"==typeof e?e():[]})},t.connectionConstraints=function(n,e){var t,o={},u=c.create;return Object.keys(n||{}).forEach(function(n){u[n]&&u[n](o)}),t=i({},e,o),r("generated connection constraints: ",t),t}},{"./detect":58,"cog/defaults":5,"cog/logger":9}],60:[function(n,e,t){"use strict";var r=n("./generators"),o=t.detect=n("./detect"),i=n("rtc-core/plugin");t.logger=n("cog/logger");var c=t.RTCPeerConnection=o("RTCPeerConnection");t.couple=n("./couple"),t.createConnection=function(n,e){var t=i((n||{}).plugins),o=(n||{}).RTCPeerConnection||c,u=r.config(n);return e=r.connectionConstraints(n,e),t&&"function"==typeof t.createConnection?t.createConnection(u,e):new o(u,e)}},{"./couple":57,"./detect":58,"./generators":59,"cog/logger":9,"rtc-core/plugin":21}],61:[function(n,e,t){"use strict";function r(n){return i[n]||n}var o=n("mbus"),i={completed:"connected"},c=["signalingstatechange","iceconnectionstatechange"];e.exports=function(n,e,t,i){function u(){var e=r(n.iceConnectionState);f("statechange",n,e),s!==e&&(f(e),s=e)}function a(){f("closed")}var s,f=o("",i);return n.onclose=a,c.forEach(function(e){n["on"+e]=u}),f.stop=function(){n.onclose=null,c.forEach(function(e){n["on"+e]=null})},f.checkState=u,n?(s=r(n.iceConnectionState),f):f}},{mbus:26}],62:[function(n,e,t){var r=n("rtc-core/detect"),o=n("rtc-core/plugin"),i=n("priorityqueuejs"),c=n("whisk/pluck"),u=c("sdp","type"),a=n("rtc-validator/candidate"),s=n("rtc-sdpclean"),f=n("rtc-sdp"),l=100,p=1e3,d=["candidate","setLocalDescription","setRemoteDescription","createAnswer","createOffer"],v={setLocalDescription:"setlocaldesc",setRemoteDescription:"setremotedesc",createOffer:"offer",createAnswer:"answer"},h={data:"application"},g=["have-remote-offer","have-local-pranswer"];e.exports=function(e,t){function c(n,t){function r(){I("ice.remote.applied",c),t()}function o(n){I("ice.remote.invalid",c),t(n)}var i=n.args[0],c=i&&i.candidate&&b(i);return c?void e.addIceCandidate(c,r,o):t()}function m(){var n=!q.isEmpty()&&!R&&q.peek(),t=n&&M(n),r=!q.isEmpty()&&C(e);return P=0,t?(R=q.deq(),void R.fn(R,function(n){var e=R.fail||N,t=R.pass,r=R.name;return n?(console.error(r+" task failed: ",n),e(n)):("function"==typeof t&&t.apply(R,[].slice.call(arguments,1)),void setTimeout(function(){R=null,j()},0))})):r&&j()}function y(n){var t=[],r=n&&s(n.sdp,{collector:t});return n&&r!==n.sdp&&(console.info("invalid lines removed from sdp: ",t),n.sdp=r),"function"==typeof z&&(n.sdp=z(n.sdp,e)),n}function w(){return g.indexOf(e.signalingState)>=0?I.createAnswer():void 0}function b(n){return $&&"function"==typeof $.createIceCandidate?$.createIceCandidate(n):new B(n)}function x(n){return $&&"function"==typeof $.createSessionDescription?$.createSessionDescription(n):new V(n)}function k(){I("sdp.local",u(this.args[0]))}function _(n,e,t){return function(){var r=[].slice.call(arguments);t&&"function"==typeof t.processArgs&&(r=r.map(t.processArgs)),q.enq({args:r,name:n,fn:e,checks:[C].concat((t||{}).checks||[]),pass:(t||{}).pass,fail:(t||{}).fail}),j()}}function S(n,t){function r(e){I.apply(I,["negotiate.error",n.name,e].concat(n.args)),t(e)}function o(){I.apply(I,[["negotiate",c,"ok"],n.name].concat(n.args)),t.apply(null,[null].concat([].slice.call(arguments)))}var i=e[n.name],c=v[n.name]||(n.name||"").toLowerCase(),u=[o,r],a="createOffer"===n.name;return i?(I.apply(I,["negotiate."+c].concat(n.args)),void i.apply(e,n.args.concat(u).concat(a?E():[]))):t(new Error('cannot call "'+n.name+'" on RTCPeerConnection'))}function A(n){for(;n&&n.candidate&&n.candidate.candidate;)n=n.candidate;return n}function E(){var n={offertoreceivevideo:"OfferToReceiveVideo",offertoreceiveaudio:"OfferToReceiveAudio",icerestart:"IceRestart",voiceactivitydetection:"VoiceActivityDetection"},e={OfferToReceiveVideo:!0,OfferToReceiveAudio:!0};return Object.keys(t||{}).forEach(function(r){n[r.toLowerCase()]&&(e[n[r.toLowerCase()]]=t[r])}),{mandatory:e}}function L(n,e){return n.__hasDesc||(n.__hasDesc=!!n.remoteDescription)}function T(n){return"have-local-offer"!==n.signalingState}function C(n){return"closed"!==n.signalingState}function O(n,e){return e.__valid||(e.__valid=0===a(e.args[0]).length)}function F(n,e){var t=f(n.remoteDescription&&n.remoteDescription.sdp),r=t.getMediaTypes(),o=e.args[0]&&e.args[0].sdpMid;return o=h[o]||o,""===o||r.indexOf(o)>=0}function D(n,e){var t=[n,e],r=t.map(M),o=t.map(function(n,e){var t=r[e],o=t&&U.indexOf(n.name);return t?o>=0?o:l:p});return o[1]-o[0]}function M(n){return(n.checks||[]).reduce(function(t,r){return t&&r(e,n)},!0)}function j(){P||(P=setTimeout(m,50))}var R,q=new i(D),I=n("mbus")("",(t||{}).logger),U=(t||{}).priorities||d,$=o((t||{}).plugins),P=0,N=I.bind(I,"fail"),z=(t||{}).sdpfilter||(t||{}).sdpFilter,V=(t||{}).RTCSessionDescription||r("RTCSessionDescription"),B=(t||{}).RTCIceCandidate||r("RTCIceCandidate");return I.addIceCandidate=_("addIceCandidate",c,{processArgs:A,checks:[L,O,F]}),I.setLocalDescription=_("setLocalDescription",S,{processArgs:y,pass:k}),I.setRemoteDescription=_("setRemoteDescription",S,{processArgs:x,pass:w}),I.createOffer=_("createOffer",S,{checks:[T],pass:I.setLocalDescription}),I.createAnswer=_("createAnswer",S,{pass:I.setLocalDescription}),I}},{mbus:26,priorityqueuejs:63,"rtc-core/detect":18,"rtc-core/plugin":21,"rtc-sdp":64,"rtc-sdpclean":66,"rtc-validator/candidate":67,"whisk/pluck":74}],63:[function(n,e,t){function r(n){this._comparator=n||r.DEFAULT_COMPARATOR,this._elements=[]}e.exports=r,r.DEFAULT_COMPARATOR=function(n,e){return"number"==typeof n&&"number"==typeof e?n-e:(n=n.toString(),e=e.toString(),n==e?0:n>e?1:-1)},r.prototype.isEmpty=function(){return 0===this.size()},r.prototype.peek=function(){if(this.isEmpty())throw new Error("PriorityQueue is empty");return this._elements[0]},r.prototype.deq=function(){var n=this.peek(),e=this._elements.pop(),t=this.size();if(0===t)return n;this._elements[0]=e;for(var r=0;t>r;){var o=r,i=2*r+1,c=2*r+2;if(t>i&&this._compare(i,o)>=0&&(o=i),t>c&&this._compare(c,o)>=0&&(o=c),o===r)break;this._swap(o,r),r=o}return n},r.prototype.enq=function(n){for(var e=this._elements.push(n),t=e-1;t>0;){var r=Math.floor((t-1)/2);if(this._compare(t,r)<=0)break;this._swap(r,t),t=r}return e},r.prototype.size=function(){return this._elements.length},r.prototype.forEach=function(n){return this._elements.forEach(n)},r.prototype._compare=function(n,e){return this._comparator(this._elements[n],this._elements[e])},r.prototype._swap=function(n,e){var t=this._elements[n];this._elements[n]=this._elements[e],this._elements[e]=t}},{}],64:[function(n,e,t){"use strict";var r=n("whisk/nub"),o=n("whisk/pluck"),i=n("whisk/flatten"),c=/\r?\n/,u=/\r?\n$/,a=["a","c","b","k"],s=n("./parsers");e.exports=function(n){var e,t={},f=[],l=n.split(c).filter(Boolean).map(function(n){return n.split("=")}),p=(r(l.filter(function(n){return n[0]&&a.indexOf(n[0])<0}).map(o(0))),t.findLine=function(n,e){var t=f.filter(function(e){return e[0]===n})[e||0];return t&&t[1]});return l.forEach(function(n){var t=s[n[0]];t?e=t(f,n):e?e=e(n):f.push(n)}),t.addIceCandidate=function(n){var e=(n||{}).lineIndex||(n||{}).sdpMLineIndex,t="undefined"!=typeof e&&p("m",e),r=(n||{}).candidate;t&&r&&t.childlines.push(r.replace(u,"").split("="))},t.getMediaTypes=function(){function n(n){return n[1].def.split(/\s/)[0]}return f.filter(function(n){return"m"===n[0]&&n[1]&&n[1].def}).map(n)},t.toString=function(){return f.map(function(n){return"function"==typeof n[1].toArray?n[1].toArray():[n]}).reduce(i).map(function(n){return n.join("=")}).join("\n")},t}},{"./parsers":65,"whisk/flatten":71,"whisk/nub":73,"whisk/pluck":74}],65:[function(n,e,t){"use strict";t.m=function(n,e){function t(n){return r.childlines.push(n),t}var r={def:e[1],childlines:[],toArray:function(){return[["m",r.def]].concat(r.childlines)}};return n.push(["m",r]),t}},{}],66:[function(n,e,t){function r(n){var e=i.exec(n);return e&&e[0]}var o=[[/^(a\=candidate.*)$/,n("rtc-validator/candidate")]],i=/(\r?\n|\\r\\n)/;e.exports=function(n,e){var t=r(n),i=n.split(t),c=(e||{}).collector;return i=i.filter(function(n){var e=o.reduce(function(e,t,r){return"undefined"!=typeof e?e:t[0].exec(n)&&{line:n.replace(t[0],"$1"),fn:t[1]}},void 0),t=e?e.fn(e.line):[];return c&&t.forEach(function(n){c.push(n)}),0===t.length}),i.join(t)}},{"rtc-validator/candidate":67}],67:[function(n,e,t){function r(n,e){var t=c[e];return t&&!t[0].test(n)?(o(t[2]+" part failed validation: "+n),new Error(t[1])):void 0}var o=n("cog/logger")("rtc-validator"),i=/^(?:a=)?candidate:/,c=[[/.+/,"invalid foundation component","foundation"],[/\d+/,"invalid component id","component-id"],[/(UDP|TCP)/i,"transport must be TCP or UDP","transport"],[/\d+/,"numeric priority expected","priority"],[n("reu/ip"),"invalid connection address","connection-address"],[/\d+/,"invalid connection port","connection-port"],[/typ/,'Expected "typ" identifier',"type classifier"],[/.+/,"Invalid candidate type specified","candidate-type"]];e.exports=function(n){var e=[],t=n&&(n.candidate||n),o=t&&i.exec(t),c=o&&t.slice(o[0].length).split(/\s/);return t?o?e=e.concat(c.map(r)).filter(Boolean):[new Error("candidate did not match expected sdp line format")]:[new Error("empty candidate")]}},{"cog/logger":9,"reu/ip":68}],68:[function(n,e,t){e.exports=/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::))))$/},{}],69:[function(n,e,t){e.exports=function(n){return n=[].concat(n||[]).concat([].slice.call(arguments,1)),function(e){return n.reduce(function(n,e){var t=e(n);return void 0!==t?t:n},e||0)}}},{}],70:[function(n,e,t){e.exports=function(n,e){return arguments.length>1?n===e:function(e){return n===e}}},{}],71:[function(n,e,t){e.exports=function(n,e){return n=Array.isArray(n)?n:[n],n.concat(e)}},{}],72:[function(n,e,t){e.exports=function(n){return function(e){for(var t=[],r=0,o=e.length;o>r;r++){for(var i=!1,c=t.length;c--;)i=i||n(e[r],t[c]);i||(t[t.length]=e[r])}return t}}},{}],73:[function(n,e,t){e.exports=n("./nub-by")(n("./equality"))},{"./equality":70,"./nub-by":72}],74:[function(n,e,t){e.exports=function(){function n(n,e){return function(t){var r=0,o=t;do o=o&&o[n[r++]];while(o&&e>=r);return o}}var e=[];return[].slice.call(arguments).forEach(function(n){var t="number"==typeof n?[n]:(n||"").split(".");e[e.length]={name:t[0],parts:t,maxIdx:t.length-1}}),e.length<=1?n(e[0].parts,e[0].maxIdx):function(t){for(var r={},o=0,i=e.length;i>o;o++)r[e[o].name]=n([e[o].parts[0]],0)(t);return r}}},{}]},{},[2])(2)});
//# sourceMappingURL=rtc.min.js.map
|
ajax/libs/ag-grid/4.0.4/ag-grid.js
|
boneskull/cdnjs
|
// ag-grid v4.0.4
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["agGrid"] = factory();
else
root["agGrid"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
// same as main.js, except also includes the styles, so webpack includes the css in the bundle
var populateClientExports = __webpack_require__(1).populateClientExports;
populateClientExports(exports);
__webpack_require__(76);
__webpack_require__(80);
__webpack_require__(82);
__webpack_require__(84);
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var grid_1 = __webpack_require__(2);
var gridApi_1 = __webpack_require__(11);
var events_1 = __webpack_require__(10);
var componentUtil_1 = __webpack_require__(9);
var columnController_1 = __webpack_require__(13);
var agGridNg1_1 = __webpack_require__(70);
var agGridWebComponent_1 = __webpack_require__(71);
var gridCell_1 = __webpack_require__(31);
var rowNode_1 = __webpack_require__(19);
var originalColumnGroup_1 = __webpack_require__(17);
var columnGroup_1 = __webpack_require__(14);
var column_1 = __webpack_require__(15);
var focusedCellController_1 = __webpack_require__(44);
var functions_1 = __webpack_require__(53);
var gridOptionsWrapper_1 = __webpack_require__(3);
var groupCellRendererFactory_1 = __webpack_require__(35);
var balancedColumnTreeBuilder_1 = __webpack_require__(47);
var columnKeyCreator_1 = __webpack_require__(48);
var columnUtils_1 = __webpack_require__(16);
var displayedGroupCreator_1 = __webpack_require__(49);
var groupInstanceIdCreator_1 = __webpack_require__(52);
var context_1 = __webpack_require__(6);
var dragAndDropService_1 = __webpack_require__(61);
var dragService_1 = __webpack_require__(28);
var filterManager_1 = __webpack_require__(40);
var numberFilter_1 = __webpack_require__(43);
var textFilter_1 = __webpack_require__(42);
var gridPanel_1 = __webpack_require__(24);
var mouseEventService_1 = __webpack_require__(30);
var cssClassApplier_1 = __webpack_require__(58);
var headerContainer_1 = __webpack_require__(55);
var headerRenderer_1 = __webpack_require__(54);
var headerTemplateLoader_1 = __webpack_require__(60);
var horizontalDragService_1 = __webpack_require__(57);
var moveColumnController_1 = __webpack_require__(62);
var renderedHeaderCell_1 = __webpack_require__(59);
var renderedHeaderGroupCell_1 = __webpack_require__(56);
var standardMenu_1 = __webpack_require__(66);
var borderLayout_1 = __webpack_require__(27);
var tabbedLayout_1 = __webpack_require__(72);
var verticalStack_1 = __webpack_require__(73);
var autoWidthCalculator_1 = __webpack_require__(50);
var renderedRow_1 = __webpack_require__(20);
var rowRenderer_1 = __webpack_require__(23);
var fillterStage_1 = __webpack_require__(67);
var flattenStage_1 = __webpack_require__(69);
var inMemoryRowController_1 = __webpack_require__(63);
var sortStage_1 = __webpack_require__(68);
var floatingRowModel_1 = __webpack_require__(26);
var paginationController_1 = __webpack_require__(38);
var virtualPageRowController_1 = __webpack_require__(64);
var cMenuItem_1 = __webpack_require__(74);
var component_1 = __webpack_require__(45);
var menuList_1 = __webpack_require__(75);
var cellNavigationService_1 = __webpack_require__(46);
var columnChangeEvent_1 = __webpack_require__(51);
var constants_1 = __webpack_require__(8);
var csvCreator_1 = __webpack_require__(12);
var eventService_1 = __webpack_require__(4);
var expressionService_1 = __webpack_require__(22);
var gridCore_1 = __webpack_require__(37);
var logger_1 = __webpack_require__(5);
var masterSlaveService_1 = __webpack_require__(25);
var selectionController_1 = __webpack_require__(29);
var selectionRendererFactory_1 = __webpack_require__(18);
var sortController_1 = __webpack_require__(39);
var svgFactory_1 = __webpack_require__(36);
var templateService_1 = __webpack_require__(33);
var utils_1 = __webpack_require__(7);
var valueService_1 = __webpack_require__(34);
var popupService_1 = __webpack_require__(41);
var context_2 = __webpack_require__(6);
var context_3 = __webpack_require__(6);
var context_4 = __webpack_require__(6);
var context_5 = __webpack_require__(6);
var context_6 = __webpack_require__(6);
var gridRow_1 = __webpack_require__(32);
function populateClientExports(exports) {
// cellRenderers
exports.groupCellRendererFactory = groupCellRendererFactory_1.groupCellRendererFactory;
// columnController
exports.BalancedColumnTreeBuilder = balancedColumnTreeBuilder_1.BalancedColumnTreeBuilder;
exports.ColumnController = columnController_1.ColumnController;
exports.ColumnKeyCreator = columnKeyCreator_1.ColumnKeyCreator;
exports.ColumnUtils = columnUtils_1.ColumnUtils;
exports.DisplayedGroupCreator = displayedGroupCreator_1.DisplayedGroupCreator;
exports.GroupInstanceIdCreator = groupInstanceIdCreator_1.GroupInstanceIdCreator;
// components
exports.ComponentUtil = componentUtil_1.ComponentUtil;
exports.initialiseAgGridWithAngular1 = agGridNg1_1.initialiseAgGridWithAngular1;
exports.initialiseAgGridWithWebComponents = agGridWebComponent_1.initialiseAgGridWithWebComponents;
// context
exports.Context = context_1.Context;
exports.Autowired = context_2.Autowired;
exports.PostConstruct = context_3.PostConstruct;
exports.Optional = context_4.Optional;
exports.Bean = context_5.Bean;
exports.Qualifier = context_6.Qualifier;
// dragAndDrop
exports.DragAndDropService = dragAndDropService_1.DragAndDropService;
exports.DragService = dragService_1.DragService;
// entities
exports.Column = column_1.Column;
exports.ColumnGroup = columnGroup_1.ColumnGroup;
exports.GridCell = gridCell_1.GridCell;
exports.GridRow = gridRow_1.GridRow;
exports.OriginalColumnGroup = originalColumnGroup_1.OriginalColumnGroup;
exports.RowNode = rowNode_1.RowNode;
// filter
exports.FilterManager = filterManager_1.FilterManager;
exports.NumberFilter = numberFilter_1.NumberFilter;
exports.TextFilter = textFilter_1.TextFilter;
// gridPanel
exports.GridPanel = gridPanel_1.GridPanel;
exports.MouseEventService = mouseEventService_1.MouseEventService;
// headerRendering
exports.CssClassApplier = cssClassApplier_1.CssClassApplier;
exports.HeaderContainer = headerContainer_1.HeaderContainer;
exports.HeaderRenderer = headerRenderer_1.HeaderRenderer;
exports.HeaderTemplateLoader = headerTemplateLoader_1.HeaderTemplateLoader;
exports.HorizontalDragService = horizontalDragService_1.HorizontalDragService;
exports.MoveColumnController = moveColumnController_1.MoveColumnController;
exports.RenderedHeaderCell = renderedHeaderCell_1.RenderedHeaderCell;
exports.RenderedHeaderGroupCell = renderedHeaderGroupCell_1.RenderedHeaderGroupCell;
exports.StandardMenuFactory = standardMenu_1.StandardMenuFactory;
// layout
exports.BorderLayout = borderLayout_1.BorderLayout;
exports.TabbedLayout = tabbedLayout_1.TabbedLayout;
exports.VerticalStack = verticalStack_1.VerticalStack;
// rendering
exports.AutoWidthCalculator = autoWidthCalculator_1.AutoWidthCalculator;
exports.RenderedHeaderCell = renderedHeaderCell_1.RenderedHeaderCell;
exports.RenderedRow = renderedRow_1.RenderedRow;
exports.RowRenderer = rowRenderer_1.RowRenderer;
// rowControllers/inMemory
exports.FilterStage = fillterStage_1.FilterStage;
exports.FlattenStage = flattenStage_1.FlattenStage;
exports.InMemoryRowController = inMemoryRowController_1.InMemoryRowController;
exports.SortStage = sortStage_1.SortStage;
// rowControllers
exports.FloatingRowModel = floatingRowModel_1.FloatingRowModel;
exports.PaginationController = paginationController_1.PaginationController;
exports.VirtualPageRowController = virtualPageRowController_1.VirtualPageRowController;
// widgets
exports.PopupService = popupService_1.PopupService;
exports.CMenuItem = cMenuItem_1.CMenuItem;
exports.Component = component_1.Component;
exports.MenuList = menuList_1.MenuList;
// root
exports.CellNavigationService = cellNavigationService_1.CellNavigationService;
exports.ColumnChangeEvent = columnChangeEvent_1.ColumnChangeEvent;
exports.Constants = constants_1.Constants;
exports.CsvCreator = csvCreator_1.CsvCreator;
exports.Events = events_1.Events;
exports.EventService = eventService_1.EventService;
exports.ExpressionService = expressionService_1.ExpressionService;
exports.FocusedCellController = focusedCellController_1.FocusedCellController;
exports.defaultGroupComparator = functions_1.defaultGroupComparator;
exports.Grid = grid_1.Grid;
exports.GridApi = gridApi_1.GridApi;
exports.GridCore = gridCore_1.GridCore;
exports.GridOptionsWrapper = gridOptionsWrapper_1.GridOptionsWrapper;
exports.Logger = logger_1.Logger;
exports.MasterSlaveService = masterSlaveService_1.MasterSlaveService;
exports.SelectionController = selectionController_1.SelectionController;
exports.SelectionRendererFactory = selectionRendererFactory_1.SelectionRendererFactory;
exports.SortController = sortController_1.SortController;
exports.SvgFactory = svgFactory_1.SvgFactory;
exports.TemplateService = templateService_1.TemplateService;
exports.Utils = utils_1.Utils;
exports.ValueService = valueService_1.ValueService;
}
exports.populateClientExports = populateClientExports;
/***/ },
/* 2 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var gridOptionsWrapper_1 = __webpack_require__(3);
var inMemoryRowController_1 = __webpack_require__(63);
var paginationController_1 = __webpack_require__(38);
var virtualPageRowController_1 = __webpack_require__(64);
var floatingRowModel_1 = __webpack_require__(26);
var selectionController_1 = __webpack_require__(29);
var columnController_1 = __webpack_require__(13);
var rowRenderer_1 = __webpack_require__(23);
var headerRenderer_1 = __webpack_require__(54);
var filterManager_1 = __webpack_require__(40);
var valueService_1 = __webpack_require__(34);
var masterSlaveService_1 = __webpack_require__(25);
var eventService_1 = __webpack_require__(4);
var oldToolPanelDragAndDropService_1 = __webpack_require__(65);
var gridPanel_1 = __webpack_require__(24);
var gridApi_1 = __webpack_require__(11);
var constants_1 = __webpack_require__(8);
var headerTemplateLoader_1 = __webpack_require__(60);
var balancedColumnTreeBuilder_1 = __webpack_require__(47);
var displayedGroupCreator_1 = __webpack_require__(49);
var selectionRendererFactory_1 = __webpack_require__(18);
var expressionService_1 = __webpack_require__(22);
var templateService_1 = __webpack_require__(33);
var popupService_1 = __webpack_require__(41);
var logger_1 = __webpack_require__(5);
var columnUtils_1 = __webpack_require__(16);
var autoWidthCalculator_1 = __webpack_require__(50);
var horizontalDragService_1 = __webpack_require__(57);
var context_1 = __webpack_require__(6);
var csvCreator_1 = __webpack_require__(12);
var gridCore_1 = __webpack_require__(37);
var standardMenu_1 = __webpack_require__(66);
var dragAndDropService_1 = __webpack_require__(61);
var dragService_1 = __webpack_require__(28);
var sortController_1 = __webpack_require__(39);
var columnController_2 = __webpack_require__(13);
var focusedCellController_1 = __webpack_require__(44);
var mouseEventService_1 = __webpack_require__(30);
var cellNavigationService_1 = __webpack_require__(46);
var utils_1 = __webpack_require__(7);
var fillterStage_1 = __webpack_require__(67);
var sortStage_1 = __webpack_require__(68);
var flattenStage_1 = __webpack_require__(69);
var Grid = (function () {
function Grid(eGridDiv, gridOptions, globalEventListener, $scope, $compile, quickFilterOnScope) {
if (globalEventListener === void 0) { globalEventListener = null; }
if ($scope === void 0) { $scope = null; }
if ($compile === void 0) { $compile = null; }
if (quickFilterOnScope === void 0) { quickFilterOnScope = null; }
if (!eGridDiv) {
console.error('ag-Grid: no div element provided to the grid');
}
if (!gridOptions) {
console.error('ag-Grid: no gridOptions provided to the grid');
}
var virtualPaging = gridOptions.rowModelType === constants_1.Constants.ROW_MODEL_TYPE_VIRTUAL;
var rowModelClass = virtualPaging ? virtualPageRowController_1.VirtualPageRowController : inMemoryRowController_1.InMemoryRowController;
var enterprise = utils_1.Utils.exists(Grid.enterpriseBeans);
this.context = new context_1.Context({
overrideBeans: Grid.enterpriseBeans,
seed: {
enterprise: enterprise,
gridOptions: gridOptions,
eGridDiv: eGridDiv,
$scope: $scope,
$compile: $compile,
quickFilterOnScope: quickFilterOnScope,
globalEventListener: globalEventListener
},
beans: [rowModelClass, horizontalDragService_1.HorizontalDragService, headerTemplateLoader_1.HeaderTemplateLoader, floatingRowModel_1.FloatingRowModel, dragService_1.DragService,
displayedGroupCreator_1.DisplayedGroupCreator, eventService_1.EventService, gridOptionsWrapper_1.GridOptionsWrapper, selectionController_1.SelectionController,
filterManager_1.FilterManager, selectionRendererFactory_1.SelectionRendererFactory, columnController_1.ColumnController, rowRenderer_1.RowRenderer,
headerRenderer_1.HeaderRenderer, expressionService_1.ExpressionService, balancedColumnTreeBuilder_1.BalancedColumnTreeBuilder, csvCreator_1.CsvCreator,
templateService_1.TemplateService, gridPanel_1.GridPanel, popupService_1.PopupService, valueService_1.ValueService, masterSlaveService_1.MasterSlaveService,
logger_1.LoggerFactory, oldToolPanelDragAndDropService_1.OldToolPanelDragAndDropService, columnUtils_1.ColumnUtils, autoWidthCalculator_1.AutoWidthCalculator, gridApi_1.GridApi,
paginationController_1.PaginationController, popupService_1.PopupService, gridCore_1.GridCore, standardMenu_1.StandardMenuFactory,
dragAndDropService_1.DragAndDropService, sortController_1.SortController, columnController_2.ColumnApi, focusedCellController_1.FocusedCellController, mouseEventService_1.MouseEventService,
cellNavigationService_1.CellNavigationService, fillterStage_1.FilterStage, sortStage_1.SortStage, flattenStage_1.FlattenStage],
debug: !!gridOptions.debug
});
}
Grid.setEnterpriseBeans = function (enterpriseBeans) {
this.enterpriseBeans = enterpriseBeans;
};
Grid.prototype.destroy = function () {
this.context.destroy();
};
return Grid;
})();
exports.Grid = Grid;
/***/ },
/* 3 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var eventService_1 = __webpack_require__(4);
var constants_1 = __webpack_require__(8);
var componentUtil_1 = __webpack_require__(9);
var gridApi_1 = __webpack_require__(11);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var columnController_1 = __webpack_require__(13);
var context_3 = __webpack_require__(6);
var events_1 = __webpack_require__(10);
var columnController_2 = __webpack_require__(13);
var context_4 = __webpack_require__(6);
var DEFAULT_ROW_HEIGHT = 25;
function isTrue(value) {
return value === true || value === 'true';
}
var GridOptionsWrapper = (function () {
function GridOptionsWrapper() {
}
GridOptionsWrapper.prototype.agWire = function (gridApi, columnApi) {
this.headerHeight = this.gridOptions.headerHeight;
this.gridOptions.api = gridApi;
this.gridOptions.columnApi = columnApi;
this.checkForDeprecated();
};
GridOptionsWrapper.prototype.init = function () {
this.eventService.addGlobalListener(this.globalEventHandler.bind(this));
if (this.isGroupSelectsChildren() && this.isSuppressParentsInRowNodes()) {
console.warn('ag-Grid: groupSelectsChildren does not work wth suppressParentsInRowNodes, this selection method needs the part in rowNode to work');
}
if (this.isGroupSelectsChildren() && !this.isRowSelectionMulti()) {
console.warn('ag-Grid: rowSelectionMulti must be true for groupSelectsChildren to make sense');
}
};
GridOptionsWrapper.prototype.isEnterprise = function () { return this.enterprise; };
GridOptionsWrapper.prototype.isRowSelection = function () { return this.gridOptions.rowSelection === "single" || this.gridOptions.rowSelection === "multiple"; };
GridOptionsWrapper.prototype.isRowDeselection = function () { return isTrue(this.gridOptions.rowDeselection); };
GridOptionsWrapper.prototype.isRowSelectionMulti = function () { return this.gridOptions.rowSelection === 'multiple'; };
GridOptionsWrapper.prototype.getContext = function () { return this.gridOptions.context; };
GridOptionsWrapper.prototype.isRowModelPagination = function () { return this.gridOptions.rowModelType === constants_1.Constants.ROW_MODEL_TYPE_PAGINATION; };
GridOptionsWrapper.prototype.isRowModelVirtual = function () { return this.gridOptions.rowModelType === constants_1.Constants.ROW_MODEL_TYPE_VIRTUAL; };
GridOptionsWrapper.prototype.isRowModelDefault = function () { return !(this.isRowModelPagination() || this.isRowModelVirtual()); };
GridOptionsWrapper.prototype.isShowToolPanel = function () { return isTrue(this.gridOptions.showToolPanel); };
GridOptionsWrapper.prototype.isToolPanelSuppressGroups = function () { return isTrue(this.gridOptions.toolPanelSuppressGroups); };
GridOptionsWrapper.prototype.isToolPanelSuppressValues = function () { return isTrue(this.gridOptions.toolPanelSuppressValues); };
GridOptionsWrapper.prototype.isGroupSelectsChildren = function () { return isTrue(this.gridOptions.groupSelectsChildren); };
GridOptionsWrapper.prototype.isGroupHideGroupColumns = function () { return isTrue(this.gridOptions.groupHideGroupColumns); };
GridOptionsWrapper.prototype.isGroupIncludeFooter = function () { return isTrue(this.gridOptions.groupIncludeFooter); };
GridOptionsWrapper.prototype.isGroupSuppressBlankHeader = function () { return isTrue(this.gridOptions.groupSuppressBlankHeader); };
GridOptionsWrapper.prototype.isSuppressRowClickSelection = function () { return isTrue(this.gridOptions.suppressRowClickSelection); };
GridOptionsWrapper.prototype.isSuppressCellSelection = function () { return isTrue(this.gridOptions.suppressCellSelection); };
GridOptionsWrapper.prototype.isSuppressMultiSort = function () { return isTrue(this.gridOptions.suppressMultiSort); };
GridOptionsWrapper.prototype.isGroupSuppressAutoColumn = function () { return isTrue(this.gridOptions.groupSuppressAutoColumn); };
GridOptionsWrapper.prototype.isForPrint = function () { return isTrue(this.gridOptions.forPrint); };
GridOptionsWrapper.prototype.isSuppressHorizontalScroll = function () { return isTrue(this.gridOptions.suppressHorizontalScroll); };
GridOptionsWrapper.prototype.isSuppressLoadingOverlay = function () { return isTrue(this.gridOptions.suppressLoadingOverlay); };
GridOptionsWrapper.prototype.isSuppressNoRowsOverlay = function () { return isTrue(this.gridOptions.suppressNoRowsOverlay); };
GridOptionsWrapper.prototype.isSuppressFieldDotNotation = function () { return isTrue(this.gridOptions.suppressFieldDotNotation); };
GridOptionsWrapper.prototype.getFloatingTopRowData = function () { return this.gridOptions.floatingTopRowData; };
GridOptionsWrapper.prototype.getFloatingBottomRowData = function () { return this.gridOptions.floatingBottomRowData; };
GridOptionsWrapper.prototype.isUnSortIcon = function () { return isTrue(this.gridOptions.unSortIcon); };
GridOptionsWrapper.prototype.isSuppressMenuHide = function () { return isTrue(this.gridOptions.suppressMenuHide); };
GridOptionsWrapper.prototype.getRowStyle = function () { return this.gridOptions.rowStyle; };
GridOptionsWrapper.prototype.getRowClass = function () { return this.gridOptions.rowClass; };
GridOptionsWrapper.prototype.getRowStyleFunc = function () { return this.gridOptions.getRowStyle; };
GridOptionsWrapper.prototype.getRowClassFunc = function () { return this.gridOptions.getRowClass; };
GridOptionsWrapper.prototype.getBusinessKeyForNodeFunc = function () { return this.gridOptions.getBusinessKeyForNode; };
GridOptionsWrapper.prototype.getHeaderCellRenderer = function () { return this.gridOptions.headerCellRenderer; };
GridOptionsWrapper.prototype.getApi = function () { return this.gridOptions.api; };
GridOptionsWrapper.prototype.getColumnApi = function () { return this.gridOptions.columnApi; };
GridOptionsWrapper.prototype.isEnableColResize = function () { return isTrue(this.gridOptions.enableColResize); };
GridOptionsWrapper.prototype.isSingleClickEdit = function () { return isTrue(this.gridOptions.singleClickEdit); };
GridOptionsWrapper.prototype.getGroupDefaultExpanded = function () { return this.gridOptions.groupDefaultExpanded; };
GridOptionsWrapper.prototype.getGroupAggFunction = function () { return this.gridOptions.groupAggFunction; };
GridOptionsWrapper.prototype.getRowData = function () { return this.gridOptions.rowData; };
GridOptionsWrapper.prototype.isGroupUseEntireRow = function () { return isTrue(this.gridOptions.groupUseEntireRow); };
GridOptionsWrapper.prototype.getGroupColumnDef = function () { return this.gridOptions.groupColumnDef; };
GridOptionsWrapper.prototype.isGroupSuppressRow = function () { return isTrue(this.gridOptions.groupSuppressRow); };
GridOptionsWrapper.prototype.getRowGroupPanelShow = function () { return this.gridOptions.rowGroupPanelShow; };
GridOptionsWrapper.prototype.isAngularCompileRows = function () { return isTrue(this.gridOptions.angularCompileRows); };
GridOptionsWrapper.prototype.isAngularCompileFilters = function () { return isTrue(this.gridOptions.angularCompileFilters); };
GridOptionsWrapper.prototype.isAngularCompileHeaders = function () { return isTrue(this.gridOptions.angularCompileHeaders); };
GridOptionsWrapper.prototype.isDebug = function () { return isTrue(this.gridOptions.debug); };
GridOptionsWrapper.prototype.getColumnDefs = function () { return this.gridOptions.columnDefs; };
GridOptionsWrapper.prototype.getDatasource = function () { return this.gridOptions.datasource; };
GridOptionsWrapper.prototype.isEnableSorting = function () { return isTrue(this.gridOptions.enableSorting) || isTrue(this.gridOptions.enableServerSideSorting); };
GridOptionsWrapper.prototype.isEnableCellExpressions = function () { return isTrue(this.gridOptions.enableCellExpressions); };
GridOptionsWrapper.prototype.isEnableServerSideSorting = function () { return isTrue(this.gridOptions.enableServerSideSorting); };
GridOptionsWrapper.prototype.isSuppressContextMenu = function () { return isTrue(this.gridOptions.suppressContextMenu); };
GridOptionsWrapper.prototype.isEnableFilter = function () { return isTrue(this.gridOptions.enableFilter) || isTrue(this.gridOptions.enableServerSideFilter); };
GridOptionsWrapper.prototype.isEnableServerSideFilter = function () { return this.gridOptions.enableServerSideFilter; };
GridOptionsWrapper.prototype.isSuppressScrollLag = function () { return isTrue(this.gridOptions.suppressScrollLag); };
GridOptionsWrapper.prototype.isSuppressMovableColumns = function () { return isTrue(this.gridOptions.suppressMovableColumns); };
GridOptionsWrapper.prototype.isSuppressColumnMoveAnimation = function () { return isTrue(this.gridOptions.suppressColumnMoveAnimation); };
GridOptionsWrapper.prototype.isSuppressMenuColumnPanel = function () { return isTrue(this.gridOptions.suppressMenuColumnPanel); };
GridOptionsWrapper.prototype.isSuppressMenuFilterPanel = function () { return isTrue(this.gridOptions.suppressMenuFilterPanel); };
GridOptionsWrapper.prototype.isSuppressMenuMainPanel = function () { return isTrue(this.gridOptions.suppressMenuMainPanel); };
GridOptionsWrapper.prototype.isEnableRangeSelection = function () { return isTrue(this.gridOptions.enableRangeSelection); };
GridOptionsWrapper.prototype.isRememberGroupStateWhenNewData = function () { return isTrue(this.gridOptions.rememberGroupStateWhenNewData); };
GridOptionsWrapper.prototype.getIcons = function () { return this.gridOptions.icons; };
GridOptionsWrapper.prototype.getIsScrollLag = function () { return this.gridOptions.isScrollLag; };
GridOptionsWrapper.prototype.getSortingOrder = function () { return this.gridOptions.sortingOrder; };
GridOptionsWrapper.prototype.getSlaveGrids = function () { return this.gridOptions.slaveGrids; };
GridOptionsWrapper.prototype.getGroupRowRenderer = function () { return this.gridOptions.groupRowRenderer; };
GridOptionsWrapper.prototype.getOverlayLoadingTemplate = function () { return this.gridOptions.overlayLoadingTemplate; };
GridOptionsWrapper.prototype.getOverlayNoRowsTemplate = function () { return this.gridOptions.overlayNoRowsTemplate; };
GridOptionsWrapper.prototype.getCheckboxSelection = function () { return this.gridOptions.checkboxSelection; };
GridOptionsWrapper.prototype.isSuppressAutoSize = function () { return isTrue(this.gridOptions.suppressAutoSize); };
GridOptionsWrapper.prototype.isSuppressParentsInRowNodes = function () { return isTrue(this.gridOptions.suppressParentsInRowNodes); };
GridOptionsWrapper.prototype.isEnableStatusBar = function () { return isTrue(this.gridOptions.enableStatusBar); };
GridOptionsWrapper.prototype.getHeaderCellTemplate = function () { return this.gridOptions.headerCellTemplate; };
GridOptionsWrapper.prototype.getHeaderCellTemplateFunc = function () { return this.gridOptions.getHeaderCellTemplate; };
GridOptionsWrapper.prototype.getNodeChildDetailsFunc = function () { return this.gridOptions.getNodeChildDetails; };
GridOptionsWrapper.prototype.getContextMenuItemsFunc = function () { return this.gridOptions.getContextMenuItems; };
GridOptionsWrapper.prototype.getMainMenuItemsFunc = function () { return this.gridOptions.getMainMenuItems; };
GridOptionsWrapper.prototype.getProcessCellForClipboardFunc = function () { return this.gridOptions.processCellForClipboard; };
GridOptionsWrapper.prototype.executeProcessRowPostCreateFunc = function (params) {
if (this.gridOptions.processRowPostCreate) {
this.gridOptions.processRowPostCreate(params);
}
};
// properties
GridOptionsWrapper.prototype.getHeaderHeight = function () {
if (typeof this.headerHeight === 'number') {
return this.headerHeight;
}
else {
return 25;
}
};
GridOptionsWrapper.prototype.setHeaderHeight = function (headerHeight) {
this.headerHeight = headerHeight;
this.eventService.dispatchEvent(events_1.Events.EVENT_HEADER_HEIGHT_CHANGED);
};
GridOptionsWrapper.prototype.isExternalFilterPresent = function () {
if (typeof this.gridOptions.isExternalFilterPresent === 'function') {
return this.gridOptions.isExternalFilterPresent();
}
else {
return false;
}
};
GridOptionsWrapper.prototype.doesExternalFilterPass = function (node) {
if (typeof this.gridOptions.doesExternalFilterPass === 'function') {
return this.gridOptions.doesExternalFilterPass(node);
}
else {
return false;
}
};
GridOptionsWrapper.prototype.getGroupRowInnerRenderer = function () {
return this.gridOptions.groupRowInnerRenderer;
};
GridOptionsWrapper.prototype.getMinColWidth = function () {
if (this.gridOptions.minColWidth > GridOptionsWrapper.MIN_COL_WIDTH) {
return this.gridOptions.minColWidth;
}
else {
return GridOptionsWrapper.MIN_COL_WIDTH;
}
};
GridOptionsWrapper.prototype.getMaxColWidth = function () {
if (this.gridOptions.maxColWidth > GridOptionsWrapper.MIN_COL_WIDTH) {
return this.gridOptions.maxColWidth;
}
else {
return null;
}
};
GridOptionsWrapper.prototype.getColWidth = function () {
if (typeof this.gridOptions.colWidth !== 'number' || this.gridOptions.colWidth < GridOptionsWrapper.MIN_COL_WIDTH) {
return 200;
}
else {
return this.gridOptions.colWidth;
}
};
GridOptionsWrapper.prototype.getRowBuffer = function () {
if (typeof this.gridOptions.rowBuffer === 'number') {
if (this.gridOptions.rowBuffer < 0) {
console.warn('ag-Grid: rowBuffer should not be negative');
}
return this.gridOptions.rowBuffer;
}
else {
return constants_1.Constants.ROW_BUFFER_SIZE;
}
};
GridOptionsWrapper.prototype.checkForDeprecated = function () {
// casting to generic object, so typescript compiles even though
// we are looking for attributes that don't exist
var options = this.gridOptions;
if (options.suppressUnSort) {
console.warn('ag-grid: as of v1.12.4 suppressUnSort is not used. Please use sortOrder instead.');
}
if (options.suppressDescSort) {
console.warn('ag-grid: as of v1.12.4 suppressDescSort is not used. Please use sortOrder instead.');
}
if (options.groupAggFields) {
console.warn('ag-grid: as of v3 groupAggFields is not used. Please add appropriate agg fields to your columns.');
}
if (options.groupHidePivotColumns) {
console.warn('ag-grid: as of v3 groupHidePivotColumns is not used as pivot columns are now called rowGroup columns. Please refer to the documentation');
}
if (options.groupKeys) {
console.warn('ag-grid: as of v3 groupKeys is not used. You need to set rowGroupIndex on the columns to group. Please refer to the documentation');
}
if (options.ready || options.onReady) {
console.warn('ag-grid: as of v3.3 ready event is now called gridReady, so the callback should be onGridReady');
}
if (typeof options.groupDefaultExpanded === 'boolean') {
console.warn('ag-grid: groupDefaultExpanded can no longer be boolean. for groupDefaultExpanded=true, use groupDefaultExpanded=9999 instead, to expand all the groups');
}
if (options.onRowDeselected || options.rowDeselected) {
console.warn('ag-grid: since version 3.4 event rowDeselected no longer exists, please check the docs');
}
if (options.rowsAlreadyGrouped) {
console.warn('ag-grid: since version 3.4 rowsAlreadyGrouped no longer exists, please use getNodeChildDetails() instead');
}
};
GridOptionsWrapper.prototype.getLocaleTextFunc = function () {
if (this.gridOptions.localeTextFunc) {
return this.gridOptions.localeTextFunc;
}
var that = this;
return function (key, defaultValue) {
var localeText = that.gridOptions.localeText;
if (localeText && localeText[key]) {
return localeText[key];
}
else {
return defaultValue;
}
};
};
// responsible for calling the onXXX functions on gridOptions
GridOptionsWrapper.prototype.globalEventHandler = function (eventName, event) {
var callbackMethodName = componentUtil_1.ComponentUtil.getCallbackForEvent(eventName);
if (typeof this.gridOptions[callbackMethodName] === 'function') {
this.gridOptions[callbackMethodName](event);
}
};
// we don't allow dynamic row height for virtual paging
GridOptionsWrapper.prototype.getRowHeightForVirtualPagination = function () {
if (typeof this.gridOptions.rowHeight === 'number') {
return this.gridOptions.rowHeight;
}
else {
return DEFAULT_ROW_HEIGHT;
}
};
GridOptionsWrapper.prototype.getRowHeightForNode = function (rowNode) {
if (typeof this.gridOptions.rowHeight === 'number') {
return this.gridOptions.rowHeight;
}
else if (typeof this.gridOptions.getRowHeight === 'function') {
var params = {
node: rowNode,
data: rowNode.data,
api: this.gridOptions.api,
context: this.gridOptions.context
};
return this.gridOptions.getRowHeight(params);
}
else {
return DEFAULT_ROW_HEIGHT;
}
};
GridOptionsWrapper.MIN_COL_WIDTH = 10;
__decorate([
context_3.Autowired('gridOptions'),
__metadata('design:type', Object)
], GridOptionsWrapper.prototype, "gridOptions", void 0);
__decorate([
context_3.Autowired('columnController'),
__metadata('design:type', columnController_1.ColumnController)
], GridOptionsWrapper.prototype, "columnController", void 0);
__decorate([
context_3.Autowired('eventService'),
__metadata('design:type', eventService_1.EventService)
], GridOptionsWrapper.prototype, "eventService", void 0);
__decorate([
context_3.Autowired('enterprise'),
__metadata('design:type', Boolean)
], GridOptionsWrapper.prototype, "enterprise", void 0);
__decorate([
__param(0, context_2.Qualifier('gridApi')),
__param(1, context_2.Qualifier('columnApi')),
__metadata('design:type', Function),
__metadata('design:paramtypes', [gridApi_1.GridApi, columnController_2.ColumnApi]),
__metadata('design:returntype', void 0)
], GridOptionsWrapper.prototype, "agWire", null);
__decorate([
context_4.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], GridOptionsWrapper.prototype, "init", null);
GridOptionsWrapper = __decorate([
context_1.Bean('gridOptionsWrapper'),
__metadata('design:paramtypes', [])
], GridOptionsWrapper);
return GridOptionsWrapper;
})();
exports.GridOptionsWrapper = GridOptionsWrapper;
/***/ },
/* 4 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var logger_1 = __webpack_require__(5);
var utils_1 = __webpack_require__(7);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var EventService = (function () {
function EventService() {
this.allListeners = {};
this.globalListeners = [];
}
EventService.prototype.agWire = function (loggerFactory, globalEventListener) {
if (globalEventListener === void 0) { globalEventListener = null; }
this.logger = loggerFactory.create('EventService');
if (globalEventListener) {
this.addGlobalListener(globalEventListener);
}
};
EventService.prototype.getListenerList = function (eventType) {
var listenerList = this.allListeners[eventType];
if (!listenerList) {
listenerList = [];
this.allListeners[eventType] = listenerList;
}
return listenerList;
};
EventService.prototype.addEventListener = function (eventType, listener) {
var listenerList = this.getListenerList(eventType);
if (listenerList.indexOf(listener) < 0) {
listenerList.push(listener);
}
};
// for some events, it's important that the model gets to hear about them before the view,
// as the model may need to update before the view works on the info. if you register
// via this method, you get notified before the view parts
EventService.prototype.addModalPriorityEventListener = function (eventType, listener) {
this.addEventListener(eventType + EventService.PRIORITY, listener);
};
EventService.prototype.addGlobalListener = function (listener) {
this.globalListeners.push(listener);
};
EventService.prototype.removeEventListener = function (eventType, listener) {
var listenerList = this.getListenerList(eventType);
utils_1.Utils.removeFromArray(listenerList, listener);
};
EventService.prototype.removeGlobalListener = function (listener) {
utils_1.Utils.removeFromArray(this.globalListeners, listener);
};
// why do we pass the type here? the type is in ColumnChangeEvent, so unless the
// type is not in other types of events???
EventService.prototype.dispatchEvent = function (eventType, event) {
if (!event) {
event = {};
}
//this.logger.log('dispatching: ' + event);
// this allows the columnController to get events before anyone else
var p1ListenerList = this.getListenerList(eventType + EventService.PRIORITY);
p1ListenerList.forEach(function (listener) {
listener(event);
});
var listenerList = this.getListenerList(eventType);
listenerList.forEach(function (listener) {
listener(event);
});
this.globalListeners.forEach(function (listener) {
listener(eventType, event);
});
};
EventService.PRIORITY = '-P1';
__decorate([
__param(0, context_2.Qualifier('loggerFactory')),
__param(1, context_2.Qualifier('globalEventListener')),
__metadata('design:type', Function),
__metadata('design:paramtypes', [logger_1.LoggerFactory, Function]),
__metadata('design:returntype', void 0)
], EventService.prototype, "agWire", null);
EventService = __decorate([
context_1.Bean('eventService'),
__metadata('design:paramtypes', [])
], EventService);
return EventService;
})();
exports.EventService = EventService;
/***/ },
/* 5 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var gridOptionsWrapper_1 = __webpack_require__(3);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var LoggerFactory = (function () {
function LoggerFactory() {
}
LoggerFactory.prototype.agWire = function (gridOptionsWrapper) {
this.logging = gridOptionsWrapper.isDebug();
};
LoggerFactory.prototype.create = function (name) {
return new Logger(name, this.logging);
};
__decorate([
__param(0, context_2.Qualifier('gridOptionsWrapper')),
__metadata('design:type', Function),
__metadata('design:paramtypes', [gridOptionsWrapper_1.GridOptionsWrapper]),
__metadata('design:returntype', void 0)
], LoggerFactory.prototype, "agWire", null);
LoggerFactory = __decorate([
context_1.Bean('loggerFactory'),
__metadata('design:paramtypes', [])
], LoggerFactory);
return LoggerFactory;
})();
exports.LoggerFactory = LoggerFactory;
var Logger = (function () {
function Logger(name, logging) {
this.name = name;
this.logging = logging;
}
Logger.prototype.log = function (message) {
if (this.logging) {
console.log('ag-Grid.' + this.name + ': ' + message);
}
};
return Logger;
})();
exports.Logger = Logger;
/***/ },
/* 6 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var utils_1 = __webpack_require__(7);
var logger_1 = __webpack_require__(5);
var Context = (function () {
function Context(params) {
this.beans = {};
this.destroyed = false;
if (!params || !params.beans) {
return;
}
this.contextParams = params;
this.logger = new logger_1.Logger('Context', this.contextParams.debug);
this.logger.log('>> creating ag-Application Context');
this.createBeans();
var beans = utils_1.Utils.mapObject(this.beans, function (beanEntry) { return beanEntry.beanInstance; });
this.wireBeans(beans);
this.logger.log('>> ag-Application Context ready - component is alive');
}
Context.prototype.wireBean = function (bean) {
this.wireBeans([bean]);
};
Context.prototype.wireBeans = function (beans) {
this.autoWireBeans(beans);
this.methodWireBeans(beans);
this.postWire(beans);
this.wireCompleteBeans(beans);
};
Context.prototype.createBeans = function () {
var _this = this;
// register all normal beans
this.contextParams.beans.forEach(this.createBeanEntry.bind(this));
// register override beans, these will overwrite beans above of same name
if (this.contextParams.overrideBeans) {
this.contextParams.overrideBeans.forEach(this.createBeanEntry.bind(this));
}
// instantiate all beans - overridden beans will be left out
utils_1.Utils.iterateObject(this.beans, function (key, beanEntry) {
var constructorParamsMeta;
if (beanEntry.bean.prototype.__agBeanMetaData
&& beanEntry.bean.prototype.__agBeanMetaData.agConstructor) {
constructorParamsMeta = beanEntry.bean.prototype.__agBeanMetaData.agConstructor;
}
var constructorParams = _this.getBeansForParameters(constructorParamsMeta, beanEntry.beanName);
var newInstance = applyToConstructor(beanEntry.bean, constructorParams);
beanEntry.beanInstance = newInstance;
_this.logger.log('bean ' + _this.getBeanName(newInstance) + ' created');
});
};
Context.prototype.createBeanEntry = function (Bean) {
var metaData = Bean.prototype.__agBeanMetaData;
if (!metaData) {
var beanName;
if (Bean.prototype.constructor) {
beanName = Bean.prototype.constructor.name;
}
else {
beanName = '' + Bean;
}
console.error('context item ' + beanName + ' is not a bean');
return;
}
var beanEntry = {
bean: Bean,
beanInstance: null,
beanName: metaData.beanName
};
this.beans[metaData.beanName] = beanEntry;
};
Context.prototype.autoWireBeans = function (beans) {
var _this = this;
beans.forEach(function (bean) { return _this.autoWireBean(bean); });
};
Context.prototype.methodWireBeans = function (beans) {
var _this = this;
beans.forEach(function (bean) { return _this.methodWireBean(bean); });
};
Context.prototype.autoWireBean = function (bean) {
var _this = this;
if (!bean
|| !bean.__agBeanMetaData
|| !bean.__agBeanMetaData.agClassAttributes) {
return;
}
var attributes = bean.__agBeanMetaData.agClassAttributes;
if (!attributes) {
return;
}
var beanName = this.getBeanName(bean);
attributes.forEach(function (attribute) {
var otherBean = _this.lookupBeanInstance(beanName, attribute.beanName, attribute.optional);
bean[attribute.attributeName] = otherBean;
});
};
Context.prototype.getBeanName = function (bean) {
var constructorString = bean.constructor.toString();
var beanName = constructorString.substring(9, constructorString.indexOf('('));
return beanName;
};
Context.prototype.methodWireBean = function (bean) {
var beanName = this.getBeanName(bean);
// if no init method, skip he bean
if (!bean.agWire) {
return;
}
var wireParams;
if (bean.__agBeanMetaData
&& bean.__agBeanMetaData.agWire) {
wireParams = bean.__agBeanMetaData.agWire;
}
var initParams = this.getBeansForParameters(wireParams, beanName);
bean.agWire.apply(bean, initParams);
};
Context.prototype.getBeansForParameters = function (parameters, beanName) {
var _this = this;
var beansList = [];
if (parameters) {
utils_1.Utils.iterateObject(parameters, function (paramIndex, otherBeanName) {
var otherBean = _this.lookupBeanInstance(beanName, otherBeanName);
beansList[Number(paramIndex)] = otherBean;
});
}
return beansList;
};
Context.prototype.lookupBeanInstance = function (wiringBean, beanName, optional) {
if (optional === void 0) { optional = false; }
if (beanName === 'context') {
return this;
}
else if (this.contextParams.seed && this.contextParams.seed.hasOwnProperty(beanName)) {
return this.contextParams.seed[beanName];
}
else {
var beanEntry = this.beans[beanName];
if (beanEntry) {
return beanEntry.beanInstance;
}
if (!optional) {
console.error('ag-Grid: unable to find bean reference ' + beanName + ' while initialising ' + wiringBean);
}
return null;
}
};
Context.prototype.postWire = function (beans) {
beans.forEach(function (bean) {
// try calling init methods
if (bean.__agBeanMetaData && bean.__agBeanMetaData.postConstructMethods) {
bean.__agBeanMetaData.postConstructMethods.forEach(function (methodName) { return bean[methodName](); });
}
});
};
Context.prototype.wireCompleteBeans = function (beans) {
beans.forEach(function (bean) {
if (bean.agApplicationBoot) {
bean.agApplicationBoot();
}
});
};
Context.prototype.destroy = function () {
var _this = this;
// should only be able to destroy once
if (this.destroyed) {
return;
}
this.logger.log('>> Shutting down ag-Application Context');
utils_1.Utils.iterateObject(this.beans, function (key, beanEntry) {
if (beanEntry.beanInstance.agDestroy) {
if (_this.contextParams.debug) {
console.log('ag-Grid: destroying ' + beanEntry.beanName);
}
beanEntry.beanInstance.agDestroy();
}
_this.logger.log('bean ' + _this.getBeanName(beanEntry.beanInstance) + ' destroyed');
});
this.destroyed = true;
this.logger.log('>> ag-Application Context shut down - component is dead');
};
return Context;
})();
exports.Context = Context;
// taken from: http://stackoverflow.com/questions/3362471/how-can-i-call-a-javascript-constructor-using-call-or-apply
// allows calling 'apply' on a constructor
function applyToConstructor(constructor, argArray) {
var args = [null].concat(argArray);
var factoryFunction = constructor.bind.apply(constructor, args);
return new factoryFunction();
}
function PostConstruct(target, methodName, descriptor) {
// it's an attribute on the class
var props = getOrCreateProps(target);
if (!props.postConstructMethods) {
props.postConstructMethods = [];
}
props.postConstructMethods.push(methodName);
}
exports.PostConstruct = PostConstruct;
function Bean(beanName) {
return function (classConstructor) {
var props = getOrCreateProps(classConstructor.prototype);
props.beanName = beanName;
};
}
exports.Bean = Bean;
function Autowired(name) {
return autowiredFunc.bind(this, name, false);
}
exports.Autowired = Autowired;
function Optional(name) {
return autowiredFunc.bind(this, name, true);
}
exports.Optional = Optional;
function autowiredFunc(name, optional, classPrototype, methodOrAttributeName, index) {
if (name === null) {
console.error('ag-Grid: Autowired name should not be null');
return;
}
if (typeof index === 'number') {
console.error('ag-Grid: Autowired should be on an attribute');
return;
}
// it's an attribute on the class
var props = getOrCreateProps(classPrototype);
if (!props.agClassAttributes) {
props.agClassAttributes = [];
}
props.agClassAttributes.push({
attributeName: methodOrAttributeName,
beanName: name,
optional: optional
});
}
function Qualifier(name) {
return function (classPrototype, methodOrAttributeName, index) {
var props;
if (typeof index === 'number') {
// it's a parameter on a method
var methodName;
if (methodOrAttributeName) {
props = getOrCreateProps(classPrototype);
methodName = methodOrAttributeName;
}
else {
props = getOrCreateProps(classPrototype.prototype);
methodName = 'agConstructor';
}
if (!props[methodName]) {
props[methodName] = {};
}
props[methodName][index] = name;
}
};
}
exports.Qualifier = Qualifier;
function getOrCreateProps(target) {
var props = target.__agBeanMetaData;
if (!props) {
props = {};
target.__agBeanMetaData = props;
}
return props;
}
/***/ },
/* 7 */
/***/ function(module, exports) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var FUNCTION_STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
var FUNCTION_ARGUMENT_NAMES = /([^\s,]+)/g;
var Utils = (function () {
function Utils() {
}
Utils.iterateObject = function (object, callback) {
var keys = Object.keys(object);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var value = object[key];
callback(key, value);
}
};
Utils.cloneObject = function (object) {
var copy = {};
var keys = Object.keys(object);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var value = object[key];
copy[key] = value;
}
return copy;
};
Utils.map = function (array, callback) {
var result = [];
for (var i = 0; i < array.length; i++) {
var item = array[i];
var mappedItem = callback(item);
result.push(mappedItem);
}
return result;
};
Utils.mapObject = function (object, callback) {
var result = [];
Utils.iterateObject(object, function (key, value) {
result.push(callback(value));
});
return result;
};
Utils.forEach = function (array, callback) {
if (!array) {
return;
}
for (var i = 0; i < array.length; i++) {
var value = array[i];
callback(value, i);
}
};
Utils.filter = function (array, callback) {
var result = [];
array.forEach(function (item) {
if (callback(item)) {
result.push(item);
}
});
return result;
};
Utils.assign = function (object, source) {
Utils.iterateObject(source, function (key, value) {
object[key] = value;
});
};
Utils.getFunctionParameters = function (func) {
var fnStr = func.toString().replace(FUNCTION_STRIP_COMMENTS, '');
var result = fnStr.slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')')).match(FUNCTION_ARGUMENT_NAMES);
if (result === null) {
return [];
}
else {
return result;
}
};
Utils.find = function (collection, predicate, value) {
if (collection === null || collection === undefined) {
return null;
}
var firstMatchingItem;
for (var i = 0; i < collection.length; i++) {
var item = collection[i];
if (typeof predicate === 'string') {
if (item[predicate] === value) {
firstMatchingItem = item;
break;
}
}
else {
var callback = predicate;
if (callback(item)) {
firstMatchingItem = item;
break;
}
}
}
return firstMatchingItem;
};
Utils.toStrings = function (array) {
return this.map(array, function (item) {
if (item === undefined || item === null || !item.toString) {
return null;
}
else {
return item.toString();
}
});
};
Utils.iterateArray = function (array, callback) {
for (var index = 0; index < array.length; index++) {
var value = array[index];
callback(value, index);
}
};
//Returns true if it is a DOM node
//taken from: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object
Utils.isNode = function (o) {
return (typeof Node === "function" ? o instanceof Node :
o && typeof o === "object" && typeof o.nodeType === "number" && typeof o.nodeName === "string");
};
//Returns true if it is a DOM element
//taken from: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object
Utils.isElement = function (o) {
return (typeof HTMLElement === "function" ? o instanceof HTMLElement :
o && typeof o === "object" && o !== null && o.nodeType === 1 && typeof o.nodeName === "string");
};
Utils.isNodeOrElement = function (o) {
return this.isNode(o) || this.isElement(o);
};
//adds all type of change listeners to an element, intended to be a text field
Utils.addChangeListener = function (element, listener) {
element.addEventListener("changed", listener);
element.addEventListener("paste", listener);
element.addEventListener("input", listener);
// IE doesn't fire changed for special keys (eg delete, backspace), so need to
// listen for this further ones
element.addEventListener("keydown", listener);
element.addEventListener("keyup", listener);
};
//if value is undefined, null or blank, returns null, otherwise returns the value
Utils.makeNull = function (value) {
if (value === null || value === undefined || value === "") {
return null;
}
else {
return value;
}
};
Utils.missing = function (value) {
return !this.exists(value);
};
Utils.missingOrEmpty = function (value) {
return this.missing(value) || value.length === 0;
};
Utils.exists = function (value) {
if (value === null || value === undefined || value === '') {
return false;
}
else {
return true;
}
};
Utils.existsAndNotEmpty = function (value) {
return this.exists(value) && value.length > 0;
};
Utils.removeAllChildren = function (node) {
if (node) {
while (node.hasChildNodes()) {
node.removeChild(node.lastChild);
}
}
};
Utils.removeElement = function (parent, cssSelector) {
this.removeFromParent(parent.querySelector(cssSelector));
};
Utils.removeFromParent = function (node) {
if (node && node.parentNode) {
node.parentNode.removeChild(node);
}
};
Utils.isVisible = function (element) {
return (element.offsetParent !== null);
};
/**
* loads the template and returns it as an element. makes up for no simple way in
* the dom api to load html directly, eg we cannot do this: document.createElement(template)
*/
Utils.loadTemplate = function (template) {
var tempDiv = document.createElement("div");
tempDiv.innerHTML = template;
return tempDiv.firstChild;
};
Utils.addOrRemoveCssClass = function (element, className, addOrRemove) {
if (addOrRemove) {
this.addCssClass(element, className);
}
else {
this.removeCssClass(element, className);
}
};
Utils.callIfPresent = function (func) {
if (func) {
func();
}
};
Utils.addCssClass = function (element, className) {
var _this = this;
if (!className || className.length === 0) {
return;
}
if (className.indexOf(' ') >= 0) {
className.split(' ').forEach(function (value) { return _this.addCssClass(element, value); });
return;
}
if (element.classList) {
element.classList.add(className);
}
else {
if (element.className && element.className.length > 0) {
var cssClasses = element.className.split(' ');
if (cssClasses.indexOf(className) < 0) {
cssClasses.push(className);
element.className = cssClasses.join(' ');
}
}
else {
element.className = className;
}
}
};
Utils.offsetHeight = function (element) {
return element && element.clientHeight ? element.clientHeight : 0;
};
Utils.offsetWidth = function (element) {
return element && element.clientWidth ? element.clientWidth : 0;
};
Utils.removeCssClass = function (element, className) {
if (element.className && element.className.length > 0) {
var cssClasses = element.className.split(' ');
var index = cssClasses.indexOf(className);
if (index >= 0) {
cssClasses.splice(index, 1);
element.className = cssClasses.join(' ');
}
}
};
Utils.removeFromArray = function (array, object) {
if (array.indexOf(object) >= 0) {
array.splice(array.indexOf(object), 1);
}
};
Utils.defaultComparator = function (valueA, valueB) {
var valueAMissing = valueA === null || valueA === undefined;
var valueBMissing = valueB === null || valueB === undefined;
if (valueAMissing && valueBMissing) {
return 0;
}
if (valueAMissing) {
return -1;
}
if (valueBMissing) {
return 1;
}
if (valueA < valueB) {
return -1;
}
else if (valueA > valueB) {
return 1;
}
else {
return 0;
}
};
Utils.formatWidth = function (width) {
if (typeof width === "number") {
return width + "px";
}
else {
return width;
}
};
Utils.formatNumberTwoDecimalPlacesAndCommas = function (value) {
// took this from: http://blog.tompawlak.org/number-currency-formatting-javascript
if (typeof value === 'number') {
return (Math.round(value * 100) / 100).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,");
}
else {
return '';
}
};
/**
* Tries to use the provided renderer.
*/
Utils.useRenderer = function (eParent, eRenderer, params) {
var resultFromRenderer = eRenderer(params);
//TypeScript type inference magic
if (typeof resultFromRenderer === 'string') {
var eTextSpan = document.createElement('span');
eTextSpan.innerHTML = resultFromRenderer;
eParent.appendChild(eTextSpan);
}
else if (this.isNodeOrElement(resultFromRenderer)) {
//a dom node or element was returned, so add child
eParent.appendChild(resultFromRenderer);
}
else {
if (this.exists(resultFromRenderer)) {
console.warn('ag-Grid: result from render should be either a string or a DOM object, got ' + typeof resultFromRenderer);
}
}
};
/**
* If icon provided, use this (either a string, or a function callback).
* if not, then use the second parameter, which is the svgFactory function
*/
Utils.createIcon = function (iconName, gridOptionsWrapper, column, svgFactoryFunc) {
var eResult = document.createElement('span');
eResult.appendChild(this.createIconNoSpan(iconName, gridOptionsWrapper, column, svgFactoryFunc));
return eResult;
};
Utils.createIconNoSpan = function (iconName, gridOptionsWrapper, colDefWrapper, svgFactoryFunc) {
var userProvidedIcon;
// check col for icon first
if (colDefWrapper && colDefWrapper.getColDef().icons) {
userProvidedIcon = colDefWrapper.getColDef().icons[iconName];
}
// it not in col, try grid options
if (!userProvidedIcon && gridOptionsWrapper.getIcons()) {
userProvidedIcon = gridOptionsWrapper.getIcons()[iconName];
}
// now if user provided, use it
if (userProvidedIcon) {
var rendererResult;
if (typeof userProvidedIcon === 'function') {
rendererResult = userProvidedIcon();
}
else if (typeof userProvidedIcon === 'string') {
rendererResult = userProvidedIcon;
}
else {
throw 'icon from grid options needs to be a string or a function';
}
if (typeof rendererResult === 'string') {
return this.loadTemplate(rendererResult);
}
else if (this.isNodeOrElement(rendererResult)) {
return rendererResult;
}
else {
throw 'iconRenderer should return back a string or a dom object';
}
}
else {
// otherwise we use the built in icon
return svgFactoryFunc();
}
};
Utils.addStylesToElement = function (eElement, styles) {
if (!styles) {
return;
}
Object.keys(styles).forEach(function (key) {
eElement.style[key] = styles[key];
});
};
Utils.getScrollbarWidth = function () {
var outer = document.createElement("div");
outer.style.visibility = "hidden";
outer.style.width = "100px";
outer.style.msOverflowStyle = "scrollbar"; // needed for WinJS apps
document.body.appendChild(outer);
var widthNoScroll = outer.offsetWidth;
// force scrollbars
outer.style.overflow = "scroll";
// add innerdiv
var inner = document.createElement("div");
inner.style.width = "100%";
outer.appendChild(inner);
var widthWithScroll = inner.offsetWidth;
// remove divs
outer.parentNode.removeChild(outer);
return widthNoScroll - widthWithScroll;
};
Utils.isKeyPressed = function (event, keyToCheck) {
var pressedKey = event.which || event.keyCode;
return pressedKey === keyToCheck;
};
Utils.setVisible = function (element, visible, visibleStyle) {
if (visible) {
if (this.exists(visibleStyle)) {
element.style.display = visibleStyle;
}
else {
element.style.display = 'inline';
}
}
else {
element.style.display = 'none';
}
};
Utils.isBrowserIE = function () {
if (this.isIE === undefined) {
this.isIE = false || !!document.documentMode; // At least IE6
}
return this.isIE;
};
Utils.isBrowserSafari = function () {
if (this.isSafari === undefined) {
this.isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
}
return this.isSafari;
};
// taken from: http://stackoverflow.com/questions/1038727/how-to-get-browser-width-using-javascript-code
Utils.getBodyWidth = function () {
if (document.body) {
return document.body.clientWidth;
}
if (window.innerHeight) {
return window.innerWidth;
}
if (document.documentElement && document.documentElement.clientWidth) {
return document.documentElement.clientWidth;
}
return -1;
};
// taken from: http://stackoverflow.com/questions/1038727/how-to-get-browser-width-using-javascript-code
Utils.getBodyHeight = function () {
if (document.body) {
return document.body.clientHeight;
}
if (window.innerHeight) {
return window.innerHeight;
}
if (document.documentElement && document.documentElement.clientHeight) {
return document.documentElement.clientHeight;
}
return -1;
};
Utils.setCheckboxState = function (eCheckbox, state) {
if (typeof state === 'boolean') {
eCheckbox.checked = state;
eCheckbox.indeterminate = false;
}
else {
// isNodeSelected returns back undefined if it's a group and the children
// are a mix of selected and unselected
eCheckbox.indeterminate = true;
}
};
Utils.traverseNodesWithKey = function (nodes, callback) {
var keyParts = [];
recursiveSearchNodes(nodes);
function recursiveSearchNodes(nodes) {
nodes.forEach(function (node) {
if (node.group) {
keyParts.push(node.key);
var key = keyParts.join('|');
callback(node, key);
recursiveSearchNodes(node.children);
keyParts.pop();
}
});
}
};
// Taken from here: https://github.com/facebook/fixed-data-table/blob/master/src/vendor_upstream/dom/normalizeWheel.js
/**
* Mouse wheel (and 2-finger trackpad) support on the web sucks. It is
* complicated, thus this doc is long and (hopefully) detailed enough to answer
* your questions.
*
* If you need to react to the mouse wheel in a predictable way, this code is
* like your bestest friend. * hugs *
*
* As of today, there are 4 DOM event types you can listen to:
*
* 'wheel' -- Chrome(31+), FF(17+), IE(9+)
* 'mousewheel' -- Chrome, IE(6+), Opera, Safari
* 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!
* 'DOMMouseScroll' -- FF(0.9.7+) since 2003
*
* So what to do? The is the best:
*
* normalizeWheel.getEventType();
*
* In your event callback, use this code to get sane interpretation of the
* deltas. This code will return an object with properties:
*
* spinX -- normalized spin speed (use for zoom) - x plane
* spinY -- " - y plane
* pixelX -- normalized distance (to pixels) - x plane
* pixelY -- " - y plane
*
* Wheel values are provided by the browser assuming you are using the wheel to
* scroll a web page by a number of lines or pixels (or pages). Values can vary
* significantly on different platforms and browsers, forgetting that you can
* scroll at different speeds. Some devices (like trackpads) emit more events
* at smaller increments with fine granularity, and some emit massive jumps with
* linear speed or acceleration.
*
* This code does its best to normalize the deltas for you:
*
* - spin is trying to normalize how far the wheel was spun (or trackpad
* dragged). This is super useful for zoom support where you want to
* throw away the chunky scroll steps on the PC and make those equal to
* the slow and smooth tiny steps on the Mac. Key data: This code tries to
* resolve a single slow step on a wheel to 1.
*
* - pixel is normalizing the desired scroll delta in pixel units. You'll
* get the crazy differences between browsers, but at least it'll be in
* pixels!
*
* - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This
* should translate to positive value zooming IN, negative zooming OUT.
* This matches the newer 'wheel' event.
*
* Why are there spinX, spinY (or pixels)?
*
* - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn
* with a mouse. It results in side-scrolling in the browser by default.
*
* - spinY is what you expect -- it's the classic axis of a mouse wheel.
*
* - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and
* probably is by browsers in conjunction with fancy 3D controllers .. but
* you know.
*
* Implementation info:
*
* Examples of 'wheel' event if you scroll slowly (down) by one step with an
* average mouse:
*
* OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)
* OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)
* OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)
* Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)
* Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)
*
* On the trackpad:
*
* OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)
* OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)
*
* On other/older browsers.. it's more complicated as there can be multiple and
* also missing delta values.
*
* The 'wheel' event is more standard:
*
* http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents
*
* The basics is that it includes a unit, deltaMode (pixels, lines, pages), and
* deltaX, deltaY and deltaZ. Some browsers provide other values to maintain
* backward compatibility with older events. Those other values help us
* better normalize spin speed. Example of what the browsers provide:
*
* | event.wheelDelta | event.detail
* ------------------+------------------+--------------
* Safari v5/OS X | -120 | 0
* Safari v5/Win7 | -120 | 0
* Chrome v17/OS X | -120 | 0
* Chrome v17/Win7 | -120 | 0
* IE9/Win7 | -120 | undefined
* Firefox v4/OS X | undefined | 1
* Firefox v4/Win7 | undefined | 3
*
*/
Utils.normalizeWheel = function (event) {
var PIXEL_STEP = 10;
var LINE_HEIGHT = 40;
var PAGE_HEIGHT = 800;
// spinX, spinY
var sX = 0;
var sY = 0;
// pixelX, pixelY
var pX = 0;
var pY = 0;
// Legacy
if ('detail' in event) {
sY = event.detail;
}
if ('wheelDelta' in event) {
sY = -event.wheelDelta / 120;
}
if ('wheelDeltaY' in event) {
sY = -event.wheelDeltaY / 120;
}
if ('wheelDeltaX' in event) {
sX = -event.wheelDeltaX / 120;
}
// side scrolling on FF with DOMMouseScroll
if ('axis' in event && event.axis === event.HORIZONTAL_AXIS) {
sX = sY;
sY = 0;
}
pX = sX * PIXEL_STEP;
pY = sY * PIXEL_STEP;
if ('deltaY' in event) {
pY = event.deltaY;
}
if ('deltaX' in event) {
pX = event.deltaX;
}
if ((pX || pY) && event.deltaMode) {
if (event.deltaMode == 1) {
pX *= LINE_HEIGHT;
pY *= LINE_HEIGHT;
}
else {
pX *= PAGE_HEIGHT;
pY *= PAGE_HEIGHT;
}
}
// Fall-back if spin cannot be determined
if (pX && !sX) {
sX = (pX < 1) ? -1 : 1;
}
if (pY && !sY) {
sY = (pY < 1) ? -1 : 1;
}
return { spinX: sX,
spinY: sY,
pixelX: pX,
pixelY: pY };
};
return Utils;
})();
exports.Utils = Utils;
/***/ },
/* 8 */
/***/ function(module, exports) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var Constants = (function () {
function Constants() {
}
Constants.STEP_EVERYTHING = 0;
Constants.STEP_FILTER = 1;
Constants.STEP_AGGREGATE = 4;
Constants.STEP_SORT = 2;
Constants.STEP_MAP = 3;
Constants.ROW_BUFFER_SIZE = 2;
Constants.KEY_TAB = 9;
Constants.KEY_ENTER = 13;
Constants.KEY_BACKSPACE = 8;
Constants.KEY_DELETE = 46;
Constants.KEY_ESCAPE = 27;
Constants.KEY_SPACE = 32;
Constants.KEY_DOWN = 40;
Constants.KEY_UP = 38;
Constants.KEY_LEFT = 37;
Constants.KEY_RIGHT = 39;
Constants.KEY_A = 65;
Constants.KEY_C = 67;
Constants.KEY_V = 86;
Constants.ROW_MODEL_TYPE_PAGINATION = 'pagination';
Constants.ROW_MODEL_TYPE_VIRTUAL = 'virtual';
Constants.ALWAYS = 'always';
Constants.ONLY_WHEN_GROUPING = 'onlyWhenGrouping';
Constants.FLOATING_TOP = 'top';
Constants.FLOATING_BOTTOM = 'bottom';
return Constants;
})();
exports.Constants = Constants;
/***/ },
/* 9 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var events_1 = __webpack_require__(10);
var utils_1 = __webpack_require__(7);
var ComponentUtil = (function () {
function ComponentUtil() {
}
ComponentUtil.getEventCallbacks = function () {
if (!ComponentUtil.EVENT_CALLBACKS) {
ComponentUtil.EVENT_CALLBACKS = [];
ComponentUtil.EVENTS.forEach(function (eventName) {
ComponentUtil.EVENT_CALLBACKS.push(ComponentUtil.getCallbackForEvent(eventName));
});
}
return ComponentUtil.EVENT_CALLBACKS;
};
ComponentUtil.copyAttributesToGridOptions = function (gridOptions, component) {
checkForDeprecated(component);
// create empty grid options if none were passed
if (typeof gridOptions !== 'object') {
gridOptions = {};
}
// to allow array style lookup in TypeScript, take type away from 'this' and 'gridOptions'
var pGridOptions = gridOptions;
// add in all the simple properties
ComponentUtil.ARRAY_PROPERTIES
.concat(ComponentUtil.STRING_PROPERTIES)
.concat(ComponentUtil.OBJECT_PROPERTIES)
.concat(ComponentUtil.FUNCTION_PROPERTIES)
.forEach(function (key) {
if (typeof (component)[key] !== 'undefined') {
pGridOptions[key] = component[key];
}
});
ComponentUtil.BOOLEAN_PROPERTIES.forEach(function (key) {
if (typeof (component)[key] !== 'undefined') {
pGridOptions[key] = ComponentUtil.toBoolean(component[key]);
}
});
ComponentUtil.NUMBER_PROPERTIES.forEach(function (key) {
if (typeof (component)[key] !== 'undefined') {
pGridOptions[key] = ComponentUtil.toNumber(component[key]);
}
});
ComponentUtil.getEventCallbacks().forEach(function (funcName) {
if (typeof (component)[funcName] !== 'undefined') {
pGridOptions[funcName] = component[funcName];
}
});
return gridOptions;
};
ComponentUtil.getCallbackForEvent = function (eventName) {
if (!eventName || eventName.length < 2) {
return eventName;
}
else {
return 'on' + eventName[0].toUpperCase() + eventName.substr(1);
}
};
// change this method, the caller should know if it's initialised or not, plus 'initialised'
// is not relevant for all component types.
// maybe pass in the api and columnApi instead???
ComponentUtil.processOnChange = function (changes, gridOptions, api) {
//if (!component._initialised || !changes) { return; }
if (!changes) {
return;
}
checkForDeprecated(changes);
// to allow array style lookup in TypeScript, take type away from 'this' and 'gridOptions'
var pGridOptions = gridOptions;
// check if any change for the simple types, and if so, then just copy in the new value
ComponentUtil.ARRAY_PROPERTIES
.concat(ComponentUtil.OBJECT_PROPERTIES)
.concat(ComponentUtil.STRING_PROPERTIES)
.forEach(function (key) {
if (changes[key]) {
pGridOptions[key] = changes[key].currentValue;
}
});
ComponentUtil.BOOLEAN_PROPERTIES.forEach(function (key) {
if (changes[key]) {
pGridOptions[key] = ComponentUtil.toBoolean(changes[key].currentValue);
}
});
ComponentUtil.NUMBER_PROPERTIES.forEach(function (key) {
if (changes[key]) {
pGridOptions[key] = ComponentUtil.toNumber(changes[key].currentValue);
}
});
ComponentUtil.getEventCallbacks().forEach(function (funcName) {
if (changes[funcName]) {
pGridOptions[funcName] = changes[funcName].currentValue;
}
});
if (changes.showToolPanel) {
api.showToolPanel(changes.showToolPanel.currentValue);
}
if (changes.quickFilterText) {
api.setQuickFilter(changes.quickFilterText.currentValue);
}
if (changes.rowData) {
api.setRowData(changes.rowData.currentValue);
}
if (changes.floatingTopRowData) {
api.setFloatingTopRowData(changes.floatingTopRowData.currentValue);
}
if (changes.floatingBottomRowData) {
api.setFloatingBottomRowData(changes.floatingBottomRowData.currentValue);
}
if (changes.columnDefs) {
api.setColumnDefs(changes.columnDefs.currentValue);
}
if (changes.datasource) {
api.setDatasource(changes.datasource.currentValue);
}
if (changes.headerHeight) {
api.setHeaderHeight(changes.headerHeight.currentValue);
}
};
ComponentUtil.toBoolean = function (value) {
if (typeof value === 'boolean') {
return value;
}
else if (typeof value === 'string') {
// for boolean, compare to empty String to allow attributes appearing with
// not value to be treated as 'true'
return value.toUpperCase() === 'TRUE' || value == '';
}
else {
return false;
}
};
ComponentUtil.toNumber = function (value) {
if (typeof value === 'number') {
return value;
}
else if (typeof value === 'string') {
return Number(value);
}
else {
return undefined;
}
};
// all the events are populated in here AFTER this class (at the bottom of the file).
ComponentUtil.EVENTS = [];
ComponentUtil.STRING_PROPERTIES = [
'sortingOrder', 'rowClass', 'rowSelection', 'overlayLoadingTemplate',
'overlayNoRowsTemplate', 'headerCellTemplate', 'quickFilterText', 'rowModelType'];
ComponentUtil.OBJECT_PROPERTIES = [
'rowStyle', 'context', 'groupColumnDef', 'localeText', 'icons', 'datasource'
];
ComponentUtil.ARRAY_PROPERTIES = [
'slaveGrids', 'rowData', 'floatingTopRowData', 'floatingBottomRowData', 'columnDefs'
];
ComponentUtil.NUMBER_PROPERTIES = [
'rowHeight', 'rowBuffer', 'colWidth', 'headerHeight', 'groupDefaultExpanded',
'minColWidth', 'maxColWidth'
];
ComponentUtil.BOOLEAN_PROPERTIES = [
'toolPanelSuppressGroups', 'toolPanelSuppressValues',
'suppressRowClickSelection', 'suppressCellSelection', 'suppressHorizontalScroll', 'debug',
'enableColResize', 'enableCellExpressions', 'enableSorting', 'enableServerSideSorting',
'enableFilter', 'enableServerSideFilter', 'angularCompileRows', 'angularCompileFilters',
'angularCompileHeaders', 'groupSuppressAutoColumn', 'groupSelectsChildren', 'groupHideGroupColumns',
'groupIncludeFooter', 'groupUseEntireRow', 'groupSuppressRow', 'groupSuppressBlankHeader', 'forPrint',
'suppressMenuHide', 'rowDeselection', 'unSortIcon', 'suppressMultiSort', 'suppressScrollLag',
'singleClickEdit', 'suppressLoadingOverlay', 'suppressNoRowsOverlay', 'suppressAutoSize',
'suppressParentsInRowNodes', 'showToolPanel', 'suppressColumnMoveAnimation', 'suppressMovableColumns',
'suppressFieldDotNotation', 'enableRangeSelection', 'suppressEnterprise', 'rowGroupPanelShow',
'suppressContextMenu', 'suppressMenuFilterPanel', 'suppressMenuMainPanel', 'suppressMenuColumnPanel',
'enableStatusBar', 'rememberGroupStateWhenNewData'
];
ComponentUtil.FUNCTION_PROPERTIES = ['headerCellRenderer', 'localeTextFunc', 'groupRowInnerRenderer',
'groupRowRenderer', 'groupAggFunction', 'isScrollLag', 'isExternalFilterPresent', 'getRowHeight',
'doesExternalFilterPass', 'getRowClass', 'getRowStyle', 'getHeaderCellTemplate', 'traverseNode',
'getContextMenuItems', 'getMainMenuItems', 'processRowPostCreate', 'processCellForClipboard'];
ComponentUtil.ALL_PROPERTIES = ComponentUtil.ARRAY_PROPERTIES
.concat(ComponentUtil.OBJECT_PROPERTIES)
.concat(ComponentUtil.STRING_PROPERTIES)
.concat(ComponentUtil.NUMBER_PROPERTIES)
.concat(ComponentUtil.FUNCTION_PROPERTIES)
.concat(ComponentUtil.BOOLEAN_PROPERTIES);
return ComponentUtil;
})();
exports.ComponentUtil = ComponentUtil;
utils_1.Utils.iterateObject(events_1.Events, function (key, value) {
ComponentUtil.EVENTS.push(value);
});
function checkForDeprecated(changes) {
if (changes.ready || changes.onReady) {
console.warn('ag-grid: as of v3.3 ready event is now called gridReady, so the callback should be onGridReady');
}
if (changes.rowDeselected || changes.onRowDeselected) {
console.warn('ag-grid: as of v3.4 rowDeselected no longer exists. Please check the docs.');
}
}
/***/ },
/* 10 */
/***/ function(module, exports) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var Events = (function () {
function Events() {
}
/** A new set of columns has been entered, everything has potentially changed. */
Events.EVENT_COLUMN_EVERYTHING_CHANGED = 'columnEverythingChanged';
Events.EVENT_NEW_COLUMNS_LOADED = 'newColumnsLoaded';
/** A row group column was added, removed or order changed. */
Events.EVENT_COLUMN_ROW_GROUP_CHANGE = 'columnRowGroupChanged';
/** A value column was added, removed or agg function was changed. */
Events.EVENT_COLUMN_VALUE_CHANGE = 'columnValueChanged';
/** A column was moved */
Events.EVENT_COLUMN_MOVED = 'columnMoved';
/** One or more columns was shown / hidden */
Events.EVENT_COLUMN_VISIBLE = 'columnVisible';
/** One or more columns was pinned / unpinned*/
Events.EVENT_COLUMN_PINNED = 'columnPinned';
/** A column group was opened / closed */
Events.EVENT_COLUMN_GROUP_OPENED = 'columnGroupOpened';
/** One or more columns was resized. If just one, the column in the event is set. */
Events.EVENT_COLUMN_RESIZED = 'columnResized';
/** A row group was opened / closed */
Events.EVENT_ROW_GROUP_OPENED = 'rowGroupOpened';
Events.EVENT_ROW_DATA_CHANGED = 'rowDataChanged';
Events.EVENT_FLOATING_ROW_DATA_CHANGED = 'floatingRowDataChanged';
Events.EVENT_RANGE_SELECTION_CHANGED = 'rangeSelectionChanged';
Events.EVENT_FLASH_CELLS = 'clipboardPaste';
Events.EVENT_HEADER_HEIGHT_CHANGED = 'headerHeightChanged';
Events.EVENT_MODEL_UPDATED = 'modelUpdated';
Events.EVENT_CELL_CLICKED = 'cellClicked';
Events.EVENT_CELL_DOUBLE_CLICKED = 'cellDoubleClicked';
Events.EVENT_CELL_CONTEXT_MENU = 'cellContextMenu';
Events.EVENT_CELL_VALUE_CHANGED = 'cellValueChanged';
Events.EVENT_CELL_FOCUSED = 'cellFocused';
Events.EVENT_ROW_SELECTED = 'rowSelected';
Events.EVENT_SELECTION_CHANGED = 'selectionChanged';
Events.EVENT_BEFORE_FILTER_CHANGED = 'beforeFilterChanged';
Events.EVENT_FILTER_CHANGED = 'filterChanged';
Events.EVENT_AFTER_FILTER_CHANGED = 'afterFilterChanged';
Events.EVENT_FILTER_MODIFIED = 'filterModified';
Events.EVENT_BEFORE_SORT_CHANGED = 'beforeSortChanged';
Events.EVENT_SORT_CHANGED = 'sortChanged';
Events.EVENT_AFTER_SORT_CHANGED = 'afterSortChanged';
Events.EVENT_VIRTUAL_ROW_REMOVED = 'virtualRowRemoved';
Events.EVENT_ROW_CLICKED = 'rowClicked';
Events.EVENT_ROW_DOUBLE_CLICKED = 'rowDoubleClicked';
Events.EVENT_GRID_READY = 'gridReady';
Events.EVENT_GRID_SIZE_CHANGED = 'gridSizeChanged';
return Events;
})();
exports.Events = Events;
/***/ },
/* 11 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var csvCreator_1 = __webpack_require__(12);
var rowRenderer_1 = __webpack_require__(23);
var headerRenderer_1 = __webpack_require__(54);
var filterManager_1 = __webpack_require__(40);
var columnController_1 = __webpack_require__(13);
var selectionController_1 = __webpack_require__(29);
var gridOptionsWrapper_1 = __webpack_require__(3);
var gridPanel_1 = __webpack_require__(24);
var valueService_1 = __webpack_require__(34);
var masterSlaveService_1 = __webpack_require__(25);
var eventService_1 = __webpack_require__(4);
var floatingRowModel_1 = __webpack_require__(26);
var constants_1 = __webpack_require__(8);
var context_1 = __webpack_require__(6);
var gridCore_1 = __webpack_require__(37);
var context_2 = __webpack_require__(6);
var context_3 = __webpack_require__(6);
var sortController_1 = __webpack_require__(39);
var paginationController_1 = __webpack_require__(38);
var focusedCellController_1 = __webpack_require__(44);
var context_4 = __webpack_require__(6);
var GridApi = (function () {
function GridApi() {
}
/** Used internally by grid. Not intended to be used by the client. Interface may change between releases. */
GridApi.prototype.__getMasterSlaveService = function () {
return this.masterSlaveService;
};
GridApi.prototype.getFirstRenderedRow = function () {
return this.rowRenderer.getFirstVirtualRenderedRow();
};
GridApi.prototype.getLastRenderedRow = function () {
return this.rowRenderer.getLastVirtualRenderedRow();
};
GridApi.prototype.getDataAsCsv = function (params) {
return this.csvCreator.getDataAsCsv(params);
};
GridApi.prototype.exportDataAsCsv = function (params) {
this.csvCreator.exportDataAsCsv(params);
};
GridApi.prototype.setDatasource = function (datasource) {
if (this.gridOptionsWrapper.isRowModelPagination()) {
this.paginationController.setDatasource(datasource);
}
else if (this.gridOptionsWrapper.isRowModelVirtual()) {
this.rowModel.setDatasource(datasource);
}
else {
console.warn("ag-Grid: you can only use a datasource when gridOptions.rowModelType is '" + constants_1.Constants.ROW_MODEL_TYPE_VIRTUAL + "' or '" + constants_1.Constants.ROW_MODEL_TYPE_PAGINATION + "'");
}
};
GridApi.prototype.setRowData = function (rowData) {
this.rowModel.setRowData(rowData, true);
};
GridApi.prototype.setFloatingTopRowData = function (rows) {
this.floatingRowModel.setFloatingTopRowData(rows);
};
GridApi.prototype.setFloatingBottomRowData = function (rows) {
this.floatingRowModel.setFloatingBottomRowData(rows);
};
GridApi.prototype.setColumnDefs = function (colDefs) {
this.columnController.setColumnDefs(colDefs);
};
GridApi.prototype.refreshRows = function (rowNodes) {
this.rowRenderer.refreshRows(rowNodes);
};
GridApi.prototype.refreshCells = function (rowNodes, colIds) {
this.rowRenderer.refreshCells(rowNodes, colIds);
};
GridApi.prototype.rowDataChanged = function (rows) {
this.rowRenderer.rowDataChanged(rows);
};
GridApi.prototype.refreshView = function () {
this.rowRenderer.refreshView();
};
GridApi.prototype.softRefreshView = function () {
this.rowRenderer.softRefreshView();
};
GridApi.prototype.refreshGroupRows = function () {
this.rowRenderer.refreshGroupRows();
};
GridApi.prototype.refreshHeader = function () {
// need to review this - the refreshHeader should also refresh all icons in the header
this.headerRenderer.refreshHeader();
};
GridApi.prototype.isAnyFilterPresent = function () {
return this.filterManager.isAnyFilterPresent();
};
GridApi.prototype.isAdvancedFilterPresent = function () {
return this.filterManager.isAdvancedFilterPresent();
};
GridApi.prototype.isQuickFilterPresent = function () {
return this.filterManager.isQuickFilterPresent();
};
GridApi.prototype.getModel = function () {
return this.rowModel;
};
GridApi.prototype.onGroupExpandedOrCollapsed = function (refreshFromIndex) {
this.rowModel.refreshModel(constants_1.Constants.STEP_MAP, refreshFromIndex);
};
GridApi.prototype.expandAll = function () {
this.rowModel.expandOrCollapseAll(true);
};
GridApi.prototype.collapseAll = function () {
this.rowModel.expandOrCollapseAll(false);
};
GridApi.prototype.addVirtualRowListener = function (eventName, rowIndex, callback) {
if (typeof eventName !== 'string') {
console.log('ag-Grid: addVirtualRowListener is deprecated, please use addRenderedRowListener.');
}
this.addRenderedRowListener(eventName, rowIndex, callback);
};
GridApi.prototype.addRenderedRowListener = function (eventName, rowIndex, callback) {
if (eventName === 'virtualRowRemoved') {
console.log('ag-Grid: event virtualRowRemoved is deprecated, now called renderedRowRemoved');
eventName = '' +
'';
}
if (eventName === 'virtualRowSelected') {
console.log('ag-Grid: event virtualRowSelected is deprecated, to register for individual row ' +
'selection events, add a listener directly to the row node.');
}
this.rowRenderer.addRenderedRowListener(eventName, rowIndex, callback);
};
GridApi.prototype.setQuickFilter = function (newFilter) {
this.filterManager.setQuickFilter(newFilter);
};
GridApi.prototype.selectIndex = function (index, tryMulti, suppressEvents) {
console.log('ag-Grid: do not use api for selection, call node.setSelected(value) instead');
this.selectionController.selectIndex(index, tryMulti, suppressEvents);
};
GridApi.prototype.deselectIndex = function (index, suppressEvents) {
if (suppressEvents === void 0) { suppressEvents = false; }
console.log('ag-Grid: do not use api for selection, call node.setSelected(value) instead');
this.selectionController.deselectIndex(index, suppressEvents);
};
GridApi.prototype.selectNode = function (node, tryMulti, suppressEvents) {
if (tryMulti === void 0) { tryMulti = false; }
if (suppressEvents === void 0) { suppressEvents = false; }
console.log('ag-Grid: API for selection is deprecated, call node.setSelected(value) instead');
node.setSelected(true, !tryMulti, suppressEvents);
};
GridApi.prototype.deselectNode = function (node, suppressEvents) {
if (suppressEvents === void 0) { suppressEvents = false; }
console.log('ag-Grid: API for selection is deprecated, call node.setSelected(value) instead');
node.setSelected(false, false, suppressEvents);
};
GridApi.prototype.selectAll = function () {
this.selectionController.selectAllRowNodes();
};
GridApi.prototype.deselectAll = function () {
this.selectionController.deselectAllRowNodes();
};
GridApi.prototype.recomputeAggregates = function () {
this.rowModel.refreshModel(constants_1.Constants.STEP_AGGREGATE);
};
GridApi.prototype.sizeColumnsToFit = function () {
if (this.gridOptionsWrapper.isForPrint()) {
console.warn('ag-grid: sizeColumnsToFit does not work when forPrint=true');
return;
}
this.gridPanel.sizeColumnsToFit();
};
GridApi.prototype.showLoadingOverlay = function () {
this.gridPanel.showLoadingOverlay();
};
GridApi.prototype.showNoRowsOverlay = function () {
this.gridPanel.showNoRowsOverlay();
};
GridApi.prototype.hideOverlay = function () {
this.gridPanel.hideOverlay();
};
GridApi.prototype.isNodeSelected = function (node) {
console.log('ag-Grid: no need to call api.isNodeSelected(), just call node.isSelected() instead');
return node.isSelected();
};
GridApi.prototype.getSelectedNodesById = function () {
console.error('ag-Grid: since version 3.4, getSelectedNodesById no longer exists, use getSelectedNodes() instead');
return null;
};
GridApi.prototype.getSelectedNodes = function () {
return this.selectionController.getSelectedNodes();
};
GridApi.prototype.getSelectedRows = function () {
return this.selectionController.getSelectedRows();
};
GridApi.prototype.getBestCostNodeSelection = function () {
return this.selectionController.getBestCostNodeSelection();
};
GridApi.prototype.getRenderedNodes = function () {
return this.rowRenderer.getRenderedNodes();
};
GridApi.prototype.ensureColIndexVisible = function (index) {
console.warn('ag-Grid: ensureColIndexVisible(index) no longer supported, use ensureColumnVisible(colKey) instead.');
};
GridApi.prototype.ensureColumnVisible = function (key) {
this.gridPanel.ensureColumnVisible(key);
};
GridApi.prototype.ensureIndexVisible = function (index) {
this.gridPanel.ensureIndexVisible(index);
};
GridApi.prototype.ensureNodeVisible = function (comparator) {
this.gridCore.ensureNodeVisible(comparator);
};
GridApi.prototype.forEachNode = function (callback) {
this.rowModel.forEachNode(callback);
};
GridApi.prototype.forEachNodeAfterFilter = function (callback) {
this.rowModel.forEachNodeAfterFilter(callback);
};
GridApi.prototype.forEachNodeAfterFilterAndSort = function (callback) {
this.rowModel.forEachNodeAfterFilterAndSort(callback);
};
GridApi.prototype.getFilterApiForColDef = function (colDef) {
console.warn('ag-grid API method getFilterApiForColDef deprecated, use getFilterApi instead');
return this.getFilterApi(colDef);
};
GridApi.prototype.getFilterApi = function (key) {
var column = this.columnController.getColumn(key);
return this.filterManager.getFilterApi(column);
};
GridApi.prototype.getColumnDef = function (key) {
var column = this.columnController.getColumn(key);
if (column) {
return column.getColDef();
}
else {
return null;
}
};
GridApi.prototype.onFilterChanged = function () {
this.filterManager.onFilterChanged();
};
GridApi.prototype.setSortModel = function (sortModel) {
this.sortController.setSortModel(sortModel);
};
GridApi.prototype.getSortModel = function () {
return this.sortController.getSortModel();
};
GridApi.prototype.setFilterModel = function (model) {
this.filterManager.setFilterModel(model);
};
GridApi.prototype.getFilterModel = function () {
return this.filterManager.getFilterModel();
};
GridApi.prototype.getFocusedCell = function () {
return this.focusedCellController.getFocusedCell();
};
GridApi.prototype.setFocusedCell = function (rowIndex, colKey, floating) {
this.focusedCellController.setFocusedCell(rowIndex, colKey, floating);
};
GridApi.prototype.setHeaderHeight = function (headerHeight) {
this.gridOptionsWrapper.setHeaderHeight(headerHeight);
};
GridApi.prototype.showToolPanel = function (show) {
this.gridCore.showToolPanel(show);
};
GridApi.prototype.isToolPanelShowing = function () {
return this.gridCore.isToolPanelShowing();
};
GridApi.prototype.doLayout = function () {
this.gridCore.doLayout();
};
GridApi.prototype.getValue = function (colKey, rowNode) {
var column = this.columnController.getColumn(colKey);
return this.valueService.getValue(column, rowNode);
};
GridApi.prototype.addEventListener = function (eventType, listener) {
this.eventService.addEventListener(eventType, listener);
};
GridApi.prototype.addGlobalListener = function (listener) {
this.eventService.addGlobalListener(listener);
};
GridApi.prototype.removeEventListener = function (eventType, listener) {
this.eventService.removeEventListener(eventType, listener);
};
GridApi.prototype.removeGlobalListener = function (listener) {
this.eventService.removeGlobalListener(listener);
};
GridApi.prototype.dispatchEvent = function (eventType, event) {
this.eventService.dispatchEvent(eventType, event);
};
GridApi.prototype.destroy = function () {
this.context.destroy();
};
GridApi.prototype.resetQuickFilter = function () {
this.rowModel.forEachNode(function (node) { return node.quickFilterAggregateText = null; });
};
GridApi.prototype.getRangeSelections = function () {
if (this.rangeController) {
return this.rangeController.getCellRanges();
}
else {
console.warn('ag-Grid: cell range selection is only available in ag-Grid Enterprise');
return null;
}
};
GridApi.prototype.addRangeSelection = function (rangeSelection) {
if (!this.rangeController) {
console.warn('ag-Grid: cell range selection is only available in ag-Grid Enterprise');
}
this.rangeController.addRange(rangeSelection);
};
GridApi.prototype.clearRangeSelection = function () {
if (!this.rangeController) {
console.warn('ag-Grid: cell range selection is only available in ag-Grid Enterprise');
}
this.rangeController.clearSelection();
};
GridApi.prototype.copySelectedRowsToClipboard = function () {
this.clipboardService.copySelectedRowsToClipboard();
};
GridApi.prototype.copySelectedRangeToClipboard = function () {
this.clipboardService.copySelectedRangeToClipboard();
};
__decorate([
context_3.Autowired('csvCreator'),
__metadata('design:type', csvCreator_1.CsvCreator)
], GridApi.prototype, "csvCreator", void 0);
__decorate([
context_3.Autowired('gridCore'),
__metadata('design:type', gridCore_1.GridCore)
], GridApi.prototype, "gridCore", void 0);
__decorate([
context_3.Autowired('rowRenderer'),
__metadata('design:type', rowRenderer_1.RowRenderer)
], GridApi.prototype, "rowRenderer", void 0);
__decorate([
context_3.Autowired('headerRenderer'),
__metadata('design:type', headerRenderer_1.HeaderRenderer)
], GridApi.prototype, "headerRenderer", void 0);
__decorate([
context_3.Autowired('filterManager'),
__metadata('design:type', filterManager_1.FilterManager)
], GridApi.prototype, "filterManager", void 0);
__decorate([
context_3.Autowired('columnController'),
__metadata('design:type', columnController_1.ColumnController)
], GridApi.prototype, "columnController", void 0);
__decorate([
context_3.Autowired('selectionController'),
__metadata('design:type', selectionController_1.SelectionController)
], GridApi.prototype, "selectionController", void 0);
__decorate([
context_3.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], GridApi.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_3.Autowired('gridPanel'),
__metadata('design:type', gridPanel_1.GridPanel)
], GridApi.prototype, "gridPanel", void 0);
__decorate([
context_3.Autowired('valueService'),
__metadata('design:type', valueService_1.ValueService)
], GridApi.prototype, "valueService", void 0);
__decorate([
context_3.Autowired('masterSlaveService'),
__metadata('design:type', masterSlaveService_1.MasterSlaveService)
], GridApi.prototype, "masterSlaveService", void 0);
__decorate([
context_3.Autowired('eventService'),
__metadata('design:type', eventService_1.EventService)
], GridApi.prototype, "eventService", void 0);
__decorate([
context_3.Autowired('floatingRowModel'),
__metadata('design:type', floatingRowModel_1.FloatingRowModel)
], GridApi.prototype, "floatingRowModel", void 0);
__decorate([
context_3.Autowired('context'),
__metadata('design:type', context_2.Context)
], GridApi.prototype, "context", void 0);
__decorate([
context_3.Autowired('rowModel'),
__metadata('design:type', Object)
], GridApi.prototype, "rowModel", void 0);
__decorate([
context_3.Autowired('sortController'),
__metadata('design:type', sortController_1.SortController)
], GridApi.prototype, "sortController", void 0);
__decorate([
context_3.Autowired('paginationController'),
__metadata('design:type', paginationController_1.PaginationController)
], GridApi.prototype, "paginationController", void 0);
__decorate([
context_3.Autowired('focusedCellController'),
__metadata('design:type', focusedCellController_1.FocusedCellController)
], GridApi.prototype, "focusedCellController", void 0);
__decorate([
context_4.Optional('rangeController'),
__metadata('design:type', Object)
], GridApi.prototype, "rangeController", void 0);
__decorate([
context_4.Optional('clipboardService'),
__metadata('design:type', Object)
], GridApi.prototype, "clipboardService", void 0);
GridApi = __decorate([
context_1.Bean('gridApi'),
__metadata('design:paramtypes', [])
], GridApi);
return GridApi;
})();
exports.GridApi = GridApi;
/***/ },
/* 12 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var columnController_1 = __webpack_require__(13);
var valueService_1 = __webpack_require__(34);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var gridOptionsWrapper_1 = __webpack_require__(3);
var LINE_SEPARATOR = '\r\n';
var CsvCreator = (function () {
function CsvCreator() {
}
CsvCreator.prototype.exportDataAsCsv = function (params) {
var csvString = this.getDataAsCsv(params);
var fileNamePresent = params && params.fileName && params.fileName.length !== 0;
var fileName = fileNamePresent ? params.fileName : 'export.csv';
// for Excel, we need \ufeff at the start
// http://stackoverflow.com/questions/17879198/adding-utf-8-bom-to-string-blob
var blobObject = new Blob(["\ufeff", csvString], {
type: "text/csv;charset=utf-8;"
});
// Internet Explorer
if (window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveOrOpenBlob(blobObject, fileName);
}
else {
// Chrome
var downloadLink = document.createElement("a");
downloadLink.href = window.URL.createObjectURL(blobObject);
downloadLink.download = fileName;
document.body.appendChild(downloadLink);
downloadLink.click();
document.body.removeChild(downloadLink);
}
};
CsvCreator.prototype.getDataAsCsv = function (params) {
var _this = this;
if (this.gridOptionsWrapper.isRowModelVirtual()) {
console.log('ag-Grid: getDataAsCsv not available when doing virtual pagination');
return '';
}
var result = '';
var skipGroups = params && params.skipGroups;
var skipHeader = params && params.skipHeader;
var skipFooters = params && params.skipFooters;
var includeCustomHeader = params && params.customHeader;
var includeCustomFooter = params && params.customFooter;
var allColumns = params && params.allColumns;
var onlySelected = params && params.onlySelected;
var columnSeparator = (params && params.columnSeparator) || ',';
var processCellCallback = params.processCellCallback;
var columnsToExport;
if (allColumns) {
columnsToExport = this.columnController.getAllColumns();
}
else {
columnsToExport = this.columnController.getAllDisplayedColumns();
}
if (!columnsToExport || columnsToExport.length === 0) {
return '';
}
if (includeCustomHeader) {
result += params.customHeader;
}
// first pass, put in the header names of the cols
if (!skipHeader) {
columnsToExport.forEach(function (column, index) {
var nameForCol = _this.columnController.getDisplayNameForCol(column);
if (nameForCol === null || nameForCol === undefined) {
nameForCol = '';
}
if (index != 0) {
result += columnSeparator;
}
result += '"' + _this.escape(nameForCol) + '"';
});
result += LINE_SEPARATOR;
}
this.rowModel.forEachNodeAfterFilterAndSort(function (node) {
if (skipGroups && node.group) {
return;
}
if (skipFooters && node.footer) {
return;
}
if (onlySelected && !node.isSelected()) {
return;
}
columnsToExport.forEach(function (column, index) {
var valueForCell;
if (node.group && index === 0) {
valueForCell = _this.createValueForGroupNode(node);
}
else {
valueForCell = _this.valueService.getValue(column, node);
}
valueForCell = _this.processCell(node, column, valueForCell, processCellCallback);
if (valueForCell === null || valueForCell === undefined) {
valueForCell = '';
}
if (index != 0) {
result += columnSeparator;
}
result += '"' + _this.escape(valueForCell) + '"';
});
result += LINE_SEPARATOR;
});
if (includeCustomFooter) {
result += params.customFooter;
}
return result;
};
CsvCreator.prototype.processCell = function (rowNode, column, value, processCellCallback) {
if (processCellCallback) {
return processCellCallback({
column: column,
node: rowNode,
value: value,
api: this.gridOptionsWrapper.getApi(),
columnApi: this.gridOptionsWrapper.getColumnApi(),
context: this.gridOptionsWrapper.getContext()
});
}
else {
return value;
}
};
CsvCreator.prototype.createValueForGroupNode = function (node) {
var keys = [node.key];
while (node.parent) {
node = node.parent;
keys.push(node.key);
}
return keys.reverse().join(' -> ');
};
// replace each " with "" (ie two sets of double quotes is how to do double quotes in csv)
CsvCreator.prototype.escape = function (value) {
if (value === null || value === undefined) {
return '';
}
var stringValue;
if (typeof value === 'string') {
stringValue = value;
}
else if (typeof value.toString === 'function') {
stringValue = value.toString();
}
else {
console.warn('known value type during csv conversion');
stringValue = '';
}
return stringValue.replace(/"/g, "\"\"");
};
__decorate([
context_2.Autowired('rowModel'),
__metadata('design:type', Object)
], CsvCreator.prototype, "rowModel", void 0);
__decorate([
context_2.Autowired('columnController'),
__metadata('design:type', columnController_1.ColumnController)
], CsvCreator.prototype, "columnController", void 0);
__decorate([
context_2.Autowired('valueService'),
__metadata('design:type', valueService_1.ValueService)
], CsvCreator.prototype, "valueService", void 0);
__decorate([
context_2.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], CsvCreator.prototype, "gridOptionsWrapper", void 0);
CsvCreator = __decorate([
context_1.Bean('csvCreator'),
__metadata('design:paramtypes', [])
], CsvCreator);
return CsvCreator;
})();
exports.CsvCreator = CsvCreator;
/***/ },
/* 13 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var utils_1 = __webpack_require__(7);
var columnGroup_1 = __webpack_require__(14);
var column_1 = __webpack_require__(15);
var gridOptionsWrapper_1 = __webpack_require__(3);
var selectionRendererFactory_1 = __webpack_require__(18);
var expressionService_1 = __webpack_require__(22);
var balancedColumnTreeBuilder_1 = __webpack_require__(47);
var displayedGroupCreator_1 = __webpack_require__(49);
var autoWidthCalculator_1 = __webpack_require__(50);
var eventService_1 = __webpack_require__(4);
var columnUtils_1 = __webpack_require__(16);
var logger_1 = __webpack_require__(5);
var events_1 = __webpack_require__(10);
var columnChangeEvent_1 = __webpack_require__(51);
var originalColumnGroup_1 = __webpack_require__(17);
var groupInstanceIdCreator_1 = __webpack_require__(52);
var functions_1 = __webpack_require__(53);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var context_3 = __webpack_require__(6);
var gridPanel_1 = __webpack_require__(24);
var context_4 = __webpack_require__(6);
var context_5 = __webpack_require__(6);
var ColumnApi = (function () {
function ColumnApi() {
}
ColumnApi.prototype.sizeColumnsToFit = function (gridWidth) { this._columnController.sizeColumnsToFit(gridWidth); };
ColumnApi.prototype.setColumnGroupOpened = function (group, newValue, instanceId) { this._columnController.setColumnGroupOpened(group, newValue, instanceId); };
ColumnApi.prototype.getColumnGroup = function (name, instanceId) { return this._columnController.getColumnGroup(name, instanceId); };
ColumnApi.prototype.getDisplayNameForCol = function (column) { return this._columnController.getDisplayNameForCol(column); };
ColumnApi.prototype.getColumn = function (key) { return this._columnController.getColumn(key); };
ColumnApi.prototype.setColumnState = function (columnState) { return this._columnController.setColumnState(columnState); };
ColumnApi.prototype.getColumnState = function () { return this._columnController.getColumnState(); };
ColumnApi.prototype.resetColumnState = function () { this._columnController.resetColumnState(); };
ColumnApi.prototype.isPinning = function () { return this._columnController.isPinningLeft() || this._columnController.isPinningRight(); };
ColumnApi.prototype.isPinningLeft = function () { return this._columnController.isPinningLeft(); };
ColumnApi.prototype.isPinningRight = function () { return this._columnController.isPinningRight(); };
ColumnApi.prototype.getDisplayedColAfter = function (col) { return this._columnController.getDisplayedColAfter(col); };
ColumnApi.prototype.getDisplayedColBefore = function (col) { return this._columnController.getDisplayedColBefore(col); };
ColumnApi.prototype.setColumnVisible = function (key, visible) { this._columnController.setColumnVisible(key, visible); };
ColumnApi.prototype.setColumnsVisible = function (keys, visible) { this._columnController.setColumnsVisible(keys, visible); };
ColumnApi.prototype.setColumnPinned = function (key, pinned) { this._columnController.setColumnPinned(key, pinned); };
ColumnApi.prototype.setColumnsPinned = function (keys, pinned) { this._columnController.setColumnsPinned(keys, pinned); };
ColumnApi.prototype.getAllColumns = function () { return this._columnController.getAllColumns(); };
ColumnApi.prototype.getDisplayedLeftColumns = function () { return this._columnController.getDisplayedLeftColumns(); };
ColumnApi.prototype.getDisplayedCenterColumns = function () { return this._columnController.getDisplayedCenterColumns(); };
ColumnApi.prototype.getDisplayedRightColumns = function () { return this._columnController.getDisplayedRightColumns(); };
ColumnApi.prototype.getAllDisplayedColumns = function () { return this._columnController.getAllDisplayedColumns(); };
ColumnApi.prototype.getRowGroupColumns = function () { return this._columnController.getRowGroupColumns(); };
ColumnApi.prototype.getValueColumns = function () { return this._columnController.getValueColumns(); };
ColumnApi.prototype.moveColumn = function (fromIndex, toIndex) { this._columnController.moveColumnByIndex(fromIndex, toIndex); };
ColumnApi.prototype.moveRowGroupColumn = function (fromIndex, toIndex) { this._columnController.moveRowGroupColumn(fromIndex, toIndex); };
ColumnApi.prototype.setColumnAggFunction = function (column, aggFunc) { this._columnController.setColumnAggFunction(column, aggFunc); };
ColumnApi.prototype.setColumnWidth = function (key, newWidth, finished) {
if (finished === void 0) { finished = true; }
this._columnController.setColumnWidth(key, newWidth, finished);
};
ColumnApi.prototype.removeValueColumn = function (column) { this._columnController.removeValueColumn(column); };
ColumnApi.prototype.addValueColumn = function (column) { this._columnController.addValueColumn(column); };
ColumnApi.prototype.removeRowGroupColumn = function (column) { this._columnController.removeRowGroupColumn(column); };
ColumnApi.prototype.addRowGroupColumn = function (column) { this._columnController.addRowGroupColumn(column); };
ColumnApi.prototype.getLeftDisplayedColumnGroups = function () { return this._columnController.getLeftDisplayedColumnGroups(); };
ColumnApi.prototype.getCenterDisplayedColumnGroups = function () { return this._columnController.getCenterDisplayedColumnGroups(); };
ColumnApi.prototype.getRightDisplayedColumnGroups = function () { return this._columnController.getRightDisplayedColumnGroups(); };
ColumnApi.prototype.getAllDisplayedColumnGroups = function () { return this._columnController.getAllDisplayedColumnGroups(); };
ColumnApi.prototype.autoSizeColumn = function (key) { return this._columnController.autoSizeColumn(key); };
ColumnApi.prototype.autoSizeColumns = function (keys) { return this._columnController.autoSizeColumns(keys); };
ColumnApi.prototype.columnGroupOpened = function (group, newValue) {
console.error('ag-Grid: columnGroupOpened no longer exists, use setColumnGroupOpened');
this.setColumnGroupOpened(group, newValue);
};
ColumnApi.prototype.hideColumns = function (colIds, hide) {
console.error('ag-Grid: hideColumns is deprecated, use setColumnsVisible');
this._columnController.setColumnsVisible(colIds, !hide);
};
ColumnApi.prototype.hideColumn = function (colId, hide) {
console.error('ag-Grid: hideColumn is deprecated, use setColumnVisible');
this._columnController.setColumnVisible(colId, !hide);
};
ColumnApi.prototype.setState = function (columnState) {
console.error('ag-Grid: setState is deprecated, use setColumnState');
return this.setColumnState(columnState);
};
ColumnApi.prototype.getState = function () {
console.error('ag-Grid: hideColumn is getState, use getColumnState');
return this.getColumnState();
};
ColumnApi.prototype.resetState = function () {
console.error('ag-Grid: hideColumn is resetState, use resetColumnState');
this.resetColumnState();
};
__decorate([
context_3.Autowired('columnController'),
__metadata('design:type', ColumnController)
], ColumnApi.prototype, "_columnController", void 0);
ColumnApi = __decorate([
context_1.Bean('columnApi'),
__metadata('design:paramtypes', [])
], ColumnApi);
return ColumnApi;
})();
exports.ColumnApi = ColumnApi;
var ColumnController = (function () {
function ColumnController() {
// these are the lists used by the rowRenderer to render nodes. almost the leaf nodes of the above
// displayed trees, however it also takes into account if the groups are open or not.
this.displayedLeftColumns = [];
this.displayedRightColumns = [];
this.displayedCenterColumns = [];
this.headerRowCount = 0;
this.ready = false;
}
ColumnController.prototype.init = function () {
if (this.gridOptionsWrapper.getColumnDefs()) {
this.setColumnDefs(this.gridOptionsWrapper.getColumnDefs());
}
};
ColumnController.prototype.agWire = function (loggerFactory) {
this.logger = loggerFactory.create('ColumnController');
};
ColumnController.prototype.setFirstRightAndLastLeftPinned = function () {
var lastLeft = this.displayedLeftColumns ? this.displayedLeftColumns[this.displayedLeftColumns.length - 1] : null;
var firstRight = this.displayedRightColumns ? this.displayedRightColumns[0] : null;
this.allColumns.forEach(function (column) {
column.setLastLeftPinned(column === lastLeft);
column.setFirstRightPinned(column === firstRight);
});
};
ColumnController.prototype.autoSizeColumns = function (keys) {
var _this = this;
this.actionOnColumns(keys, function (column) {
var requiredWidth = _this.autoWidthCalculator.getPreferredWidthForColumn(column);
if (requiredWidth > 0) {
var newWidth = _this.normaliseColumnWidth(column, requiredWidth);
column.setActualWidth(newWidth);
}
}, function () {
return new columnChangeEvent_1.ColumnChangeEvent(events_1.Events.EVENT_COLUMN_RESIZED).withFinished(true);
});
};
ColumnController.prototype.autoSizeColumn = function (key) {
this.autoSizeColumns([key]);
};
ColumnController.prototype.autoSizeAllColumns = function () {
var allDisplayedColumns = this.getAllDisplayedColumns();
this.autoSizeColumns(allDisplayedColumns);
};
ColumnController.prototype.getColumnsFromTree = function (rootColumns) {
var result = [];
recursiveFindColumns(rootColumns);
return result;
function recursiveFindColumns(childColumns) {
for (var i = 0; i < childColumns.length; i++) {
var child = childColumns[i];
if (child instanceof column_1.Column) {
result.push(child);
}
else if (child instanceof originalColumnGroup_1.OriginalColumnGroup) {
recursiveFindColumns(child.getChildren());
}
}
}
};
ColumnController.prototype.getAllDisplayedColumnGroups = function () {
if (this.displayedLeftColumnTree && this.displayedRightColumnTree && this.displayedCentreColumnTree) {
return this.displayedLeftColumnTree
.concat(this.displayedCentreColumnTree)
.concat(this.displayedRightColumnTree);
}
else {
return null;
}
};
ColumnController.prototype.getOriginalColumnTree = function () {
return this.originalBalancedTree;
};
// + gridPanel -> for resizing the body and setting top margin
ColumnController.prototype.getHeaderRowCount = function () {
return this.headerRowCount;
};
// + headerRenderer -> setting pinned body width
ColumnController.prototype.getLeftDisplayedColumnGroups = function () {
return this.displayedLeftColumnTree;
};
// + headerRenderer -> setting pinned body width
ColumnController.prototype.getRightDisplayedColumnGroups = function () {
return this.displayedRightColumnTree;
};
// + headerRenderer -> setting pinned body width
ColumnController.prototype.getCenterDisplayedColumnGroups = function () {
return this.displayedCentreColumnTree;
};
ColumnController.prototype.getDisplayedColumnGroups = function (type) {
switch (type) {
case column_1.Column.PINNED_LEFT: return this.getLeftDisplayedColumnGroups();
case column_1.Column.PINNED_RIGHT: return this.getRightDisplayedColumnGroups();
default: return this.getCenterDisplayedColumnGroups();
}
};
// gridPanel -> ensureColumnVisible
ColumnController.prototype.isColumnDisplayed = function (column) {
return this.getAllDisplayedColumns().indexOf(column) >= 0;
};
// + csvCreator
ColumnController.prototype.getAllDisplayedColumns = function () {
// order we add the arrays together is important, so the result
// has the columns left to right, as they appear on the screen.
return this.displayedLeftColumns
.concat(this.displayedCenterColumns)
.concat(this.displayedRightColumns);
};
// used by:
// + angularGrid -> setting pinned body width
// todo: this needs to be cached
ColumnController.prototype.getPinnedLeftContainerWidth = function () {
return this.getWithOfColsInList(this.displayedLeftColumns);
};
// todo: this needs to be cached
ColumnController.prototype.getPinnedRightContainerWidth = function () {
return this.getWithOfColsInList(this.displayedRightColumns);
};
ColumnController.prototype.addRowGroupColumn = function (column) {
if (this.allColumns.indexOf(column) < 0) {
console.warn('not a valid column: ' + column);
return;
}
if (this.rowGroupColumns.indexOf(column) >= 0) {
console.warn('column is already a value column');
return;
}
this.rowGroupColumns.push(column);
// because we could be taking out columns, the displayed
// columns may differ, so need to work out all the columns again
this.updateModel();
var event = new columnChangeEvent_1.ColumnChangeEvent(events_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGE);
this.eventService.dispatchEvent(events_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGE, event);
};
ColumnController.prototype.removeRowGroupColumn = function (column) {
if (this.rowGroupColumns.indexOf(column) < 0) {
console.warn('column not a row group');
return;
}
utils_1.Utils.removeFromArray(this.rowGroupColumns, column);
this.updateModel();
var event = new columnChangeEvent_1.ColumnChangeEvent(events_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGE);
this.eventService.dispatchEvent(events_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGE, event);
};
ColumnController.prototype.addValueColumn = function (column) {
if (this.allColumns.indexOf(column) < 0) {
console.warn('not a valid column: ' + column);
return;
}
if (this.valueColumns.indexOf(column) >= 0) {
console.warn('column is already a value column');
return;
}
if (!column.getAggFunc()) {
column.setAggFunc(column_1.Column.AGG_SUM);
}
this.valueColumns.push(column);
var event = new columnChangeEvent_1.ColumnChangeEvent(events_1.Events.EVENT_COLUMN_VALUE_CHANGE);
this.eventService.dispatchEvent(events_1.Events.EVENT_COLUMN_VALUE_CHANGE, event);
};
ColumnController.prototype.removeValueColumn = function (column) {
if (this.valueColumns.indexOf(column) < 0) {
console.warn('column not a value');
return;
}
utils_1.Utils.removeFromArray(this.valueColumns, column);
var event = new columnChangeEvent_1.ColumnChangeEvent(events_1.Events.EVENT_COLUMN_VALUE_CHANGE);
this.eventService.dispatchEvent(events_1.Events.EVENT_COLUMN_VALUE_CHANGE, event);
};
// returns the width we can set to this col, taking into consideration min and max widths
ColumnController.prototype.normaliseColumnWidth = function (column, newWidth) {
if (newWidth < column.getMinWidth()) {
newWidth = column.getMinWidth();
}
if (column.isGreaterThanMax(newWidth)) {
newWidth = column.getMaxWidth();
}
return newWidth;
};
ColumnController.prototype.setColumnWidth = function (key, newWidth, finished) {
var column = this.getColumn(key);
if (!column) {
return;
}
newWidth = this.normaliseColumnWidth(column, newWidth);
var widthChanged = column.getActualWidth() !== newWidth;
if (widthChanged) {
column.setActualWidth(newWidth);
this.setLeftValues();
}
// check for change first, to avoid unnecessary firing of events
// however we always fire 'finished' events. this is important
// when groups are resized, as if the group is changing slowly,
// eg 1 pixel at a time, then each change will fire change events
// in all the columns in the group, but only one with get the pixel.
if (finished || widthChanged) {
var event = new columnChangeEvent_1.ColumnChangeEvent(events_1.Events.EVENT_COLUMN_RESIZED).withColumn(column).withFinished(finished);
this.eventService.dispatchEvent(events_1.Events.EVENT_COLUMN_RESIZED, event);
}
};
ColumnController.prototype.setColumnAggFunction = function (column, aggFunc) {
column.setAggFunc(aggFunc);
var event = new columnChangeEvent_1.ColumnChangeEvent(events_1.Events.EVENT_COLUMN_VALUE_CHANGE);
this.eventService.dispatchEvent(events_1.Events.EVENT_COLUMN_VALUE_CHANGE, event);
};
ColumnController.prototype.moveRowGroupColumn = function (fromIndex, toIndex) {
var column = this.rowGroupColumns[fromIndex];
this.rowGroupColumns.splice(fromIndex, 1);
this.rowGroupColumns.splice(toIndex, 0, column);
var event = new columnChangeEvent_1.ColumnChangeEvent(events_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGE);
this.eventService.dispatchEvent(events_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGE, event);
};
ColumnController.prototype.getPathForColumn = function (column) {
return this.columnUtils.getPathForColumn(column, this.getAllDisplayedColumnGroups());
};
ColumnController.prototype.moveColumns = function (keys, toIndex) {
var _this = this;
this.gridPanel.turnOnAnimationForABit();
this.actionOnColumns(keys, function (column) {
var fromIndex = _this.allColumns.indexOf(column);
_this.allColumns.splice(fromIndex, 1);
_this.allColumns.splice(toIndex, 0, column);
}, function () {
return new columnChangeEvent_1.ColumnChangeEvent(events_1.Events.EVENT_COLUMN_MOVED).withToIndex(toIndex);
});
this.updateModel();
};
ColumnController.prototype.moveColumn = function (key, toIndex) {
this.moveColumns([key], toIndex);
};
ColumnController.prototype.moveColumnByIndex = function (fromIndex, toIndex) {
var column = this.allColumns[fromIndex];
this.moveColumn(column, toIndex);
};
// used by:
// + angularGrid -> for setting body width
// + rowController -> setting main row widths (when inserting and resizing)
// need to cache this
ColumnController.prototype.getBodyContainerWidth = function () {
var result = this.getWithOfColsInList(this.displayedCenterColumns);
return result;
};
// + rowController
ColumnController.prototype.getValueColumns = function () {
return this.valueColumns;
};
// + toolPanel
ColumnController.prototype.getRowGroupColumns = function () {
return this.rowGroupColumns;
};
ColumnController.prototype.isColumnRowGrouped = function (column) {
return this.rowGroupColumns.indexOf(column) >= 0;
};
// + rowController -> while inserting rows
ColumnController.prototype.getDisplayedCenterColumns = function () {
return this.displayedCenterColumns.slice(0);
};
// + rowController -> while inserting rows
ColumnController.prototype.getDisplayedLeftColumns = function () {
return this.displayedLeftColumns.slice(0);
};
ColumnController.prototype.getDisplayedRightColumns = function () {
return this.displayedRightColumns.slice(0);
};
ColumnController.prototype.getDisplayedColumns = function (type) {
switch (type) {
case column_1.Column.PINNED_LEFT: return this.getDisplayedLeftColumns();
case column_1.Column.PINNED_RIGHT: return this.getDisplayedRightColumns();
default: return this.getDisplayedCenterColumns();
}
};
// used by:
// + inMemoryRowController -> sorting, building quick filter text
// + headerRenderer -> sorting (clearing icon)
ColumnController.prototype.getAllColumns = function () {
return this.allColumns;
};
ColumnController.prototype.isEmpty = function () {
return utils_1.Utils.missingOrEmpty(this.allColumns);
};
ColumnController.prototype.isRowGroupEmpty = function () {
return utils_1.Utils.missingOrEmpty(this.rowGroupColumns);
};
ColumnController.prototype.setColumnVisible = function (key, visible) {
this.setColumnsVisible([key], visible);
};
ColumnController.prototype.setColumnsVisible = function (keys, visible) {
this.gridPanel.turnOnAnimationForABit();
this.actionOnColumns(keys, function (column) {
column.setVisible(visible);
}, function () {
return new columnChangeEvent_1.ColumnChangeEvent(events_1.Events.EVENT_COLUMN_VISIBLE).withVisible(visible);
});
};
ColumnController.prototype.setColumnPinned = function (key, pinned) {
this.setColumnsPinned([key], pinned);
};
ColumnController.prototype.setColumnsPinned = function (keys, pinned) {
this.gridPanel.turnOnAnimationForABit();
var actualPinned;
if (pinned === true || pinned === column_1.Column.PINNED_LEFT) {
actualPinned = column_1.Column.PINNED_LEFT;
}
else if (pinned === column_1.Column.PINNED_RIGHT) {
actualPinned = column_1.Column.PINNED_RIGHT;
}
else {
actualPinned = null;
}
this.actionOnColumns(keys, function (column) {
column.setPinned(actualPinned);
}, function () {
return new columnChangeEvent_1.ColumnChangeEvent(events_1.Events.EVENT_COLUMN_PINNED).withPinned(actualPinned);
});
};
// does an action on a set of columns. provides common functionality for looking up the
// columns based on key, getting a list of effected columns, and then updated the event
// with either one column (if it was just one col) or a list of columns
ColumnController.prototype.actionOnColumns = function (keys, action, createEvent) {
var _this = this;
if (!keys || keys.length === 0) {
return;
}
var updatedColumns = [];
keys.forEach(function (key) {
var column = _this.getColumn(key);
if (!column) {
return;
}
action(column);
updatedColumns.push(column);
});
if (updatedColumns.length === 0) {
return;
}
this.updateModel();
var event = createEvent();
event.withColumns(updatedColumns);
if (updatedColumns.length === 1) {
event.withColumn(updatedColumns[0]);
}
this.eventService.dispatchEvent(event.getType(), event);
};
ColumnController.prototype.getDisplayedColBefore = function (col) {
var allDisplayedColumns = this.getAllDisplayedColumns();
var oldIndex = allDisplayedColumns.indexOf(col);
if (oldIndex > 0) {
return allDisplayedColumns[oldIndex - 1];
}
else {
return null;
}
};
// used by:
// + rowRenderer -> for navigation
ColumnController.prototype.getDisplayedColAfter = function (col) {
var allDisplayedColumns = this.getAllDisplayedColumns();
var oldIndex = allDisplayedColumns.indexOf(col);
if (oldIndex < (allDisplayedColumns.length - 1)) {
return allDisplayedColumns[oldIndex + 1];
}
else {
return null;
}
};
ColumnController.prototype.isPinningLeft = function () {
return this.displayedLeftColumns.length > 0;
};
ColumnController.prototype.isPinningRight = function () {
return this.displayedRightColumns.length > 0;
};
ColumnController.prototype.getAllColumnsIncludingAuto = function () {
var result = this.allColumns.slice(0);
if (this.groupAutoColumnActive) {
result.push(this.groupAutoColumn);
}
return result;
};
ColumnController.prototype.getColumnState = function () {
if (!this.allColumns || this.allColumns.length < 0) {
return [];
}
var result = [];
for (var i = 0; i < this.allColumns.length; i++) {
var column = this.allColumns[i];
var rowGroupIndex = this.rowGroupColumns.indexOf(column);
var resultItem = {
colId: column.getColId(),
hide: !column.isVisible(),
aggFunc: column.getAggFunc() ? column.getAggFunc() : null,
width: column.getActualWidth(),
pinned: column.getPinned(),
rowGroupIndex: rowGroupIndex >= 0 ? rowGroupIndex : null
};
result.push(resultItem);
}
return result;
};
ColumnController.prototype.resetColumnState = function () {
// we can't use 'allColumns' as the order might of messed up, so get the original ordered list
var originalColumns = this.allColumns = this.getColumnsFromTree(this.originalBalancedTree);
var state = [];
if (originalColumns) {
originalColumns.forEach(function (column) {
state.push({
colId: column.getColId(),
aggFunc: column.getColDef().aggFunc,
hide: column.getColDef().hide,
pinned: column.getColDef().pinned,
rowGroupIndex: column.getColDef().rowGroupIndex,
width: column.getColDef().width
});
});
}
this.setColumnState(state);
};
ColumnController.prototype.setColumnState = function (columnState) {
var _this = this;
var oldColumnList = this.allColumns;
this.allColumns = [];
this.rowGroupColumns = [];
this.valueColumns = [];
var success = true;
if (columnState) {
columnState.forEach(function (stateItem) {
var oldColumn = utils_1.Utils.find(oldColumnList, 'colId', stateItem.colId);
if (!oldColumn) {
console.warn('ag-grid: column ' + stateItem.colId + ' not found');
success = false;
}
// following ensures we are left with boolean true or false, eg converts (null, undefined, 0) all to true
oldColumn.setVisible(!stateItem.hide);
// sets pinned to 'left' or 'right'
oldColumn.setPinned(stateItem.pinned);
// if width provided and valid, use it, otherwise stick with the old width
if (stateItem.width >= _this.gridOptionsWrapper.getMinColWidth()) {
oldColumn.setActualWidth(stateItem.width);
}
// accept agg func only if valid
var aggFuncValid = [column_1.Column.AGG_MIN, column_1.Column.AGG_MAX, column_1.Column.AGG_SUM, column_1.Column.AGG_FIRST, column_1.Column.AGG_LAST].indexOf(stateItem.aggFunc) >= 0;
if (aggFuncValid) {
oldColumn.setAggFunc(stateItem.aggFunc);
_this.valueColumns.push(oldColumn);
}
else {
oldColumn.setAggFunc(null);
}
// if rowGroup
if (typeof stateItem.rowGroupIndex === 'number' && stateItem.rowGroupIndex >= 0) {
_this.rowGroupColumns.push(oldColumn);
}
_this.allColumns.push(oldColumn);
oldColumnList.splice(oldColumnList.indexOf(oldColumn), 1);
});
}
// anything left over, we got no data for, so add in the column as non-value, non-rowGroup and hidden
oldColumnList.forEach(function (oldColumn) {
oldColumn.setVisible(false);
oldColumn.setAggFunc(null);
oldColumn.setPinned(null);
_this.allColumns.push(oldColumn);
});
// sort the row group columns
this.rowGroupColumns.sort(function (colA, colB) {
var rowGroupIndexA = -1;
var rowGroupIndexB = -1;
for (var i = 0; i < columnState.length; i++) {
var state = columnState[i];
if (state.colId === colA.getColId()) {
rowGroupIndexA = state.rowGroupIndex;
}
if (state.colId === colB.getColId()) {
rowGroupIndexB = state.rowGroupIndex;
}
}
return rowGroupIndexA - rowGroupIndexB;
});
this.updateModel();
var event = new columnChangeEvent_1.ColumnChangeEvent(events_1.Events.EVENT_COLUMN_EVERYTHING_CHANGED);
this.eventService.dispatchEvent(events_1.Events.EVENT_COLUMN_EVERYTHING_CHANGED, event);
return success;
};
ColumnController.prototype.getColumns = function (keys) {
var _this = this;
var foundColumns = [];
if (keys) {
keys.forEach(function (key) {
var column = _this.getColumn(key);
if (column) {
foundColumns.push(column);
}
});
}
return foundColumns;
};
ColumnController.prototype.getColumnWithValidation = function (key) {
var column = this.getColumn(key);
if (!column) {
console.warn('ag-Grid: could not find column ' + column);
}
return column;
};
ColumnController.prototype.getColumn = function (key) {
if (!key) {
return null;
}
for (var i = 0; i < this.allColumns.length; i++) {
if (colMatches(this.allColumns[i])) {
return this.allColumns[i];
}
}
if (this.groupAutoColumnActive && colMatches(this.groupAutoColumn)) {
return this.groupAutoColumn;
}
function colMatches(column) {
var columnMatches = column === key;
var colDefMatches = column.getColDef() === key;
var idMatches = column.getColId() === key;
return columnMatches || colDefMatches || idMatches;
}
return null;
};
ColumnController.prototype.getDisplayNameForCol = function (column) {
var colDef = column.colDef;
var headerValueGetter = colDef.headerValueGetter;
if (headerValueGetter) {
var params = {
colDef: colDef,
api: this.gridOptionsWrapper.getApi(),
context: this.gridOptionsWrapper.getContext()
};
if (typeof headerValueGetter === 'function') {
// valueGetter is a function, so just call it
return headerValueGetter(params);
}
else if (typeof headerValueGetter === 'string') {
// valueGetter is an expression, so execute the expression
return this.expressionService.evaluate(headerValueGetter, params);
}
else {
console.warn('ag-grid: headerValueGetter must be a function or a string');
}
}
else if (colDef.displayName) {
console.warn("ag-grid: Found displayName " + colDef.displayName + ", please use headerName instead, displayName is deprecated.");
return colDef.displayName;
}
else {
return colDef.headerName;
}
};
// returns the group with matching colId and instanceId. If instanceId is missing,
// matches only on the colId.
ColumnController.prototype.getColumnGroup = function (colId, instanceId) {
if (!colId) {
return null;
}
if (colId instanceof columnGroup_1.ColumnGroup) {
return colId;
}
var allColumnGroups = this.getAllDisplayedColumnGroups();
var checkInstanceId = typeof instanceId === 'number';
var result = null;
this.columnUtils.deptFirstAllColumnTreeSearch(allColumnGroups, function (child) {
if (child instanceof columnGroup_1.ColumnGroup) {
var columnGroup = child;
var matched;
if (checkInstanceId) {
matched = colId === columnGroup.getGroupId() && instanceId === columnGroup.getInstanceId();
}
else {
matched = colId === columnGroup.getGroupId();
}
if (matched) {
result = columnGroup;
}
}
});
return result;
};
ColumnController.prototype.getColumnDept = function () {
var dept = 0;
getDept(this.getAllDisplayedColumnGroups(), 1);
return dept;
function getDept(children, currentDept) {
if (dept < currentDept) {
dept = currentDept;
}
if (dept > currentDept) {
return;
}
children.forEach(function (child) {
if (child instanceof columnGroup_1.ColumnGroup) {
var columnGroup = child;
getDept(columnGroup.getChildren(), currentDept + 1);
}
});
}
};
ColumnController.prototype.setColumnDefs = function (columnDefs) {
var balancedTreeResult = this.balancedColumnTreeBuilder.createBalancedColumnGroups(columnDefs);
this.originalBalancedTree = balancedTreeResult.balancedTree;
this.headerRowCount = balancedTreeResult.treeDept + 1;
this.allColumns = this.getColumnsFromTree(this.originalBalancedTree);
this.extractRowGroupColumns();
this.createValueColumns();
this.updateModel();
this.ready = true;
var event = new columnChangeEvent_1.ColumnChangeEvent(events_1.Events.EVENT_COLUMN_EVERYTHING_CHANGED);
this.eventService.dispatchEvent(events_1.Events.EVENT_COLUMN_EVERYTHING_CHANGED, event);
this.eventService.dispatchEvent(events_1.Events.EVENT_NEW_COLUMNS_LOADED);
};
ColumnController.prototype.isReady = function () {
return this.ready;
};
ColumnController.prototype.extractRowGroupColumns = function () {
var _this = this;
this.rowGroupColumns = [];
// pull out the columns
this.allColumns.forEach(function (column) {
if (typeof column.getColDef().rowGroupIndex === 'number') {
_this.rowGroupColumns.push(column);
}
});
// then sort them
this.rowGroupColumns.sort(function (colA, colB) {
return colA.getColDef().rowGroupIndex - colB.getColDef().rowGroupIndex;
});
};
// called by headerRenderer - when a header is opened or closed
ColumnController.prototype.setColumnGroupOpened = function (passedGroup, newValue, instanceId) {
var groupToUse = this.getColumnGroup(passedGroup, instanceId);
if (!groupToUse) {
return;
}
this.logger.log('columnGroupOpened(' + groupToUse.getGroupId() + ',' + newValue + ')');
groupToUse.setExpanded(newValue);
this.gridPanel.turnOnAnimationForABit();
this.updateGroupsAndDisplayedColumns();
var event = new columnChangeEvent_1.ColumnChangeEvent(events_1.Events.EVENT_COLUMN_GROUP_OPENED).withColumnGroup(groupToUse);
this.eventService.dispatchEvent(events_1.Events.EVENT_COLUMN_GROUP_OPENED, event);
};
// used by updateModel
ColumnController.prototype.getColumnGroupState = function () {
var groupState = {};
this.columnUtils.deptFirstDisplayedColumnTreeSearch(this.getAllDisplayedColumnGroups(), function (child) {
if (child instanceof columnGroup_1.ColumnGroup) {
var columnGroup = child;
var key = columnGroup.getGroupId();
// if more than one instance of the group, we only record the state of the first item
if (!groupState.hasOwnProperty(key)) {
groupState[key] = columnGroup.isExpanded();
}
}
});
return groupState;
};
// used by updateModel
ColumnController.prototype.setColumnGroupState = function (groupState) {
this.columnUtils.deptFirstDisplayedColumnTreeSearch(this.getAllDisplayedColumnGroups(), function (child) {
if (child instanceof columnGroup_1.ColumnGroup) {
var columnGroup = child;
var key = columnGroup.getGroupId();
var shouldExpandGroup = groupState[key] === true && columnGroup.isExpandable();
if (shouldExpandGroup) {
columnGroup.setExpanded(true);
}
}
});
};
ColumnController.prototype.updateModel = function () {
// save opened / closed state
var oldGroupState = this.getColumnGroupState();
// following 3 methods are only called from here
this.createGroupAutoColumn();
var visibleColumns = this.updateVisibleColumns();
this.buildAllGroups(visibleColumns);
// restore opened / closed state
this.setColumnGroupState(oldGroupState);
// this is also called when a group is opened or closed
this.updateGroupsAndDisplayedColumns();
this.setFirstRightAndLastLeftPinned();
};
ColumnController.prototype.updateGroupsAndDisplayedColumns = function () {
this.updateGroups();
this.updateDisplayedColumnsFromGroups();
};
ColumnController.prototype.updateDisplayedColumnsFromGroups = function () {
this.addToDisplayedColumns(this.displayedLeftColumnTree, this.displayedLeftColumns);
this.addToDisplayedColumns(this.displayedRightColumnTree, this.displayedRightColumns);
this.addToDisplayedColumns(this.displayedCentreColumnTree, this.displayedCenterColumns);
this.setLeftValues();
};
ColumnController.prototype.setLeftValues = function () {
// go through each list of displayed columns
var allColumns = this.allColumns.slice(0);
[this.displayedLeftColumns, this.displayedRightColumns, this.displayedCenterColumns].forEach(function (columns) {
var left = 0;
columns.forEach(function (column) {
column.setLeft(left);
left += column.getActualWidth();
utils_1.Utils.removeFromArray(allColumns, column);
});
});
// items left in allColumns are columns not displayed, so remove the left position. this is
// important for the rows, as if a col is made visible, then taken out, then made visible again,
// we don't want the animation of the cell floating in from the old position, whatever that was.
allColumns.forEach(function (column) {
column.setLeft(null);
});
};
ColumnController.prototype.addToDisplayedColumns = function (displayedColumnTree, displayedColumns) {
displayedColumns.length = 0;
this.columnUtils.deptFirstDisplayedColumnTreeSearch(displayedColumnTree, function (child) {
if (child instanceof column_1.Column) {
displayedColumns.push(child);
}
});
};
// called from api
ColumnController.prototype.sizeColumnsToFit = function (gridWidth) {
var _this = this;
// avoid divide by zero
var allDisplayedColumns = this.getAllDisplayedColumns();
if (gridWidth <= 0 || allDisplayedColumns.length === 0) {
return;
}
var colsToNotSpread = utils_1.Utils.filter(allDisplayedColumns, function (column) {
return column.getColDef().suppressSizeToFit === true;
});
var colsToSpread = utils_1.Utils.filter(allDisplayedColumns, function (column) {
return column.getColDef().suppressSizeToFit !== true;
});
// make a copy of the cols that are going to be resized
var colsToFireEventFor = colsToSpread.slice(0);
var finishedResizing = false;
while (!finishedResizing) {
finishedResizing = true;
var availablePixels = gridWidth - getTotalWidth(colsToNotSpread);
if (availablePixels <= 0) {
// no width, set everything to minimum
colsToSpread.forEach(function (column) {
column.setMinimum();
});
}
else {
var scale = availablePixels / getTotalWidth(colsToSpread);
// we set the pixels for the last col based on what's left, as otherwise
// we could be a pixel or two short or extra because of rounding errors.
var pixelsForLastCol = availablePixels;
// backwards through loop, as we are removing items as we go
for (var i = colsToSpread.length - 1; i >= 0; i--) {
var column = colsToSpread[i];
var newWidth = Math.round(column.getActualWidth() * scale);
if (newWidth < column.getMinWidth()) {
column.setMinimum();
moveToNotSpread(column);
finishedResizing = false;
}
else if (column.isGreaterThanMax(newWidth)) {
column.setActualWidth(column.getMaxWidth());
moveToNotSpread(column);
finishedResizing = false;
}
else {
var onLastCol = i === 0;
if (onLastCol) {
column.setActualWidth(pixelsForLastCol);
}
else {
pixelsForLastCol -= newWidth;
column.setActualWidth(newWidth);
}
}
}
}
}
this.setLeftValues();
// widths set, refresh the gui
colsToFireEventFor.forEach(function (column) {
var event = new columnChangeEvent_1.ColumnChangeEvent(events_1.Events.EVENT_COLUMN_RESIZED).withColumn(column);
_this.eventService.dispatchEvent(events_1.Events.EVENT_COLUMN_RESIZED, event);
});
function moveToNotSpread(column) {
utils_1.Utils.removeFromArray(colsToSpread, column);
colsToNotSpread.push(column);
}
function getTotalWidth(columns) {
var result = 0;
for (var i = 0; i < columns.length; i++) {
result += columns[i].getActualWidth();
}
return result;
}
};
ColumnController.prototype.buildAllGroups = function (visibleColumns) {
var leftVisibleColumns = utils_1.Utils.filter(visibleColumns, function (column) {
return column.getPinned() === 'left';
});
var rightVisibleColumns = utils_1.Utils.filter(visibleColumns, function (column) {
return column.getPinned() === 'right';
});
var centerVisibleColumns = utils_1.Utils.filter(visibleColumns, function (column) {
return column.getPinned() !== 'left' && column.getPinned() !== 'right';
});
//// if pinning left, then group column is also always pinned left. if not
//// pinning, then group column is either pinned left or center.
//if (this.groupAutoColumn) {
// if (leftVisibleColumns.length > 0 || this.groupAutoColumn.isPinnedLeft()) {
// leftVisibleColumns.unshift(this.groupAutoColumn);
// } else {
// centerVisibleColumns.unshift(this.groupAutoColumn);
// }
//}
var groupInstanceIdCreator = new groupInstanceIdCreator_1.GroupInstanceIdCreator();
this.displayedLeftColumnTree = this.displayedGroupCreator.createDisplayedGroups(leftVisibleColumns, this.originalBalancedTree, groupInstanceIdCreator);
this.displayedRightColumnTree = this.displayedGroupCreator.createDisplayedGroups(rightVisibleColumns, this.originalBalancedTree, groupInstanceIdCreator);
this.displayedCentreColumnTree = this.displayedGroupCreator.createDisplayedGroups(centerVisibleColumns, this.originalBalancedTree, groupInstanceIdCreator);
};
ColumnController.prototype.updateGroups = function () {
var allGroups = this.getAllDisplayedColumnGroups();
this.columnUtils.deptFirstAllColumnTreeSearch(allGroups, function (child) {
if (child instanceof columnGroup_1.ColumnGroup) {
var group = child;
group.calculateDisplayedColumns();
}
});
};
ColumnController.prototype.createGroupAutoColumn = function () {
// see if we need to insert the default grouping column
var needAGroupColumn = this.rowGroupColumns.length > 0
&& !this.gridOptionsWrapper.isGroupSuppressAutoColumn()
&& !this.gridOptionsWrapper.isGroupUseEntireRow()
&& !this.gridOptionsWrapper.isGroupSuppressRow();
this.groupAutoColumnActive = needAGroupColumn;
// lazy create group auto-column
if (needAGroupColumn && !this.groupAutoColumn) {
// if one provided by user, use it, otherwise create one
var autoColDef = this.gridOptionsWrapper.getGroupColumnDef();
if (!autoColDef) {
var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();
autoColDef = {
headerName: localeTextFunc('group', 'Group'),
comparator: functions_1.defaultGroupComparator,
valueGetter: function (params) {
if (params.node.group) {
return params.node.key;
}
else if (params.data && params.colDef.field) {
return params.data[params.colDef.field];
}
else {
return null;
}
},
suppressAggregation: true,
suppressRowGroup: true,
cellRenderer: {
renderer: 'group'
}
};
}
// we never allow moving the group column
autoColDef.suppressMovable = true;
var colId = 'ag-Grid-AutoColumn';
this.groupAutoColumn = new column_1.Column(autoColDef, colId);
this.context.wireBean(this.groupAutoColumn);
}
};
ColumnController.prototype.updateVisibleColumns = function () {
var visibleColumns = utils_1.Utils.filter(this.allColumns, function (column) { return column.isVisible(); });
if (this.groupAutoColumnActive) {
visibleColumns.unshift(this.groupAutoColumn);
}
return visibleColumns;
};
ColumnController.prototype.createValueColumns = function () {
this.valueColumns = [];
// override with columns that have the aggFunc specified explicitly
for (var i = 0; i < this.allColumns.length; i++) {
var column = this.allColumns[i];
if (column.getColDef().aggFunc) {
column.setAggFunc(column.getColDef().aggFunc);
this.valueColumns.push(column);
}
}
};
ColumnController.prototype.getWithOfColsInList = function (columnList) {
var result = 0;
for (var i = 0; i < columnList.length; i++) {
result += columnList[i].getActualWidth();
}
return result;
};
__decorate([
context_3.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], ColumnController.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_3.Autowired('selectionRendererFactory'),
__metadata('design:type', selectionRendererFactory_1.SelectionRendererFactory)
], ColumnController.prototype, "selectionRendererFactory", void 0);
__decorate([
context_3.Autowired('expressionService'),
__metadata('design:type', expressionService_1.ExpressionService)
], ColumnController.prototype, "expressionService", void 0);
__decorate([
context_3.Autowired('balancedColumnTreeBuilder'),
__metadata('design:type', balancedColumnTreeBuilder_1.BalancedColumnTreeBuilder)
], ColumnController.prototype, "balancedColumnTreeBuilder", void 0);
__decorate([
context_3.Autowired('displayedGroupCreator'),
__metadata('design:type', displayedGroupCreator_1.DisplayedGroupCreator)
], ColumnController.prototype, "displayedGroupCreator", void 0);
__decorate([
context_3.Autowired('autoWidthCalculator'),
__metadata('design:type', autoWidthCalculator_1.AutoWidthCalculator)
], ColumnController.prototype, "autoWidthCalculator", void 0);
__decorate([
context_3.Autowired('valueService'),
__metadata('design:type', Array)
], ColumnController.prototype, "valueColumns", void 0);
__decorate([
context_3.Autowired('eventService'),
__metadata('design:type', eventService_1.EventService)
], ColumnController.prototype, "eventService", void 0);
__decorate([
context_3.Autowired('columnUtils'),
__metadata('design:type', columnUtils_1.ColumnUtils)
], ColumnController.prototype, "columnUtils", void 0);
__decorate([
context_3.Autowired('gridPanel'),
__metadata('design:type', gridPanel_1.GridPanel)
], ColumnController.prototype, "gridPanel", void 0);
__decorate([
context_3.Autowired('context'),
__metadata('design:type', context_5.Context)
], ColumnController.prototype, "context", void 0);
__decorate([
context_4.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], ColumnController.prototype, "init", null);
__decorate([
__param(0, context_2.Qualifier('loggerFactory')),
__metadata('design:type', Function),
__metadata('design:paramtypes', [logger_1.LoggerFactory]),
__metadata('design:returntype', void 0)
], ColumnController.prototype, "agWire", null);
ColumnController = __decorate([
context_1.Bean('columnController'),
__metadata('design:paramtypes', [])
], ColumnController);
return ColumnController;
})();
exports.ColumnController = ColumnController;
/***/ },
/* 14 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var column_1 = __webpack_require__(15);
var ColumnGroup = (function () {
function ColumnGroup(originalColumnGroup, groupId, instanceId) {
// depends on the open/closed state of the group, only displaying columns are stored here
this.displayedChildren = [];
this.groupId = groupId;
this.instanceId = instanceId;
this.originalColumnGroup = originalColumnGroup;
}
// returns header name if it exists, otherwise null. if will not exist if
// this group is a padding group, as they don't have colGroupDef's
ColumnGroup.prototype.getHeaderName = function () {
if (this.originalColumnGroup.getColGroupDef()) {
return this.originalColumnGroup.getColGroupDef().headerName;
}
else {
return null;
}
};
ColumnGroup.prototype.getGroupId = function () {
return this.groupId;
};
ColumnGroup.prototype.getInstanceId = function () {
return this.instanceId;
};
ColumnGroup.prototype.isChildInThisGroupDeepSearch = function (wantedChild) {
var result = false;
this.children.forEach(function (foundChild) {
if (wantedChild === foundChild) {
result = true;
}
if (foundChild instanceof ColumnGroup) {
if (foundChild.isChildInThisGroupDeepSearch(wantedChild)) {
result = true;
}
}
});
return result;
};
ColumnGroup.prototype.getActualWidth = function () {
var groupActualWidth = 0;
if (this.displayedChildren) {
this.displayedChildren.forEach(function (child) {
groupActualWidth += child.getActualWidth();
});
}
return groupActualWidth;
};
ColumnGroup.prototype.getMinWidth = function () {
var result = 0;
this.displayedChildren.forEach(function (groupChild) {
result += groupChild.getMinWidth();
});
return result;
};
ColumnGroup.prototype.addChild = function (child) {
if (!this.children) {
this.children = [];
}
this.children.push(child);
};
ColumnGroup.prototype.getDisplayedChildren = function () {
return this.displayedChildren;
};
ColumnGroup.prototype.getLeafColumns = function () {
var result = [];
this.addLeafColumns(result);
return result;
};
ColumnGroup.prototype.getDisplayedLeafColumns = function () {
var result = [];
this.addDisplayedLeafColumns(result);
return result;
};
// why two methods here doing the same thing?
ColumnGroup.prototype.getDefinition = function () {
return this.originalColumnGroup.getColGroupDef();
};
ColumnGroup.prototype.getColGroupDef = function () {
return this.originalColumnGroup.getColGroupDef();
};
ColumnGroup.prototype.isExpandable = function () {
return this.originalColumnGroup.isExpandable();
};
ColumnGroup.prototype.isExpanded = function () {
return this.originalColumnGroup.isExpanded();
};
ColumnGroup.prototype.setExpanded = function (expanded) {
this.originalColumnGroup.setExpanded(expanded);
};
ColumnGroup.prototype.addDisplayedLeafColumns = function (leafColumns) {
this.displayedChildren.forEach(function (child) {
if (child instanceof column_1.Column) {
leafColumns.push(child);
}
else if (child instanceof ColumnGroup) {
child.addDisplayedLeafColumns(leafColumns);
}
});
};
ColumnGroup.prototype.addLeafColumns = function (leafColumns) {
this.children.forEach(function (child) {
if (child instanceof column_1.Column) {
leafColumns.push(child);
}
else if (child instanceof ColumnGroup) {
child.addLeafColumns(leafColumns);
}
});
};
ColumnGroup.prototype.getChildren = function () {
return this.children;
};
ColumnGroup.prototype.getColumnGroupShow = function () {
return this.originalColumnGroup.getColumnGroupShow();
};
ColumnGroup.prototype.calculateDisplayedColumns = function () {
// clear out last time we calculated
this.displayedChildren = [];
// it not expandable, everything is visible
if (!this.originalColumnGroup.isExpandable()) {
this.displayedChildren = this.children;
return;
}
// and calculate again
for (var i = 0, j = this.children.length; i < j; i++) {
var abstractColumn = this.children[i];
var headerGroupShow = abstractColumn.getColumnGroupShow();
switch (headerGroupShow) {
case ColumnGroup.HEADER_GROUP_SHOW_OPEN:
// when set to open, only show col if group is open
if (this.originalColumnGroup.isExpanded()) {
this.displayedChildren.push(abstractColumn);
}
break;
case ColumnGroup.HEADER_GROUP_SHOW_CLOSED:
// when set to open, only show col if group is open
if (!this.originalColumnGroup.isExpanded()) {
this.displayedChildren.push(abstractColumn);
}
break;
default:
// default is always show the column
this.displayedChildren.push(abstractColumn);
break;
}
}
};
ColumnGroup.HEADER_GROUP_SHOW_OPEN = 'open';
ColumnGroup.HEADER_GROUP_SHOW_CLOSED = 'closed';
return ColumnGroup;
})();
exports.ColumnGroup = ColumnGroup;
/***/ },
/* 15 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var eventService_1 = __webpack_require__(4);
var utils_1 = __webpack_require__(7);
var context_1 = __webpack_require__(6);
var gridOptionsWrapper_1 = __webpack_require__(3);
var context_2 = __webpack_require__(6);
var columnUtils_1 = __webpack_require__(16);
// Wrapper around a user provide column definition. The grid treats the column definition as ready only.
// This class contains all the runtime information about a column, plus some logic (the definition has no logic).
// This class implements both interfaces ColumnGroupChild and OriginalColumnGroupChild as the class can
// appear as a child of either the original tree or the displayed tree. However the relevant group classes
// for each type only implements one, as each group can only appear in it's associated tree (eg OriginalColumnGroup
// can only appear in OriginalColumn tree).
var Column = (function () {
function Column(colDef, colId) {
this.moving = false;
this.filterActive = false;
this.eventService = new eventService_1.EventService();
this.colDef = colDef;
this.visible = !colDef.hide;
this.sort = colDef.sort;
this.sortedAt = colDef.sortedAt;
this.colId = colId;
}
// this is done after constructor as it uses gridOptionsWrapper
Column.prototype.initialise = function () {
this.setPinned(this.colDef.pinned);
var minColWidth = this.gridOptionsWrapper.getMinColWidth();
var maxColWidth = this.gridOptionsWrapper.getMaxColWidth();
if (this.colDef.minWidth) {
this.minWidth = this.colDef.minWidth;
}
else {
this.minWidth = minColWidth;
}
if (this.colDef.maxWidth) {
this.maxWidth = this.colDef.maxWidth;
}
else {
this.maxWidth = maxColWidth;
}
this.actualWidth = this.columnUtils.calculateColInitialWidth(this.colDef);
this.validate();
};
Column.prototype.validate = function () {
if (!this.gridOptionsWrapper.isEnterprise()) {
if (utils_1.Utils.exists(this.colDef.aggFunc)) {
console.warn('ag-Grid: aggFunc is only valid in ag-Grid-Enterprise');
}
if (utils_1.Utils.exists(this.colDef.rowGroupIndex)) {
console.warn('ag-Grid: rowGroupIndex is only valid in ag-Grid-Enterprise');
}
}
};
Column.prototype.addEventListener = function (eventType, listener) {
this.eventService.addEventListener(eventType, listener);
};
Column.prototype.removeEventListener = function (eventType, listener) {
this.eventService.removeEventListener(eventType, listener);
};
Column.prototype.isCellEditable = function (rowNode) {
// if boolean set, then just use it
if (typeof this.colDef.editable === 'boolean') {
return this.colDef.editable;
}
// if function, then call the function to find out
if (typeof this.colDef.editable === 'function') {
var params = {
node: rowNode,
column: this,
colDef: this.colDef,
context: this.gridOptionsWrapper.getContext(),
api: this.gridOptionsWrapper.getApi(),
columnApi: this.gridOptionsWrapper.getColumnApi()
};
var editableFunc = this.colDef.editable;
return editableFunc(params);
}
return false;
};
Column.prototype.setMoving = function (moving) {
this.moving = moving;
this.eventService.dispatchEvent(Column.EVENT_MOVING_CHANGED);
};
Column.prototype.isMoving = function () {
return this.moving;
};
Column.prototype.getSort = function () {
return this.sort;
};
Column.prototype.setSort = function (sort) {
if (this.sort !== sort) {
this.sort = sort;
this.eventService.dispatchEvent(Column.EVENT_SORT_CHANGED);
}
};
Column.prototype.isSortAscending = function () {
return this.sort === Column.SORT_ASC;
};
Column.prototype.isSortDescending = function () {
return this.sort === Column.SORT_DESC;
};
Column.prototype.isSortNone = function () {
return utils_1.Utils.missing(this.sort);
};
Column.prototype.getSortedAt = function () {
return this.sortedAt;
};
Column.prototype.setSortedAt = function (sortedAt) {
this.sortedAt = sortedAt;
};
Column.prototype.setAggFunc = function (aggFunc) {
this.aggFunc = aggFunc;
};
Column.prototype.getAggFunc = function () {
return this.aggFunc;
};
Column.prototype.getLeft = function () {
return this.left;
};
Column.prototype.getRight = function () {
return this.left + this.actualWidth;
};
Column.prototype.setLeft = function (left) {
if (this.left !== left) {
this.left = left;
this.eventService.dispatchEvent(Column.EVENT_LEFT_CHANGED);
}
};
Column.prototype.isFilterActive = function () {
return this.filterActive;
};
Column.prototype.setFilterActive = function (active) {
if (this.filterActive !== active) {
this.filterActive = active;
this.eventService.dispatchEvent(Column.EVENT_FILTER_ACTIVE_CHANGED);
}
};
Column.prototype.setPinned = function (pinned) {
// pinning is not allowed when doing 'forPrint'
if (this.gridOptionsWrapper.isForPrint()) {
return;
}
if (pinned === true || pinned === Column.PINNED_LEFT) {
this.pinned = Column.PINNED_LEFT;
}
else if (pinned === Column.PINNED_RIGHT) {
this.pinned = Column.PINNED_RIGHT;
}
else {
this.pinned = null;
}
};
Column.prototype.setFirstRightPinned = function (firstRightPinned) {
if (this.firstRightPinned !== firstRightPinned) {
this.firstRightPinned = firstRightPinned;
this.eventService.dispatchEvent(Column.EVENT_FIRST_RIGHT_PINNED_CHANGED);
}
};
Column.prototype.setLastLeftPinned = function (lastLeftPinned) {
if (this.lastLeftPinned !== lastLeftPinned) {
this.lastLeftPinned = lastLeftPinned;
this.eventService.dispatchEvent(Column.EVENT_LAST_LEFT_PINNED_CHANGED);
}
};
Column.prototype.isFirstRightPinned = function () {
return this.firstRightPinned;
};
Column.prototype.isLastLeftPinned = function () {
return this.lastLeftPinned;
};
Column.prototype.isPinned = function () {
return this.pinned === Column.PINNED_LEFT || this.pinned === Column.PINNED_RIGHT;
};
Column.prototype.isPinnedLeft = function () {
return this.pinned === Column.PINNED_LEFT;
};
Column.prototype.isPinnedRight = function () {
return this.pinned === Column.PINNED_RIGHT;
};
Column.prototype.getPinned = function () {
return this.pinned;
};
Column.prototype.setVisible = function (visible) {
var newValue = visible === true;
if (this.visible !== newValue) {
this.visible = newValue;
this.eventService.dispatchEvent(Column.EVENT_VISIBLE_CHANGED);
}
};
Column.prototype.isVisible = function () {
return this.visible;
};
Column.prototype.getColDef = function () {
return this.colDef;
};
Column.prototype.getColumnGroupShow = function () {
return this.colDef.columnGroupShow;
};
Column.prototype.getColId = function () {
return this.colId;
};
Column.prototype.getId = function () {
return this.getColId();
};
Column.prototype.getDefinition = function () {
return this.colDef;
};
Column.prototype.getActualWidth = function () {
return this.actualWidth;
};
Column.prototype.setActualWidth = function (actualWidth) {
if (this.actualWidth !== actualWidth) {
this.actualWidth = actualWidth;
this.eventService.dispatchEvent(Column.EVENT_WIDTH_CHANGED);
}
};
Column.prototype.isGreaterThanMax = function (width) {
if (this.maxWidth) {
return width > this.maxWidth;
}
else {
return false;
}
};
Column.prototype.getMinWidth = function () {
return this.minWidth;
};
Column.prototype.getMaxWidth = function () {
return this.maxWidth;
};
Column.prototype.setMinimum = function () {
this.setActualWidth(this.minWidth);
};
// + renderedHeaderCell - for making header cell transparent when moving
Column.EVENT_MOVING_CHANGED = 'movingChanged';
// + renderedCell - changing left position
Column.EVENT_LEFT_CHANGED = 'leftChanged';
// + renderedCell - changing width
Column.EVENT_WIDTH_CHANGED = 'widthChanged';
// + renderedCell - for changing pinned classes
Column.EVENT_LAST_LEFT_PINNED_CHANGED = 'lastLeftPinnedChanged';
Column.EVENT_FIRST_RIGHT_PINNED_CHANGED = 'firstRightPinnedChanged';
// + renderedColumn - for changing visibility icon
Column.EVENT_VISIBLE_CHANGED = 'visibleChanged';
// + renderedHeaderCell - marks the header with filter icon
Column.EVENT_FILTER_ACTIVE_CHANGED = 'filterChanged';
// + renderedHeaderCell - marks the header with sort icon
Column.EVENT_SORT_CHANGED = 'filterChanged';
Column.PINNED_RIGHT = 'right';
Column.PINNED_LEFT = 'left';
Column.AGG_SUM = 'sum';
Column.AGG_MIN = 'min';
Column.AGG_MAX = 'max';
Column.AGG_FIRST = 'first';
Column.AGG_LAST = 'last';
Column.SORT_ASC = 'asc';
Column.SORT_DESC = 'desc';
__decorate([
context_1.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], Column.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_1.Autowired('columnUtils'),
__metadata('design:type', columnUtils_1.ColumnUtils)
], Column.prototype, "columnUtils", void 0);
__decorate([
context_2.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], Column.prototype, "initialise", null);
return Column;
})();
exports.Column = Column;
/***/ },
/* 16 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var gridOptionsWrapper_1 = __webpack_require__(3);
var columnGroup_1 = __webpack_require__(14);
var originalColumnGroup_1 = __webpack_require__(17);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
// takes in a list of columns, as specified by the column definitions, and returns column groups
var ColumnUtils = (function () {
function ColumnUtils() {
}
ColumnUtils.prototype.calculateColInitialWidth = function (colDef) {
if (!colDef.width) {
// if no width defined in colDef, use default
return this.gridOptionsWrapper.getColWidth();
}
else if (colDef.width < this.gridOptionsWrapper.getMinColWidth()) {
// if width in col def to small, set to min width
return this.gridOptionsWrapper.getMinColWidth();
}
else {
// otherwise use the provided width
return colDef.width;
}
};
ColumnUtils.prototype.getPathForColumn = function (column, allDisplayedColumnGroups) {
var result = [];
var found = false;
recursePath(allDisplayedColumnGroups, 0);
// we should always find the path, but in case there is a bug somewhere, returning null
// will make it fail rather than provide a 'hard to track down' bug
if (found) {
return result;
}
else {
return null;
}
function recursePath(balancedColumnTree, dept) {
for (var i = 0; i < balancedColumnTree.length; i++) {
if (found) {
// quit the search, so 'result' is kept with the found result
return;
}
var node = balancedColumnTree[i];
if (node instanceof columnGroup_1.ColumnGroup) {
var nextNode = node;
recursePath(nextNode.getChildren(), dept + 1);
result[dept] = node;
}
else {
if (node === column) {
found = true;
}
}
}
}
};
ColumnUtils.prototype.deptFirstOriginalTreeSearch = function (tree, callback) {
var _this = this;
if (!tree) {
return;
}
tree.forEach(function (child) {
if (child instanceof originalColumnGroup_1.OriginalColumnGroup) {
_this.deptFirstOriginalTreeSearch(child.getChildren(), callback);
}
callback(child);
});
};
ColumnUtils.prototype.deptFirstAllColumnTreeSearch = function (tree, callback) {
var _this = this;
if (!tree) {
return;
}
tree.forEach(function (child) {
if (child instanceof columnGroup_1.ColumnGroup) {
_this.deptFirstAllColumnTreeSearch(child.getChildren(), callback);
}
callback(child);
});
};
ColumnUtils.prototype.deptFirstDisplayedColumnTreeSearch = function (tree, callback) {
var _this = this;
if (!tree) {
return;
}
tree.forEach(function (child) {
if (child instanceof columnGroup_1.ColumnGroup) {
_this.deptFirstDisplayedColumnTreeSearch(child.getDisplayedChildren(), callback);
}
callback(child);
});
};
__decorate([
context_2.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], ColumnUtils.prototype, "gridOptionsWrapper", void 0);
ColumnUtils = __decorate([
context_1.Bean('columnUtils'),
__metadata('design:paramtypes', [])
], ColumnUtils);
return ColumnUtils;
})();
exports.ColumnUtils = ColumnUtils;
/***/ },
/* 17 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var columnGroup_1 = __webpack_require__(14);
var column_1 = __webpack_require__(15);
var OriginalColumnGroup = (function () {
function OriginalColumnGroup(colGroupDef, groupId) {
this.expandable = false;
this.expanded = false;
this.colGroupDef = colGroupDef;
this.groupId = groupId;
}
OriginalColumnGroup.prototype.setExpanded = function (expanded) {
this.expanded = expanded;
};
OriginalColumnGroup.prototype.isExpandable = function () {
return this.expandable;
};
OriginalColumnGroup.prototype.isExpanded = function () {
return this.expanded;
};
OriginalColumnGroup.prototype.getGroupId = function () {
return this.groupId;
};
OriginalColumnGroup.prototype.getId = function () {
return this.getGroupId();
};
OriginalColumnGroup.prototype.setChildren = function (children) {
this.children = children;
};
OriginalColumnGroup.prototype.getChildren = function () {
return this.children;
};
OriginalColumnGroup.prototype.getColGroupDef = function () {
return this.colGroupDef;
};
OriginalColumnGroup.prototype.getLeafColumns = function () {
var result = [];
this.addLeafColumns(result);
return result;
};
OriginalColumnGroup.prototype.addLeafColumns = function (leafColumns) {
this.children.forEach(function (child) {
if (child instanceof column_1.Column) {
leafColumns.push(child);
}
else if (child instanceof OriginalColumnGroup) {
child.addLeafColumns(leafColumns);
}
});
};
OriginalColumnGroup.prototype.getColumnGroupShow = function () {
if (this.colGroupDef) {
return this.colGroupDef.columnGroupShow;
}
else {
// if there is no col def, then this must be a padding
// group, which means we have exactly only child. we then
// take the value from the child and push it up, making
// this group 'invisible'.
return this.children[0].getColumnGroupShow();
}
};
// need to check that this group has at least one col showing when both expanded and contracted.
// if not, then we don't allow expanding and contracting on this group
OriginalColumnGroup.prototype.calculateExpandable = function () {
// want to make sure the group doesn't disappear when it's open
var atLeastOneShowingWhenOpen = false;
// want to make sure the group doesn't disappear when it's closed
var atLeastOneShowingWhenClosed = false;
// want to make sure the group has something to show / hide
var atLeastOneChangeable = false;
for (var i = 0, j = this.children.length; i < j; i++) {
var abstractColumn = this.children[i];
// if the abstractColumn is a grid generated group, there will be no colDef
var headerGroupShow = abstractColumn.getColumnGroupShow();
if (headerGroupShow === columnGroup_1.ColumnGroup.HEADER_GROUP_SHOW_OPEN) {
atLeastOneShowingWhenOpen = true;
atLeastOneChangeable = true;
}
else if (headerGroupShow === columnGroup_1.ColumnGroup.HEADER_GROUP_SHOW_CLOSED) {
atLeastOneShowingWhenClosed = true;
atLeastOneChangeable = true;
}
else {
atLeastOneShowingWhenOpen = true;
atLeastOneShowingWhenClosed = true;
}
}
this.expandable = atLeastOneShowingWhenOpen && atLeastOneShowingWhenClosed && atLeastOneChangeable;
};
return OriginalColumnGroup;
})();
exports.OriginalColumnGroup = OriginalColumnGroup;
/***/ },
/* 18 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var context_1 = __webpack_require__(6);
var rowNode_1 = __webpack_require__(19);
var renderedRow_1 = __webpack_require__(20);
var utils_1 = __webpack_require__(7);
var SelectionRendererFactory = (function () {
function SelectionRendererFactory() {
}
SelectionRendererFactory.prototype.createSelectionCheckbox = function (rowNode, rowIndex, addRenderedRowEventListener) {
var eCheckbox = document.createElement('input');
eCheckbox.type = "checkbox";
eCheckbox.name = "name";
eCheckbox.className = 'ag-selection-checkbox';
utils_1.Utils.setCheckboxState(eCheckbox, rowNode.isSelected());
eCheckbox.addEventListener('click', function (event) { return event.stopPropagation(); });
eCheckbox.addEventListener('change', function () {
var newValue = eCheckbox.checked;
if (newValue) {
rowNode.setSelected(newValue);
}
else {
rowNode.setSelected(newValue);
}
});
var selectionChangedCallback = function () { return utils_1.Utils.setCheckboxState(eCheckbox, rowNode.isSelected()); };
rowNode.addEventListener(rowNode_1.RowNode.EVENT_ROW_SELECTED, selectionChangedCallback);
addRenderedRowEventListener(renderedRow_1.RenderedRow.EVENT_RENDERED_ROW_REMOVED, function () {
rowNode.removeEventListener(rowNode_1.RowNode.EVENT_ROW_SELECTED, selectionChangedCallback);
});
return eCheckbox;
};
SelectionRendererFactory = __decorate([
context_1.Bean('selectionRendererFactory'),
__metadata('design:paramtypes', [])
], SelectionRendererFactory);
return SelectionRendererFactory;
})();
exports.SelectionRendererFactory = SelectionRendererFactory;
/***/ },
/* 19 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var eventService_1 = __webpack_require__(4);
var events_1 = __webpack_require__(10);
var RowNode = (function () {
function RowNode(mainEventService, gridOptionsWrapper, selectionController) {
this.selected = false;
this.mainEventService = mainEventService;
this.gridOptionsWrapper = gridOptionsWrapper;
this.selectionController = selectionController;
}
RowNode.prototype.resetQuickFilterAggregateText = function () {
this.quickFilterAggregateText = null;
};
RowNode.prototype.isSelected = function () {
// for footers, we just return what our sibling selected state is, as cannot select a footer
if (this.footer) {
return this.sibling.isSelected();
}
return this.selected;
};
RowNode.prototype.deptFirstSearch = function (callback) {
if (this.children) {
this.children.forEach(function (child) { return child.deptFirstSearch(callback); });
}
callback(this);
};
// + rowController.updateGroupsInSelection()
RowNode.prototype.calculateSelectedFromChildren = function () {
var atLeastOneSelected = false;
var atLeastOneDeSelected = false;
var atLeastOneMixed = false;
var newSelectedValue;
if (this.children) {
for (var i = 0; i < this.children.length; i++) {
var childState = this.children[i].isSelected();
switch (childState) {
case true:
atLeastOneSelected = true;
break;
case false:
atLeastOneDeSelected = true;
break;
default:
atLeastOneMixed = true;
break;
}
}
}
if (atLeastOneMixed) {
newSelectedValue = undefined;
}
else if (atLeastOneSelected && !atLeastOneDeSelected) {
newSelectedValue = true;
}
else if (!atLeastOneSelected && atLeastOneDeSelected) {
newSelectedValue = false;
}
else {
newSelectedValue = undefined;
}
this.selectThisNode(newSelectedValue);
};
RowNode.prototype.calculateSelectedFromChildrenBubbleUp = function () {
this.calculateSelectedFromChildren();
if (this.parent) {
this.parent.calculateSelectedFromChildren();
}
};
RowNode.prototype.setSelectedInitialValue = function (selected) {
this.selected = selected;
};
/** Returns true if this row is selected */
RowNode.prototype.setSelected = function (newValue, clearSelection, tailingNodeInSequence) {
if (clearSelection === void 0) { clearSelection = false; }
if (tailingNodeInSequence === void 0) { tailingNodeInSequence = false; }
if (this.floating) {
console.log('ag-Grid: cannot select floating rows');
return;
}
// if we are a footer, we don't do selection, just pass the info
// to the sibling (the parent of the group)
if (this.footer) {
this.sibling.setSelected(newValue, clearSelection, tailingNodeInSequence);
return;
}
this.selectThisNode(newValue);
var groupSelectsChildren = this.gridOptionsWrapper.isGroupSelectsChildren();
if (groupSelectsChildren && this.group) {
this.selectChildNodes(newValue);
}
// clear other nodes if not doing multi select
var actionWasOnThisNode = !tailingNodeInSequence;
if (actionWasOnThisNode) {
if (newValue && (clearSelection || !this.gridOptionsWrapper.isRowSelectionMulti())) {
this.selectionController.clearOtherNodes(this);
}
if (groupSelectsChildren && this.parent) {
this.parent.calculateSelectedFromChildrenBubbleUp();
}
// this is the very end of the 'action node', so we are finished all the updates,
// include any parent / child changes that this method caused
this.mainEventService.dispatchEvent(events_1.Events.EVENT_SELECTION_CHANGED);
}
};
RowNode.prototype.selectThisNode = function (newValue) {
if (this.selected !== newValue) {
this.selected = newValue;
if (this.eventService) {
this.eventService.dispatchEvent(RowNode.EVENT_ROW_SELECTED);
}
var event = { node: this };
this.mainEventService.dispatchEvent(events_1.Events.EVENT_ROW_SELECTED, event);
}
};
RowNode.prototype.selectChildNodes = function (newValue) {
for (var i = 0; i < this.children.length; i++) {
this.children[i].setSelected(newValue, false, true);
}
};
RowNode.prototype.addEventListener = function (eventType, listener) {
if (!this.eventService) {
this.eventService = new eventService_1.EventService();
}
this.eventService.addEventListener(eventType, listener);
};
RowNode.prototype.removeEventListener = function (eventType, listener) {
this.eventService.removeEventListener(eventType, listener);
};
RowNode.EVENT_ROW_SELECTED = 'rowSelected';
return RowNode;
})();
exports.RowNode = RowNode;
/***/ },
/* 20 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var utils_1 = __webpack_require__(7);
var renderedCell_1 = __webpack_require__(21);
var rowNode_1 = __webpack_require__(19);
var gridOptionsWrapper_1 = __webpack_require__(3);
var columnController_1 = __webpack_require__(13);
var column_1 = __webpack_require__(15);
var events_1 = __webpack_require__(10);
var eventService_1 = __webpack_require__(4);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var context_3 = __webpack_require__(6);
var focusedCellController_1 = __webpack_require__(44);
var constants_1 = __webpack_require__(8);
var RenderedRow = (function () {
function RenderedRow(parentScope, cellRendererMap, rowRenderer, eBodyContainer, ePinnedLeftContainer, ePinnedRightContainer, node, rowIndex) {
this.renderedCells = {};
this.destroyFunctions = [];
this.parentScope = parentScope;
this.cellRendererMap = cellRendererMap;
this.rowRenderer = rowRenderer;
this.eBodyContainer = eBodyContainer;
this.ePinnedLeftContainer = ePinnedLeftContainer;
this.ePinnedRightContainer = ePinnedRightContainer;
this.rowIndex = rowIndex;
this.rowNode = node;
}
RenderedRow.prototype.init = function () {
var _this = this;
this.pinningLeft = this.columnController.isPinningLeft();
this.pinningRight = this.columnController.isPinningRight();
this.createContainers();
var groupHeaderTakesEntireRow = this.gridOptionsWrapper.isGroupUseEntireRow();
this.rowIsHeaderThatSpans = this.rowNode.group && groupHeaderTakesEntireRow;
this.scope = this.createChildScopeOrNull(this.rowNode.data);
if (this.rowIsHeaderThatSpans) {
this.createGroupRow();
}
else {
this.refreshCellsIntoRow();
}
this.addDynamicStyles();
this.addDynamicClasses();
this.addRowIds();
this.setTopAndHeightCss();
this.addRowSelectedListener();
this.addCellFocusedListener();
this.addColumnListener();
this.attachContainers();
this.gridOptionsWrapper.executeProcessRowPostCreateFunc({
eRow: this.eBodyRow,
ePinnedLeftRow: this.ePinnedLeftRow,
ePinnedRightRow: this.ePinnedRightRow,
node: this.rowNode,
api: this.gridOptionsWrapper.getApi(),
rowIndex: this.rowIndex,
addRenderedRowListener: this.addEventListener.bind(this),
columnApi: this.gridOptionsWrapper.getColumnApi(),
context: this.gridOptionsWrapper.getContext()
});
if (this.scope) {
this.eLeftCenterAndRightRows.forEach(function (row) { return _this.$compile(row)(_this.scope); });
}
};
RenderedRow.prototype.addColumnListener = function () {
var _this = this;
var columnListener = this.onColumnChanged.bind(this);
this.mainEventService.addEventListener(events_1.Events.EVENT_COLUMN_GROUP_OPENED, columnListener);
//this.mainEventService.addEventListener(Events.EVENT_COLUMN_MOVED, columnListener);
//this.mainEventService.addEventListener(Events.EVENT_COLUMN_ROW_GROUP_CHANGE, columnListener);
//this.mainEventService.addEventListener(Events.EVENT_COLUMN_RESIZED, columnListener);
//this.mainEventService.addEventListener(Events.EVENT_COLUMN_VALUE_CHANGE, columnListener);
this.mainEventService.addEventListener(events_1.Events.EVENT_COLUMN_VISIBLE, columnListener);
this.mainEventService.addEventListener(events_1.Events.EVENT_COLUMN_PINNED, columnListener);
this.destroyFunctions.push(function () {
_this.mainEventService.removeEventListener(events_1.Events.EVENT_COLUMN_GROUP_OPENED, columnListener);
//this.mainEventService.removeEventListener(Events.EVENT_COLUMN_MOVED, columnListener);
//this.mainEventService.removeEventListener(Events.EVENT_COLUMN_ROW_GROUP_CHANGE, columnListener);
//this.mainEventService.removeEventListener(Events.EVENT_COLUMN_RESIZED, columnListener);
//this.mainEventService.removeEventListener(Events.EVENT_COLUMN_VALUE_CHANGE, columnListener);
_this.mainEventService.removeEventListener(events_1.Events.EVENT_COLUMN_VISIBLE, columnListener);
_this.mainEventService.removeEventListener(events_1.Events.EVENT_COLUMN_PINNED, columnListener);
});
};
RenderedRow.prototype.onColumnChanged = function (event) {
// if row is a group row that spans, then it's not impacted by column changes
if (this.rowIsHeaderThatSpans) {
return;
}
this.refreshCellsIntoRow();
};
RenderedRow.prototype.refreshCellsIntoRow = function () {
var _this = this;
var columns = this.columnController.getAllDisplayedColumns();
var renderedCellKeys = Object.keys(this.renderedCells);
columns.forEach(function (column) {
var renderedCell = _this.getOrCreateCell(column);
_this.ensureCellInCorrectRow(renderedCell);
renderedCell.checkPinnedClasses();
utils_1.Utils.removeFromArray(renderedCellKeys, column.getColId());
});
// remove old cells from gui, but we don't destroy them, we might use them again
renderedCellKeys.forEach(function (key) {
var renderedCell = _this.renderedCells[key];
// could be old reference, ie removed cell
if (!renderedCell) {
return;
}
if (renderedCell.getParentRow()) {
renderedCell.getParentRow().removeChild(renderedCell.getGui());
renderedCell.setParentRow(null);
}
renderedCell.destroy();
_this.renderedCells[key] = null;
});
};
RenderedRow.prototype.ensureCellInCorrectRow = function (renderedCell) {
var eRowGui = renderedCell.getGui();
var column = renderedCell.getColumn();
var rowWeWant;
switch (column.getPinned()) {
case column_1.Column.PINNED_LEFT:
rowWeWant = this.ePinnedLeftRow;
break;
case column_1.Column.PINNED_RIGHT:
rowWeWant = this.ePinnedRightRow;
break;
default:
rowWeWant = this.eBodyRow;
break;
}
// if in wrong container, remove it
var oldRow = renderedCell.getParentRow();
var inWrongRow = oldRow !== rowWeWant;
if (inWrongRow) {
// take out from old row
if (oldRow) {
oldRow.removeChild(eRowGui);
}
rowWeWant.appendChild(eRowGui);
renderedCell.setParentRow(rowWeWant);
}
};
RenderedRow.prototype.getOrCreateCell = function (column) {
var colId = column.getColId();
if (this.renderedCells[colId]) {
return this.renderedCells[colId];
}
else {
var renderedCell = new renderedCell_1.RenderedCell(column, this.cellRendererMap, this.rowNode, this.rowIndex, this.scope, this);
this.context.wireBean(renderedCell);
this.renderedCells[colId] = renderedCell;
return renderedCell;
}
};
RenderedRow.prototype.addRowSelectedListener = function () {
var _this = this;
var rowSelectedListener = function () {
var selected = _this.rowNode.isSelected();
_this.eLeftCenterAndRightRows.forEach(function (row) { return utils_1.Utils.addOrRemoveCssClass(row, 'ag-row-selected', selected); });
};
this.rowNode.addEventListener(rowNode_1.RowNode.EVENT_ROW_SELECTED, rowSelectedListener);
this.destroyFunctions.push(function () {
_this.rowNode.removeEventListener(rowNode_1.RowNode.EVENT_ROW_SELECTED, rowSelectedListener);
});
};
RenderedRow.prototype.addCellFocusedListener = function () {
var _this = this;
var rowFocusedLastTime = null;
var rowFocusedListener = function () {
var rowFocused = _this.focusedCellController.isRowFocused(_this.rowIndex, _this.rowNode.floating);
if (rowFocused !== rowFocusedLastTime) {
_this.eLeftCenterAndRightRows.forEach(function (row) { return utils_1.Utils.addOrRemoveCssClass(row, 'ag-row-focus', rowFocused); });
_this.eLeftCenterAndRightRows.forEach(function (row) { return utils_1.Utils.addOrRemoveCssClass(row, 'ag-row-no-focus', !rowFocused); });
rowFocusedLastTime = rowFocused;
}
};
this.mainEventService.addEventListener(events_1.Events.EVENT_CELL_FOCUSED, rowFocusedListener);
this.destroyFunctions.push(function () {
_this.mainEventService.removeEventListener(events_1.Events.EVENT_CELL_FOCUSED, rowFocusedListener);
});
rowFocusedListener();
};
RenderedRow.prototype.createContainers = function () {
this.eBodyRow = this.createRowContainer();
this.eLeftCenterAndRightRows = [this.eBodyRow];
if (!this.gridOptionsWrapper.isForPrint()) {
this.ePinnedLeftRow = this.createRowContainer();
this.ePinnedRightRow = this.createRowContainer();
this.eLeftCenterAndRightRows.push(this.ePinnedLeftRow);
this.eLeftCenterAndRightRows.push(this.ePinnedRightRow);
}
};
RenderedRow.prototype.attachContainers = function () {
this.eBodyContainer.appendChild(this.eBodyRow);
if (!this.gridOptionsWrapper.isForPrint()) {
this.ePinnedLeftContainer.appendChild(this.ePinnedLeftRow);
this.ePinnedRightContainer.appendChild(this.ePinnedRightRow);
}
};
RenderedRow.prototype.onMouseEvent = function (eventName, mouseEvent, eventSource, cell) {
var renderedCell = this.renderedCells[cell.column.getId()];
if (renderedCell) {
renderedCell.onMouseEvent(eventName, mouseEvent, eventSource);
}
};
RenderedRow.prototype.setTopAndHeightCss = function () {
// if showing scrolls, position on the container
if (!this.gridOptionsWrapper.isForPrint()) {
var topPx = this.rowNode.rowTop + "px";
this.eLeftCenterAndRightRows.forEach(function (row) { return row.style.top = topPx; });
}
var heightPx = this.rowNode.rowHeight + 'px';
this.eLeftCenterAndRightRows.forEach(function (row) { return row.style.height = heightPx; });
};
// adds in row and row-id attributes to the row
RenderedRow.prototype.addRowIds = function () {
var rowStr = this.rowIndex.toString();
if (this.rowNode.floating === constants_1.Constants.FLOATING_BOTTOM) {
rowStr = 'fb-' + rowStr;
}
else if (this.rowNode.floating === constants_1.Constants.FLOATING_TOP) {
rowStr = 'ft-' + rowStr;
}
this.eLeftCenterAndRightRows.forEach(function (row) { return row.setAttribute('row', rowStr); });
if (typeof this.gridOptionsWrapper.getBusinessKeyForNodeFunc() === 'function') {
var businessKey = this.gridOptionsWrapper.getBusinessKeyForNodeFunc()(this.rowNode);
if (typeof businessKey === 'string' || typeof businessKey === 'number') {
this.eLeftCenterAndRightRows.forEach(function (row) { return row.setAttribute('row-id', businessKey); });
}
}
};
RenderedRow.prototype.addEventListener = function (eventType, listener) {
if (!this.renderedRowEventService) {
this.renderedRowEventService = new eventService_1.EventService();
}
this.renderedRowEventService.addEventListener(eventType, listener);
};
RenderedRow.prototype.removeEventListener = function (eventType, listener) {
this.renderedRowEventService.removeEventListener(eventType, listener);
};
RenderedRow.prototype.softRefresh = function () {
utils_1.Utils.iterateObject(this.renderedCells, function (key, renderedCell) {
if (renderedCell && renderedCell.isVolatile()) {
renderedCell.refreshCell();
}
});
};
RenderedRow.prototype.getRenderedCellForColumn = function (column) {
return this.renderedCells[column.getColId()];
};
RenderedRow.prototype.getCellForCol = function (column) {
var renderedCell = this.renderedCells[column.getColId()];
if (renderedCell) {
return renderedCell.getGui();
}
else {
return null;
}
};
RenderedRow.prototype.destroy = function () {
this.destroyFunctions.forEach(function (func) { return func(); });
this.destroyScope();
this.eBodyContainer.removeChild(this.eBodyRow);
if (!this.gridOptionsWrapper.isForPrint()) {
this.ePinnedLeftContainer.removeChild(this.ePinnedLeftRow);
this.ePinnedRightContainer.removeChild(this.ePinnedRightRow);
}
utils_1.Utils.iterateObject(this.renderedCells, function (key, renderedCell) {
if (renderedCell) {
renderedCell.destroy();
}
});
if (this.renderedRowEventService) {
this.renderedRowEventService.dispatchEvent(RenderedRow.EVENT_RENDERED_ROW_REMOVED, { node: this.rowNode });
}
};
RenderedRow.prototype.destroyScope = function () {
if (this.scope) {
this.scope.$destroy();
this.scope = null;
}
};
RenderedRow.prototype.isDataInList = function (rows) {
return rows.indexOf(this.rowNode.data) >= 0;
};
RenderedRow.prototype.isGroup = function () {
return this.rowNode.group === true;
};
RenderedRow.prototype.createGroupRow = function () {
var eGroupRow = this.createGroupSpanningEntireRowCell(false);
if (this.pinningLeft) {
this.ePinnedLeftRow.appendChild(eGroupRow);
var eGroupRowPadding = this.createGroupSpanningEntireRowCell(true);
this.eBodyRow.appendChild(eGroupRowPadding);
}
else {
this.eBodyRow.appendChild(eGroupRow);
}
if (this.pinningRight) {
var ePinnedRightPadding = this.createGroupSpanningEntireRowCell(true);
this.ePinnedRightRow.appendChild(ePinnedRightPadding);
}
};
RenderedRow.prototype.createGroupSpanningEntireRowCell = function (padding) {
var eRow;
// padding means we are on the right hand side of a pinned table, ie
// in the main body.
if (padding) {
eRow = document.createElement('span');
}
else {
var rowCellRenderer = this.gridOptionsWrapper.getGroupRowRenderer();
if (!rowCellRenderer) {
rowCellRenderer = {
renderer: 'group',
innerRenderer: this.gridOptionsWrapper.getGroupRowInnerRenderer()
};
}
var params = {
node: this.rowNode,
data: this.rowNode.data,
rowIndex: this.rowIndex,
api: this.gridOptionsWrapper.getApi(),
colDef: {
cellRenderer: rowCellRenderer
}
};
// start duplicated code
var actualCellRenderer;
if (typeof rowCellRenderer === 'object' && rowCellRenderer !== null) {
var cellRendererObj = rowCellRenderer;
actualCellRenderer = this.cellRendererMap[cellRendererObj.renderer];
if (!actualCellRenderer) {
throw 'Cell renderer ' + rowCellRenderer + ' not found, available are ' + Object.keys(this.cellRendererMap);
}
}
else if (typeof rowCellRenderer === 'function') {
actualCellRenderer = rowCellRenderer;
}
else {
throw 'Cell Renderer must be String or Function';
}
var resultFromRenderer = actualCellRenderer(params);
// end duplicated code
if (utils_1.Utils.isNodeOrElement(resultFromRenderer)) {
// a dom node or element was returned, so add child
eRow = resultFromRenderer;
}
else {
// otherwise assume it was html, so just insert
eRow = utils_1.Utils.loadTemplate(resultFromRenderer);
}
}
if (this.rowNode.footer) {
utils_1.Utils.addCssClass(eRow, 'ag-footer-cell-entire-row');
}
else {
utils_1.Utils.addCssClass(eRow, 'ag-group-cell-entire-row');
}
return eRow;
};
RenderedRow.prototype.createChildScopeOrNull = function (data) {
if (this.gridOptionsWrapper.isAngularCompileRows()) {
var newChildScope = this.parentScope.$new();
newChildScope.data = data;
return newChildScope;
}
else {
return null;
}
};
RenderedRow.prototype.addDynamicStyles = function () {
var rowStyle = this.gridOptionsWrapper.getRowStyle();
if (rowStyle) {
if (typeof rowStyle === 'function') {
console.log('ag-Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead');
}
else {
this.eLeftCenterAndRightRows.forEach(function (row) { return utils_1.Utils.addStylesToElement(row, rowStyle); });
}
}
var rowStyleFunc = this.gridOptionsWrapper.getRowStyleFunc();
if (rowStyleFunc) {
var params = {
data: this.rowNode.data,
node: this.rowNode,
api: this.gridOptionsWrapper.getApi(),
context: this.gridOptionsWrapper.getContext(),
$scope: this.scope
};
var cssToUseFromFunc = rowStyleFunc(params);
this.eLeftCenterAndRightRows.forEach(function (row) { return utils_1.Utils.addStylesToElement(row, cssToUseFromFunc); });
}
};
RenderedRow.prototype.createParams = function () {
var params = {
node: this.rowNode,
data: this.rowNode.data,
rowIndex: this.rowIndex,
$scope: this.scope,
context: this.gridOptionsWrapper.getContext(),
api: this.gridOptionsWrapper.getApi()
};
return params;
};
RenderedRow.prototype.createEvent = function (event, eventSource) {
var agEvent = this.createParams();
agEvent.event = event;
agEvent.eventSource = eventSource;
return agEvent;
};
RenderedRow.prototype.createRowContainer = function () {
var _this = this;
var vRow = document.createElement('div');
vRow.addEventListener("click", this.onRowClicked.bind(this));
vRow.addEventListener("dblclick", function (event) {
var agEvent = _this.createEvent(event, _this);
_this.mainEventService.dispatchEvent(events_1.Events.EVENT_ROW_DOUBLE_CLICKED, agEvent);
});
return vRow;
};
RenderedRow.prototype.onRowClicked = function (event) {
var agEvent = this.createEvent(event, this);
this.mainEventService.dispatchEvent(events_1.Events.EVENT_ROW_CLICKED, agEvent);
// ctrlKey for windows, metaKey for Apple
var multiSelectKeyPressed = event.ctrlKey || event.metaKey;
// we do not allow selecting groups by clicking (as the click here expands the group)
// so return if it's a group row
if (this.rowNode.group) {
return;
}
// we also don't allow selection of floating rows
if (this.rowNode.floating) {
return;
}
// making local variables to make the below more readable
var gridOptionsWrapper = this.gridOptionsWrapper;
// if no selection method enabled, do nothing
if (!gridOptionsWrapper.isRowSelection()) {
return;
}
// if click selection suppressed, do nothing
if (gridOptionsWrapper.isSuppressRowClickSelection()) {
return;
}
if (this.rowNode.isSelected()) {
if (multiSelectKeyPressed) {
if (gridOptionsWrapper.isRowDeselection()) {
this.rowNode.setSelected(false);
}
}
else {
// selected with no multi key, must make sure anything else is unselected
this.rowNode.setSelected(true, true);
}
}
else {
this.rowNode.setSelected(true, !multiSelectKeyPressed);
}
};
RenderedRow.prototype.getRowNode = function () {
return this.rowNode;
};
RenderedRow.prototype.getRowIndex = function () {
return this.rowIndex;
};
RenderedRow.prototype.refreshCells = function (colIds) {
if (!colIds) {
return;
}
var columnsToRefresh = this.columnController.getColumns(colIds);
utils_1.Utils.iterateObject(this.renderedCells, function (key, renderedCell) {
if (!renderedCell) {
return;
}
var colForCel = renderedCell.getColumn();
if (columnsToRefresh.indexOf(colForCel) >= 0) {
renderedCell.refreshCell();
}
});
};
RenderedRow.prototype.addDynamicClasses = function () {
var _this = this;
var classes = [];
classes.push('ag-row');
classes.push('ag-row-no-focus');
classes.push(this.rowIndex % 2 == 0 ? "ag-row-even" : "ag-row-odd");
if (this.rowNode.isSelected()) {
classes.push("ag-row-selected");
}
if (this.rowNode.group) {
classes.push("ag-row-group");
// if a group, put the level of the group in
classes.push("ag-row-level-" + this.rowNode.level);
if (!this.rowNode.footer && this.rowNode.expanded) {
classes.push("ag-row-group-expanded");
}
if (!this.rowNode.footer && !this.rowNode.expanded) {
// opposite of expanded is contracted according to the internet.
classes.push("ag-row-group-contracted");
}
if (this.rowNode.footer) {
classes.push("ag-row-footer");
}
}
else {
// if a leaf, and a parent exists, put a level of the parent, else put level of 0 for top level item
if (this.rowNode.parent) {
classes.push("ag-row-level-" + (this.rowNode.parent.level + 1));
}
else {
classes.push("ag-row-level-0");
}
}
// add in extra classes provided by the config
var gridOptionsRowClass = this.gridOptionsWrapper.getRowClass();
if (gridOptionsRowClass) {
if (typeof gridOptionsRowClass === 'function') {
console.warn('ag-Grid: rowClass should not be a function, please use getRowClass instead');
}
else {
if (typeof gridOptionsRowClass === 'string') {
classes.push(gridOptionsRowClass);
}
else if (Array.isArray(gridOptionsRowClass)) {
gridOptionsRowClass.forEach(function (classItem) {
classes.push(classItem);
});
}
}
}
var gridOptionsRowClassFunc = this.gridOptionsWrapper.getRowClassFunc();
if (gridOptionsRowClassFunc) {
var params = {
node: this.rowNode,
data: this.rowNode.data,
rowIndex: this.rowIndex,
context: this.gridOptionsWrapper.getContext(),
api: this.gridOptionsWrapper.getApi()
};
var classToUseFromFunc = gridOptionsRowClassFunc(params);
if (classToUseFromFunc) {
if (typeof classToUseFromFunc === 'string') {
classes.push(classToUseFromFunc);
}
else if (Array.isArray(classToUseFromFunc)) {
classToUseFromFunc.forEach(function (classItem) {
classes.push(classItem);
});
}
}
}
classes.forEach(function (classStr) {
_this.eLeftCenterAndRightRows.forEach(function (row) { return utils_1.Utils.addCssClass(row, classStr); });
});
};
RenderedRow.EVENT_RENDERED_ROW_REMOVED = 'renderedRowRemoved';
__decorate([
context_2.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], RenderedRow.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_2.Autowired('columnController'),
__metadata('design:type', columnController_1.ColumnController)
], RenderedRow.prototype, "columnController", void 0);
__decorate([
context_2.Autowired('$compile'),
__metadata('design:type', Object)
], RenderedRow.prototype, "$compile", void 0);
__decorate([
context_2.Autowired('eventService'),
__metadata('design:type', eventService_1.EventService)
], RenderedRow.prototype, "mainEventService", void 0);
__decorate([
context_2.Autowired('context'),
__metadata('design:type', context_1.Context)
], RenderedRow.prototype, "context", void 0);
__decorate([
context_2.Autowired('focusedCellController'),
__metadata('design:type', focusedCellController_1.FocusedCellController)
], RenderedRow.prototype, "focusedCellController", void 0);
__decorate([
context_3.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], RenderedRow.prototype, "init", null);
return RenderedRow;
})();
exports.RenderedRow = RenderedRow;
/***/ },
/* 21 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var utils_1 = __webpack_require__(7);
var column_1 = __webpack_require__(15);
var gridOptionsWrapper_1 = __webpack_require__(3);
var expressionService_1 = __webpack_require__(22);
var selectionRendererFactory_1 = __webpack_require__(18);
var rowRenderer_1 = __webpack_require__(23);
var templateService_1 = __webpack_require__(33);
var columnController_1 = __webpack_require__(13);
var valueService_1 = __webpack_require__(34);
var eventService_1 = __webpack_require__(4);
var constants_1 = __webpack_require__(8);
var events_1 = __webpack_require__(10);
var context_1 = __webpack_require__(6);
var columnController_2 = __webpack_require__(13);
var gridApi_1 = __webpack_require__(11);
var context_2 = __webpack_require__(6);
var focusedCellController_1 = __webpack_require__(44);
var context_3 = __webpack_require__(6);
var gridCell_1 = __webpack_require__(31);
var RenderedCell = (function () {
function RenderedCell(column, cellRendererMap, node, rowIndex, scope, renderedRow) {
this.destroyMethods = [];
this.firstRightPinned = false;
this.lastLeftPinned = false;
this.column = column;
this.cellRendererMap = cellRendererMap;
this.node = node;
this.rowIndex = rowIndex;
this.scope = scope;
this.renderedRow = renderedRow;
}
RenderedCell.prototype.checkPinnedClasses = function () {
};
RenderedCell.prototype.setPinnedClasses = function () {
var _this = this;
var firstPinnedChangedListener = function () {
if (_this.firstRightPinned !== _this.column.isFirstRightPinned()) {
_this.firstRightPinned = _this.column.isFirstRightPinned();
utils_1.Utils.addOrRemoveCssClass(_this.eGridCell, 'ag-cell-first-right-pinned', _this.firstRightPinned);
}
if (_this.lastLeftPinned !== _this.column.isLastLeftPinned()) {
_this.lastLeftPinned = _this.column.isLastLeftPinned();
utils_1.Utils.addOrRemoveCssClass(_this.eGridCell, 'ag-cell-last-left-pinned', _this.lastLeftPinned);
}
};
this.column.addEventListener(column_1.Column.EVENT_FIRST_RIGHT_PINNED_CHANGED, firstPinnedChangedListener);
this.column.addEventListener(column_1.Column.EVENT_LAST_LEFT_PINNED_CHANGED, firstPinnedChangedListener);
this.destroyMethods.push(function () {
_this.column.removeEventListener(column_1.Column.EVENT_FIRST_RIGHT_PINNED_CHANGED, firstPinnedChangedListener);
_this.column.removeEventListener(column_1.Column.EVENT_LAST_LEFT_PINNED_CHANGED, firstPinnedChangedListener);
});
firstPinnedChangedListener();
};
RenderedCell.prototype.getParentRow = function () {
return this.eParentRow;
};
RenderedCell.prototype.setParentRow = function (eParentRow) {
this.eParentRow = eParentRow;
};
RenderedCell.prototype.init = function () {
this.data = this.getDataForRow();
this.value = this.getValue();
this.checkboxSelection = this.calculateCheckboxSelection();
this.setupComponents();
};
RenderedCell.prototype.destroy = function () {
this.destroyMethods.forEach(function (theFunction) {
theFunction();
});
};
RenderedCell.prototype.calculateCheckboxSelection = function () {
// never allow selection on floating rows
if (this.node.floating) {
return false;
}
// if boolean set, then just use it
var colDef = this.column.getColDef();
if (typeof colDef.checkboxSelection === 'boolean') {
return colDef.checkboxSelection;
}
// if function, then call the function to find out. we first check colDef for
// a function, and if missing then check gridOptions, so colDef has precedence
var selectionFunc;
if (typeof colDef.checkboxSelection === 'function') {
selectionFunc = colDef.checkboxSelection;
}
if (!selectionFunc && this.gridOptionsWrapper.getCheckboxSelection()) {
selectionFunc = this.gridOptionsWrapper.getCheckboxSelection();
}
if (selectionFunc) {
var params = this.createParams();
return selectionFunc(params);
}
return false;
};
RenderedCell.prototype.getColumn = function () {
return this.column;
};
RenderedCell.prototype.getValue = function () {
return this.valueService.getValueUsingSpecificData(this.column, this.data, this.node);
};
RenderedCell.prototype.getGui = function () {
return this.eGridCell;
};
RenderedCell.prototype.getDataForRow = function () {
if (this.node.footer) {
// if footer, we always show the data
return this.node.data;
}
else if (this.node.group) {
// if header and header is expanded, we show data in footer only
var footersEnabled = this.gridOptionsWrapper.isGroupIncludeFooter();
var suppressHideHeader = this.gridOptionsWrapper.isGroupSuppressBlankHeader();
if (this.node.expanded && footersEnabled && !suppressHideHeader) {
return undefined;
}
else {
return this.node.data;
}
}
else {
// otherwise it's a normal node, just return data as normal
return this.node.data;
}
};
RenderedCell.prototype.setLeftOnCell = function () {
var _this = this;
var leftChangedListener = function () {
var newLeft = _this.column.getLeft();
if (utils_1.Utils.exists(newLeft)) {
_this.eGridCell.style.left = _this.column.getLeft() + 'px';
}
else {
_this.eGridCell.style.left = '';
}
};
this.column.addEventListener(column_1.Column.EVENT_LEFT_CHANGED, leftChangedListener);
this.destroyMethods.push(function () {
_this.column.removeEventListener(column_1.Column.EVENT_LEFT_CHANGED, leftChangedListener);
});
leftChangedListener();
};
RenderedCell.prototype.addRangeSelectedListener = function () {
var _this = this;
if (!this.rangeController) {
return;
}
var rangeCountLastTime = 0;
var rangeSelectedListener = function () {
var rangeCount = _this.rangeController.getCellRangeCount(new gridCell_1.GridCell(_this.rowIndex, _this.node.floating, _this.column));
if (rangeCountLastTime !== rangeCount) {
utils_1.Utils.addOrRemoveCssClass(_this.eGridCell, 'ag-cell-range-selected', rangeCount !== 0);
utils_1.Utils.addOrRemoveCssClass(_this.eGridCell, 'ag-cell-range-selected-1', rangeCount === 1);
utils_1.Utils.addOrRemoveCssClass(_this.eGridCell, 'ag-cell-range-selected-2', rangeCount === 2);
utils_1.Utils.addOrRemoveCssClass(_this.eGridCell, 'ag-cell-range-selected-3', rangeCount === 3);
utils_1.Utils.addOrRemoveCssClass(_this.eGridCell, 'ag-cell-range-selected-4', rangeCount >= 4);
rangeCountLastTime = rangeCount;
}
};
this.eventService.addEventListener(events_1.Events.EVENT_RANGE_SELECTION_CHANGED, rangeSelectedListener);
this.destroyMethods.push(function () {
_this.eventService.removeEventListener(events_1.Events.EVENT_RANGE_SELECTION_CHANGED, rangeSelectedListener);
});
rangeSelectedListener();
};
RenderedCell.prototype.addHighlightListener = function () {
var _this = this;
if (!this.rangeController) {
return;
}
var clipboardListener = function (event) {
utils_1.Utils.removeCssClass(_this.eGridCell, 'ag-cell-highlight');
utils_1.Utils.removeCssClass(_this.eGridCell, 'ag-cell-highlight-animation');
var cellId = new gridCell_1.GridCell(_this.rowIndex, _this.node.floating, _this.column).createId();
var shouldFlash = event.cells[cellId];
if (shouldFlash) {
_this.flashCellForClipboardInteraction();
}
};
this.eventService.addEventListener(events_1.Events.EVENT_FLASH_CELLS, clipboardListener);
this.destroyMethods.push(function () {
_this.eventService.removeEventListener(events_1.Events.EVENT_FLASH_CELLS, clipboardListener);
});
};
RenderedCell.prototype.flashCellForClipboardInteraction = function () {
var _this = this;
// so tempted to not put a comment here!!!! but because i'm going to release and enterprise version,
// i think maybe i should do.... first thing, we do this in a timeout, to make sure the previous
// CSS is cleared, that's the css removal in addClipboardListener() method
setTimeout(function () {
// once css is cleared, we want to highlight the cells, without any animation
utils_1.Utils.addCssClass(_this.eGridCell, 'ag-cell-highlight');
setTimeout(function () {
// then once that is applied, we remove the highlight with animation
utils_1.Utils.removeCssClass(_this.eGridCell, 'ag-cell-highlight');
utils_1.Utils.addCssClass(_this.eGridCell, 'ag-cell-highlight-animation');
setTimeout(function () {
// and then to leave things as we got them, we remove the animation
utils_1.Utils.removeCssClass(_this.eGridCell, 'ag-cell-highlight-animation');
}, 1000);
}, 500);
}, 0);
};
RenderedCell.prototype.addCellFocusedListener = function () {
var _this = this;
// set to null, not false, as we need to set 'ag-cell-no-focus' first time around
var cellFocusedLastTime = null;
var cellFocusedListener = function (event) {
var cellFocused = _this.focusedCellController.isCellFocused(_this.rowIndex, _this.column, _this.node.floating);
if (cellFocused !== cellFocusedLastTime) {
utils_1.Utils.addOrRemoveCssClass(_this.eGridCell, 'ag-cell-focus', cellFocused);
utils_1.Utils.addOrRemoveCssClass(_this.eGridCell, 'ag-cell-no-focus', !cellFocused);
cellFocusedLastTime = cellFocused;
}
if (cellFocused && event && event.forceBrowserFocus) {
_this.eGridCell.focus();
}
};
this.eventService.addEventListener(events_1.Events.EVENT_CELL_FOCUSED, cellFocusedListener);
this.destroyMethods.push(function () {
_this.eventService.removeEventListener(events_1.Events.EVENT_CELL_FOCUSED, cellFocusedListener);
});
cellFocusedListener();
};
RenderedCell.prototype.setWidthOnCell = function () {
var _this = this;
var widthChangedListener = function () {
_this.eGridCell.style.width = _this.column.getActualWidth() + "px";
};
this.column.addEventListener(column_1.Column.EVENT_WIDTH_CHANGED, widthChangedListener);
this.destroyMethods.push(function () {
_this.column.removeEventListener(column_1.Column.EVENT_WIDTH_CHANGED, widthChangedListener);
});
widthChangedListener();
};
RenderedCell.prototype.setupComponents = function () {
this.eGridCell = document.createElement('div');
this.setLeftOnCell();
this.setWidthOnCell();
this.setPinnedClasses();
this.addRangeSelectedListener();
this.addHighlightListener();
this.addCellFocusedListener();
// only set tab index if cell selection is enabled
if (!this.gridOptionsWrapper.isSuppressCellSelection()) {
this.eGridCell.setAttribute("tabindex", "-1");
}
// these are the grid styles, don't change between soft refreshes
this.addClasses();
this.addCellNavigationHandler();
this.createParentOfValue();
this.populateCell();
};
// called by rowRenderer when user navigates via tab key
RenderedCell.prototype.startEditing = function (key) {
var _this = this;
var that = this;
this.editingCell = true;
utils_1.Utils.removeAllChildren(this.eGridCell);
var eInput = document.createElement('input');
eInput.type = 'text';
utils_1.Utils.addCssClass(eInput, 'ag-cell-edit-input');
var startWithOldValue = key !== constants_1.Constants.KEY_BACKSPACE && key !== constants_1.Constants.KEY_DELETE;
var value = this.getValue();
if (startWithOldValue && value !== null && value !== undefined) {
eInput.value = value;
}
eInput.style.width = (this.column.getActualWidth() - 14) + 'px';
this.eGridCell.appendChild(eInput);
eInput.focus();
eInput.select();
var blurListener = function () {
that.stopEditing(eInput, blurListener);
};
//stop entering if we loose focus
eInput.addEventListener("blur", blurListener);
//stop editing if enter pressed
eInput.addEventListener('keypress', function (event) {
var key = event.which || event.keyCode;
if (key === constants_1.Constants.KEY_ENTER) {
_this.stopEditing(eInput, blurListener);
_this.focusCell(true);
}
});
//stop editing if enter pressed
eInput.addEventListener('keydown', function (event) {
var key = event.which || event.keyCode;
if (key === constants_1.Constants.KEY_ESCAPE) {
_this.stopEditing(eInput, blurListener, true);
_this.focusCell(true);
}
});
// tab key doesn't generate keypress, so need keydown to listen for that
eInput.addEventListener('keydown', function (event) {
var key = event.which || event.keyCode;
if (key == constants_1.Constants.KEY_TAB) {
that.stopEditing(eInput, blurListener);
that.rowRenderer.startEditingNextCell(that.rowIndex, that.column, that.node.floating, event.shiftKey);
// we don't want the default tab action, so return false, this stops the event from bubbling
event.preventDefault();
return false;
}
});
};
RenderedCell.prototype.focusCell = function (forceBrowserFocus) {
this.focusedCellController.setFocusedCell(this.rowIndex, this.column, this.node.floating, forceBrowserFocus);
};
RenderedCell.prototype.stopEditing = function (eInput, blurListener, reset) {
if (reset === void 0) { reset = false; }
this.editingCell = false;
var newValue = eInput.value;
//If we don't remove the blur listener first, we get:
//Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is no longer a child of this node. Perhaps it was moved in a 'blur' event handler?
eInput.removeEventListener('blur', blurListener);
if (!reset) {
this.valueService.setValue(this.node, this.column, newValue);
this.value = this.getValue();
}
utils_1.Utils.removeAllChildren(this.eGridCell);
if (this.checkboxSelection) {
this.eGridCell.appendChild(this.eCellWrapper);
}
this.refreshCell();
};
RenderedCell.prototype.createParams = function () {
var params = {
node: this.node,
data: this.node.data,
value: this.value,
rowIndex: this.rowIndex,
colDef: this.column.getColDef(),
$scope: this.scope,
context: this.gridOptionsWrapper.getContext(),
api: this.gridApi,
columnApi: this.columnApi
};
return params;
};
RenderedCell.prototype.createEvent = function (event, eventSource) {
var agEvent = this.createParams();
agEvent.event = event;
//agEvent.eventSource = eventSource;
return agEvent;
};
RenderedCell.prototype.isCellEditable = function () {
if (this.editingCell) {
return false;
}
// never allow editing of groups
if (this.node.group) {
return false;
}
return this.column.isCellEditable(this.node);
};
RenderedCell.prototype.onMouseEvent = function (eventName, mouseEvent, eventSource) {
switch (eventName) {
case 'click':
this.onCellClicked(mouseEvent);
break;
case 'mousedown':
this.onMouseDown();
break;
case 'dblclick':
this.onCellDoubleClicked(mouseEvent, eventSource);
break;
case 'contextmenu':
this.onContextMenu(mouseEvent);
break;
}
};
RenderedCell.prototype.onContextMenu = function (mouseEvent) {
// to allow us to debug in chrome, we ignore the event if ctrl is pressed,
// thus the normal menu is displayed
if (mouseEvent.ctrlKey || mouseEvent.metaKey) {
return;
}
var colDef = this.column.getColDef();
var agEvent = this.createEvent(mouseEvent);
this.eventService.dispatchEvent(events_1.Events.EVENT_CELL_CONTEXT_MENU, agEvent);
if (colDef.onCellContextMenu) {
colDef.onCellContextMenu(agEvent);
}
if (this.contextMenuFactory && !this.gridOptionsWrapper.isSuppressContextMenu()) {
this.contextMenuFactory.showMenu(this.node, this.column, this.value, mouseEvent);
console.log('preventing default');
mouseEvent.preventDefault();
}
};
RenderedCell.prototype.onCellDoubleClicked = function (mouseEvent, eventSource) {
var colDef = this.column.getColDef();
// always dispatch event to eventService
var agEvent = this.createEvent(mouseEvent, eventSource);
this.eventService.dispatchEvent(events_1.Events.EVENT_CELL_DOUBLE_CLICKED, agEvent);
// check if colDef also wants to handle event
if (typeof colDef.onCellDoubleClicked === 'function') {
colDef.onCellDoubleClicked(agEvent);
}
if (!this.gridOptionsWrapper.isSingleClickEdit() && this.isCellEditable()) {
this.startEditing();
}
};
RenderedCell.prototype.onMouseDown = function () {
// we pass false to focusCell, as we don't want the cell to focus
// also get the browser focus. if we did, then the cellRenderer could
// have a text field in it, for example, and as the user clicks on the
// text field, the text field, the focus doesn't get to the text
// field, instead to goes to the div behind, making it impossible to
// select the text field.
this.focusCell(false);
// if it's a right click, then if the cell is already in range,
// don't change the range, however if the cell is not in a range,
// we set a new range
if (this.rangeController) {
var thisCell = new gridCell_1.GridCell(this.rowIndex, this.node.floating, this.column);
var cellAlreadyInRange = this.rangeController.isCellInAnyRange(thisCell);
if (!cellAlreadyInRange) {
this.rangeController.setRangeToCell(thisCell);
}
}
};
RenderedCell.prototype.onCellClicked = function (mouseEvent) {
var agEvent = this.createEvent(mouseEvent, this);
this.eventService.dispatchEvent(events_1.Events.EVENT_CELL_CLICKED, agEvent);
var colDef = this.column.getColDef();
if (colDef.onCellClicked) {
colDef.onCellClicked(agEvent);
}
if (this.gridOptionsWrapper.isSingleClickEdit() && this.isCellEditable()) {
this.startEditing();
}
};
RenderedCell.prototype.populateCell = function () {
// populate
this.putDataIntoCell();
// style
this.addStylesFromCollDef();
this.addClassesFromCollDef();
this.addClassesFromRules();
};
RenderedCell.prototype.addStylesFromCollDef = function () {
var colDef = this.column.getColDef();
if (colDef.cellStyle) {
var cssToUse;
if (typeof colDef.cellStyle === 'function') {
var cellStyleParams = {
value: this.value,
data: this.node.data,
node: this.node,
colDef: colDef,
column: this.column,
$scope: this.scope,
context: this.gridOptionsWrapper.getContext(),
api: this.gridOptionsWrapper.getApi()
};
var cellStyleFunc = colDef.cellStyle;
cssToUse = cellStyleFunc(cellStyleParams);
}
else {
cssToUse = colDef.cellStyle;
}
if (cssToUse) {
utils_1.Utils.addStylesToElement(this.eGridCell, cssToUse);
}
}
};
RenderedCell.prototype.addClassesFromCollDef = function () {
var _this = this;
var colDef = this.column.getColDef();
if (colDef.cellClass) {
var classToUse;
if (typeof colDef.cellClass === 'function') {
var cellClassParams = {
value: this.value,
data: this.node.data,
node: this.node,
colDef: colDef,
$scope: this.scope,
context: this.gridOptionsWrapper.getContext(),
api: this.gridOptionsWrapper.getApi()
};
var cellClassFunc = colDef.cellClass;
classToUse = cellClassFunc(cellClassParams);
}
else {
classToUse = colDef.cellClass;
}
if (typeof classToUse === 'string') {
utils_1.Utils.addCssClass(this.eGridCell, classToUse);
}
else if (Array.isArray(classToUse)) {
classToUse.forEach(function (cssClassItem) {
utils_1.Utils.addCssClass(_this.eGridCell, cssClassItem);
});
}
}
};
RenderedCell.prototype.addClassesFromRules = function () {
var colDef = this.column.getColDef();
var classRules = colDef.cellClassRules;
if (typeof classRules === 'object' && classRules !== null) {
var params = {
value: this.value,
data: this.node.data,
node: this.node,
colDef: colDef,
rowIndex: this.rowIndex,
api: this.gridOptionsWrapper.getApi(),
context: this.gridOptionsWrapper.getContext()
};
var classNames = Object.keys(classRules);
for (var i = 0; i < classNames.length; i++) {
var className = classNames[i];
var rule = classRules[className];
var resultOfRule;
if (typeof rule === 'string') {
resultOfRule = this.expressionService.evaluate(rule, params);
}
else if (typeof rule === 'function') {
resultOfRule = rule(params);
}
if (resultOfRule) {
utils_1.Utils.addCssClass(this.eGridCell, className);
}
else {
utils_1.Utils.removeCssClass(this.eGridCell, className);
}
}
}
};
// rename this to 'add key event listener
RenderedCell.prototype.addCellNavigationHandler = function () {
var _this = this;
this.eGridCell.addEventListener('keydown', function (event) {
if (_this.editingCell) {
return;
}
// only interested on key presses that are directly on this element, not any children elements. this
// stops navigation if the user is in, for example, a text field inside the cell, and user hits
// on of the keys we are looking for.
if (event.target !== _this.eGridCell) {
return;
}
var key = event.which || event.keyCode;
var startNavigation = key === constants_1.Constants.KEY_DOWN || key === constants_1.Constants.KEY_UP
|| key === constants_1.Constants.KEY_LEFT || key === constants_1.Constants.KEY_RIGHT;
if (startNavigation) {
event.preventDefault();
_this.rowRenderer.navigateToNextCell(key, _this.rowIndex, _this.column, _this.node.floating);
return;
}
var startEdit = _this.isKeycodeForStartEditing(key);
if (startEdit && _this.isCellEditable()) {
_this.startEditing(key);
// if we don't prevent default, then the editor that get displayed also picks up the 'enter key'
// press, and stops editing immediately, hence giving he user experience that nothing happened
event.preventDefault();
return;
}
var selectRow = key === constants_1.Constants.KEY_SPACE;
if (selectRow && _this.gridOptionsWrapper.isRowSelection()) {
var selected = _this.node.isSelected();
if (selected) {
_this.node.setSelected(false);
}
else {
_this.node.setSelected(true);
}
event.preventDefault();
return;
}
});
};
RenderedCell.prototype.isKeycodeForStartEditing = function (key) {
return key === constants_1.Constants.KEY_ENTER || key === constants_1.Constants.KEY_BACKSPACE || key === constants_1.Constants.KEY_DELETE;
};
RenderedCell.prototype.createParentOfValue = function () {
if (this.checkboxSelection) {
this.eCellWrapper = document.createElement('span');
utils_1.Utils.addCssClass(this.eCellWrapper, 'ag-cell-wrapper');
this.eGridCell.appendChild(this.eCellWrapper);
//this.createSelectionCheckbox();
this.eCheckbox = this.selectionRendererFactory.createSelectionCheckbox(this.node, this.rowIndex, this.renderedRow.addEventListener.bind(this.renderedRow));
this.eCellWrapper.appendChild(this.eCheckbox);
// eventually we call eSpanWithValue.innerHTML = xxx, so cannot include the checkbox (above) in this span
this.eSpanWithValue = document.createElement('span');
utils_1.Utils.addCssClass(this.eSpanWithValue, 'ag-cell-value');
this.eCellWrapper.appendChild(this.eSpanWithValue);
this.eParentOfValue = this.eSpanWithValue;
}
else {
utils_1.Utils.addCssClass(this.eGridCell, 'ag-cell-value');
this.eParentOfValue = this.eGridCell;
}
};
RenderedCell.prototype.isVolatile = function () {
return this.column.getColDef().volatile;
};
RenderedCell.prototype.refreshCell = function () {
utils_1.Utils.removeAllChildren(this.eParentOfValue);
this.value = this.getValue();
this.populateCell();
// if angular compiling, then need to also compile the cell again (angular compiling sucks, please wait...)
if (this.gridOptionsWrapper.isAngularCompileRows()) {
this.$compile(this.eGridCell)(this.scope);
}
};
RenderedCell.prototype.putDataIntoCell = function () {
// template gets preference, then cellRenderer, then do it ourselves
var colDef = this.column.getColDef();
if (colDef.template) {
this.eParentOfValue.innerHTML = colDef.template;
}
else if (colDef.templateUrl) {
var template = this.templateService.getTemplate(colDef.templateUrl, this.refreshCell.bind(this, true));
if (template) {
this.eParentOfValue.innerHTML = template;
}
}
else if (colDef.floatingCellRenderer && this.node.floating) {
this.useCellRenderer(colDef.floatingCellRenderer);
}
else if (colDef.cellRenderer) {
this.useCellRenderer(colDef.cellRenderer);
}
else {
// if we insert undefined, then it displays as the string 'undefined', ugly!
if (this.value !== undefined && this.value !== null && this.value !== '') {
this.eParentOfValue.innerHTML = this.value.toString();
}
}
};
RenderedCell.prototype.useCellRenderer = function (cellRenderer) {
var colDef = this.column.getColDef();
var rendererParams = {
value: this.value,
valueGetter: this.getValue,
data: this.node.data,
node: this.node,
colDef: colDef,
column: this.column,
$scope: this.scope,
rowIndex: this.rowIndex,
api: this.gridOptionsWrapper.getApi(),
context: this.gridOptionsWrapper.getContext(),
refreshCell: this.refreshCell.bind(this),
eGridCell: this.eGridCell,
eParentOfValue: this.eParentOfValue,
addRenderedRowListener: this.renderedRow.addEventListener.bind(this.renderedRow)
};
// start duplicated code
var actualCellRenderer;
if (typeof cellRenderer === 'object' && cellRenderer !== null) {
var cellRendererObj = cellRenderer;
actualCellRenderer = this.cellRendererMap[cellRendererObj.renderer];
if (!actualCellRenderer) {
throw 'Cell renderer ' + cellRenderer + ' not found, available are ' + Object.keys(this.cellRendererMap);
}
}
else if (typeof cellRenderer === 'function') {
actualCellRenderer = cellRenderer;
}
else {
throw 'Cell Renderer must be String or Function';
}
var resultFromRenderer = actualCellRenderer(rendererParams);
// end duplicated code
if (resultFromRenderer === null || resultFromRenderer === '') {
return;
}
if (utils_1.Utils.isNodeOrElement(resultFromRenderer)) {
// a dom node or element was returned, so add child
this.eParentOfValue.appendChild(resultFromRenderer);
}
else {
// otherwise assume it was html, so just insert
this.eParentOfValue.innerHTML = resultFromRenderer;
}
};
RenderedCell.prototype.addClasses = function () {
utils_1.Utils.addCssClass(this.eGridCell, 'ag-cell');
this.eGridCell.setAttribute("colId", this.column.getColId());
if (this.node.group && this.node.footer) {
utils_1.Utils.addCssClass(this.eGridCell, 'ag-footer-cell');
}
if (this.node.group && !this.node.footer) {
utils_1.Utils.addCssClass(this.eGridCell, 'ag-group-cell');
}
};
__decorate([
context_1.Autowired('columnApi'),
__metadata('design:type', columnController_2.ColumnApi)
], RenderedCell.prototype, "columnApi", void 0);
__decorate([
context_1.Autowired('gridApi'),
__metadata('design:type', gridApi_1.GridApi)
], RenderedCell.prototype, "gridApi", void 0);
__decorate([
context_1.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], RenderedCell.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_1.Autowired('expressionService'),
__metadata('design:type', expressionService_1.ExpressionService)
], RenderedCell.prototype, "expressionService", void 0);
__decorate([
context_1.Autowired('selectionRendererFactory'),
__metadata('design:type', selectionRendererFactory_1.SelectionRendererFactory)
], RenderedCell.prototype, "selectionRendererFactory", void 0);
__decorate([
context_1.Autowired('rowRenderer'),
__metadata('design:type', rowRenderer_1.RowRenderer)
], RenderedCell.prototype, "rowRenderer", void 0);
__decorate([
context_1.Autowired('$compile'),
__metadata('design:type', Object)
], RenderedCell.prototype, "$compile", void 0);
__decorate([
context_1.Autowired('templateService'),
__metadata('design:type', templateService_1.TemplateService)
], RenderedCell.prototype, "templateService", void 0);
__decorate([
context_1.Autowired('valueService'),
__metadata('design:type', valueService_1.ValueService)
], RenderedCell.prototype, "valueService", void 0);
__decorate([
context_1.Autowired('eventService'),
__metadata('design:type', eventService_1.EventService)
], RenderedCell.prototype, "eventService", void 0);
__decorate([
context_1.Autowired('columnController'),
__metadata('design:type', columnController_1.ColumnController)
], RenderedCell.prototype, "columnController", void 0);
__decorate([
context_3.Optional('rangeController'),
__metadata('design:type', Object)
], RenderedCell.prototype, "rangeController", void 0);
__decorate([
context_1.Autowired('focusedCellController'),
__metadata('design:type', focusedCellController_1.FocusedCellController)
], RenderedCell.prototype, "focusedCellController", void 0);
__decorate([
context_3.Optional('contextMenuFactory'),
__metadata('design:type', Object)
], RenderedCell.prototype, "contextMenuFactory", void 0);
__decorate([
context_2.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], RenderedCell.prototype, "init", null);
return RenderedCell;
})();
exports.RenderedCell = RenderedCell;
/***/ },
/* 22 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var logger_1 = __webpack_require__(5);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var ExpressionService = (function () {
function ExpressionService() {
this.expressionToFunctionCache = {};
}
ExpressionService.prototype.agWire = function (loggerFactory) {
this.logger = loggerFactory.create('ExpressionService');
};
ExpressionService.prototype.evaluate = function (expression, params) {
try {
var javaScriptFunction = this.createExpressionFunction(expression);
var result = javaScriptFunction(params.value, params.context, params.node, params.data, params.colDef, params.rowIndex, params.api, params.getValue);
return result;
}
catch (e) {
// the expression failed, which can happen, as it's the client that
// provides the expression. so print a nice message
this.logger.log('Processing of the expression failed');
this.logger.log('Expression = ' + expression);
this.logger.log('Exception = ' + e);
return null;
}
};
ExpressionService.prototype.createExpressionFunction = function (expression) {
// check cache first
if (this.expressionToFunctionCache[expression]) {
return this.expressionToFunctionCache[expression];
}
// if not found in cache, return the function
var functionBody = this.createFunctionBody(expression);
var theFunction = new Function('x, ctx, node, data, colDef, rowIndex, api, getValue', functionBody);
// store in cache
this.expressionToFunctionCache[expression] = theFunction;
return theFunction;
};
ExpressionService.prototype.createFunctionBody = function (expression) {
// if the expression has the 'return' word in it, then use as is,
// if not, then wrap it with return and ';' to make a function
if (expression.indexOf('return') >= 0) {
return expression;
}
else {
return 'return ' + expression + ';';
}
};
__decorate([
__param(0, context_2.Qualifier('loggerFactory')),
__metadata('design:type', Function),
__metadata('design:paramtypes', [logger_1.LoggerFactory]),
__metadata('design:returntype', void 0)
], ExpressionService.prototype, "agWire", null);
ExpressionService = __decorate([
context_1.Bean('expressionService'),
__metadata('design:paramtypes', [])
], ExpressionService);
return ExpressionService;
})();
exports.ExpressionService = ExpressionService;
/***/ },
/* 23 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var utils_1 = __webpack_require__(7);
var gridOptionsWrapper_1 = __webpack_require__(3);
var selectionRendererFactory_1 = __webpack_require__(18);
var gridPanel_1 = __webpack_require__(24);
var expressionService_1 = __webpack_require__(22);
var templateService_1 = __webpack_require__(33);
var valueService_1 = __webpack_require__(34);
var eventService_1 = __webpack_require__(4);
var floatingRowModel_1 = __webpack_require__(26);
var renderedRow_1 = __webpack_require__(20);
var groupCellRendererFactory_1 = __webpack_require__(35);
var events_1 = __webpack_require__(10);
var constants_1 = __webpack_require__(8);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var gridCore_1 = __webpack_require__(37);
var columnController_1 = __webpack_require__(13);
var context_3 = __webpack_require__(6);
var context_4 = __webpack_require__(6);
var logger_1 = __webpack_require__(5);
var context_5 = __webpack_require__(6);
var focusedCellController_1 = __webpack_require__(44);
var context_6 = __webpack_require__(6);
var cellNavigationService_1 = __webpack_require__(46);
var gridCell_1 = __webpack_require__(31);
var RowRenderer = (function () {
function RowRenderer() {
// map of row ids to row objects. keeps track of which elements
// are rendered for which rows in the dom.
this.renderedRows = {};
this.renderedTopFloatingRows = [];
this.renderedBottomFloatingRows = [];
}
RowRenderer.prototype.agWire = function (loggerFactory) {
this.logger = this.loggerFactory.create('RowRenderer');
this.logger = loggerFactory.create('BalancedColumnTreeBuilder');
};
RowRenderer.prototype.init = function () {
this.cellRendererMap = {
'group': groupCellRendererFactory_1.groupCellRendererFactory(this.gridOptionsWrapper, this.selectionRendererFactory, this.expressionService, this.eventService),
'default': function (params) {
return params.value;
}
};
this.getContainersFromGridPanel();
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_GROUP_OPENED, this.onColumnEvent.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_VISIBLE, this.onColumnEvent.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_RESIZED, this.onColumnEvent.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_PINNED, this.onColumnEvent.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGE, this.onColumnEvent.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_MODEL_UPDATED, this.refreshView.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_FLOATING_ROW_DATA_CHANGED, this.refreshView.bind(this, null));
//this.eventService.addEventListener(Events.EVENT_COLUMN_VALUE_CHANGE, this.refreshView.bind(this, null));
//this.eventService.addEventListener(Events.EVENT_COLUMN_EVERYTHING_CHANGED, this.refreshView.bind(this, null));
//this.eventService.addEventListener(Events.EVENT_COLUMN_ROW_GROUP_CHANGE, this.refreshView.bind(this, null));
this.refreshView();
};
RowRenderer.prototype.onColumnEvent = function (event) {
if (event.isContainerWidthImpacted()) {
this.setMainRowWidths();
}
};
RowRenderer.prototype.getContainersFromGridPanel = function () {
this.eBodyContainer = this.gridPanel.getBodyContainer();
this.ePinnedLeftColsContainer = this.gridPanel.getPinnedLeftColsContainer();
this.ePinnedRightColsContainer = this.gridPanel.getPinnedRightColsContainer();
this.eFloatingTopContainer = this.gridPanel.getFloatingTopContainer();
this.eFloatingTopPinnedLeftContainer = this.gridPanel.getPinnedLeftFloatingTop();
this.eFloatingTopPinnedRightContainer = this.gridPanel.getPinnedRightFloatingTop();
this.eFloatingBottomContainer = this.gridPanel.getFloatingBottomContainer();
this.eFloatingBottomPinnedLeftContainer = this.gridPanel.getPinnedLeftFloatingBottom();
this.eFloatingBottomPinnedRightContainer = this.gridPanel.getPinnedRightFloatingBottom();
this.eBodyViewport = this.gridPanel.getBodyViewport();
this.eAllBodyContainers = [this.eBodyContainer, this.eFloatingBottomContainer,
this.eFloatingTopContainer];
this.eAllPinnedLeftContainers = [
this.ePinnedLeftColsContainer,
this.eFloatingBottomPinnedLeftContainer,
this.eFloatingTopPinnedLeftContainer];
this.eAllPinnedRightContainers = [
this.ePinnedRightColsContainer,
this.eFloatingBottomPinnedRightContainer,
this.eFloatingTopPinnedRightContainer];
};
RowRenderer.prototype.setRowModel = function (rowModel) {
this.rowModel = rowModel;
};
RowRenderer.prototype.getAllCellsForColumn = function (column) {
var eCells = [];
utils_1.Utils.iterateObject(this.renderedRows, callback);
utils_1.Utils.iterateObject(this.renderedBottomFloatingRows, callback);
utils_1.Utils.iterateObject(this.renderedBottomFloatingRows, callback);
function callback(key, renderedRow) {
var eCell = renderedRow.getCellForCol(column);
if (eCell) {
eCells.push(eCell);
}
}
return eCells;
};
RowRenderer.prototype.setMainRowWidths = function () {
var mainRowWidth = this.columnController.getBodyContainerWidth() + "px";
this.eAllBodyContainers.forEach(function (container) {
var unpinnedRows = container.querySelectorAll(".ag-row");
for (var i = 0; i < unpinnedRows.length; i++) {
unpinnedRows[i].style.width = mainRowWidth;
}
});
};
RowRenderer.prototype.refreshAllFloatingRows = function () {
this.refreshFloatingRows(this.renderedTopFloatingRows, this.floatingRowModel.getFloatingTopRowData(), this.eFloatingTopPinnedLeftContainer, this.eFloatingTopPinnedRightContainer, this.eFloatingTopContainer);
this.refreshFloatingRows(this.renderedBottomFloatingRows, this.floatingRowModel.getFloatingBottomRowData(), this.eFloatingBottomPinnedLeftContainer, this.eFloatingBottomPinnedRightContainer, this.eFloatingBottomContainer);
};
RowRenderer.prototype.refreshFloatingRows = function (renderedRows, rowNodes, pinnedLeftContainer, pinnedRightContainer, bodyContainer) {
var _this = this;
renderedRows.forEach(function (row) {
row.destroy();
});
renderedRows.length = 0;
// if no cols, don't draw row - can we get rid of this???
var columns = this.columnController.getAllDisplayedColumns();
if (!columns || columns.length == 0) {
return;
}
if (rowNodes) {
rowNodes.forEach(function (node, rowIndex) {
var renderedRow = new renderedRow_1.RenderedRow(_this.$scope, _this.cellRendererMap, _this, bodyContainer, pinnedLeftContainer, pinnedRightContainer, node, rowIndex);
_this.context.wireBean(renderedRow);
renderedRows.push(renderedRow);
});
}
};
RowRenderer.prototype.refreshView = function (refreshEvent) {
this.logger.log('refreshView');
var refreshFromIndex = refreshEvent ? refreshEvent.fromIndex : null;
if (!this.gridOptionsWrapper.isForPrint()) {
var containerHeight = this.rowModel.getRowCombinedHeight();
this.eBodyContainer.style.height = containerHeight + "px";
this.ePinnedLeftColsContainer.style.height = containerHeight + "px";
this.ePinnedRightColsContainer.style.height = containerHeight + "px";
}
this.refreshAllVirtualRows(refreshFromIndex);
this.refreshAllFloatingRows();
};
RowRenderer.prototype.softRefreshView = function () {
utils_1.Utils.iterateObject(this.renderedRows, function (key, renderedRow) {
renderedRow.softRefresh();
});
};
RowRenderer.prototype.addRenderedRowListener = function (eventName, rowIndex, callback) {
var renderedRow = this.renderedRows[rowIndex];
renderedRow.addEventListener(eventName, callback);
};
RowRenderer.prototype.refreshRows = function (rowNodes) {
if (!rowNodes || rowNodes.length == 0) {
return;
}
// we only need to be worried about rendered rows, as this method is
// called to whats rendered. if the row isn't rendered, we don't care
var indexesToRemove = [];
utils_1.Utils.iterateObject(this.renderedRows, function (key, renderedRow) {
var rowNode = renderedRow.getRowNode();
if (rowNodes.indexOf(rowNode) >= 0) {
indexesToRemove.push(key);
}
});
// remove the rows
this.removeVirtualRow(indexesToRemove);
// add draw them again
this.drawVirtualRows();
};
RowRenderer.prototype.refreshCells = function (rowNodes, colIds) {
if (!rowNodes || rowNodes.length == 0) {
return;
}
// we only need to be worried about rendered rows, as this method is
// called to whats rendered. if the row isn't rendered, we don't care
utils_1.Utils.iterateObject(this.renderedRows, function (key, renderedRow) {
var rowNode = renderedRow.getRowNode();
if (rowNodes.indexOf(rowNode) >= 0) {
renderedRow.refreshCells(colIds);
}
});
};
RowRenderer.prototype.rowDataChanged = function (rows) {
// we only need to be worried about rendered rows, as this method is
// called to whats rendered. if the row isn't rendered, we don't care
var indexesToRemove = [];
var renderedRows = this.renderedRows;
Object.keys(renderedRows).forEach(function (key) {
var renderedRow = renderedRows[key];
// see if the rendered row is in the list of rows we have to update
if (renderedRow.isDataInList(rows)) {
indexesToRemove.push(key);
}
});
// remove the rows
this.removeVirtualRow(indexesToRemove);
// add draw them again
this.drawVirtualRows();
};
RowRenderer.prototype.agDestroy = function () {
var rowsToRemove = Object.keys(this.renderedRows);
this.removeVirtualRow(rowsToRemove);
};
RowRenderer.prototype.refreshAllVirtualRows = function (fromIndex) {
// remove all current virtual rows, as they have old data
var rowsToRemove = Object.keys(this.renderedRows);
this.removeVirtualRow(rowsToRemove, fromIndex);
// add in new rows
this.drawVirtualRows();
};
// public - removes the group rows and then redraws them again
RowRenderer.prototype.refreshGroupRows = function () {
// find all the group rows
var rowsToRemove = [];
var that = this;
Object.keys(this.renderedRows).forEach(function (key) {
var renderedRow = that.renderedRows[key];
if (renderedRow.isGroup()) {
rowsToRemove.push(key);
}
});
// remove the rows
this.removeVirtualRow(rowsToRemove);
// and draw them back again
this.ensureRowsRendered();
};
// takes array of row indexes
RowRenderer.prototype.removeVirtualRow = function (rowsToRemove, fromIndex) {
var that = this;
// if no fromIndex then set to -1, which will refresh everything
var realFromIndex = (typeof fromIndex === 'number') ? fromIndex : -1;
rowsToRemove.forEach(function (indexToRemove) {
if (indexToRemove >= realFromIndex) {
that.unbindVirtualRow(indexToRemove);
}
});
};
RowRenderer.prototype.unbindVirtualRow = function (indexToRemove) {
var renderedRow = this.renderedRows[indexToRemove];
renderedRow.destroy();
var event = { node: renderedRow.getRowNode(), rowIndex: indexToRemove };
this.eventService.dispatchEvent(events_1.Events.EVENT_VIRTUAL_ROW_REMOVED, event);
delete this.renderedRows[indexToRemove];
};
RowRenderer.prototype.drawVirtualRows = function () {
this.workOutFirstAndLastRowsToRender();
this.ensureRowsRendered();
};
RowRenderer.prototype.workOutFirstAndLastRowsToRender = function () {
if (!this.rowModel.isRowsToRender()) {
this.firstVirtualRenderedRow = 0;
this.lastVirtualRenderedRow = -1; // setting to -1 means nothing in range
return;
}
var rowCount = this.rowModel.getRowCount();
if (this.gridOptionsWrapper.isForPrint()) {
this.firstVirtualRenderedRow = 0;
this.lastVirtualRenderedRow = rowCount;
}
else {
var topPixel = this.eBodyViewport.scrollTop;
var bottomPixel = topPixel + this.eBodyViewport.offsetHeight;
var first = this.rowModel.getRowAtPixel(topPixel);
var last = this.rowModel.getRowAtPixel(bottomPixel);
//add in buffer
var buffer = this.gridOptionsWrapper.getRowBuffer();
first = first - buffer;
last = last + buffer;
// adjust, in case buffer extended actual size
if (first < 0) {
first = 0;
}
if (last > rowCount - 1) {
last = rowCount - 1;
}
this.firstVirtualRenderedRow = first;
this.lastVirtualRenderedRow = last;
}
};
RowRenderer.prototype.getFirstVirtualRenderedRow = function () {
return this.firstVirtualRenderedRow;
};
RowRenderer.prototype.getLastVirtualRenderedRow = function () {
return this.lastVirtualRenderedRow;
};
RowRenderer.prototype.ensureRowsRendered = function () {
//var start = new Date().getTime();
var _this = this;
// at the end, this array will contain the items we need to remove
var rowsToRemove = Object.keys(this.renderedRows);
// add in new rows
for (var rowIndex = this.firstVirtualRenderedRow; rowIndex <= this.lastVirtualRenderedRow; rowIndex++) {
// see if item already there, and if yes, take it out of the 'to remove' array
if (rowsToRemove.indexOf(rowIndex.toString()) >= 0) {
rowsToRemove.splice(rowsToRemove.indexOf(rowIndex.toString()), 1);
continue;
}
// check this row actually exists (in case overflow buffer window exceeds real data)
var node = this.rowModel.getRow(rowIndex);
if (node) {
this.insertRow(node, rowIndex);
}
}
// at this point, everything in our 'rowsToRemove' . . .
this.removeVirtualRow(rowsToRemove);
// if we are doing angular compiling, then do digest the scope here
if (this.gridOptionsWrapper.isAngularCompileRows()) {
// we do it in a timeout, in case we are already in an apply
setTimeout(function () { _this.$scope.$apply(); }, 0);
}
//var end = new Date().getTime();
//console.log(end-start);
};
RowRenderer.prototype.onMouseEvent = function (eventName, mouseEvent, eventSource, cell) {
var renderedRow;
switch (cell.floating) {
case constants_1.Constants.FLOATING_TOP:
renderedRow = this.renderedTopFloatingRows[cell.rowIndex];
break;
case constants_1.Constants.FLOATING_BOTTOM:
renderedRow = this.renderedBottomFloatingRows[cell.rowIndex];
break;
default:
renderedRow = this.renderedRows[cell.rowIndex];
break;
}
if (renderedRow) {
renderedRow.onMouseEvent(eventName, mouseEvent, eventSource, cell);
}
};
RowRenderer.prototype.insertRow = function (node, rowIndex) {
var columns = this.columnController.getAllDisplayedColumns();
// if no cols, don't draw row
if (!columns || columns.length == 0) {
return;
}
var renderedRow = new renderedRow_1.RenderedRow(this.$scope, this.cellRendererMap, this, this.eBodyContainer, this.ePinnedLeftColsContainer, this.ePinnedRightColsContainer, node, rowIndex);
this.context.wireBean(renderedRow);
this.renderedRows[rowIndex] = renderedRow;
};
RowRenderer.prototype.getRenderedNodes = function () {
var renderedRows = this.renderedRows;
return Object.keys(renderedRows).map(function (key) {
return renderedRows[key].getRowNode();
});
};
// we use index for rows, but column object for columns, as the next column (by index) might not
// be visible (header grouping) so it's not reliable, so using the column object instead.
RowRenderer.prototype.navigateToNextCell = function (key, rowIndex, column, floating) {
var nextCell = new gridCell_1.GridCell(rowIndex, floating, column);
// we keep searching for a next cell until we find one. this is how the group rows get skipped
while (true) {
nextCell = this.cellNavigationService.getNextCellToFocus(key, nextCell);
if (utils_1.Utils.missing(nextCell)) {
break;
}
var skipGroupRows = this.gridOptionsWrapper.isGroupUseEntireRow();
if (skipGroupRows) {
var rowNode = this.rowModel.getRow(nextCell.rowIndex);
if (!rowNode.group) {
break;
}
}
else {
break;
}
}
// no next cell means we have reached a grid boundary, eg left, right, top or bottom of grid
if (!nextCell) {
return;
}
// this scrolls the row into view
if (utils_1.Utils.missing(nextCell.floating)) {
this.gridPanel.ensureIndexVisible(nextCell.rowIndex);
}
if (!nextCell.column.isPinned()) {
this.gridPanel.ensureColumnVisible(nextCell.column);
}
// need to nudge the scrolls for the floating items. otherwise when we set focus on a non-visible
// floating cell, the scrolls get out of sync
this.gridPanel.horizontallyScrollHeaderCenterAndFloatingCenter();
this.focusedCellController.setFocusedCell(nextCell.rowIndex, nextCell.column, nextCell.floating, true);
if (this.rangeController) {
this.rangeController.setRangeToCell(new gridCell_1.GridCell(nextCell.rowIndex, nextCell.floating, nextCell.column));
}
};
// called by the cell, when tab is pressed while editing
RowRenderer.prototype.startEditingNextCell = function (rowIndex, column, floating, shiftKey) {
var nextCell = new gridCell_1.GridCell(rowIndex, floating, column);
while (true) {
if (shiftKey) {
nextCell = this.cellNavigationService.getNextTabbedCellBackwards(nextCell);
}
else {
nextCell = this.cellNavigationService.getNextTabbedCellForwards(nextCell);
}
var nextRenderedRow;
switch (nextCell.floating) {
case constants_1.Constants.FLOATING_TOP:
nextRenderedRow = this.renderedTopFloatingRows[nextCell.rowIndex];
break;
case constants_1.Constants.FLOATING_BOTTOM:
nextRenderedRow = this.renderedBottomFloatingRows[nextCell.rowIndex];
break;
default:
nextRenderedRow = this.renderedRows[nextCell.rowIndex];
break;
}
if (!nextRenderedRow) {
// this happens if we are on floating row and try to jump to body
return;
}
var nextRenderedCell = nextRenderedRow.getRenderedCellForColumn(nextCell.column);
if (nextRenderedCell.isCellEditable()) {
// this scrolls the row into view
if (utils_1.Utils.missing(nextCell.floating)) {
this.gridPanel.ensureIndexVisible(nextCell.rowIndex);
}
this.gridPanel.ensureColumnVisible(nextCell.column);
// need to nudge the scrolls for the floating items. otherwise when we set focus on a non-visible
// floating cell, the scrolls get out of sync
this.gridPanel.horizontallyScrollHeaderCenterAndFloatingCenter();
nextRenderedCell.startEditing();
nextRenderedCell.focusCell(false);
if (this.rangeController) {
this.rangeController.setRangeToCell(new gridCell_1.GridCell(nextCell.rowIndex, nextCell.floating, nextCell.column));
}
return;
}
}
};
__decorate([
context_4.Autowired('columnController'),
__metadata('design:type', columnController_1.ColumnController)
], RowRenderer.prototype, "columnController", void 0);
__decorate([
context_4.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], RowRenderer.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_4.Autowired('gridCore'),
__metadata('design:type', gridCore_1.GridCore)
], RowRenderer.prototype, "gridCore", void 0);
__decorate([
context_4.Autowired('selectionRendererFactory'),
__metadata('design:type', selectionRendererFactory_1.SelectionRendererFactory)
], RowRenderer.prototype, "selectionRendererFactory", void 0);
__decorate([
context_4.Autowired('gridPanel'),
__metadata('design:type', gridPanel_1.GridPanel)
], RowRenderer.prototype, "gridPanel", void 0);
__decorate([
context_4.Autowired('$compile'),
__metadata('design:type', Object)
], RowRenderer.prototype, "$compile", void 0);
__decorate([
context_4.Autowired('$scope'),
__metadata('design:type', Object)
], RowRenderer.prototype, "$scope", void 0);
__decorate([
context_4.Autowired('expressionService'),
__metadata('design:type', expressionService_1.ExpressionService)
], RowRenderer.prototype, "expressionService", void 0);
__decorate([
context_4.Autowired('templateService'),
__metadata('design:type', templateService_1.TemplateService)
], RowRenderer.prototype, "templateService", void 0);
__decorate([
context_4.Autowired('valueService'),
__metadata('design:type', valueService_1.ValueService)
], RowRenderer.prototype, "valueService", void 0);
__decorate([
context_4.Autowired('eventService'),
__metadata('design:type', eventService_1.EventService)
], RowRenderer.prototype, "eventService", void 0);
__decorate([
context_4.Autowired('floatingRowModel'),
__metadata('design:type', floatingRowModel_1.FloatingRowModel)
], RowRenderer.prototype, "floatingRowModel", void 0);
__decorate([
context_4.Autowired('context'),
__metadata('design:type', context_3.Context)
], RowRenderer.prototype, "context", void 0);
__decorate([
context_4.Autowired('loggerFactory'),
__metadata('design:type', logger_1.LoggerFactory)
], RowRenderer.prototype, "loggerFactory", void 0);
__decorate([
context_4.Autowired('rowModel'),
__metadata('design:type', Object)
], RowRenderer.prototype, "rowModel", void 0);
__decorate([
context_4.Autowired('focusedCellController'),
__metadata('design:type', focusedCellController_1.FocusedCellController)
], RowRenderer.prototype, "focusedCellController", void 0);
__decorate([
context_6.Optional('rangeController'),
__metadata('design:type', Object)
], RowRenderer.prototype, "rangeController", void 0);
__decorate([
context_4.Autowired('cellNavigationService'),
__metadata('design:type', cellNavigationService_1.CellNavigationService)
], RowRenderer.prototype, "cellNavigationService", void 0);
__decorate([
__param(0, context_2.Qualifier('loggerFactory')),
__metadata('design:type', Function),
__metadata('design:paramtypes', [logger_1.LoggerFactory]),
__metadata('design:returntype', void 0)
], RowRenderer.prototype, "agWire", null);
__decorate([
context_5.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], RowRenderer.prototype, "init", null);
RowRenderer = __decorate([
context_1.Bean('rowRenderer'),
__metadata('design:paramtypes', [])
], RowRenderer);
return RowRenderer;
})();
exports.RowRenderer = RowRenderer;
/***/ },
/* 24 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var utils_1 = __webpack_require__(7);
var masterSlaveService_1 = __webpack_require__(25);
var gridOptionsWrapper_1 = __webpack_require__(3);
var columnController_1 = __webpack_require__(13);
var rowRenderer_1 = __webpack_require__(23);
var floatingRowModel_1 = __webpack_require__(26);
var borderLayout_1 = __webpack_require__(27);
var logger_1 = __webpack_require__(5);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var context_3 = __webpack_require__(6);
var eventService_1 = __webpack_require__(4);
var events_1 = __webpack_require__(10);
var context_4 = __webpack_require__(6);
var dragService_1 = __webpack_require__(28);
var constants_1 = __webpack_require__(8);
var selectionController_1 = __webpack_require__(29);
var csvCreator_1 = __webpack_require__(12);
var context_5 = __webpack_require__(6);
var mouseEventService_1 = __webpack_require__(30);
// in the html below, it is important that there are no white space between some of the divs, as if there is white space,
// it won't render correctly in safari, as safari renders white space as a gap
var gridHtml = '<div>' +
// header
'<div class="ag-header">' +
'<div class="ag-pinned-left-header"></div>' +
'<div class="ag-pinned-right-header"></div>' +
'<div class="ag-header-viewport">' +
'<div class="ag-header-container"></div>' +
'</div>' +
'<div class="ag-header-overlay"></div>' +
'</div>' +
// floating top
'<div class="ag-floating-top">' +
'<div class="ag-pinned-left-floating-top"></div>' +
'<div class="ag-pinned-right-floating-top"></div>' +
'<div class="ag-floating-top-viewport">' +
'<div class="ag-floating-top-container"></div>' +
'</div>' +
'</div>' +
// floating bottom
'<div class="ag-floating-bottom">' +
'<div class="ag-pinned-left-floating-bottom"></div>' +
'<div class="ag-pinned-right-floating-bottom"></div>' +
'<div class="ag-floating-bottom-viewport">' +
'<div class="ag-floating-bottom-container"></div>' +
'</div>' +
'</div>' +
// body
'<div class="ag-body">' +
'<div class="ag-pinned-left-cols-viewport">' +
'<div class="ag-pinned-left-cols-container"></div>' +
'</div>' +
'<div class="ag-pinned-right-cols-viewport">' +
'<div class="ag-pinned-right-cols-container"></div>' +
'</div>' +
'<div class="ag-body-viewport-wrapper">' +
'<div class="ag-body-viewport">' +
'<div class="ag-body-container"></div>' +
'</div>' +
'</div>' +
'</div>' +
'</div>';
var gridForPrintHtml = '<div>' +
// header
'<div class="ag-header-container"></div>' +
// floating
'<div class="ag-floating-top-container"></div>' +
// body
'<div class="ag-body-container"></div>' +
// floating bottom
'<div class="ag-floating-bottom-container"></div>' +
'</div>';
// wrapping in outer div, and wrapper, is needed to center the loading icon
// The idea for centering came from here: http://www.vanseodesign.com/css/vertical-centering/
var mainOverlayTemplate = '<div class="ag-overlay-panel">' +
'<div class="ag-overlay-wrapper ag-overlay-[OVERLAY_NAME]-wrapper">[OVERLAY_TEMPLATE]</div>' +
'</div>';
var defaultLoadingOverlayTemplate = '<span class="ag-overlay-loading-center">[LOADING...]</span>';
var defaultNoRowsOverlayTemplate = '<span class="ag-overlay-no-rows-center">[NO_ROWS_TO_SHOW]</span>';
var GridPanel = (function () {
function GridPanel() {
this.scrollLagCounter = 0;
this.lastLeftPosition = -1;
this.lastTopPosition = -1;
this.animationThreadCount = 0;
}
GridPanel.prototype.agWire = function (loggerFactory) {
// makes code below more readable if we pull 'forPrint' out
this.forPrint = this.gridOptionsWrapper.isForPrint();
this.scrollWidth = utils_1.Utils.getScrollbarWidth();
this.logger = loggerFactory.create('GridPanel');
this.findElements();
};
GridPanel.prototype.onRowDataChanged = function () {
if (this.rowModel.isEmpty() && !this.gridOptionsWrapper.isSuppressNoRowsOverlay()) {
this.showNoRowsOverlay();
}
else {
this.hideOverlay();
}
};
GridPanel.prototype.getLayout = function () {
return this.layout;
};
GridPanel.prototype.init = function () {
this.addEventListeners();
this.addDragListeners();
this.layout = new borderLayout_1.BorderLayout({
overlays: {
loading: utils_1.Utils.loadTemplate(this.createLoadingOverlayTemplate()),
noRows: utils_1.Utils.loadTemplate(this.createNoRowsOverlayTemplate())
},
center: this.eRoot,
dontFill: this.forPrint,
name: 'eGridPanel'
});
this.layout.addSizeChangeListener(this.sizeHeaderAndBody.bind(this));
this.addScrollListener();
if (this.gridOptionsWrapper.isSuppressHorizontalScroll()) {
this.eBodyViewport.style.overflowX = 'hidden';
}
if (this.gridOptionsWrapper.isRowModelDefault() && !this.gridOptionsWrapper.getRowData()) {
this.showLoadingOverlay();
}
this.setWidthsOfContainers();
this.showPinnedColContainersIfNeeded();
this.sizeHeaderAndBody();
this.disableBrowserDragging();
this.addShortcutKeyListeners();
this.addCellListeners();
};
// if we do not do this, then the user can select a pic in the grid (eg an image in a custom cell renderer)
// and then that will start the browser native drag n' drop, which messes up with our own drag and drop.
GridPanel.prototype.disableBrowserDragging = function () {
this.eRoot.addEventListener('dragstart', function (event) {
if (event.target instanceof HTMLImageElement) {
event.preventDefault();
return false;
}
});
};
GridPanel.prototype.addEventListeners = function () {
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_EVERYTHING_CHANGED, this.onColumnsChanged.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_GROUP_OPENED, this.onColumnsChanged.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_MOVED, this.onColumnsChanged.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGE, this.onColumnsChanged.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_RESIZED, this.onColumnsChanged.bind(this));
//this.eventService.addEventListener(Events.EVENT_COLUMN_VALUE_CHANGE, this.onColumnsChanged.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_VISIBLE, this.onColumnsChanged.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_PINNED, this.onColumnsChanged.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_FLOATING_ROW_DATA_CHANGED, this.sizeHeaderAndBody.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_HEADER_HEIGHT_CHANGED, this.sizeHeaderAndBody.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_ROW_DATA_CHANGED, this.onRowDataChanged.bind(this));
};
GridPanel.prototype.addDragListeners = function () {
var _this = this;
if (this.forPrint // no range select when doing 'for print'
|| !this.gridOptionsWrapper.isEnableRangeSelection() // no range selection if no property
|| utils_1.Utils.missing(this.rangeController)) {
return;
}
var containers = [this.ePinnedLeftColsContainer, this.ePinnedRightColsContainer, this.eBodyContainer,
this.eFloatingTop, this.eFloatingBottom];
containers.forEach(function (container) {
_this.dragService.addDragSource({
dragStartPixels: 0,
eElement: container,
onDragStart: _this.rangeController.onDragStart.bind(_this.rangeController),
onDragStop: _this.rangeController.onDragStop.bind(_this.rangeController),
onDragging: _this.rangeController.onDragging.bind(_this.rangeController)
});
});
};
GridPanel.prototype.addCellListeners = function () {
var _this = this;
var eventNames = ['click', 'mousedown', 'dblclick', 'contextmenu'];
var that = this;
eventNames.forEach(function (eventName) {
_this.eAllCellContainers.forEach(function (container) {
return container.addEventListener(eventName, function (mouseEvent) {
var eventSource = this;
that.processMouseEvent(eventName, mouseEvent, eventSource);
});
});
});
};
GridPanel.prototype.processMouseEvent = function (eventName, mouseEvent, eventSource) {
var cell = this.mouseEventService.getCellForMouseEvent(mouseEvent);
if (utils_1.Utils.exists(cell)) {
//console.log(`row = ${cell.rowIndex}, floating = ${floating}`);
this.rowRenderer.onMouseEvent(eventName, mouseEvent, eventSource, cell);
}
};
GridPanel.prototype.addShortcutKeyListeners = function () {
var _this = this;
this.eAllCellContainers.forEach(function (container) {
container.addEventListener('keydown', function (event) {
if (event.ctrlKey || event.metaKey) {
switch (event.which) {
case constants_1.Constants.KEY_A: return _this.onCtrlAndA(event);
case constants_1.Constants.KEY_C: return _this.onCtrlAndC(event);
case constants_1.Constants.KEY_V: return _this.onCtrlAndV(event);
}
}
});
});
};
GridPanel.prototype.onCtrlAndA = function (event) {
if (this.rangeController && this.rowModel.isRowsToRender()) {
var rowEnd;
var floatingStart;
var floatingEnd;
if (this.floatingRowModel.isEmpty(constants_1.Constants.FLOATING_TOP)) {
floatingStart = null;
}
else {
floatingStart = constants_1.Constants.FLOATING_TOP;
}
if (this.floatingRowModel.isEmpty(constants_1.Constants.FLOATING_BOTTOM)) {
floatingEnd = null;
rowEnd = this.rowModel.getRowCount() - 1;
}
else {
floatingEnd = constants_1.Constants.FLOATING_BOTTOM;
rowEnd = this.floatingRowModel.getFloatingBottomRowData().length = 1;
}
var allDisplayedColumns = this.columnController.getAllDisplayedColumns();
if (utils_1.Utils.missingOrEmpty(allDisplayedColumns)) {
return;
}
this.rangeController.setRange({
rowStart: 0,
floatingStart: floatingStart,
rowEnd: rowEnd,
floatingEnd: floatingEnd,
columnStart: allDisplayedColumns[0],
columnEnd: allDisplayedColumns[allDisplayedColumns.length - 1]
});
}
event.preventDefault();
return false;
};
GridPanel.prototype.onCtrlAndC = function (event) {
if (!this.clipboardService) {
return;
}
this.clipboardService.copyToClipboard();
event.preventDefault();
return false;
};
GridPanel.prototype.onCtrlAndV = function (event) {
if (!this.clipboardService) {
return;
}
this.clipboardService.pasteFromClipboard();
//event.preventDefault();
return false;
};
GridPanel.prototype.getPinnedLeftFloatingTop = function () {
return this.ePinnedLeftFloatingTop;
};
GridPanel.prototype.getPinnedRightFloatingTop = function () {
return this.ePinnedRightFloatingTop;
};
GridPanel.prototype.getFloatingTopContainer = function () {
return this.eFloatingTopContainer;
};
GridPanel.prototype.getPinnedLeftFloatingBottom = function () {
return this.ePinnedLeftFloatingBottom;
};
GridPanel.prototype.getPinnedRightFloatingBottom = function () {
return this.ePinnedRightFloatingBottom;
};
GridPanel.prototype.getFloatingBottomContainer = function () {
return this.eFloatingBottomContainer;
};
GridPanel.prototype.createOverlayTemplate = function (name, defaultTemplate, userProvidedTemplate) {
var template = mainOverlayTemplate
.replace('[OVERLAY_NAME]', name);
if (userProvidedTemplate) {
template = template.replace('[OVERLAY_TEMPLATE]', userProvidedTemplate);
}
else {
template = template.replace('[OVERLAY_TEMPLATE]', defaultTemplate);
}
return template;
};
GridPanel.prototype.createLoadingOverlayTemplate = function () {
var userProvidedTemplate = this.gridOptionsWrapper.getOverlayLoadingTemplate();
var templateNotLocalised = this.createOverlayTemplate('loading', defaultLoadingOverlayTemplate, userProvidedTemplate);
var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();
var templateLocalised = templateNotLocalised.replace('[LOADING...]', localeTextFunc('loadingOoo', 'Loading...'));
return templateLocalised;
};
GridPanel.prototype.createNoRowsOverlayTemplate = function () {
var userProvidedTemplate = this.gridOptionsWrapper.getOverlayNoRowsTemplate();
var templateNotLocalised = this.createOverlayTemplate('no-rows', defaultNoRowsOverlayTemplate, userProvidedTemplate);
var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();
var templateLocalised = templateNotLocalised.replace('[NO_ROWS_TO_SHOW]', localeTextFunc('noRowsToShow', 'No Rows To Show'));
return templateLocalised;
};
GridPanel.prototype.ensureIndexVisible = function (index) {
this.logger.log('ensureIndexVisible: ' + index);
var lastRow = this.rowModel.getRowCount();
if (typeof index !== 'number' || index < 0 || index >= lastRow) {
console.warn('invalid row index for ensureIndexVisible: ' + index);
return;
}
var nodeAtIndex = this.rowModel.getRow(index);
var rowTopPixel = nodeAtIndex.rowTop;
var rowBottomPixel = rowTopPixel + nodeAtIndex.rowHeight;
var viewportTopPixel = this.eBodyViewport.scrollTop;
var viewportHeight = this.eBodyViewport.offsetHeight;
var scrollShowing = this.isHorizontalScrollShowing();
if (scrollShowing) {
viewportHeight -= this.scrollWidth;
}
var viewportBottomPixel = viewportTopPixel + viewportHeight;
var viewportScrolledPastRow = viewportTopPixel > rowTopPixel;
var viewportScrolledBeforeRow = viewportBottomPixel < rowBottomPixel;
var eViewportToScroll = this.columnController.isPinningRight() ? this.ePinnedRightColsViewport : this.eBodyViewport;
if (viewportScrolledPastRow) {
// if row is before, scroll up with row at top
eViewportToScroll.scrollTop = rowTopPixel;
}
else if (viewportScrolledBeforeRow) {
// if row is below, scroll down with row at bottom
var newScrollPosition = rowBottomPixel - viewportHeight;
eViewportToScroll.scrollTop = newScrollPosition;
}
// otherwise, row is already in view, so do nothing
};
// + moveColumnController
GridPanel.prototype.getCenterWidth = function () {
return this.eBodyViewport.clientWidth;
};
GridPanel.prototype.isHorizontalScrollShowing = function () {
var result = this.eBodyViewport.clientWidth < this.eBodyViewport.scrollWidth;
return result;
};
GridPanel.prototype.isVerticalScrollShowing = function () {
if (this.columnController.isPinningRight()) {
// if pinning right, then the scroll bar can show, however for some reason
// it overlays the grid and doesn't take space.
return false;
}
else {
return this.eBodyViewport.clientHeight < this.eBodyViewport.scrollHeight;
}
};
// gets called every 500 ms. we use this to set padding on right pinned column
GridPanel.prototype.periodicallyCheck = function () {
if (this.columnController.isPinningRight()) {
var bodyHorizontalScrollShowing = this.eBodyViewport.clientWidth < this.eBodyViewport.scrollWidth;
if (bodyHorizontalScrollShowing) {
this.ePinnedRightColsContainer.style.marginBottom = this.scrollWidth + 'px';
}
else {
this.ePinnedRightColsContainer.style.marginBottom = '';
}
}
};
GridPanel.prototype.ensureColumnVisible = function (key) {
var column = this.columnController.getColumn(key);
if (column.isPinned()) {
console.warn('calling ensureIndexVisible on a ' + column.getPinned() + ' pinned column doesn\'t make sense for column ' + column.getColId());
return;
}
if (!this.columnController.isColumnDisplayed(column)) {
console.warn('column is not currently visible');
return;
}
var colLeftPixel = column.getLeft();
var colRightPixel = colLeftPixel + column.getActualWidth();
var viewportLeftPixel = this.eBodyViewport.scrollLeft;
var viewportWidth = this.eBodyViewport.offsetWidth;
var scrollShowing = this.eBodyViewport.clientHeight < this.eBodyViewport.scrollHeight;
if (scrollShowing) {
viewportWidth -= this.scrollWidth;
}
var viewportRightPixel = viewportLeftPixel + viewportWidth;
var viewportScrolledPastCol = viewportLeftPixel > colLeftPixel;
var viewportScrolledBeforeCol = viewportRightPixel < colRightPixel;
if (viewportScrolledPastCol) {
// if viewport's left side is after col's left side, scroll right to pull col into viewport at left
this.eBodyViewport.scrollLeft = colLeftPixel;
}
else if (viewportScrolledBeforeCol) {
// if viewport's right side is before col's right side, scroll left to pull col into viewport at right
var newScrollPosition = colRightPixel - viewportWidth;
this.eBodyViewport.scrollLeft = newScrollPosition;
}
// otherwise, col is already in view, so do nothing
};
GridPanel.prototype.showLoadingOverlay = function () {
if (!this.gridOptionsWrapper.isSuppressLoadingOverlay()) {
this.layout.showOverlay('loading');
}
};
GridPanel.prototype.showNoRowsOverlay = function () {
if (!this.gridOptionsWrapper.isSuppressNoRowsOverlay()) {
this.layout.showOverlay('noRows');
}
};
GridPanel.prototype.hideOverlay = function () {
this.layout.hideOverlay();
};
GridPanel.prototype.getWidthForSizeColsToFit = function () {
var availableWidth = this.eBody.clientWidth;
var scrollShowing = this.isVerticalScrollShowing();
if (scrollShowing) {
availableWidth -= this.scrollWidth;
}
return availableWidth;
};
// method will call itself if no available width. this covers if the grid
// isn't visible, but is just about to be visible.
GridPanel.prototype.sizeColumnsToFit = function (nextTimeout) {
var _this = this;
var availableWidth = this.getWidthForSizeColsToFit();
if (availableWidth > 0) {
this.columnController.sizeColumnsToFit(availableWidth);
}
else {
if (nextTimeout === undefined) {
setTimeout(function () {
_this.sizeColumnsToFit(100);
}, 0);
}
else if (nextTimeout === 100) {
setTimeout(function () {
_this.sizeColumnsToFit(-1);
}, 100);
}
else {
console.log('ag-Grid: tried to call sizeColumnsToFit() but the grid is coming back with ' +
'zero width, maybe the grid is not visible yet on the screen?');
}
}
};
GridPanel.prototype.getBodyContainer = function () {
return this.eBodyContainer;
};
GridPanel.prototype.getDropTargetBodyContainers = function () {
if (this.forPrint) {
return [this.eBodyContainer, this.eFloatingTopContainer, this.eFloatingBottomContainer];
}
else {
return [this.eBodyViewport, this.eFloatingTopViewport, this.eFloatingBottomViewport];
}
};
GridPanel.prototype.getBodyViewport = function () {
return this.eBodyViewport;
};
GridPanel.prototype.getPinnedLeftColsContainer = function () {
return this.ePinnedLeftColsContainer;
};
GridPanel.prototype.getDropTargetLeftContainers = function () {
if (this.forPrint) {
return [];
}
else {
return [this.ePinnedLeftColsViewport, this.ePinnedLeftFloatingBottom, this.ePinnedLeftFloatingTop];
}
};
GridPanel.prototype.getPinnedRightColsContainer = function () {
return this.ePinnedRightColsContainer;
};
GridPanel.prototype.getDropTargetPinnedRightContainers = function () {
if (this.forPrint) {
return [];
}
else {
return [this.ePinnedRightColsViewport, this.ePinnedRightFloatingBottom, this.ePinnedRightFloatingTop];
}
};
GridPanel.prototype.getHeaderContainer = function () {
return this.eHeaderContainer;
};
GridPanel.prototype.getHeaderOverlay = function () {
return this.eHeaderOverlay;
};
GridPanel.prototype.getRoot = function () {
return this.eRoot;
};
GridPanel.prototype.getPinnedLeftHeader = function () {
return this.ePinnedLeftHeader;
};
GridPanel.prototype.getPinnedRightHeader = function () {
return this.ePinnedRightHeader;
};
GridPanel.prototype.queryHtmlElement = function (selector) {
return this.eRoot.querySelector(selector);
};
GridPanel.prototype.findElements = function () {
if (this.forPrint) {
this.eRoot = utils_1.Utils.loadTemplate(gridForPrintHtml);
utils_1.Utils.addCssClass(this.eRoot, 'ag-root');
utils_1.Utils.addCssClass(this.eRoot, 'ag-font-style');
utils_1.Utils.addCssClass(this.eRoot, 'ag-no-scrolls');
}
else {
this.eRoot = utils_1.Utils.loadTemplate(gridHtml);
utils_1.Utils.addCssClass(this.eRoot, 'ag-root');
utils_1.Utils.addCssClass(this.eRoot, 'ag-font-style');
utils_1.Utils.addCssClass(this.eRoot, 'ag-scrolls');
}
if (this.forPrint) {
this.eHeaderContainer = this.queryHtmlElement('.ag-header-container');
this.eBodyContainer = this.queryHtmlElement('.ag-body-container');
this.eFloatingTopContainer = this.queryHtmlElement('.ag-floating-top-container');
this.eFloatingBottomContainer = this.queryHtmlElement('.ag-floating-bottom-container');
this.eAllCellContainers = [this.eBodyContainer, this.eFloatingTopContainer, this.eFloatingBottomContainer];
}
else {
this.eBody = this.queryHtmlElement('.ag-body');
this.eBodyContainer = this.queryHtmlElement('.ag-body-container');
this.eBodyViewport = this.queryHtmlElement('.ag-body-viewport');
this.eBodyViewportWrapper = this.queryHtmlElement('.ag-body-viewport-wrapper');
this.ePinnedLeftColsContainer = this.queryHtmlElement('.ag-pinned-left-cols-container');
this.ePinnedRightColsContainer = this.queryHtmlElement('.ag-pinned-right-cols-container');
this.ePinnedLeftColsViewport = this.queryHtmlElement('.ag-pinned-left-cols-viewport');
this.ePinnedRightColsViewport = this.queryHtmlElement('.ag-pinned-right-cols-viewport');
this.ePinnedLeftHeader = this.queryHtmlElement('.ag-pinned-left-header');
this.ePinnedRightHeader = this.queryHtmlElement('.ag-pinned-right-header');
this.eHeader = this.queryHtmlElement('.ag-header');
this.eHeaderContainer = this.queryHtmlElement('.ag-header-container');
this.eHeaderOverlay = this.queryHtmlElement('.ag-header-overlay');
this.eHeaderViewport = this.queryHtmlElement('.ag-header-viewport');
this.eFloatingTop = this.queryHtmlElement('.ag-floating-top');
this.ePinnedLeftFloatingTop = this.queryHtmlElement('.ag-pinned-left-floating-top');
this.ePinnedRightFloatingTop = this.queryHtmlElement('.ag-pinned-right-floating-top');
this.eFloatingTopContainer = this.queryHtmlElement('.ag-floating-top-container');
this.eFloatingTopViewport = this.queryHtmlElement('.ag-floating-top-viewport');
this.eFloatingBottom = this.queryHtmlElement('.ag-floating-bottom');
this.ePinnedLeftFloatingBottom = this.queryHtmlElement('.ag-pinned-left-floating-bottom');
this.ePinnedRightFloatingBottom = this.queryHtmlElement('.ag-pinned-right-floating-bottom');
this.eFloatingBottomContainer = this.queryHtmlElement('.ag-floating-bottom-container');
this.eFloatingBottomViewport = this.queryHtmlElement('.ag-floating-bottom-viewport');
this.eAllCellContainers = [this.ePinnedLeftColsContainer, this.ePinnedRightColsContainer, this.eBodyContainer,
this.eFloatingTop, this.eFloatingBottom];
// IE9, Chrome, Safari, Opera
this.ePinnedLeftColsViewport.addEventListener('mousewheel', this.pinnedLeftMouseWheelListener.bind(this));
this.eBodyViewport.addEventListener('mousewheel', this.centerMouseWheelListener.bind(this));
// Firefox
this.ePinnedLeftColsViewport.addEventListener('DOMMouseScroll', this.pinnedLeftMouseWheelListener.bind(this));
this.eBodyViewport.addEventListener('DOMMouseScroll', this.centerMouseWheelListener.bind(this));
}
};
GridPanel.prototype.getHeaderViewport = function () {
return this.eHeaderViewport;
};
GridPanel.prototype.centerMouseWheelListener = function (event) {
// we are only interested in mimicking the mouse wheel if we are pinning on the right,
// as if we are not pinning on the right, then we have scrollbars in the center body, and
// as such we just use the default browser wheel behaviour.
if (this.columnController.isPinningRight()) {
return this.generalMouseWheelListener(event, this.ePinnedRightColsViewport);
}
};
GridPanel.prototype.pinnedLeftMouseWheelListener = function (event) {
var targetPanel;
if (this.columnController.isPinningRight()) {
targetPanel = this.ePinnedRightColsViewport;
}
else {
targetPanel = this.eBodyViewport;
}
return this.generalMouseWheelListener(event, targetPanel);
};
GridPanel.prototype.generalMouseWheelListener = function (event, targetPanel) {
var wheelEvent = utils_1.Utils.normalizeWheel(event);
// we need to detect in which direction scroll is happening to allow trackpads scroll horizontally
// horizontal scroll
if (Math.abs(wheelEvent.pixelX) > Math.abs(wheelEvent.pixelY)) {
var newLeftPosition = this.eBodyViewport.scrollLeft + wheelEvent.pixelX;
this.eBodyViewport.scrollLeft = newLeftPosition;
}
else {
var newTopPosition = this.eBodyViewport.scrollTop + wheelEvent.pixelY;
targetPanel.scrollTop = newTopPosition;
}
// if we don't prevent default, then the whole browser will scroll also as well as the grid
event.preventDefault();
return false;
};
GridPanel.prototype.onColumnsChanged = function (event) {
if (event.isContainerWidthImpacted()) {
this.setWidthsOfContainers();
}
if (event.isPinnedPanelVisibilityImpacted()) {
this.showPinnedColContainersIfNeeded();
}
if (event.getType() === events_1.Events.EVENT_COLUMN_EVERYTHING_CHANGED) {
this.sizeHeaderAndBody();
}
};
GridPanel.prototype.setWidthsOfContainers = function () {
this.logger.log('setWidthsOfContainers()');
this.showPinnedColContainersIfNeeded();
var mainRowWidth = this.columnController.getBodyContainerWidth() + 'px';
this.eBodyContainer.style.width = mainRowWidth;
if (this.forPrint) {
// pinned col doesn't exist when doing forPrint
return;
}
this.eFloatingBottomContainer.style.width = mainRowWidth;
this.eFloatingTopContainer.style.width = mainRowWidth;
var pinnedLeftWidth = this.columnController.getPinnedLeftContainerWidth() + 'px';
this.ePinnedLeftColsContainer.style.width = pinnedLeftWidth;
this.ePinnedLeftFloatingBottom.style.width = pinnedLeftWidth;
this.ePinnedLeftFloatingTop.style.width = pinnedLeftWidth;
this.eBodyViewportWrapper.style.marginLeft = pinnedLeftWidth;
var pinnedRightWidth = this.columnController.getPinnedRightContainerWidth() + 'px';
this.ePinnedRightColsContainer.style.width = pinnedRightWidth;
this.ePinnedRightFloatingBottom.style.width = pinnedRightWidth;
this.ePinnedRightFloatingTop.style.width = pinnedRightWidth;
this.eBodyViewportWrapper.style.marginRight = pinnedRightWidth;
};
GridPanel.prototype.showPinnedColContainersIfNeeded = function () {
// no need to do this if not using scrolls
if (this.forPrint) {
return;
}
//some browsers had layout issues with the blank divs, so if blank,
//we don't display them
if (this.columnController.isPinningLeft()) {
this.ePinnedLeftHeader.style.display = 'inline-block';
this.ePinnedLeftColsViewport.style.display = 'inline';
}
else {
this.ePinnedLeftHeader.style.display = 'none';
this.ePinnedLeftColsViewport.style.display = 'none';
}
if (this.columnController.isPinningRight()) {
this.ePinnedRightHeader.style.display = 'inline-block';
this.ePinnedRightColsViewport.style.display = 'inline';
this.eBodyViewport.style.overflowY = 'hidden';
}
else {
this.ePinnedRightHeader.style.display = 'none';
this.ePinnedRightColsViewport.style.display = 'none';
this.eBodyViewport.style.overflowY = 'auto';
}
};
GridPanel.prototype.sizeHeaderAndBody = function () {
if (this.forPrint) {
// if doing 'for print', then the header and footers are laid
// out naturally by the browser. it whatever size that's needed to fit.
return;
}
var heightOfContainer = this.layout.getCentreHeight();
if (!heightOfContainer) {
return;
}
var headerHeight = this.gridOptionsWrapper.getHeaderHeight();
var numberOfRowsInHeader = this.columnController.getHeaderRowCount();
var totalHeaderHeight = headerHeight * numberOfRowsInHeader;
this.eHeader.style['height'] = totalHeaderHeight + 'px';
// padding top covers the header and the floating rows on top
var floatingTopHeight = this.floatingRowModel.getFloatingTopTotalHeight();
var paddingTop = totalHeaderHeight + floatingTopHeight;
// bottom is just the bottom floating rows
var floatingBottomHeight = this.floatingRowModel.getFloatingBottomTotalHeight();
var floatingBottomTop = heightOfContainer - floatingBottomHeight;
var heightOfCentreRows = heightOfContainer - totalHeaderHeight - floatingBottomHeight - floatingTopHeight;
this.eBody.style.paddingTop = paddingTop + 'px';
this.eBody.style.paddingBottom = floatingBottomHeight + 'px';
this.eFloatingTop.style.top = totalHeaderHeight + 'px';
this.eFloatingTop.style.height = floatingTopHeight + 'px';
this.eFloatingBottom.style.height = floatingBottomHeight + 'px';
this.eFloatingBottom.style.top = floatingBottomTop + 'px';
this.ePinnedLeftColsViewport.style.height = heightOfCentreRows + 'px';
this.ePinnedRightColsViewport.style.height = heightOfCentreRows + 'px';
};
GridPanel.prototype.setHorizontalScrollPosition = function (hScrollPosition) {
this.eBodyViewport.scrollLeft = hScrollPosition;
};
// tries to scroll by pixels, but returns what the result actually was
GridPanel.prototype.scrollHorizontally = function (pixels) {
var oldScrollPosition = this.eBodyViewport.scrollLeft;
this.setHorizontalScrollPosition(oldScrollPosition + pixels);
var newScrollPosition = this.eBodyViewport.scrollLeft;
return newScrollPosition - oldScrollPosition;
};
GridPanel.prototype.getHorizontalScrollPosition = function () {
if (this.forPrint) {
return 0;
}
else {
return this.eBodyViewport.scrollLeft;
}
};
GridPanel.prototype.turnOnAnimationForABit = function () {
var _this = this;
if (this.gridOptionsWrapper.isSuppressColumnMoveAnimation()) {
return;
}
this.animationThreadCount++;
var animationThreadCountCopy = this.animationThreadCount;
utils_1.Utils.addCssClass(this.eRoot, 'ag-column-moving');
setTimeout(function () {
if (_this.animationThreadCount === animationThreadCountCopy) {
utils_1.Utils.removeCssClass(_this.eRoot, 'ag-column-moving');
}
}, 300);
};
GridPanel.prototype.addScrollListener = function () {
var _this = this;
// if printing, then no scrolling, so no point in listening for scroll events
if (this.forPrint) {
return;
}
this.eBodyViewport.addEventListener('scroll', function () {
// we are always interested in horizontal scrolls of the body
var newLeftPosition = _this.eBodyViewport.scrollLeft;
if (newLeftPosition !== _this.lastLeftPosition) {
_this.lastLeftPosition = newLeftPosition;
_this.horizontallyScrollHeaderCenterAndFloatingCenter();
_this.masterSlaveService.fireHorizontalScrollEvent(newLeftPosition);
}
// if we are pinning to the right, then it's the right pinned container
// that has the scroll.
if (!_this.columnController.isPinningRight()) {
var newTopPosition = _this.eBodyViewport.scrollTop;
if (newTopPosition !== _this.lastTopPosition) {
_this.lastTopPosition = newTopPosition;
_this.verticallyScrollLeftPinned(newTopPosition);
_this.requestDrawVirtualRows();
}
}
});
this.ePinnedRightColsViewport.addEventListener('scroll', function () {
var newTopPosition = _this.ePinnedRightColsViewport.scrollTop;
if (newTopPosition !== _this.lastTopPosition) {
_this.lastTopPosition = newTopPosition;
_this.verticallyScrollLeftPinned(newTopPosition);
_this.verticallyScrollBody(newTopPosition);
_this.requestDrawVirtualRows();
}
});
// this means the pinned panel was moved, which can only
// happen when the user is navigating in the pinned container
// as the pinned col should never scroll. so we rollback
// the scroll on the pinned.
this.ePinnedLeftColsViewport.addEventListener('scroll', function () {
_this.ePinnedLeftColsViewport.scrollTop = 0;
});
};
GridPanel.prototype.requestDrawVirtualRows = function () {
var _this = this;
// if we are in IE or Safari, then we only redraw if there was no scroll event
// in the 50ms following this scroll event. without this, these browsers have
// a bad scrolling feel, where the redraws clog the scroll experience
// (makes the scroll clunky and sticky). this method is like throttling
// the scroll events.
var useScrollLag;
// let the user override scroll lag option
if (this.gridOptionsWrapper.isSuppressScrollLag()) {
useScrollLag = false;
}
else if (this.gridOptionsWrapper.getIsScrollLag()) {
useScrollLag = this.gridOptionsWrapper.getIsScrollLag()();
}
else {
useScrollLag = utils_1.Utils.isBrowserIE() || utils_1.Utils.isBrowserSafari();
}
if (useScrollLag) {
this.scrollLagCounter++;
var scrollLagCounterCopy = this.scrollLagCounter;
setTimeout(function () {
if (_this.scrollLagCounter === scrollLagCounterCopy) {
_this.rowRenderer.drawVirtualRows();
}
}, 50);
}
else {
this.rowRenderer.drawVirtualRows();
}
};
GridPanel.prototype.horizontallyScrollHeaderCenterAndFloatingCenter = function () {
var bodyLeftPosition = this.eBodyViewport.scrollLeft;
this.eHeaderContainer.style.left = -bodyLeftPosition + 'px';
this.eFloatingBottomContainer.style.left = -bodyLeftPosition + 'px';
this.eFloatingTopContainer.style.left = -bodyLeftPosition + 'px';
};
GridPanel.prototype.verticallyScrollLeftPinned = function (bodyTopPosition) {
this.ePinnedLeftColsContainer.style.top = -bodyTopPosition + 'px';
};
GridPanel.prototype.verticallyScrollBody = function (position) {
this.eBodyViewport.scrollTop = position;
};
GridPanel.prototype.getVerticalScrollPosition = function () {
if (this.forPrint) {
return 0;
}
else {
return this.eBodyViewport.scrollTop;
}
};
GridPanel.prototype.getBodyViewportClientRect = function () {
if (this.forPrint) {
return this.eBodyContainer.getBoundingClientRect();
}
else {
return this.eBodyViewport.getBoundingClientRect();
}
};
GridPanel.prototype.getFloatingTopClientRect = function () {
if (this.forPrint) {
return this.eFloatingTopContainer.getBoundingClientRect();
}
else {
return this.eFloatingTop.getBoundingClientRect();
}
};
GridPanel.prototype.getFloatingBottomClientRect = function () {
if (this.forPrint) {
return this.eFloatingBottomContainer.getBoundingClientRect();
}
else {
return this.eFloatingBottom.getBoundingClientRect();
}
};
GridPanel.prototype.getPinnedLeftColsViewportClientRect = function () {
return this.ePinnedLeftColsViewport.getBoundingClientRect();
};
GridPanel.prototype.getPinnedRightColsViewportClientRect = function () {
return this.ePinnedRightColsViewport.getBoundingClientRect();
};
GridPanel.prototype.addScrollEventListener = function (listener) {
this.eBodyViewport.addEventListener('scroll', listener);
};
GridPanel.prototype.removeScrollEventListener = function (listener) {
this.eBodyViewport.removeEventListener('scroll', listener);
};
__decorate([
context_3.Autowired('masterSlaveService'),
__metadata('design:type', masterSlaveService_1.MasterSlaveService)
], GridPanel.prototype, "masterSlaveService", void 0);
__decorate([
context_3.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], GridPanel.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_3.Autowired('columnController'),
__metadata('design:type', columnController_1.ColumnController)
], GridPanel.prototype, "columnController", void 0);
__decorate([
context_3.Autowired('rowRenderer'),
__metadata('design:type', rowRenderer_1.RowRenderer)
], GridPanel.prototype, "rowRenderer", void 0);
__decorate([
context_3.Autowired('floatingRowModel'),
__metadata('design:type', floatingRowModel_1.FloatingRowModel)
], GridPanel.prototype, "floatingRowModel", void 0);
__decorate([
context_3.Autowired('eventService'),
__metadata('design:type', eventService_1.EventService)
], GridPanel.prototype, "eventService", void 0);
__decorate([
context_3.Autowired('rowModel'),
__metadata('design:type', Object)
], GridPanel.prototype, "rowModel", void 0);
__decorate([
context_5.Optional('rangeController'),
__metadata('design:type', Object)
], GridPanel.prototype, "rangeController", void 0);
__decorate([
context_3.Autowired('dragService'),
__metadata('design:type', dragService_1.DragService)
], GridPanel.prototype, "dragService", void 0);
__decorate([
context_3.Autowired('selectionController'),
__metadata('design:type', selectionController_1.SelectionController)
], GridPanel.prototype, "selectionController", void 0);
__decorate([
context_5.Optional('clipboardService'),
__metadata('design:type', Object)
], GridPanel.prototype, "clipboardService", void 0);
__decorate([
context_3.Autowired('csvCreator'),
__metadata('design:type', csvCreator_1.CsvCreator)
], GridPanel.prototype, "csvCreator", void 0);
__decorate([
context_3.Autowired('mouseEventService'),
__metadata('design:type', mouseEventService_1.MouseEventService)
], GridPanel.prototype, "mouseEventService", void 0);
__decorate([
__param(0, context_2.Qualifier('loggerFactory')),
__metadata('design:type', Function),
__metadata('design:paramtypes', [logger_1.LoggerFactory]),
__metadata('design:returntype', void 0)
], GridPanel.prototype, "agWire", null);
__decorate([
context_4.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], GridPanel.prototype, "init", null);
GridPanel = __decorate([
context_1.Bean('gridPanel'),
__metadata('design:paramtypes', [])
], GridPanel);
return GridPanel;
})();
exports.GridPanel = GridPanel;
/***/ },
/* 25 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var gridOptionsWrapper_1 = __webpack_require__(3);
var columnController_1 = __webpack_require__(13);
var gridPanel_1 = __webpack_require__(24);
var eventService_1 = __webpack_require__(4);
var logger_1 = __webpack_require__(5);
var events_1 = __webpack_require__(10);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var context_3 = __webpack_require__(6);
var context_4 = __webpack_require__(6);
var MasterSlaveService = (function () {
function MasterSlaveService() {
// flag to mark if we are consuming. to avoid cyclic events (ie slave firing back to master
// while processing a master event) we mark this if consuming an event, and if we are, then
// we don't fire back any events.
this.consuming = false;
}
MasterSlaveService.prototype.agWire = function (loggerFactory) {
this.logger = loggerFactory.create('MasterSlaveService');
};
MasterSlaveService.prototype.init = function () {
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_MOVED, this.fireColumnEvent.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_VISIBLE, this.fireColumnEvent.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_PINNED, this.fireColumnEvent.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_GROUP_OPENED, this.fireColumnEvent.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_RESIZED, this.fireColumnEvent.bind(this));
};
// common logic across all the fire methods
MasterSlaveService.prototype.fireEvent = function (callback) {
// if we are already consuming, then we are acting on an event from a master,
// so we don't cause a cyclic firing of events
if (this.consuming) {
return;
}
// iterate through the slave grids, and pass each slave service to the callback
var slaveGrids = this.gridOptionsWrapper.getSlaveGrids();
if (slaveGrids) {
slaveGrids.forEach(function (slaveGridOptions) {
if (slaveGridOptions.api) {
var slaveService = slaveGridOptions.api.__getMasterSlaveService();
callback(slaveService);
}
});
}
};
// common logic across all consume methods. very little common logic, however extracting
// guarantees consistency across the methods.
MasterSlaveService.prototype.onEvent = function (callback) {
this.consuming = true;
callback();
this.consuming = false;
};
MasterSlaveService.prototype.fireColumnEvent = function (event) {
this.fireEvent(function (slaveService) {
slaveService.onColumnEvent(event);
});
};
MasterSlaveService.prototype.fireHorizontalScrollEvent = function (horizontalScroll) {
this.fireEvent(function (slaveService) {
slaveService.onScrollEvent(horizontalScroll);
});
};
MasterSlaveService.prototype.onScrollEvent = function (horizontalScroll) {
var _this = this;
this.onEvent(function () {
_this.gridPanel.setHorizontalScrollPosition(horizontalScroll);
});
};
MasterSlaveService.prototype.getMasterColumns = function (event) {
var result = [];
if (event.getColumn()) {
result.push(event.getColumn());
}
if (event.getColumns()) {
event.getColumns().forEach(function (column) {
result.push(column);
});
}
return result;
};
MasterSlaveService.prototype.getColumnIds = function (event) {
var result = [];
if (event.getColumn()) {
result.push(event.getColumn().getColId());
}
if (event.getColumns()) {
event.getColumns().forEach(function (column) {
result.push(column.getColId());
});
}
return result;
};
MasterSlaveService.prototype.onColumnEvent = function (event) {
var _this = this;
this.onEvent(function () {
// the column in the event is from the master grid. need to
// look up the equivalent from this (slave) grid
var masterColumn = event.getColumn();
var slaveColumn;
if (masterColumn) {
slaveColumn = _this.columnController.getColumn(masterColumn.getColId());
}
// if event was with respect to a master column, that is not present in this
// grid, then we ignore the event
if (masterColumn && !slaveColumn) {
return;
}
// likewise for column group
var masterColumnGroup = event.getColumnGroup();
var slaveColumnGroup;
if (masterColumnGroup) {
var colId = masterColumnGroup.getGroupId();
var instanceId = masterColumnGroup.getInstanceId();
slaveColumnGroup = _this.columnController.getColumnGroup(colId, instanceId);
}
if (masterColumnGroup && !slaveColumnGroup) {
return;
}
// in time, all the methods below should use the column ids, it's a more generic way
// of handling columns, and also allows for single or multi column events
var columnIds = _this.getColumnIds(event);
var masterColumns = _this.getMasterColumns(event);
switch (event.getType()) {
case events_1.Events.EVENT_COLUMN_MOVED:
_this.logger.log('onColumnEvent-> processing ' + event + ' toIndex = ' + event.getToIndex());
_this.columnController.moveColumns(columnIds, event.getToIndex());
break;
case events_1.Events.EVENT_COLUMN_VISIBLE:
_this.logger.log('onColumnEvent-> processing ' + event + ' visible = ' + event.isVisible());
_this.columnController.setColumnsVisible(columnIds, event.isVisible());
break;
case events_1.Events.EVENT_COLUMN_PINNED:
_this.logger.log('onColumnEvent-> processing ' + event + ' pinned = ' + event.getPinned());
_this.columnController.setColumnsPinned(columnIds, event.getPinned());
break;
case events_1.Events.EVENT_COLUMN_GROUP_OPENED:
_this.logger.log('onColumnEvent-> processing ' + event + ' expanded = ' + masterColumnGroup.isExpanded());
_this.columnController.setColumnGroupOpened(slaveColumnGroup, masterColumnGroup.isExpanded());
break;
case events_1.Events.EVENT_COLUMN_RESIZED:
masterColumns.forEach(function (masterColumn) {
_this.logger.log('onColumnEvent-> processing ' + event + ' actualWidth = ' + masterColumn.getActualWidth());
_this.columnController.setColumnWidth(masterColumn.getColId(), masterColumn.getActualWidth(), event.isFinished());
});
break;
}
});
};
__decorate([
context_3.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], MasterSlaveService.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_3.Autowired('columnController'),
__metadata('design:type', columnController_1.ColumnController)
], MasterSlaveService.prototype, "columnController", void 0);
__decorate([
context_3.Autowired('gridPanel'),
__metadata('design:type', gridPanel_1.GridPanel)
], MasterSlaveService.prototype, "gridPanel", void 0);
__decorate([
context_3.Autowired('eventService'),
__metadata('design:type', eventService_1.EventService)
], MasterSlaveService.prototype, "eventService", void 0);
__decorate([
__param(0, context_2.Qualifier('loggerFactory')),
__metadata('design:type', Function),
__metadata('design:paramtypes', [logger_1.LoggerFactory]),
__metadata('design:returntype', void 0)
], MasterSlaveService.prototype, "agWire", null);
__decorate([
context_4.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], MasterSlaveService.prototype, "init", null);
MasterSlaveService = __decorate([
context_1.Bean('masterSlaveService'),
__metadata('design:paramtypes', [])
], MasterSlaveService);
return MasterSlaveService;
})();
exports.MasterSlaveService = MasterSlaveService;
/***/ },
/* 26 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var gridOptionsWrapper_1 = __webpack_require__(3);
var rowNode_1 = __webpack_require__(19);
var context_1 = __webpack_require__(6);
var eventService_1 = __webpack_require__(4);
var context_2 = __webpack_require__(6);
var events_1 = __webpack_require__(10);
var context_3 = __webpack_require__(6);
var constants_1 = __webpack_require__(8);
var utils_1 = __webpack_require__(7);
var FloatingRowModel = (function () {
function FloatingRowModel() {
}
FloatingRowModel.prototype.init = function () {
this.setFloatingTopRowData(this.gridOptionsWrapper.getFloatingTopRowData());
this.setFloatingBottomRowData(this.gridOptionsWrapper.getFloatingBottomRowData());
};
FloatingRowModel.prototype.isEmpty = function (floating) {
var rows = floating === constants_1.Constants.FLOATING_TOP ? this.floatingTopRows : this.floatingBottomRows;
return utils_1.Utils.missingOrEmpty(rows);
};
FloatingRowModel.prototype.isRowsToRender = function (floating) {
return !this.isEmpty(floating);
};
FloatingRowModel.prototype.getRowAtPixel = function (pixel, floating) {
var rows = floating === constants_1.Constants.FLOATING_TOP ? this.floatingTopRows : this.floatingBottomRows;
if (utils_1.Utils.missingOrEmpty(rows)) {
return 0; // this should never happen, just in case, 0 is graceful failure
}
for (var i = 0; i < rows.length; i++) {
var rowNode = rows[i];
var rowTopPixel = rowNode.rowTop + rowNode.rowHeight - 1;
// only need to range check against the top pixel, as we are going through the list
// in order, first row to hit the pixel wins
if (rowTopPixel >= pixel) {
return i;
}
}
return rows.length - 1;
};
FloatingRowModel.prototype.setFloatingTopRowData = function (rowData) {
this.floatingTopRows = this.createNodesFromData(rowData, true);
this.eventService.dispatchEvent(events_1.Events.EVENT_FLOATING_ROW_DATA_CHANGED);
};
FloatingRowModel.prototype.setFloatingBottomRowData = function (rowData) {
this.floatingBottomRows = this.createNodesFromData(rowData, false);
this.eventService.dispatchEvent(events_1.Events.EVENT_FLOATING_ROW_DATA_CHANGED);
};
FloatingRowModel.prototype.createNodesFromData = function (allData, isTop) {
var _this = this;
var rowNodes = [];
if (allData) {
var nextRowTop = 0;
allData.forEach(function (dataItem) {
var rowNode = new rowNode_1.RowNode(_this.eventService, _this.gridOptionsWrapper, null);
rowNode.data = dataItem;
rowNode.floating = isTop ? constants_1.Constants.FLOATING_TOP : constants_1.Constants.FLOATING_BOTTOM;
rowNode.rowTop = nextRowTop;
rowNode.rowHeight = _this.gridOptionsWrapper.getRowHeightForNode(rowNode);
nextRowTop += rowNode.rowHeight;
rowNodes.push(rowNode);
});
}
return rowNodes;
};
FloatingRowModel.prototype.getFloatingTopRowData = function () {
return this.floatingTopRows;
};
FloatingRowModel.prototype.getFloatingBottomRowData = function () {
return this.floatingBottomRows;
};
FloatingRowModel.prototype.getFloatingTopTotalHeight = function () {
return this.getTotalHeight(this.floatingTopRows);
};
FloatingRowModel.prototype.getFloatingBottomTotalHeight = function () {
return this.getTotalHeight(this.floatingBottomRows);
};
FloatingRowModel.prototype.getTotalHeight = function (rowNodes) {
if (!rowNodes || rowNodes.length === 0) {
return 0;
}
else {
var lastNode = rowNodes[rowNodes.length - 1];
return lastNode.rowTop + lastNode.rowHeight;
}
};
__decorate([
context_2.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], FloatingRowModel.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_2.Autowired('eventService'),
__metadata('design:type', eventService_1.EventService)
], FloatingRowModel.prototype, "eventService", void 0);
__decorate([
context_3.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], FloatingRowModel.prototype, "init", null);
FloatingRowModel = __decorate([
context_1.Bean('floatingRowModel'),
__metadata('design:paramtypes', [])
], FloatingRowModel);
return FloatingRowModel;
})();
exports.FloatingRowModel = FloatingRowModel;
/***/ },
/* 27 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var utils_1 = __webpack_require__(7);
var BorderLayout = (function () {
function BorderLayout(params) {
this.sizeChangeListeners = [];
this.isLayoutPanel = true;
this.fullHeight = !params.north && !params.south;
var template;
if (!params.dontFill) {
if (this.fullHeight) {
template =
'<div style="height: 100%; overflow: auto; position: relative;">' +
'<div id="west" style="height: 100%; float: left;"></div>' +
'<div id="east" style="height: 100%; float: right;"></div>' +
'<div id="center" style="height: 100%;"></div>' +
'<div id="overlay" style="pointer-events: none; position: absolute; height: 100%; width: 100%; top: 0px; left: 0px;"></div>' +
'</div>';
}
else {
template =
'<div style="height: 100%; position: relative;">' +
'<div id="north"></div>' +
'<div id="centerRow" style="height: 100%; overflow: hidden;">' +
'<div id="west" style="height: 100%; float: left;"></div>' +
'<div id="east" style="height: 100%; float: right;"></div>' +
'<div id="center" style="height: 100%;"></div>' +
'</div>' +
'<div id="south"></div>' +
'<div id="overlay" style="pointer-events: none; position: absolute; height: 100%; width: 100%; top: 0px; left: 0px;"></div>' +
'</div>';
}
this.layoutActive = true;
}
else {
template =
'<div style="position: relative;">' +
'<div id="north"></div>' +
'<div id="centerRow">' +
'<div id="west"></div>' +
'<div id="east"></div>' +
'<div id="center"></div>' +
'</div>' +
'<div id="south"></div>' +
'<div id="overlay" style="pointer-events: none; position: absolute; height: 100%; width: 100%; top: 0px; left: 0px;"></div>' +
'</div>';
this.layoutActive = false;
}
this.eGui = utils_1.Utils.loadTemplate(template);
this.id = 'borderLayout';
if (params.name) {
this.id += '_' + params.name;
}
this.eGui.setAttribute('id', this.id);
this.childPanels = [];
if (params) {
this.setupPanels(params);
}
this.overlays = params.overlays;
this.setupOverlays();
}
BorderLayout.prototype.addSizeChangeListener = function (listener) {
this.sizeChangeListeners.push(listener);
};
BorderLayout.prototype.fireSizeChanged = function () {
this.sizeChangeListeners.forEach(function (listener) {
listener();
});
};
BorderLayout.prototype.setupPanels = function (params) {
this.eNorthWrapper = this.eGui.querySelector('#north');
this.eSouthWrapper = this.eGui.querySelector('#south');
this.eEastWrapper = this.eGui.querySelector('#east');
this.eWestWrapper = this.eGui.querySelector('#west');
this.eCenterWrapper = this.eGui.querySelector('#center');
this.eOverlayWrapper = this.eGui.querySelector('#overlay');
this.eCenterRow = this.eGui.querySelector('#centerRow');
this.eNorthChildLayout = this.setupPanel(params.north, this.eNorthWrapper);
this.eSouthChildLayout = this.setupPanel(params.south, this.eSouthWrapper);
this.eEastChildLayout = this.setupPanel(params.east, this.eEastWrapper);
this.eWestChildLayout = this.setupPanel(params.west, this.eWestWrapper);
this.eCenterChildLayout = this.setupPanel(params.center, this.eCenterWrapper);
};
BorderLayout.prototype.setupPanel = function (content, ePanel) {
if (!ePanel) {
return;
}
if (content) {
if (content.isLayoutPanel) {
this.childPanels.push(content);
ePanel.appendChild(content.getGui());
return content;
}
else {
ePanel.appendChild(content);
return null;
}
}
else {
ePanel.parentNode.removeChild(ePanel);
return null;
}
};
BorderLayout.prototype.getGui = function () {
return this.eGui;
};
// returns true if any item changed size, otherwise returns false
BorderLayout.prototype.doLayout = function () {
if (!utils_1.Utils.isVisible(this.eGui)) {
return false;
}
var atLeastOneChanged = false;
var childLayouts = [this.eNorthChildLayout, this.eSouthChildLayout, this.eEastChildLayout, this.eWestChildLayout];
var that = this;
utils_1.Utils.forEach(childLayouts, function (childLayout) {
var childChangedSize = that.layoutChild(childLayout);
if (childChangedSize) {
atLeastOneChanged = true;
}
});
if (this.layoutActive) {
var ourHeightChanged = this.layoutHeight();
var ourWidthChanged = this.layoutWidth();
if (ourHeightChanged || ourWidthChanged) {
atLeastOneChanged = true;
}
}
var centerChanged = this.layoutChild(this.eCenterChildLayout);
if (centerChanged) {
atLeastOneChanged = true;
}
if (atLeastOneChanged) {
this.fireSizeChanged();
}
return atLeastOneChanged;
};
BorderLayout.prototype.layoutChild = function (childPanel) {
if (childPanel) {
return childPanel.doLayout();
}
else {
return false;
}
};
BorderLayout.prototype.layoutHeight = function () {
if (this.fullHeight) {
return this.layoutHeightFullHeight();
}
else {
return this.layoutHeightNormal();
}
};
// full height never changes the height, because the center is always 100%,
// however we do check for change, to inform the listeners
BorderLayout.prototype.layoutHeightFullHeight = function () {
var centerHeight = utils_1.Utils.offsetHeight(this.eGui);
if (centerHeight < 0) {
centerHeight = 0;
}
if (this.centerHeightLastTime !== centerHeight) {
this.centerHeightLastTime = centerHeight;
return true;
}
else {
return false;
}
};
BorderLayout.prototype.layoutHeightNormal = function () {
var totalHeight = utils_1.Utils.offsetHeight(this.eGui);
var northHeight = utils_1.Utils.offsetHeight(this.eNorthWrapper);
var southHeight = utils_1.Utils.offsetHeight(this.eSouthWrapper);
var centerHeight = totalHeight - northHeight - southHeight;
if (centerHeight < 0) {
centerHeight = 0;
}
if (this.centerHeightLastTime !== centerHeight) {
this.eCenterRow.style.height = centerHeight + 'px';
this.centerHeightLastTime = centerHeight;
return true; // return true because there was a change
}
else {
return false;
}
};
BorderLayout.prototype.getCentreHeight = function () {
return this.centerHeightLastTime;
};
BorderLayout.prototype.layoutWidth = function () {
var totalWidth = utils_1.Utils.offsetWidth(this.eGui);
var eastWidth = utils_1.Utils.offsetWidth(this.eEastWrapper);
var westWidth = utils_1.Utils.offsetWidth(this.eWestWrapper);
var centerWidth = totalWidth - eastWidth - westWidth;
if (centerWidth < 0) {
centerWidth = 0;
}
if (this.centerWidthLastTime !== centerWidth) {
this.centerWidthLastTime = centerWidth;
this.eCenterWrapper.style.width = centerWidth + 'px';
return true; // return true because there was a change
}
else {
return false;
}
};
BorderLayout.prototype.setEastVisible = function (visible) {
if (this.eEastWrapper) {
this.eEastWrapper.style.display = visible ? '' : 'none';
}
this.doLayout();
};
BorderLayout.prototype.setNorthVisible = function (visible) {
if (this.eNorthWrapper) {
this.eNorthWrapper.style.display = visible ? '' : 'none';
}
this.doLayout();
};
BorderLayout.prototype.setupOverlays = function () {
// if no overlays, just remove the panel
if (!this.overlays) {
this.eOverlayWrapper.parentNode.removeChild(this.eOverlayWrapper);
return;
}
this.hideOverlay();
//
//this.setOverlayVisible(false);
};
BorderLayout.prototype.hideOverlay = function () {
utils_1.Utils.removeAllChildren(this.eOverlayWrapper);
this.eOverlayWrapper.style.display = 'none';
};
BorderLayout.prototype.showOverlay = function (key) {
var overlay = this.overlays ? this.overlays[key] : null;
if (overlay) {
utils_1.Utils.removeAllChildren(this.eOverlayWrapper);
this.eOverlayWrapper.style.display = '';
this.eOverlayWrapper.appendChild(overlay);
}
else {
console.log('ag-Grid: unknown overlay');
this.hideOverlay();
}
};
BorderLayout.prototype.setSouthVisible = function (visible) {
if (this.eSouthWrapper) {
this.eSouthWrapper.style.display = visible ? '' : 'none';
}
this.doLayout();
};
return BorderLayout;
})();
exports.BorderLayout = BorderLayout;
/***/ },
/* 28 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var logger_1 = __webpack_require__(5);
var context_3 = __webpack_require__(6);
var utils_1 = __webpack_require__(7);
var DragService = (function () {
function DragService() {
this.onMouseUpListener = this.onMouseUp.bind(this);
this.onMouseMoveListener = this.onMouseMove.bind(this);
}
DragService.prototype.init = function () {
this.logger = this.loggerFactory.create('HorizontalDragService');
};
DragService.prototype.addDragSource = function (params) {
params.eElement.addEventListener('mousedown', this.onMouseDown.bind(this, params));
};
DragService.prototype.onMouseDown = function (params, mouseEvent) {
// only interested in left button clicks
if (mouseEvent.button !== 0) {
return;
}
this.currentDragParams = params;
this.dragging = false;
this.eventLastTime = mouseEvent;
this.dragStartEvent = mouseEvent;
document.addEventListener('mousemove', this.onMouseMoveListener);
document.addEventListener('mouseup', this.onMouseUpListener);
// see if we want to start dragging straight away
if (params.dragStartPixels === 0) {
this.onMouseMove(mouseEvent);
}
};
DragService.prototype.isEventNearStartEvent = function (event) {
// by default, we wait 4 pixels before starting the drag
var requiredPixelDiff = utils_1.Utils.exists(this.currentDragParams.dragStartPixels) ? this.currentDragParams.dragStartPixels : 4;
if (requiredPixelDiff === 0) {
return false;
}
var diffX = Math.abs(event.clientX - this.dragStartEvent.clientX);
var diffY = Math.abs(event.clientY - this.dragStartEvent.clientY);
return Math.max(diffX, diffY) <= requiredPixelDiff;
};
DragService.prototype.onMouseMove = function (mouseEvent) {
if (!this.dragging) {
// we want to have moved at least 4px before the drag starts
if (this.isEventNearStartEvent(mouseEvent)) {
return;
}
else {
this.dragging = true;
this.currentDragParams.onDragStart(this.dragStartEvent);
}
}
this.currentDragParams.onDragging(mouseEvent);
};
DragService.prototype.onMouseUp = function (mouseEvent) {
this.logger.log('onMouseUp');
document.removeEventListener('mouseup', this.onMouseUpListener);
document.removeEventListener('mousemove', this.onMouseMoveListener);
if (this.dragging) {
this.currentDragParams.onDragStop(mouseEvent);
}
this.dragStartEvent = null;
this.eventLastTime = null;
this.dragging = false;
};
__decorate([
context_2.Autowired('loggerFactory'),
__metadata('design:type', logger_1.LoggerFactory)
], DragService.prototype, "loggerFactory", void 0);
__decorate([
context_3.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], DragService.prototype, "init", null);
DragService = __decorate([
context_1.Bean('dragService'),
__metadata('design:paramtypes', [])
], DragService);
return DragService;
})();
exports.DragService = DragService;
/***/ },
/* 29 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var utils_1 = __webpack_require__(7);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var logger_1 = __webpack_require__(5);
var eventService_1 = __webpack_require__(4);
var events_1 = __webpack_require__(10);
var context_3 = __webpack_require__(6);
var gridOptionsWrapper_1 = __webpack_require__(3);
var context_4 = __webpack_require__(6);
var SelectionController = (function () {
function SelectionController() {
}
SelectionController.prototype.agWire = function (loggerFactory) {
this.logger = loggerFactory.create('SelectionController');
this.reset();
if (this.gridOptionsWrapper.isRowModelDefault()) {
this.eventService.addEventListener(events_1.Events.EVENT_ROW_DATA_CHANGED, this.reset.bind(this));
}
else {
this.logger.log('dont know what to do here');
}
};
SelectionController.prototype.init = function () {
this.eventService.addEventListener(events_1.Events.EVENT_ROW_SELECTED, this.onRowSelected.bind(this));
};
SelectionController.prototype.getSelectedNodes = function () {
var selectedNodes = [];
utils_1.Utils.iterateObject(this.selectedNodes, function (key, rowNode) {
if (rowNode) {
selectedNodes.push(rowNode);
}
});
return selectedNodes;
};
SelectionController.prototype.getSelectedRows = function () {
var selectedRows = [];
utils_1.Utils.iterateObject(this.selectedNodes, function (key, rowNode) {
if (rowNode) {
selectedRows.push(rowNode.data);
}
});
return selectedRows;
};
SelectionController.prototype.removeGroupsFromSelection = function () {
var _this = this;
utils_1.Utils.iterateObject(this.selectedNodes, function (key, rowNode) {
if (rowNode) {
_this.selectedNodes[rowNode.id] = undefined;
}
});
};
// should only be called if groupSelectsChildren=true
SelectionController.prototype.updateGroupsFromChildrenSelections = function () {
this.rowModel.getTopLevelNodes().forEach(function (rowNode) {
rowNode.deptFirstSearch(function (rowNode) {
if (rowNode.group) {
rowNode.calculateSelectedFromChildren();
}
});
});
};
SelectionController.prototype.getNodeForIdIfSelected = function (id) {
return this.selectedNodes[id];
};
SelectionController.prototype.clearOtherNodes = function (rowNodeToKeepSelected) {
var _this = this;
utils_1.Utils.iterateObject(this.selectedNodes, function (key, otherRowNode) {
if (otherRowNode && otherRowNode.id !== rowNodeToKeepSelected.id) {
_this.selectedNodes[otherRowNode.id].setSelected(false, false, true);
}
});
};
SelectionController.prototype.onRowSelected = function (event) {
var rowNode = event.node;
if (rowNode.isSelected()) {
this.selectedNodes[rowNode.id] = rowNode;
}
else {
this.selectedNodes[rowNode.id] = undefined;
}
};
SelectionController.prototype.syncInRowNode = function (rowNode) {
if (this.selectedNodes[rowNode.id] !== undefined) {
rowNode.setSelectedInitialValue(true);
this.selectedNodes[rowNode.id] = rowNode;
}
};
SelectionController.prototype.reset = function () {
this.logger.log('reset');
this.selectedNodes = {};
};
// returns a list of all nodes at 'best cost' - a feature to be used
// with groups / trees. if a group has all it's children selected,
// then the group appears in the result, but not the children.
// Designed for use with 'children' as the group selection type,
// where groups don't actually appear in the selection normally.
SelectionController.prototype.getBestCostNodeSelection = function () {
var topLevelNodes = this.rowModel.getTopLevelNodes();
if (topLevelNodes === null) {
console.warn('selectAll not available doing rowModel=virtual');
return;
}
var result = [];
// recursive function, to find the selected nodes
function traverse(nodes) {
for (var i = 0, l = nodes.length; i < l; i++) {
var node = nodes[i];
if (node.isSelected()) {
result.push(node);
}
else {
// if not selected, then if it's a group, and the group
// has children, continue to search for selections
if (node.group && node.children) {
traverse(node.children);
}
}
}
}
traverse(topLevelNodes);
return result;
};
SelectionController.prototype.setRowModel = function (rowModel) {
this.rowModel = rowModel;
};
SelectionController.prototype.isEmpty = function () {
var count = 0;
utils_1.Utils.iterateObject(this.selectedNodes, function (nodeId, rowNode) {
if (rowNode) {
count++;
}
});
return count === 0;
};
SelectionController.prototype.deselectAllRowNodes = function () {
utils_1.Utils.iterateObject(this.selectedNodes, function (nodeId, rowNode) {
if (rowNode) {
rowNode.selectThisNode(false);
}
});
// we should not have to do this, as deselecting the nodes fires events
// that we pick up, however it's good to clean it down, as we are still
// left with entries pointing to 'undefined'
this.selectedNodes = {};
};
SelectionController.prototype.selectAllRowNodes = function () {
if (this.rowModel.getTopLevelNodes() === null) {
throw 'selectAll not available when doing virtual pagination';
}
this.rowModel.forEachNode(function (rowNode) {
rowNode.setSelected(true, false, true);
});
// because we passed in 'false' as third parameter above, the
// eventSelectionChanged event was not fired.
this.eventService.dispatchEvent(events_1.Events.EVENT_SELECTION_CHANGED);
};
// Deprecated method
SelectionController.prototype.selectNode = function (rowNode, tryMulti, suppressEvents) {
rowNode.setSelected(true, !tryMulti, suppressEvents);
};
// Deprecated method
SelectionController.prototype.deselectIndex = function (rowIndex, suppressEvents) {
if (suppressEvents === void 0) { suppressEvents = false; }
var node = this.rowModel.getRow(rowIndex);
this.deselectNode(node, suppressEvents);
};
// Deprecated method
SelectionController.prototype.deselectNode = function (rowNode, suppressEvents) {
if (suppressEvents === void 0) { suppressEvents = false; }
rowNode.setSelected(false, false, suppressEvents);
};
// Deprecated method
SelectionController.prototype.selectIndex = function (index, tryMulti, suppressEvents) {
if (suppressEvents === void 0) { suppressEvents = false; }
var node = this.rowModel.getRow(index);
this.selectNode(node, tryMulti, suppressEvents);
};
__decorate([
context_3.Autowired('eventService'),
__metadata('design:type', eventService_1.EventService)
], SelectionController.prototype, "eventService", void 0);
__decorate([
context_3.Autowired('rowModel'),
__metadata('design:type', Object)
], SelectionController.prototype, "rowModel", void 0);
__decorate([
context_3.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], SelectionController.prototype, "gridOptionsWrapper", void 0);
__decorate([
__param(0, context_2.Qualifier('loggerFactory')),
__metadata('design:type', Function),
__metadata('design:paramtypes', [logger_1.LoggerFactory]),
__metadata('design:returntype', void 0)
], SelectionController.prototype, "agWire", null);
__decorate([
context_4.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], SelectionController.prototype, "init", null);
SelectionController = __decorate([
context_1.Bean('selectionController'),
__metadata('design:paramtypes', [])
], SelectionController);
return SelectionController;
})();
exports.SelectionController = SelectionController;
/***/ },
/* 30 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var gridPanel_1 = __webpack_require__(24);
var columnController_1 = __webpack_require__(13);
var column_1 = __webpack_require__(15);
var constants_1 = __webpack_require__(8);
var floatingRowModel_1 = __webpack_require__(26);
var utils_1 = __webpack_require__(7);
var gridCell_1 = __webpack_require__(31);
var gridOptionsWrapper_1 = __webpack_require__(3);
var MouseEventService = (function () {
function MouseEventService() {
}
MouseEventService.prototype.getCellForMouseEvent = function (mouseEvent) {
var floating = this.getFloating(mouseEvent);
var rowIndex = this.getRowIndex(mouseEvent, floating);
var column = this.getColumn(mouseEvent);
if (rowIndex >= 0 && utils_1.Utils.exists(column)) {
return new gridCell_1.GridCell(rowIndex, floating, column);
}
else {
return null;
}
};
MouseEventService.prototype.getFloating = function (mouseEvent) {
var floatingTopRect = this.gridPanel.getFloatingTopClientRect();
var floatingBottomRect = this.gridPanel.getFloatingBottomClientRect();
var floatingTopRowsExist = !this.floatingRowModel.isEmpty(constants_1.Constants.FLOATING_TOP);
var floatingBottomRowsExist = !this.floatingRowModel.isEmpty(constants_1.Constants.FLOATING_BOTTOM);
if (floatingTopRowsExist && floatingTopRect.bottom >= mouseEvent.clientY) {
return constants_1.Constants.FLOATING_TOP;
}
else if (floatingBottomRowsExist && floatingBottomRect.top <= mouseEvent.clientY) {
return constants_1.Constants.FLOATING_BOTTOM;
}
else {
return null;
}
};
MouseEventService.prototype.getFloatingRowIndex = function (mouseEvent, floating) {
var clientRect;
switch (floating) {
case constants_1.Constants.FLOATING_TOP:
clientRect = this.gridPanel.getFloatingTopClientRect();
break;
case constants_1.Constants.FLOATING_BOTTOM:
clientRect = this.gridPanel.getFloatingBottomClientRect();
break;
}
var bodyY = mouseEvent.clientY - clientRect.top;
var rowIndex = this.floatingRowModel.getRowAtPixel(bodyY, floating);
return rowIndex;
};
MouseEventService.prototype.getRowIndex = function (mouseEvent, floating) {
switch (floating) {
case constants_1.Constants.FLOATING_TOP:
case constants_1.Constants.FLOATING_BOTTOM:
return this.getFloatingRowIndex(mouseEvent, floating);
default: return this.getBodyRowIndex(mouseEvent);
}
};
MouseEventService.prototype.getBodyRowIndex = function (mouseEvent) {
var clientRect = this.gridPanel.getBodyViewportClientRect();
var scrollY = this.gridPanel.getVerticalScrollPosition();
var bodyY = mouseEvent.clientY - clientRect.top + scrollY;
var rowIndex = this.rowModel.getRowAtPixel(bodyY);
return rowIndex;
};
MouseEventService.prototype.getContainer = function (mouseEvent) {
var centerRect = this.gridPanel.getBodyViewportClientRect();
var mouseX = mouseEvent.clientX;
if (mouseX < centerRect.left && this.columnController.isPinningLeft()) {
return column_1.Column.PINNED_LEFT;
}
else if (mouseX > centerRect.right && this.columnController.isPinningRight()) {
return column_1.Column.PINNED_RIGHT;
}
else {
return null;
}
};
MouseEventService.prototype.getColumn = function (mouseEvent) {
if (this.columnController.isEmpty()) {
return null;
}
var container = this.getContainer(mouseEvent);
var columns = this.getColumnsForContainer(container);
var containerX = this.getXForContainer(container, mouseEvent);
var hoveringColumn;
if (containerX < 0) {
hoveringColumn = columns[0];
}
columns.forEach(function (column) {
var afterLeft = containerX >= column.getLeft();
var beforeRight = containerX <= column.getRight();
if (afterLeft && beforeRight) {
hoveringColumn = column;
}
});
if (!hoveringColumn) {
hoveringColumn = columns[columns.length - 1];
}
return hoveringColumn;
};
MouseEventService.prototype.getColumnsForContainer = function (container) {
switch (container) {
case column_1.Column.PINNED_LEFT: return this.columnController.getDisplayedLeftColumns();
case column_1.Column.PINNED_RIGHT: return this.columnController.getDisplayedRightColumns();
default: return this.columnController.getDisplayedCenterColumns();
}
};
MouseEventService.prototype.getXForContainer = function (container, mouseEvent) {
var containerX;
switch (container) {
case column_1.Column.PINNED_LEFT:
containerX = this.gridPanel.getPinnedLeftColsViewportClientRect().left;
break;
case column_1.Column.PINNED_RIGHT:
containerX = this.gridPanel.getPinnedRightColsViewportClientRect().left;
break;
default:
var centerRect = this.gridPanel.getBodyViewportClientRect();
var centerScroll = this.gridPanel.getHorizontalScrollPosition();
containerX = centerRect.left - centerScroll;
}
var result = mouseEvent.clientX - containerX;
return result;
};
__decorate([
context_2.Autowired('gridPanel'),
__metadata('design:type', gridPanel_1.GridPanel)
], MouseEventService.prototype, "gridPanel", void 0);
__decorate([
context_2.Autowired('columnController'),
__metadata('design:type', columnController_1.ColumnController)
], MouseEventService.prototype, "columnController", void 0);
__decorate([
context_2.Autowired('rowModel'),
__metadata('design:type', Object)
], MouseEventService.prototype, "rowModel", void 0);
__decorate([
context_2.Autowired('floatingRowModel'),
__metadata('design:type', floatingRowModel_1.FloatingRowModel)
], MouseEventService.prototype, "floatingRowModel", void 0);
__decorate([
context_2.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], MouseEventService.prototype, "gridOptionsWrapper", void 0);
MouseEventService = __decorate([
context_1.Bean('mouseEventService'),
__metadata('design:paramtypes', [])
], MouseEventService);
return MouseEventService;
})();
exports.MouseEventService = MouseEventService;
/***/ },
/* 31 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var utils_1 = __webpack_require__(7);
var gridRow_1 = __webpack_require__(32);
var GridCell = (function () {
function GridCell(rowIndex, floating, column) {
this.rowIndex = rowIndex;
this.column = column;
this.floating = utils_1.Utils.makeNull(floating);
}
GridCell.prototype.getGridRow = function () {
return new gridRow_1.GridRow(this.rowIndex, this.floating);
};
GridCell.prototype.toString = function () {
return "rowIndex = " + this.rowIndex + ", floating = " + this.floating + ", column = " + (this.column ? this.column.getId() : null);
};
GridCell.prototype.createId = function () {
return this.rowIndex + "." + this.floating + "." + this.column.getId();
};
return GridCell;
})();
exports.GridCell = GridCell;
/***/ },
/* 32 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var constants_1 = __webpack_require__(8);
var utils_1 = __webpack_require__(7);
var gridCell_1 = __webpack_require__(31);
var GridRow = (function () {
function GridRow(rowIndex, floating) {
this.rowIndex = rowIndex;
this.floating = utils_1.Utils.makeNull(floating);
}
GridRow.prototype.isFloatingTop = function () {
return this.floating === constants_1.Constants.FLOATING_TOP;
};
GridRow.prototype.isFloatingBottom = function () {
return this.floating === constants_1.Constants.FLOATING_BOTTOM;
};
GridRow.prototype.isNotFloating = function () {
return !this.isFloatingBottom() && !this.isFloatingTop();
};
GridRow.prototype.equals = function (otherSelection) {
return this.rowIndex === otherSelection.rowIndex
&& this.floating === otherSelection.floating;
};
GridRow.prototype.toString = function () {
return "rowIndex = " + this.rowIndex + ", floating = " + this.floating;
};
GridRow.prototype.getGridCell = function (column) {
return new gridCell_1.GridCell(this.rowIndex, this.floating, column);
};
// tests if this row selection is before the other row selection
GridRow.prototype.before = function (otherSelection) {
var otherFloating = otherSelection.floating;
switch (this.floating) {
case constants_1.Constants.FLOATING_TOP:
// we we are floating top, and other isn't, then we are always before
if (otherFloating !== constants_1.Constants.FLOATING_TOP) {
return true;
}
break;
case constants_1.Constants.FLOATING_BOTTOM:
// if we are floating bottom, and the other isn't, then we are never before
if (otherFloating !== constants_1.Constants.FLOATING_BOTTOM) {
return false;
}
break;
default:
// if we are not floating, but the other one is floating...
if (utils_1.Utils.exists(otherFloating)) {
if (otherFloating === constants_1.Constants.FLOATING_TOP) {
// we are not floating, other is floating top, we are first
return false;
}
else {
// we are not floating, other is floating bottom, we are always first
return true;
}
}
break;
}
return this.rowIndex <= otherSelection.rowIndex;
};
return GridRow;
})();
exports.GridRow = GridRow;
/***/ },
/* 33 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var TemplateService = (function () {
function TemplateService() {
this.templateCache = {};
this.waitingCallbacks = {};
}
// returns the template if it is loaded, or null if it is not loaded
// but will call the callback when it is loaded
TemplateService.prototype.getTemplate = function (url, callback) {
var templateFromCache = this.templateCache[url];
if (templateFromCache) {
return templateFromCache;
}
var callbackList = this.waitingCallbacks[url];
var that = this;
if (!callbackList) {
// first time this was called, so need a new list for callbacks
callbackList = [];
this.waitingCallbacks[url] = callbackList;
// and also need to do the http request
var client = new XMLHttpRequest();
client.onload = function () {
that.handleHttpResult(this, url);
};
client.open("GET", url);
client.send();
}
// add this callback
if (callback) {
callbackList.push(callback);
}
// caller needs to wait for template to load, so return null
return null;
};
TemplateService.prototype.handleHttpResult = function (httpResult, url) {
if (httpResult.status !== 200 || httpResult.response === null) {
console.warn('Unable to get template error ' + httpResult.status + ' - ' + url);
return;
}
// response success, so process it
// in IE9 the response is in - responseText
this.templateCache[url] = httpResult.response || httpResult.responseText;
// inform all listeners that this is now in the cache
var callbacks = this.waitingCallbacks[url];
for (var i = 0; i < callbacks.length; i++) {
var callback = callbacks[i];
// we could pass the callback the response, however we know the client of this code
// is the cell renderer, and it passes the 'cellRefresh' method in as the callback
// which doesn't take any parameters.
callback();
}
if (this.$scope) {
var that = this;
setTimeout(function () {
that.$scope.$apply();
}, 0);
}
};
__decorate([
context_2.Autowired('$scope'),
__metadata('design:type', Object)
], TemplateService.prototype, "$scope", void 0);
TemplateService = __decorate([
context_1.Bean('templateService'),
__metadata('design:paramtypes', [])
], TemplateService);
return TemplateService;
})();
exports.TemplateService = TemplateService;
/***/ },
/* 34 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var gridOptionsWrapper_1 = __webpack_require__(3);
var expressionService_1 = __webpack_require__(22);
var columnController_1 = __webpack_require__(13);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var context_3 = __webpack_require__(6);
var utils_1 = __webpack_require__(7);
var events_1 = __webpack_require__(10);
var eventService_1 = __webpack_require__(4);
var ValueService = (function () {
function ValueService() {
}
ValueService.prototype.init = function () {
this.suppressDotNotation = this.gridOptionsWrapper.isSuppressFieldDotNotation();
};
ValueService.prototype.getValue = function (column, node) {
return this.getValueUsingSpecificData(column, node.data, node);
};
ValueService.prototype.getValueUsingSpecificData = function (column, data, node) {
var cellExpressions = this.gridOptionsWrapper.isEnableCellExpressions();
var colDef = column.getColDef();
var field = colDef.field;
var result;
// if there is a value getter, this gets precedence over a field
if (colDef.valueGetter) {
result = this.executeValueGetter(colDef.valueGetter, data, column, node);
}
else if (field && data) {
result = this.getValueUsingField(data, field);
}
else {
result = undefined;
}
// the result could be an expression itself, if we are allowing cell values to be expressions
if (cellExpressions && (typeof result === 'string') && result.indexOf('=') === 0) {
var cellValueGetter = result.substring(1);
result = this.executeValueGetter(cellValueGetter, data, column, node);
}
return result;
};
ValueService.prototype.getValueUsingField = function (data, field) {
if (!field || !data) {
return;
}
// if no '.', then it's not a deep value
if (this.suppressDotNotation || field.indexOf('.') < 0) {
return data[field];
}
else {
// otherwise it is a deep value, so need to dig for it
var fields = field.split('.');
var currentObject = data;
for (var i = 0; i < fields.length; i++) {
currentObject = currentObject[fields[i]];
if (!currentObject) {
return null;
}
}
return currentObject;
}
};
ValueService.prototype.setValue = function (rowNode, column, newValue) {
if (!rowNode || !column) {
return;
}
// this will only happen if user is trying to paste into a group row, which doesn't make sense
// the user should not be trying to paste into group rows
var data = rowNode.data;
if (utils_1.Utils.missing(data)) {
return;
}
var field = column.getColDef().field;
var newValueHandler = column.getColDef().newValueHandler;
// need either a field or a newValueHandler for this to work
if (utils_1.Utils.missing(field) && utils_1.Utils.missing(newValueHandler)) {
return;
}
var paramsForCallbacks = {
node: rowNode,
data: rowNode.data,
oldValue: this.getValue(column, rowNode),
newValue: newValue,
colDef: column.getColDef(),
api: this.gridOptionsWrapper.getApi(),
context: this.gridOptionsWrapper.getContext()
};
if (newValueHandler) {
newValueHandler(paramsForCallbacks);
}
else {
this.setValueUsingField(data, field, newValue);
}
// reset quick filter on this row
rowNode.resetQuickFilterAggregateText();
paramsForCallbacks.newValue = this.getValue(column, rowNode);
if (typeof column.getColDef().onCellValueChanged === 'function') {
column.getColDef().onCellValueChanged(paramsForCallbacks);
}
this.eventService.dispatchEvent(events_1.Events.EVENT_CELL_VALUE_CHANGED, paramsForCallbacks);
};
ValueService.prototype.setValueUsingField = function (data, field, newValue) {
// if no '.', then it's not a deep value
if (this.suppressDotNotation || field.indexOf('.') < 0) {
data[field] = newValue;
}
else {
// otherwise it is a deep value, so need to dig for it
var fieldPieces = field.split('.');
var currentObject = data;
while (fieldPieces.length > 0 && currentObject) {
var fieldPiece = fieldPieces.shift();
if (fieldPieces.length === 0) {
currentObject[fieldPiece] = newValue;
}
else {
currentObject = currentObject[fieldPiece];
}
}
}
};
ValueService.prototype.executeValueGetter = function (valueGetter, data, column, node) {
var context = this.gridOptionsWrapper.getContext();
var api = this.gridOptionsWrapper.getApi();
var params = {
data: data,
node: node,
colDef: column.getColDef(),
api: api,
context: context,
getValue: this.getValueCallback.bind(this, data, node)
};
if (typeof valueGetter === 'function') {
// valueGetter is a function, so just call it
return valueGetter(params);
}
else if (typeof valueGetter === 'string') {
// valueGetter is an expression, so execute the expression
return this.expressionService.evaluate(valueGetter, params);
}
};
ValueService.prototype.getValueCallback = function (data, node, field) {
var otherColumn = this.columnController.getColumn(field);
if (otherColumn) {
return this.getValueUsingSpecificData(otherColumn, data, node);
}
else {
return null;
}
};
__decorate([
context_2.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], ValueService.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_2.Autowired('expressionService'),
__metadata('design:type', expressionService_1.ExpressionService)
], ValueService.prototype, "expressionService", void 0);
__decorate([
context_2.Autowired('columnController'),
__metadata('design:type', columnController_1.ColumnController)
], ValueService.prototype, "columnController", void 0);
__decorate([
context_2.Autowired('eventService'),
__metadata('design:type', eventService_1.EventService)
], ValueService.prototype, "eventService", void 0);
__decorate([
context_3.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], ValueService.prototype, "init", null);
ValueService = __decorate([
context_1.Bean('valueService'),
__metadata('design:paramtypes', [])
], ValueService);
return ValueService;
})();
exports.ValueService = ValueService;
/***/ },
/* 35 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var svgFactory_1 = __webpack_require__(36);
var utils_1 = __webpack_require__(7);
var constants_1 = __webpack_require__(8);
var events_1 = __webpack_require__(10);
var svgFactory = svgFactory_1.SvgFactory.getInstance();
function groupCellRendererFactory(gridOptionsWrapper, selectionRendererFactory, expressionService, eventService) {
return function groupCellRenderer(params) {
var eGroupCell = document.createElement('span');
var node = params.node;
var cellExpandable = node.group && !node.footer;
if (cellExpandable) {
addExpandAndContract(eGroupCell, params);
}
var checkboxNeeded = params.colDef && params.colDef.cellRenderer && params.colDef.cellRenderer.checkbox && !node.footer;
if (checkboxNeeded) {
var eCheckbox = selectionRendererFactory.createSelectionCheckbox(node, params.rowIndex, params.addRenderedRowListener);
eGroupCell.appendChild(eCheckbox);
}
if (params.colDef && params.colDef.cellRenderer && params.colDef.cellRenderer.innerRenderer) {
createFromInnerRenderer(eGroupCell, params, params.colDef.cellRenderer.innerRenderer);
}
else if (node.footer) {
createFooterCell(eGroupCell, params);
}
else if (node.group) {
createGroupCell(eGroupCell, params);
}
else {
createLeafCell(eGroupCell, params);
}
// only do this if an indent - as this overwrites the padding that
// the theme set, which will make things look 'not aligned' for the
// first group level.
var suppressPadding = params.colDef && params.colDef.cellRenderer
&& params.colDef.cellRenderer.suppressPadding;
if (!suppressPadding && (node.footer || node.level > 0)) {
var paddingFactor;
if (params.colDef && params.colDef.cellRenderer && params.colDef.cellRenderer.padding >= 0) {
paddingFactor = params.colDef.cellRenderer.padding;
}
else {
paddingFactor = 10;
}
var paddingPx = node.level * paddingFactor;
if (node.footer) {
paddingPx += 10;
}
else if (!node.group) {
paddingPx += 5;
}
eGroupCell.style.paddingLeft = paddingPx + 'px';
}
return eGroupCell;
};
function addExpandAndContract(eGroupCell, params) {
var eExpandIcon = createGroupExpandIcon(true);
var eContractIcon = createGroupExpandIcon(false);
eGroupCell.appendChild(eExpandIcon);
eGroupCell.appendChild(eContractIcon);
eExpandIcon.addEventListener('click', expandOrContract);
eContractIcon.addEventListener('click', expandOrContract);
eGroupCell.addEventListener('dblclick', expandOrContract);
showAndHideExpandAndContract(eExpandIcon, eContractIcon, params.node.expanded);
// if parent cell was passed, then we can listen for when focus is on the cell,
// and then expand / contract as the user hits enter or space-bar
if (params.eGridCell) {
params.eGridCell.addEventListener('keydown', function (event) {
if (utils_1.Utils.isKeyPressed(event, constants_1.Constants.KEY_ENTER)) {
expandOrContract();
event.preventDefault();
}
});
}
function expandOrContract() {
expandGroup(eExpandIcon, eContractIcon, params);
}
}
function showAndHideExpandAndContract(eExpandIcon, eContractIcon, expanded) {
utils_1.Utils.setVisible(eExpandIcon, !expanded);
utils_1.Utils.setVisible(eContractIcon, expanded);
}
function createFromInnerRenderer(eGroupCell, params, renderer) {
utils_1.Utils.useRenderer(eGroupCell, renderer, params);
}
function getRefreshFromIndex(params) {
if (gridOptionsWrapper.isGroupIncludeFooter()) {
return params.rowIndex;
}
else {
return params.rowIndex + 1;
}
}
function expandGroup(eExpandIcon, eContractIcon, params) {
params.node.expanded = !params.node.expanded;
var refreshIndex = getRefreshFromIndex(params);
params.api.onGroupExpandedOrCollapsed(refreshIndex);
showAndHideExpandAndContract(eExpandIcon, eContractIcon, params.node.expanded);
var event = { node: params.node };
eventService.dispatchEvent(events_1.Events.EVENT_ROW_GROUP_OPENED, event);
}
function createGroupExpandIcon(expanded) {
var eIcon;
if (expanded) {
eIcon = utils_1.Utils.createIcon('groupContracted', gridOptionsWrapper, null, svgFactory.createArrowRightSvg);
}
else {
eIcon = utils_1.Utils.createIcon('groupExpanded', gridOptionsWrapper, null, svgFactory.createArrowDownSvg);
}
utils_1.Utils.addCssClass(eIcon, 'ag-group-expand');
return eIcon;
}
// creates cell with 'Total {{key}}' for a group
function createFooterCell(eGroupCell, params) {
var footerValue;
var groupName = getGroupName(params);
if (params.colDef && params.colDef.cellRenderer && params.colDef.cellRenderer.footerValueGetter) {
var footerValueGetter = params.colDef.cellRenderer.footerValueGetter;
// params is same as we were given, except we set the value as the item to display
var paramsClone = utils_1.Utils.cloneObject(params);
paramsClone.value = groupName;
if (typeof footerValueGetter === 'function') {
footerValue = footerValueGetter(paramsClone);
}
else if (typeof footerValueGetter === 'string') {
footerValue = expressionService.evaluate(footerValueGetter, paramsClone);
}
else {
console.warn('ag-Grid: footerValueGetter should be either a function or a string (expression)');
}
}
else {
footerValue = 'Total ' + groupName;
}
var eText = document.createTextNode(footerValue);
eGroupCell.appendChild(eText);
}
function getGroupName(params) {
var cellRenderer = params.colDef.cellRenderer;
if (cellRenderer && cellRenderer.keyMap
&& typeof cellRenderer.keyMap === 'object' && params.colDef.cellRenderer !== null) {
var valueFromMap = cellRenderer.keyMap[params.node.key];
if (valueFromMap) {
return valueFromMap;
}
else {
return params.node.key;
}
}
else {
return params.node.key;
}
}
// creates cell with '{{key}} ({{childCount}})' for a group
function createGroupCell(eGroupCell, params) {
var groupName = getGroupName(params);
var colDefOfGroupedCol = params.api.getColumnDef(params.node.field);
if (colDefOfGroupedCol && typeof colDefOfGroupedCol.cellRenderer === 'function') {
params.value = groupName;
utils_1.Utils.useRenderer(eGroupCell, colDefOfGroupedCol.cellRenderer, params);
}
else {
eGroupCell.appendChild(document.createTextNode(groupName));
}
// only include the child count if it's included, eg if user doing custom aggregation,
// then this could be left out, or set to -1, ie no child count
var suppressCount = params.colDef.cellRenderer && params.colDef.cellRenderer.suppressCount;
if (!suppressCount && params.node.allChildrenCount >= 0) {
eGroupCell.appendChild(document.createTextNode(" (" + params.node.allChildrenCount + ")"));
}
}
// creates cell with '{{key}} ({{childCount}})' for a group
function createLeafCell(eParent, params) {
if (utils_1.Utils.exists(params.value)) {
var eText = document.createTextNode(' ' + params.value);
eParent.appendChild(eText);
}
}
}
exports.groupCellRendererFactory = groupCellRendererFactory;
/***/ },
/* 36 */
/***/ function(module, exports) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var SVG_NS = "http://www.w3.org/2000/svg";
var SvgFactory = (function () {
function SvgFactory() {
}
SvgFactory.getInstance = function () {
if (!this.theInstance) {
this.theInstance = new SvgFactory();
}
return this.theInstance;
};
SvgFactory.prototype.createFilterSvg = function () {
var eSvg = createIconSvg();
var eFunnel = document.createElementNS(SVG_NS, "polygon");
eFunnel.setAttribute("points", "0,0 4,4 4,10 6,10 6,4 10,0");
eFunnel.setAttribute("class", "ag-header-icon");
eSvg.appendChild(eFunnel);
return eSvg;
};
SvgFactory.prototype.createFilterSvg12 = function () {
var eSvg = createIconSvg(12);
var eFunnel = document.createElementNS(SVG_NS, "polygon");
eFunnel.setAttribute("points", "0,0 5,5 5,12 7,12 7,5 12,0");
eFunnel.setAttribute("class", "ag-header-icon");
eSvg.appendChild(eFunnel);
return eSvg;
};
SvgFactory.prototype.createMenuSvg = function () {
var eSvg = document.createElementNS(SVG_NS, "svg");
var size = "12";
eSvg.setAttribute("width", size);
eSvg.setAttribute("height", size);
["0", "5", "10"].forEach(function (y) {
var eLine = document.createElementNS(SVG_NS, "rect");
eLine.setAttribute("y", y);
eLine.setAttribute("width", size);
eLine.setAttribute("height", "2");
eLine.setAttribute("class", "ag-header-icon");
eSvg.appendChild(eLine);
});
return eSvg;
};
SvgFactory.prototype.createColumnsSvg12 = function () {
var eSvg = createIconSvg(12);
[0, 4, 8].forEach(function (y) {
[0, 7].forEach(function (x) {
var eBar = document.createElementNS(SVG_NS, "rect");
eBar.setAttribute("y", y.toString());
eBar.setAttribute("x", x.toString());
eBar.setAttribute("width", "5");
eBar.setAttribute("height", "3");
eBar.setAttribute("class", "ag-header-icon");
eSvg.appendChild(eBar);
});
});
return eSvg;
};
SvgFactory.prototype.createArrowUpSvg = function () {
return createPolygonSvg("0,10 5,0 10,10");
};
SvgFactory.prototype.createArrowLeftSvg = function () {
return createPolygonSvg("10,0 0,5 10,10");
};
SvgFactory.prototype.createArrowDownSvg = function () {
return createPolygonSvg("0,0 5,10 10,0");
};
SvgFactory.prototype.createArrowRightSvg = function () {
return createPolygonSvg("0,0 10,5 0,10");
};
SvgFactory.prototype.createSmallArrowRightSvg = function () {
return createPolygonSvg("0,0 6,3 0,6", 6);
};
SvgFactory.prototype.createSmallArrowDownSvg = function () {
return createPolygonSvg("0,0 3,6 6,0", 6);
};
//public createOpenSvg() {
// return createPlusMinus(true);
//}
//
//public createCloseSvg() {
// return createPlusMinus(false);
//}
// UnSort Icon SVG
SvgFactory.prototype.createArrowUpDownSvg = function () {
var svg = createIconSvg();
var eAscIcon = document.createElementNS(SVG_NS, "polygon");
eAscIcon.setAttribute("points", '0,4 5,0 10,4');
svg.appendChild(eAscIcon);
var eDescIcon = document.createElementNS(SVG_NS, "polygon");
eDescIcon.setAttribute("points", '0,6 5,10 10,6');
svg.appendChild(eDescIcon);
return svg;
};
//public createFolderOpen(size: number): HTMLElement {
// var svg = `<svg width="${size}" height="${size}" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1717 931q0-35-53-35h-1088q-40 0-85.5 21.5t-71.5 52.5l-294 363q-18 24-18 40 0 35 53 35h1088q40 0 86-22t71-53l294-363q18-22 18-39zm-1141-163h768v-160q0-40-28-68t-68-28h-576q-40 0-68-28t-28-68v-64q0-40-28-68t-68-28h-320q-40 0-68 28t-28 68v853l256-315q44-53 116-87.5t140-34.5zm1269 163q0 62-46 120l-295 363q-43 53-116 87.5t-140 34.5h-1088q-92 0-158-66t-66-158v-960q0-92 66-158t158-66h320q92 0 158 66t66 158v32h544q92 0 158 66t66 158v160h192q54 0 99 24.5t67 70.5q15 32 15 68z"/></svg>`;
// return _.loadTemplate(svg);
//}
//
//public createFolderClosed(size: number): HTMLElement {
// var svg = `<svg width="${size}" height="${size}" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1600 1312v-704q0-40-28-68t-68-28h-704q-40 0-68-28t-28-68v-64q0-40-28-68t-68-28h-320q-40 0-68 28t-28 68v960q0 40 28 68t68 28h1216q40 0 68-28t28-68zm128-704v704q0 92-66 158t-158 66h-1216q-92 0-158-66t-66-158v-960q0-92 66-158t158-66h320q92 0 158 66t66 158v32h672q92 0 158 66t66 158z"/></svg>`;
// return _.loadTemplate(svg);
//}
SvgFactory.prototype.createFolderOpen = function () {
var eImg = document.createElement('img');
eImg.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAZpJREFUeNqkU0tLQkEUPjN3ShAzF66CaNGiaNEviFpLgbSpXf2ACIqgFkELaVFhtAratQ8qokU/oFVbMQtJvWpWGvYwtet9TWfu1QorvOGBb84M5/WdOTOEcw7tCKHBlT8sMIhr4BfLGXC4BrALM8QUoveHG9oPQ/NhwVCQbOjp0C5F6zDiwE7Aed/p5tKWruufTlY8bkqliqVN8wvH6wvhydWd5UYdkYCqqgaKotQTCEewnJuDBSqVmshOrWhKgCJVqeHcKtiGKdqTgGIOQmwGum7AxVUKinXKzX1/1y5Xp6g8gpe8iBxuGZhcKjyXQZIkmBkfczS62YnRQCKX75/b3t8QDNhD8QX83V5Ipe7Bybug2Pt5NJ7A4nEqGOQKT+Bzu0HTDNB1syUYYxCJy0kwzIRogb0rKjAiQVXXHLVQrqqvsZtsFu8hbyXwe73WeMQtO5GonJGxuiyeC+Oa4fF5PEirw9nbx9FdxtN5eMwkzcgRnoeCa9DVM/CvH/R2l+axkz3clQguOFjw1f+FUzEQCqJG2v3OHwIMAOW1JPnAAAJxAAAAAElFTkSuQmCC';
return eImg;
};
SvgFactory.prototype.createFolderClosed = function () {
var eImg = document.createElement('img');
eImg.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAARlJREFUeNqsUz1PwzAUPDtOUASpYKkQVWcQA/+DhbLA32CoKAMSTAwgFsQfQWLoX4GRDFXGIiqiyk4e7wUWmg8phJPOtvzunc6WrYgIXaD06KKhij0eD2uqUxBeDC9OmcNKCYd7ujm7ryodXz5ong6UPpqcP9+O76y1vwS+7yOOY1jr0OttlQyiaB0n148TAyK9XFqkaboiSTEYDNnkDUkyKxkkiSQkzQbwsiyHcBXz+Tv6/W1m+QiSEDT1igTO5RBWYbH4rNwPw/AnQU5ek0EdCj33SgLjHEHYzoAkgfmHBDmZuktsQqHPvxN0MyCbbWjtIQjWWhlIj/QqtT+6QrSz+6ef9DF7VTwFzE2madnu5K2prt/5S4ABADcIlSf6Ag8YAAAAAElFTkSuQmCC';
return eImg;
};
SvgFactory.prototype.createColumnIcon = function () {
var eImg = document.createElement('img');
eImg.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAOCAYAAAAMn20lAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RTcwQ0JFMzlENjZEMTFFNUFEQ0U5RDRCNjFFRENGMUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RTcwQ0JFM0FENjZEMTFFNUFEQ0U5RDRCNjFFRENGMUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpFNzBDQkUzN0Q2NkQxMUU1QURDRTlENEI2MUVEQ0YxQyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpFNzBDQkUzOEQ2NkQxMUU1QURDRTlENEI2MUVEQ0YxQyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqDOrJYAAABxSURBVHjalJBBDsAgCAQXxXvj2/o/X9Cvmd4lUpV4MXroJMTAuihQSklVMSCysxSBW4uWKzjG6zZLDxrlWis5EVEThoWmi3N+nxAYs2WnXQY34L3HisMWPQlHB+2FPtNW6D/8+ziBRcroOXc0B/wEGABY6TPS1FU0bwAAAABJRU5ErkJggg==';
return eImg;
};
SvgFactory.prototype.createColumnsIcon = function () {
var eImg = document.createElement('img');
eImg.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OENFQkI4NDhENzJDMTFFNUJDNEVFRjgwRDI3MkU1Q0EiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OENFQkI4NDlENzJDMTFFNUJDNEVFRjgwRDI3MkU1Q0EiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Q0VCQjg0NkQ3MkMxMUU1QkM0RUVGODBEMjcyRTVDQSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Q0VCQjg0N0Q3MkMxMUU1QkM0RUVGODBEMjcyRTVDQSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pj6ozGQAAAAuSURBVHjaYmRgYPjPgBswQml8anBK/idGDQsxNpCghnTAOBoGo2EwGgZgABBgAHbrH/l4grETAAAAAElFTkSuQmCC';
return eImg;
};
SvgFactory.prototype.createPinIcon = function () {
var eImg = document.createElement('img');
eImg.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAedJREFUeNqkUktLG1EYPTN31CIN0oWbIAWhKJR0FXcG6gOqkKGKVvEXCKULC91YSBcK7jXgQoIbFxn3ErFgFlIfCxUsQsCoIJYEm9LWNsGmJjPTM+Oo44Aa6IUzd+bec77H+UYyTRP/s5SsLFfCCxEjOhD9CXw64ccXJj7nLleYaMSvaa/+Au9Y73P3RUUBDIuXyaAxGu35A7xnkM57A7icCZXIO8/nkVleRn1/f9cv0xzjfVclFdi9N8ZivfnDQxQKBTwoFvFicLCVQSesJIpHMEY8dSqQWa54Eov1fF9ZQVHXsZNMblhnNE/wPmJPIX1zjOG2+fkgslnozHR2eopLcSIe3yoD48y45FbIxoVJNjimyMehoW3T58PvdBq53V18zeWwFo+vUfyBlCVvj0Li4/M1DnaAUtXCQkNDR4f/294eaoTAwdHRCROMWlzJZfC+1cKcJF07b5o+btWvV1eDyVBouyUcDj5UFDg924tVYtERpz0mCkmSulOp1GQgEIj0yvKPYiKBlwMDQXfPU47walEEmb8z0a5p2qaiKMPEoz6ezQLdM8DWNDDzltym24YthHimquoshSoDicvzZkK9S+h48pjCN4ZhrBPHTptlD0qevezwdCtAHVHrMti4A7rr3eb+E2AAoGnGkgkzpg8AAAAASUVORK5CYII=';
return eImg;
};
SvgFactory.prototype.createPlusIcon = function () {
var eImg = document.createElement('img');
eImg.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAatJREFUeNqkU71KA0EQ/vaiib+lWCiordidpSg+QHwDBSt7n8DGhwhYCPoEgqCCINomARuLVIqgYKFG5f6z68xOzrvzYuXA3P7MzLffN7unjDH4jw3xx91bQXuxU4woNDjUX7VgsFOIH3/BnHgC0J65AzwFjDpZgoG7vb7lMsPDq6MiuK+B+kjGwFpCUjwK1DIQ3/dl0ssVh5TTM0UJP8aBgBKGleSGIWyP0oKYRm3KPSgYJ0Q0EpEgCASA2WmWZQY3kazBmjP9UhBFEbTWAgA0f9W2yHeG+vrd+tqGy5r5xNTT9erSqpvfdxwHN7fXOQZ0QhzH1oWArLsfXXieJ/KTGEZLcbVaTVn9ALTOLk9L+mYX5lxd0Xh6eGyVgspK6APwI8n3x9hmNpORJOuBo5ah8GcTc7dAHmkhNpYQlpHr47Hq2NspA1yEwHkoO/MVYLMmWJNarjEUQBzQw7rPvardFC8tZuOEwwB4p9PHqXgCdm738sUDJPB8mnwKj7qCTtJ527+XyAs6tOf2Bb6SP0OeGxRTVMp2h9nweWMoKS20l3+QT/vwqfZbgAEAUCrnlLQ+w4QAAAAASUVORK5CYII=';
return eImg;
};
SvgFactory.prototype.createMinusIcon = function () {
var eImg = document.createElement('img');
eImg.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAKVJREFUeNpi/P//PwMlgImBQjBqAAMDy3JGRgZGBoaZQGxMikZg3J0F4nSWHxC+cUBamvHXr18Zfv36Bca/f/8G43///oExKLphmImJieHagQMQF7QDiSwg/vnzJ8P3799RDPj79y+KRhhmBLr6I1DPNJABtxkYZM4xMFx7uXAhSX5/CtQD0gv0OgMfyCAgZgViZiL1/wXi30D8h3E0KVNuAECAAQDr51qtGxzf1wAAAABJRU5ErkJggg==';
return eImg;
};
SvgFactory.prototype.createMoveIcon = function () {
var eImg = document.createElement('img');
eImg.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAoZJREFUeNpsU81rE0EUf7uzu2lNVJL6Eb0IBWusepqcKm3wEFkvxqDgQbwUtYeeg5cccwj4F7QKChEPipRcdMGDiaAoJAexLYViwYsfbU1JYkx3Zz98b8220Wbg7ez7vXm/mffmN9Kh1G2QGQOmMDiRyYEkSaCoKjDGdAAooOUdxzFsIcDzPPhSvgeO7YDrOLBRmQdlJHULVE0DNRSCvqFjUuHqhWP8+etvhR5m0CeengVhmiAsywdl2Dt03K1wZSrO220XaCaf8AFrQel32s0mrDcaWfovrq3Vc9OTvHj/Tb0Xzh6JxQwNyxtIgPXpqqJk94fDM+1Oh6CaEF4QTiIOGJ/DdQtBObsEmGxbll/rkCyDPDwMzW4XhHD88EH0NcRxDUeX4/qdnsi0s8Aas+kEp8Zg82pMkmpDigKbjSbQTD7hFL94/jin9ZRHBNLo3Wrt+uUkbzQsiEZVMPGKfv76DaawodnahkhY86+PNnXxs77ZgVOjMahWVuufi1NJRZhWvvT0beHGtQn++Nm7en+DzqXO8vfVxX+wsYnT/JWxWEe95P0eILsvkkdPKn4PUEBJmunILab5992PLVU++skoNmOniT7JX2Fkt5GM1EjqbMohXzQmqo7KwCQ6zYKiabu30PpQAnZ0HKSRMcMRwnBddw4ZOO4GLRYKFFdDhrrteTMMdWB9/QTdH8sIp0EKmNT4GWDjGZAPJ3TcrbBv+ibfwtwDqBvzYck/truxYjjLZRDflwLt7JUmEoAymdPV7INa5IXn0Uw+4f8PIqATMLQIWpQ0E/RFTmQ4nLx0B1Zfzrsr5eAmbLQW2hYpHwkcqfegNBJhzwY9sGC4aCZaF81CAvePAAMAcwtApJX/Wo0AAAAASUVORK5CYII=';
return eImg;
};
SvgFactory.prototype.createLeftIcon = function () {
var eImg = document.createElement('img');
eImg.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAe9JREFUeNqkUz1oE2EYfu7uuyRKLCFt6g+4VNQWWod+mQRRR1En0UFOHKoNCMKNju4SEQsOzsFNcRGl4CS42AzaKhKcsqhk0Etj7u+773y/6+USbOLSF5574b33eX+e906L4xh7MaYeC/c/IFcowMznEzDTBGPMoldnqEFtkPy708mIqvHHe0s7BcaYJYSwRwPu9vbYRH1XJI4tEYb2jYtHOHko9LvdxE9cYZQcBoF9+9oJ7jgRQt+HFAJSyv9rkO6UkGvXF3mr9QelkpkUINsYR6T8Jrkay8i+b9+5yfnmppMmSFw6e4yrIynBBsdS3jQ1PH/zeTiBIt+9dZpvbTlZh1+Oh/Z3F33XRUj7R1GUxA3DwMx0EYHnDUUMPe9Rfe1tc26uiL6M8aXno+UH6O7PIShPIapMQx6sQMxW4JbL+MkKCKhwNgGN2FD7Pnz82j63coF/aoc4ekDHtxfrzUniaZrW/FfEBomI9Scv7fnVq7zdBwIqajBWpeTd99d3vgBNCaQSzMOLyJ+6ApSPWxSzD61a/MfThupSjVuvxk2A3sazYYGBGbML0OcvW9rMyeRLFO8eVGXnKyacMiug5ikSplLs05dXzqNQWpbv6/URjpK+m6JH3GhQQI2QI+RTmBO0EwQ/RUBcqe31d/4rwAB0lPTXqN6HzgAAAABJRU5ErkJggg==';
return eImg;
};
SvgFactory.prototype.createRightIcon = function () {
var eImg = document.createElement('img');
eImg.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAfBJREFUeNqkUz1s00AU/hwSh1SEhiFCYuhCVSExgHRiYKjEVCEyMMGAsjCxZunesWM7dIgEA8JISPyoUhFDFoZOSE2GgtrSIAYWSEPb1HUS23c+8+7iuE5/JKQ+6fOdz/e+970fG2EY4jyWVo9b819hGEZ8WCgW4z2dV2lZFUJYgnNwz9PwXRebc3cGBMfN6XSQy+eHryyCMuv43dRpBCpSz7b1qlB+cI3RWkEYlv+LQFkgBLxuV8s9OAhQLk0w7vsnSHQKVMhqQuYRSRBouK5AqyXwpHSdvfywUYkKb8UEFIU9fXybOY6A+jbszGAP7O/7RBKg2eR4dH+KvV5ej0k0gaqobXO0214c3acUDnt99Pp9cKqDUqLsx68LuHd3gtU+b1eOCOiSaaZQKJjgMsSOy7EnJcSYCZnLwKbojic1weTVMXz81KhTexeSKdSXqrUzh2X84Qxr9SQmx1P48q6mnTPZrJUs4jMp5QlHlSd1Y203fRGFK8DPV28HzqZpjXShW3+D00bamCrpNU9DuvvcGsjea1rO+nvw39+AxRCGckyO8ciQFG8gPT27ptX8/b4gt1asYGdzRGE6MVCXCJcj5NShbG9B/NnYhttpyMYL5XmTYEdw1KgMFSgJJiEbIXNGPQXBi+CTrzTO+zv/E2AA3Y8Nbp4Kn1sAAAAASUVORK5CYII=';
return eImg;
};
SvgFactory.prototype.createColumnVisibleIcon = function () {
var eImg = document.createElement('img');
eImg.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAdhJREFUeNrUk01LAlEUhu845QdRUxZBhIIWtFBso2AwRAVNLqKltHCb63b9A/9AixZCELhyYdAmEyYCBcOlNa1CSQoxog/DMY3x9p5B27Zw1YGH8XrO+55759wROOdsmLCwIWNoAwFh/ugfZQKsAQV4gbNf9woqIAeuQHOgGxgIMNix2Wx7iqIsxmKxWU3TxgqFgpWSsix3fT5fK5VKPedyuftOp5OE7oz60hHsYD8UCh3k83k5k8ksGYYx5XK5rK2WzgiIrPQf5aiGakljakVRjKDrZaPR6Oi6zglVVTlFMnnMZXmdK8o2x674IE+1pCHtCFx2w+GwE9u3drtd81yJRAKdDXZ4eGSuFxb87PHxjg3yVEsaNNolg5NSqTTVbDaX7Agq8Hg8TFWLbGVl0xTY7TY2Our5NfhCQPNAWtFisdSr1WqvWCwawWBwRpKkcZyXadoN83qXmSQ50V1jGxurpnGlUqnH4/FzvItTmoo5ApjQNMIOh2MrEon4o9Gov1arzZXL5XHKBwKBT7fbXU+n07fZbPa23W5f4BVd93o9TgYimATTMHHCbB5PN9ZSf0LmrsEHRDWInvB8w/oFvAv920iFDkBzF/64fHTjvoFOxsL//5h+BBgAwjbgRLl5ImwAAAAASUVORK5CYII=';
return eImg;
};
SvgFactory.prototype.createColumnHiddenIcon = function () {
var eImg = document.createElement('img');
eImg.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0ZGNDRBMkJENkU3MTFFNUIwOTBGRTc0MTA3OTI2OEYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0ZGNDRBMkNENkU3MTFFNUIwOTBGRTc0MTA3OTI2OEYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3RkY0NEEyOUQ2RTcxMUU1QjA5MEZFNzQxMDc5MjY4RiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RkY0NEEyQUQ2RTcxMUU1QjA5MEZFNzQxMDc5MjY4RiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjQ0mkwAAACISURBVHjaYvz//z8DJYCJgUIwDAxgKSwspMwAIOYDYlcgtgNiJSBWBGJhIGaHyoHAJyD+CcRvgfg+EN8D4kNAvBtkwGEg1iNgkSCUlgBibSg7D4gvgwywRXKBChArALEIELMCsQBU8Qcg/g3Eb4D4ARDfBeKDMBeAnLcWikkGjKMpcRAYABBgACqXGpPEq63VAAAAAElFTkSuQmCC';
return eImg;
};
SvgFactory.prototype.createGroupIcon = function () {
var eImg = document.createElement('img');
eImg.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NUVCNUI1OUNENkYwMTFFNThGNjJDNUE3ODIwMEZERDciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NUVCNUI1OURENkYwMTFFNThGNjJDNUE3ODIwMEZERDciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo1RUI1QjU5QUQ2RjAxMUU1OEY2MkM1QTc4MjAwRkRENyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo1RUI1QjU5QkQ2RjAxMUU1OEY2MkM1QTc4MjAwRkRENyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PlkCTGoAAACDSURBVHjaYmRgYPjPgBswQun/+BT8X3x5DoZErG4KCj/3/DcMNZMNuRiYGPADRiRX4HYBJV5AB0QrhAGW//8hehgZES6FiaGLYzUAq7sxNf0nxQCsinHFAguegCPKBYxoYfAfWQxNnPgwINJVYMDEQCEYfLHASGoKRQlxPN7BqQggwAAN+SopPnDCwgAAAABJRU5ErkJggg==';
return eImg;
};
SvgFactory.prototype.createAggregationIcon = function () {
var eImg = document.createElement('img');
eImg.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAMZJREFUeNpi/P//PwMlgImBQjDwBrCgmMYENq8RiLVxqL8KxPX//v1DiIACEYYZGRlBmBOIe4B4PRDrQMUYoGyQGIoebAbADJkAxFuAWA9JXJdYA0CYC4inAPFOINZHlkPWgxKIcFMhQA0aFveB+DbOUERxDhQAbTEC4qNAPBfqEmRx3F6AAhOgojNAvBikGckumDiKHhY0B3ECcTVQQhRIg/B1NNeeB1IgQ7/BXYvmdE6oAnYcPv4NxF+BerAbMDTzAkCAAQChYIl8b86M1gAAAABJRU5ErkJggg==';
return eImg;
};
SvgFactory.prototype.createGroupIcon12 = function () {
var eImg = document.createElement('img');
eImg.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MTNFQzE0NTdEOTk1MTFFNUI4MjJGMjBFRDk4MkMxNjAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTNFQzE0NThEOTk1MTFFNUI4MjJGMjBFRDk4MkMxNjAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoxM0VDMTQ1NUQ5OTUxMUU1QjgyMkYyMEVEOTgyQzE2MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoxM0VDMTQ1NkQ5OTUxMUU1QjgyMkYyMEVEOTgyQzE2MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PiInRbAAAAEjSURBVHjaYuTi5XqkpKvI9/fXHwZWDlaGZ/eeM7x59raDAQj4pOQrBBUVGP78+MfAzMbE8PLKhU8Mhnb6/6//P/f/8N/d/x8AWUn1cf+BaleCsFPt5P/T/v//3/zj//8JQFrB1vM/I5IN3EAbfgBt+Au0QRBqw3sMG0DiQMwPxFuB2BzKZmLAAViA+BOU/QOI7wPxRyhfCIhT0NT/ZETi7AZiZiD+DOXL6EdlGdkWFzF8evaDgUuIg2F9eiTYBrhuIJ4NxHegfDsgnobuJGQbNgBxMRDfhfLFgDgB3UnInPVALMxAACDbcBGItwDxAyhfCRismejBiuyHiUBsDMQmUL6cSXIJf0hTDsNboEN42RkYJth58TPisV0eaMNFdBsAAgwANVJzd8zQrUcAAAAASUVORK5CYII=';
return eImg;
};
SvgFactory.prototype.createCutIcon = function () {
var eImg = document.createElement('img');
eImg.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAlRJREFUeNqkU09okmEcfj6ThNRhjUEJDhxDZ1t4sI3lDrKDhESHpC6x6yBoh52GfcdBJDvtElEUdKhOSq1JjF0SabSton9OmIeRxVKIrUgdU5xvv8e+hXXYpRcefv+e5/mh7/tpSin8z9Gi0Sg0TTsv+edarfa+Wq2iUqmgXC6DudVqhd1uh81ma+UWi8Uv3G5ZPJ9MJmGq1+twOBynBOek6T9oG+fkkU8djymVSiGTyWBiYuL6QSb7YvLIp679+D0ej57NZpX8JD0QCPj7+vrgcrnAyJp9zskj3zD928Tr9er5fF5FIhFdiH4aMLJmn/N98R+Dq5qGSUFQwKFs1AuFggqFQrrT6bzIyJp9zoMGn7qWQU6ST4JNQeK3kd/n8+nFYlGFw+HFdDqtWLOfMHjk5wwDjckRwGYGeJVnBMdXgaNrbveJKysr/etu91pHtVo8BnyXWUnwsgHM7wAVX7MJ0cEmjWvW4eGzjpGRXnNnZ8cFeRi9pRI+dnXtjMbj/cLp57rG1tbPH0tLwd3l5QHp3RBU8E7Txr4MDb1V8bh60tOzfhN4vTc9rRYkCm4tGDX7nJNHPnWt/+CFpt1rF9emptScxKfA2DNZwThn9NtNWjoxMH1Tqru+va02NzbK47FY4PHMzJtdYPYD8OChGDCyZp9z8sinrnWXt4E7q4ODRbrelw0x2Xjyn1fImn3OySOfutYt+IDRSeCycAZeAYm7wKLkshR87A1+cILDAss4EDkNXJI8Ows8yin1nENn+5MXNA3hnpHzHBKYjWhqe4lffwkwAMRcPMqRQZ4vAAAAAElFTkSuQmCC';
return eImg;
};
SvgFactory.prototype.createCopyIcon = function () {
var eImg = document.createElement('img');
eImg.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAgBJREFUeNqMk79rFEEcxd/M7V2QAzVFEOMFGwNiIGCjEdIEhYODmEawsFf8G4QQSCPYyqUWCdhY2qSQECSpInvFJYT8Ki6dZO8Sb2P29pfvu+4sm+UKv/AYZna/b95ndla9WFyEUmoewG0Mr+9hGB5EYYhypZIseO0fCHa3sP/LhxVFkazd+by0tOIFAQac+3w5imPYto1Pa2tv+VxR+8bRuv8EevIRxn5uQoszpWI2RjSIBgMMLi/hui76/T6+Li+v8Pkz9k0Wo409pFHAJooUCiWqYlk46nTQ2ttD+/gY75pNPKjVmmfd7gf2vKbu5U0sMWBpzWatNcAkv7n789lZ1GdmMqQ3cbxApIUikg58H5S0JgkSE/L/L1JmoNJmMZEDzCNdK5cxwtFxHHxcXcXTqalm27Zf7rRaRKBBhkAhxcgjiYlUo16HfKlqtYpv29u95Az81EClCFLyaQ0SCib/dtNJ6qsGfDmJnRqoXIKiyVUDz8sSSGy5VnI3ikh5k1KplBnog/V19BxnRCZmV15dGCSdO1wziphcS3rrT7d71zk5Ob8+Pf3eMN4aH3/8qtGYM0hp7iyJbO0bBOrMPTz8kl6OpGoTEzEncwapaCLrRNfu6Wli0Etl6mbfdb0MiYrlXsjZyAUTE0qwOxsbo9aQ3/dGEWlYRRcX5xxG/wowAC8cIjzfyA4lAAAAAElFTkSuQmCC';
return eImg;
};
SvgFactory.prototype.createPasteIcon = function () {
var eImg = document.createElement('img');
eImg.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAadJREFUeNpinGLPAAaMjAxwcJ9Tk+0Bt7YPkCkKFXqt8PXqFsXv13/B1Pz/D6FZENoYZgKxMYgh9OI6i567q5hFUp4kiH9i3qTnT3auqWPgZ/gDVXsWiNPBFk+2hxtwxi0syfjy5csM0vFzGTg42Bj4+XnAEh8/fmH48eMXw9OFyQy6uroMu1bNAxlgAnbB338IJ6hlzWU4uXgJw6FDO4Ga+Rl4eXkZWFlZGb58/crw6eNHBjG7Iga1yAiG7SvmwfWw/P2LMADkraiYaIb79+4xYAOKSkpgNch6UFzwFxgy//79Y5BTUMBqwF+g3H8mJgZkPSgu+Ac04M+/fwz4AAswulBc8Ocfqg1/kGWxAEagAch6WP78RfUCIQOYmJkZ/qC44A+qAb8JeIEZZMkfXC4gwgsQNUgG/CbRC2BXIhvw8AsDgzQnkgEEvACxBMJ++h0YJmufMTA8ABry8xckGkFOxIdBakBqQXpAekGZiXPTSwbeUAEgB5hsObm58acDoJp3nxkYNn1gEANyP4MNAGKxh18ZbsXxsjMQA97/Z7gF0gPEfwACDAB/y9xB1I3/FQAAAABJRU5ErkJggg==';
return eImg;
};
SvgFactory.prototype.createMenuIcon = function () {
var eImg = document.createElement('img');
eImg.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QjM3MUVBMzlERkJEMTFFNUEwMjFFNDJDMDlCMUY3OTciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QjM3MUVBM0FERkJEMTFFNUEwMjFFNDJDMDlCMUY3OTciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpCMzcxRUEzN0RGQkQxMUU1QTAyMUU0MkMwOUIxRjc5NyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpCMzcxRUEzOERGQkQxMUU1QTAyMUU0MkMwOUIxRjc5NyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pux7nZcAAAGtSURBVHjalFM9a8JQFL0veYkfYJUQEYuIIF07uToVpGuHOgid3dJN+i+K4C6CXQqFjplcCoKbXZ0EqRUFP/CTxCS9NzTdNOmBx32P3Nx3zj33sXq9/tRqtbRYLCaLomhBANi2La5WK7NSqTRYNpt1LMsCLACO47iLMXY2CoIAm80GZFkGoVQqfWy3WzBNE6gQVveNhmHAbreDYrHYZaPRKKTr+i0ykTDBPnUzgfYEvFkYDAZWoVDQWb/fB9QD6XQajscjBCkQDodhOBzCcrkEVq1WXfoEL9EPlEdSZrMZ8Pl8frVYLO7QgRB+sPx+/GUk4qUGNvOdYSO+JpPJJdHyc8ADnUluIpH45vv9XiFbiFIQC71IjuBe5ZlM5gYlPHLOL7C4AcEgofXbXC7X4PF4vKuqahf+AWJxOBwgEokA6/V67kFRFFcGLU/SqShJkusATSNbr9fQ6XSuU6mUQP3BBIaJZyM6BuPx2Mnn85+sVqu9ttvt+2QyGXgOqInT6RTK5fIbwwl0iFI0Gv2btCA9QPdcOVzTtOdms/mAnnKkaAexES0UcG/hc375EWAA94tOP0vEOEcAAAAASUVORK5CYII=';
return eImg;
};
return SvgFactory;
})();
exports.SvgFactory = SvgFactory;
// i couldn't figure out how to not make these blurry
/*function createPlusMinus(plus: boolean) {
var eSvg = document.createElementNS(SVG_NS, "svg");
var size = "14";
eSvg.setAttribute("width", size);
eSvg.setAttribute("height", size);
var eRect = document.createElementNS(SVG_NS, "rect");
eRect.setAttribute('x', '1');
eRect.setAttribute('y', '1');
eRect.setAttribute('width', '12');
eRect.setAttribute('height', '12');
eRect.setAttribute('rx', '2');
eRect.setAttribute('ry', '2');
eRect.setAttribute('fill', 'none');
eRect.setAttribute('stroke', 'black');
eRect.setAttribute('stroke-width', '1');
eRect.setAttribute('stroke-linecap', 'butt');
eSvg.appendChild(eRect);
var eLineAcross = document.createElementNS(SVG_NS, "line");
eLineAcross.setAttribute('x1','2');
eLineAcross.setAttribute('x2','12');
eLineAcross.setAttribute('y1','7');
eLineAcross.setAttribute('y2','7');
eLineAcross.setAttribute('stroke','black');
eLineAcross.setAttribute('stroke-width', '1');
eLineAcross.setAttribute('stroke-linecap', 'butt');
eSvg.appendChild(eLineAcross);
if (plus) {
var eLineDown = document.createElementNS(SVG_NS, "line");
eLineDown.setAttribute('x1','7');
eLineDown.setAttribute('x2','7');
eLineDown.setAttribute('y1','2');
eLineDown.setAttribute('y2','12');
eLineDown.setAttribute('stroke','black');
eLineDown.setAttribute('stroke-width', '1');
eLineDown.setAttribute('stroke-linecap', 'butt');
eSvg.appendChild(eLineDown);
}
return eSvg;
}*/
function createPolygonSvg(points, width) {
var eSvg = createIconSvg(width);
var eDescIcon = document.createElementNS(SVG_NS, "polygon");
eDescIcon.setAttribute("points", points);
eSvg.appendChild(eDescIcon);
return eSvg;
}
// util function for the above
function createIconSvg(width) {
var eSvg = document.createElementNS(SVG_NS, "svg");
if (width > 0) {
eSvg.setAttribute("width", width);
eSvg.setAttribute("height", width);
}
else {
eSvg.setAttribute("width", "10");
eSvg.setAttribute("height", "10");
}
return eSvg;
}
function createCircle(fill) {
var eSvg = createIconSvg();
var eCircle = document.createElementNS(SVG_NS, "circle");
eCircle.setAttribute("cx", "5");
eCircle.setAttribute("cy", "5");
eCircle.setAttribute("r", "5");
eCircle.setAttribute("stroke", "black");
eCircle.setAttribute("stroke-width", "2");
if (fill) {
eCircle.setAttribute("fill", "black");
}
else {
eCircle.setAttribute("fill", "none");
}
eSvg.appendChild(eCircle);
return eSvg;
}
/***/ },
/* 37 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var gridOptionsWrapper_1 = __webpack_require__(3);
var paginationController_1 = __webpack_require__(38);
var columnController_1 = __webpack_require__(13);
var rowRenderer_1 = __webpack_require__(23);
var filterManager_1 = __webpack_require__(40);
var eventService_1 = __webpack_require__(4);
var gridPanel_1 = __webpack_require__(24);
var constants_1 = __webpack_require__(8);
var popupService_1 = __webpack_require__(41);
var logger_1 = __webpack_require__(5);
var events_1 = __webpack_require__(10);
var borderLayout_1 = __webpack_require__(27);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var context_3 = __webpack_require__(6);
var context_4 = __webpack_require__(6);
var focusedCellController_1 = __webpack_require__(44);
var context_5 = __webpack_require__(6);
var component_1 = __webpack_require__(45);
var GridCore = (function () {
function GridCore(loggerFactory) {
this.logger = loggerFactory.create('GridCore');
}
GridCore.prototype.init = function () {
var _this = this;
// and the last bean, done in it's own section, as it's optional
var toolPanelGui;
var eSouthPanel = this.createSouthPanel();
if (this.toolPanel && !this.gridOptionsWrapper.isForPrint()) {
toolPanelGui = this.toolPanel.getGui();
}
var rowGroupGui;
if (this.rowGroupPanel) {
rowGroupGui = this.rowGroupPanel.getGui();
}
this.eRootPanel = new borderLayout_1.BorderLayout({
center: this.gridPanel.getLayout(),
east: toolPanelGui,
north: rowGroupGui,
south: eSouthPanel,
dontFill: this.gridOptionsWrapper.isForPrint(),
name: 'eRootPanel'
});
// see what the grid options are for default of toolbar
this.showToolPanel(this.gridOptionsWrapper.isShowToolPanel());
this.eGridDiv.appendChild(this.eRootPanel.getGui());
// if using angular, watch for quickFilter changes
if (this.$scope) {
this.$scope.$watch(this.quickFilterOnScope, function (newFilter) { return _this.filterManager.setQuickFilter(newFilter); });
}
if (!this.gridOptionsWrapper.isForPrint()) {
this.addWindowResizeListener();
}
this.doLayout();
this.finished = false;
this.periodicallyDoLayout();
this.popupService.setPopupParent(this.eRootPanel.getGui());
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGE, this.onRowGroupChanged.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_EVERYTHING_CHANGED, this.onRowGroupChanged.bind(this));
this.onRowGroupChanged();
this.logger.log('ready');
};
GridCore.prototype.createSouthPanel = function () {
if (!this.statusBar && this.gridOptionsWrapper.isEnableStatusBar()) {
console.warn('ag-Grid: status bar is only available in ag-Grid-Enterprise');
}
var statusBarEnabled = this.statusBar && this.gridOptionsWrapper.isEnableStatusBar();
var paginationPanelEnabled = this.gridOptionsWrapper.isRowModelPagination() && !this.gridOptionsWrapper.isForPrint();
if (!statusBarEnabled && !paginationPanelEnabled) {
return null;
}
var eSouthPanel = document.createElement('div');
if (statusBarEnabled) {
eSouthPanel.appendChild(this.statusBar.getGui());
}
if (paginationPanelEnabled) {
eSouthPanel.appendChild(this.paginationController.getGui());
}
return eSouthPanel;
};
GridCore.prototype.onRowGroupChanged = function () {
if (!this.rowGroupPanel) {
return;
}
var rowGroupPanelShow = this.gridOptionsWrapper.getRowGroupPanelShow();
if (rowGroupPanelShow === constants_1.Constants.ALWAYS) {
this.eRootPanel.setNorthVisible(true);
}
else if (rowGroupPanelShow === constants_1.Constants.ONLY_WHEN_GROUPING) {
var grouping = !this.columnController.isRowGroupEmpty();
this.eRootPanel.setNorthVisible(grouping);
}
else {
this.eRootPanel.setNorthVisible(false);
}
};
GridCore.prototype.agApplicationBoot = function () {
var readyEvent = {
api: this.gridOptions.api,
columnApi: this.gridOptions.columnApi
};
this.eventService.dispatchEvent(events_1.Events.EVENT_GRID_READY, readyEvent);
};
GridCore.prototype.addWindowResizeListener = function () {
var that = this;
// putting this into a function, so when we remove the function,
// we are sure we are removing the exact same function (i'm not
// sure what 'bind' does to the function reference, if it's safe
// the result from 'bind').
this.windowResizeListener = function resizeListener() {
that.doLayout();
};
window.addEventListener('resize', this.windowResizeListener);
};
GridCore.prototype.periodicallyDoLayout = function () {
if (!this.finished) {
var that = this;
setTimeout(function () {
that.doLayout();
that.gridPanel.periodicallyCheck();
that.periodicallyDoLayout();
}, 500);
}
};
GridCore.prototype.showToolPanel = function (show) {
if (show && !this.toolPanel) {
console.warn('ag-Grid: toolPanel is only available in ag-Grid Enterprise');
this.toolPanelShowing = false;
return;
}
this.toolPanelShowing = show;
this.eRootPanel.setEastVisible(show);
};
GridCore.prototype.isToolPanelShowing = function () {
return this.toolPanelShowing;
};
GridCore.prototype.agDestroy = function () {
if (this.windowResizeListener) {
window.removeEventListener('resize', this.windowResizeListener);
this.logger.log('Removing windowResizeListener');
}
this.finished = true;
this.eGridDiv.removeChild(this.eRootPanel.getGui());
this.logger.log('Grid DOM removed');
};
GridCore.prototype.ensureNodeVisible = function (comparator) {
if (this.doingVirtualPaging) {
throw 'Cannot use ensureNodeVisible when doing virtual paging, as we cannot check rows that are not in memory';
}
// look for the node index we want to display
var rowCount = this.rowModel.getRowCount();
var comparatorIsAFunction = typeof comparator === 'function';
var indexToSelect = -1;
// go through all the nodes, find the one we want to show
for (var i = 0; i < rowCount; i++) {
var node = this.rowModel.getRow(i);
if (comparatorIsAFunction) {
if (comparator(node)) {
indexToSelect = i;
break;
}
}
else {
// check object equality against node and data
if (comparator === node || comparator === node.data) {
indexToSelect = i;
break;
}
}
}
if (indexToSelect >= 0) {
this.gridPanel.ensureIndexVisible(indexToSelect);
}
};
GridCore.prototype.doLayout = function () {
// need to do layout first, as drawVirtualRows and setPinnedColHeight
// need to know the result of the resizing of the panels.
var sizeChanged = this.eRootPanel.doLayout();
// both of the two below should be done in gridPanel, the gridPanel should register 'resize' to the panel
if (sizeChanged) {
this.rowRenderer.drawVirtualRows();
var event = {
clientWidth: this.eRootPanel.getGui().clientWidth,
clientHeight: this.eRootPanel.getGui().clientHeight
};
this.eventService.dispatchEvent(events_1.Events.EVENT_GRID_SIZE_CHANGED, event);
}
};
__decorate([
context_3.Autowired('gridOptions'),
__metadata('design:type', Object)
], GridCore.prototype, "gridOptions", void 0);
__decorate([
context_3.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], GridCore.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_3.Autowired('paginationController'),
__metadata('design:type', paginationController_1.PaginationController)
], GridCore.prototype, "paginationController", void 0);
__decorate([
context_3.Autowired('rowModel'),
__metadata('design:type', Object)
], GridCore.prototype, "rowModel", void 0);
__decorate([
context_3.Autowired('columnController'),
__metadata('design:type', columnController_1.ColumnController)
], GridCore.prototype, "columnController", void 0);
__decorate([
context_3.Autowired('rowRenderer'),
__metadata('design:type', rowRenderer_1.RowRenderer)
], GridCore.prototype, "rowRenderer", void 0);
__decorate([
context_3.Autowired('filterManager'),
__metadata('design:type', filterManager_1.FilterManager)
], GridCore.prototype, "filterManager", void 0);
__decorate([
context_3.Autowired('eventService'),
__metadata('design:type', eventService_1.EventService)
], GridCore.prototype, "eventService", void 0);
__decorate([
context_3.Autowired('gridPanel'),
__metadata('design:type', gridPanel_1.GridPanel)
], GridCore.prototype, "gridPanel", void 0);
__decorate([
context_3.Autowired('eGridDiv'),
__metadata('design:type', HTMLElement)
], GridCore.prototype, "eGridDiv", void 0);
__decorate([
context_3.Autowired('$scope'),
__metadata('design:type', Object)
], GridCore.prototype, "$scope", void 0);
__decorate([
context_3.Autowired('quickFilterOnScope'),
__metadata('design:type', String)
], GridCore.prototype, "quickFilterOnScope", void 0);
__decorate([
context_3.Autowired('popupService'),
__metadata('design:type', popupService_1.PopupService)
], GridCore.prototype, "popupService", void 0);
__decorate([
context_3.Autowired('focusedCellController'),
__metadata('design:type', focusedCellController_1.FocusedCellController)
], GridCore.prototype, "focusedCellController", void 0);
__decorate([
context_5.Optional('rowGroupPanel'),
__metadata('design:type', component_1.Component)
], GridCore.prototype, "rowGroupPanel", void 0);
__decorate([
context_5.Optional('toolPanel'),
__metadata('design:type', component_1.Component)
], GridCore.prototype, "toolPanel", void 0);
__decorate([
context_5.Optional('statusBar'),
__metadata('design:type', component_1.Component)
], GridCore.prototype, "statusBar", void 0);
__decorate([
context_4.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], GridCore.prototype, "init", null);
GridCore = __decorate([
context_1.Bean('gridCore'),
__param(0, context_2.Qualifier('loggerFactory')),
__metadata('design:paramtypes', [logger_1.LoggerFactory])
], GridCore);
return GridCore;
})();
exports.GridCore = GridCore;
/***/ },
/* 38 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var utils_1 = __webpack_require__(7);
var gridOptionsWrapper_1 = __webpack_require__(3);
var context_1 = __webpack_require__(6);
var gridPanel_1 = __webpack_require__(24);
var selectionController_1 = __webpack_require__(29);
var context_2 = __webpack_require__(6);
var sortController_1 = __webpack_require__(39);
var context_3 = __webpack_require__(6);
var eventService_1 = __webpack_require__(4);
var events_1 = __webpack_require__(10);
var filterManager_1 = __webpack_require__(40);
var template = '<div class="ag-paging-panel ag-font-style">' +
'<span id="pageRowSummaryPanel" class="ag-paging-row-summary-panel">' +
'<span id="firstRowOnPage"></span>' +
' [TO] ' +
'<span id="lastRowOnPage"></span>' +
' [OF] ' +
'<span id="recordCount"></span>' +
'</span>' +
'<span class="ag-paging-page-summary-panel">' +
'<button type="button" class="ag-paging-button" id="btFirst">[FIRST]</button>' +
'<button type="button" class="ag-paging-button" id="btPrevious">[PREVIOUS]</button>' +
'[PAGE] ' +
'<span id="current"></span>' +
' [OF] ' +
'<span id="total"></span>' +
'<button type="button" class="ag-paging-button" id="btNext">[NEXT]</button>' +
'<button type="button" class="ag-paging-button" id="btLast">[LAST]</button>' +
'</span>' +
'</div>';
var PaginationController = (function () {
function PaginationController() {
}
PaginationController.prototype.init = function () {
var _this = this;
this.setupComponents();
this.callVersion = 0;
var paginationEnabled = this.gridOptionsWrapper.isRowModelPagination();
this.eventService.addEventListener(events_1.Events.EVENT_FILTER_CHANGED, function () {
if (paginationEnabled && _this.gridOptionsWrapper.isEnableServerSideFilter()) {
_this.reset();
}
});
this.eventService.addEventListener(events_1.Events.EVENT_SORT_CHANGED, function () {
if (paginationEnabled && _this.gridOptionsWrapper.isEnableServerSideSorting()) {
_this.reset();
}
});
if (paginationEnabled && this.gridOptionsWrapper.getDatasource()) {
this.setDatasource(this.gridOptionsWrapper.getDatasource());
}
};
PaginationController.prototype.setDatasource = function (datasource) {
this.datasource = datasource;
if (!datasource) {
// only continue if we have a valid datasource to work with
return;
}
this.reset();
};
PaginationController.prototype.reset = function () {
// important to return here, as the user could be setting filter or sort before
// data-source is set
if (utils_1.Utils.missing(this.datasource)) {
return;
}
this.selectionController.reset();
// copy pageSize, to guard against it changing the the datasource between calls
if (this.datasource.pageSize && typeof this.datasource.pageSize !== 'number') {
console.warn('datasource.pageSize should be a number');
}
this.pageSize = this.datasource.pageSize;
// see if we know the total number of pages, or if it's 'to be decided'
if (typeof this.datasource.rowCount === 'number' && this.datasource.rowCount >= 0) {
this.rowCount = this.datasource.rowCount;
this.foundMaxRow = true;
this.calculateTotalPages();
}
else {
this.rowCount = 0;
this.foundMaxRow = false;
this.totalPages = null;
}
this.currentPage = 0;
// hide the summary panel until something is loaded
this.ePageRowSummaryPanel.style.visibility = 'hidden';
this.setTotalLabels();
this.loadPage();
};
// the native method number.toLocaleString(undefined, {minimumFractionDigits: 0}) puts in decimal places in IE
PaginationController.prototype.myToLocaleString = function (input) {
if (typeof input !== 'number') {
return '';
}
else {
// took this from: http://blog.tompawlak.org/number-currency-formatting-javascript
return input.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,");
}
};
PaginationController.prototype.setTotalLabels = function () {
if (this.foundMaxRow) {
this.lbTotal.innerHTML = this.myToLocaleString(this.totalPages);
this.lbRecordCount.innerHTML = this.myToLocaleString(this.rowCount);
}
else {
var moreText = this.gridOptionsWrapper.getLocaleTextFunc()('more', 'more');
this.lbTotal.innerHTML = moreText;
this.lbRecordCount.innerHTML = moreText;
}
};
PaginationController.prototype.calculateTotalPages = function () {
this.totalPages = Math.floor((this.rowCount - 1) / this.pageSize) + 1;
};
PaginationController.prototype.pageLoaded = function (rows, lastRowIndex) {
var firstId = this.currentPage * this.pageSize;
this.rowModel.setRowData(rows, true, firstId);
// see if we hit the last row
if (!this.foundMaxRow && typeof lastRowIndex === 'number' && lastRowIndex >= 0) {
this.foundMaxRow = true;
this.rowCount = lastRowIndex;
this.calculateTotalPages();
this.setTotalLabels();
// if overshot pages, go back
if (this.currentPage > this.totalPages) {
this.currentPage = this.totalPages - 1;
this.loadPage();
}
}
this.enableOrDisableButtons();
this.updateRowLabels();
};
PaginationController.prototype.updateRowLabels = function () {
var startRow;
var endRow;
if (this.isZeroPagesToDisplay()) {
startRow = 0;
endRow = 0;
}
else {
startRow = (this.pageSize * this.currentPage) + 1;
endRow = startRow + this.pageSize - 1;
if (this.foundMaxRow && endRow > this.rowCount) {
endRow = this.rowCount;
}
}
this.lbFirstRowOnPage.innerHTML = this.myToLocaleString(startRow);
this.lbLastRowOnPage.innerHTML = this.myToLocaleString(endRow);
// show the summary panel, when first shown, this is blank
this.ePageRowSummaryPanel.style.visibility = "";
};
PaginationController.prototype.loadPage = function () {
this.enableOrDisableButtons();
var startRow = this.currentPage * this.datasource.pageSize;
var endRow = (this.currentPage + 1) * this.datasource.pageSize;
this.lbCurrent.innerHTML = this.myToLocaleString(this.currentPage + 1);
this.callVersion++;
var callVersionCopy = this.callVersion;
var that = this;
this.gridPanel.showLoadingOverlay();
var sortModel;
if (this.gridOptionsWrapper.isEnableServerSideSorting()) {
sortModel = this.sortController.getSortModel();
}
var filterModel;
if (this.gridOptionsWrapper.isEnableServerSideFilter()) {
filterModel = this.filterManager.getFilterModel();
}
var params = {
startRow: startRow,
endRow: endRow,
successCallback: successCallback,
failCallback: failCallback,
sortModel: sortModel,
filterModel: filterModel
};
// check if old version of datasource used
var getRowsParams = utils_1.Utils.getFunctionParameters(this.datasource.getRows);
if (getRowsParams.length > 1) {
console.warn('ag-grid: It looks like your paging datasource is of the old type, taking more than one parameter.');
console.warn('ag-grid: From ag-grid 1.9.0, now the getRows takes one parameter. See the documentation for details.');
}
this.datasource.getRows(params);
function successCallback(rows, lastRowIndex) {
if (that.isCallDaemon(callVersionCopy)) {
return;
}
that.pageLoaded(rows, lastRowIndex);
}
function failCallback() {
if (that.isCallDaemon(callVersionCopy)) {
return;
}
// set in an empty set of rows, this will at
// least get rid of the loading panel, and
// stop blocking things
that.rowModel.setRowData([], true);
}
};
PaginationController.prototype.isCallDaemon = function (versionCopy) {
return versionCopy !== this.callVersion;
};
PaginationController.prototype.onBtNext = function () {
this.currentPage++;
this.loadPage();
};
PaginationController.prototype.onBtPrevious = function () {
this.currentPage--;
this.loadPage();
};
PaginationController.prototype.onBtFirst = function () {
this.currentPage = 0;
this.loadPage();
};
PaginationController.prototype.onBtLast = function () {
this.currentPage = this.totalPages - 1;
this.loadPage();
};
PaginationController.prototype.isZeroPagesToDisplay = function () {
return this.foundMaxRow && this.totalPages === 0;
};
PaginationController.prototype.enableOrDisableButtons = function () {
var disablePreviousAndFirst = this.currentPage === 0;
this.btPrevious.disabled = disablePreviousAndFirst;
this.btFirst.disabled = disablePreviousAndFirst;
var zeroPagesToDisplay = this.isZeroPagesToDisplay();
var onLastPage = this.foundMaxRow && this.currentPage === (this.totalPages - 1);
var disableNext = onLastPage || zeroPagesToDisplay;
this.btNext.disabled = disableNext;
var disableLast = !this.foundMaxRow || zeroPagesToDisplay || this.currentPage === (this.totalPages - 1);
this.btLast.disabled = disableLast;
};
PaginationController.prototype.createTemplate = function () {
var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();
return template
.replace('[PAGE]', localeTextFunc('page', 'Page'))
.replace('[TO]', localeTextFunc('to', 'to'))
.replace('[OF]', localeTextFunc('of', 'of'))
.replace('[OF]', localeTextFunc('of', 'of'))
.replace('[FIRST]', localeTextFunc('first', 'First'))
.replace('[PREVIOUS]', localeTextFunc('previous', 'Previous'))
.replace('[NEXT]', localeTextFunc('next', 'Next'))
.replace('[LAST]', localeTextFunc('last', 'Last'));
};
PaginationController.prototype.getGui = function () {
return this.eGui;
};
PaginationController.prototype.setupComponents = function () {
this.eGui = utils_1.Utils.loadTemplate(this.createTemplate());
this.btNext = this.eGui.querySelector('#btNext');
this.btPrevious = this.eGui.querySelector('#btPrevious');
this.btFirst = this.eGui.querySelector('#btFirst');
this.btLast = this.eGui.querySelector('#btLast');
this.lbCurrent = this.eGui.querySelector('#current');
this.lbTotal = this.eGui.querySelector('#total');
this.lbRecordCount = this.eGui.querySelector('#recordCount');
this.lbFirstRowOnPage = this.eGui.querySelector('#firstRowOnPage');
this.lbLastRowOnPage = this.eGui.querySelector('#lastRowOnPage');
this.ePageRowSummaryPanel = this.eGui.querySelector('#pageRowSummaryPanel');
var that = this;
this.btNext.addEventListener('click', function () {
that.onBtNext();
});
this.btPrevious.addEventListener('click', function () {
that.onBtPrevious();
});
this.btFirst.addEventListener('click', function () {
that.onBtFirst();
});
this.btLast.addEventListener('click', function () {
that.onBtLast();
});
};
__decorate([
context_2.Autowired('filterManager'),
__metadata('design:type', filterManager_1.FilterManager)
], PaginationController.prototype, "filterManager", void 0);
__decorate([
context_2.Autowired('gridPanel'),
__metadata('design:type', gridPanel_1.GridPanel)
], PaginationController.prototype, "gridPanel", void 0);
__decorate([
context_2.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], PaginationController.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_2.Autowired('selectionController'),
__metadata('design:type', selectionController_1.SelectionController)
], PaginationController.prototype, "selectionController", void 0);
__decorate([
context_2.Autowired('rowModel'),
__metadata('design:type', Object)
], PaginationController.prototype, "rowModel", void 0);
__decorate([
context_2.Autowired('sortController'),
__metadata('design:type', sortController_1.SortController)
], PaginationController.prototype, "sortController", void 0);
__decorate([
context_2.Autowired('eventService'),
__metadata('design:type', eventService_1.EventService)
], PaginationController.prototype, "eventService", void 0);
__decorate([
context_3.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], PaginationController.prototype, "init", null);
PaginationController = __decorate([
context_1.Bean('paginationController'),
__metadata('design:paramtypes', [])
], PaginationController);
return PaginationController;
})();
exports.PaginationController = PaginationController;
/***/ },
/* 39 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var column_1 = __webpack_require__(15);
var context_1 = __webpack_require__(6);
var gridOptionsWrapper_1 = __webpack_require__(3);
var columnController_1 = __webpack_require__(13);
var eventService_1 = __webpack_require__(4);
var events_1 = __webpack_require__(10);
var context_2 = __webpack_require__(6);
var utils_1 = __webpack_require__(7);
var SortController = (function () {
function SortController() {
}
SortController.prototype.progressSort = function (column, multiSort) {
// update sort on current col
column.setSort(this.getNextSortDirection(column));
// sortedAt used for knowing order of cols when multi-col sort
if (column.getSort()) {
column.setSortedAt(new Date().valueOf());
}
else {
column.setSortedAt(null);
}
var doingMultiSort = multiSort && !this.gridOptionsWrapper.isSuppressMultiSort();
// clear sort on all columns except this one, and update the icons
if (!doingMultiSort) {
this.clearSortBarThisColumn(column);
}
this.dispatchSortChangedEvents();
};
SortController.prototype.dispatchSortChangedEvents = function () {
this.eventService.dispatchEvent(events_1.Events.EVENT_BEFORE_SORT_CHANGED);
this.eventService.dispatchEvent(events_1.Events.EVENT_SORT_CHANGED);
this.eventService.dispatchEvent(events_1.Events.EVENT_AFTER_SORT_CHANGED);
};
SortController.prototype.clearSortBarThisColumn = function (columnToSkip) {
this.columnController.getAllColumnsIncludingAuto().forEach(function (columnToClear) {
// Do not clear if either holding shift, or if column in question was clicked
if (!(columnToClear === columnToSkip)) {
columnToClear.setSort(null);
}
});
};
SortController.prototype.getNextSortDirection = function (column) {
var sortingOrder;
if (column.getColDef().sortingOrder) {
sortingOrder = column.getColDef().sortingOrder;
}
else if (this.gridOptionsWrapper.getSortingOrder()) {
sortingOrder = this.gridOptionsWrapper.getSortingOrder();
}
else {
sortingOrder = SortController.DEFAULT_SORTING_ORDER;
}
if (!Array.isArray(sortingOrder) || sortingOrder.length <= 0) {
console.warn('ag-grid: sortingOrder must be an array with at least one element, currently it\'s ' + sortingOrder);
return;
}
var currentIndex = sortingOrder.indexOf(column.getSort());
var notInArray = currentIndex < 0;
var lastItemInArray = currentIndex == sortingOrder.length - 1;
var result;
if (notInArray || lastItemInArray) {
result = sortingOrder[0];
}
else {
result = sortingOrder[currentIndex + 1];
}
// verify the sort type exists, as the user could provide the sortOrder, need to make sure it's valid
if (SortController.DEFAULT_SORTING_ORDER.indexOf(result) < 0) {
console.warn('ag-grid: invalid sort type ' + result);
return null;
}
return result;
};
// used by the public api, for saving the sort model
SortController.prototype.getSortModel = function () {
var columnsWithSorting = this.getColumnsWithSortingOrdered();
return utils_1.Utils.map(columnsWithSorting, function (column) {
return {
colId: column.getColId(),
sort: column.getSort()
};
});
};
SortController.prototype.setSortModel = function (sortModel) {
if (!this.gridOptionsWrapper.isEnableSorting()) {
console.warn('ag-grid: You are setting the sort model on a grid that does not have sorting enabled');
return;
}
// first up, clear any previous sort
var sortModelProvided = sortModel && sortModel.length > 0;
var allColumnsIncludingAuto = this.columnController.getAllColumnsIncludingAuto();
allColumnsIncludingAuto.forEach(function (column) {
var sortForCol = null;
var sortedAt = -1;
if (sortModelProvided && !column.getColDef().suppressSorting) {
for (var j = 0; j < sortModel.length; j++) {
var sortModelEntry = sortModel[j];
if (typeof sortModelEntry.colId === 'string'
&& typeof column.getColId() === 'string'
&& sortModelEntry.colId === column.getColId()) {
sortForCol = sortModelEntry.sort;
sortedAt = j;
}
}
}
if (sortForCol) {
column.setSort(sortForCol);
column.setSortedAt(sortedAt);
}
else {
column.setSort(null);
column.setSortedAt(null);
}
});
this.dispatchSortChangedEvents();
};
SortController.prototype.getColumnsWithSortingOrdered = function () {
// pull out all the columns that have sorting set
var allColumnsIncludingAuto = this.columnController.getAllColumnsIncludingAuto();
var columnsWithSorting = utils_1.Utils.filter(allColumnsIncludingAuto, function (column) { return !!column.getSort(); });
// put the columns in order of which one got sorted first
columnsWithSorting.sort(function (a, b) { return a.sortedAt - b.sortedAt; });
return columnsWithSorting;
};
// used by row controller, when doing the sorting
SortController.prototype.getSortForRowController = function () {
var columnsWithSorting = this.getColumnsWithSortingOrdered();
return utils_1.Utils.map(columnsWithSorting, function (column) {
var ascending = column.getSort() === column_1.Column.SORT_ASC;
return {
inverter: ascending ? 1 : -1,
column: column
};
});
};
SortController.DEFAULT_SORTING_ORDER = [column_1.Column.SORT_ASC, column_1.Column.SORT_DESC, null];
__decorate([
context_1.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], SortController.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_1.Autowired('columnController'),
__metadata('design:type', columnController_1.ColumnController)
], SortController.prototype, "columnController", void 0);
__decorate([
context_1.Autowired('eventService'),
__metadata('design:type', eventService_1.EventService)
], SortController.prototype, "eventService", void 0);
SortController = __decorate([
context_2.Bean('sortController'),
__metadata('design:paramtypes', [])
], SortController);
return SortController;
})();
exports.SortController = SortController;
/***/ },
/* 40 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var utils_1 = __webpack_require__(7);
var gridOptionsWrapper_1 = __webpack_require__(3);
var popupService_1 = __webpack_require__(41);
var valueService_1 = __webpack_require__(34);
var columnController_1 = __webpack_require__(13);
var textFilter_1 = __webpack_require__(42);
var numberFilter_1 = __webpack_require__(43);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var eventService_1 = __webpack_require__(4);
var events_1 = __webpack_require__(10);
var context_3 = __webpack_require__(6);
var FilterManager = (function () {
function FilterManager() {
this.allFilters = {};
this.quickFilter = null;
this.availableFilters = {
'text': textFilter_1.TextFilter,
'number': numberFilter_1.NumberFilter
};
}
FilterManager.prototype.init = function () {
this.eventService.addEventListener(events_1.Events.EVENT_ROW_DATA_CHANGED, this.onNewRowsLoaded.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_NEW_COLUMNS_LOADED, this.onNewColumnsLoaded.bind(this));
};
FilterManager.prototype.registerFilter = function (key, Filter) {
this.availableFilters[key] = Filter;
};
FilterManager.prototype.setFilterModel = function (model) {
var _this = this;
if (model) {
// mark the filters as we set them, so any active filters left over we stop
var modelKeys = Object.keys(model);
utils_1.Utils.iterateObject(this.allFilters, function (colId, filterWrapper) {
utils_1.Utils.removeFromArray(modelKeys, colId);
var newModel = model[colId];
_this.setModelOnFilterWrapper(filterWrapper.filter, newModel);
});
// at this point, processedFields contains data for which we don't have a filter working yet
utils_1.Utils.iterateArray(modelKeys, function (colId) {
var column = _this.columnController.getColumn(colId);
if (!column) {
console.warn('Warning ag-grid setFilterModel - no column found for colId ' + colId);
return;
}
var filterWrapper = _this.getOrCreateFilterWrapper(column);
_this.setModelOnFilterWrapper(filterWrapper.filter, model[colId]);
});
}
else {
utils_1.Utils.iterateObject(this.allFilters, function (key, filterWrapper) {
_this.setModelOnFilterWrapper(filterWrapper.filter, null);
});
}
this.onFilterChanged();
};
FilterManager.prototype.setModelOnFilterWrapper = function (filter, newModel) {
// because user can provide filters, we provide useful error checking and messages
if (typeof filter.getApi !== 'function') {
console.warn('Warning ag-grid - filter missing getApi method, which is needed for getFilterModel');
return;
}
var filterApi = filter.getApi();
if (typeof filterApi.setModel !== 'function') {
console.warn('Warning ag-grid - filter API missing setModel method, which is needed for setFilterModel');
return;
}
filterApi.setModel(newModel);
};
FilterManager.prototype.getFilterModel = function () {
var result = {};
utils_1.Utils.iterateObject(this.allFilters, function (key, filterWrapper) {
// because user can provide filters, we provide useful error checking and messages
if (typeof filterWrapper.filter.getApi !== 'function') {
console.warn('Warning ag-grid - filter missing getApi method, which is needed for getFilterModel');
return;
}
var filterApi = filterWrapper.filter.getApi();
if (typeof filterApi.getModel !== 'function') {
console.warn('Warning ag-grid - filter API missing getModel method, which is needed for getFilterModel');
return;
}
var model = filterApi.getModel();
if (utils_1.Utils.exists(model)) {
result[key] = model;
}
});
return result;
};
// returns true if any advanced filter (ie not quick filter) active
FilterManager.prototype.isAdvancedFilterPresent = function () {
var atLeastOneActive = false;
utils_1.Utils.iterateObject(this.allFilters, function (key, filterWrapper) {
if (!filterWrapper.filter.isFilterActive) {
console.error('Filter is missing method isFilterActive');
}
if (filterWrapper.filter.isFilterActive()) {
atLeastOneActive = true;
filterWrapper.column.setFilterActive(true);
}
else {
filterWrapper.column.setFilterActive(false);
}
});
return atLeastOneActive;
};
// returns true if quickFilter or advancedFilter
FilterManager.prototype.isAnyFilterPresent = function () {
return this.isQuickFilterPresent() || this.advancedFilterPresent || this.externalFilterPresent;
};
FilterManager.prototype.doesFilterPass = function (node, filterToSkip) {
var data = node.data;
var colKeys = Object.keys(this.allFilters);
for (var i = 0, l = colKeys.length; i < l; i++) {
var colId = colKeys[i];
var filterWrapper = this.allFilters[colId];
// if no filter, always pass
if (filterWrapper === undefined) {
continue;
}
if (filterWrapper.filter === filterToSkip) {
continue;
}
// don't bother with filters that are not active
if (!filterWrapper.filter.isFilterActive()) {
continue;
}
if (!filterWrapper.filter.doesFilterPass) {
console.error('Filter is missing method doesFilterPass');
}
var params = {
node: node,
data: data
};
if (!filterWrapper.filter.doesFilterPass(params)) {
return false;
}
}
// all filters passed
return true;
};
// returns true if it has changed (not just same value again)
FilterManager.prototype.setQuickFilter = function (newFilter) {
if (newFilter === undefined || newFilter === "") {
newFilter = null;
}
if (this.quickFilter !== newFilter) {
if (this.gridOptionsWrapper.isRowModelVirtual()) {
console.warn('ag-grid: cannot do quick filtering when doing virtual paging');
return;
}
//want 'null' to mean to filter, so remove undefined and empty string
if (newFilter === undefined || newFilter === "") {
newFilter = null;
}
if (newFilter !== null) {
newFilter = newFilter.toUpperCase();
}
this.quickFilter = newFilter;
this.onFilterChanged();
}
};
FilterManager.prototype.onFilterChanged = function () {
this.eventService.dispatchEvent(events_1.Events.EVENT_BEFORE_FILTER_CHANGED);
this.advancedFilterPresent = this.isAdvancedFilterPresent();
this.externalFilterPresent = this.gridOptionsWrapper.isExternalFilterPresent();
utils_1.Utils.iterateObject(this.allFilters, function (key, filterWrapper) {
if (filterWrapper.filter.onAnyFilterChanged) {
filterWrapper.filter.onAnyFilterChanged();
}
});
this.eventService.dispatchEvent(events_1.Events.EVENT_FILTER_CHANGED);
this.eventService.dispatchEvent(events_1.Events.EVENT_AFTER_FILTER_CHANGED);
};
FilterManager.prototype.isQuickFilterPresent = function () {
return this.quickFilter !== null;
};
FilterManager.prototype.doesRowPassOtherFilters = function (filterToSkip, node) {
return this.doesRowPassFilter(node, filterToSkip);
};
FilterManager.prototype.doesRowPassFilter = function (node, filterToSkip) {
//first up, check quick filter
if (this.isQuickFilterPresent()) {
if (!node.quickFilterAggregateText) {
this.aggregateRowForQuickFilter(node);
}
if (node.quickFilterAggregateText.indexOf(this.quickFilter) < 0) {
//quick filter fails, so skip item
return false;
}
}
//secondly, give the client a chance to reject this row
if (this.externalFilterPresent) {
if (!this.gridOptionsWrapper.doesExternalFilterPass(node)) {
return false;
}
}
//lastly, check our internal advanced filter
if (this.advancedFilterPresent) {
if (!this.doesFilterPass(node, filterToSkip)) {
return false;
}
}
//got this far, all filters pass
return true;
};
FilterManager.prototype.aggregateRowForQuickFilter = function (node) {
var aggregatedText = '';
var that = this;
this.columnController.getAllColumns().forEach(function (column) {
var value = that.valueService.getValue(column, node);
if (value && value !== '') {
aggregatedText = aggregatedText + value.toString().toUpperCase() + "_";
}
});
node.quickFilterAggregateText = aggregatedText;
};
FilterManager.prototype.onNewRowsLoaded = function () {
var that = this;
Object.keys(this.allFilters).forEach(function (field) {
var filter = that.allFilters[field].filter;
if (filter.onNewRowsLoaded) {
filter.onNewRowsLoaded();
}
});
};
FilterManager.prototype.createValueGetter = function (column) {
var that = this;
return function valueGetter(node) {
return that.valueService.getValue(column, node);
};
};
FilterManager.prototype.getFilterApi = function (column) {
var filterWrapper = this.getOrCreateFilterWrapper(column);
if (filterWrapper) {
if (typeof filterWrapper.filter.getApi === 'function') {
return filterWrapper.filter.getApi();
}
}
};
FilterManager.prototype.getOrCreateFilterWrapper = function (column) {
var filterWrapper = this.allFilters[column.getColId()];
if (!filterWrapper) {
filterWrapper = this.createFilterWrapper(column);
this.allFilters[column.getColId()] = filterWrapper;
}
return filterWrapper;
};
FilterManager.prototype.createFilterWrapper = function (column) {
var _this = this;
var colDef = column.getColDef();
var filterWrapper = {
column: column,
filter: null,
scope: null,
gui: null
};
if (typeof colDef.filter === 'function') {
// if user provided a filter, just use it
// first up, create child scope if needed
if (this.gridOptionsWrapper.isAngularCompileFilters()) {
filterWrapper.scope = this.$scope.$new();
}
// now create filter (had to cast to any to get 'new' working)
this.assertMethodHasNoParameters(colDef.filter);
filterWrapper.filter = new colDef.filter();
}
else if (utils_1.Utils.missing(colDef.filter) || typeof colDef.filter === 'string') {
var Filter = this.getFilterFromCache(colDef.filter);
filterWrapper.filter = new Filter();
}
else {
console.error('ag-Grid: colDef.filter should be function or a string');
}
var filterChangedCallback = this.onFilterChanged.bind(this);
var filterModifiedCallback = function () { return _this.eventService.dispatchEvent(events_1.Events.EVENT_FILTER_MODIFIED); };
var doesRowPassOtherFilters = this.doesRowPassOtherFilters.bind(this, filterWrapper.filter);
var filterParams = colDef.filterParams;
var params = {
colDef: colDef,
rowModel: this.rowModel,
filterChangedCallback: filterChangedCallback,
filterModifiedCallback: filterModifiedCallback,
filterParams: filterParams,
localeTextFunc: this.gridOptionsWrapper.getLocaleTextFunc(),
valueGetter: this.createValueGetter(column),
doesRowPassOtherFilter: doesRowPassOtherFilters,
context: this.gridOptionsWrapper.getContext(),
$scope: filterWrapper.scope
};
if (!filterWrapper.filter.init) {
throw 'Filter is missing method init';
}
filterWrapper.filter.init(params);
if (!filterWrapper.filter.getGui) {
throw 'Filter is missing method getGui';
}
var eFilterGui = document.createElement('div');
eFilterGui.className = 'ag-filter';
var guiFromFilter = filterWrapper.filter.getGui();
if (utils_1.Utils.isNodeOrElement(guiFromFilter)) {
//a dom node or element was returned, so add child
eFilterGui.appendChild(guiFromFilter);
}
else {
//otherwise assume it was html, so just insert
var eTextSpan = document.createElement('span');
eTextSpan.innerHTML = guiFromFilter;
eFilterGui.appendChild(eTextSpan);
}
if (filterWrapper.scope) {
filterWrapper.gui = this.$compile(eFilterGui)(filterWrapper.scope)[0];
}
else {
filterWrapper.gui = eFilterGui;
}
return filterWrapper;
};
FilterManager.prototype.getFilterFromCache = function (filterType) {
var defaultFilterType = this.enterprise ? 'set' : 'text';
var defaultFilter = this.availableFilters[defaultFilterType];
if (utils_1.Utils.missing(filterType)) {
return defaultFilter;
}
if (!this.enterprise && filterType === 'set') {
console.warn('ag-Grid: Set filter is only available in Enterprise ag-Grid');
filterType = 'text';
}
if (this.availableFilters[filterType]) {
return this.availableFilters[filterType];
}
else {
console.error('ag-Grid: Could not find filter type ' + filterType);
return this.availableFilters[defaultFilter];
}
};
FilterManager.prototype.onNewColumnsLoaded = function () {
this.agDestroy();
};
FilterManager.prototype.agDestroy = function () {
utils_1.Utils.iterateObject(this.allFilters, function (key, filterWrapper) {
if (filterWrapper.filter.destroy) {
filterWrapper.filter.destroy();
filterWrapper.column.setFilterActive(false);
}
});
this.allFilters = {};
};
FilterManager.prototype.assertMethodHasNoParameters = function (theMethod) {
var getRowsParams = utils_1.Utils.getFunctionParameters(theMethod);
if (getRowsParams.length > 0) {
console.warn('ag-grid: It looks like your filter is of the old type and expecting parameters in the constructor.');
console.warn('ag-grid: From ag-grid 1.14, the constructor should take no parameters and init() used instead.');
}
};
__decorate([
context_2.Autowired('$compile'),
__metadata('design:type', Object)
], FilterManager.prototype, "$compile", void 0);
__decorate([
context_2.Autowired('$scope'),
__metadata('design:type', Object)
], FilterManager.prototype, "$scope", void 0);
__decorate([
context_2.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], FilterManager.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_2.Autowired('gridCore'),
__metadata('design:type', Object)
], FilterManager.prototype, "gridCore", void 0);
__decorate([
context_2.Autowired('popupService'),
__metadata('design:type', popupService_1.PopupService)
], FilterManager.prototype, "popupService", void 0);
__decorate([
context_2.Autowired('valueService'),
__metadata('design:type', valueService_1.ValueService)
], FilterManager.prototype, "valueService", void 0);
__decorate([
context_2.Autowired('columnController'),
__metadata('design:type', columnController_1.ColumnController)
], FilterManager.prototype, "columnController", void 0);
__decorate([
context_2.Autowired('rowModel'),
__metadata('design:type', Object)
], FilterManager.prototype, "rowModel", void 0);
__decorate([
context_2.Autowired('eventService'),
__metadata('design:type', eventService_1.EventService)
], FilterManager.prototype, "eventService", void 0);
__decorate([
context_2.Autowired('enterprise'),
__metadata('design:type', Boolean)
], FilterManager.prototype, "enterprise", void 0);
__decorate([
context_3.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], FilterManager.prototype, "init", null);
FilterManager = __decorate([
context_1.Bean('filterManager'),
__metadata('design:paramtypes', [])
], FilterManager);
return FilterManager;
})();
exports.FilterManager = FilterManager;
/***/ },
/* 41 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var utils_1 = __webpack_require__(7);
var constants_1 = __webpack_require__(8);
var context_1 = __webpack_require__(6);
var PopupService = (function () {
function PopupService() {
}
PopupService.prototype.setPopupParent = function (ePopupParent) {
this.ePopupParent = ePopupParent;
};
PopupService.prototype.positionPopupForMenu = function (params) {
var sourceRect = params.eventSource.getBoundingClientRect();
var parentRect = this.ePopupParent.getBoundingClientRect();
var x = sourceRect.right - parentRect.left - 2;
var y = sourceRect.top - parentRect.top;
var minWidth;
if (params.ePopup.clientWidth > 0) {
minWidth = params.ePopup.clientWidth;
}
else {
minWidth = 200;
}
var widthOfParent = parentRect.right - parentRect.left;
var maxX = widthOfParent - minWidth;
if (x > maxX) {
// try putting menu to the left
x = sourceRect.left - minWidth;
}
if (x < 0) {
x = 0;
}
params.ePopup.style.left = x + "px";
params.ePopup.style.top = y + "px";
};
PopupService.prototype.positionPopupUnderMouseEvent = function (params) {
var parentRect = this.ePopupParent.getBoundingClientRect();
this.positionPopup({
ePopup: params.ePopup,
x: params.mouseEvent.clientX - parentRect.left,
y: params.mouseEvent.clientY - parentRect.top,
keepWithinBounds: true
});
};
PopupService.prototype.positionPopupUnderComponent = function (params) {
var sourceRect = params.eventSource.getBoundingClientRect();
var parentRect = this.ePopupParent.getBoundingClientRect();
this.positionPopup({
ePopup: params.ePopup,
minWidth: params.minWidth,
nudgeX: params.nudgeX,
nudgeY: params.nudgeY,
x: sourceRect.left - parentRect.left,
y: sourceRect.top - parentRect.top + sourceRect.height,
keepWithinBounds: params.keepWithinBounds
});
};
PopupService.prototype.positionPopup = function (params) {
var parentRect = this.ePopupParent.getBoundingClientRect();
var x = params.x;
var y = params.y;
if (params.nudgeX) {
x += params.nudgeX;
}
if (params.nudgeY) {
y += params.nudgeY;
}
// if popup is overflowing to the right, move it left
if (params.keepWithinBounds) {
var minWidth;
if (params.minWidth > 0) {
minWidth = params.minWidth;
}
else if (params.ePopup.clientWidth > 0) {
minWidth = params.ePopup.clientWidth;
}
else {
minWidth = 200;
}
var widthOfParent = parentRect.right - parentRect.left;
var maxX = widthOfParent - minWidth;
if (x > maxX) {
x = maxX;
}
if (x < 0) {
x = 0;
}
}
params.ePopup.style.left = x + "px";
params.ePopup.style.top = y + "px";
};
//adds an element to a div, but also listens to background checking for clicks,
//so that when the background is clicked, the child is removed again, giving
//a model look to popups.
PopupService.prototype.addAsModalPopup = function (eChild, closeOnEsc, closedCallback) {
var eBody = document.body;
if (!eBody) {
console.warn('ag-grid: could not find the body of the document, document.body is empty');
return;
}
var popupAlreadyShown = utils_1.Utils.isVisible(eChild);
if (popupAlreadyShown) {
return;
}
this.ePopupParent.appendChild(eChild);
var that = this;
// if we add these listeners now, then the current mouse
// click will be included, which we don't want
setTimeout(function () {
if (closeOnEsc) {
eBody.addEventListener('keydown', hidePopupOnEsc);
}
eBody.addEventListener('click', hidePopup);
eBody.addEventListener('contextmenu', hidePopup);
//eBody.addEventListener('mousedown', hidePopup);
eChild.addEventListener('click', consumeClick);
//eChild.addEventListener('mousedown', consumeClick);
}, 0);
var eventFromChild = null;
function hidePopupOnEsc(event) {
var key = event.which || event.keyCode;
if (key === constants_1.Constants.KEY_ESCAPE) {
hidePopup(null);
}
}
function hidePopup(event) {
if (event && event === eventFromChild) {
return;
}
that.ePopupParent.removeChild(eChild);
eBody.removeEventListener('keydown', hidePopupOnEsc);
//eBody.removeEventListener('mousedown', hidePopupOnEsc);
eBody.removeEventListener('click', hidePopup);
eBody.removeEventListener('contextmenu', hidePopup);
eChild.removeEventListener('click', consumeClick);
//eChild.removeEventListener('mousedown', consumeClick);
if (closedCallback) {
closedCallback();
}
}
function consumeClick(event) {
eventFromChild = event;
}
return hidePopup;
};
PopupService = __decorate([
context_1.Bean('popupService'),
__metadata('design:paramtypes', [])
], PopupService);
return PopupService;
})();
exports.PopupService = PopupService;
/***/ },
/* 42 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var utils_1 = __webpack_require__(7);
var template = '<div>' +
'<div>' +
'<select class="ag-filter-select" id="filterType">' +
'<option value="1">[CONTAINS]</option>' +
'<option value="2">[EQUALS]</option>' +
'<option value="3">[STARTS WITH]</option>' +
'<option value="4">[ENDS WITH]</option>' +
'</select>' +
'</div>' +
'<div>' +
'<input class="ag-filter-filter" id="filterText" type="text" placeholder="[FILTER...]"/>' +
'</div>' +
'<div class="ag-filter-apply-panel" id="applyPanel">' +
'<button type="button" id="applyButton">[APPLY FILTER]</button>' +
'</div>' +
'</div>';
var CONTAINS = 1;
var EQUALS = 2;
var STARTS_WITH = 3;
var ENDS_WITH = 4;
var TextFilter = (function () {
function TextFilter() {
}
TextFilter.prototype.init = function (params) {
this.filterParams = params.filterParams;
this.applyActive = this.filterParams && this.filterParams.apply === true;
this.filterChangedCallback = params.filterChangedCallback;
this.filterModifiedCallback = params.filterModifiedCallback;
this.localeTextFunc = params.localeTextFunc;
this.valueGetter = params.valueGetter;
this.createGui();
this.filterText = null;
this.filterType = CONTAINS;
this.createApi();
};
TextFilter.prototype.onNewRowsLoaded = function () {
var keepSelection = this.filterParams && this.filterParams.newRowsAction === 'keep';
if (!keepSelection) {
this.api.setType(CONTAINS);
this.api.setFilter(null);
}
};
TextFilter.prototype.afterGuiAttached = function () {
this.eFilterTextField.focus();
};
TextFilter.prototype.doesFilterPass = function (node) {
if (!this.filterText) {
return true;
}
var value = this.valueGetter(node);
if (!value) {
return false;
}
var valueLowerCase = value.toString().toLowerCase();
switch (this.filterType) {
case CONTAINS:
return valueLowerCase.indexOf(this.filterText) >= 0;
case EQUALS:
return valueLowerCase === this.filterText;
case STARTS_WITH:
return valueLowerCase.indexOf(this.filterText) === 0;
case ENDS_WITH:
var index = valueLowerCase.lastIndexOf(this.filterText);
return index >= 0 && index === (valueLowerCase.length - this.filterText.length);
default:
// should never happen
console.warn('invalid filter type ' + this.filterType);
return false;
}
};
TextFilter.prototype.getGui = function () {
return this.eGui;
};
TextFilter.prototype.isFilterActive = function () {
return this.filterText !== null;
};
TextFilter.prototype.createTemplate = function () {
return template
.replace('[FILTER...]', this.localeTextFunc('filterOoo', 'Filter...'))
.replace('[EQUALS]', this.localeTextFunc('equals', 'Equals'))
.replace('[CONTAINS]', this.localeTextFunc('contains', 'Contains'))
.replace('[STARTS WITH]', this.localeTextFunc('startsWith', 'Starts with'))
.replace('[ENDS WITH]', this.localeTextFunc('endsWith', 'Ends with'))
.replace('[APPLY FILTER]', this.localeTextFunc('applyFilter', 'Apply Filter'));
};
TextFilter.prototype.createGui = function () {
this.eGui = utils_1.Utils.loadTemplate(this.createTemplate());
this.eFilterTextField = this.eGui.querySelector("#filterText");
this.eTypeSelect = this.eGui.querySelector("#filterType");
utils_1.Utils.addChangeListener(this.eFilterTextField, this.onFilterChanged.bind(this));
this.eTypeSelect.addEventListener("change", this.onTypeChanged.bind(this));
this.setupApply();
};
TextFilter.prototype.setupApply = function () {
var _this = this;
if (this.applyActive) {
this.eApplyButton = this.eGui.querySelector('#applyButton');
this.eApplyButton.addEventListener('click', function () {
_this.filterChangedCallback();
});
}
else {
utils_1.Utils.removeElement(this.eGui, '#applyPanel');
}
};
TextFilter.prototype.onTypeChanged = function () {
this.filterType = parseInt(this.eTypeSelect.value);
this.filterChanged();
};
TextFilter.prototype.onFilterChanged = function () {
var filterText = utils_1.Utils.makeNull(this.eFilterTextField.value);
if (filterText && filterText.trim() === '') {
filterText = null;
}
var newFilterText;
if (filterText !== null && filterText !== undefined) {
newFilterText = filterText.toLowerCase();
}
else {
newFilterText = null;
}
if (this.filterText !== newFilterText) {
this.filterText = newFilterText;
this.filterChanged();
}
};
TextFilter.prototype.filterChanged = function () {
this.filterModifiedCallback();
if (!this.applyActive) {
this.filterChangedCallback();
}
};
TextFilter.prototype.createApi = function () {
var that = this;
this.api = {
EQUALS: EQUALS,
CONTAINS: CONTAINS,
STARTS_WITH: STARTS_WITH,
ENDS_WITH: ENDS_WITH,
setType: function (type) {
that.filterType = type;
that.eTypeSelect.value = type;
},
setFilter: function (filter) {
filter = utils_1.Utils.makeNull(filter);
if (filter) {
that.filterText = filter.toLowerCase();
that.eFilterTextField.value = filter;
}
else {
that.filterText = null;
that.eFilterTextField.value = null;
}
},
getType: function () {
return that.filterType;
},
getFilter: function () {
return that.filterText;
},
getModel: function () {
if (that.isFilterActive()) {
return {
type: that.filterType,
filter: that.filterText
};
}
else {
return null;
}
},
setModel: function (dataModel) {
if (dataModel) {
this.setType(dataModel.type);
this.setFilter(dataModel.filter);
}
else {
this.setFilter(null);
}
}
};
};
TextFilter.prototype.getApi = function () {
return this.api;
};
return TextFilter;
})();
exports.TextFilter = TextFilter;
/***/ },
/* 43 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var utils_1 = __webpack_require__(7);
var template = '<div>' +
'<div>' +
'<select class="ag-filter-select" id="filterType">' +
'<option value="1">[EQUALS]</option>' +
'<option value="2">[LESS THAN]</option>' +
'<option value="3">[GREATER THAN]</option>' +
'</select>' +
'</div>' +
'<div>' +
'<input class="ag-filter-filter" id="filterText" type="text" placeholder="[FILTER...]"/>' +
'</div>' +
'<div class="ag-filter-apply-panel" id="applyPanel">' +
'<button type="button" id="applyButton">[APPLY FILTER]</button>' +
'</div>' +
'</div>';
var EQUALS = 1;
var LESS_THAN = 2;
var GREATER_THAN = 3;
var NumberFilter = (function () {
function NumberFilter() {
}
NumberFilter.prototype.init = function (params) {
this.filterParams = params.filterParams;
this.applyActive = this.filterParams && this.filterParams.apply === true;
this.filterChangedCallback = params.filterChangedCallback;
this.filterModifiedCallback = params.filterModifiedCallback;
this.localeTextFunc = params.localeTextFunc;
this.valueGetter = params.valueGetter;
this.createGui();
this.filterNumber = null;
this.filterType = EQUALS;
this.createApi();
};
NumberFilter.prototype.onNewRowsLoaded = function () {
var keepSelection = this.filterParams && this.filterParams.newRowsAction === 'keep';
if (!keepSelection) {
this.api.setType(EQUALS);
this.api.setFilter(null);
}
};
NumberFilter.prototype.afterGuiAttached = function () {
this.eFilterTextField.focus();
};
NumberFilter.prototype.doesFilterPass = function (node) {
if (this.filterNumber === null) {
return true;
}
var value = this.valueGetter(node);
if (!value && value !== 0) {
return false;
}
var valueAsNumber;
if (typeof value === 'number') {
valueAsNumber = value;
}
else {
valueAsNumber = parseFloat(value);
}
switch (this.filterType) {
case EQUALS:
return valueAsNumber === this.filterNumber;
case LESS_THAN:
return valueAsNumber < this.filterNumber;
case GREATER_THAN:
return valueAsNumber > this.filterNumber;
default:
// should never happen
console.warn('invalid filter type ' + this.filterType);
return false;
}
};
NumberFilter.prototype.getGui = function () {
return this.eGui;
};
NumberFilter.prototype.isFilterActive = function () {
return this.filterNumber !== null;
};
NumberFilter.prototype.createTemplate = function () {
return template
.replace('[FILTER...]', this.localeTextFunc('filterOoo', 'Filter...'))
.replace('[EQUALS]', this.localeTextFunc('equals', 'Equals'))
.replace('[LESS THAN]', this.localeTextFunc('lessThan', 'Less than'))
.replace('[GREATER THAN]', this.localeTextFunc('greaterThan', 'Greater than'))
.replace('[APPLY FILTER]', this.localeTextFunc('applyFilter', 'Apply Filter'));
};
NumberFilter.prototype.createGui = function () {
this.eGui = utils_1.Utils.loadTemplate(this.createTemplate());
this.eFilterTextField = this.eGui.querySelector("#filterText");
this.eTypeSelect = this.eGui.querySelector("#filterType");
utils_1.Utils.addChangeListener(this.eFilterTextField, this.onFilterChanged.bind(this));
this.eTypeSelect.addEventListener("change", this.onTypeChanged.bind(this));
this.setupApply();
};
NumberFilter.prototype.setupApply = function () {
var _this = this;
if (this.applyActive) {
this.eApplyButton = this.eGui.querySelector('#applyButton');
this.eApplyButton.addEventListener('click', function () {
_this.filterChangedCallback();
});
}
else {
utils_1.Utils.removeElement(this.eGui, '#applyPanel');
}
};
NumberFilter.prototype.onTypeChanged = function () {
this.filterType = parseInt(this.eTypeSelect.value);
this.filterChanged();
};
NumberFilter.prototype.filterChanged = function () {
this.filterModifiedCallback();
if (!this.applyActive) {
this.filterChangedCallback();
}
};
NumberFilter.prototype.onFilterChanged = function () {
var filterText = utils_1.Utils.makeNull(this.eFilterTextField.value);
if (filterText && filterText.trim() === '') {
filterText = null;
}
var newFilter;
if (filterText !== null && filterText !== undefined) {
newFilter = parseFloat(filterText);
}
else {
newFilter = null;
}
if (this.filterNumber !== newFilter) {
this.filterNumber = newFilter;
this.filterChanged();
}
};
NumberFilter.prototype.createApi = function () {
var that = this;
this.api = {
EQUALS: EQUALS,
LESS_THAN: LESS_THAN,
GREATER_THAN: GREATER_THAN,
setType: function (type) {
that.filterType = type;
that.eTypeSelect.value = type;
},
setFilter: function (filter) {
filter = utils_1.Utils.makeNull(filter);
if (filter !== null && !(typeof filter === 'number')) {
filter = parseFloat(filter);
}
that.filterNumber = filter;
that.eFilterTextField.value = filter;
},
getType: function () {
return that.filterType;
},
getFilter: function () {
return that.filterNumber;
},
getModel: function () {
if (that.isFilterActive()) {
return {
type: that.filterType,
filter: that.filterNumber
};
}
else {
return null;
}
},
setModel: function (dataModel) {
if (dataModel) {
this.setType(dataModel.type);
this.setFilter(dataModel.filter);
}
else {
this.setFilter(null);
}
}
};
};
NumberFilter.prototype.getApi = function () {
return this.api;
};
return NumberFilter;
})();
exports.NumberFilter = NumberFilter;
/***/ },
/* 44 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var eventService_1 = __webpack_require__(4);
var context_3 = __webpack_require__(6);
var events_1 = __webpack_require__(10);
var gridOptionsWrapper_1 = __webpack_require__(3);
var columnController_1 = __webpack_require__(13);
var utils_1 = __webpack_require__(7);
var gridCell_1 = __webpack_require__(31);
var FocusedCellController = (function () {
function FocusedCellController() {
}
FocusedCellController.prototype.init = function () {
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_EVERYTHING_CHANGED, this.clearFocusedCell.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_GROUP_OPENED, this.clearFocusedCell.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_MOVED, this.clearFocusedCell.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_PINNED, this.clearFocusedCell.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGE, this.clearFocusedCell.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_VISIBLE, this.clearFocusedCell.bind(this));
//this.eventService.addEventListener(Events.EVENT_COLUMN_VISIBLE, this.clearFocusedCell.bind(this));
};
FocusedCellController.prototype.clearFocusedCell = function () {
this.focusedCell = null;
this.onCellFocused(false);
};
FocusedCellController.prototype.getFocusedCell = function () {
return this.focusedCell;
};
FocusedCellController.prototype.setFocusedCell = function (rowIndex, colKey, floating, forceBrowserFocus) {
if (forceBrowserFocus === void 0) { forceBrowserFocus = false; }
if (this.gridOptionsWrapper.isSuppressCellSelection()) {
return;
}
var column = utils_1.Utils.makeNull(this.columnController.getColumn(colKey));
this.focusedCell = new gridCell_1.GridCell(rowIndex, utils_1.Utils.makeNull(floating), column);
this.onCellFocused(forceBrowserFocus);
};
FocusedCellController.prototype.isCellFocused = function (rowIndex, column, floating) {
if (utils_1.Utils.missing(this.focusedCell)) {
return false;
}
return this.focusedCell.column === column && this.isRowFocused(rowIndex, floating);
};
FocusedCellController.prototype.isRowFocused = function (rowIndex, floating) {
if (utils_1.Utils.missing(this.focusedCell)) {
return false;
}
var floatingOrNull = utils_1.Utils.makeNull(floating);
return this.focusedCell.rowIndex === rowIndex && this.focusedCell.floating === floatingOrNull;
};
FocusedCellController.prototype.onCellFocused = function (forceBrowserFocus) {
var event = {
rowIndex: null,
column: null,
floating: null,
forceBrowserFocus: forceBrowserFocus
};
if (this.focusedCell) {
event.rowIndex = this.focusedCell.rowIndex;
event.column = this.focusedCell.column;
event.floating = this.focusedCell.floating;
}
this.eventService.dispatchEvent(events_1.Events.EVENT_CELL_FOCUSED, event);
};
__decorate([
context_2.Autowired('eventService'),
__metadata('design:type', eventService_1.EventService)
], FocusedCellController.prototype, "eventService", void 0);
__decorate([
context_2.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], FocusedCellController.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_2.Autowired('columnController'),
__metadata('design:type', columnController_1.ColumnController)
], FocusedCellController.prototype, "columnController", void 0);
__decorate([
context_3.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], FocusedCellController.prototype, "init", null);
FocusedCellController = __decorate([
context_1.Bean('focusedCellController'),
__metadata('design:paramtypes', [])
], FocusedCellController);
return FocusedCellController;
})();
exports.FocusedCellController = FocusedCellController;
/***/ },
/* 45 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var utils_1 = __webpack_require__(7);
var eventService_1 = __webpack_require__(4);
var Component = (function () {
function Component(template) {
this.destroyFunctions = [];
this.eGui = utils_1.Utils.loadTemplate(template);
}
Component.prototype.addEventListener = function (eventType, listener) {
if (!this.localEventService) {
this.localEventService = new eventService_1.EventService();
}
this.localEventService.addEventListener(eventType, listener);
};
Component.prototype.dispatchEvent = function (eventType, event) {
if (this.localEventService) {
this.localEventService.dispatchEvent(eventType, event);
}
};
Component.prototype.getGui = function () {
return this.eGui;
};
Component.prototype.queryForHtmlElement = function (cssSelector) {
return this.eGui.querySelector(cssSelector);
};
Component.prototype.queryForHtmlInputElement = function (cssSelector) {
return this.eGui.querySelector(cssSelector);
};
Component.prototype.appendChild = function (newChild) {
if (utils_1.Utils.isNodeOrElement(newChild)) {
this.eGui.appendChild(newChild);
}
else {
this.eGui.appendChild(newChild.getGui());
}
};
Component.prototype.setVisible = function (visible) {
utils_1.Utils.addOrRemoveCssClass(this.eGui, 'ag-hidden', !visible);
};
Component.prototype.destroy = function () {
this.destroyFunctions.forEach(function (func) { return func(); });
};
Component.prototype.addGuiEventListener = function (event, listener) {
var _this = this;
this.getGui().addEventListener(event, listener);
this.destroyFunctions.push(function () { return _this.getGui().removeEventListener(event, listener); });
};
Component.prototype.addDestroyableEventListener = function (eElement, event, listener) {
if (eElement instanceof eventService_1.EventService) {
eElement.addEventListener(event, listener);
}
else {
eElement.addEventListener(event, listener);
}
this.destroyFunctions.push(function () {
if (eElement instanceof eventService_1.EventService) {
eElement.removeEventListener(event, listener);
}
else {
eElement.removeEventListener(event, listener);
}
});
};
Component.prototype.addDestroyFunc = function (func) {
this.destroyFunctions.push(func);
};
return Component;
})();
exports.Component = Component;
/***/ },
/* 46 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var context_1 = __webpack_require__(6);
var constants_1 = __webpack_require__(8);
var context_2 = __webpack_require__(6);
var columnController_1 = __webpack_require__(13);
var floatingRowModel_1 = __webpack_require__(26);
var utils_1 = __webpack_require__(7);
var gridRow_1 = __webpack_require__(32);
var gridCell_1 = __webpack_require__(31);
var CellNavigationService = (function () {
function CellNavigationService() {
}
CellNavigationService.prototype.getNextCellToFocus = function (key, lastCellToFocus) {
switch (key) {
case constants_1.Constants.KEY_UP: return this.getCellAbove(lastCellToFocus);
case constants_1.Constants.KEY_DOWN: return this.getCellBelow(lastCellToFocus);
case constants_1.Constants.KEY_RIGHT: return this.getCellToRight(lastCellToFocus);
case constants_1.Constants.KEY_LEFT: return this.getCellToLeft(lastCellToFocus);
default: console.log('ag-Grid: unknown key for navigation ' + key);
}
};
CellNavigationService.prototype.getCellToLeft = function (lastCell) {
var colToLeft = this.columnController.getDisplayedColBefore(lastCell.column);
if (!colToLeft) {
return null;
}
else {
return new gridCell_1.GridCell(lastCell.rowIndex, lastCell.floating, colToLeft);
}
};
CellNavigationService.prototype.getCellToRight = function (lastCell) {
var colToRight = this.columnController.getDisplayedColAfter(lastCell.column);
// if already on right, do nothing
if (!colToRight) {
return null;
}
else {
return new gridCell_1.GridCell(lastCell.rowIndex, lastCell.floating, colToRight);
}
};
CellNavigationService.prototype.getRowBelow = function (lastRow) {
// if already on top row, do nothing
if (this.isLastRowInContainer(lastRow)) {
if (lastRow.isFloatingBottom()) {
return null;
}
else if (lastRow.isNotFloating()) {
if (this.floatingRowModel.isRowsToRender(constants_1.Constants.FLOATING_BOTTOM)) {
return new gridRow_1.GridRow(0, constants_1.Constants.FLOATING_BOTTOM);
}
else {
return null;
}
}
else {
if (this.rowModel.isRowsToRender()) {
return new gridRow_1.GridRow(0, null);
}
else if (this.floatingRowModel.isRowsToRender(constants_1.Constants.FLOATING_BOTTOM)) {
return new gridRow_1.GridRow(0, constants_1.Constants.FLOATING_BOTTOM);
}
else {
return null;
}
}
}
else {
return new gridRow_1.GridRow(lastRow.rowIndex + 1, lastRow.floating);
}
};
CellNavigationService.prototype.getCellBelow = function (lastCell) {
var rowBelow = this.getRowBelow(lastCell.getGridRow());
if (rowBelow) {
return new gridCell_1.GridCell(rowBelow.rowIndex, rowBelow.floating, lastCell.column);
}
else {
return null;
}
};
CellNavigationService.prototype.isLastRowInContainer = function (gridRow) {
if (gridRow.isFloatingTop()) {
var lastTopIndex = this.floatingRowModel.getFloatingTopRowData().length - 1;
return lastTopIndex === gridRow.rowIndex;
}
else if (gridRow.isFloatingBottom()) {
var lastBottomIndex = this.floatingRowModel.getFloatingBottomRowData().length - 1;
return lastBottomIndex === gridRow.rowIndex;
}
else {
var lastBodyIndex = this.rowModel.getRowCount() - 1;
return lastBodyIndex === gridRow.rowIndex;
}
};
CellNavigationService.prototype.getRowAbove = function (lastRow) {
// if already on top row, do nothing
if (lastRow.rowIndex === 0) {
if (lastRow.isFloatingTop()) {
return null;
}
else if (lastRow.isNotFloating()) {
if (this.floatingRowModel.isRowsToRender(constants_1.Constants.FLOATING_TOP)) {
return this.getLastFloatingTopRow();
}
else {
return null;
}
}
else {
// last floating bottom
if (this.rowModel.isRowsToRender()) {
return this.getLastBodyCell();
}
else if (this.floatingRowModel.isRowsToRender(constants_1.Constants.FLOATING_TOP)) {
return this.getLastFloatingTopRow();
}
else {
return null;
}
}
}
else {
return new gridRow_1.GridRow(lastRow.rowIndex - 1, lastRow.floating);
}
};
CellNavigationService.prototype.getCellAbove = function (lastCell) {
var rowAbove = this.getRowAbove(lastCell.getGridRow());
if (rowAbove) {
return new gridCell_1.GridCell(rowAbove.rowIndex, rowAbove.floating, lastCell.column);
}
else {
return null;
}
};
CellNavigationService.prototype.getLastBodyCell = function () {
var lastBodyRow = this.rowModel.getRowCount() - 1;
return new gridRow_1.GridRow(lastBodyRow, null);
};
CellNavigationService.prototype.getLastFloatingTopRow = function () {
var lastFloatingRow = this.floatingRowModel.getFloatingTopRowData().length - 1;
return new gridRow_1.GridRow(lastFloatingRow, constants_1.Constants.FLOATING_TOP);
};
CellNavigationService.prototype.getNextTabbedCellForwards = function (gridCell) {
var displayedColumns = this.columnController.getAllDisplayedColumns();
var newRowIndex = gridCell.rowIndex;
var newFloating = gridCell.floating;
// move along to the next cell
var newColumn = this.columnController.getDisplayedColAfter(gridCell.column);
// check if end of the row, and if so, go forward a row
if (!newColumn) {
newColumn = displayedColumns[0];
var rowBelow = this.getRowBelow(gridCell.getGridRow());
if (utils_1.Utils.missing(rowBelow)) {
return;
}
newRowIndex = rowBelow.rowIndex;
newFloating = rowBelow.floating;
}
return new gridCell_1.GridCell(newRowIndex, newFloating, newColumn);
};
CellNavigationService.prototype.getNextTabbedCellBackwards = function (gridCell) {
var displayedColumns = this.columnController.getAllDisplayedColumns();
var newRowIndex = gridCell.rowIndex;
var newFloating = gridCell.floating;
// move along to the next cell
var newColumn = this.columnController.getDisplayedColBefore(gridCell.column);
// check if end of the row, and if so, go forward a row
if (!newColumn) {
newColumn = displayedColumns[displayedColumns.length - 1];
var rowAbove = this.getRowAbove(gridCell.getGridRow());
if (utils_1.Utils.missing(rowAbove)) {
return;
}
newRowIndex = rowAbove.rowIndex;
newFloating = rowAbove.floating;
}
return new gridCell_1.GridCell(newRowIndex, newFloating, newColumn);
};
__decorate([
context_2.Autowired('columnController'),
__metadata('design:type', columnController_1.ColumnController)
], CellNavigationService.prototype, "columnController", void 0);
__decorate([
context_2.Autowired('rowModel'),
__metadata('design:type', Object)
], CellNavigationService.prototype, "rowModel", void 0);
__decorate([
context_2.Autowired('floatingRowModel'),
__metadata('design:type', floatingRowModel_1.FloatingRowModel)
], CellNavigationService.prototype, "floatingRowModel", void 0);
CellNavigationService = __decorate([
context_1.Bean('cellNavigationService'),
__metadata('design:paramtypes', [])
], CellNavigationService);
return CellNavigationService;
})();
exports.CellNavigationService = CellNavigationService;
/***/ },
/* 47 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var gridOptionsWrapper_1 = __webpack_require__(3);
var logger_1 = __webpack_require__(5);
var columnUtils_1 = __webpack_require__(16);
var columnKeyCreator_1 = __webpack_require__(48);
var originalColumnGroup_1 = __webpack_require__(17);
var column_1 = __webpack_require__(15);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var context_3 = __webpack_require__(6);
var context_4 = __webpack_require__(6);
// takes in a list of columns, as specified by the column definitions, and returns column groups
var BalancedColumnTreeBuilder = (function () {
function BalancedColumnTreeBuilder() {
}
BalancedColumnTreeBuilder.prototype.agWire = function (loggerFactory) {
this.logger = loggerFactory.create('BalancedColumnTreeBuilder');
};
BalancedColumnTreeBuilder.prototype.createBalancedColumnGroups = function (abstractColDefs) {
// column key creator dishes out unique column id's in a deterministic way,
// so if we have two grids (that cold be master/slave) with same column definitions,
// then this ensures the two grids use identical id's.
var columnKeyCreator = new columnKeyCreator_1.ColumnKeyCreator();
// create am unbalanced tree that maps the provided definitions
var unbalancedTree = this.recursivelyCreateColumns(abstractColDefs, 0, columnKeyCreator);
var treeDept = this.findMaxDept(unbalancedTree, 0);
this.logger.log('Number of levels for grouped columns is ' + treeDept);
var balancedTree = this.balanceColumnTree(unbalancedTree, 0, treeDept, columnKeyCreator);
this.columnUtils.deptFirstOriginalTreeSearch(balancedTree, function (child) {
if (child instanceof originalColumnGroup_1.OriginalColumnGroup) {
child.calculateExpandable();
}
});
return {
balancedTree: balancedTree,
treeDept: treeDept
};
};
BalancedColumnTreeBuilder.prototype.balanceColumnTree = function (unbalancedTree, currentDept, columnDept, columnKeyCreator) {
var _this = this;
var result = [];
// go through each child, for groups, recurse a level deeper,
// for columns we need to pad
unbalancedTree.forEach(function (child) {
if (child instanceof originalColumnGroup_1.OriginalColumnGroup) {
var originalGroup = child;
var newChildren = _this.balanceColumnTree(originalGroup.getChildren(), currentDept + 1, columnDept, columnKeyCreator);
originalGroup.setChildren(newChildren);
result.push(originalGroup);
}
else {
var newChild = child;
for (var i = columnDept - 1; i >= currentDept; i--) {
var newColId = columnKeyCreator.getUniqueKey(null, null);
var paddedGroup = new originalColumnGroup_1.OriginalColumnGroup(null, newColId);
paddedGroup.setChildren([newChild]);
newChild = paddedGroup;
}
result.push(newChild);
}
});
return result;
};
BalancedColumnTreeBuilder.prototype.findMaxDept = function (treeChildren, dept) {
var maxDeptThisLevel = dept;
for (var i = 0; i < treeChildren.length; i++) {
var abstractColumn = treeChildren[i];
if (abstractColumn instanceof originalColumnGroup_1.OriginalColumnGroup) {
var originalGroup = abstractColumn;
var newDept = this.findMaxDept(originalGroup.getChildren(), dept + 1);
if (maxDeptThisLevel < newDept) {
maxDeptThisLevel = newDept;
}
}
}
return maxDeptThisLevel;
};
BalancedColumnTreeBuilder.prototype.recursivelyCreateColumns = function (abstractColDefs, level, columnKeyCreator) {
var _this = this;
var result = [];
if (!abstractColDefs) {
return result;
}
abstractColDefs.forEach(function (abstractColDef) {
_this.checkForDeprecatedItems(abstractColDef);
if (_this.isColumnGroup(abstractColDef)) {
var groupColDef = abstractColDef;
var groupId = columnKeyCreator.getUniqueKey(groupColDef.groupId, null);
var originalGroup = new originalColumnGroup_1.OriginalColumnGroup(groupColDef, groupId);
var children = _this.recursivelyCreateColumns(groupColDef.children, level + 1, columnKeyCreator);
originalGroup.setChildren(children);
result.push(originalGroup);
}
else {
var colDef = abstractColDef;
var colId = columnKeyCreator.getUniqueKey(colDef.colId, colDef.field);
var column = new column_1.Column(colDef, colId);
_this.context.wireBean(column);
result.push(column);
}
});
return result;
};
BalancedColumnTreeBuilder.prototype.checkForDeprecatedItems = function (colDef) {
if (colDef) {
var colDefNoType = colDef; // take out the type, so we can access attributes not defined in the type
if (colDefNoType.group !== undefined) {
console.warn('ag-grid: colDef.group is invalid, please check documentation on how to do grouping as it changed in version 3');
}
if (colDefNoType.headerGroup !== undefined) {
console.warn('ag-grid: colDef.headerGroup is invalid, please check documentation on how to do grouping as it changed in version 3');
}
if (colDefNoType.headerGroupShow !== undefined) {
console.warn('ag-grid: colDef.headerGroupShow is invalid, should be columnGroupShow, please check documentation on how to do grouping as it changed in version 3');
}
}
};
// if object has children, we assume it's a group
BalancedColumnTreeBuilder.prototype.isColumnGroup = function (abstractColDef) {
return abstractColDef.children !== undefined;
};
__decorate([
context_3.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], BalancedColumnTreeBuilder.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_3.Autowired('columnUtils'),
__metadata('design:type', columnUtils_1.ColumnUtils)
], BalancedColumnTreeBuilder.prototype, "columnUtils", void 0);
__decorate([
context_3.Autowired('context'),
__metadata('design:type', context_4.Context)
], BalancedColumnTreeBuilder.prototype, "context", void 0);
__decorate([
__param(0, context_2.Qualifier('loggerFactory')),
__metadata('design:type', Function),
__metadata('design:paramtypes', [logger_1.LoggerFactory]),
__metadata('design:returntype', void 0)
], BalancedColumnTreeBuilder.prototype, "agWire", null);
BalancedColumnTreeBuilder = __decorate([
context_1.Bean('balancedColumnTreeBuilder'),
__metadata('design:paramtypes', [])
], BalancedColumnTreeBuilder);
return BalancedColumnTreeBuilder;
})();
exports.BalancedColumnTreeBuilder = BalancedColumnTreeBuilder;
/***/ },
/* 48 */
/***/ function(module, exports) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
// class returns a unique id to use for the column. it checks the existing columns, and if the requested
// id is already taken, it will start appending numbers until it gets a unique id.
// eg, if the col field is 'name', it will try ids: {name, name_1, name_2...}
// if no field or id provided in the col, it will try the ids of natural numbers
var ColumnKeyCreator = (function () {
function ColumnKeyCreator() {
this.existingKeys = [];
}
ColumnKeyCreator.prototype.getUniqueKey = function (colId, colField) {
var count = 0;
while (true) {
var idToTry;
if (colId) {
idToTry = colId;
if (count !== 0) {
idToTry += '_' + count;
}
}
else if (colField) {
idToTry = colField;
if (count !== 0) {
idToTry += '_' + count;
}
}
else {
idToTry = '' + count;
}
if (this.existingKeys.indexOf(idToTry) < 0) {
this.existingKeys.push(idToTry);
return idToTry;
}
count++;
}
};
return ColumnKeyCreator;
})();
exports.ColumnKeyCreator = ColumnKeyCreator;
/***/ },
/* 49 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var columnUtils_1 = __webpack_require__(16);
var columnGroup_1 = __webpack_require__(14);
var originalColumnGroup_1 = __webpack_require__(17);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
// takes in a list of columns, as specified by the column definitions, and returns column groups
var DisplayedGroupCreator = (function () {
function DisplayedGroupCreator() {
}
DisplayedGroupCreator.prototype.createDisplayedGroups = function (sortedVisibleColumns, balancedColumnTree, groupInstanceIdCreator) {
var _this = this;
var result = [];
var previousRealPath;
var previousOriginalPath;
// go through each column, then do a bottom up comparison to the previous column, and start
// to share groups if they converge at any point.
sortedVisibleColumns.forEach(function (currentColumn) {
var currentOriginalPath = _this.getOriginalPathForColumn(balancedColumnTree, currentColumn);
var currentRealPath = [];
var firstColumn = !previousOriginalPath;
for (var i = 0; i < currentOriginalPath.length; i++) {
if (firstColumn || currentOriginalPath[i] !== previousOriginalPath[i]) {
// new group needed
var originalGroup = currentOriginalPath[i];
var groupId = originalGroup.getGroupId();
var instanceId = groupInstanceIdCreator.getInstanceIdForKey(groupId);
var newGroup = new columnGroup_1.ColumnGroup(originalGroup, groupId, instanceId);
currentRealPath[i] = newGroup;
// if top level, add to result, otherwise add to parent
if (i == 0) {
result.push(newGroup);
}
else {
currentRealPath[i - 1].addChild(newGroup);
}
}
else {
// reuse old group
currentRealPath[i] = previousRealPath[i];
}
}
var noColumnGroups = currentRealPath.length === 0;
if (noColumnGroups) {
// if we are not grouping, then the result of the above is an empty
// path (no groups), and we just add the column to the root list.
result.push(currentColumn);
}
else {
var leafGroup = currentRealPath[currentRealPath.length - 1];
leafGroup.addChild(currentColumn);
}
previousRealPath = currentRealPath;
previousOriginalPath = currentOriginalPath;
});
return result;
};
DisplayedGroupCreator.prototype.createFakePath = function (balancedColumnTree) {
var result = [];
var currentChildren = balancedColumnTree;
// this while look does search on the balanced tree, so our result is the right length
var index = 0;
while (currentChildren && currentChildren[0] && currentChildren[0] instanceof originalColumnGroup_1.OriginalColumnGroup) {
// putting in a deterministic fake id, in case the API in the future needs to reference the col
result.push(new originalColumnGroup_1.OriginalColumnGroup(null, 'FAKE_PATH_' + index));
currentChildren = currentChildren[0].getChildren();
index++;
}
return result;
};
DisplayedGroupCreator.prototype.getOriginalPathForColumn = function (balancedColumnTree, column) {
var result = [];
var found = false;
recursePath(balancedColumnTree, 0);
// it's possible we didn't find a path. this happens if the column is generated
// by the grid, in that the definition didn't come from the client. in this case,
// we create a fake original path.
if (found) {
return result;
}
else {
return this.createFakePath(balancedColumnTree);
}
function recursePath(balancedColumnTree, dept) {
for (var i = 0; i < balancedColumnTree.length; i++) {
if (found) {
// quit the search, so 'result' is kept with the found result
return;
}
var node = balancedColumnTree[i];
if (node instanceof originalColumnGroup_1.OriginalColumnGroup) {
var nextNode = node;
recursePath(nextNode.getChildren(), dept + 1);
result[dept] = node;
}
else {
if (node === column) {
found = true;
}
}
}
}
};
__decorate([
context_2.Autowired('columnUtils'),
__metadata('design:type', columnUtils_1.ColumnUtils)
], DisplayedGroupCreator.prototype, "columnUtils", void 0);
DisplayedGroupCreator = __decorate([
context_1.Bean('displayedGroupCreator'),
__metadata('design:paramtypes', [])
], DisplayedGroupCreator);
return DisplayedGroupCreator;
})();
exports.DisplayedGroupCreator = DisplayedGroupCreator;
/***/ },
/* 50 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var rowRenderer_1 = __webpack_require__(23);
var gridPanel_1 = __webpack_require__(24);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var AutoWidthCalculator = (function () {
function AutoWidthCalculator() {
}
// this is the trick: we create a dummy container and clone all the cells
// into the dummy, then check the dummy's width. then destroy the dummy
// as we don't need it any more.
// drawback: only the cells visible on the screen are considered
AutoWidthCalculator.prototype.getPreferredWidthForColumn = function (column) {
var eDummyContainer = document.createElement('span');
// position fixed, so it isn't restricted to the boundaries of the parent
eDummyContainer.style.position = 'fixed';
// we put the dummy into the body container, so it will inherit all the
// css styles that the real cells are inheriting
var eBodyContainer = this.gridPanel.getBodyContainer();
eBodyContainer.appendChild(eDummyContainer);
// get all the cells that are currently displayed (this only brings back
// rendered cells, rows not rendered due to row visualisation will not be here)
var eOriginalCells = this.rowRenderer.getAllCellsForColumn(column);
eOriginalCells.forEach(function (eCell, index) {
// make a deep clone of the cell
var eCellClone = eCell.cloneNode(true);
// the original has a fixed width, we remove this to allow the natural width based on content
eCellClone.style.width = '';
// the original has position = absolute, we need to remove this so it's positioned normally
eCellClone.style.position = 'static';
eCellClone.style.left = '';
// we put the cell into a containing div, as otherwise the cells would just line up
// on the same line, standard flow layout, by putting them into divs, they are laid
// out one per line
var eCloneParent = document.createElement('div');
// table-row, so that each cell is on a row. i also tried display='block', but this
// didn't work in IE
eCloneParent.style.display = 'table-row';
// the twig on the branch, the branch on the tree, the tree in the hole,
// the hole in the bog, the bog in the clone, the clone in the parent,
// the parent in the dummy, and the dummy down in the vall-e-ooo, OOOOOOOOO! Oh row the rattling bog....
eCloneParent.appendChild(eCellClone);
eDummyContainer.appendChild(eCloneParent);
});
// at this point, all the clones are lined up vertically with natural widths. the dummy
// container will have a width wide enough just to fit the largest.
var dummyContainerWidth = eDummyContainer.offsetWidth;
// we are finished with the dummy container, so get rid of it
eBodyContainer.removeChild(eDummyContainer);
// we add 4 as I found without it, the gui still put '...' after some of the texts
return dummyContainerWidth + 4;
};
__decorate([
context_2.Autowired('rowRenderer'),
__metadata('design:type', rowRenderer_1.RowRenderer)
], AutoWidthCalculator.prototype, "rowRenderer", void 0);
__decorate([
context_2.Autowired('gridPanel'),
__metadata('design:type', gridPanel_1.GridPanel)
], AutoWidthCalculator.prototype, "gridPanel", void 0);
AutoWidthCalculator = __decorate([
context_1.Bean('autoWidthCalculator'),
__metadata('design:paramtypes', [])
], AutoWidthCalculator);
return AutoWidthCalculator;
})();
exports.AutoWidthCalculator = AutoWidthCalculator;
/***/ },
/* 51 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var events_1 = __webpack_require__(10);
var ColumnChangeEvent = (function () {
function ColumnChangeEvent(type) {
this.type = type;
}
ColumnChangeEvent.prototype.toString = function () {
var result = 'ColumnChangeEvent {type: ' + this.type;
if (this.column) {
result += ', column: ' + this.column.getColId();
}
if (this.columnGroup) {
result += true ? this.columnGroup.getColGroupDef().headerName : '(not defined]';
}
if (this.toIndex) {
result += ', toIndex: ' + this.toIndex;
}
if (this.visible) {
result += ', visible: ' + this.visible;
}
if (this.pinned) {
result += ', pinned: ' + this.pinned;
}
if (typeof this.finished == 'boolean') {
result += ', finished: ' + this.finished;
}
result += '}';
return result;
};
ColumnChangeEvent.prototype.withPinned = function (pinned) {
this.pinned = pinned;
return this;
};
ColumnChangeEvent.prototype.withVisible = function (visible) {
this.visible = visible;
return this;
};
ColumnChangeEvent.prototype.isVisible = function () {
return this.visible;
};
ColumnChangeEvent.prototype.getPinned = function () {
return this.pinned;
};
ColumnChangeEvent.prototype.withColumn = function (column) {
this.column = column;
return this;
};
ColumnChangeEvent.prototype.withColumns = function (columns) {
this.columns = columns;
return this;
};
ColumnChangeEvent.prototype.withFinished = function (finished) {
this.finished = finished;
return this;
};
ColumnChangeEvent.prototype.withColumnGroup = function (columnGroup) {
this.columnGroup = columnGroup;
return this;
};
ColumnChangeEvent.prototype.withToIndex = function (toIndex) {
this.toIndex = toIndex;
return this;
};
ColumnChangeEvent.prototype.getToIndex = function () {
return this.toIndex;
};
ColumnChangeEvent.prototype.getType = function () {
return this.type;
};
ColumnChangeEvent.prototype.getColumn = function () {
return this.column;
};
ColumnChangeEvent.prototype.getColumns = function () {
return this.columns;
};
ColumnChangeEvent.prototype.getColumnGroup = function () {
return this.columnGroup;
};
ColumnChangeEvent.prototype.isPinnedPanelVisibilityImpacted = function () {
return this.type === events_1.Events.EVENT_COLUMN_EVERYTHING_CHANGED ||
this.type === events_1.Events.EVENT_COLUMN_GROUP_OPENED ||
this.type === events_1.Events.EVENT_COLUMN_VISIBLE ||
this.type === events_1.Events.EVENT_COLUMN_PINNED;
};
ColumnChangeEvent.prototype.isContainerWidthImpacted = function () {
return this.type === events_1.Events.EVENT_COLUMN_EVERYTHING_CHANGED ||
this.type === events_1.Events.EVENT_COLUMN_GROUP_OPENED ||
this.type === events_1.Events.EVENT_COLUMN_VISIBLE ||
this.type === events_1.Events.EVENT_COLUMN_RESIZED ||
this.type === events_1.Events.EVENT_COLUMN_PINNED ||
this.type === events_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGE;
};
ColumnChangeEvent.prototype.isIndividualColumnResized = function () {
return this.type === events_1.Events.EVENT_COLUMN_RESIZED && this.column !== undefined && this.column !== null;
};
ColumnChangeEvent.prototype.isFinished = function () {
return this.finished;
};
return ColumnChangeEvent;
})();
exports.ColumnChangeEvent = ColumnChangeEvent;
/***/ },
/* 52 */
/***/ function(module, exports) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
// class returns unique instance id's for columns.
// eg, the following calls (in this order) will result in:
//
// getInstanceIdForKey('country') => 0
// getInstanceIdForKey('country') => 1
// getInstanceIdForKey('country') => 2
// getInstanceIdForKey('country') => 3
// getInstanceIdForKey('age') => 0
// getInstanceIdForKey('age') => 1
// getInstanceIdForKey('country') => 4
var GroupInstanceIdCreator = (function () {
function GroupInstanceIdCreator() {
// this map contains keys to numbers, so we remember what the last call was
this.existingIds = {};
}
GroupInstanceIdCreator.prototype.getInstanceIdForKey = function (key) {
var lastResult = this.existingIds[key];
var result;
if (typeof lastResult !== 'number') {
// first time this key
result = 0;
}
else {
result = lastResult + 1;
}
this.existingIds[key] = result;
return result;
};
return GroupInstanceIdCreator;
})();
exports.GroupInstanceIdCreator = GroupInstanceIdCreator;
/***/ },
/* 53 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var utils_1 = __webpack_require__(7);
function defaultGroupComparator(valueA, valueB, nodeA, nodeB) {
var nodeAIsGroup = utils_1.Utils.exists(nodeA) && nodeA.group;
var nodeBIsGroup = utils_1.Utils.exists(nodeB) && nodeB.group;
var bothAreGroups = nodeAIsGroup && nodeBIsGroup;
var bothAreNormal = !nodeAIsGroup && !nodeBIsGroup;
if (bothAreGroups) {
return utils_1.Utils.defaultComparator(nodeA.key, nodeB.key);
}
else if (bothAreNormal) {
return utils_1.Utils.defaultComparator(valueA, valueB);
}
else if (nodeAIsGroup) {
return 1;
}
else {
return -1;
}
}
exports.defaultGroupComparator = defaultGroupComparator;
/***/ },
/* 54 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var gridOptionsWrapper_1 = __webpack_require__(3);
var columnController_1 = __webpack_require__(13);
var gridPanel_1 = __webpack_require__(24);
var column_1 = __webpack_require__(15);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var context_3 = __webpack_require__(6);
var headerContainer_1 = __webpack_require__(55);
var eventService_1 = __webpack_require__(4);
var events_1 = __webpack_require__(10);
var context_4 = __webpack_require__(6);
var HeaderRenderer = (function () {
function HeaderRenderer() {
}
HeaderRenderer.prototype.init = function () {
this.eHeaderViewport = this.gridPanel.getHeaderViewport();
this.eRoot = this.gridPanel.getRoot();
this.eHeaderOverlay = this.gridPanel.getHeaderOverlay();
this.pinnedLeftContainer = new headerContainer_1.HeaderContainer(this.gridPanel.getPinnedLeftHeader(), null, this.eRoot, column_1.Column.PINNED_LEFT);
this.pinnedRightContainer = new headerContainer_1.HeaderContainer(this.gridPanel.getPinnedRightHeader(), null, this.eRoot, column_1.Column.PINNED_RIGHT);
this.centerContainer = new headerContainer_1.HeaderContainer(this.gridPanel.getHeaderContainer(), this.gridPanel.getHeaderViewport(), this.eRoot, null);
this.context.wireBean(this.pinnedLeftContainer);
this.context.wireBean(this.pinnedRightContainer);
this.context.wireBean(this.centerContainer);
// unlike the table data, the header more often 'refreshes everything' as a way to redraw, rather than
// do delta changes based on the event. this is because groups have bigger impacts, eg a column move
// can end up in a group splitting into two, or joining into one. this complexity makes the job much
// harder to do delta updates. instead we just shotgun - which is fine, as the header is relatively
// small compared to the body, so the cpu cost is low in comparison. it does mean we don't get any
// animations.
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_EVERYTHING_CHANGED, this.refreshHeader.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGE, this.refreshHeader.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_MOVED, this.refreshHeader.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_VISIBLE, this.refreshHeader.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_GROUP_OPENED, this.refreshHeader.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_PINNED, this.refreshHeader.bind(this));
this.eventService.addEventListener(events_1.Events.EVENT_HEADER_HEIGHT_CHANGED, this.refreshHeader.bind(this));
// for resized, the individual cells take care of this, so don't need to refresh everything
this.eventService.addEventListener(events_1.Events.EVENT_COLUMN_RESIZED, this.setPinnedColContainerWidth.bind(this));
if (this.columnController.isReady()) {
this.refreshHeader();
}
};
// this is called from the API and refreshes everything, should be broken out
// into refresh everything vs just something changed
HeaderRenderer.prototype.refreshHeader = function () {
this.pinnedLeftContainer.removeAllChildren();
this.pinnedRightContainer.removeAllChildren();
this.centerContainer.removeAllChildren();
this.pinnedLeftContainer.insertHeaderRowsIntoContainer();
this.pinnedRightContainer.insertHeaderRowsIntoContainer();
this.centerContainer.insertHeaderRowsIntoContainer();
// if forPrint, overlay is missing
var rowHeight = this.gridOptionsWrapper.getHeaderHeight();
// we can probably get rid of this when we no longer need the overlay
var dept = this.columnController.getColumnDept();
if (this.eHeaderOverlay) {
this.eHeaderOverlay.style.height = rowHeight + 'px';
this.eHeaderOverlay.style.top = ((dept - 1) * rowHeight) + 'px';
}
this.setPinnedColContainerWidth();
};
HeaderRenderer.prototype.setPinnedColContainerWidth = function () {
if (this.gridOptionsWrapper.isForPrint()) {
// pinned col doesn't exist when doing forPrint
return;
}
var pinnedLeftWidth = this.columnController.getPinnedLeftContainerWidth() + 'px';
this.eHeaderViewport.style.marginLeft = pinnedLeftWidth;
var pinnedRightWidth = this.columnController.getPinnedRightContainerWidth() + 'px';
this.eHeaderViewport.style.marginRight = pinnedRightWidth;
};
HeaderRenderer.prototype.onIndividualColumnResized = function (column) {
this.pinnedLeftContainer.onIndividualColumnResized(column);
this.pinnedRightContainer.onIndividualColumnResized(column);
this.centerContainer.onIndividualColumnResized(column);
};
__decorate([
context_2.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], HeaderRenderer.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_2.Autowired('columnController'),
__metadata('design:type', columnController_1.ColumnController)
], HeaderRenderer.prototype, "columnController", void 0);
__decorate([
context_2.Autowired('gridPanel'),
__metadata('design:type', gridPanel_1.GridPanel)
], HeaderRenderer.prototype, "gridPanel", void 0);
__decorate([
context_2.Autowired('context'),
__metadata('design:type', context_3.Context)
], HeaderRenderer.prototype, "context", void 0);
__decorate([
context_2.Autowired('eventService'),
__metadata('design:type', eventService_1.EventService)
], HeaderRenderer.prototype, "eventService", void 0);
__decorate([
context_4.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], HeaderRenderer.prototype, "init", null);
HeaderRenderer = __decorate([
context_1.Bean('headerRenderer'),
__metadata('design:paramtypes', [])
], HeaderRenderer);
return HeaderRenderer;
})();
exports.HeaderRenderer = HeaderRenderer;
/***/ },
/* 55 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var utils_1 = __webpack_require__(7);
var columnGroup_1 = __webpack_require__(14);
var gridOptionsWrapper_1 = __webpack_require__(3);
var context_1 = __webpack_require__(6);
var column_1 = __webpack_require__(15);
var context_2 = __webpack_require__(6);
var renderedHeaderGroupCell_1 = __webpack_require__(56);
var renderedHeaderCell_1 = __webpack_require__(59);
var dragAndDropService_1 = __webpack_require__(61);
var moveColumnController_1 = __webpack_require__(62);
var columnController_1 = __webpack_require__(13);
var gridPanel_1 = __webpack_require__(24);
var context_3 = __webpack_require__(6);
var HeaderContainer = (function () {
function HeaderContainer(eContainer, eViewport, eRoot, pinned) {
this.headerElements = [];
this.eContainer = eContainer;
this.eRoot = eRoot;
this.pinned = pinned;
this.eViewport = eViewport;
}
HeaderContainer.prototype.init = function () {
var moveColumnController = new moveColumnController_1.MoveColumnController(this.pinned);
this.context.wireBean(moveColumnController);
var secondaryContainers;
switch (this.pinned) {
case column_1.Column.PINNED_LEFT:
secondaryContainers = this.gridPanel.getDropTargetLeftContainers();
break;
case column_1.Column.PINNED_RIGHT:
secondaryContainers = this.gridPanel.getDropTargetPinnedRightContainers();
break;
default:
secondaryContainers = this.gridPanel.getDropTargetBodyContainers();
break;
}
var icon = this.pinned ? dragAndDropService_1.DragAndDropService.ICON_PINNED : dragAndDropService_1.DragAndDropService.ICON_MOVE;
this.dropTarget = {
eContainer: this.eViewport ? this.eViewport : this.eContainer,
iconName: icon,
eSecondaryContainers: secondaryContainers,
onDragging: moveColumnController.onDragging.bind(moveColumnController),
onDragEnter: moveColumnController.onDragEnter.bind(moveColumnController),
onDragLeave: moveColumnController.onDragLeave.bind(moveColumnController),
onDragStop: moveColumnController.onDragStop.bind(moveColumnController)
};
this.dragAndDropService.addDropTarget(this.dropTarget);
};
HeaderContainer.prototype.removeAllChildren = function () {
this.headerElements.forEach(function (headerElement) {
headerElement.destroy();
});
this.headerElements.length = 0;
utils_1.Utils.removeAllChildren(this.eContainer);
};
HeaderContainer.prototype.insertHeaderRowsIntoContainer = function () {
var _this = this;
var cellTree = this.columnController.getDisplayedColumnGroups(this.pinned);
// if we are displaying header groups, then we have many rows here.
// go through each row of the header, one by one.
var rowHeight = this.gridOptionsWrapper.getHeaderHeight();
for (var dept = 0;; dept++) {
var nodesAtDept = [];
this.addTreeNodesAtDept(cellTree, dept, nodesAtDept);
// we want to break the for loop when we get to an empty set of cells,
// that's how we know we have finished rendering the last row.
if (nodesAtDept.length === 0) {
break;
}
var eRow = document.createElement('div');
eRow.className = 'ag-header-row';
eRow.style.top = (dept * rowHeight) + 'px';
eRow.style.height = rowHeight + 'px';
nodesAtDept.forEach(function (child) {
// skip groups that have no displayed children. this can happen when the group is broken,
// and this section happens to have nothing to display for the open / closed state
if (child instanceof columnGroup_1.ColumnGroup && child.getDisplayedChildren().length == 0) {
return;
}
var renderedHeaderElement = _this.createHeaderElement(child);
_this.headerElements.push(renderedHeaderElement);
var eGui = renderedHeaderElement.getGui();
eRow.appendChild(eGui);
});
this.eContainer.appendChild(eRow);
}
};
HeaderContainer.prototype.addTreeNodesAtDept = function (cellTree, dept, result) {
var _this = this;
cellTree.forEach(function (abstractColumn) {
if (dept === 0) {
result.push(abstractColumn);
}
else if (abstractColumn instanceof columnGroup_1.ColumnGroup) {
var columnGroup = abstractColumn;
_this.addTreeNodesAtDept(columnGroup.getDisplayedChildren(), dept - 1, result);
}
else {
}
});
};
HeaderContainer.prototype.createHeaderElement = function (columnGroupChild) {
var result;
if (columnGroupChild instanceof columnGroup_1.ColumnGroup) {
result = new renderedHeaderGroupCell_1.RenderedHeaderGroupCell(columnGroupChild, this.eRoot, this.$scope);
}
else {
result = new renderedHeaderCell_1.RenderedHeaderCell(columnGroupChild, this.$scope, this.eRoot, this.dropTarget);
}
this.context.wireBean(result);
return result;
};
HeaderContainer.prototype.onIndividualColumnResized = function (column) {
this.headerElements.forEach(function (headerElement) {
headerElement.onIndividualColumnResized(column);
});
};
__decorate([
context_1.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], HeaderContainer.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_1.Autowired('context'),
__metadata('design:type', context_2.Context)
], HeaderContainer.prototype, "context", void 0);
__decorate([
context_1.Autowired('$scope'),
__metadata('design:type', Object)
], HeaderContainer.prototype, "$scope", void 0);
__decorate([
context_1.Autowired('dragAndDropService'),
__metadata('design:type', dragAndDropService_1.DragAndDropService)
], HeaderContainer.prototype, "dragAndDropService", void 0);
__decorate([
context_1.Autowired('columnController'),
__metadata('design:type', columnController_1.ColumnController)
], HeaderContainer.prototype, "columnController", void 0);
__decorate([
context_1.Autowired('gridPanel'),
__metadata('design:type', gridPanel_1.GridPanel)
], HeaderContainer.prototype, "gridPanel", void 0);
__decorate([
context_3.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], HeaderContainer.prototype, "init", null);
return HeaderContainer;
})();
exports.HeaderContainer = HeaderContainer;
/***/ },
/* 56 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var utils_1 = __webpack_require__(7);
var svgFactory_1 = __webpack_require__(36);
var columnController_1 = __webpack_require__(13);
var filterManager_1 = __webpack_require__(40);
var gridOptionsWrapper_1 = __webpack_require__(3);
var column_1 = __webpack_require__(15);
var horizontalDragService_1 = __webpack_require__(57);
var context_1 = __webpack_require__(6);
var cssClassApplier_1 = __webpack_require__(58);
var context_2 = __webpack_require__(6);
var svgFactory = svgFactory_1.SvgFactory.getInstance();
var RenderedHeaderGroupCell = (function () {
function RenderedHeaderGroupCell(columnGroup, eRoot, parentScope) {
this.destroyFunctions = [];
this.columnGroup = columnGroup;
this.parentScope = parentScope;
this.eRoot = eRoot;
this.parentScope = parentScope;
}
// required by interface, but we don't use
RenderedHeaderGroupCell.prototype.refreshFilterIcon = function () { };
// required by interface, but we don't use
RenderedHeaderGroupCell.prototype.refreshSortIcon = function () { };
RenderedHeaderGroupCell.prototype.getGui = function () {
return this.eHeaderGroupCell;
};
RenderedHeaderGroupCell.prototype.onIndividualColumnResized = function (column) {
if (this.columnGroup.isChildInThisGroupDeepSearch(column)) {
this.setWidthOfGroupHeaderCell();
}
};
RenderedHeaderGroupCell.prototype.init = function () {
var _this = this;
this.eHeaderGroupCell = document.createElement('div');
var classNames = ['ag-header-group-cell'];
// having different classes below allows the style to not have a bottom border
// on the group header, if no group is specified
if (this.columnGroup.getColGroupDef()) {
classNames.push('ag-header-group-cell-with-group');
}
else {
classNames.push('ag-header-group-cell-no-group');
}
this.eHeaderGroupCell.className = classNames.join(' ');
//this.eHeaderGroupCell.style.height = this.getGridOptionsWrapper().getHeaderHeight() + 'px';
cssClassApplier_1.CssClassApplier.addHeaderClassesFromCollDef(this.columnGroup.getColGroupDef(), this.eHeaderGroupCell, this.gridOptionsWrapper);
if (this.gridOptionsWrapper.isEnableColResize()) {
this.eHeaderCellResize = document.createElement("div");
this.eHeaderCellResize.className = "ag-header-cell-resize";
this.eHeaderGroupCell.appendChild(this.eHeaderCellResize);
this.dragService.addDragHandling({
eDraggableElement: this.eHeaderCellResize,
eBody: this.eRoot,
cursor: 'col-resize',
startAfterPixels: 0,
onDragStart: this.onDragStart.bind(this),
onDragging: this.onDragging.bind(this)
});
if (!this.gridOptionsWrapper.isSuppressAutoSize()) {
this.eHeaderCellResize.addEventListener('dblclick', function (event) {
// get list of all the column keys we are responsible for
var keys = [];
_this.columnGroup.getDisplayedLeafColumns().forEach(function (column) {
// not all cols in the group may be participating with auto-resize
if (!column.getColDef().suppressAutoSize) {
keys.push(column.getColId());
}
});
if (keys.length > 0) {
_this.columnController.autoSizeColumns(keys);
}
});
}
}
// no renderer, default text render
var groupName = this.columnGroup.getHeaderName();
if (groupName && groupName !== '') {
var eGroupCellLabel = document.createElement("div");
eGroupCellLabel.className = 'ag-header-group-cell-label';
this.eHeaderGroupCell.appendChild(eGroupCellLabel);
if (utils_1.Utils.isBrowserSafari()) {
eGroupCellLabel.style.display = 'table-cell';
}
var eInnerText = document.createElement("span");
eInnerText.className = 'ag-header-group-text';
eInnerText.innerHTML = groupName;
eGroupCellLabel.appendChild(eInnerText);
if (this.columnGroup.isExpandable()) {
this.addGroupExpandIcon(eGroupCellLabel);
}
}
this.setWidthOfGroupHeaderCell();
};
RenderedHeaderGroupCell.prototype.setWidthOfGroupHeaderCell = function () {
var _this = this;
var widthChangedListener = function () {
_this.eHeaderGroupCell.style.width = _this.columnGroup.getActualWidth() + 'px';
};
this.columnGroup.getLeafColumns().forEach(function (column) {
column.addEventListener(column_1.Column.EVENT_WIDTH_CHANGED, widthChangedListener);
_this.destroyFunctions.push(function () {
column.removeEventListener(column_1.Column.EVENT_WIDTH_CHANGED, widthChangedListener);
});
});
widthChangedListener();
};
RenderedHeaderGroupCell.prototype.destroy = function () {
this.destroyFunctions.forEach(function (func) {
func();
});
};
RenderedHeaderGroupCell.prototype.addGroupExpandIcon = function (eGroupCellLabel) {
var eGroupIcon;
if (this.columnGroup.isExpanded()) {
eGroupIcon = utils_1.Utils.createIcon('columnGroupOpened', this.gridOptionsWrapper, null, svgFactory.createArrowLeftSvg);
}
else {
eGroupIcon = utils_1.Utils.createIcon('columnGroupClosed', this.gridOptionsWrapper, null, svgFactory.createArrowRightSvg);
}
eGroupIcon.className = 'ag-header-expand-icon';
eGroupCellLabel.appendChild(eGroupIcon);
var that = this;
eGroupIcon.onclick = function () {
var newExpandedValue = !that.columnGroup.isExpanded();
that.columnController.setColumnGroupOpened(that.columnGroup, newExpandedValue);
};
};
RenderedHeaderGroupCell.prototype.onDragStart = function () {
var _this = this;
this.groupWidthStart = this.columnGroup.getActualWidth();
this.childrenWidthStarts = [];
this.columnGroup.getDisplayedLeafColumns().forEach(function (column) {
_this.childrenWidthStarts.push(column.getActualWidth());
});
};
RenderedHeaderGroupCell.prototype.onDragging = function (dragChange, finished) {
var _this = this;
var newWidth = this.groupWidthStart + dragChange;
var minWidth = this.columnGroup.getMinWidth();
if (newWidth < minWidth) {
newWidth = minWidth;
}
// distribute the new width to the child headers
var changeRatio = newWidth / this.groupWidthStart;
// keep track of pixels used, and last column gets the remaining,
// to cater for rounding errors, and min width adjustments
var pixelsToDistribute = newWidth;
var displayedColumns = this.columnGroup.getDisplayedLeafColumns();
displayedColumns.forEach(function (column, index) {
var notLastCol = index !== (displayedColumns.length - 1);
var newChildSize;
if (notLastCol) {
// if not the last col, calculate the column width as normal
var startChildSize = _this.childrenWidthStarts[index];
newChildSize = startChildSize * changeRatio;
if (newChildSize < column.getMinWidth()) {
newChildSize = column.getMinWidth();
}
pixelsToDistribute -= newChildSize;
}
else {
// if last col, give it the remaining pixels
newChildSize = pixelsToDistribute;
}
_this.columnController.setColumnWidth(column, newChildSize, finished);
});
};
__decorate([
context_1.Autowired('filterManager'),
__metadata('design:type', filterManager_1.FilterManager)
], RenderedHeaderGroupCell.prototype, "filterManager", void 0);
__decorate([
context_1.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], RenderedHeaderGroupCell.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_1.Autowired('$compile'),
__metadata('design:type', Object)
], RenderedHeaderGroupCell.prototype, "$compile", void 0);
__decorate([
context_1.Autowired('horizontalDragService'),
__metadata('design:type', horizontalDragService_1.HorizontalDragService)
], RenderedHeaderGroupCell.prototype, "dragService", void 0);
__decorate([
context_1.Autowired('columnController'),
__metadata('design:type', columnController_1.ColumnController)
], RenderedHeaderGroupCell.prototype, "columnController", void 0);
__decorate([
context_2.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], RenderedHeaderGroupCell.prototype, "init", null);
return RenderedHeaderGroupCell;
})();
exports.RenderedHeaderGroupCell = RenderedHeaderGroupCell;
/***/ },
/* 57 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var context_1 = __webpack_require__(6);
var HorizontalDragService = (function () {
function HorizontalDragService() {
}
HorizontalDragService.prototype.addDragHandling = function (params) {
params.eDraggableElement.addEventListener('mousedown', function (startEvent) {
new DragInstance(params, startEvent);
});
};
HorizontalDragService = __decorate([
context_1.Bean('horizontalDragService'),
__metadata('design:paramtypes', [])
], HorizontalDragService);
return HorizontalDragService;
})();
exports.HorizontalDragService = HorizontalDragService;
var DragInstance = (function () {
function DragInstance(params, startEvent) {
this.mouseMove = this.onMouseMove.bind(this);
this.mouseUp = this.onMouseUp.bind(this);
this.mouseLeave = this.onMouseLeave.bind(this);
this.lastDelta = 0;
this.params = params;
this.eDragParent = document.querySelector('body');
this.dragStartX = startEvent.clientX;
this.startEvent = startEvent;
this.eDragParent.addEventListener('mousemove', this.mouseMove);
this.eDragParent.addEventListener('mouseup', this.mouseUp);
this.eDragParent.addEventListener('mouseleave', this.mouseLeave);
this.draggingStarted = false;
var startAfterPixelsExist = typeof params.startAfterPixels === 'number' && params.startAfterPixels > 0;
if (!startAfterPixelsExist) {
this.startDragging();
}
}
DragInstance.prototype.startDragging = function () {
this.draggingStarted = true;
this.oldBodyCursor = this.params.eBody.style.cursor;
this.oldParentCursor = this.eDragParent.style.cursor;
this.oldMsUserSelect = this.eDragParent.style.msUserSelect;
this.oldWebkitUserSelect = this.eDragParent.style.webkitUserSelect;
// change the body cursor, so when drag moves out of the drag bar, the cursor is still 'resize' (or 'move'
this.params.eBody.style.cursor = this.params.cursor;
// same for outside the grid, we want to keep the resize (or move) cursor
this.eDragParent.style.cursor = this.params.cursor;
// we don't want text selection outside the grid (otherwise it looks weird as text highlights when we move)
this.eDragParent.style.msUserSelect = 'none';
this.eDragParent.style.webkitUserSelect = 'none';
this.params.onDragStart(this.startEvent);
};
DragInstance.prototype.onMouseMove = function (moveEvent) {
var newX = moveEvent.clientX;
this.lastDelta = newX - this.dragStartX;
if (!this.draggingStarted) {
var dragExceededStartAfterPixels = Math.abs(this.lastDelta) >= this.params.startAfterPixels;
if (dragExceededStartAfterPixels) {
this.startDragging();
}
}
if (this.draggingStarted) {
this.params.onDragging(this.lastDelta, false);
}
};
DragInstance.prototype.onMouseUp = function () {
this.stopDragging();
};
DragInstance.prototype.onMouseLeave = function () {
this.stopDragging();
};
DragInstance.prototype.stopDragging = function () {
// reset cursor back to original cursor, if they were changed in the first place
if (this.draggingStarted) {
this.params.eBody.style.cursor = this.oldBodyCursor;
this.eDragParent.style.cursor = this.oldParentCursor;
this.eDragParent.style.msUserSelect = this.oldMsUserSelect;
this.eDragParent.style.webkitUserSelect = this.oldWebkitUserSelect;
this.params.onDragging(this.lastDelta, true);
}
// always remove the listeners, as these are always added
this.eDragParent.removeEventListener('mousemove', this.mouseMove);
this.eDragParent.removeEventListener('mouseup', this.mouseUp);
this.eDragParent.removeEventListener('mouseleave', this.mouseLeave);
};
return DragInstance;
})();
/***/ },
/* 58 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var utils_1 = __webpack_require__(7);
var CssClassApplier = (function () {
function CssClassApplier() {
}
CssClassApplier.addHeaderClassesFromCollDef = function (abstractColDef, eHeaderCell, gridOptionsWrapper) {
if (abstractColDef && abstractColDef.headerClass) {
var classToUse;
if (typeof abstractColDef.headerClass === 'function') {
var params = {
// bad naming, as colDef here can be a group or a column,
// however most people won't appreciate the difference,
// so keeping it as colDef to avoid confusion.
colDef: abstractColDef,
context: gridOptionsWrapper.getContext(),
api: gridOptionsWrapper.getApi()
};
var headerClassFunc = abstractColDef.headerClass;
classToUse = headerClassFunc(params);
}
else {
classToUse = abstractColDef.headerClass;
}
if (typeof classToUse === 'string') {
utils_1.Utils.addCssClass(eHeaderCell, classToUse);
}
else if (Array.isArray(classToUse)) {
classToUse.forEach(function (cssClassItem) {
utils_1.Utils.addCssClass(eHeaderCell, cssClassItem);
});
}
}
};
return CssClassApplier;
})();
exports.CssClassApplier = CssClassApplier;
/***/ },
/* 59 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var utils_1 = __webpack_require__(7);
var column_1 = __webpack_require__(15);
var filterManager_1 = __webpack_require__(40);
var columnController_1 = __webpack_require__(13);
var headerTemplateLoader_1 = __webpack_require__(60);
var gridOptionsWrapper_1 = __webpack_require__(3);
var horizontalDragService_1 = __webpack_require__(57);
var gridCore_1 = __webpack_require__(37);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var cssClassApplier_1 = __webpack_require__(58);
var dragAndDropService_1 = __webpack_require__(61);
var sortController_1 = __webpack_require__(39);
var context_3 = __webpack_require__(6);
var RenderedHeaderCell = (function () {
function RenderedHeaderCell(column, parentScope, eRoot, dragSourceDropTarget) {
// for better structured code, anything we need to do when this column gets destroyed,
// we put a function in here. otherwise we would have a big destroy function with lots
// of 'if / else' mapping to things that got created.
this.destroyFunctions = [];
this.column = column;
this.parentScope = parentScope;
this.eRoot = eRoot;
this.dragSourceDropTarget = dragSourceDropTarget;
}
RenderedHeaderCell.prototype.init = function () {
this.eHeaderCell = this.headerTemplateLoader.createHeaderElement(this.column);
utils_1.Utils.addCssClass(this.eHeaderCell, 'ag-header-cell');
this.createScope(this.parentScope);
this.addAttributes();
cssClassApplier_1.CssClassApplier.addHeaderClassesFromCollDef(this.column.getColDef(), this.eHeaderCell, this.gridOptionsWrapper);
// label div
var eHeaderCellLabel = this.eHeaderCell.querySelector('#agHeaderCellLabel');
this.setupMovingCss();
this.setupTooltip();
this.setupResize();
this.setupMove(eHeaderCellLabel);
this.setupMenu();
this.setupSort(eHeaderCellLabel);
this.setupFilterIcon();
this.setupText();
this.setupWidth();
};
RenderedHeaderCell.prototype.setupTooltip = function () {
var colDef = this.column.getColDef();
// add tooltip if exists
if (colDef.headerTooltip) {
this.eHeaderCell.title = colDef.headerTooltip;
}
};
RenderedHeaderCell.prototype.setupText = function () {
var colDef = this.column.getColDef();
// render the cell, use a renderer if one is provided
var headerCellRenderer;
if (colDef.headerCellRenderer) {
headerCellRenderer = colDef.headerCellRenderer;
}
else if (this.gridOptionsWrapper.getHeaderCellRenderer()) {
headerCellRenderer = this.gridOptionsWrapper.getHeaderCellRenderer();
}
var headerNameValue = this.columnController.getDisplayNameForCol(this.column);
var eText = this.eHeaderCell.querySelector('#agText');
if (eText) {
if (headerCellRenderer) {
this.useRenderer(headerNameValue, headerCellRenderer, eText);
}
else {
// no renderer, default text render
eText.className = 'ag-header-cell-text';
eText.innerHTML = headerNameValue;
}
}
};
RenderedHeaderCell.prototype.setupFilterIcon = function () {
var _this = this;
var eFilterIcon = this.eHeaderCell.querySelector('#agFilter');
if (!eFilterIcon) {
return;
}
var filterChangedListener = function () {
var filterPresent = _this.column.isFilterActive();
utils_1.Utils.addOrRemoveCssClass(_this.eHeaderCell, 'ag-header-cell-filtered', filterPresent);
utils_1.Utils.addOrRemoveCssClass(eFilterIcon, 'ag-hidden', !filterPresent);
};
this.column.addEventListener(column_1.Column.EVENT_FILTER_ACTIVE_CHANGED, filterChangedListener);
this.destroyFunctions.push(function () {
_this.column.removeEventListener(column_1.Column.EVENT_FILTER_ACTIVE_CHANGED, filterChangedListener);
});
filterChangedListener();
};
RenderedHeaderCell.prototype.setupWidth = function () {
var _this = this;
var widthChangedListener = function () {
_this.eHeaderCell.style.width = _this.column.getActualWidth() + 'px';
};
this.column.addEventListener(column_1.Column.EVENT_WIDTH_CHANGED, widthChangedListener);
this.destroyFunctions.push(function () {
_this.column.removeEventListener(column_1.Column.EVENT_WIDTH_CHANGED, widthChangedListener);
});
widthChangedListener();
};
RenderedHeaderCell.prototype.getGui = function () {
return this.eHeaderCell;
};
RenderedHeaderCell.prototype.destroy = function () {
this.destroyFunctions.forEach(function (func) {
func();
});
};
RenderedHeaderCell.prototype.createScope = function (parentScope) {
var _this = this;
if (this.gridOptionsWrapper.isAngularCompileHeaders()) {
this.childScope = parentScope.$new();
this.childScope.colDef = this.column.getColDef();
this.childScope.colDefWrapper = this.column;
this.destroyFunctions.push(function () {
_this.childScope.$destroy();
});
}
};
RenderedHeaderCell.prototype.addAttributes = function () {
this.eHeaderCell.setAttribute("colId", this.column.getColId());
};
RenderedHeaderCell.prototype.setupMenu = function () {
var eMenu = this.eHeaderCell.querySelector('#agMenu');
// if no menu provided in template, do nothing
if (!eMenu) {
return;
}
var weWantMenu = this.menuFactory.isMenuEnabled(this.column) && !this.column.getColDef().suppressMenu;
if (!weWantMenu) {
utils_1.Utils.removeFromParent(eMenu);
return;
}
var that = this;
eMenu.addEventListener('click', function () {
that.showMenu(this);
});
if (!this.gridOptionsWrapper.isSuppressMenuHide()) {
eMenu.style.opacity = '0';
this.eHeaderCell.addEventListener('mouseover', function () {
eMenu.style.opacity = '1';
});
this.eHeaderCell.addEventListener('mouseout', function () {
eMenu.style.opacity = '0';
});
}
var style = eMenu.style;
style['transition'] = 'opacity 0.2s, border 0.2s';
style['-webkit-transition'] = 'opacity 0.2s, border 0.2s';
};
RenderedHeaderCell.prototype.showMenu = function (eventSource) {
this.menuFactory.showMenu(this.column, eventSource);
};
RenderedHeaderCell.prototype.setupMovingCss = function () {
var _this = this;
// this function adds or removes the moving css, based on if the col is moving
var addMovingCssFunc = function () {
if (_this.column.isMoving()) {
utils_1.Utils.addCssClass(_this.eHeaderCell, 'ag-header-cell-moving');
}
else {
utils_1.Utils.removeCssClass(_this.eHeaderCell, 'ag-header-cell-moving');
}
};
// call it now once, so the col is set up correctly
addMovingCssFunc();
// then call it every time we are informed of a moving state change in the col
this.column.addEventListener(column_1.Column.EVENT_MOVING_CHANGED, addMovingCssFunc);
// finally we remove the listener when this cell is no longer rendered
this.destroyFunctions.push(function () {
_this.column.removeEventListener(column_1.Column.EVENT_MOVING_CHANGED, addMovingCssFunc);
});
};
RenderedHeaderCell.prototype.setupMove = function (eHeaderCellLabel) {
if (this.gridOptionsWrapper.isSuppressMovableColumns() || this.column.getColDef().suppressMovable) {
return;
}
if (this.gridOptionsWrapper.isForPrint()) {
// don't allow moving of headers when forPrint, as the header overlay doesn't exist
return;
}
if (eHeaderCellLabel) {
var dragSource = {
eElement: eHeaderCellLabel,
dragItem: this.column,
dragSourceDropTarget: this.dragSourceDropTarget
};
this.dragAndDropService.addDragSource(dragSource);
}
};
RenderedHeaderCell.prototype.setupResize = function () {
var _this = this;
var colDef = this.column.getColDef();
var eResize = this.eHeaderCell.querySelector('#agResizeBar');
// if no eResize in template, do nothing
if (!eResize) {
return;
}
var weWantResize = this.gridOptionsWrapper.isEnableColResize() && !colDef.suppressResize;
if (!weWantResize) {
utils_1.Utils.removeFromParent(eResize);
return;
}
this.dragService.addDragHandling({
eDraggableElement: eResize,
eBody: this.eRoot,
cursor: 'col-resize',
startAfterPixels: 0,
onDragStart: this.onDragStart.bind(this),
onDragging: this.onDragging.bind(this)
});
var weWantAutoSize = !this.gridOptionsWrapper.isSuppressAutoSize() && !colDef.suppressAutoSize;
if (weWantAutoSize) {
eResize.addEventListener('dblclick', function () {
_this.columnController.autoSizeColumn(_this.column);
});
}
};
RenderedHeaderCell.prototype.useRenderer = function (headerNameValue, headerCellRenderer, eText) {
// renderer provided, use it
var cellRendererParams = {
colDef: this.column.getColDef(),
$scope: this.childScope,
context: this.gridOptionsWrapper.getContext(),
value: headerNameValue,
api: this.gridOptionsWrapper.getApi(),
eHeaderCell: this.eHeaderCell
};
var cellRendererResult = headerCellRenderer(cellRendererParams);
var childToAppend;
if (utils_1.Utils.isNodeOrElement(cellRendererResult)) {
// a dom node or element was returned, so add child
childToAppend = cellRendererResult;
}
else {
// otherwise assume it was html, so just insert
var eTextSpan = document.createElement("span");
eTextSpan.innerHTML = cellRendererResult;
childToAppend = eTextSpan;
}
// angular compile header if option is turned on
if (this.gridOptionsWrapper.isAngularCompileHeaders()) {
var childToAppendCompiled = this.$compile(childToAppend)(this.childScope)[0];
eText.appendChild(childToAppendCompiled);
}
else {
eText.appendChild(childToAppend);
}
};
RenderedHeaderCell.prototype.setupSort = function (eHeaderCellLabel) {
var _this = this;
var enableSorting = this.gridOptionsWrapper.isEnableSorting() && !this.column.getColDef().suppressSorting;
if (!enableSorting) {
utils_1.Utils.removeFromParent(this.eHeaderCell.querySelector('#agSortAsc'));
utils_1.Utils.removeFromParent(this.eHeaderCell.querySelector('#agSortDesc'));
utils_1.Utils.removeFromParent(this.eHeaderCell.querySelector('#agNoSort'));
return;
}
// add the event on the header, so when clicked, we do sorting
if (eHeaderCellLabel) {
eHeaderCellLabel.addEventListener("click", function (event) {
_this.sortController.progressSort(_this.column, event.shiftKey);
});
}
// add listener for sort changing, and update the icons accordingly
var eSortAsc = this.eHeaderCell.querySelector('#agSortAsc');
var eSortDesc = this.eHeaderCell.querySelector('#agSortDesc');
var eSortNone = this.eHeaderCell.querySelector('#agNoSort');
var sortChangedListener = function () {
utils_1.Utils.addOrRemoveCssClass(_this.eHeaderCell, 'ag-header-cell-sorted-asc', _this.column.isSortAscending());
utils_1.Utils.addOrRemoveCssClass(_this.eHeaderCell, 'ag-header-cell-sorted-desc', _this.column.isSortDescending());
utils_1.Utils.addOrRemoveCssClass(_this.eHeaderCell, 'ag-header-cell-sorted-none', _this.column.isSortNone());
if (eSortAsc) {
utils_1.Utils.addOrRemoveCssClass(eSortAsc, 'ag-hidden', !_this.column.isSortAscending());
}
if (eSortDesc) {
utils_1.Utils.addOrRemoveCssClass(eSortDesc, 'ag-hidden', !_this.column.isSortDescending());
}
if (eSortNone) {
var alwaysHideNoSort = !_this.column.getColDef().unSortIcon && !_this.gridOptionsWrapper.isUnSortIcon();
utils_1.Utils.addOrRemoveCssClass(eSortNone, 'ag-hidden', alwaysHideNoSort || !_this.column.isSortNone());
}
};
this.column.addEventListener(column_1.Column.EVENT_SORT_CHANGED, sortChangedListener);
this.destroyFunctions.push(function () {
_this.column.removeEventListener(column_1.Column.EVENT_SORT_CHANGED, sortChangedListener);
});
sortChangedListener();
};
RenderedHeaderCell.prototype.onDragStart = function () {
this.startWidth = this.column.getActualWidth();
};
RenderedHeaderCell.prototype.onDragging = function (dragChange, finished) {
var newWidth = this.startWidth + dragChange;
this.columnController.setColumnWidth(this.column, newWidth, finished);
};
RenderedHeaderCell.prototype.onIndividualColumnResized = function (column) {
if (this.column !== column) {
return;
}
var newWidthPx = column.getActualWidth() + "px";
this.eHeaderCell.style.width = newWidthPx;
};
__decorate([
context_1.Autowired('context'),
__metadata('design:type', context_2.Context)
], RenderedHeaderCell.prototype, "context", void 0);
__decorate([
context_1.Autowired('filterManager'),
__metadata('design:type', filterManager_1.FilterManager)
], RenderedHeaderCell.prototype, "filterManager", void 0);
__decorate([
context_1.Autowired('columnController'),
__metadata('design:type', columnController_1.ColumnController)
], RenderedHeaderCell.prototype, "columnController", void 0);
__decorate([
context_1.Autowired('$compile'),
__metadata('design:type', Object)
], RenderedHeaderCell.prototype, "$compile", void 0);
__decorate([
context_1.Autowired('gridCore'),
__metadata('design:type', gridCore_1.GridCore)
], RenderedHeaderCell.prototype, "gridCore", void 0);
__decorate([
context_1.Autowired('headerTemplateLoader'),
__metadata('design:type', headerTemplateLoader_1.HeaderTemplateLoader)
], RenderedHeaderCell.prototype, "headerTemplateLoader", void 0);
__decorate([
context_1.Autowired('horizontalDragService'),
__metadata('design:type', horizontalDragService_1.HorizontalDragService)
], RenderedHeaderCell.prototype, "dragService", void 0);
__decorate([
context_1.Autowired('menuFactory'),
__metadata('design:type', Object)
], RenderedHeaderCell.prototype, "menuFactory", void 0);
__decorate([
context_1.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], RenderedHeaderCell.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_1.Autowired('dragAndDropService'),
__metadata('design:type', dragAndDropService_1.DragAndDropService)
], RenderedHeaderCell.prototype, "dragAndDropService", void 0);
__decorate([
context_1.Autowired('sortController'),
__metadata('design:type', sortController_1.SortController)
], RenderedHeaderCell.prototype, "sortController", void 0);
__decorate([
context_3.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], RenderedHeaderCell.prototype, "init", null);
return RenderedHeaderCell;
})();
exports.RenderedHeaderCell = RenderedHeaderCell;
/***/ },
/* 60 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var utils_1 = __webpack_require__(7);
var svgFactory_1 = __webpack_require__(36);
var gridOptionsWrapper_1 = __webpack_require__(3);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var svgFactory = svgFactory_1.SvgFactory.getInstance();
var HeaderTemplateLoader = (function () {
function HeaderTemplateLoader() {
}
HeaderTemplateLoader.prototype.createHeaderElement = function (column) {
var params = {
column: column,
colDef: column.getColDef,
context: this.gridOptionsWrapper.getContext(),
api: this.gridOptionsWrapper.getApi()
};
// option 1 - see if user provided a template in colDef
var userProvidedTemplate = column.getColDef().headerCellTemplate;
if (typeof userProvidedTemplate === 'function') {
var colDefFunc = userProvidedTemplate;
userProvidedTemplate = colDefFunc(params);
}
// option 2 - check the gridOptions for cellTemplate
if (!userProvidedTemplate && this.gridOptionsWrapper.getHeaderCellTemplate()) {
userProvidedTemplate = this.gridOptionsWrapper.getHeaderCellTemplate();
}
// option 3 - check the gridOptions for templateFunction
if (!userProvidedTemplate && this.gridOptionsWrapper.getHeaderCellTemplateFunc()) {
var gridOptionsFunc = this.gridOptionsWrapper.getHeaderCellTemplateFunc();
userProvidedTemplate = gridOptionsFunc(params);
}
// finally, if still no template, use the default
if (!userProvidedTemplate) {
userProvidedTemplate = this.createDefaultHeaderElement(column);
}
// template can be a string or a dom element, if string we need to convert to a dom element
var result;
if (typeof userProvidedTemplate === 'string') {
result = utils_1.Utils.loadTemplate(userProvidedTemplate);
}
else if (utils_1.Utils.isNodeOrElement(userProvidedTemplate)) {
result = userProvidedTemplate;
}
else {
console.error('ag-Grid: header template must be a string or an HTML element');
}
return result;
};
HeaderTemplateLoader.prototype.createDefaultHeaderElement = function (column) {
var eTemplate = utils_1.Utils.loadTemplate(HeaderTemplateLoader.HEADER_CELL_TEMPLATE);
this.addInIcon(eTemplate, 'sortAscending', '#agSortAsc', column, svgFactory.createArrowUpSvg);
this.addInIcon(eTemplate, 'sortDescending', '#agSortDesc', column, svgFactory.createArrowDownSvg);
this.addInIcon(eTemplate, 'sortUnSort', '#agNoSort', column, svgFactory.createArrowUpDownSvg);
this.addInIcon(eTemplate, 'menu', '#agMenu', column, svgFactory.createMenuSvg);
this.addInIcon(eTemplate, 'filter', '#agFilter', column, svgFactory.createFilterSvg);
return eTemplate;
};
HeaderTemplateLoader.prototype.addInIcon = function (eTemplate, iconName, cssSelector, column, defaultIconFactory) {
var eIcon = utils_1.Utils.createIconNoSpan(iconName, this.gridOptionsWrapper, column, defaultIconFactory);
eTemplate.querySelector(cssSelector).appendChild(eIcon);
};
// used when cell is dragged
HeaderTemplateLoader.HEADER_CELL_DND_TEMPLATE = '<div class="ag-header-cell ag-header-cell-ghost">' +
' <span id="eGhostIcon" class="ag-header-cell-ghost-icon ag-shake-left-to-right"></span>' +
' <div id="agHeaderCellLabel" class="ag-header-cell-label">' +
' <span id="agText" class="ag-header-cell-text"></span>' +
' </div>' +
'</div>';
HeaderTemplateLoader.HEADER_CELL_TEMPLATE = '<div class="ag-header-cell">' +
' <div id="agResizeBar" class="ag-header-cell-resize"></div>' +
' <span id="agMenu" class="ag-header-icon ag-header-cell-menu-button"></span>' +
' <div id="agHeaderCellLabel" class="ag-header-cell-label">' +
' <span id="agSortAsc" class="ag-header-icon ag-sort-ascending-icon"></span>' +
' <span id="agSortDesc" class="ag-header-icon ag-sort-descending-icon"></span>' +
' <span id="agNoSort" class="ag-header-icon ag-sort-none-icon"></span>' +
' <span id="agFilter" class="ag-header-icon ag-filter-icon"></span>' +
' <span id="agText" class="ag-header-cell-text"></span>' +
' </div>' +
'</div>';
__decorate([
context_2.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], HeaderTemplateLoader.prototype, "gridOptionsWrapper", void 0);
HeaderTemplateLoader = __decorate([
context_1.Bean('headerTemplateLoader'),
__metadata('design:paramtypes', [])
], HeaderTemplateLoader);
return HeaderTemplateLoader;
})();
exports.HeaderTemplateLoader = HeaderTemplateLoader;
/***/ },
/* 61 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var context_1 = __webpack_require__(6);
var logger_1 = __webpack_require__(5);
var context_2 = __webpack_require__(6);
var headerTemplateLoader_1 = __webpack_require__(60);
var utils_1 = __webpack_require__(7);
var gridOptionsWrapper_1 = __webpack_require__(3);
var context_3 = __webpack_require__(6);
var svgFactory_1 = __webpack_require__(36);
var dragService_1 = __webpack_require__(28);
var svgFactory = svgFactory_1.SvgFactory.getInstance();
var DragAndDropService = (function () {
function DragAndDropService() {
this.dropTargets = [];
this.ePinnedIcon = svgFactory.createPinIcon();
this.ePlusIcon = svgFactory.createPlusIcon();
this.eHiddenIcon = svgFactory.createColumnHiddenIcon();
this.eMoveIcon = svgFactory.createMoveIcon();
this.eLeftIcon = svgFactory.createLeftIcon();
this.eRightIcon = svgFactory.createRightIcon();
this.eGroupIcon = svgFactory.createGroupIcon();
}
DragAndDropService.prototype.agWire = function (loggerFactory) {
this.logger = loggerFactory.create('OldToolPanelDragAndDropService');
this.eBody = document.querySelector('body');
if (!this.eBody) {
console.warn('ag-Grid: could not find document body, it is needed for dragging columns');
}
};
// we do not need to clean up drag sources, as we are just adding a listener to the element.
// when the element is disposed, the drag source is also disposed, even though this service
// remains. this is a bit different to normal 'addListener' methods
DragAndDropService.prototype.addDragSource = function (params) {
this.dragService.addDragSource({
eElement: params.eElement,
onDragStart: this.onDragStart.bind(this, params),
onDragStop: this.onDragStop.bind(this),
onDragging: this.onDragging.bind(this)
});
//params.eElement.addEventListener('mousedown', this.onMouseDown.bind(this, params));
};
DragAndDropService.prototype.nudge = function () {
if (this.dragging) {
this.onDragging(this.eventLastTime);
}
};
DragAndDropService.prototype.onDragStart = function (dragSource, mouseEvent) {
this.logger.log('startDrag');
this.dragging = true;
this.dragSource = dragSource;
this.eventLastTime = mouseEvent;
this.dragSource.dragItem.setMoving(true);
this.dragItem = this.dragSource.dragItem;
this.lastDropTarget = this.dragSource.dragSourceDropTarget;
this.createGhost();
};
DragAndDropService.prototype.onDragStop = function (mouseEvent) {
this.logger.log('onDragStop');
this.eventLastTime = null;
this.dragging = false;
this.dragItem.setMoving(false);
if (this.lastDropTarget && this.lastDropTarget.onDragStop) {
var draggingEvent = this.createDropTargetEvent(this.lastDropTarget, mouseEvent, null);
this.lastDropTarget.onDragStop(draggingEvent);
}
this.lastDropTarget = null;
this.dragItem = null;
this.removeGhost();
};
DragAndDropService.prototype.onDragging = function (mouseEvent) {
var direction = this.workOutDirection(mouseEvent);
this.eventLastTime = mouseEvent;
this.positionGhost(mouseEvent);
// check if mouseEvent intersects with any of the drop targets
var dropTarget = utils_1.Utils.find(this.dropTargets, function (dropTarget) {
var targetsToCheck = [dropTarget.eContainer];
if (dropTarget.eSecondaryContainers) {
targetsToCheck = targetsToCheck.concat(dropTarget.eSecondaryContainers);
}
var gotMatch = false;
targetsToCheck.forEach(function (eContainer) {
if (!eContainer) {
return;
} // secondary can be missing
var rect = eContainer.getBoundingClientRect();
// if element is not visible, then width and height are zero
if (rect.width === 0 || rect.height === 0) {
return;
}
var horizontalFit = mouseEvent.clientX >= rect.left && mouseEvent.clientX <= rect.right;
var verticalFit = mouseEvent.clientY >= rect.top && mouseEvent.clientY <= rect.bottom;
//console.log(`rect.width = ${rect.width} || rect.height = ${rect.height} ## verticalFit = ${verticalFit}, horizontalFit = ${horizontalFit}, `);
if (horizontalFit && verticalFit) {
gotMatch = true;
}
});
return gotMatch;
});
if (dropTarget !== this.lastDropTarget) {
if (this.lastDropTarget) {
this.logger.log('onDragLeave');
var dragLeaveEvent = this.createDropTargetEvent(this.lastDropTarget, mouseEvent, direction);
this.lastDropTarget.onDragLeave(dragLeaveEvent);
this.setGhostIcon(null);
}
if (dropTarget) {
this.logger.log('onDragEnter');
var dragEnterEvent = this.createDropTargetEvent(dropTarget, mouseEvent, direction);
dropTarget.onDragEnter(dragEnterEvent);
this.setGhostIcon(dropTarget.iconName);
}
this.lastDropTarget = dropTarget;
}
else if (dropTarget) {
var draggingEvent = this.createDropTargetEvent(dropTarget, mouseEvent, direction);
dropTarget.onDragging(draggingEvent);
}
};
DragAndDropService.prototype.addDropTarget = function (dropTarget) {
this.dropTargets.push(dropTarget);
};
DragAndDropService.prototype.workOutDirection = function (event) {
var direction;
if (this.eventLastTime.clientX > event.clientX) {
direction = DragAndDropService.DIRECTION_LEFT;
}
else if (this.eventLastTime.clientX < event.clientX) {
direction = DragAndDropService.DIRECTION_RIGHT;
}
else {
direction = null;
}
return direction;
};
DragAndDropService.prototype.createDropTargetEvent = function (dropTarget, event, direction) {
// localise x and y to the target component
var rect = dropTarget.eContainer.getBoundingClientRect();
var x = event.clientX - rect.left;
var y = event.clientY - rect.top;
var dropTargetEvent = {
event: event,
x: x,
y: y,
direction: direction,
dragItem: this.dragItem,
dragSource: this.dragSource
};
return dropTargetEvent;
};
DragAndDropService.prototype.positionGhost = function (event) {
var ghostRect = this.eGhost.getBoundingClientRect();
var ghostHeight = ghostRect.height;
// for some reason, without the '-2', it still overlapped by 1 or 2 pixels, which
// then brought in scrollbars to the browser. no idea why, but putting in -2 here
// works around it which is good enough for me.
var browserWidth = utils_1.Utils.getBodyWidth() - 2;
var browserHeight = utils_1.Utils.getBodyHeight() - 2;
// put ghost vertically in middle of cursor
var top = event.pageY - (ghostHeight / 2);
// horizontally, place cursor just right of icon
var left = event.pageX - 30;
// check ghost is not positioned outside of the browser
if (browserWidth > 0) {
if ((left + this.eGhost.clientWidth) > browserWidth) {
left = browserWidth - this.eGhost.clientWidth;
}
}
if (left < 0) {
left = 0;
}
if (browserHeight > 0) {
if ((top + this.eGhost.clientHeight) > browserHeight) {
top = browserHeight - this.eGhost.clientHeight;
}
}
if (top < 0) {
top = 0;
}
this.eGhost.style.left = left + 'px';
this.eGhost.style.top = top + 'px';
};
DragAndDropService.prototype.removeGhost = function () {
if (this.eGhost) {
this.eBody.removeChild(this.eGhost);
}
this.eGhost = null;
};
DragAndDropService.prototype.createGhost = function () {
var dragItem = this.dragSource.dragItem;
this.eGhost = utils_1.Utils.loadTemplate(headerTemplateLoader_1.HeaderTemplateLoader.HEADER_CELL_DND_TEMPLATE);
this.eGhostIcon = this.eGhost.querySelector('#eGhostIcon');
if (this.lastDropTarget) {
this.setGhostIcon(this.lastDropTarget.iconName);
}
var eText = this.eGhost.querySelector('#agText');
if (dragItem.getColDef().headerName) {
eText.innerHTML = dragItem.getColDef().headerName;
}
else {
eText.innerHTML = dragItem.getColId();
}
this.eGhost.style.width = dragItem.getActualWidth() + 'px';
this.eGhost.style.height = this.gridOptionsWrapper.getHeaderHeight() + 'px';
this.eGhost.style.top = '20px';
this.eGhost.style.left = '20px';
this.eBody.appendChild(this.eGhost);
};
DragAndDropService.prototype.setGhostIcon = function (iconName, shake) {
if (shake === void 0) { shake = false; }
utils_1.Utils.removeAllChildren(this.eGhostIcon);
var eIcon;
switch (iconName) {
case DragAndDropService.ICON_ADD:
eIcon = this.ePlusIcon;
break;
case DragAndDropService.ICON_PINNED:
eIcon = this.ePinnedIcon;
break;
case DragAndDropService.ICON_MOVE:
eIcon = this.eMoveIcon;
break;
case DragAndDropService.ICON_LEFT:
eIcon = this.eLeftIcon;
break;
case DragAndDropService.ICON_RIGHT:
eIcon = this.eRightIcon;
break;
case DragAndDropService.ICON_GROUP:
eIcon = this.eGroupIcon;
break;
default:
eIcon = this.eHiddenIcon;
break;
}
this.eGhostIcon.appendChild(eIcon);
utils_1.Utils.addOrRemoveCssClass(this.eGhostIcon, 'ag-shake-left-to-right', shake);
};
DragAndDropService.DIRECTION_LEFT = 'left';
DragAndDropService.DIRECTION_RIGHT = 'right';
DragAndDropService.ICON_PINNED = 'pinned';
DragAndDropService.ICON_ADD = 'add';
DragAndDropService.ICON_MOVE = 'move';
DragAndDropService.ICON_LEFT = 'left';
DragAndDropService.ICON_RIGHT = 'right';
DragAndDropService.ICON_GROUP = 'group';
__decorate([
context_3.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], DragAndDropService.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_3.Autowired('dragService'),
__metadata('design:type', dragService_1.DragService)
], DragAndDropService.prototype, "dragService", void 0);
__decorate([
__param(0, context_1.Qualifier('loggerFactory')),
__metadata('design:type', Function),
__metadata('design:paramtypes', [logger_1.LoggerFactory]),
__metadata('design:returntype', void 0)
], DragAndDropService.prototype, "agWire", null);
DragAndDropService = __decorate([
context_2.Bean('dragAndDropService'),
__metadata('design:paramtypes', [])
], DragAndDropService);
return DragAndDropService;
})();
exports.DragAndDropService = DragAndDropService;
/***/ },
/* 62 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var context_1 = __webpack_require__(6);
var logger_1 = __webpack_require__(5);
var columnController_1 = __webpack_require__(13);
var column_1 = __webpack_require__(15);
var utils_1 = __webpack_require__(7);
var dragAndDropService_1 = __webpack_require__(61);
var gridPanel_1 = __webpack_require__(24);
var context_2 = __webpack_require__(6);
var MoveColumnController = (function () {
function MoveColumnController(pinned) {
this.needToMoveLeft = false;
this.needToMoveRight = false;
this.pinned = pinned;
this.centerContainer = !utils_1.Utils.exists(pinned);
}
MoveColumnController.prototype.init = function () {
this.logger = this.loggerFactory.create('MoveColumnController');
};
MoveColumnController.prototype.onDragEnter = function (draggingEvent) {
// we do dummy drag, so make sure column appears in the right location when first placed
this.columnController.setColumnVisible(draggingEvent.dragItem, true);
this.columnController.setColumnPinned(draggingEvent.dragItem, this.pinned);
this.onDragging(draggingEvent);
};
MoveColumnController.prototype.onDragLeave = function (draggingEvent) {
this.columnController.setColumnVisible(draggingEvent.dragItem, false);
this.ensureIntervalCleared();
};
MoveColumnController.prototype.onDragStop = function () {
this.ensureIntervalCleared();
};
MoveColumnController.prototype.adjustXForScroll = function (draggingEvent) {
if (this.centerContainer) {
return draggingEvent.x + this.gridPanel.getHorizontalScrollPosition();
}
else {
return draggingEvent.x;
}
};
MoveColumnController.prototype.workOutNewIndex = function (displayedColumns, allColumns, draggingEvent, xAdjustedForScroll) {
if (draggingEvent.direction === dragAndDropService_1.DragAndDropService.DIRECTION_LEFT) {
return this.getNewIndexForColMovingLeft(displayedColumns, allColumns, draggingEvent.dragItem, xAdjustedForScroll);
}
else {
return this.getNewIndexForColMovingRight(displayedColumns, allColumns, draggingEvent.dragItem, xAdjustedForScroll);
}
};
MoveColumnController.prototype.checkCenterForScrolling = function (xAdjustedForScroll) {
if (this.centerContainer) {
// scroll if the mouse has gone outside the grid (or just outside the scrollable part if pinning)
// putting in 50 buffer, so even if user gets to edge of grid, a scroll will happen
var firstVisiblePixel = this.gridPanel.getHorizontalScrollPosition();
var lastVisiblePixel = firstVisiblePixel + this.gridPanel.getCenterWidth();
this.needToMoveLeft = xAdjustedForScroll < (firstVisiblePixel + 50);
this.needToMoveRight = xAdjustedForScroll > (lastVisiblePixel - 50);
if (this.needToMoveLeft || this.needToMoveRight) {
this.ensureIntervalStarted();
}
else {
this.ensureIntervalCleared();
}
}
};
MoveColumnController.prototype.onDragging = function (draggingEvent) {
this.lastDraggingEvent = draggingEvent;
// if moving up or down (ie not left or right) then do nothing
if (!draggingEvent.direction) {
return;
}
var xAdjustedForScroll = this.adjustXForScroll(draggingEvent);
this.checkCenterForScrolling(xAdjustedForScroll);
// find out what the correct position is for this column
this.checkColIndexAndMove(draggingEvent, xAdjustedForScroll);
};
MoveColumnController.prototype.checkColIndexAndMove = function (draggingEvent, xAdjustedForScroll) {
var displayedColumns = this.columnController.getDisplayedColumns(this.pinned);
var allColumns = this.columnController.getAllColumns();
var newIndex = this.workOutNewIndex(displayedColumns, allColumns, draggingEvent, xAdjustedForScroll);
var oldColumn = allColumns[newIndex];
// if col already at required location, do nothing
if (oldColumn === draggingEvent.dragItem) {
return;
}
// we move one column, UNLESS the column is the only visible column
// of a group, in which case we move the whole group.
var columnsToMove = this.getColumnsAndOrphans(draggingEvent.dragItem);
this.columnController.moveColumns(columnsToMove.reverse(), newIndex);
};
MoveColumnController.prototype.getNewIndexForColMovingLeft = function (displayedColumns, allColumns, dragItem, x) {
var usedX = 0;
var leftColumn = null;
for (var i = 0; i < displayedColumns.length; i++) {
var currentColumn = displayedColumns[i];
if (currentColumn === dragItem) {
continue;
}
usedX += currentColumn.getActualWidth();
if (usedX > x) {
break;
}
leftColumn = currentColumn;
}
var newIndex;
if (leftColumn) {
newIndex = allColumns.indexOf(leftColumn) + 1;
var oldIndex = allColumns.indexOf(dragItem);
if (oldIndex < newIndex) {
newIndex--;
}
}
else {
newIndex = 0;
}
return newIndex;
};
MoveColumnController.prototype.getNewIndexForColMovingRight = function (displayedColumns, allColumns, dragItem, x) {
var usedX = dragItem.getActualWidth();
var leftColumn = null;
for (var i = 0; i < displayedColumns.length; i++) {
if (usedX > x) {
break;
}
var currentColumn = displayedColumns[i];
if (currentColumn === dragItem) {
continue;
}
usedX += currentColumn.getActualWidth();
leftColumn = currentColumn;
}
var newIndex;
if (leftColumn) {
newIndex = allColumns.indexOf(leftColumn) + 1;
var oldIndex = allColumns.indexOf(dragItem);
if (oldIndex < newIndex) {
newIndex--;
}
}
else {
newIndex = 0;
}
return newIndex;
};
MoveColumnController.prototype.getColumnsAndOrphans = function (column) {
// if this column was to move, how many children would be left without a parent
var pathToChild = this.columnController.getPathForColumn(column);
for (var i = pathToChild.length - 1; i >= 0; i--) {
var columnGroup = pathToChild[i];
var onlyDisplayedChild = columnGroup.getDisplayedChildren().length === 1;
var moreThanOneChild = columnGroup.getChildren().length > 1;
if (onlyDisplayedChild && moreThanOneChild) {
// return total columns below here, not including the column under inspection
var leafColumns = columnGroup.getLeafColumns();
return leafColumns;
}
}
return [column];
};
MoveColumnController.prototype.ensureIntervalStarted = function () {
if (!this.movingIntervalId) {
this.intervalCount = 0;
this.failedMoveAttempts = 0;
this.movingIntervalId = setInterval(this.moveInterval.bind(this), 100);
if (this.needToMoveLeft) {
this.dragAndDropService.setGhostIcon(dragAndDropService_1.DragAndDropService.ICON_LEFT, true);
}
else {
this.dragAndDropService.setGhostIcon(dragAndDropService_1.DragAndDropService.ICON_RIGHT, true);
}
}
};
MoveColumnController.prototype.ensureIntervalCleared = function () {
if (this.moveInterval) {
clearInterval(this.movingIntervalId);
this.movingIntervalId = null;
this.dragAndDropService.setGhostIcon(dragAndDropService_1.DragAndDropService.ICON_MOVE);
}
};
MoveColumnController.prototype.moveInterval = function () {
var pixelsToMove;
this.intervalCount++;
pixelsToMove = 10 + (this.intervalCount * 5);
if (pixelsToMove > 100) {
pixelsToMove = 100;
}
var pixelsMoved;
if (this.needToMoveLeft) {
pixelsMoved = this.gridPanel.scrollHorizontally(-pixelsToMove);
}
else if (this.needToMoveRight) {
pixelsMoved = this.gridPanel.scrollHorizontally(pixelsToMove);
}
if (pixelsMoved !== 0) {
this.onDragging(this.lastDraggingEvent);
this.failedMoveAttempts = 0;
}
else {
this.failedMoveAttempts++;
if (this.failedMoveAttempts > 7) {
if (this.needToMoveLeft) {
this.columnController.setColumnPinned(this.lastDraggingEvent.dragItem, column_1.Column.PINNED_LEFT);
}
else {
this.columnController.setColumnPinned(this.lastDraggingEvent.dragItem, column_1.Column.PINNED_RIGHT);
}
this.dragAndDropService.nudge();
}
}
};
__decorate([
context_1.Autowired('loggerFactory'),
__metadata('design:type', logger_1.LoggerFactory)
], MoveColumnController.prototype, "loggerFactory", void 0);
__decorate([
context_1.Autowired('columnController'),
__metadata('design:type', columnController_1.ColumnController)
], MoveColumnController.prototype, "columnController", void 0);
__decorate([
context_1.Autowired('gridPanel'),
__metadata('design:type', gridPanel_1.GridPanel)
], MoveColumnController.prototype, "gridPanel", void 0);
__decorate([
context_1.Autowired('dragAndDropService'),
__metadata('design:type', dragAndDropService_1.DragAndDropService)
], MoveColumnController.prototype, "dragAndDropService", void 0);
__decorate([
context_2.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], MoveColumnController.prototype, "init", null);
return MoveColumnController;
})();
exports.MoveColumnController = MoveColumnController;
/***/ },
/* 63 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var utils_1 = __webpack_require__(7);
var constants_1 = __webpack_require__(8);
var gridOptionsWrapper_1 = __webpack_require__(3);
var columnController_1 = __webpack_require__(13);
var filterManager_1 = __webpack_require__(40);
var rowNode_1 = __webpack_require__(19);
var eventService_1 = __webpack_require__(4);
var events_1 = __webpack_require__(10);
var context_1 = __webpack_require__(6);
var selectionController_1 = __webpack_require__(29);
var context_2 = __webpack_require__(6);
var constants_2 = __webpack_require__(8);
var context_3 = __webpack_require__(6);
var context_4 = __webpack_require__(6);
var RecursionType;
(function (RecursionType) {
RecursionType[RecursionType["Normal"] = 0] = "Normal";
RecursionType[RecursionType["AfterFilter"] = 1] = "AfterFilter";
RecursionType[RecursionType["AfterFilterAndSort"] = 2] = "AfterFilterAndSort";
})(RecursionType || (RecursionType = {}));
;
var InMemoryRowController = (function () {
function InMemoryRowController() {
// the rows go through a pipeline of steps, each array below is the result
// after a certain step.
this.allRows = []; // the rows, in a list, as provided by the user, but wrapped in RowNode objects
}
InMemoryRowController.prototype.init = function () {
this.eventService.addModalPriorityEventListener(events_1.Events.EVENT_COLUMN_EVERYTHING_CHANGED, this.refreshModel.bind(this, constants_2.Constants.STEP_EVERYTHING));
this.eventService.addModalPriorityEventListener(events_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGE, this.refreshModel.bind(this, constants_2.Constants.STEP_EVERYTHING));
this.eventService.addModalPriorityEventListener(events_1.Events.EVENT_COLUMN_VALUE_CHANGE, this.refreshModel.bind(this, constants_2.Constants.STEP_AGGREGATE));
this.eventService.addModalPriorityEventListener(events_1.Events.EVENT_FILTER_CHANGED, this.refreshModel.bind(this, constants_1.Constants.STEP_FILTER));
this.eventService.addModalPriorityEventListener(events_1.Events.EVENT_SORT_CHANGED, this.refreshModel.bind(this, constants_1.Constants.STEP_SORT));
if (this.gridOptionsWrapper.isRowModelDefault()) {
this.setRowData(this.gridOptionsWrapper.getRowData(), this.columnController.isReady());
}
};
InMemoryRowController.prototype.refreshModel = function (step, fromIndex, groupState) {
// this goes through the pipeline of stages. what's in my head is similar
// to the diagram on this page:
// http://commons.apache.org/sandbox/commons-pipeline/pipeline_basics.html
// however we want to keep the results of each stage, hence we manually call
// each step rather than have them chain each other.
var _this = this;
// fallthrough in below switch is on purpose,
// eg if STEP_FILTER, then all steps below this
// step get done
switch (step) {
case constants_1.Constants.STEP_EVERYTHING:
this.doRowGrouping(groupState);
case constants_1.Constants.STEP_FILTER:
this.doFilter();
case constants_1.Constants.STEP_AGGREGATE:
this.doAggregate();
case constants_1.Constants.STEP_SORT:
this.doSort();
case constants_1.Constants.STEP_MAP:
this.doRowsToDisplay();
}
this.eventService.dispatchEvent(events_1.Events.EVENT_MODEL_UPDATED, { fromIndex: fromIndex });
if (this.$scope) {
setTimeout(function () {
_this.$scope.$apply();
}, 0);
}
};
InMemoryRowController.prototype.isEmpty = function () {
return this.allRows === null || this.allRows.length === 0 || !this.columnController.isReady();
};
InMemoryRowController.prototype.isRowsToRender = function () {
return utils_1.Utils.exists(this.rowsToDisplay) && this.rowsToDisplay.length > 0;
};
InMemoryRowController.prototype.setDatasource = function (datasource) {
console.error('ag-Grid: should never call setDatasource on inMemoryRowController');
};
InMemoryRowController.prototype.getTopLevelNodes = function () {
return this.rowsAfterGroup;
};
InMemoryRowController.prototype.getRow = function (index) {
return this.rowsToDisplay[index];
};
InMemoryRowController.prototype.getVirtualRowCount = function () {
console.warn('ag-Grid: rowModel.getVirtualRowCount() is not longer a function, use rowModel.getRowCount() instead');
return this.getRowCount();
};
InMemoryRowController.prototype.getRowCount = function () {
if (this.rowsToDisplay) {
return this.rowsToDisplay.length;
}
else {
return 0;
}
};
InMemoryRowController.prototype.getRowAtPixel = function (pixelToMatch) {
if (this.isEmpty()) {
return -1;
}
// do binary search of tree
// http://oli.me.uk/2013/06/08/searching-javascript-arrays-with-a-binary-search/
var bottomPointer = 0;
var topPointer = this.rowsToDisplay.length - 1;
// quick check, if the pixel is out of bounds, then return last row
if (pixelToMatch <= 0) {
// if pixel is less than or equal zero, it's always the first row
return 0;
}
var lastNode = this.rowsToDisplay[this.rowsToDisplay.length - 1];
if (lastNode.rowTop <= pixelToMatch) {
return this.rowsToDisplay.length - 1;
}
while (true) {
var midPointer = Math.floor((bottomPointer + topPointer) / 2);
var currentRowNode = this.rowsToDisplay[midPointer];
if (this.isRowInPixel(currentRowNode, pixelToMatch)) {
return midPointer;
}
else if (currentRowNode.rowTop < pixelToMatch) {
bottomPointer = midPointer + 1;
}
else if (currentRowNode.rowTop > pixelToMatch) {
topPointer = midPointer - 1;
}
}
};
InMemoryRowController.prototype.isRowInPixel = function (rowNode, pixelToMatch) {
var topPixel = rowNode.rowTop;
var bottomPixel = rowNode.rowTop + rowNode.rowHeight;
var pixelInRow = topPixel <= pixelToMatch && bottomPixel > pixelToMatch;
return pixelInRow;
};
InMemoryRowController.prototype.getRowCombinedHeight = function () {
if (this.rowsToDisplay && this.rowsToDisplay.length > 0) {
var lastRow = this.rowsToDisplay[this.rowsToDisplay.length - 1];
var lastPixel = lastRow.rowTop + lastRow.rowHeight;
return lastPixel;
}
else {
return 0;
}
};
InMemoryRowController.prototype.forEachNode = function (callback) {
this.recursivelyWalkNodesAndCallback(this.rowsAfterGroup, callback, RecursionType.Normal, 0);
};
InMemoryRowController.prototype.forEachNodeAfterFilter = function (callback) {
this.recursivelyWalkNodesAndCallback(this.rowsAfterFilter, callback, RecursionType.AfterFilter, 0);
};
InMemoryRowController.prototype.forEachNodeAfterFilterAndSort = function (callback) {
this.recursivelyWalkNodesAndCallback(this.rowsAfterSort, callback, RecursionType.AfterFilterAndSort, 0);
};
// iterates through each item in memory, and calls the callback function
// nodes - the rowNodes to traverse
// callback - the user provided callback
// recursion type - need this to know what child nodes to recurse, eg if looking at all nodes, or filtered notes etc
// index - works similar to the index in forEach in javascripts array function
InMemoryRowController.prototype.recursivelyWalkNodesAndCallback = function (nodes, callback, recursionType, index) {
if (nodes) {
for (var i = 0; i < nodes.length; i++) {
var node = nodes[i];
callback(node, index++);
// go to the next level if it is a group
if (node.group) {
// depending on the recursion type, we pick a difference set of children
var nodeChildren;
switch (recursionType) {
case RecursionType.Normal:
nodeChildren = node.children;
break;
case RecursionType.AfterFilter:
nodeChildren = node.childrenAfterFilter;
break;
case RecursionType.AfterFilterAndSort:
nodeChildren = node.childrenAfterSort;
break;
}
if (nodeChildren) {
index = this.recursivelyWalkNodesAndCallback(nodeChildren, callback, recursionType, index);
}
}
}
}
return index;
};
// it's possible to recompute the aggregate without doing the other parts
// + gridApi.recomputeAggregates()
InMemoryRowController.prototype.doAggregate = function () {
if (this.aggregationStage) {
this.aggregationStage.execute(this.rowsAfterFilter);
}
};
// + gridApi.expandAll()
// + gridApi.collapseAll()
InMemoryRowController.prototype.expandOrCollapseAll = function (expand) {
recursiveExpandOrCollapse(this.rowsAfterGroup);
function recursiveExpandOrCollapse(rowNodes) {
if (!rowNodes) {
return;
}
rowNodes.forEach(function (rowNode) {
if (rowNode.group) {
rowNode.expanded = expand;
recursiveExpandOrCollapse(rowNode.children);
}
});
}
this.refreshModel(constants_2.Constants.STEP_MAP);
};
InMemoryRowController.prototype.doSort = function () {
this.rowsAfterSort = this.sortStage.execute(this.rowsAfterFilter);
};
InMemoryRowController.prototype.doRowGrouping = function (groupState) {
// grouping is enterprise only, so if service missing, skip the step
var rowsAlreadyGrouped = utils_1.Utils.exists(this.gridOptionsWrapper.getNodeChildDetailsFunc());
if (this.groupStage && !rowsAlreadyGrouped) {
// remove old groups from the selection model, as we are about to replace them
// with new groups
this.selectionController.removeGroupsFromSelection();
this.rowsAfterGroup = this.groupStage.execute(this.allRows);
this.restoreGroupState(groupState);
if (this.gridOptionsWrapper.isGroupSelectsChildren()) {
this.selectionController.updateGroupsFromChildrenSelections();
}
}
else {
this.rowsAfterGroup = this.allRows;
}
};
InMemoryRowController.prototype.restoreGroupState = function (groupState) {
if (!groupState) {
return;
}
utils_1.Utils.traverseNodesWithKey(this.rowsAfterGroup, function (node, key) {
node.expanded = groupState[key] === true;
});
};
InMemoryRowController.prototype.doFilter = function () {
this.rowsAfterFilter = this.filterStage.execute(this.rowsAfterGroup);
};
// rows: the rows to put into the model
// firstId: the first id to use, used for paging, where we are not on the first page
InMemoryRowController.prototype.setRowData = function (rowData, refresh, firstId) {
// remember group state, so we can expand groups that should be expanded
var groupState = this.getGroupState();
// place each row into a wrapper
this.allRows = this.createRowNodesFromData(rowData, firstId);
this.eventService.dispatchEvent(events_1.Events.EVENT_ROW_DATA_CHANGED);
if (refresh) {
this.refreshModel(constants_2.Constants.STEP_EVERYTHING, null, groupState);
}
};
InMemoryRowController.prototype.getGroupState = function () {
if (!this.rowsAfterGroup || !this.gridOptionsWrapper.isRememberGroupStateWhenNewData()) {
return null;
}
var result = {};
utils_1.Utils.traverseNodesWithKey(this.rowsAfterGroup, function (node, key) { return result[key] = node.expanded; });
return result;
};
InMemoryRowController.prototype.createRowNodesFromData = function (rowData, firstId) {
if (!rowData) {
return [];
}
var rowNodeId = utils_1.Utils.exists(firstId) ? firstId : 0;
// func below doesn't have 'this' pointer, so need to pull out these bits
var nodeChildDetailsFunc = this.gridOptionsWrapper.getNodeChildDetailsFunc();
var suppressParentsInRowNodes = this.gridOptionsWrapper.isSuppressParentsInRowNodes();
var eventService = this.eventService;
var gridOptionsWrapper = this.gridOptionsWrapper;
var selectionController = this.selectionController;
// kick off recursion
var result = recursiveFunction(rowData, null, 0);
return result;
function recursiveFunction(rowData, parent, level) {
var rowNodes = [];
rowData.forEach(function (dataItem) {
var node = new rowNode_1.RowNode(eventService, gridOptionsWrapper, selectionController);
var nodeChildDetails = nodeChildDetailsFunc ? nodeChildDetailsFunc(dataItem) : null;
if (nodeChildDetails && nodeChildDetails.group) {
node.group = true;
node.children = recursiveFunction(nodeChildDetails.children, node, level + 1);
node.expanded = nodeChildDetails.expanded === true;
node.field = nodeChildDetails.field;
node.key = nodeChildDetails.key;
}
if (parent && !suppressParentsInRowNodes) {
node.parent = parent;
}
node.level = level;
node.id = rowNodeId++;
node.data = dataItem;
rowNodes.push(node);
});
return rowNodes;
}
};
InMemoryRowController.prototype.doRowsToDisplay = function () {
this.rowsToDisplay = this.flattenStage.execute(this.rowsAfterSort);
};
__decorate([
context_2.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], InMemoryRowController.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_2.Autowired('columnController'),
__metadata('design:type', columnController_1.ColumnController)
], InMemoryRowController.prototype, "columnController", void 0);
__decorate([
context_2.Autowired('filterManager'),
__metadata('design:type', filterManager_1.FilterManager)
], InMemoryRowController.prototype, "filterManager", void 0);
__decorate([
context_2.Autowired('$scope'),
__metadata('design:type', Object)
], InMemoryRowController.prototype, "$scope", void 0);
__decorate([
context_2.Autowired('selectionController'),
__metadata('design:type', selectionController_1.SelectionController)
], InMemoryRowController.prototype, "selectionController", void 0);
__decorate([
context_2.Autowired('eventService'),
__metadata('design:type', eventService_1.EventService)
], InMemoryRowController.prototype, "eventService", void 0);
__decorate([
context_2.Autowired('filterStage'),
__metadata('design:type', Object)
], InMemoryRowController.prototype, "filterStage", void 0);
__decorate([
context_2.Autowired('sortStage'),
__metadata('design:type', Object)
], InMemoryRowController.prototype, "sortStage", void 0);
__decorate([
context_2.Autowired('flattenStage'),
__metadata('design:type', Object)
], InMemoryRowController.prototype, "flattenStage", void 0);
__decorate([
context_4.Optional('groupStage'),
__metadata('design:type', Object)
], InMemoryRowController.prototype, "groupStage", void 0);
__decorate([
context_4.Optional('aggregationStage'),
__metadata('design:type', Object)
], InMemoryRowController.prototype, "aggregationStage", void 0);
__decorate([
// the rows mapped to rows to display
context_3.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], InMemoryRowController.prototype, "init", null);
InMemoryRowController = __decorate([
context_1.Bean('rowModel'),
__metadata('design:paramtypes', [])
], InMemoryRowController);
return InMemoryRowController;
})();
exports.InMemoryRowController = InMemoryRowController;
/***/ },
/* 64 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var utils_1 = __webpack_require__(7);
var gridOptionsWrapper_1 = __webpack_require__(3);
var rowNode_1 = __webpack_require__(19);
var context_1 = __webpack_require__(6);
var eventService_1 = __webpack_require__(4);
var selectionController_1 = __webpack_require__(29);
var context_2 = __webpack_require__(6);
var context_3 = __webpack_require__(6);
var events_1 = __webpack_require__(10);
var sortController_1 = __webpack_require__(39);
var filterManager_1 = __webpack_require__(40);
/*
* This row controller is used for infinite scrolling only. For normal 'in memory' table,
* or standard pagination, the inMemoryRowController is used.
*/
var logging = false;
var VirtualPageRowController = (function () {
function VirtualPageRowController() {
this.datasourceVersion = 0;
}
VirtualPageRowController.prototype.init = function () {
var _this = this;
var virtualEnabled = this.gridOptionsWrapper.isRowModelVirtual();
this.eventService.addEventListener(events_1.Events.EVENT_FILTER_CHANGED, function () {
if (virtualEnabled && _this.gridOptionsWrapper.isEnableServerSideFilter()) {
_this.reset();
}
});
this.eventService.addEventListener(events_1.Events.EVENT_SORT_CHANGED, function () {
if (virtualEnabled && _this.gridOptionsWrapper.isEnableServerSideSorting()) {
_this.reset();
}
});
if (virtualEnabled && this.gridOptionsWrapper.getDatasource()) {
this.setDatasource(this.gridOptionsWrapper.getDatasource());
}
};
VirtualPageRowController.prototype.getTopLevelNodes = function () {
return null;
};
VirtualPageRowController.prototype.setDatasource = function (datasource) {
this.datasource = datasource;
if (!datasource) {
// only continue if we have a valid datasource to working with
return;
}
this.reset();
};
VirtualPageRowController.prototype.isEmpty = function () {
return !this.datasource;
};
VirtualPageRowController.prototype.isRowsToRender = function () {
return utils_1.Utils.exists(this.datasource);
};
VirtualPageRowController.prototype.reset = function () {
this.selectionController.reset();
// see if datasource knows how many rows there are
if (typeof this.datasource.rowCount === 'number' && this.datasource.rowCount >= 0) {
this.virtualRowCount = this.datasource.rowCount;
this.foundMaxRow = true;
}
else {
this.virtualRowCount = 0;
this.foundMaxRow = false;
}
// in case any daemon requests coming from datasource, we know it ignore them
this.datasourceVersion++;
// map of page numbers to rows in that page
this.pageCache = {};
this.pageCacheSize = 0;
// if a number is in this array, it means we are pending a load from it
this.pageLoadsInProgress = [];
this.pageLoadsQueued = [];
this.pageAccessTimes = {}; // keeps a record of when each page was last viewed, used for LRU cache
this.accessTime = 0; // rather than using the clock, we use this counter
// the number of concurrent loads we are allowed to the server
if (typeof this.datasource.maxConcurrentRequests === 'number' && this.datasource.maxConcurrentRequests > 0) {
this.maxConcurrentDatasourceRequests = this.datasource.maxConcurrentRequests;
}
else {
this.maxConcurrentDatasourceRequests = 2;
}
// the number of pages to keep in browser cache
if (typeof this.datasource.maxPagesInCache === 'number' && this.datasource.maxPagesInCache > 0) {
this.maxPagesInCache = this.datasource.maxPagesInCache;
}
else {
// null is default, means don't have any max size on the cache
this.maxPagesInCache = null;
}
this.pageSize = this.datasource.pageSize; // take a copy of page size, we don't want it changing
this.overflowSize = this.datasource.overflowSize; // take a copy of page size, we don't want it changing
this.doLoadOrQueue(0);
this.rowRenderer.refreshView();
};
VirtualPageRowController.prototype.createNodesFromRows = function (pageNumber, rows) {
var nodes = [];
if (rows) {
for (var i = 0, j = rows.length; i < j; i++) {
var virtualRowIndex = (pageNumber * this.pageSize) + i;
var node = this.createNode(rows[i], virtualRowIndex, true);
nodes.push(node);
}
}
return nodes;
};
VirtualPageRowController.prototype.createNode = function (data, virtualRowIndex, realNode) {
var rowHeight = this.getRowHeightAsNumber();
var top = rowHeight * virtualRowIndex;
var rowNode;
if (realNode) {
// if a real node, then always create a new one
rowNode = new rowNode_1.RowNode(this.eventService, this.gridOptionsWrapper, this.selectionController);
rowNode.id = virtualRowIndex;
rowNode.data = data;
// and see if the previous one was selected, and if yes, swap it out
this.selectionController.syncInRowNode(rowNode);
}
else {
// if creating a proxy node, see if there is a copy in selected memory that we can use
var rowNode = this.selectionController.getNodeForIdIfSelected(virtualRowIndex);
if (!rowNode) {
rowNode = new rowNode_1.RowNode(this.eventService, this.gridOptionsWrapper, this.selectionController);
rowNode.id = virtualRowIndex;
rowNode.data = data;
}
}
rowNode.rowTop = top;
rowNode.rowHeight = rowHeight;
return rowNode;
};
VirtualPageRowController.prototype.removeFromLoading = function (pageNumber) {
var index = this.pageLoadsInProgress.indexOf(pageNumber);
this.pageLoadsInProgress.splice(index, 1);
};
VirtualPageRowController.prototype.pageLoadFailed = function (pageNumber) {
this.removeFromLoading(pageNumber);
this.checkQueueForNextLoad();
};
VirtualPageRowController.prototype.pageLoaded = function (pageNumber, rows, lastRow) {
this.putPageIntoCacheAndPurge(pageNumber, rows);
this.checkMaxRowAndInformRowRenderer(pageNumber, lastRow);
this.removeFromLoading(pageNumber);
this.checkQueueForNextLoad();
};
VirtualPageRowController.prototype.putPageIntoCacheAndPurge = function (pageNumber, rows) {
this.pageCache[pageNumber] = this.createNodesFromRows(pageNumber, rows);
this.pageCacheSize++;
if (logging) {
console.log('adding page ' + pageNumber);
}
var needToPurge = this.maxPagesInCache && this.maxPagesInCache < this.pageCacheSize;
if (needToPurge) {
// find the LRU page
var youngestPageIndex = this.findLeastRecentlyAccessedPage(Object.keys(this.pageCache));
if (logging) {
console.log('purging page ' + youngestPageIndex + ' from cache ' + Object.keys(this.pageCache));
}
delete this.pageCache[youngestPageIndex];
this.pageCacheSize--;
}
};
VirtualPageRowController.prototype.checkMaxRowAndInformRowRenderer = function (pageNumber, lastRow) {
if (!this.foundMaxRow) {
// if we know the last row, use if
if (typeof lastRow === 'number' && lastRow >= 0) {
this.virtualRowCount = lastRow;
this.foundMaxRow = true;
}
else {
// otherwise, see if we need to add some virtual rows
var thisPagePlusBuffer = ((pageNumber + 1) * this.pageSize) + this.overflowSize;
if (this.virtualRowCount < thisPagePlusBuffer) {
this.virtualRowCount = thisPagePlusBuffer;
}
}
// if rowCount changes, refreshView, otherwise just refreshAllVirtualRows
this.rowRenderer.refreshView();
}
else {
this.rowRenderer.refreshAllVirtualRows();
}
};
VirtualPageRowController.prototype.isPageAlreadyLoading = function (pageNumber) {
var result = this.pageLoadsInProgress.indexOf(pageNumber) >= 0 || this.pageLoadsQueued.indexOf(pageNumber) >= 0;
return result;
};
VirtualPageRowController.prototype.doLoadOrQueue = function (pageNumber) {
// if we already tried to load this page, then ignore the request,
// otherwise server would be hit 50 times just to display one page, the
// first row to find the page missing is enough.
if (this.isPageAlreadyLoading(pageNumber)) {
return;
}
// try the page load - if not already doing a load, then we can go ahead
if (this.pageLoadsInProgress.length < this.maxConcurrentDatasourceRequests) {
// go ahead, load the page
this.loadPage(pageNumber);
}
else {
// otherwise, queue the request
this.addToQueueAndPurgeQueue(pageNumber);
}
};
VirtualPageRowController.prototype.addToQueueAndPurgeQueue = function (pageNumber) {
if (logging) {
console.log('queueing ' + pageNumber + ' - ' + this.pageLoadsQueued);
}
this.pageLoadsQueued.push(pageNumber);
// see if there are more pages queued that are actually in our cache, if so there is
// no point in loading them all as some will be purged as soon as loaded
var needToPurge = this.maxPagesInCache && this.maxPagesInCache < this.pageLoadsQueued.length;
if (needToPurge) {
// find the LRU page
var youngestPageIndex = this.findLeastRecentlyAccessedPage(this.pageLoadsQueued);
if (logging) {
console.log('de-queueing ' + pageNumber + ' - ' + this.pageLoadsQueued);
}
var indexToRemove = this.pageLoadsQueued.indexOf(youngestPageIndex);
this.pageLoadsQueued.splice(indexToRemove, 1);
}
};
VirtualPageRowController.prototype.findLeastRecentlyAccessedPage = function (pageIndexes) {
var youngestPageIndex = -1;
var youngestPageAccessTime = Number.MAX_VALUE;
var that = this;
pageIndexes.forEach(function (pageIndex) {
var accessTimeThisPage = that.pageAccessTimes[pageIndex];
if (accessTimeThisPage < youngestPageAccessTime) {
youngestPageAccessTime = accessTimeThisPage;
youngestPageIndex = pageIndex;
}
});
return youngestPageIndex;
};
VirtualPageRowController.prototype.checkQueueForNextLoad = function () {
if (this.pageLoadsQueued.length > 0) {
// take from the front of the queue
var pageToLoad = this.pageLoadsQueued[0];
this.pageLoadsQueued.splice(0, 1);
if (logging) {
console.log('dequeueing ' + pageToLoad + ' - ' + this.pageLoadsQueued);
}
this.loadPage(pageToLoad);
}
};
VirtualPageRowController.prototype.loadPage = function (pageNumber) {
this.pageLoadsInProgress.push(pageNumber);
var startRow = pageNumber * this.pageSize;
var endRow = (pageNumber + 1) * this.pageSize;
var that = this;
var datasourceVersionCopy = this.datasourceVersion;
var sortModel;
if (this.gridOptionsWrapper.isEnableServerSideSorting()) {
sortModel = this.sortController.getSortModel();
}
var filterModel;
if (this.gridOptionsWrapper.isEnableServerSideFilter()) {
filterModel = this.filterManager.getFilterModel();
}
var params = {
startRow: startRow,
endRow: endRow,
successCallback: successCallback,
failCallback: failCallback,
sortModel: sortModel,
filterModel: filterModel
};
// check if old version of datasource used
var getRowsParams = utils_1.Utils.getFunctionParameters(this.datasource.getRows);
if (getRowsParams.length > 1) {
console.warn('ag-grid: It looks like your paging datasource is of the old type, taking more than one parameter.');
console.warn('ag-grid: From ag-grid 1.9.0, now the getRows takes one parameter. See the documentation for details.');
}
this.datasource.getRows(params);
function successCallback(rows, lastRowIndex) {
if (that.requestIsDaemon(datasourceVersionCopy)) {
return;
}
that.pageLoaded(pageNumber, rows, lastRowIndex);
}
function failCallback() {
if (that.requestIsDaemon(datasourceVersionCopy)) {
return;
}
that.pageLoadFailed(pageNumber);
}
};
VirtualPageRowController.prototype.expandOrCollapseAll = function (expand) {
console.warn('ag-Grid: can not expand or collapse all when doing virtual pagination');
};
// check that the datasource has not changed since the lats time we did a request
VirtualPageRowController.prototype.requestIsDaemon = function (datasourceVersionCopy) {
return this.datasourceVersion !== datasourceVersionCopy;
};
VirtualPageRowController.prototype.getRow = function (rowIndex) {
if (rowIndex > this.virtualRowCount) {
return null;
}
var pageNumber = Math.floor(rowIndex / this.pageSize);
var page = this.pageCache[pageNumber];
// for LRU cache, track when this page was last hit
this.pageAccessTimes[pageNumber] = this.accessTime++;
if (!page) {
this.doLoadOrQueue(pageNumber);
// return back an empty row, so table can at least render empty cells
var dummyNode = this.createNode(null, rowIndex, false);
return dummyNode;
}
else {
var indexInThisPage = rowIndex % this.pageSize;
return page[indexInThisPage];
}
};
VirtualPageRowController.prototype.forEachNode = function (callback) {
var pageKeys = Object.keys(this.pageCache);
for (var i = 0; i < pageKeys.length; i++) {
var pageKey = pageKeys[i];
var page = this.pageCache[pageKey];
for (var j = 0; j < page.length; j++) {
var node = page[j];
callback(node);
}
}
};
VirtualPageRowController.prototype.getRowHeightAsNumber = function () {
var rowHeight = this.gridOptionsWrapper.getRowHeightForVirtualPagination();
if (typeof rowHeight === 'number') {
return rowHeight;
}
else {
console.warn('ag-Grid row height must be a number when doing virtual paging');
return 25;
}
};
VirtualPageRowController.prototype.getRowCombinedHeight = function () {
return this.virtualRowCount * this.getRowHeightAsNumber();
};
VirtualPageRowController.prototype.getRowAtPixel = function (pixel) {
var rowHeight = this.getRowHeightAsNumber();
if (rowHeight !== 0) {
return Math.floor(pixel / rowHeight);
}
else {
return 0;
}
};
VirtualPageRowController.prototype.getRowCount = function () {
return this.virtualRowCount;
};
VirtualPageRowController.prototype.setRowData = function (rows, refresh, firstId) {
console.warn('setRowData - does not work with virtual pagination');
};
VirtualPageRowController.prototype.forEachNodeAfterFilter = function (callback) {
console.warn('forEachNodeAfterFilter - does not work with virtual pagination');
};
VirtualPageRowController.prototype.forEachNodeAfterFilterAndSort = function (callback) {
console.warn('forEachNodeAfterFilter - does not work with virtual pagination');
};
VirtualPageRowController.prototype.refreshModel = function () {
console.warn('forEachNodeAfterFilter - does not work with virtual pagination');
};
__decorate([
context_2.Autowired('rowRenderer'),
__metadata('design:type', Object)
], VirtualPageRowController.prototype, "rowRenderer", void 0);
__decorate([
context_2.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], VirtualPageRowController.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_2.Autowired('filterManager'),
__metadata('design:type', filterManager_1.FilterManager)
], VirtualPageRowController.prototype, "filterManager", void 0);
__decorate([
context_2.Autowired('sortController'),
__metadata('design:type', sortController_1.SortController)
], VirtualPageRowController.prototype, "sortController", void 0);
__decorate([
context_2.Autowired('selectionController'),
__metadata('design:type', selectionController_1.SelectionController)
], VirtualPageRowController.prototype, "selectionController", void 0);
__decorate([
context_2.Autowired('eventService'),
__metadata('design:type', eventService_1.EventService)
], VirtualPageRowController.prototype, "eventService", void 0);
__decorate([
context_3.PostConstruct,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], VirtualPageRowController.prototype, "init", null);
VirtualPageRowController = __decorate([
context_1.Bean('rowModel'),
__metadata('design:paramtypes', [])
], VirtualPageRowController);
return VirtualPageRowController;
})();
exports.VirtualPageRowController = VirtualPageRowController;
/***/ },
/* 65 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var utils_1 = __webpack_require__(7);
var logger_1 = __webpack_require__(5);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
/** Functionality for internal DnD functionality between GUI widgets. Eg this service is used to drag columns
* from the 'available columns' list and putting them into the 'grouped columns' in the tool panel.
* This service is NOT used by the column headers for resizing and moving, that is a different use case. */
var OldToolPanelDragAndDropService = (function () {
function OldToolPanelDragAndDropService() {
this.destroyFunctions = [];
}
OldToolPanelDragAndDropService.prototype.agWire = function (loggerFactory) {
this.logger = loggerFactory.create('OldToolPanelDragAndDropService');
// need to clean this up, add to 'finished' logic in grid
var mouseUpListener = this.stopDragging.bind(this);
document.addEventListener('mouseup', mouseUpListener);
this.destroyFunctions.push(function () { document.removeEventListener('mouseup', mouseUpListener); });
};
OldToolPanelDragAndDropService.prototype.agDestroy = function () {
this.destroyFunctions.forEach(function (func) { return func(); });
document.removeEventListener('mouseup', this.mouseUpEventListener);
};
OldToolPanelDragAndDropService.prototype.stopDragging = function () {
if (this.dragItem) {
this.setDragCssClasses(this.dragItem.eDragSource, false);
this.dragItem = null;
}
};
OldToolPanelDragAndDropService.prototype.setDragCssClasses = function (eListItem, dragging) {
utils_1.Utils.addOrRemoveCssClass(eListItem, 'ag-dragging', dragging);
utils_1.Utils.addOrRemoveCssClass(eListItem, 'ag-not-dragging', !dragging);
};
OldToolPanelDragAndDropService.prototype.addDragSource = function (eDragSource, dragSourceCallback) {
this.setDragCssClasses(eDragSource, false);
eDragSource.addEventListener('mousedown', this.onMouseDownDragSource.bind(this, eDragSource, dragSourceCallback));
};
OldToolPanelDragAndDropService.prototype.onMouseDownDragSource = function (eDragSource, dragSourceCallback) {
if (this.dragItem) {
this.stopDragging();
}
var data;
if (dragSourceCallback.getData) {
data = dragSourceCallback.getData();
}
var containerId;
if (dragSourceCallback.getContainerId) {
containerId = dragSourceCallback.getContainerId();
}
this.dragItem = {
eDragSource: eDragSource,
data: data,
containerId: containerId
};
this.setDragCssClasses(this.dragItem.eDragSource, true);
};
OldToolPanelDragAndDropService.prototype.addDropTarget = function (eDropTarget, dropTargetCallback) {
var _this = this;
var mouseIn = false;
var acceptDrag = false;
eDropTarget.addEventListener('mouseover', function () {
if (!mouseIn) {
mouseIn = true;
if (_this.dragItem) {
acceptDrag = dropTargetCallback.acceptDrag(_this.dragItem);
}
else {
acceptDrag = false;
}
}
});
eDropTarget.addEventListener('mouseout', function () {
if (acceptDrag) {
dropTargetCallback.noDrop();
}
mouseIn = false;
acceptDrag = false;
});
eDropTarget.addEventListener('mouseup', function () {
// dragItem should never be null, checking just in case
if (acceptDrag && _this.dragItem) {
dropTargetCallback.drop(_this.dragItem);
}
});
};
__decorate([
__param(0, context_2.Qualifier('loggerFactory')),
__metadata('design:type', Function),
__metadata('design:paramtypes', [logger_1.LoggerFactory]),
__metadata('design:returntype', void 0)
], OldToolPanelDragAndDropService.prototype, "agWire", null);
OldToolPanelDragAndDropService = __decorate([
context_1.Bean('oldToolPanelDragAndDropService'),
__metadata('design:paramtypes', [])
], OldToolPanelDragAndDropService);
return OldToolPanelDragAndDropService;
})();
exports.OldToolPanelDragAndDropService = OldToolPanelDragAndDropService;
/***/ },
/* 66 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var context_1 = __webpack_require__(6);
var filterManager_1 = __webpack_require__(40);
var utils_1 = __webpack_require__(7);
var context_2 = __webpack_require__(6);
var popupService_1 = __webpack_require__(41);
var gridOptionsWrapper_1 = __webpack_require__(3);
var StandardMenuFactory = (function () {
function StandardMenuFactory() {
}
StandardMenuFactory.prototype.showMenu = function (column, eventSource) {
var filterWrapper = this.filterManager.getOrCreateFilterWrapper(column);
var eMenu = document.createElement('div');
utils_1.Utils.addCssClass(eMenu, 'ag-menu');
eMenu.appendChild(filterWrapper.gui);
// need to show filter before positioning, as only after filter
// is visible can we find out what the width of it is
var hidePopup = this.popupService.addAsModalPopup(eMenu, true);
this.popupService.positionPopupUnderComponent({ eventSource: eventSource, ePopup: eMenu, keepWithinBounds: true });
if (filterWrapper.filter.afterGuiAttached) {
var params = {
hidePopup: hidePopup,
eventSource: eventSource
};
filterWrapper.filter.afterGuiAttached(params);
}
};
StandardMenuFactory.prototype.isMenuEnabled = function (column) {
// for standard, we show menu if filter is enabled, and he menu is not suppressed
return this.gridOptionsWrapper.isEnableFilter();
};
__decorate([
context_2.Autowired('filterManager'),
__metadata('design:type', filterManager_1.FilterManager)
], StandardMenuFactory.prototype, "filterManager", void 0);
__decorate([
context_2.Autowired('popupService'),
__metadata('design:type', popupService_1.PopupService)
], StandardMenuFactory.prototype, "popupService", void 0);
__decorate([
context_2.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], StandardMenuFactory.prototype, "gridOptionsWrapper", void 0);
StandardMenuFactory = __decorate([
context_1.Bean('menuFactory'),
__metadata('design:paramtypes', [])
], StandardMenuFactory);
return StandardMenuFactory;
})();
exports.StandardMenuFactory = StandardMenuFactory;
/***/ },
/* 67 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var gridOptionsWrapper_1 = __webpack_require__(3);
var filterManager_1 = __webpack_require__(40);
var FilterStage = (function () {
function FilterStage() {
}
FilterStage.prototype.execute = function (rowsToFilter) {
var filterActive;
if (this.gridOptionsWrapper.isEnableServerSideFilter()) {
filterActive = false;
}
else {
filterActive = this.filterManager.isAnyFilterPresent();
}
var result;
if (filterActive) {
result = this.filterItems(rowsToFilter);
}
else {
// do it here
result = rowsToFilter;
this.recursivelyResetFilter(rowsToFilter);
}
return result;
};
FilterStage.prototype.filterItems = function (rowNodes) {
var result = [];
for (var i = 0, l = rowNodes.length; i < l; i++) {
var node = rowNodes[i];
if (node.group) {
// deal with group
node.childrenAfterFilter = this.filterItems(node.children);
if (node.childrenAfterFilter.length > 0) {
node.allChildrenCount = this.getTotalChildCount(node.childrenAfterFilter);
result.push(node);
}
}
else {
if (this.filterManager.doesRowPassFilter(node)) {
result.push(node);
}
}
}
return result;
};
FilterStage.prototype.recursivelyResetFilter = function (nodes) {
if (!nodes) {
return;
}
for (var i = 0, l = nodes.length; i < l; i++) {
var node = nodes[i];
if (node.group && node.children) {
node.childrenAfterFilter = node.children;
this.recursivelyResetFilter(node.children);
node.allChildrenCount = this.getTotalChildCount(node.childrenAfterFilter);
}
}
};
FilterStage.prototype.getTotalChildCount = function (rowNodes) {
var count = 0;
for (var i = 0, l = rowNodes.length; i < l; i++) {
var item = rowNodes[i];
if (item.group) {
count += item.allChildrenCount;
}
else {
count++;
}
}
return count;
};
__decorate([
context_2.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], FilterStage.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_2.Autowired('filterManager'),
__metadata('design:type', filterManager_1.FilterManager)
], FilterStage.prototype, "filterManager", void 0);
FilterStage = __decorate([
context_1.Bean('filterStage'),
__metadata('design:paramtypes', [])
], FilterStage);
return FilterStage;
})();
exports.FilterStage = FilterStage;
/***/ },
/* 68 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var gridOptionsWrapper_1 = __webpack_require__(3);
var sortController_1 = __webpack_require__(39);
var valueService_1 = __webpack_require__(34);
var utils_1 = __webpack_require__(7);
var SortStage = (function () {
function SortStage() {
}
SortStage.prototype.execute = function (rowsToSort) {
var sorting;
// if the sorting is already done by the server, then we should not do it here
if (this.gridOptionsWrapper.isEnableServerSideSorting()) {
sorting = false;
}
else {
//see if there is a col we are sorting by
var sortingOptions = this.sortController.getSortForRowController();
sorting = sortingOptions.length > 0;
}
var result = rowsToSort.slice(0);
if (sorting) {
this.sortList(result, sortingOptions);
}
else {
// if no sorting, set all group children after sort to the original list.
// note: it is important to do this, even if doing server side sorting,
// to allow the rows to pass to the next stage (ie set the node value
// childrenAfterSort)
this.recursivelyResetSort(result);
}
return result;
};
SortStage.prototype.sortList = function (nodes, sortOptions) {
// sort any groups recursively
for (var i = 0, l = nodes.length; i < l; i++) {
var node = nodes[i];
if (node.group && node.children) {
node.childrenAfterSort = node.childrenAfterFilter.slice(0);
this.sortList(node.childrenAfterSort, sortOptions);
}
}
var that = this;
function compare(nodeA, nodeB, column, isInverted) {
var valueA = that.valueService.getValue(column, nodeA);
var valueB = that.valueService.getValue(column, nodeB);
if (column.getColDef().comparator) {
//if comparator provided, use it
return column.getColDef().comparator(valueA, valueB, nodeA, nodeB, isInverted);
}
else {
//otherwise do our own comparison
return utils_1.Utils.defaultComparator(valueA, valueB);
}
}
nodes.sort(function (nodeA, nodeB) {
// Iterate columns, return the first that doesn't match
for (var i = 0, len = sortOptions.length; i < len; i++) {
var sortOption = sortOptions[i];
var compared = compare(nodeA, nodeB, sortOption.column, sortOption.inverter === -1);
if (compared !== 0) {
return compared * sortOption.inverter;
}
}
// All matched, these are identical as far as the sort is concerned:
return 0;
});
this.updateChildIndexes(nodes);
};
SortStage.prototype.recursivelyResetSort = function (rowNodes) {
if (!rowNodes) {
return;
}
for (var i = 0, l = rowNodes.length; i < l; i++) {
var item = rowNodes[i];
if (item.group && item.children) {
item.childrenAfterSort = item.childrenAfterFilter;
this.recursivelyResetSort(item.children);
}
}
this.updateChildIndexes(rowNodes);
};
SortStage.prototype.updateChildIndexes = function (nodes) {
for (var j = 0; j < nodes.length; j++) {
var node = nodes[j];
node.firstChild = j === 0;
node.lastChild = j === nodes.length - 1;
node.childIndex = j;
}
};
__decorate([
context_2.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], SortStage.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_2.Autowired('sortController'),
__metadata('design:type', sortController_1.SortController)
], SortStage.prototype, "sortController", void 0);
__decorate([
context_2.Autowired('valueService'),
__metadata('design:type', valueService_1.ValueService)
], SortStage.prototype, "valueService", void 0);
SortStage = __decorate([
context_1.Bean('sortStage'),
__metadata('design:paramtypes', [])
], SortStage);
return SortStage;
})();
exports.SortStage = SortStage;
/***/ },
/* 69 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var context_1 = __webpack_require__(6);
var rowNode_1 = __webpack_require__(19);
var utils_1 = __webpack_require__(7);
var gridOptionsWrapper_1 = __webpack_require__(3);
var context_2 = __webpack_require__(6);
var selectionController_1 = __webpack_require__(29);
var eventService_1 = __webpack_require__(4);
var FlattenStage = (function () {
function FlattenStage() {
}
FlattenStage.prototype.execute = function (rowsToFlatten) {
// even if not doing grouping, we do the mapping, as the client might
// of passed in data that already has a grouping in it somewhere
var result = [];
// putting value into a wrapper so it's passed by reference
var nextRowTop = { value: 0 };
this.recursivelyAddToRowsToDisplay(rowsToFlatten, result, nextRowTop);
return result;
};
FlattenStage.prototype.recursivelyAddToRowsToDisplay = function (rowsToFlatten, result, nextRowTop) {
if (utils_1.Utils.missingOrEmpty(rowsToFlatten)) {
return;
}
var groupSuppressRow = this.gridOptionsWrapper.isGroupSuppressRow();
for (var i = 0; i < rowsToFlatten.length; i++) {
var rowNode = rowsToFlatten[i];
var skipGroupNode = groupSuppressRow && rowNode.group;
if (!skipGroupNode) {
this.addRowNodeToRowsToDisplay(rowNode, result, nextRowTop);
}
if (rowNode.group && rowNode.expanded) {
this.recursivelyAddToRowsToDisplay(rowNode.childrenAfterSort, result, nextRowTop);
// put a footer in if user is looking for it
if (this.gridOptionsWrapper.isGroupIncludeFooter()) {
var footerNode = this.createFooterNode(rowNode);
this.addRowNodeToRowsToDisplay(footerNode, result, nextRowTop);
}
}
}
};
// duplicated method, it's also in floatingRowModel
FlattenStage.prototype.addRowNodeToRowsToDisplay = function (rowNode, result, nextRowTop) {
result.push(rowNode);
rowNode.rowHeight = this.gridOptionsWrapper.getRowHeightForNode(rowNode);
rowNode.rowTop = nextRowTop.value;
nextRowTop.value += rowNode.rowHeight;
};
FlattenStage.prototype.createFooterNode = function (groupNode) {
var footerNode = new rowNode_1.RowNode(this.eventService, this.gridOptionsWrapper, this.selectionController);
Object.keys(groupNode).forEach(function (key) {
footerNode[key] = groupNode[key];
});
footerNode.footer = true;
// get both header and footer to reference each other as siblings. this is never undone,
// only overwritten. so if a group is expanded, then contracted, it will have a ghost
// sibling - but that's fine, as we can ignore this if the header is contracted.
footerNode.sibling = groupNode;
groupNode.sibling = footerNode;
return footerNode;
};
__decorate([
context_2.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], FlattenStage.prototype, "gridOptionsWrapper", void 0);
__decorate([
context_2.Autowired('selectionController'),
__metadata('design:type', selectionController_1.SelectionController)
], FlattenStage.prototype, "selectionController", void 0);
__decorate([
context_2.Autowired('eventService'),
__metadata('design:type', eventService_1.EventService)
], FlattenStage.prototype, "eventService", void 0);
FlattenStage = __decorate([
context_1.Bean('flattenStage'),
__metadata('design:paramtypes', [])
], FlattenStage);
return FlattenStage;
})();
exports.FlattenStage = FlattenStage;
/***/ },
/* 70 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var grid_1 = __webpack_require__(2);
function initialiseAgGridWithAngular1(angular) {
var angularModule = angular.module("agGrid", []);
angularModule.directive("agGrid", function () {
return {
restrict: "A",
controller: ['$element', '$scope', '$compile', '$attrs', AngularDirectiveController],
scope: true
};
});
}
exports.initialiseAgGridWithAngular1 = initialiseAgGridWithAngular1;
function AngularDirectiveController($element, $scope, $compile, $attrs) {
var gridOptions;
var quickFilterOnScope;
var keyOfGridInScope = $attrs.agGrid;
quickFilterOnScope = keyOfGridInScope + '.quickFilterText';
gridOptions = $scope.$eval(keyOfGridInScope);
if (!gridOptions) {
console.warn("WARNING - grid options for ag-Grid not found. Please ensure the attribute ag-grid points to a valid object on the scope");
return;
}
var eGridDiv = $element[0];
var grid = new grid_1.Grid(eGridDiv, gridOptions, null, $scope, $compile, quickFilterOnScope);
$scope.$on("$destroy", function () {
grid.destroy();
});
}
/***/ },
/* 71 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var componentUtil_1 = __webpack_require__(9);
var grid_1 = __webpack_require__(2);
var registered = false;
function initialiseAgGridWithWebComponents() {
// only register to WebComponents once
if (registered) {
return;
}
registered = true;
if (typeof document === 'undefined' || !document.registerElement) {
console.error('ag-Grid: unable to find document.registerElement() function, unable to initialise ag-Grid as a Web Component');
}
// i don't think this type of extension is possible in TypeScript, so back to
// plain Javascript to create this object
var AgileGridProto = Object.create(HTMLElement.prototype);
// wrap each property with a get and set method, so we can track when changes are done
componentUtil_1.ComponentUtil.ALL_PROPERTIES.forEach(function (key) {
Object.defineProperty(AgileGridProto, key, {
set: function (v) {
this.__agGridSetProperty(key, v);
},
get: function () {
return this.__agGridGetProperty(key);
}
});
});
AgileGridProto.__agGridSetProperty = function (key, value) {
if (!this.__attributes) {
this.__attributes = {};
}
this.__attributes[key] = value;
// keeping this consistent with the ng2 onChange, so I can reuse the handling code
var changeObject = {};
changeObject[key] = { currentValue: value };
this.onChange(changeObject);
};
AgileGridProto.onChange = function (changes) {
if (this._initialised) {
componentUtil_1.ComponentUtil.processOnChange(changes, this._gridOptions, this.api);
}
};
AgileGridProto.__agGridGetProperty = function (key) {
if (!this.__attributes) {
this.__attributes = {};
}
return this.__attributes[key];
};
AgileGridProto.setGridOptions = function (options) {
var globalEventListener = this.globalEventListener.bind(this);
this._gridOptions = componentUtil_1.ComponentUtil.copyAttributesToGridOptions(options, this);
this._agGrid = new grid_1.Grid(this, this._gridOptions, globalEventListener);
this.api = options.api;
this.columnApi = options.columnApi;
this._initialised = true;
};
// copies all the attributes into this object
AgileGridProto.createdCallback = function () {
for (var i = 0; i < this.attributes.length; i++) {
var attribute = this.attributes[i];
this.setPropertyFromAttribute(attribute);
}
};
AgileGridProto.setPropertyFromAttribute = function (attribute) {
var name = toCamelCase(attribute.nodeName);
var value = attribute.nodeValue;
if (componentUtil_1.ComponentUtil.ALL_PROPERTIES.indexOf(name) >= 0) {
this[name] = value;
}
};
AgileGridProto.attachedCallback = function (params) { };
AgileGridProto.detachedCallback = function (params) { };
AgileGridProto.attributeChangedCallback = function (attributeName) {
var attribute = this.attributes[attributeName];
this.setPropertyFromAttribute(attribute);
};
AgileGridProto.globalEventListener = function (eventType, event) {
var eventLowerCase = eventType.toLowerCase();
var browserEvent = new Event(eventLowerCase);
var browserEventNoType = browserEvent;
browserEventNoType.agGridDetails = event;
this.dispatchEvent(browserEvent);
var callbackMethod = 'on' + eventLowerCase;
if (typeof this[callbackMethod] === 'function') {
this[callbackMethod](browserEvent);
}
};
// finally, register
document.registerElement('ag-grid', { prototype: AgileGridProto });
}
exports.initialiseAgGridWithWebComponents = initialiseAgGridWithWebComponents;
function toCamelCase(myString) {
if (typeof myString === 'string') {
var result = myString.replace(/-([a-z])/g, function (g) {
return g[1].toUpperCase();
});
return result;
}
else {
return myString;
}
}
/***/ },
/* 72 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var utils_1 = __webpack_require__(7);
var TabbedLayout = (function () {
function TabbedLayout(params) {
var _this = this;
this.items = [];
this.params = params;
this.eGui = document.createElement('div');
this.eGui.innerHTML = TabbedLayout.TEMPLATE;
this.eHeader = this.eGui.querySelector('#tabHeader');
this.eBody = this.eGui.querySelector('#tabBody');
utils_1.Utils.addCssClass(this.eGui, params.cssClass);
if (params.items) {
params.items.forEach(function (item) { return _this.addItem(item); });
}
}
TabbedLayout.prototype.setAfterAttachedParams = function (params) {
this.afterAttachedParams = params;
};
TabbedLayout.prototype.getMinWidth = function () {
var eDummyContainer = document.createElement('span');
// position fixed, so it isn't restricted to the boundaries of the parent
eDummyContainer.style.position = 'fixed';
// we put the dummy into the body container, so it will inherit all the
// css styles that the real cells are inheriting
this.eGui.appendChild(eDummyContainer);
var minWidth = 0;
this.items.forEach(function (itemWrapper) {
utils_1.Utils.removeAllChildren(eDummyContainer);
var eClone = itemWrapper.tabbedItem.body.cloneNode(true);
eDummyContainer.appendChild(eClone);
if (minWidth < eDummyContainer.offsetWidth) {
minWidth = eDummyContainer.offsetWidth;
}
});
this.eGui.removeChild(eDummyContainer);
return minWidth;
};
TabbedLayout.prototype.showFirstItem = function () {
if (this.items.length > 0) {
this.showItemWrapper(this.items[0]);
}
};
TabbedLayout.prototype.addItem = function (item) {
var eHeaderButton = document.createElement('span');
eHeaderButton.appendChild(item.title);
utils_1.Utils.addCssClass(eHeaderButton, 'ag-tab');
this.eHeader.appendChild(eHeaderButton);
var wrapper = {
tabbedItem: item,
eHeaderButton: eHeaderButton
};
this.items.push(wrapper);
eHeaderButton.addEventListener('click', this.showItemWrapper.bind(this, wrapper));
};
TabbedLayout.prototype.showItem = function (tabbedItem) {
var itemWrapper = utils_1.Utils.find(this.items, function (itemWrapper) {
return itemWrapper.tabbedItem === tabbedItem;
});
if (itemWrapper) {
this.showItemWrapper(itemWrapper);
}
};
TabbedLayout.prototype.showItemWrapper = function (wrapper) {
if (this.params.onItemClicked) {
this.params.onItemClicked({ item: wrapper.tabbedItem });
}
if (this.activeItem === wrapper) {
utils_1.Utils.callIfPresent(this.params.onActiveItemClicked);
return;
}
utils_1.Utils.removeAllChildren(this.eBody);
this.eBody.appendChild(wrapper.tabbedItem.body);
if (this.activeItem) {
utils_1.Utils.removeCssClass(this.activeItem.eHeaderButton, 'ag-tab-selected');
}
utils_1.Utils.addCssClass(wrapper.eHeaderButton, 'ag-tab-selected');
this.activeItem = wrapper;
if (wrapper.tabbedItem.afterAttachedCallback) {
wrapper.tabbedItem.afterAttachedCallback(this.afterAttachedParams);
}
};
TabbedLayout.prototype.getGui = function () {
return this.eGui;
};
TabbedLayout.TEMPLATE = '<div>' +
'<div id="tabHeader" class="ag-tab-header"></div>' +
'<div id="tabBody" class="ag-tab-body"></div>' +
'</div>';
return TabbedLayout;
})();
exports.TabbedLayout = TabbedLayout;
/***/ },
/* 73 */
/***/ function(module, exports) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var VerticalStack = (function () {
function VerticalStack() {
this.isLayoutPanel = true;
this.childPanels = [];
this.eGui = document.createElement('div');
this.eGui.style.height = '100%';
}
VerticalStack.prototype.addPanel = function (panel, height) {
var component;
if (panel.isLayoutPanel) {
this.childPanels.push(panel);
component = panel.getGui();
}
else {
component = panel;
}
if (height) {
component.style.height = height;
}
this.eGui.appendChild(component);
};
VerticalStack.prototype.getGui = function () {
return this.eGui;
};
VerticalStack.prototype.doLayout = function () {
for (var i = 0; i < this.childPanels.length; i++) {
this.childPanels[i].doLayout();
}
};
return VerticalStack;
})();
exports.VerticalStack = VerticalStack;
/***/ },
/* 74 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var component_1 = __webpack_require__(45);
var context_1 = __webpack_require__(6);
var popupService_1 = __webpack_require__(41);
var utils_1 = __webpack_require__(7);
var svgFactory_1 = __webpack_require__(36);
var svgFactory = svgFactory_1.SvgFactory.getInstance();
var CMenuItem = (function (_super) {
__extends(CMenuItem, _super);
function CMenuItem(params) {
_super.call(this, CMenuItem.TEMPLATE);
this.params = params;
if (params.checked) {
this.queryForHtmlElement('#eIcon').innerHTML = '✔';
}
else if (params.icon) {
if (utils_1.Utils.isNodeOrElement(params.icon)) {
this.queryForHtmlElement('#eIcon').appendChild(params.icon);
}
else if (typeof params.icon === 'string') {
this.queryForHtmlElement('#eIcon').innerHTML = params.icon;
}
else {
console.log('ag-Grid: menu item icon must be DOM node or string');
}
}
else {
// if i didn't put space here, the alignment was messed up, probably
// fixable with CSS but i was spending to much time trying to figure
// it out.
this.queryForHtmlElement('#eIcon').innerHTML = ' ';
}
if (params.shortcut) {
this.queryForHtmlElement('#eShortcut').innerHTML = params.shortcut;
}
if (params.childMenu) {
this.queryForHtmlElement('#ePopupPointer').appendChild(svgFactory.createSmallArrowRightSvg());
}
else {
this.queryForHtmlElement('#ePopupPointer').innerHTML = ' ';
}
this.queryForHtmlElement('#eName').innerHTML = params.name;
if (params.disabled) {
utils_1.Utils.addCssClass(this.getGui(), 'ag-menu-option-disabled');
}
this.addGuiEventListener('click', this.onOptionSelected.bind(this));
}
CMenuItem.prototype.onOptionSelected = function () {
this.dispatchEvent(CMenuItem.EVENT_ITEM_SELECTED, this.params);
if (this.params.action) {
this.params.action();
}
};
CMenuItem.TEMPLATE = '<div class="ag-menu-option">' +
' <span id="eIcon" class="ag-menu-option-icon"></span>' +
' <span id="eName" class="ag-menu-option-text"></span>' +
' <span id="eShortcut" class="ag-menu-option-shortcut"></span>' +
' <span id="ePopupPointer" class="ag-menu-option-popup-pointer"></span>' +
'</div>';
CMenuItem.EVENT_ITEM_SELECTED = 'itemSelected';
__decorate([
context_1.Autowired('popupService'),
__metadata('design:type', popupService_1.PopupService)
], CMenuItem.prototype, "popupService", void 0);
return CMenuItem;
})(component_1.Component);
exports.CMenuItem = CMenuItem;
/***/ },
/* 75 */
/***/ function(module, exports, __webpack_require__) {
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.4
* @link http://www.ag-grid.com/
* @license MIT
*/
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var component_1 = __webpack_require__(45);
var utils_1 = __webpack_require__(7);
var context_1 = __webpack_require__(6);
var context_2 = __webpack_require__(6);
var popupService_1 = __webpack_require__(41);
var cMenuItem_1 = __webpack_require__(74);
var MenuList = (function (_super) {
__extends(MenuList, _super);
function MenuList() {
_super.call(this, MenuList.TEMPLATE);
this.timerCount = 0;
}
MenuList.prototype.clearActiveItem = function () {
this.removeActiveItem();
this.removeOldChildPopup();
};
MenuList.prototype.addMenuItems = function (menuItems, defaultMenuItems) {
var _this = this;
if (utils_1.Utils.missing(menuItems)) {
return;
}
menuItems.forEach(function (listItem) {
if (listItem === 'separator') {
_this.addSeparator();
}
else {
var menuItem;
if (typeof listItem === 'string') {
menuItem = defaultMenuItems[listItem];
}
else {
menuItem = listItem;
}
_this.addItem(menuItem);
}
});
};
MenuList.prototype.addItem = function (params) {
var _this = this;
var cMenuItem = new cMenuItem_1.CMenuItem(params);
this.context.wireBean(cMenuItem);
this.getGui().appendChild(cMenuItem.getGui());
cMenuItem.addEventListener(cMenuItem_1.CMenuItem.EVENT_ITEM_SELECTED, function (event) {
if (params.childMenu) {
_this.showChildMenu(params, cMenuItem);
}
else {
_this.dispatchEvent(cMenuItem_1.CMenuItem.EVENT_ITEM_SELECTED, event);
}
});
cMenuItem.addGuiEventListener('mouseenter', this.mouseEnterItem.bind(this, params, cMenuItem));
cMenuItem.addGuiEventListener('mouseleave', function () { return _this.timerCount++; });
if (params.childMenu) {
this.addDestroyFunc(function () { return params.childMenu.destroy(); });
}
};
MenuList.prototype.mouseEnterItem = function (menuItemParams, menuItem) {
if (menuItemParams.disabled) {
return;
}
if (this.activeMenuItemParams !== menuItemParams) {
this.removeOldChildPopup();
}
this.removeActiveItem();
this.activeMenuItemParams = menuItemParams;
this.activeMenuItem = menuItem;
utils_1.Utils.addCssClass(this.activeMenuItem.getGui(), 'ag-menu-option-active');
if (menuItemParams.childMenu) {
this.addHoverForChildPopup(menuItemParams, menuItem);
}
};
MenuList.prototype.removeActiveItem = function () {
if (this.activeMenuItem) {
utils_1.Utils.removeCssClass(this.activeMenuItem.getGui(), 'ag-menu-option-active');
this.activeMenuItem = null;
this.activeMenuItemParams = null;
}
};
MenuList.prototype.addHoverForChildPopup = function (menuItemParams, menuItem) {
var _this = this;
var timerCountCopy = this.timerCount;
setTimeout(function () {
var shouldShow = timerCountCopy === _this.timerCount;
var showingThisMenu = _this.showingChildMenu === menuItemParams.childMenu;
if (shouldShow && !showingThisMenu) {
_this.showChildMenu(menuItemParams, menuItem);
}
}, 500);
};
MenuList.prototype.showChildMenu = function (menuItemParams, menuItem) {
this.removeOldChildPopup();
var ePopup = utils_1.Utils.loadTemplate('<div class="ag-menu"></div>');
ePopup.appendChild(menuItemParams.childMenu.getGui());
this.childPopupRemoveFunc = this.popupService.addAsModalPopup(ePopup, true);
this.popupService.positionPopupForMenu({
eventSource: menuItem.getGui(),
ePopup: ePopup
});
this.showingChildMenu = menuItemParams.childMenu;
};
MenuList.prototype.addSeparator = function () {
this.getGui().appendChild(utils_1.Utils.loadTemplate(MenuList.SEPARATOR_TEMPLATE));
};
MenuList.prototype.removeOldChildPopup = function () {
if (this.childPopupRemoveFunc) {
this.showingChildMenu.clearActiveItem();
this.childPopupRemoveFunc();
this.childPopupRemoveFunc = null;
this.showingChildMenu = null;
}
};
MenuList.prototype.destroy = function () {
this.removeOldChildPopup();
_super.prototype.destroy.call(this);
};
MenuList.TEMPLATE = '<div class="ag-menu-list"></div>';
MenuList.SEPARATOR_TEMPLATE = '<div class="ag-menu-separator">' +
' <span class="ag-menu-separator-cell"></span>' +
' <span class="ag-menu-separator-cell"></span>' +
' <span class="ag-menu-separator-cell"></span>' +
' <span class="ag-menu-separator-cell"></span>' +
'</div>';
__decorate([
context_1.Autowired('context'),
__metadata('design:type', context_2.Context)
], MenuList.prototype, "context", void 0);
__decorate([
context_1.Autowired('popupService'),
__metadata('design:type', popupService_1.PopupService)
], MenuList.prototype, "popupService", void 0);
return MenuList;
})(component_1.Component);
exports.MenuList = MenuList;
/***/ },
/* 76 */
/***/ function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(77);
if(typeof content === 'string') content = [[module.id, content, '']];
// add the styles to the DOM
var update = __webpack_require__(79)(content, {});
if(content.locals) module.exports = content.locals;
// Hot Module Replacement
if(false) {
// When the styles change, update the <style> tags
if(!content.locals) {
module.hot.accept("!!./../../node_modules/css-loader/index.js!./ag-grid.css", function() {
var newContent = require("!!./../../node_modules/css-loader/index.js!./ag-grid.css");
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
update(newContent);
});
}
// When the module is disposed, remove the <style> tags
module.hot.dispose(function() { update(); });
}
/***/ },
/* 77 */
/***/ function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(78)();
// imports
// module
exports.push([module.id, "ag-grid-ng2 {\n display: inline-block;\n}\n.ag-root {\n/* set to relative, so absolute popups appear relative to this */\n position: relative;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n/* was getting some 'should be there' scrolls, this sorts it out */\n overflow: hidden;\n}\n.ag-font-style {\n cursor: default;\n font-size: 14px;\n/* disable user mouse selection */\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.ag-no-scrolls {\n white-space: nowrap;\n display: inline-block;\n}\n.ag-scrolls {\n height: 100%;\n}\n.ag-popup-backdrop {\n position: fixed;\n left: 0px;\n top: 0px;\n width: 100%;\n height: 100%;\n}\n.ag-header {\n position: absolute;\n top: 0px;\n left: 0px;\n white-space: nowrap;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n width: 100%;\n}\n.ag-pinned-left-header {\n float: left;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n display: inline-block;\n overflow: hidden;\n height: 100%;\n}\n.ag-pinned-right-header {\n float: right;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n display: inline-block;\n overflow: hidden;\n height: 100%;\n}\n.ag-header-viewport {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n height: 100%;\n}\n.ag-scrolls .ag-header-container {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n position: relative;\n white-space: nowrap;\n height: 100%;\n}\n.ag-no-scrolls .ag-header-container {\n white-space: nowrap;\n}\n.ag-header-overlay {\n display: block;\n position: absolute;\n}\n.ag-header-cell {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n vertical-align: bottom;\n text-align: center;\n display: inline-block;\n height: 100%;\n}\n.ag-header-cell-ghost {\n font-size: 14px;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n position: absolute;\n background: #e5e5e5;\n border: 1px solid #000;\n cursor: move;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n padding: 3px;\n line-height: 1.4;\n}\n.ag-header-cell-ghost img {\n vertical-align: middle;\n border: 0px;\n}\n.ag-header-cell-ghost-icon {\n float: left;\n padding-left: 2px;\n padding-right: 2px;\n}\n.ag-header-group-cell {\n height: 100%;\n display: inline-block;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.ag-header-group-cell-label {\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.ag-header-cell-label {\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.ag-header-cell-resize {\n height: 100%;\n width: 4px;\n float: right;\n cursor: col-resize;\n}\n.ag-header-expand-icon {\n padding-left: 4px;\n}\n.ag-header-cell-menu-button {\n float: right;\n}\n.ag-overlay-panel {\n display: table;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.ag-overlay-wrapper {\n display: table-cell;\n vertical-align: middle;\n text-align: center;\n}\n.ag-body {\n height: 100%;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ag-floating-top {\n position: absolute;\n left: 0px;\n width: 100%;\n white-space: nowrap;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n}\n.ag-pinned-left-floating-top {\n float: left;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n display: inline-block;\n overflow: hidden;\n height: 100%;\n}\n.ag-pinned-right-floating-top {\n float: right;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n display: inline-block;\n overflow: hidden;\n height: 100%;\n}\n.ag-floating-top-viewport {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n height: 100%;\n}\n.ag-floating-top-container {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n position: relative;\n white-space: nowrap;\n}\n.ag-floating-bottom {\n position: absolute;\n left: 0px;\n width: 100%;\n white-space: nowrap;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n}\n.ag-pinned-left-floating-bottom {\n float: left;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n display: inline-block;\n overflow: hidden;\n height: 100%;\n}\n.ag-pinned-right-floating-bottom {\n float: right;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n display: inline-block;\n overflow: hidden;\n height: 100%;\n}\n.ag-floating-bottom-viewport {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n height: 100%;\n}\n.ag-floating-bottom-container {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n position: relative;\n white-space: nowrap;\n}\n.ag-pinned-left-cols-viewport {\n float: left;\n overflow: hidden;\n}\n.ag-pinned-left-cols-container {\n display: inline-block;\n position: relative;\n}\n.ag-pinned-right-cols-viewport {\n float: right;\n overflow-x: hidden;\n overflow-y: auto;\n}\n.ag-pinned-right-cols-container {\n display: inline-block;\n position: relative;\n}\n.ag-body-viewport-wrapper {\n height: 100%;\n}\n.ag-body-viewport {\n overflow-x: auto;\n overflow-y: auto;\n height: 100%;\n}\n.ag-scrolls .ag-body-container {\n position: relative;\n display: inline-block;\n}\n.ag-scrolls .ag-row {\n white-space: nowrap;\n position: absolute;\n width: 100%;\n}\n.ag-no-scrolls .ag-row {\n position: relative;\n}\n.agile-gird-row:hover {\n background-color: #f0f8ff;\n}\n.ag-row-group-panel {\n width: 100%;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ag-cell {\n display: inline-block;\n white-space: nowrap;\n height: 100%;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n overflow: hidden;\n position: absolute;\n}\n.ag-group-cell-entire-row {\n width: 100%;\n display: inline-block;\n white-space: nowrap;\n height: 100%;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.ag-footer-cell-entire-row {\n width: 100%;\n display: inline-block;\n white-space: nowrap;\n height: 100%;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.ag-large .ag-root {\n font-size: 20px;\n}\n.ag-menu {\n position: absolute;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.ag-menu-column-select-wrapper {\n width: 200px;\n height: 300px;\n}\n.ag-menu-list {\n display: table;\n border-collapse: collapse;\n}\n.ag-menu-option {\n display: table-row;\n}\n.ag-menu-option-text {\n display: table-cell;\n}\n.ag-menu-option-shortcut {\n display: table-cell;\n}\n.ag-menu-option-icon {\n display: table-cell;\n}\n.ag-menu-option-popup-pointer {\n display: table-cell;\n}\n.ag-menu-separator {\n display: table-row;\n}\n.ag-menu-separator-cell {\n display: table-cell;\n}\n.ag-filter-list-viewport {\n overflow-x: auto;\n height: 200px;\n width: 200px;\n}\n.ag-filter-list-container {\n position: relative;\n overflow: hidden;\n}\n.ag-filter-item {\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n position: absolute;\n}\n.ag-filter-filter {\n width: 170px;\n margin: 4px;\n}\n.ag-filter-select {\n width: 110px;\n margin: 4px 4px 0px 4px;\n}\n.ag-no-vertical-scroll .ag-scrolls {\n height: unset;\n}\n.ag-no-vertical-scroll .ag-body {\n height: unset;\n}\n.ag-no-vertical-scroll .ag-body-viewport-wrapper {\n height: unset;\n}\n.ag-no-vertical-scroll .ag-body-viewport {\n height: unset;\n}\n.ag-list-selection {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: default;\n}\n.ag-tool-panel {\n width: 200px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: default;\n height: 100%;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ag-column-select-indent {\n display: inline-block;\n}\n.ag-column-select-column {\n margin-left: 14px;\n white-space: nowrap;\n}\n.ag-column-select-column-group {\n white-space: nowrap;\n}\n.ag-column-select-panel {\n height: 100%;\n overflow: auto;\n}\n.ag-hidden {\n display: none;\n}\n.ag-faded {\n opacity: 0.3;\n -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)\";\n filter: alpha(opacity=30);\n}\n.ag-shake-left-to-right {\n -webkit-animation-name: ag-shake-left-to-right;\n -moz-animation-name: ag-shake-left-to-right;\n -o-animation-name: ag-shake-left-to-right;\n -ms-animation-name: ag-shake-left-to-right;\n animation-name: ag-shake-left-to-right;\n -webkit-animation-duration: 0.2s;\n -moz-animation-duration: 0.2s;\n -o-animation-duration: 0.2s;\n -ms-animation-duration: 0.2s;\n animation-duration: 0.2s;\n -webkit-animation-iteration-count: infinite;\n -moz-animation-iteration-count: infinite;\n -o-animation-iteration-count: infinite;\n -ms-animation-iteration-count: infinite;\n animation-iteration-count: infinite;\n -webkit-animation-direction: alternate;\n -moz-animation-direction: alternate;\n -o-animation-direction: alternate;\n -ms-animation-direction: alternate;\n animation-direction: alternate;\n}\n@-moz-keyframes ag-shake-left-to-right {\n from {\n padding-left: 6px;\n padding-right: 2px;\n }\n to {\n padding-left: 2px;\n padding-right: 6px;\n }\n}\n@-webkit-keyframes ag-shake-left-to-right {\n from {\n padding-left: 6px;\n padding-right: 2px;\n }\n to {\n padding-left: 2px;\n padding-right: 6px;\n }\n}\n@-o-keyframes ag-shake-left-to-right {\n from {\n padding-left: 6px;\n padding-right: 2px;\n }\n to {\n padding-left: 2px;\n padding-right: 6px;\n }\n}\n@keyframes ag-shake-left-to-right {\n from {\n padding-left: 6px;\n padding-right: 2px;\n }\n to {\n padding-left: 2px;\n padding-right: 6px;\n }\n}\n", ""]);
// exports
/***/ },
/* 78 */
/***/ function(module, exports) {
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
// css base code, injected by the css-loader
module.exports = function() {
var list = [];
// return the list of modules as css string
list.toString = function toString() {
var result = [];
for(var i = 0; i < this.length; i++) {
var item = this[i];
if(item[2]) {
result.push("@media " + item[2] + "{" + item[1] + "}");
} else {
result.push(item[1]);
}
}
return result.join("");
};
// import a list of modules into the list
list.i = function(modules, mediaQuery) {
if(typeof modules === "string")
modules = [[null, modules, ""]];
var alreadyImportedModules = {};
for(var i = 0; i < this.length; i++) {
var id = this[i][0];
if(typeof id === "number")
alreadyImportedModules[id] = true;
}
for(i = 0; i < modules.length; i++) {
var item = modules[i];
// skip already imported module
// this implementation is not 100% perfect for weird media query combinations
// when a module is imported multiple times with different media queries.
// I hope this will never occur (Hey this way we have smaller bundles)
if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
if(mediaQuery && !item[2]) {
item[2] = mediaQuery;
} else if(mediaQuery) {
item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
}
list.push(item);
}
}
};
return list;
};
/***/ },
/* 79 */
/***/ function(module, exports, __webpack_require__) {
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
var stylesInDom = {},
memoize = function(fn) {
var memo;
return function () {
if (typeof memo === "undefined") memo = fn.apply(this, arguments);
return memo;
};
},
isOldIE = memoize(function() {
return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
}),
getHeadElement = memoize(function () {
return document.head || document.getElementsByTagName("head")[0];
}),
singletonElement = null,
singletonCounter = 0,
styleElementsInsertedAtTop = [];
module.exports = function(list, options) {
if(false) {
if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
}
options = options || {};
// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
// tags it will allow on a page
if (typeof options.singleton === "undefined") options.singleton = isOldIE();
// By default, add <style> tags to the bottom of <head>.
if (typeof options.insertAt === "undefined") options.insertAt = "bottom";
var styles = listToStyles(list);
addStylesToDom(styles, options);
return function update(newList) {
var mayRemove = [];
for(var i = 0; i < styles.length; i++) {
var item = styles[i];
var domStyle = stylesInDom[item.id];
domStyle.refs--;
mayRemove.push(domStyle);
}
if(newList) {
var newStyles = listToStyles(newList);
addStylesToDom(newStyles, options);
}
for(var i = 0; i < mayRemove.length; i++) {
var domStyle = mayRemove[i];
if(domStyle.refs === 0) {
for(var j = 0; j < domStyle.parts.length; j++)
domStyle.parts[j]();
delete stylesInDom[domStyle.id];
}
}
};
}
function addStylesToDom(styles, options) {
for(var i = 0; i < styles.length; i++) {
var item = styles[i];
var domStyle = stylesInDom[item.id];
if(domStyle) {
domStyle.refs++;
for(var j = 0; j < domStyle.parts.length; j++) {
domStyle.parts[j](item.parts[j]);
}
for(; j < item.parts.length; j++) {
domStyle.parts.push(addStyle(item.parts[j], options));
}
} else {
var parts = [];
for(var j = 0; j < item.parts.length; j++) {
parts.push(addStyle(item.parts[j], options));
}
stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
}
}
}
function listToStyles(list) {
var styles = [];
var newStyles = {};
for(var i = 0; i < list.length; i++) {
var item = list[i];
var id = item[0];
var css = item[1];
var media = item[2];
var sourceMap = item[3];
var part = {css: css, media: media, sourceMap: sourceMap};
if(!newStyles[id])
styles.push(newStyles[id] = {id: id, parts: [part]});
else
newStyles[id].parts.push(part);
}
return styles;
}
function insertStyleElement(options, styleElement) {
var head = getHeadElement();
var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
if (options.insertAt === "top") {
if(!lastStyleElementInsertedAtTop) {
head.insertBefore(styleElement, head.firstChild);
} else if(lastStyleElementInsertedAtTop.nextSibling) {
head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
} else {
head.appendChild(styleElement);
}
styleElementsInsertedAtTop.push(styleElement);
} else if (options.insertAt === "bottom") {
head.appendChild(styleElement);
} else {
throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
}
}
function removeStyleElement(styleElement) {
styleElement.parentNode.removeChild(styleElement);
var idx = styleElementsInsertedAtTop.indexOf(styleElement);
if(idx >= 0) {
styleElementsInsertedAtTop.splice(idx, 1);
}
}
function createStyleElement(options) {
var styleElement = document.createElement("style");
styleElement.type = "text/css";
insertStyleElement(options, styleElement);
return styleElement;
}
function createLinkElement(options) {
var linkElement = document.createElement("link");
linkElement.rel = "stylesheet";
insertStyleElement(options, linkElement);
return linkElement;
}
function addStyle(obj, options) {
var styleElement, update, remove;
if (options.singleton) {
var styleIndex = singletonCounter++;
styleElement = singletonElement || (singletonElement = createStyleElement(options));
update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
} else if(obj.sourceMap &&
typeof URL === "function" &&
typeof URL.createObjectURL === "function" &&
typeof URL.revokeObjectURL === "function" &&
typeof Blob === "function" &&
typeof btoa === "function") {
styleElement = createLinkElement(options);
update = updateLink.bind(null, styleElement);
remove = function() {
removeStyleElement(styleElement);
if(styleElement.href)
URL.revokeObjectURL(styleElement.href);
};
} else {
styleElement = createStyleElement(options);
update = applyToTag.bind(null, styleElement);
remove = function() {
removeStyleElement(styleElement);
};
}
update(obj);
return function updateStyle(newObj) {
if(newObj) {
if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
return;
update(obj = newObj);
} else {
remove();
}
};
}
var replaceText = (function () {
var textStore = [];
return function (index, replacement) {
textStore[index] = replacement;
return textStore.filter(Boolean).join('\n');
};
})();
function applyToSingletonTag(styleElement, index, remove, obj) {
var css = remove ? "" : obj.css;
if (styleElement.styleSheet) {
styleElement.styleSheet.cssText = replaceText(index, css);
} else {
var cssNode = document.createTextNode(css);
var childNodes = styleElement.childNodes;
if (childNodes[index]) styleElement.removeChild(childNodes[index]);
if (childNodes.length) {
styleElement.insertBefore(cssNode, childNodes[index]);
} else {
styleElement.appendChild(cssNode);
}
}
}
function applyToTag(styleElement, obj) {
var css = obj.css;
var media = obj.media;
var sourceMap = obj.sourceMap;
if(media) {
styleElement.setAttribute("media", media)
}
if(styleElement.styleSheet) {
styleElement.styleSheet.cssText = css;
} else {
while(styleElement.firstChild) {
styleElement.removeChild(styleElement.firstChild);
}
styleElement.appendChild(document.createTextNode(css));
}
}
function updateLink(linkElement, obj) {
var css = obj.css;
var media = obj.media;
var sourceMap = obj.sourceMap;
if(sourceMap) {
// http://stackoverflow.com/a/26603875
css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
}
var blob = new Blob([css], { type: "text/css" });
var oldSrc = linkElement.href;
linkElement.href = URL.createObjectURL(blob);
if(oldSrc)
URL.revokeObjectURL(oldSrc);
}
/***/ },
/* 80 */
/***/ function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(81);
if(typeof content === 'string') content = [[module.id, content, '']];
// add the styles to the DOM
var update = __webpack_require__(79)(content, {});
if(content.locals) module.exports = content.locals;
// Hot Module Replacement
if(false) {
// When the styles change, update the <style> tags
if(!content.locals) {
module.hot.accept("!!./../../node_modules/css-loader/index.js!./theme-blue.css", function() {
var newContent = require("!!./../../node_modules/css-loader/index.js!./theme-blue.css");
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
update(newContent);
});
}
// When the module is disposed, remove the <style> tags
module.hot.dispose(function() { update(); });
}
/***/ },
/* 81 */
/***/ function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(78)();
// imports
// module
exports.push([module.id, ".ag-blue {\n line-height: 1.4;\n}\n.ag-blue img {\n vertical-align: middle;\n border: 0px;\n}\n.ag-blue .ag-root {\n border: 1px solid #9bc2e6;\n font: 10pt Calibri, \"Segoe UI\", Thonburi, Arial, Verdana, sans-serif;\n}\n.ag-blue .ag-row-group-cell {\n background: #5b9bd5;\n border: 1px solid #808080;\n padding: 2px;\n}\n.ag-blue .ag-row-group-cell-ghost {\n opacity: 0.5;\n -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)\";\n filter: alpha(opacity=50);\n}\n.ag-blue .ag-row-group-cell-text {\n padding-left: 2px;\n padding-right: 2px;\n}\n.ag-blue .ag-row-group-cell-button {\n border: 1px solid transparent;\n padding-left: 2px;\n padding-right: 2px;\n -webkit-border-radius: 3px;\n border-radius: 3px;\n}\n.ag-blue .ag-row-group-cell-button:hover {\n border: 1px solid #000;\n}\n.ag-blue .ag-row-group-empty-message {\n padding-left: 2px;\n padding-right: 2px;\n border: 1px solid transparent;\n color: #808080;\n}\n.ag-blue .ag-row-group-icon {\n padding-right: 4px;\n}\n.ag-blue .ag-row-group-panel {\n border-top: 1px solid #9bc2e6;\n border-left: 1px solid #9bc2e6;\n border-right: 1px solid #9bc2e6;\n padding: 4px;\n background-color: #ddebf7;\n color: #fff;\n}\n.ag-blue .ag-cell {\n top: -1px;\n padding-left: 2px;\n padding-right: 2px;\n overflow: hidden;\n white-space: nowrap;\n letter-spacing: -0.02em;\n}\n.ag-blue .ag-cell-range-selected-1:not(.ag-cell-focus) {\n background-color: rgba(120,120,120,0.4);\n}\n.ag-blue .ag-cell-range-selected-2:not(.ag-cell-focus) {\n background-color: rgba(80,80,80,0.4);\n}\n.ag-blue .ag-cell-range-selected-3:not(.ag-cell-focus) {\n background-color: rgba(40,40,40,0.4);\n}\n.ag-blue .ag-cell-range-selected-4:not(.ag-cell-focus) {\n background-color: rgba(0,0,0,0.4);\n}\n.ag-blue .ag-column-moving .ag-cell {\n -webkit-transition: left 0.2s;\n -moz-transition: left 0.2s;\n -o-transition: left 0.2s;\n -ms-transition: left 0.2s;\n transition: left 0.2s;\n}\n.ag-blue .ag-cell-focus {\n background: #fff;\n border: 2px solid #217346;\n}\n.ag-blue .ag-cell-no-focus {\n border-right: 1px dotted #9bc2e6;\n border-top: 2px solid transparent;\n border-left: 2px solid transparent;\n border-bottom: 1px solid #9bc2e6;\n}\n.ag-blue .ag-cell-first-right-pinned {\n border-left: 1px solid #9bc2e6;\n}\n.ag-blue .ag-cell-last-left-pinned {\n border-right: 1px solid #9bc2e6;\n}\n.ag-blue .ag-cell-highlight {\n border: 1px solid #006400;\n}\n.ag-blue .ag-cell-highlight-animation {\n -webkit-transition: border 1s;\n -moz-transition: border 1s;\n -o-transition: border 1s;\n -ms-transition: border 1s;\n transition: border 1s;\n}\n.ag-blue .ag-header {\n background-color: #5b9bd5;\n border-bottom: 1px solid #9bc2e6;\n}\n.ag-blue .ag-no-scrolls .ag-header-container {\n background-color: #5b9bd5;\n border-bottom: 1px solid #9bc2e6;\n}\n.ag-blue .ag-header-cell {\n border-right: 1px solid #9bc2e6;\n}\n.ag-blue .ag-header-cell-moving .ag-header-cell-label {\n opacity: 0;\n -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n filter: alpha(opacity=0);\n}\n.ag-blue .ag-header-cell-moving-clone {\n border-right: 1px solid #808080;\n border-left: 1px solid #808080;\n background-color: rgba(91,155,213,0.8);\n}\n.ag-blue .ag-header-cell-moving {\n background-color: #9bc2e6;\n}\n.ag-blue .ag-header-group-cell {\n border-right: 1px solid #9bc2e6;\n}\n.ag-blue .ag-header-group-cell-with-group {\n border-bottom: 1px solid #9bc2e6;\n}\n.ag-blue .ag-pinned-right-header {\n border-left: 1px solid #9bc2e6;\n}\n.ag-blue .ag-header-cell-label {\n padding: 4px 2px 4px 2px;\n font-weight: bold;\n color: #fff;\n}\n.ag-blue .ag-header-cell-text {\n padding-left: 2px;\n}\n.ag-blue .ag-header-group-cell-label {\n padding: 4px;\n font-weight: bold;\n color: #fff;\n padding-left: 10px;\n}\n.ag-blue .ag-header-group-text {\n margin-right: 2px;\n}\n.ag-blue .ag-header-cell-menu-button {\n color: #fff;\n border: 1px solid #a6acb3;\n padding: 2px;\n margin-top: 3px;\n -webkit-border-radius: 3px;\n border-radius: 3px;\n -webkit-box-sizing: content-box;\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n line-height: 0px; /* normal line height, a space was appearing below the menu button */\n/* When using bootstrap, box-sizing was set to 'border-box' */\n}\n.ag-blue .ag-header-icon {\n color: #fff;\n stroke: #fff;\n fill: #fff;\n}\n.ag-blue .ag-dark .ag-header-expand-icon:hover {\n cursor: pointer;\n}\n.ag-blue .ag-row-odd {\n background-color: #ddebf7;\n}\n.ag-blue .ag-row-even {\n background-color: #fff;\n}\n.ag-blue .ag-overlay-loading-wrapper {\n background-color: rgba(255,255,255,0.5);\n}\n.ag-blue .ag-overlay-loading-center {\n background-color: #fff;\n border: 1px solid #a9a9a9;\n -webkit-border-radius: 10px;\n border-radius: 10px;\n padding: 10px;\n}\n.ag-blue .ag-body {\n background-color: #fafafa;\n}\n.ag-blue .ag-row-selected {\n background-color: #c7c7c7;\n}\n.ag-blue .ag-group-cell-entire-row {\n background-color: #fff;\n font-weight: bold;\n padding: 2px 4px;\n border-bottom: solid 1px #9bc2e6;\n overflow: hidden;\n white-space: nowrap;\n}\n.ag-blue .ag-footer-cell-entire-row {\n background-color: #fff;\n font-weight: bold;\n padding: 4px;\n border-bottom: solid 1px #9bc2e6;\n}\n.ag-blue .ag-group-cell {\n font-style: italic;\n}\n.ag-blue .ag-group-expand {\n padding-right: 2px;\n}\n.ag-blue .ag-footer-cell {\n font-style: italic;\n}\n.ag-blue .ag-menu {\n border: 1px solid #7070a0;\n background-color: #f0f0f0;\n cursor: default;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n}\n.ag-blue .ag-menu .ag-tab-header {\n background-color: #5b9bd5;\n}\n.ag-blue .ag-menu .ag-tab {\n padding: 6px 8px 6px 8px;\n margin: 2px 2px 0px 2px;\n display: inline-block;\n border-right: 1px solid transparent;\n border-left: 1px solid transparent;\n border-top: 1px solid transparent;\n border-top-right-radius: 2px;\n border-top-left-radius: 2px;\n}\n.ag-blue .ag-menu .ag-tab-selected {\n background-color: #9bc2e6;\n border-right: 1px solid #7070a0;\n border-left: 1px solid #7070a0;\n border-top: 1px solid #7070a0;\n}\n.ag-blue .ag-menu-separator {\n border-top: 1px solid #d3d3d3;\n}\n.ag-blue .ag-menu-option-active {\n background-color: #bde2e5;\n}\n.ag-blue .ag-menu-option-icon {\n padding: 2px 4px 2px 4px;\n vertical-align: middle;\n}\n.ag-blue .ag-menu-option-text {\n padding: 2px 4px 2px 4px;\n vertical-align: middle;\n}\n.ag-blue .ag-menu-option-shortcut {\n padding: 2px 2px 2px 20px;\n vertical-align: middle;\n}\n.ag-blue .ag-menu-option-popup-pointer {\n padding: 2px 4px 2px 4px;\n vertical-align: middle;\n}\n.ag-blue .ag-menu-option-disabled {\n opacity: 0.5;\n -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)\";\n filter: alpha(opacity=50);\n}\n.ag-blue .ag-menu-column-select-wrapper {\n margin: 2px;\n}\n.ag-blue .ag-filter-checkbox {\n position: relative;\n top: 2px;\n left: 2px;\n padding-right: 2px;\n}\n.ag-blue .ag-filter-header-container {\n border-bottom: 1px solid #d3d3d3;\n font: 10pt Calibri, \"Segoe UI\", Thonburi, Arial, Verdana, sans-serif;\n}\n.ag-blue .ag-filter-apply-panel {\n border-top: 1px solid #d3d3d3;\n padding: 2px;\n}\n.ag-blue .ag-filter-filter {\n background-color: #fff;\n border: 1px solid #c6c6c6;\n width: 192px;\n}\n.ag-blue .ag-filter-value {\n margin-left: 4px;\n}\n.ag-blue .ag-filter-value:hover {\n background-color: #39f;\n border: 1px dotted #000;\n color: #fff;\n}\n.ag-blue .ag-selection-checkbox {\n margin-left: 4px;\n}\n.ag-blue .ag-paging-panel {\n padding: 4px;\n}\n.ag-blue .ag-paging-button {\n margin-left: 4px;\n margin-right: 4px;\n}\n.ag-blue .ag-paging-row-summary-panel {\n display: inline-block;\n width: 300px;\n}\n.ag-blue .ag-tool-panel {\n background-color: #eee;\n border-right: 1px solid #9bc2e6;\n border-bottom: 1px solid #9bc2e6;\n border-top: 1px solid #9bc2e6;\n}\n.ag-blue .ag-status-bar {\n font-size: 12px;\n height: 20px;\n border-bottom: 1px solid #9bc2e6;\n border-left: 1px solid #9bc2e6;\n border-right: 1px solid #9bc2e6;\n background-color: #ddebf7;\n color: #fff;\n}\n.ag-blue .ag-status-bar-aggregations {\n float: right;\n}\n.ag-blue .ag-status-bar-item {\n padding-left: 10px;\n}\n", ""]);
// exports
/***/ },
/* 82 */
/***/ function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(83);
if(typeof content === 'string') content = [[module.id, content, '']];
// add the styles to the DOM
var update = __webpack_require__(79)(content, {});
if(content.locals) module.exports = content.locals;
// Hot Module Replacement
if(false) {
// When the styles change, update the <style> tags
if(!content.locals) {
module.hot.accept("!!./../../node_modules/css-loader/index.js!./theme-dark.css", function() {
var newContent = require("!!./../../node_modules/css-loader/index.js!./theme-dark.css");
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
update(newContent);
});
}
// When the module is disposed, remove the <style> tags
module.hot.dispose(function() { update(); });
}
/***/ },
/* 83 */
/***/ function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(78)();
// imports
// module
exports.push([module.id, ".ag-dark {\n line-height: 1.4;\n}\n.ag-dark img {\n vertical-align: middle;\n border: 0px;\n}\n.ag-dark .ag-root {\n border: 1px solid #808080;\n color: #e0e0e0;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n}\n.ag-dark .ag-row-group-cell {\n background: #430000;\n border: 1px solid #808080;\n padding: 2px;\n}\n.ag-dark .ag-row-group-cell-ghost {\n opacity: 0.3;\n -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)\";\n filter: alpha(opacity=30);\n}\n.ag-dark .ag-row-group-cell-text {\n padding-left: 2px;\n padding-right: 2px;\n}\n.ag-dark .ag-row-group-cell-button {\n border: 1px solid transparent;\n padding-left: 2px;\n padding-right: 2px;\n -webkit-border-radius: 3px;\n border-radius: 3px;\n}\n.ag-dark .ag-row-group-cell-button:hover {\n border: 1px solid #808080;\n}\n.ag-dark .ag-row-group-empty-message {\n padding-left: 2px;\n padding-right: 2px;\n border: 1px solid transparent;\n color: #909090;\n}\n.ag-dark .ag-row-group-icon {\n padding-right: 4px;\n}\n.ag-dark .ag-row-group-panel {\n border-top: 1px solid #808080;\n border-left: 1px solid #808080;\n border-right: 1px solid #808080;\n padding: 4px;\n background-color: #403e3e;\n color: #e0e0e0;\n}\n.ag-dark .ag-cell {\n border-right: 1px solid #808080;\n padding: 2px;\n}\n.ag-dark .ag-cell-range-selected-1:not(.ag-cell-focus) {\n background-color: rgba(100,160,160,0.4);\n}\n.ag-dark .ag-cell-range-selected-2:not(.ag-cell-focus) {\n background-color: rgba(100,190,190,0.4);\n}\n.ag-dark .ag-cell-range-selected-3:not(.ag-cell-focus) {\n background-color: rgba(100,220,220,0.4);\n}\n.ag-dark .ag-cell-range-selected-4:not(.ag-cell-focus) {\n background-color: rgba(100,250,250,0.4);\n}\n.ag-dark .ag-column-moving .ag-cell {\n -webkit-transition: left 0.2s;\n -moz-transition: left 0.2s;\n -o-transition: left 0.2s;\n -ms-transition: left 0.2s;\n transition: left 0.2s;\n}\n.ag-dark .ag-cell-focus {\n border: 1px solid #a9a9a9;\n}\n.ag-dark .ag-cell-no-focus {\n border-right: 1px dotted #808080;\n border-top: 1px solid transparent;\n border-left: 1px solid transparent;\n border-bottom: 1px solid transparent;\n}\n.ag-dark .ag-cell-first-right-pinned {\n border-left: 1px solid #808080;\n}\n.ag-dark .ag-cell-last-left-pinned {\n border-right: 1px solid #808080;\n}\n.ag-dark .ag-cell-highlight {\n border: 1px solid #90ee90;\n}\n.ag-dark .ag-cell-highlight-animation {\n -webkit-transition: border 1s;\n -moz-transition: border 1s;\n -o-transition: border 1s;\n -ms-transition: border 1s;\n transition: border 1s;\n}\n.ag-dark .ag-header {\n background-color: #430000;\n border-bottom: 1px solid #808080;\n}\n.ag-dark .ag-no-scrolls .ag-header-container {\n background-color: #430000;\n border-bottom: 1px solid #808080;\n}\n.ag-dark .ag-header-cell {\n border-right: 1px solid #808080;\n}\n.ag-dark .ag-header-cell-moving .ag-header-cell-label {\n opacity: 0;\n -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n filter: alpha(opacity=0);\n}\n.ag-dark .ag-header-cell-moving-clone {\n border-right: 1px solid #808080;\n border-left: 1px solid #808080;\n background-color: rgba(43,0,0,0.8);\n}\n.ag-dark .ag-header-cell-moving {\n background-color: #808080;\n}\n.ag-dark .ag-pinned-right-header {\n border-left: 1px solid #808080;\n}\n.ag-dark .ag-header-cell-label {\n padding: 4px 2px 4px 2px;\n}\n.ag-dark .ag-header-cell-text {\n padding: 2px;\n}\n.ag-dark .ag-header-group-cell-label {\n font-weight: bold;\n padding: 4px;\n padding-left: 10px;\n}\n.ag-dark .ag-header-group-cell {\n border-right: 1px solid #808080;\n}\n.ag-dark .ag-header-group-text {\n margin-right: 2px;\n}\n.ag-dark .ag-header-group-cell-with-group {\n border-bottom: 1px solid #808080;\n}\n.ag-dark .ag-header-cell-menu-button {\n padding: 2px;\n margin-top: 4px;\n border: 1px solid transparent;\n -webkit-border-radius: 3px;\n border-radius: 3px;\n -webkit-box-sizing: content-box;\n -moz-box-sizing: content-box;\n box-sizing: content-box; /* When using bootstrap, box-sizing was set to 'border-box' */\n line-height: 0px; /* normal line height, a space was appearing below the menu button */\n}\n.ag-dark .ag-header-cell-menu-button:hover {\n border: 1px solid #e0e0e0;\n}\n.ag-dark .ag-header-icon {\n stroke: #e0e0e0;\n fill: #e0e0e0;\n}\n.ag-dark .ag-header-expand-icon:hover {\n cursor: pointer;\n}\n.ag-dark .ag-row-odd {\n background-color: #302e2e;\n}\n.ag-dark .ag-row-even {\n background-color: #403e3e;\n}\n.ag-dark .ag-overlay-loading-wrapper {\n background-color: rgba(255,255,255,0.5);\n}\n.ag-dark .ag-overlay-loading-center {\n background-color: #fff;\n border: 1px solid #a9a9a9;\n -webkit-border-radius: 10px;\n border-radius: 10px;\n padding: 10px;\n color: #000;\n}\n.ag-dark .ag-body {\n background-color: #ddd;\n}\n.ag-dark .ag-row-selected {\n background-color: #000;\n}\n.ag-dark .ag-group-cell-entire-row {\n background-color: #aaa;\n color: 222;\n padding: 4px;\n}\n.ag-dark .ag-footer-cell-entire-row {\n background-color: #aaa;\n color: 222;\n padding: 4px;\n}\n.ag-dark .ag-group-cell {\n font-style: italic;\n}\n.ag-dark .ag-group-expand {\n padding-right: 2px;\n}\n.ag-dark .ag-footer-cell {\n font-style: italic;\n}\n.ag-dark .ag-menu {\n border: 1px solid #555;\n background-color: #f0f0f0;\n cursor: default;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n}\n.ag-dark .ag-menu .ag-tab-header {\n background-color: #430000;\n}\n.ag-dark .ag-menu .ag-tab {\n padding: 6px 8px 6px 8px;\n margin: 2px 2px 0px 2px;\n display: inline-block;\n border-right: 1px solid transparent;\n border-left: 1px solid transparent;\n border-top: 1px solid transparent;\n border-top-right-radius: 2px;\n border-top-left-radius: 2px;\n}\n.ag-dark .ag-menu .ag-tab-selected {\n background-color: #403e3e;\n border-right: 1px solid #555;\n border-left: 1px solid #555;\n border-top: 1px solid #555;\n}\n.ag-dark .ag-menu-separator {\n border-top: 1px solid #d3d3d3;\n}\n.ag-dark .ag-menu-option-active {\n background-color: #bde2e5;\n}\n.ag-dark .ag-menu-option-icon {\n padding: 2px 4px 2px 4px;\n vertical-align: middle;\n}\n.ag-dark .ag-menu-option-text {\n padding: 2px 4px 2px 4px;\n vertical-align: middle;\n}\n.ag-dark .ag-menu-option-shortcut {\n padding: 2px 2px 2px 20px;\n vertical-align: middle;\n}\n.ag-dark .ag-menu-option-popup-pointer {\n padding: 2px 4px 2px 4px;\n vertical-align: middle;\n}\n.ag-dark .ag-menu-option-disabled {\n opacity: 0.5;\n -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)\";\n filter: alpha(opacity=50);\n}\n.ag-dark .ag-menu-column-select-wrapper {\n margin: 2px;\n}\n.ag-dark .ag-filter-checkbox {\n position: relative;\n top: 2px;\n left: 2px;\n}\n.ag-dark .ag-filter-header-container {\n border-bottom: 1px solid #d3d3d3;\n}\n.ag-dark .ag-filter-header-container {\n border-bottom: 1px solid #d3d3d3;\n}\n.ag-dark .ag-filter-apply-panel {\n border-top: 1px solid #d3d3d3;\n padding: 2px;\n}\n.ag-dark .ag-selection-checkbox {\n margin-left: 4px;\n}\n.ag-dark .ag-paging-panel {\n color: #000;\n padding: 4px;\n}\n.ag-dark .ag-paging-button {\n margin-left: 4px;\n margin-right: 4px;\n}\n.ag-dark .ag-paging-row-summary-panel {\n display: inline-block;\n width: 300px;\n}\n.ag-dark .ag-tool-panel {\n background-color: #eee;\n border-right: 1px solid #808080;\n border-bottom: 1px solid #808080;\n border-top: 1px solid #808080;\n}\n.ag-dark .ag-status-bar {\n font-size: 12px;\n height: 20px;\n border-bottom: 1px solid #808080;\n border-left: 1px solid #808080;\n border-right: 1px solid #808080;\n padding: 2px;\n background-color: #403e3e;\n color: #e0e0e0;\n}\n.ag-dark .ag-status-bar-aggregations {\n float: right;\n}\n", ""]);
// exports
/***/ },
/* 84 */
/***/ function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(85);
if(typeof content === 'string') content = [[module.id, content, '']];
// add the styles to the DOM
var update = __webpack_require__(79)(content, {});
if(content.locals) module.exports = content.locals;
// Hot Module Replacement
if(false) {
// When the styles change, update the <style> tags
if(!content.locals) {
module.hot.accept("!!./../../node_modules/css-loader/index.js!./theme-fresh.css", function() {
var newContent = require("!!./../../node_modules/css-loader/index.js!./theme-fresh.css");
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
update(newContent);
});
}
// When the module is disposed, remove the <style> tags
module.hot.dispose(function() { update(); });
}
/***/ },
/* 85 */
/***/ function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(78)();
// imports
// module
exports.push([module.id, ".ag-fresh {\n line-height: 1.4;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n}\n.ag-fresh img {\n vertical-align: middle;\n border: 0px;\n}\n.ag-fresh .ag-root {\n border: 1px solid #808080;\n}\n.ag-fresh .ag-row-group-cell {\n background: -webkit-linear-gradient(#fff, #d3d3d3);\n background: -moz-linear-gradient(#fff, #d3d3d3);\n background: -o-linear-gradient(#fff, #d3d3d3);\n background: -ms-linear-gradient(#fff, #d3d3d3);\n background: linear-gradient(#fff, #d3d3d3);\n border: 1px solid #808080;\n padding: 2px;\n}\n.ag-fresh .ag-row-group-cell-ghost {\n opacity: 0.5;\n -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)\";\n filter: alpha(opacity=50);\n}\n.ag-fresh .ag-row-group-cell-text {\n padding-left: 2px;\n padding-right: 2px;\n}\n.ag-fresh .ag-row-group-cell-button {\n border: 1px solid transparent;\n padding-left: 2px;\n padding-right: 2px;\n -webkit-border-radius: 3px;\n border-radius: 3px;\n}\n.ag-fresh .ag-row-group-cell-button:hover {\n border: 1px solid #000;\n}\n.ag-fresh .ag-row-group-empty-message {\n padding-left: 2px;\n padding-right: 2px;\n border: 1px solid transparent;\n color: #808080;\n}\n.ag-fresh .ag-row-group-icon {\n padding-right: 4px;\n}\n.ag-fresh .ag-row-group-panel {\n border-top: 1px solid #808080;\n border-left: 1px solid #808080;\n border-right: 1px solid #808080;\n padding: 4px;\n background-color: #f0f0f0;\n}\n.ag-fresh .ag-cell {\n padding: 2px;\n}\n.ag-fresh .ag-cell-range-selected-1:not(.ag-cell-focus) {\n background-color: rgba(120,120,120,0.4);\n}\n.ag-fresh .ag-cell-range-selected-2:not(.ag-cell-focus) {\n background-color: rgba(80,80,80,0.4);\n}\n.ag-fresh .ag-cell-range-selected-3:not(.ag-cell-focus) {\n background-color: rgba(40,40,40,0.4);\n}\n.ag-fresh .ag-cell-range-selected-4:not(.ag-cell-focus) {\n background-color: rgba(0,0,0,0.4);\n}\n.ag-fresh .ag-column-moving .ag-cell {\n -webkit-transition: left 0.2s;\n -moz-transition: left 0.2s;\n -o-transition: left 0.2s;\n -ms-transition: left 0.2s;\n transition: left 0.2s;\n}\n.ag-fresh .ag-cell-focus {\n border: 1px solid #a9a9a9;\n}\n.ag-fresh .ag-cell-no-focus {\n border-right: 1px dotted #808080;\n border-top: 1px solid transparent;\n border-left: 1px solid transparent;\n border-bottom: 1px solid transparent;\n}\n.ag-fresh .ag-cell-first-right-pinned {\n border-left: 1px solid #000;\n}\n.ag-fresh .ag-cell-last-left-pinned {\n border-right: 1px solid #000;\n}\n.ag-fresh .ag-cell-highlight {\n border: 1px solid #006400;\n}\n.ag-fresh .ag-cell-highlight-animation {\n -webkit-transition: border 1s;\n -moz-transition: border 1s;\n -o-transition: border 1s;\n -ms-transition: border 1s;\n transition: border 1s;\n}\n.ag-fresh .ag-header {\n background: -webkit-linear-gradient(#fff, #d3d3d3);\n background: -moz-linear-gradient(#fff, #d3d3d3);\n background: -o-linear-gradient(#fff, #d3d3d3);\n background: -ms-linear-gradient(#fff, #d3d3d3);\n background: linear-gradient(#fff, #d3d3d3);\n border-bottom: 1px solid #808080;\n}\n.ag-fresh .ag-no-scrolls .ag-header-container {\n background: -webkit-linear-gradient(#fff, #d3d3d3);\n background: -moz-linear-gradient(#fff, #d3d3d3);\n background: -o-linear-gradient(#fff, #d3d3d3);\n background: -ms-linear-gradient(#fff, #d3d3d3);\n background: linear-gradient(#fff, #d3d3d3);\n border-bottom: 1px solid #808080;\n}\n.ag-fresh .ag-header-cell {\n border-right: 1px solid #808080;\n}\n.ag-fresh .ag-header-cell-moving .ag-header-cell-label {\n opacity: 0.5;\n -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)\";\n filter: alpha(opacity=50);\n}\n.ag-fresh .ag-header-cell-moving {\n background-color: #bebebe;\n}\n.ag-fresh .ag-header-cell-moving-clone {\n border-right: 1px solid #808080;\n border-left: 1px solid #808080;\n background-color: rgba(220,220,220,0.8);\n}\n.ag-fresh .ag-header-group-cell {\n border-right: 1px solid #808080;\n}\n.ag-fresh .ag-header-group-cell-with-group {\n border-bottom: 1px solid #808080;\n}\n.ag-fresh .ag-header-cell-label {\n padding: 4px 2px 4px 2px;\n}\n.ag-fresh .ag-header-cell-text {\n padding-left: 2px;\n}\n.ag-fresh .ag-header-group-cell-label {\n padding: 4px;\n padding-left: 10px;\n}\n.ag-fresh .ag-header-group-text {\n margin-right: 2px;\n}\n.ag-fresh .ag-header-cell-menu-button {\n padding: 2px;\n margin-top: 4px;\n border: 1px solid transparent;\n -webkit-border-radius: 3px;\n border-radius: 3px;\n -webkit-box-sizing: content-box;\n -moz-box-sizing: content-box;\n box-sizing: content-box; /* When using bootstrap, box-sizing was set to 'border-box' */\n line-height: 0px; /* normal line height, a space was appearing below the menu button */\n}\n.ag-fresh .ag-pinned-right-header {\n border-left: 1px solid #808080;\n}\n.ag-fresh .ag-header-cell-menu-button:hover {\n border: 1px solid #000;\n}\n.ag-fresh .ag-header-icon {\n color: #800000;\n}\n.ag-fresh .ag-row-selected {\n background-color: #b0e0e6 !important;\n}\n.ag-fresh .ag-body .ag-row-odd {\n background-color: #f6f6f6;\n}\n.ag-fresh .ag-body .ag-row-even {\n background-color: #fff;\n}\n.ag-fresh .ag-floating-top .ag-row {\n background-color: #f0f0f0;\n}\n.ag-fresh .ag-floating-bottom .ag-row {\n background-color: #f0f0f0;\n}\n.ag-fresh .ag-overlay-loading-wrapper {\n background-color: rgba(255,255,255,0.5);\n}\n.ag-fresh .ag-overlay-loading-center {\n background-color: #fff;\n border: 1px solid #a9a9a9;\n -webkit-border-radius: 10px;\n border-radius: 10px;\n padding: 10px;\n}\n.ag-fresh .ag-overlay-no-rows-center {\n background-color: #fff;\n border: 1px solid #a9a9a9;\n -webkit-border-radius: 10px;\n border-radius: 10px;\n padding: 10px;\n}\n.ag-fresh .ag-body {\n background-color: #fafafa;\n}\n.ag-fresh .ag-group-cell-entire-row {\n background-color: #aaa;\n padding: 4px;\n}\n.ag-fresh .ag-footer-cell-entire-row {\n background-color: #aaa;\n padding: 4px;\n}\n.ag-fresh .ag-group-cell {\n font-style: italic;\n}\n.ag-fresh .ag-group-expand {\n padding-right: 2px;\n}\n.ag-fresh .ag-footer-cell {\n font-style: italic;\n}\n.ag-fresh .ag-menu {\n border: 1px solid #000;\n background-color: #f0f0f0;\n cursor: default;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n}\n.ag-fresh .ag-menu .ag-tab-header {\n background-color: #f8f8f8;\n}\n.ag-fresh .ag-menu .ag-tab {\n padding: 6px 8px 6px 8px;\n margin: 2px 2px 0px 2px;\n display: inline-block;\n border-right: 1px solid transparent;\n border-left: 1px solid transparent;\n border-top: 1px solid transparent;\n border-top-right-radius: 2px;\n border-top-left-radius: 2px;\n}\n.ag-fresh .ag-menu .ag-tab-selected {\n background-color: #f0f0f0;\n border-right: 1px solid #000;\n border-left: 1px solid #000;\n border-top: 1px solid #000;\n}\n.ag-fresh .ag-menu-separator {\n border-top: 1px solid #d3d3d3;\n}\n.ag-fresh .ag-menu-option-active {\n background-color: #bde2e5;\n}\n.ag-fresh .ag-menu-option-icon {\n padding: 2px 4px 2px 4px;\n vertical-align: middle;\n}\n.ag-fresh .ag-menu-option-text {\n padding: 2px 4px 2px 4px;\n vertical-align: middle;\n}\n.ag-fresh .ag-menu-option-shortcut {\n padding: 2px 2px 2px 20px;\n vertical-align: middle;\n}\n.ag-fresh .ag-menu-option-popup-pointer {\n padding: 2px 4px 2px 4px;\n vertical-align: middle;\n}\n.ag-fresh .ag-menu-option-disabled {\n opacity: 0.5;\n -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)\";\n filter: alpha(opacity=50);\n}\n.ag-fresh .ag-menu-column-select-wrapper {\n margin: 2px;\n}\n.ag-fresh .ag-filter-checkbox {\n position: relative;\n top: 2px;\n left: 2px;\n}\n.ag-fresh .ag-filter-header-container {\n border-bottom: 1px solid #d3d3d3;\n}\n.ag-fresh .ag-filter-apply-panel {\n border-top: 1px solid #d3d3d3;\n padding: 2px;\n}\n.ag-fresh .ag-filter-value {\n margin-left: 4px;\n}\n.ag-fresh .ag-selection-checkbox {\n margin-left: 4px;\n}\n.ag-fresh .ag-paging-panel {\n padding: 4px;\n}\n.ag-fresh .ag-paging-button {\n margin-left: 4px;\n margin-right: 4px;\n}\n.ag-fresh .ag-paging-row-summary-panel {\n display: inline-block;\n width: 300px;\n}\n.ag-fresh .ag-tool-panel {\n background-color: #eee;\n border-right: 1px solid #808080;\n border-bottom: 1px solid #808080;\n border-top: 1px solid #808080;\n}\n.ag-fresh .ag-status-bar {\n font-size: 12px;\n height: 20px;\n border-bottom: 1px solid #808080;\n border-left: 1px solid #808080;\n border-right: 1px solid #808080;\n padding: 2px;\n background-color: #f0f0f0;\n}\n.ag-fresh .ag-status-bar-aggregations {\n float: right;\n}\n.ag-fresh .ag-status-bar-item {\n padding-left: 10px;\n}\n/*\n///// old toolpanel items\n.ag-not-dragging\n border: 1px solid transparent;\n\n.ag-drop-target-above\n border-top: 5px solid darkgrey;\n\n.ag-drop-target-below\n border-bottom: 5px solid darkgrey;\n\n.ag-dragging\n border: 1px dotted darkgrey;\n\n.ag-list-item-selected\n color #f0f0f0;\n\n.ag-list-item-not-selected\n font-style italic;\n color #a0a0a0;\n\n.ag-list-selection\n background-color: white;\n border: 1px solid darkgrey;\n box-sizing: border-box;\n\n.ag-popup-list .ag-list-item:hover\n background-color: lightblue;\n\n.ag-visible-icons\n padding-left: 2px;\n padding-right: 2px;\n*/\n", ""]);
// exports
/***/ }
/******/ ])
});
;
|
client/src/components/trucks/TruckModal.js
|
PCGeekBrain/TruckTrack
|
import React, { Component } from 'react';
// Components
import { Modal, Button, FormControl } from 'react-bootstrap';
// Actions
import { submitTruck, hideModal } from '../../actions/trucks';
// Redux
import { connect } from 'react-redux';
class TruckModal extends Component {
componentWillMount(){
this.setState({...this.props.truck});
}
updateField = (event) => {
this.setState({
[event.target.id]: event.target.value
})
}
hide = () => {
this.props.hideModal();
}
onSave = (event) => {
if (event) {event.preventDefault();}
this.props.submitTruck(this.state);
this.hide();
}
render(){
return (
<Modal show={true} onHide={this.hide}>
<Modal.Header closeButton>
<Modal.Title>Route</Modal.Title>
</Modal.Header>
<Modal.Body>
<form onSubmit={this.onSave}>
<FormControl autoFocus id="name" value={this.state.name}
onChange={this.updateField} placeholder="Name*"/>
<FormControl id="licence" value={this.state.licence}
onChange={this.updateField} placeholder="Licence Plate"/>
</form>
</Modal.Body>
<Modal.Footer>
<Button bsStyle="primary" onClick={this.onSave}>Save Truck</Button>
</Modal.Footer>
</Modal>
)
}
}
function mapStateToProps(state, ownProps) {
return {
truck: state.trucks.truck
}
}
export default connect(mapStateToProps, { submitTruck, hideModal })(TruckModal)
|
admin/includes/javascript/jquery-1.8.3.min.js
|
shophelfer/shophelfer.com-shop
|
/*! jQuery v1.8.3 jquery.com | jquery.org/license */
(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)v.event.add(t,n,u[n][r])}o.data&&(o.data=v.extend({},o.data))}function Ot(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?(t.parentNode&&(t.outerHTML=e.outerHTML),v.support.html5Clone&&e.innerHTML&&!v.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):n==="input"&&Et.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(v.expando)}function Mt(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function _t(e){Et.test(e.type)&&(e.defaultChecked=e.checked)}function Qt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Jt.length;while(i--){t=Jt[i]+n;if(t in e)return t}return r}function Gt(e,t){return e=t||e,v.css(e,"display")==="none"||!v.contains(e.ownerDocument,e)}function Yt(e,t){var n,r,i=[],s=0,o=e.length;for(;s<o;s++){n=e[s];if(!n.style)continue;i[s]=v._data(n,"olddisplay"),t?(!i[s]&&n.style.display==="none"&&(n.style.display=""),n.style.display===""&&Gt(n)&&(i[s]=v._data(n,"olddisplay",nn(n.nodeName)))):(r=Dt(n,"display"),!i[s]&&r!=="none"&&v._data(n,"olddisplay",r))}for(s=0;s<o;s++){n=e[s];if(!n.style)continue;if(!t||n.style.display==="none"||n.style.display==="")n.style.display=t?i[s]||"":"none"}return e}function Zt(e,t,n){var r=Rt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function en(e,t,n,r){var i=n===(r?"border":"content")?4:t==="width"?1:0,s=0;for(;i<4;i+=2)n==="margin"&&(s+=v.css(e,n+$t[i],!0)),r?(n==="content"&&(s-=parseFloat(Dt(e,"padding"+$t[i]))||0),n!=="margin"&&(s-=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0)):(s+=parseFloat(Dt(e,"padding"+$t[i]))||0,n!=="padding"&&(s+=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0));return s}function tn(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=!0,s=v.support.boxSizing&&v.css(e,"boxSizing")==="border-box";if(r<=0||r==null){r=Dt(e,t);if(r<0||r==null)r=e.style[t];if(Ut.test(r))return r;i=s&&(v.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+en(e,t,n||(s?"border":"content"),i)+"px"}function nn(e){if(Wt[e])return Wt[e];var t=v("<"+e+">").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write("<!doctype html><html><body>"),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u<a;u++)r=o[u],s=/^\+/.test(r),s&&(r=r.substr(1)||"*"),i=e[r]=e[r]||[],i[s?"unshift":"push"](n)}}function kn(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u,a=e[s],f=0,l=a?a.length:0,c=e===Sn;for(;f<l&&(c||!u);f++)u=a[f](n,r,i),typeof u=="string"&&(!c||o[u]?u=t:(n.dataTypes.unshift(u),u=kn(e,n,r,i,u,o)));return(c||!u)&&!o["*"]&&(u=kn(e,n,r,i,"*",o)),u}function Ln(e,n){var r,i,s=v.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);i&&v.extend(!0,e,i)}function An(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(s in l)s in r&&(n[l[s]]=r[s]);while(f[0]==="*")f.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("content-type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){f.unshift(s);break}if(f[0]in r)o=f[0];else{for(s in r){if(!f[0]||e.converters[s+" "+f[0]]){o=s;break}u||(u=s)}o=o||u}if(o)return o!==f[0]&&f.unshift(o),r[o]}function On(e,t){var n,r,i,s,o=e.dataTypes.slice(),u=o[0],a={},f=0;e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(o[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=o[++f];)if(i!=="*"){if(u!=="*"&&u!==i){n=a[u+" "+i]||a["* "+i];if(!n)for(r in a){s=r.split(" ");if(s[1]===i){n=a[u+" "+s[0]]||a["* "+s[0]];if(n){n===!0?n=a[r]:a[r]!==!0&&(i=s[0],o.splice(f--,0,i));break}}}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(l){return{state:"parsererror",error:n?l:"No conversion from "+u+" to "+i}}}u=i}return{state:"success",data:t}}function Fn(){try{return new e.XMLHttpRequest}catch(t){}}function In(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function $n(){return setTimeout(function(){qn=t},0),qn=v.now()}function Jn(e,t){v.each(t,function(t,n){var r=(Vn[t]||[]).concat(Vn["*"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function Kn(e,t,n){var r,i=0,s=0,o=Xn.length,u=v.Deferred().always(function(){delete a.elem}),a=function(){var t=qn||$n(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,i=1-r,s=0,o=f.tweens.length;for(;s<o;s++)f.tweens[s].run(i);return u.notifyWith(e,[f,i,n]),i<1&&o?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:v.extend({},t),opts:v.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:qn||$n(),duration:n.duration,tweens:[],createTween:function(t,n,r){var i=v.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(i),i},stop:function(t){var n=0,r=t?f.tweens.length:0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;Qn(l,f.opts.specialEasing);for(;i<o;i++){r=Xn[i].call(f,e,l,f.opts);if(r)return r}return Jn(f,l),v.isFunction(f.opts.start)&&f.opts.start.call(e,f),v.fx.timer(v.extend(a,{anim:f,queue:f.opts.queue,elem:e})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function Qn(e,t){var n,r,i,s,o;for(n in e){r=v.camelCase(n),i=t[r],s=e[n],v.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=v.cssHooks[r];if(o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}}function Gn(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},m=[],g=e.nodeType&&Gt(e);n.queue||(l=v._queueHooks(e,"fx"),l.unqueued==null&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,v.queue(e,"fx").length||l.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],v.css(e,"display")==="inline"&&v.css(e,"float")==="none"&&(!v.support.inlineBlockNeedsLayout||nn(e.nodeName)==="inline"?p.display="inline-block":p.zoom=1)),n.overflow&&(p.overflow="hidden",v.support.shrinkWrapBlocks||h.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t){s=t[r];if(Un.exec(s)){delete t[r],a=a||s==="toggle";if(s===(g?"hide":"show"))continue;m.push(r)}}o=m.length;if(o){u=v._data(e,"fxshow")||v._data(e,"fxshow",{}),"hidden"in u&&(g=u.hidden),a&&(u.hidden=!g),g?v(e).show():h.done(function(){v(e).hide()}),h.done(function(){var t;v.removeData(e,"fxshow",!0);for(t in d)v.style(e,t,d[t])});for(r=0;r<o;r++)i=m[r],f=h.createTween(i,g?u[i]:0),d[i]=u[i]||v.style(e,i),i in u||(u[i]=f.start,g&&(f.end=f.start,f.start=i==="width"||i==="height"?1:0))}}function Yn(e,t,n,r,i){return new Yn.prototype.init(e,t,n,r,i)}function Zn(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=$t[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function tr(e){return v.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n,r,i=e.document,s=e.location,o=e.navigator,u=e.jQuery,a=e.$,f=Array.prototype.push,l=Array.prototype.slice,c=Array.prototype.indexOf,h=Object.prototype.toString,p=Object.prototype.hasOwnProperty,d=String.prototype.trim,v=function(e,t){return new v.fn.init(e,t,n)},m=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,g=/\S/,y=/\s+/,b=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,w=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a<f;a++)if((e=arguments[a])!=null)for(n in e){r=u[n],i=e[n];if(u===i)continue;l&&i&&(v.isPlainObject(i)||(s=v.isArray(i)))?(s?(s=!1,o=r&&v.isArray(r)?r:[]):o=r&&v.isPlainObject(r)?r:{},u[n]=v.extend(l,o,i)):i!==t&&(u[n]=i)}return u},v.extend({noConflict:function(t){return e.$===v&&(e.$=a),t&&e.jQuery===v&&(e.jQuery=u),v},isReady:!1,readyWait:1,holdReady:function(e){e?v.readyWait++:v.ready(!0)},ready:function(e){if(e===!0?--v.readyWait:v.isReady)return;if(!i.body)return setTimeout(v.ready,1);v.isReady=!0;if(e!==!0&&--v.readyWait>0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s<o;)if(n.apply(e[s++],r)===!1)break}else if(u){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;s<o;)if(n.call(e[s],s,e[s++])===!1)break;return e},trim:d&&!d.call("\ufeff\u00a0")?function(e){return e==null?"":d.call(e)}:function(e){return e==null?"":(e+"").replace(b,"")},makeArray:function(e,t){var n,r=t||[];return e!=null&&(n=v.type(e),e.length==null||n==="string"||n==="function"||n==="regexp"||v.isWindow(e)?f.call(r,e):v.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(c)return c.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r=="number")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,n,r){var i,s,o=[],u=0,a=e.length,f=e instanceof v||a!==t&&typeof a=="number"&&(a>0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u<a;u++)i=n(e[u],u,r),i!=null&&(o[o.length]=i);else for(s in e)i=n(e[s],s,r),i!=null&&(o[o.length]=i);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(r=e[n],n=e,e=r),v.isFunction(e)?(i=l.call(arguments,2),s=function(){return e.apply(n,i.concat(l.call(arguments)))},s.guid=e.guid=e.guid||v.guid++,s):t},access:function(e,n,r,i,s,o,u){var a,f=r==null,l=0,c=e.length;if(r&&typeof r=="object"){for(l in r)v.access(e,n,l,r[l],1,o,i);s=1}else if(i!==t){a=u===t&&v.isFunction(i),f&&(a?(a=n,n=function(e,t,n){return a.call(v(e),n)}):(n.call(e,i),n=null));if(n)for(;l<c;l++)n(e[l],r,a?i.call(e[l],l,n(e[l],r)):i,u);s=1}return s?e:f?n.call(e):c?n(e[0],r):o},now:function(){return(new Date).getTime()}}),v.ready.promise=function(t){if(!r){r=v.Deferred();if(i.readyState==="complete")setTimeout(v.ready,1);else if(i.addEventListener)i.addEventListener("DOMContentLoaded",A,!1),e.addEventListener("load",v.ready,!1);else{i.attachEvent("onreadystatechange",A),e.attachEvent("onload",v.ready);var n=!1;try{n=e.frameElement==null&&i.documentElement}catch(s){}n&&n.doScroll&&function o(){if(!v.isReady){try{n.doScroll("left")}catch(e){return setTimeout(o,50)}v.ready()}}()}}return r.promise(t)},v.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){O["[object "+t+"]"]=t.toLowerCase()}),n=v(i);var M={};v.Callbacks=function(e){e=typeof e=="string"?M[e]||_(e):v.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){n=e.memory&&t,r=!0,u=s||0,s=0,o=a.length,i=!0;for(;a&&u<o;u++)if(a[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}i=!1,a&&(f?f.length&&l(f.shift()):n?a=[]:c.disable())},c={add:function(){if(a){var t=a.length;(function r(t){v.each(t,function(t,n){var i=v.type(n);i==="function"?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&i!=="string"&&r(n)})})(arguments),i?o=a.length:n&&(s=t,l(n))}return this},remove:function(){return a&&v.each(arguments,function(e,t){var n;while((n=v.inArray(t,a,n))>-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&v.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),v.support=function(){var t,n,r,s,o,u,a,f,l,c,h,p=i.createElement("div");p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="<table><tr><td></td><td>t</td></tr></table>",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="<div></div>",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i<s;i++)delete r[t[i]];if(!(n?B:v.isEmptyObject)(r))return}}if(!n){delete u[a].data;if(!B(u[a]))return}o?v.cleanData([e],!0):v.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null},_data:function(e,t,n){return v.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&v.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),v.fn.extend({data:function(e,n){var r,i,s,o,u,a=this[0],f=0,l=null;if(e===t){if(this.length){l=v.data(a);if(a.nodeType===1&&!v._data(a,"parsedAttrs")){s=a.attributes;for(u=s.length;f<u;f++)o=s[f].name,o.indexOf("data-")||(o=v.camelCase(o.substring(5)),H(a,o,l[o]));v._data(a,"parsedAttrs",!0)}}return l}return typeof e=="object"?this.each(function(){v.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",i=r[1]+"!",v.access(this,function(n){if(n===t)return l=this.triggerHandler("getData"+i,[r[0]]),l===t&&a&&(l=v.data(a,e),l=H(a,e,l)),l===t&&r[1]?this.data(r[0]):l;r[1]=n,this.each(function(){var t=v(this);t.triggerHandler("setData"+i,r),v.data(this,e,n),t.triggerHandler("changeData"+i,r)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?v.queue(this[0],e):n===t?this:this.each(function(){var t=v.queue(this,e,n);v._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&v.dequeue(this,e)})},dequeue:function(e){return this.each(function(){v.dequeue(this,e)})},delay:function(e,t){return e=v.fx?v.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=v.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};typeof e!="string"&&(n=e,e=t),e=e||"fx";while(u--)r=v._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var j,F,I,q=/[\t\r\n]/g,R=/\r/g,U=/^(?:button|input)$/i,z=/^(?:button|input|object|select|textarea)$/i,W=/^a(?:rea|)$/i,X=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,V=v.support.getSetAttribute;v.fn.extend({attr:function(e,t){return v.access(this,v.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{s=" "+i.className+" ";for(o=0,u=t.length;o<u;o++)s.indexOf(" "+t[o]+" ")<0&&(s+=t[o]+" ");i.className=v.trim(s)}}}return this},removeClass:function(e){var n,r,i,s,o,u,a;if(v.isFunction(e))return this.each(function(t){v(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(y);for(u=0,a=this.length;u<a;u++){i=this[u];if(i.nodeType===1&&i.className){r=(" "+i.className+" ").replace(q," ");for(s=0,o=n.length;s<o;s++)while(r.indexOf(" "+n[s]+" ")>=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(q," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a<u;a++){n=r[a];if((n.selected||a===i)&&(v.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!v.nodeName(n.parentNode,"optgroup"))){t=v(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n=v.makeArray(t);return v(e).find("option").each(function(){this.selected=v.inArray(v(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o<r.length;o++)i=r[o],i&&(n=v.propFix[i]||i,s=X.test(i),s||v.attr(e,i,""),e.removeAttribute(V?i:n),s&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(U.test(e.nodeName)&&e.parentNode)v.error("type property can't be changed");else if(!v.support.radioValue&&t==="radio"&&v.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return j&&v.nodeName(e,"button")?j.get(e,t):t in e?e.value:null},set:function(e,t,n){if(j&&v.nodeName(e,"button"))return j.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!v.isXMLDoc(e),o&&(n=v.propFix[n]||n,s=v.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):z.test(e.nodeName)||W.test(e.nodeName)&&e.href?0:t}}}}),F={get:function(e,n){var r,i=v.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?v.removeAttr(e,n):(r=v.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},V||(I={name:!0,id:!0,coords:!0},j=v.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(I[n]?r.value!=="":r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=i.createAttribute(n),e.setAttributeNode(r)),r.value=t+""}},v.each(["width","height"],function(e,t){v.attrHooks[t]=v.extend(v.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),v.attrHooks.contenteditable={get:j.get,set:function(e,t,n){t===""&&(t="false"),j.set(e,t,n)}}),v.support.hrefNormalized||v.each(["href","src","width","height"],function(e,n){v.attrHooks[n]=v.extend(v.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),v.support.style||(v.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=t+""}}),v.support.optSelected||(v.propHooks.selected=v.extend(v.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),v.support.enctype||(v.propFix.enctype="encoding"),v.support.checkOn||v.each(["radio","checkbox"],function(){v.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),v.each(["radio","checkbox"],function(){v.valHooks[this]=v.extend(v.valHooks[this],{set:function(e,t){if(v.isArray(t))return e.checked=v.inArray(v(e).val(),t)>=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f<n.length;f++){l=J.exec(n[f])||[],c=l[1],h=(l[2]||"").split(".").sort(),g=v.event.special[c]||{},c=(s?g.delegateType:g.bindType)||c,g=v.event.special[c]||{},p=v.extend({type:c,origType:l[1],data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&v.expr.match.needsContext.test(s),namespace:h.join(".")},d),m=a[c];if(!m){m=a[c]=[],m.delegateCount=0;if(!g.setup||g.setup.call(e,i,h,u)===!1)e.addEventListener?e.addEventListener(c,u,!1):e.attachEvent&&e.attachEvent("on"+c,u)}g.add&&(g.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),s?m.splice(m.delegateCount++,0,p):m.push(p),v.event.global[c]=!0}e=null},global:{},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,m,g=v.hasData(e)&&v._data(e);if(!g||!(h=g.events))return;t=v.trim(Z(t||"")).split(" ");for(s=0;s<t.length;s++){o=J.exec(t[s])||[],u=a=o[1],f=o[2];if(!u){for(u in h)v.event.remove(e,u+t[s],n,r,!0);continue}p=v.event.special[u]||{},u=(r?p.delegateType:p.bindType)||u,d=h[u]||[],l=d.length,f=f?new RegExp("(^|\\.)"+f.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(c=0;c<d.length;c++)m=d[c],(i||a===m.origType)&&(!n||n.guid===m.guid)&&(!f||f.test(m.namespace))&&(!r||r===m.selector||r==="**"&&m.selector)&&(d.splice(c--,1),m.selector&&d.delegateCount--,p.remove&&p.remove.call(e,m));d.length===0&&l!==d.length&&((!p.teardown||p.teardown.call(e,f,g.handle)===!1)&&v.removeEvent(e,u,g.handle),delete h[u])}v.isEmptyObject(h)&&(delete g.handle,v.removeData(e,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,s,o){if(!s||s.nodeType!==3&&s.nodeType!==8){var u,a,f,l,c,h,p,d,m,g,y=n.type||n,b=[];if(Y.test(y+v.event.triggered))return;y.indexOf("!")>=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f<m.length&&!n.isPropagationStopped();f++)l=m[f][0],n.type=m[f][1],d=(v._data(l,"events")||{})[n.type]&&v._data(l,"handle"),d&&d.apply(l,r),d=h&&l[h],d&&v.acceptData(l)&&d.apply&&d.apply(l,r)===!1&&n.preventDefault();return n.type=y,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(s.ownerDocument,r)===!1)&&(y!=="click"||!v.nodeName(s,"a"))&&v.acceptData(s)&&h&&s[y]&&(y!=="focus"&&y!=="blur"||n.target.offsetWidth!==0)&&!v.isWindow(s)&&(c=s[h],c&&(s[h]=null),v.event.triggered=y,s[y](),v.event.triggered=t,c&&(s[h]=c)),n.result}return},dispatch:function(n){n=v.event.fix(n||e.event);var r,i,s,o,u,a,f,c,h,p,d=(v._data(this,"events")||{})[n.type]||[],m=d.delegateCount,g=l.call(arguments),y=!n.exclusive&&!n.namespace,b=v.event.special[n.type]||{},w=[];g[0]=n,n.delegateTarget=this;if(b.preDispatch&&b.preDispatch.call(this,n)===!1)return;if(m&&(!n.button||n.type!=="click"))for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||n.type!=="click"){u={},f=[];for(r=0;r<m;r++)c=d[r],h=c.selector,u[h]===t&&(u[h]=c.needsContext?v(h,this).index(s)>=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r<w.length&&!n.isPropagationStopped();r++){a=w[r],n.currentTarget=a.elem;for(i=0;i<a.matches.length&&!n.isImmediatePropagationStopped();i++){c=a.matches[i];if(y||!n.namespace&&!c.namespace||n.namespace_re&&n.namespace_re.test(c.namespace))n.data=c.data,n.handleObj=c,o=((v.event.special[c.origType]||{}).handle||c.handler).apply(a.elem,g),o!==t&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation()))}}return b.postDispatch&&b.postDispatch.call(this,n),n.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,s,o,u=n.button,a=n.fromElement;return e.pageX==null&&n.clientX!=null&&(r=e.target.ownerDocument||i,s=r.documentElement,o=r.body,e.pageX=n.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},fix:function(e){if(e[v.expando])return e;var t,n,r=e,s=v.event.fixHooks[e.type]||{},o=s.props?this.props.concat(s.props):this.props;e=v.Event(r);for(t=o.length;t;)n=o[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||i),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,r):e},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){v.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=v.extend(new v.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?v.event.trigger(i,null,t):v.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},v.event.handle=v.event.dispatch,v.removeEvent=i.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]=="undefined"&&(e[r]=null),e.detachEvent(r,n))},v.Event=function(e,t){if(!(this instanceof v.Event))return new v.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?tt:et):this.type=e,t&&v.extend(this,t),this.timeStamp=e&&e.timeStamp||v.now(),this[v.expando]=!0},v.Event.prototype={preventDefault:function(){this.isDefaultPrevented=tt;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=tt;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=tt,this.stopPropagation()},isDefaultPrevented:et,isPropagationStopped:et,isImmediatePropagationStopped:et},v.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){v.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj,o=s.selector;if(!i||i!==r&&!v.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),v.support.submitBubbles||(v.event.special.submit={setup:function(){if(v.nodeName(this,"form"))return!1;v.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=v.nodeName(n,"input")||v.nodeName(n,"button")?n.form:t;r&&!v._data(r,"_submit_attached")&&(v.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),v._data(r,"_submit_attached",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&v.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(v.nodeName(this,"form"))return!1;v.event.remove(this,"._submit")}}),v.support.changeBubbles||(v.event.special.change={setup:function(){if($.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")v.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),v.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),v.event.simulate("change",this,e,!0)});return!1}v.event.add(this,"beforeactivate._change",function(e){var t=e.target;$.test(t.nodeName)&&!v._data(t,"_change_attached")&&(v.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&v.event.simulate("change",this.parentNode,e,!0)}),v._data(t,"_change_attached",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return v.event.remove(this,"._change"),!$.test(this.nodeName)}}),v.support.focusinBubbles||v.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){v.event.simulate(t,e.target,v.event.fix(e),!0)};v.event.special[t]={setup:function(){n++===0&&i.addEventListener(e,r,!0)},teardown:function(){--n===0&&i.removeEventListener(e,r,!0)}}}),v.fn.extend({on:function(e,n,r,i,s){var o,u;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(u in e)this.on(u,n,r,e[u],s);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=et;else if(!i)return this;return s===1&&(o=i,i=function(e){return v().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=v.guid++)),this.each(function(){v.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,v(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e=="object"){for(s in e)this.off(s,n,e[s]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=et),this.each(function(){v.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return v(this.context).on(e,this.selector,t,n),this},die:function(e,t){return v(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){v.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return v.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||v.guid++,r=0,i=function(n){var i=(v._data(this,"lastToggle"+e.guid)||0)%r;return v._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),v.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){v.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++)if(s=e[u])if(!n||n(s,r,i))o.push(s),f&&t.push(u);return o}function ct(e,t,n,r,i,s){return r&&!r[d]&&(r=ct(r)),i&&!i[d]&&(i=ct(i,s)),N(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||dt(t||"*",u.nodeType?[u]:u,[]),m=e&&(s||!t)?lt(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;n&&n(m,g,u,a);if(r){f=lt(g,p),r(f,[],u,a),l=f.length;while(l--)if(c=f[l])g[p[l]]=!(m[p[l]]=c)}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?T.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a<s;a++)if(n=i.relative[e[a].type])h=[at(ft(h),n)];else{n=i.filter[e[a].type].apply(null,e[a].matches);if(n[d]){r=++a;for(;r<s;r++)if(i.relative[e[r].type])break;return ct(a>1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a<r&&ht(e.slice(a,r)),r<s&&ht(e=e.slice(r)),r<s&&e.join(""))}h.push(n)}return ft(h)}function pt(e,t){var r=t.length>0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r<i;r++)nt(e,t[r],n);return n}function vt(e,t,n,r,s){var o,u,f,l,c,h=ut(e),p=h.length;if(!r&&h.length===1){u=h[0]=h[0].slice(0);if(u.length>2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},N=function(e,t){return e[d]=t==null||t,e},C=function(){var e={},t=[];return N(function(n,r){return t.push(n)>i.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="<a name='"+d+"'></a><div name='"+d+"'></div>",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:st(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:st(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},f=y.compareDocumentPosition?function(e,t){return e===t?(l=!0,0):(!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition:e.compareDocumentPosition(t)&4)?-1:1}:function(e,t){if(e===t)return l=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,u=t.parentNode,a=o;if(o===u)return ot(e,t);if(!o)return-1;if(!u)return 1;while(a)i.unshift(a),a=a.parentNode;a=u;while(a)s.unshift(a),a=a.parentNode;n=i.length,r=s.length;for(var f=0;f<n&&f<r;f++)if(i[f]!==s[f])return ot(i[f],s[f]);return f===n?ot(e,s[f],-1):ot(i[f],t,1)},[0,0].sort(f),h=!l,nt.uniqueSort=function(e){var t,n=[],r=1,i=0;l=h,e.sort(f);if(l){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e},nt.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},a=nt.compile=function(e,t){var n,r=[],i=[],s=A[d][e+" "];if(!s){t||(t=ut(e)),n=t.length;while(n--)s=ht(t[n]),s[d]?r.push(s):i.push(s);s=A(e,pt(i,r))}return s},g.querySelectorAll&&function(){var e,t=vt,n=/'|\\/g,r=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,i=[":focus"],s=[":active"],u=y.matchesSelector||y.mozMatchesSelector||y.webkitMatchesSelector||y.oMatchesSelector||y.msMatchesSelector;K(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="<p test=''></p>",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'/>",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t<n;t++)if(v.contains(u[t],this))return!0});o=this.pushStack("","find",e);for(t=0,n=this.length;t<n;t++){r=o.length,v.find(e,this[t],o);if(t>0)for(i=r;i<o.length;i++)for(s=0;s<r;s++)if(o[s]===o[i]){o.splice(i--,1);break}}return o},has:function(e){var t,n=v(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(v.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1),"not",e)},filter:function(e){return this.pushStack(ft(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?st.test(e)?v(e,this.context).index(this[0])>=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r<i;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&n.nodeType!==11){if(o?o.index(n)>-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/<tbody/i,gt=/<|&#?\w+;/,yt=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,wt=new RegExp("<(?:"+ct+")[\\s/>]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,Nt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X<div>","</div>"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return ut(this[0])?this.length?this.pushStack(v(v.isFunction(e)?e():e),"replaceWith",e):this:v.isFunction(e)?this.each(function(t){var n=v(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=v(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;v(this).remove(),t?v(t).before(e):v(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,s,o,u,a=0,f=e[0],l=[],c=this.length;if(!v.support.checkClone&&c>1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a<c;a++)r.call(n&&v.nodeName(this[a],"table")?Lt(this[a],"tbody"):this[a],a===u?o:v.clone(o,!0,!0))}o=s=null,l.length&&v.each(l,function(e,t){t.src?v.ajax?v.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):v.error("no ajax"):v.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Tt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),v.buildFragment=function(e,n,r){var s,o,u,a=e[0];return n=n||i,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,e.length===1&&typeof a=="string"&&a.length<512&&n===i&&a.charAt(0)==="<"&&!bt.test(a)&&(v.support.checkClone||!St.test(a))&&(v.support.html5Clone||!wt.test(a))&&(o=!0,s=v.fragments[a],u=s!==t),s||(s=n.createDocumentFragment(),v.clean(e,n,s,r),o&&(v.fragments[a]=u&&s)),{fragment:s,cacheable:o}},v.fragments={},v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){v.fn[e]=function(n){var r,i=0,s=[],o=v(n),u=o.length,a=this.length===1&&this[0].parentNode;if((a==null||a&&a.nodeType===11&&a.childNodes.length===1)&&u===1)return o[t](this[0]),this;for(;i<u;i++)r=(i>0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1></$2>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]==="<table>"&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("<div>").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],Vn[n]=Vn[n]||[],Vn[n].unshift(t)},prefilter:function(e,t){t?Xn.unshift(e):Xn.push(e)}}),v.Tween=Yn,Yn.prototype={constructor:Yn,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(v.cssNumber[n]?"":"px")},cur:function(){var e=Yn.propHooks[this.prop];return e&&e.get?e.get(this):Yn.propHooks._default.get(this)},run:function(e){var t,n=Yn.propHooks[this.prop];return this.options.duration?this.pos=t=v.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Yn.propHooks._default.set(this),this}},Yn.prototype.init.prototype=Yn.prototype,Yn.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=v.css(e.elem,e.prop,!1,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){v.fx.step[e.prop]?v.fx.step[e.prop](e):e.elem.style&&(e.elem.style[v.cssProps[e.prop]]!=null||v.cssHooks[e.prop])?v.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Yn.propHooks.scrollTop=Yn.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},v.each(["toggle","show","hide"],function(e,t){var n=v.fn[t];v.fn[t]=function(r,i,s){return r==null||typeof r=="boolean"||!e&&v.isFunction(r)&&v.isFunction(i)?n.apply(this,arguments):this.animate(Zn(t,!0),r,i,s)}}),v.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Gt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=v.isEmptyObject(e),s=v.speed(t,n,r),o=function(){var t=Kn(this,v.extend({},e),s);i&&t.stop(!0)};return i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=e!=null&&e+"queueHooks",s=v.timers,o=v._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Wn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&v.dequeue(this,e)})}}),v.each({slideDown:Zn("show"),slideUp:Zn("hide"),slideToggle:Zn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){v.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),v.speed=function(e,t,n){var r=e&&typeof e=="object"?v.extend({},e):{complete:n||!n&&t||v.isFunction(e)&&e,duration:e,easing:n&&t||t&&!v.isFunction(t)&&t};r.duration=v.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in v.fx.speeds?v.fx.speeds[r.duration]:v.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){v.isFunction(r.old)&&r.old.call(this),r.queue&&v.dequeue(this,r.queue)},r},v.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},v.timers=[],v.fx=Yn.prototype.init,v.fx.tick=function(){var e,n=v.timers,r=0;qn=v.now();for(;r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||v.fx.stop(),qn=t},v.fx.timer=function(e){e()&&v.timers.push(e)&&!Rn&&(Rn=setInterval(v.fx.tick,v.fx.interval))},v.fx.interval=13,v.fx.stop=function(){clearInterval(Rn),Rn=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fx.step={},v.expr&&v.expr.filters&&(v.expr.filters.animated=function(e){return v.grep(v.timers,function(t){return e===t.elem}).length});var er=/^(?:body|html)$/i;v.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){v.offset.setOffset(this,e,t)});var n,r,i,s,o,u,a,f={top:0,left:0},l=this[0],c=l&&l.ownerDocument;if(!c)return;return(r=c.body)===l?v.offset.bodyOffset(l):(n=c.documentElement,v.contains(n,l)?(typeof l.getBoundingClientRect!="undefined"&&(f=l.getBoundingClientRect()),i=tr(c),s=n.clientTop||r.clientTop||0,o=n.clientLeft||r.clientLeft||0,u=i.pageYOffset||n.scrollTop,a=i.pageXOffset||n.scrollLeft,{top:f.top+u-s,left:f.left+a-o}):f)},v.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return v.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(v.css(e,"marginTop"))||0,n+=parseFloat(v.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=v.css(e,"position");r==="static"&&(e.style.position="relative");var i=v(e),s=i.offset(),o=v.css(e,"top"),u=v.css(e,"left"),a=(r==="absolute"||r==="fixed")&&v.inArray("auto",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window);
|
src/components/Lobby/Admin/index.js
|
socialgorithm/ultimate-ttt-web
|
import React from 'react';
import { withRouter } from 'react-router-dom';
import {
Icon,
Container,
Message,
Loader,
Button,
Segment,
Grid,
List,
Label,
Form,
Dropdown, Popup
} from 'semantic-ui-react';
import classNames from 'classnames';
import Tournament from '../Tournament'
class LobbyAdmin extends React.PureComponent {
constructor(props) {
super(props);
this.state = {
admin: false,
availableGames: [],
lobby: {
token: null,
players: [],
tournament: null,
},
tournamentOptions: {
gameAddress: null,
timeout: 100,
numberOfGames: 50,
type: 'DoubleElimination',
autoPlay: false
},
update: 0, // since we are not using immutable data structures (yet), bump this when making a deep change
activePlayers: [],
activePlayersDrop: false,
connectedPlayersDrop: false,
showTournament: true,
};
}
componentDidMount() {
this.props.socket.socket.on('connected', data => {
const lobby = data.lobby;
if (lobby.token !== this.state.lobby.token) {
return;
}
let activePlayers = this.state.activePlayers;
if (this.state.lobby.players.length === this.state.activePlayers.length) {
activePlayers = lobby.players.slice();
}
console.log('connected', lobby);
this.setState({
lobby, activePlayers
});
});
this.props.socket.socket.on('lobby disconnected', data => {
const lobby = data.payload.lobby;
if (lobby.token !== this.state.lobby.token) {
return;
}
console.log('lobby disconnected', lobby);
this.setState({
lobby,
});
});
this.props.socket.emit('lobby join', {
token: this.token(),
spectating: true,
});
this.props.socket.socket.on('lobby joined', data => {
const {lobby, isAdmin} = data;
this.setState({
admin: isAdmin,
lobby,
showTournament: true,
});
});
this.props.socket.socket.on("GameList", data => {
this.setState({availableGames: data});
});
this.props.socket.socket.on('lobby tournament started', data => {
if (!data.tournament) {
return;
}
let newLobby = Object.assign({}, this.state.lobby);
newLobby.tournament = data.tournament;
console.log('lobby tournament started', newLobby);
this.setState({lobby: newLobby});
});
this.props.socket.socket.on('lobby tournament continued', data => {
if (!data.tournament) {
return;
}
let newLobby = Object.assign({}, this.state.lobby);
newLobby.tournament = data.tournament;
console.log('lobby tournament continued', newLobby);
this.setState({lobby: newLobby});
});
this.props.socket.socket.on('lobby player disconnected', data => {
if (!data.lobby) {
return;
}
console.log('lobby player disconnected', data.lobby);
this.setState({
lobby: data.lobby,
});
this.ensureActivePlayersConnected();
});
this.props.socket.socket.on('lobby player kicked', data => {
if (!data.lobby) {
return;
}
console.log('lobby player kicked', data.lobby);
this.setState({
lobby: data.lobby,
});
this.ensureActivePlayersConnected();
});
this.props.socket.socket.on('lobby player banned', data => {
if (!data.lobby) {
return;
}
console.log('lobby player banned', data.lobby);
this.setState({
lobby: data.lobby,
});
this.ensureActivePlayersConnected();
});
this.props.socket.socket.on('tournament stats', data => {
const lobby = this.state.lobby;
if (lobby.tournament && data) {
lobby.tournament = data;
console.log('tournament stats', lobby);
this.setState({
lobby,
update: this.state.update + 1,
});
}
});
}
startTournament = () => {
this.props.socket.socket.emit('lobby tournament start', {
token: this.state.lobby.token,
options: this.state.tournamentOptions,
players: this.state.activePlayers.map(p => p.token)
});
this.setState({showTournament: true});
};
token = () => this.props.match.params.name;
updateOption = (field) => (event, data) => {
const updatedOptions = this.state.tournamentOptions;
updatedOptions[field] = data.value;
this.setState({
tournamentOptions: updatedOptions,
update: this.state.update + 1,
});
};
updateTypeOption = (event, data) => {
const updatedOptions = this.state.tournamentOptions;
updatedOptions.type = data.value;
updatedOptions.autoPlay = data.value === 'FreeForAll';
this.setState({
tournamentOptions: updatedOptions,
update: this.state.update + 1,
});
};
updateCheckedOption = (field) => (event, data) => {
const updatedOptions = this.state.tournamentOptions;
updatedOptions[field] = data.checked;
this.setState({
tournamentOptions: updatedOptions,
update: this.state.update + 1,
});
};
kickPlayer = (token) => {
this.props.socket.socket.emit('lobby player kick', {
lobbyToken: this.state.lobby.token,
playerToken: token
});
this.removeActivePlayer(token);
};
banPlayer = (token) => {
this.props.socket.socket.emit('lobby player ban', {
lobbyToken: this.state.lobby.token,
playerToken: token
});
this.removeActivePlayer(token);
};
ensureActivePlayersConnected = () => {
const activePlayers = [...this.state.activePlayers];
this.setState({
activePlayers: activePlayers.filter(activePlayer => this.state.lobby.players.indexOf(activePlayer) !== -1 ),
});
}
addActivePlayer = (token) => {
const activePlayers = [...this.state.activePlayers];
if (!activePlayers.find(player => player === token)) {
const player = this.state.lobby.players.find(player => player === token);
if (player) {
activePlayers.push(player);
this.setState({
activePlayers,
});
}
}
}
removeActivePlayer = (token) => {
const index = this.state.activePlayers.indexOf(token);
if (index > -1) {
const activePlayers = [...this.state.activePlayers];
activePlayers.splice(index, 1);
this.setState({
activePlayers,
});
}
};
onDragPlayerStart = (token, e) => {
e.dataTransfer.setData("text/plain", token);
e.dataTransfer.effectAllowed = 'move';
};
onDragPlayerDrop = (e, type) => {
e.preventDefault();
const token = e.dataTransfer.getData("text");
if (type === 'active') {
this.addActivePlayer(token);
} else {
this.removeActivePlayer(token);
}
this.setState({
activePlayersDrop: false,
connectedPlayersDrop: false,
});
};
onDragPlayerMouseMove = (e, type, playersDrop) => {
e.preventDefault();
const key = type + 'PlayersDrop';
this.setState({
[key]: playersDrop,
});
};
onDragPlayerOver = (e, type) => {
e.preventDefault();
};
backToLobby = () => {
this.setState({showTournament: false});
};
continueMatches = () => {
this.props.socket.socket.emit('lobby tournament continue', {
token: this.state.lobby.token
});
};
renderLoader = () => {
if (this.state.admin) {
return null;
}
return (
<div style={ { textAlign: 'center', color: '#999' } }>
<Loader
inline
active
content='Waiting for game to start...'
/>
</div>
);
};
renderAdmin = () => {
if (!this.state.admin) {
return null;
}
const availableGames = this.state.availableGames.map(game => {
return {
text: `${!game.healthy ? '[UNHEALTHY] ' : '' }${game.info.name}`,
value: game.address,
title: `${game.address}`,
icon: game.healthy ? 'green circle' : 'yellow warning sign',
disabled: !game.healthy,
}
});
const tournamentModes = [
{
text: 'Free For All',
value: 'FreeForAll',
title: 'Everyone plays everyone else',
},
{
text: 'Double Elimination',
value: 'DoubleElimination',
title: 'League Mode, a player gets kicked out when losing two games',
},
];
const title = (this.state.lobby.players.length < 2 || this.invalidGameServerSelected()) ? 'Atleast two players + healthy game server connection required' : 'Start the match';
return (
<Grid columns={ 1 }>
<Grid.Row>
<Grid.Column>
<h3>Tournament Settings:</h3>
<Form size='small'>
<Form.Select
label='Game'
options={ availableGames }
className={ this.invalidGameServerSelected() ? 'error' : '' }
value={ this.state.tournamentOptions.gameAddress }
onChange={ this.updateOption('gameAddress') }
/>
<Form.Group widths='equal'>
<Form.Input
label='Timeout (Per Move, in ms)'
type='number'
placeholder='100'
value={ this.state.tournamentOptions.timeout }
onChange={ this.updateOption('timeout') }
/>
<Form.Input
label='Number of Games per Match'
type='number'
placeholder='10'
value={ this.state.tournamentOptions.numberOfGames }
onChange={ this.updateOption('numberOfGames') }
/>
</Form.Group>
<Form.Select
label='Tournament Type'
options={ tournamentModes }
value={ this.state.tournamentOptions.type }
onChange={ this.updateTypeOption }
/>
<Form.Checkbox
label='Automatically play next set of games'
checked={ this.state.tournamentOptions.autoPlay }
onChange={ this.updateCheckedOption('autoPlay') }
/>
<Button
primary
icon='play'
title={ title }
disabled={ this.state.activePlayers.length < 2 || this.invalidGameServerSelected() }
content='Start Game'
onClick={ this.startTournament }
/>
</Form>
</Grid.Column>
</Grid.Row>
</Grid>
);
};
renderJoinCommand = () => {
const connectStyle = {
margin: '1em -1em 0',
borderTop: '1px solid #efefef',
padding: '1em 1em 0',
fontSize: '0.9em',
};
const host = this.props.socket.socket.io.uri;
return (
<div style={ connectStyle }>
<p>Connect your player:</p>
<pre className='code'>$ uabc --host "{host}" --lobby "{this.token()}" --token "your team name" -f "path/to/executable"</pre>
</div>
);
};
addAllConnectedPlayers = () => {
this.setState({
activePlayers: this.state.lobby.players,
});
};
invalidGameServerSelected = () => {
const currentGameAddress = this.state.tournamentOptions.gameAddress
const currentGame = this.state.availableGames.find(game => game.address === currentGameAddress )
return currentGameAddress === undefined || currentGameAddress === null || currentGameAddress.length === 0
|| currentGame === undefined || currentGame.healthy === false;
};
renderPlayers = ({titleText, type, dropText, infoText, displayAddAll}) => {
const footerStyle = {
position: 'absolute',
bottom: 0,
left: 0,
padding: '0.3em',
width: '100%',
textAlign: 'center',
background: '#efefef',
fontSize: '0.7em',
};
const players = type === 'connected' ? this.state.lobby.players : this.state.activePlayers;
players.sort();
const playerDropKey = type + 'PlayersDrop';
let addAll = (
<div style={ footerStyle }>
<a href={ window.location }><Icon name='copy outline' /> { this.token() }</a>
</div>
);
if (displayAddAll) {
addAll = (
<div style={ footerStyle }>
<button className="link" onClick={ this.addAllConnectedPlayers }>
<Icon name='plus' /> Add All
</button>
</div>
);
}
return (
<div style={ { paddingBottom: '2em', height: 'calc(100% - 2em)' } }>
<Popup trigger={<p>{titleText} <Label size='mini' style={ { float: 'right' } }>{ players.length }</Label></p>} content={infoText} />
<div onDrop={(e) => this.onDragPlayerDrop(e, type)} onDragOver={this.onDragPlayerOver} onDragEnter={(e) => this.onDragPlayerMouseMove(e, type, true)} onDragLeave={(e) => this.onDragPlayerMouseMove(e, type, false)}
style={{height: '100%', position: 'relative', background: this.state[playerDropKey] && '#efefef', borderRadius: this.state[playerDropKey] && '0.28571429rem'}}>
{
!this.state[playerDropKey] &&
<List className='draggable relaxed divided'>
{ players.map(player => {
const isActive = this.state.activePlayers.indexOf(player) > -1;
return (
<List.Item key={ player } draggable className={ classNames({ inactive: !isActive }) } onDragStart={(e) => this.onDragPlayerStart(player, e)}>
<Icon name='circle' className={ classNames({ outline: !isActive }) } color='green' style={{display: 'inline-block', marginRight: '1rem'}}/>
{ player }
<Dropdown style={{float: 'right'}}>
<Dropdown.Menu>
<Dropdown.Item text="Kick player" onClick={() => this.kickPlayer(player)}/>
<Dropdown.Item text="Ban player" onClick={() => this.banPlayer(player)}/>
{ !isActive && (<Dropdown.Item text="Add player" onClick={() => this.addActivePlayer(player)}/>) }
{ isActive && (<Dropdown.Item text="Remove player" onClick={() => this.removeActivePlayer(player)}/>) }
</Dropdown.Menu>
</Dropdown>
</List.Item>
);
}) }
</List>
}
{
this.state[playerDropKey] &&
<p style={{position: 'absolute', top: '50%', transform: 'translateY(-50%)', width: '100%', textAlign: 'center'}}>{dropText}</p>
}
</div>
{ addAll }
</div>
);
};
render() {
if (!this.props.socket) {
return (
<Message>
Please connect to the server first.
</Message>
);
}
if (this.state.lobby.tournament && this.state.showTournament) {
return (
<Tournament
tournamentOptions={ this.state.tournamentOptions }
tournament={ this.state.lobby.tournament }
backToLobby={this.backToLobby}
continueMatches={this.continueMatches}
/>
);
}
return (
<Container textAlign='center' fluid style={{width: '80%'}}>
<Segment attached='top' className='socialgorithm-hue-bg animated-hue'>
<h1><Icon name='game' /> Welcome to { this.state.lobby.token }!</h1>
</Segment>
<Segment attached='bottom' textAlign='left'>
<Grid columns={ 3 } divided>
<Grid.Column width={ 3 }>
{ this.renderPlayers({titleText: 'Connected Players', type: 'connected', dropText: 'Exclude player from game', infoText: 'Players connected to the lobby', displayAddAll: true}) }
</Grid.Column>
<Grid.Column width={ 3 }>
{ this.renderPlayers({titleText: 'Players', type: 'active', dropText: 'Include player in game', infoText: 'Players to be included in the tournament'}) }
</Grid.Column>
<Grid.Column width={ 10 }>
{ this.renderLoader() }
{ this.renderAdmin() }
{ this.renderJoinCommand() }
</Grid.Column>
</Grid>
</Segment>
</Container>
);
}
};
export default withRouter(LobbyAdmin);
|
src/js/views/devices/detail.js
|
mmagr/gui
|
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { PageHeader, ActionHeader } from "../../containers/full/PageHeader";
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import { Link, hashHistory } from 'react-router'
import alt from '../../alt';
import AltContainer from 'alt-container';
import MeasureStore from '../../stores/MeasureStore';
import MeasureActions from '../../actions/MeasureActions';
import DeviceActions from '../../actions/DeviceActions';
import DeviceStore from '../../stores/DeviceStore';
import deviceManager from '../../comms/devices/DeviceManager';
import util from "../../comms/util/util";
import { Line } from 'react-chartjs-2';
import { Map, Marker, Popup, TileLayer } from 'react-leaflet';
// TODO make this its own component
class RemoveDialog extends Component {
constructor(props) {
super(props);
this.dismiss = this.dismiss.bind(this);
this.remove = this.remove.bind(this);
}
componentDidMount() {
// materialize jquery makes me sad
let modalElement = ReactDOM.findDOMNode(this.refs.modal);
$(modalElement).ready(function() {
$('.modal').modal();
})
}
dismiss(event) {
event.preventDefault();
let modalElement = ReactDOM.findDOMNode(this.refs.modal);
$(modalElement).modal('close');
}
remove(event) {
event.preventDefault();
let modalElement = ReactDOM.findDOMNode(this.refs.modal);
this.props.callback(event);
$(modalElement).modal('close');
}
render() {
return (
<div className="modal" id={this.props.target} ref="modal">
<div className="modal-content full">
<div className="row center background-info">
<div><i className="fa fa-exclamation-triangle fa-4x" /></div>
<div>You are about to remove this device.</div>
<div>Are you sure?</div>
</div>
</div>
<div className="modal-footer right">
<button type="button" className="btn-flat btn-ciano waves-effect waves-light" onClick={this.dismiss}>cancel</button>
<button type="submit" className="btn-flat btn-red waves-effect waves-light" onClick={this.remove}>remove</button>
</div>
</div>
)
}
}
class DeviceUserActions extends Component {
render() {
return (
<div>
<a className="waves-effect waves-light btn-flat btn-ciano" tabIndex="-1" title="Get code">
<i className="clickable fa fa-code"/>
</a>
<Link to={"/device/list?detail=" + this.props.deviceid} className="waves-effect waves-light btn-flat btn-ciano" tabIndex="-1" title="Hide all details">
<i className="clickable fa fa-compress" />
</Link>
<Link to={"/device/id/" + this.props.deviceid + "/edit"} className="waves-effect waves-light btn-flat btn-ciano" tabIndex="-1" title="Edit device">
<i className="clickable fa fa-pencil" />
</Link>
<a className="waves-effect waves-light btn-flat btn-ciano" tabIndex="-1" title="Remove device"
onClick={(e) => {e.preventDefault(); $('#' + this.props.confirmTarget).modal('open');}}>
<i className="clickable fa fa-trash"/>
</a>
<Link to={"/device/list"} className="waves-effect waves-light btn-flat btn-ciano" tabIndex="-1" title="Return to device list">
<i className="clickable fa fa-times" />
</Link>
</div>
)
}
}
// TODO move this to its own component
class Graph extends Component{
constructor(props) {
super(props);
}
render() {
let labels = [];
let values = [];
function getValue(tuple) {
let val_type = typeof tuple.attrValue;
if (val_type == "string" && tuple.attrType != "string") {
if (tuple.attrValue.trim().length > 0) {
if (tuple.attrType.toLowerCase() == 'integer') {
return parseInt(tuple.attrValue);
} else if (tuple.attrType.toLowerCase() == 'float'){
return parseFloat(tuple.attrValue);
}
}
} else if (val_type == "number") {
return tuple.attrValue;
}
return undefined;
}
this.props.data.map((i) => {
let value = getValue(i);
if (value !== undefined) {
labels.push(util.printTime(Date.parse(i.recvTime)/1000));
values.push(value);
}
})
if (values.length == 0) {
return (
<div className="valign-wrapper full-height background-info">
<div className="full-width center">No data available</div>
</div>
)
}
let filteredLabels = labels.map((i,k) => {
if ((k == 0) || (k == values.length - 1)) {
return i;
} else {
return "";
}
})
const data = {
labels: labels,
xLabels: filteredLabels,
datasets: [
{
label: 'Device data',
fill: false,
lineTension: 0.1,
backgroundColor: 'rgba(75,192,192,0.4)',
borderColor: 'rgba(75,192,192,1)',
borderCapStyle: 'butt',
borderDash: [],
borderDashOffset: 0.0,
borderJoinStyle: 'miter',
pointBorderColor: 'rgba(75,192,192,1)',
pointBackgroundColor: '#fff',
pointBorderWidth: 1,
pointHoverRadius: 5,
pointHoverBackgroundColor: 'rgba(75,192,192,1)',
pointHoverBorderColor: 'rgba(220,220,220,1)',
pointHoverBorderWidth: 2,
pointRadius: 1,
pointHitRadius: 10,
data: values
}
]
}
const options = {
maintainAspectRatio: false,
legend: { display: false },
scales: {
xAxes: [
{ display: false },
{ ticks: { autoSkip: true, maxRotation: 0, minRotation: 0 }}
],
}
}
return (
<Line data={data} options={options}/>
)
}
}
// TODO move this to its own component
class PositionRenderer extends Component {
render() {
function NoData() {
return (
<div className="full-height valign-wrapper background-info subtle relative graph">
<div className="horizontal-center">
<i className="material-icons">report_problem</i>
<div>No position data available</div>
</div>
</div>
)
}
if ((this.props.value === undefined) || (this.props.value.attrValue == null)) {
return (<NoData />);
}
let pos = this.props.value.attrValue;
let parsed = pos.match(/^([+-]?\d+(\.\d+)?)\s*[,]\s*([+-]?\d+(\.\d+)?)$/)
if (parsed == null) {
return (<NoData />)
}
const position = [parseFloat(parsed[1]),parseFloat(parsed[3])];
return (
<div className="map full-height">
<Map center={position} zoom={19}>
<TileLayer
url='http://{s}.tile.osm.org/{z}/{x}/{y}.png'
attribution='© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
/>
<Marker position={position}></Marker>
</Map>
</div>
)
}
}
// TODO move this to its own component
class Position extends Component {
constructor(props) {
super(props);
}
render () {
let value = undefined;
if (this.props.data.length > 0) {
value = this.props.data[this.props.data.length - 1];
}
return (
<PositionRenderer deviceId={this.props.device.id} value={value}/>
)
}
}
// TODO move this to its own component
function HistoryList(props) {
let trimmedList = props.data.filter((i) => {
return i.attrValue.trim().length > 0
})
trimmedList.reverse();
if (trimmedList.length > 0) {
return (
<div className="full-height scrollable history-list">
{trimmedList.map((i,k) =>
<div className={"row " + (k % 2 ? "alt-row" : "")} key={i.recvTime}>
<div className="col s12 value">{i.attrValue}</div>
<div className="col s12 label">{util.printTime(Date.parse(i.recvTime)/1000)}</div>
</div>
)}
</div>
)
} else {
return (
<div className="full-height background-info valign-wrapper center">
<div className="center full-width">No data available</div>
</div>
)
}
}
// TODO move this to its own component
function Attr(props) {
const known = {
'integer': Graph,
'float': Graph,
'string': HistoryList,
'geo:point': Position,
'default': HistoryList
}
const Renderer = props.type in known ? known[props.type] : known['default'];
return (
<Renderer {...props} />
)
}
class DetailAttrs extends Component {
constructor(props) {
super(props);
}
componentDidMount() {
this.props.device.attrs.map((i) => {
MeasureActions.fetchMeasures.defer(this.props.device.id, this.props.device.protocol, i);
})
}
render() {
const device = this.props.device;
let filteredStatics = this.props.device.static_attrs.filter((a) => { return (a.type.toLowerCase() != "geo:point")});
function AttrList(props) {
return (
<span>
{ device.attrs.map((i, k) =>
<div className={"col s12 m6 l6 metric-card full-height mt10"} key={i.object_id} >
{(props.devices[device.id] && props.devices[device.id][i.name] &&
(props.devices[device.id][i.name].loading == false)) ? (
<div className="graphLarge z-depth-2 full-height">
<div className="title ">
<span>{i.name}</span>
<span className="right"
onClick={() => MeasureActions.fetchMeasures(device.id, device.protocol, i)}>
<i className="fa fa-refresh" />
</span>
</div>
<div className="contents no-padding">
<Attr device={device} type={props.devices[device.id][i.name].type} data={props.devices[device.id][i.name].data}/>
</div>
</div>
) : (
<div className="graphLarge z-depth-2 full-height">
<span className="title">{i.name}</span>
<div className="contents">
<div className="background-info valign-wrapper full-height relative bg-gray">
<i className="fa fa-circle-o-notch fa-spin fa-fw horizontal-center"/>
</div>
</div>
</div>
)}
</div>
)}
</span>
)
}
if (filteredStatics.length > 0) {
return (
<span>
<div className="row">
{filteredStatics.map((i, k) =>
(i.type.toLowerCase() != "geo:point") && (
<div className="col s12 m3 l3">
<div className="card z-depth-2">
<div className="card-content row">
<div className="col s12 main">
<div className="value title">{i.name}</div>
<div className="label">Name</div>
</div>
<div className="col s12">
<div className="value">{i.value}</div>
<div className="label">Value</div>
</div>
</div>
</div>
</div>
)
)}
</div>
<AttrList devices={this.props.devices} />
</span>
)
} else {
return (
<div className="row half-height">
<AttrList devices={this.props.devices} />
</div>
)
}
}
}
function TagList (props) {
const tags = props.tags;
return (
<span>
{ (tags.length > 0) ? (
tags.map((tag) =>
<span className="tag" key={tag}>
<i className="fa fa-tag"></i>{tag}
</span>
)
) : (
<sapn className="tag">No tags set</sapn>
)}
</span>
)
}
class DeviceDetail extends Component {
render() {
if (this.props.deviceid == null || !this.props.devices.hasOwnProperty(this.props.deviceid)) {
console.error('Failed to load device attribute data', this.props.deviceid, this.props.devices);
return (
// TODO This appears so many times it might be worth making it a component on its own
<div className="background-info valign-wrapper full-height relative bg-gray">
<i className="fa fa-circle-o-notch fa-spin fa-fw horizontal-center"/>
</div>
)
}
const device = this.props.devices[this.props.deviceid];
if (device.loading) {
return (
// TODO This appears so many times it might be worth making it a component on its own
<div className="background-info valign-wrapper full-height relative bg-gray">
<i className="fa fa-circle-o-notch fa-spin fa-fw horizontal-center"/>
</div>
)
}
let position = null;
function getPosition(i) {
if (i.type == "geo:point") {
position = i;
}
}
device.static_attrs.map((i) => {getPosition(i)})
if (position === null) {
device.attrs.map((i) => {getPosition(i)})
}
return (
<div className={"lst-entry-wrapper col s12 auto-height " + device._status}>
<div className="row detail-header">
<div className="title">
<div className="label">{device.label}</div>
<div className="id">ID {device.id}</div>
</div>
</div>
<div className="row device">
<div className="row detail-header">
<div className="col s12 m10 offset-m1 valign-wrapper">
<div className="col s3">
{/* TODO clickable, file upload */}
<div className="img">
<img src="images/ciShadow.svg" />
</div>
</div>
<div className="col s9 detail-body-full-view">
<div className="metrics col s9">
<div className="metric fullPage col s4">
<span className="label">Attributes</span>
<span className="value">{device.attrs.length + device.static_attrs.length}</span>
</div>
<div className="metric fullPage col s4">
<span className="label">Last update</span>
<span className="value">{util.printTime(device.updated)}</span>
</div>
<div className="metric fullPage ol s4">
<span className="label">Status</span>
<span className="value">{device._status}</span>
</div>
</div>
<div className="metrics col s9">
<div className="metric fullPage col s4" >
<span className="label">Protocol</span>
<span className="value">{device.protocol ? device.protocol : "MQTT"}</span>
</div>
<div className="metric fullPage col s8" >
<span className="label">Tags</span>
<TagList tags={device.tags} />
</div>
</div>
</div>
</div>
</div>
<div className="col s12 detail-attributes-full-view" >
<div className="title col s12 paddingTop10">Attributes</div>
<AltContainer store={MeasureStore} inject={{device: device}} >
<DetailAttrs />
</AltContainer>
</div>
</div>
</div>
)
}
}
class ViewDevice extends Component {
constructor(props) {
super(props);
this.remove = this.remove.bind(this);
}
componentDidMount() {
function loadValues(device) {
device.attrs.map((i) => {
MeasureActions.fetchMeasures.defer(device.id, device.protocol, i);
})
}
DeviceActions.fetchSingle.defer(this.props.params.device, loadValues);
}
remove(e) {
// This should be on DeviceUserActions -
// this is not good, but will have to make do because of z-index on the action header
e.preventDefault();
DeviceActions.triggerRemoval({id: this.props.params.device}, (device) => {
hashHistory.push('/device/list');
Materialize.toast('Device removed', 4000);
});
}
render() {
let title = "View device";
return (
<div className="full-width full-height">
<ReactCSSTransitionGroup
transitionName="first"
transitionAppear={true} transitionAppearTimeout={500}
transitionEnterTimeout={500} transitionLeaveTimeout={500} >
<PageHeader title="device manager" subtitle="Devices" />
<ActionHeader title={title}>
<DeviceUserActions deviceid={this.props.params.device} confirmTarget="confirmDiag"/>
</ActionHeader>
<AltContainer store={DeviceStore} >
<DeviceDetail deviceid={this.props.params.device}/>
</AltContainer>
<RemoveDialog callback={this.remove} target="confirmDiag" />
</ReactCSSTransitionGroup>
</div>
)
}
}
export { ViewDevice };
|
app/jsx/StudentInCourse/StudentInCourseView.js
|
instructure/analytics
|
import React from 'react'
import $ from 'jquery'
import _ from 'underscore'
import Backbone from '@canvas/backbone'
import template from '../../views/jst/student_in_course.handlebars'
import avatarPartial from '@canvas/avatar/jst/_avatar.handlebars'
import PageViews from '../graphs/page_views'
import Responsiveness from '../graphs/responsiveness'
import AssignmentTardiness from '../graphs/assignment_tardiness'
import Grades from '../graphs/grades'
import colors from '../graphs/colors'
import StudentComboBox from '../StudentInCourse/StudentComboBox'
import { useScope as useI18nScope } from '@canvas/i18n';
import util from '../graphs/util'
import ActivitiesTable from '../components/ActivitiesTable'
import StudentSubmissionsTable from '../components/StudentSubmissionsTable'
import GradesTable from '../components/GradesTable'
import ResponsivenessTable from '../components/ResponsivenessTable'
import helpers from '../helpers'
const I18n = useI18nScope('student_in_course_view');
export default class StudentInCourseView extends Backbone.View {
initialize() {
super.initialize(...arguments)
const course = this.model.get('course')
const student = this.model.get('student')
const students = course.get('students')
// build view
this.$el = $(
template({
student: _.omit(student.toJSON(), 'html_url'),
course: course.toJSON()
})
)
// cache elements for updates
this.$crumb_span = $('#student_analytics_crumb span')
this.$crumb_link = $('#student_analytics_crumb a')
this.$student_link = this.$('.student_link')
this.$current_score = this.$('.current_score')
if (students.length > 1) {
// build combobox of student names to replace name element
this.comboBox = new StudentComboBox(this.model)
this.$('.students_box').html(this.comboBox.$el)
}
// setup the graph objects
this.setupGraphs()
// render now and any time the model changes or the window resizes
this.render()
this.afterRender()
this.model.on('change:student', () => {
this.render()
return this.afterRender()
})
return $(window).on(
'resize',
_.debounce(() => {
const newWidth = util.computeGraphWidth()
this.pageViews.resize({width: newWidth})
this.responsiveness.resize({width: newWidth})
this.assignmentTardiness.resize({width: newWidth})
this.grades.resize({width: newWidth})
this.render()
return this.afterRender()
}, 200)
)
}
formatTableData(table) {
let {data} = table
if (data.bins != null || data.assignments != null) {
data = data.bins ? data.bins : data.assignments
}
if (typeof table.format === 'function') {
data = data.map(item => table.format(item))
}
if (table.div === '#responsiveness-table') {
data = this.formatResponsivenessData(data)
}
if (typeof table.sort === 'function') {
data = data.sort(table.sort)
}
return data
}
renderTable(table) {
return React.render(
React.createFactory(table.component)({data: this.formatTableData(table), student: true}),
$(table.div)[0],
helpers.makePaginationAccessible.bind(null, table.div)
)
}
renderTables(tables = []) {
_.each(tables, table => {
if (table.data.loading != null) {
table.data.loading.done(() => this.renderTable(table))
} else {
this.renderTable(table)
}
})
}
// #
// This will get things into the proper format we need
// for the responsiveness table. It produces an array
// of objects in this format:
// {
// date: Date
// instructorMessages: Number
// studentMessages: Number
// }
formatResponsivenessData(data) {
const groups = _.groupBy(data, 'date')
return Object.keys(groups).map(key => ({
date: new Date(key),
instructorMessages: groups[key].filter(obj => obj.track === 'instructor').length,
studentMessages: groups[key].filter(obj => obj.track === 'student').length
}))
}
afterRender() {
// render the table versions of the graphs for a11y/KO
return this.renderTables([
{
div: '#participating-table',
component: ActivitiesTable,
data: this.model.get('student').get('participation'),
sort(a, b) {
return b.date - a.date
}
},
{
div: '#responsiveness-table',
component: ResponsivenessTable,
data: this.model.get('student').get('messaging'),
sort(a, b) {
return b.date - a.date
}
},
{
div: '#assignment-finishing-table',
component: StudentSubmissionsTable,
data: this.model.get('student').get('assignments'),
format(assignment) {
const formattedStatus = (() => {
switch (assignment.original.status) {
case 'late':
return I18n.t('Late')
case 'missing':
return I18n.t('Missing')
case 'on_time':
return I18n.t('On Time')
case 'floating':
return I18n.t('Future')
}
})()
return {
title: assignment.title,
dueAt: assignment.dueAt,
submittedAt: assignment.submittedAt,
status: formattedStatus,
score: assignment.studentScore
}
}
},
{
div: '#grades-table',
component: GradesTable,
data: this.model.get('student').get('assignments'),
format(assignment) {
const scoreType =
assignment.scoreDistribution != null
? assignment.studentScore >= assignment.scoreDistribution.median
? I18n.t('Good')
: assignment.studentScore >= assignment.scoreDistribution.firstQuartile
? I18n.t('Fair')
: I18n.t('Poor')
: I18n.t('Good')
return {
title: assignment.title,
min_score:
assignment.scoreDistribution != null
? assignment.scoreDistribution.minScore
: undefined,
median:
assignment.scoreDistribution != null
? assignment.scoreDistribution.median
: undefined,
max_score:
assignment.scoreDistribution != null
? assignment.scoreDistribution.maxScore
: undefined,
points_possible: assignment.pointsPossible,
student_score: assignment.studentScore,
score_type: scoreType,
percentile: {
min:
assignment.scoreDistribution != null
? assignment.scoreDistribution.firstQuartile
: undefined,
max:
assignment.scoreDistribution != null
? assignment.scoreDistribution.thirdQuartile
: undefined
}
}
}
}
])
}
// #
// TODO: I18n
render() {
let message_url
const course = this.model.get('course')
const student = this.model.get('student')
document.title = I18n.t('Analytics: %{course_code} -- %{student_name}', {
course_code: course.get('course_code'),
student_name: student.get('short_name')
})
this.$crumb_span.text(student.get('short_name'))
this.$crumb_link.attr({href: student.get('analytics_url')})
this.$('.avatar').replaceWith(avatarPartial(_.omit(student.toJSON(), 'html_url')))
this.$student_link.text(student.get('name'))
this.$student_link.attr({href: student.get('html_url')})
// hide message link unless url is present
if ((message_url = student.get('message_student_url'))) {
this.$('.message_student_link').show()
this.$('.message_student_link').attr({href: message_url})
} else {
this.$('.message_student_link').hide()
}
const current_score = student.get('current_score')
if (current_score !== null) {
this.$current_score.text(`${current_score}%`)
} else {
this.$current_score.text('N/A')
}
const participation = student.get('participation')
const messaging = student.get('messaging')
const assignments = student.get('assignments')
this.pageViews.graph(participation)
this.responsiveness.graph(messaging)
this.assignmentTardiness.graph(assignments)
return this.grades.graph(assignments)
}
// #
// Instantiate the graphs.
setupGraphs() {
// setup the graphs
const graphOpts = {
width: util.computeGraphWidth(),
frameColor: colors.frame,
gridColor: colors.grid,
horizontalMargin: 40
}
const dateGraphOpts = $.extend({}, graphOpts, {
startDate: this.options.startDate,
endDate: this.options.endDate,
leftPadding: 30, // larger padding on left because of assymetrical
rightPadding: 15
}) // responsiveness bubbles
this.pageViews = new PageViews(
this.$('#participating-graph'),
$.extend({}, dateGraphOpts, {
height: 150,
barColor: colors.lightblue,
participationColor: colors.darkblue
})
)
this.responsiveness = new Responsiveness(
this.$('#responsiveness-graph'),
$.extend({}, dateGraphOpts, {
height: 110,
verticalPadding: 4,
gutterHeight: 32,
markerWidth: 31,
caratOffset: 7,
caratSize: 10,
studentColor: colors.orange,
instructorColor: colors.blue
})
)
this.assignmentTardiness = new AssignmentTardiness(
this.$('#assignment-finishing-graph'),
$.extend({}, dateGraphOpts, {
height: 250,
colorOnTime: colors.sharpgreen,
colorLate: colors.sharpyellow,
colorMissing: colors.sharpred,
colorUndated: colors.frame
})
)
this.grades = new Grades(
this.$('#grades-graph'),
$.extend({}, graphOpts, {
height: 250,
whiskerColor: colors.frame,
boxColor: colors.grid,
medianColor: colors.frame,
colorGood: colors.sharpgreen,
colorFair: colors.sharpyellow,
colorPoor: colors.sharpred
})
)
}
}
|
node_modules/karma/node_modules/engine.io-client/engine.io.js
|
wunsmat/matts-project
|
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["eio"] = factory();
else
root["eio"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
module.exports = __webpack_require__(1);
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
module.exports = __webpack_require__(2);
/**
* Exports parser
*
* @api public
*
*/
module.exports.parser = __webpack_require__(9);
/***/ },
/* 2 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
/**
* Module dependencies.
*/
var transports = __webpack_require__(3);
var Emitter = __webpack_require__(19);
var debug = __webpack_require__(23)('engine.io-client:socket');
var index = __webpack_require__(30);
var parser = __webpack_require__(9);
var parseuri = __webpack_require__(31);
var parsejson = __webpack_require__(32);
var parseqs = __webpack_require__(20);
/**
* Module exports.
*/
module.exports = Socket;
/**
* Socket constructor.
*
* @param {String|Object} uri or options
* @param {Object} options
* @api public
*/
function Socket(uri, opts) {
if (!(this instanceof Socket)) return new Socket(uri, opts);
opts = opts || {};
if (uri && 'object' === (typeof uri === 'undefined' ? 'undefined' : _typeof(uri))) {
opts = uri;
uri = null;
}
if (uri) {
uri = parseuri(uri);
opts.hostname = uri.host;
opts.secure = uri.protocol === 'https' || uri.protocol === 'wss';
opts.port = uri.port;
if (uri.query) opts.query = uri.query;
} else if (opts.host) {
opts.hostname = parseuri(opts.host).host;
}
this.secure = null != opts.secure ? opts.secure : global.location && 'https:' === location.protocol;
if (opts.hostname && !opts.port) {
// if no port is specified manually, use the protocol default
opts.port = this.secure ? '443' : '80';
}
this.agent = opts.agent || false;
this.hostname = opts.hostname || (global.location ? location.hostname : 'localhost');
this.port = opts.port || (global.location && location.port ? location.port : this.secure ? 443 : 80);
this.query = opts.query || {};
if ('string' === typeof this.query) this.query = parseqs.decode(this.query);
this.upgrade = false !== opts.upgrade;
this.path = (opts.path || '/engine.io').replace(/\/$/, '') + '/';
this.forceJSONP = !!opts.forceJSONP;
this.jsonp = false !== opts.jsonp;
this.forceBase64 = !!opts.forceBase64;
this.enablesXDR = !!opts.enablesXDR;
this.timestampParam = opts.timestampParam || 't';
this.timestampRequests = opts.timestampRequests;
this.transports = opts.transports || ['polling', 'websocket'];
this.readyState = '';
this.writeBuffer = [];
this.prevBufferLen = 0;
this.policyPort = opts.policyPort || 843;
this.rememberUpgrade = opts.rememberUpgrade || false;
this.binaryType = null;
this.onlyBinaryUpgrades = opts.onlyBinaryUpgrades;
this.perMessageDeflate = false !== opts.perMessageDeflate ? opts.perMessageDeflate || {} : false;
if (true === this.perMessageDeflate) this.perMessageDeflate = {};
if (this.perMessageDeflate && null == this.perMessageDeflate.threshold) {
this.perMessageDeflate.threshold = 1024;
}
// SSL options for Node.js client
this.pfx = opts.pfx || null;
this.key = opts.key || null;
this.passphrase = opts.passphrase || null;
this.cert = opts.cert || null;
this.ca = opts.ca || null;
this.ciphers = opts.ciphers || null;
this.rejectUnauthorized = opts.rejectUnauthorized === undefined ? null : opts.rejectUnauthorized;
this.forceNode = !!opts.forceNode;
// other options for Node.js client
var freeGlobal = (typeof global === 'undefined' ? 'undefined' : _typeof(global)) === 'object' && global;
if (freeGlobal.global === freeGlobal) {
if (opts.extraHeaders && Object.keys(opts.extraHeaders).length > 0) {
this.extraHeaders = opts.extraHeaders;
}
if (opts.localAddress) {
this.localAddress = opts.localAddress;
}
}
// set on handshake
this.id = null;
this.upgrades = null;
this.pingInterval = null;
this.pingTimeout = null;
// set on heartbeat
this.pingIntervalTimer = null;
this.pingTimeoutTimer = null;
this.open();
}
Socket.priorWebsocketSuccess = false;
/**
* Mix in `Emitter`.
*/
Emitter(Socket.prototype);
/**
* Protocol version.
*
* @api public
*/
Socket.protocol = parser.protocol; // this is an int
/**
* Expose deps for legacy compatibility
* and standalone browser access.
*/
Socket.Socket = Socket;
Socket.Transport = __webpack_require__(8);
Socket.transports = __webpack_require__(3);
Socket.parser = __webpack_require__(9);
/**
* Creates transport of the given type.
*
* @param {String} transport name
* @return {Transport}
* @api private
*/
Socket.prototype.createTransport = function (name) {
debug('creating transport "%s"', name);
var query = clone(this.query);
// append engine.io protocol identifier
query.EIO = parser.protocol;
// transport name
query.transport = name;
// session id if we already have one
if (this.id) query.sid = this.id;
var transport = new transports[name]({
agent: this.agent,
hostname: this.hostname,
port: this.port,
secure: this.secure,
path: this.path,
query: query,
forceJSONP: this.forceJSONP,
jsonp: this.jsonp,
forceBase64: this.forceBase64,
enablesXDR: this.enablesXDR,
timestampRequests: this.timestampRequests,
timestampParam: this.timestampParam,
policyPort: this.policyPort,
socket: this,
pfx: this.pfx,
key: this.key,
passphrase: this.passphrase,
cert: this.cert,
ca: this.ca,
ciphers: this.ciphers,
rejectUnauthorized: this.rejectUnauthorized,
perMessageDeflate: this.perMessageDeflate,
extraHeaders: this.extraHeaders,
forceNode: this.forceNode,
localAddress: this.localAddress
});
return transport;
};
function clone(obj) {
var o = {};
for (var i in obj) {
if (obj.hasOwnProperty(i)) {
o[i] = obj[i];
}
}
return o;
}
/**
* Initializes transport to use and starts probe.
*
* @api private
*/
Socket.prototype.open = function () {
var transport;
if (this.rememberUpgrade && Socket.priorWebsocketSuccess && this.transports.indexOf('websocket') !== -1) {
transport = 'websocket';
} else if (0 === this.transports.length) {
// Emit error on next tick so it can be listened to
var self = this;
setTimeout(function () {
self.emit('error', 'No transports available');
}, 0);
return;
} else {
transport = this.transports[0];
}
this.readyState = 'opening';
// Retry with the next transport if the transport is disabled (jsonp: false)
try {
transport = this.createTransport(transport);
} catch (e) {
this.transports.shift();
this.open();
return;
}
transport.open();
this.setTransport(transport);
};
/**
* Sets the current transport. Disables the existing one (if any).
*
* @api private
*/
Socket.prototype.setTransport = function (transport) {
debug('setting transport %s', transport.name);
var self = this;
if (this.transport) {
debug('clearing existing transport %s', this.transport.name);
this.transport.removeAllListeners();
}
// set up transport
this.transport = transport;
// set up transport listeners
transport.on('drain', function () {
self.onDrain();
}).on('packet', function (packet) {
self.onPacket(packet);
}).on('error', function (e) {
self.onError(e);
}).on('close', function () {
self.onClose('transport close');
});
};
/**
* Probes a transport.
*
* @param {String} transport name
* @api private
*/
Socket.prototype.probe = function (name) {
debug('probing transport "%s"', name);
var transport = this.createTransport(name, { probe: 1 });
var failed = false;
var self = this;
Socket.priorWebsocketSuccess = false;
function onTransportOpen() {
if (self.onlyBinaryUpgrades) {
var upgradeLosesBinary = !this.supportsBinary && self.transport.supportsBinary;
failed = failed || upgradeLosesBinary;
}
if (failed) return;
debug('probe transport "%s" opened', name);
transport.send([{ type: 'ping', data: 'probe' }]);
transport.once('packet', function (msg) {
if (failed) return;
if ('pong' === msg.type && 'probe' === msg.data) {
debug('probe transport "%s" pong', name);
self.upgrading = true;
self.emit('upgrading', transport);
if (!transport) return;
Socket.priorWebsocketSuccess = 'websocket' === transport.name;
debug('pausing current transport "%s"', self.transport.name);
self.transport.pause(function () {
if (failed) return;
if ('closed' === self.readyState) return;
debug('changing transport and sending upgrade packet');
cleanup();
self.setTransport(transport);
transport.send([{ type: 'upgrade' }]);
self.emit('upgrade', transport);
transport = null;
self.upgrading = false;
self.flush();
});
} else {
debug('probe transport "%s" failed', name);
var err = new Error('probe error');
err.transport = transport.name;
self.emit('upgradeError', err);
}
});
}
function freezeTransport() {
if (failed) return;
// Any callback called by transport should be ignored since now
failed = true;
cleanup();
transport.close();
transport = null;
}
// Handle any error that happens while probing
function onerror(err) {
var error = new Error('probe error: ' + err);
error.transport = transport.name;
freezeTransport();
debug('probe transport "%s" failed because of error: %s', name, err);
self.emit('upgradeError', error);
}
function onTransportClose() {
onerror('transport closed');
}
// When the socket is closed while we're probing
function onclose() {
onerror('socket closed');
}
// When the socket is upgraded while we're probing
function onupgrade(to) {
if (transport && to.name !== transport.name) {
debug('"%s" works - aborting "%s"', to.name, transport.name);
freezeTransport();
}
}
// Remove all listeners on the transport and on self
function cleanup() {
transport.removeListener('open', onTransportOpen);
transport.removeListener('error', onerror);
transport.removeListener('close', onTransportClose);
self.removeListener('close', onclose);
self.removeListener('upgrading', onupgrade);
}
transport.once('open', onTransportOpen);
transport.once('error', onerror);
transport.once('close', onTransportClose);
this.once('close', onclose);
this.once('upgrading', onupgrade);
transport.open();
};
/**
* Called when connection is deemed open.
*
* @api public
*/
Socket.prototype.onOpen = function () {
debug('socket open');
this.readyState = 'open';
Socket.priorWebsocketSuccess = 'websocket' === this.transport.name;
this.emit('open');
this.flush();
// we check for `readyState` in case an `open`
// listener already closed the socket
if ('open' === this.readyState && this.upgrade && this.transport.pause) {
debug('starting upgrade probes');
for (var i = 0, l = this.upgrades.length; i < l; i++) {
this.probe(this.upgrades[i]);
}
}
};
/**
* Handles a packet.
*
* @api private
*/
Socket.prototype.onPacket = function (packet) {
if ('opening' === this.readyState || 'open' === this.readyState || 'closing' === this.readyState) {
debug('socket receive: type "%s", data "%s"', packet.type, packet.data);
this.emit('packet', packet);
// Socket is live - any packet counts
this.emit('heartbeat');
switch (packet.type) {
case 'open':
this.onHandshake(parsejson(packet.data));
break;
case 'pong':
this.setPing();
this.emit('pong');
break;
case 'error':
var err = new Error('server error');
err.code = packet.data;
this.onError(err);
break;
case 'message':
this.emit('data', packet.data);
this.emit('message', packet.data);
break;
}
} else {
debug('packet received with socket readyState "%s"', this.readyState);
}
};
/**
* Called upon handshake completion.
*
* @param {Object} handshake obj
* @api private
*/
Socket.prototype.onHandshake = function (data) {
this.emit('handshake', data);
this.id = data.sid;
this.transport.query.sid = data.sid;
this.upgrades = this.filterUpgrades(data.upgrades);
this.pingInterval = data.pingInterval;
this.pingTimeout = data.pingTimeout;
this.onOpen();
// In case open handler closes socket
if ('closed' === this.readyState) return;
this.setPing();
// Prolong liveness of socket on heartbeat
this.removeListener('heartbeat', this.onHeartbeat);
this.on('heartbeat', this.onHeartbeat);
};
/**
* Resets ping timeout.
*
* @api private
*/
Socket.prototype.onHeartbeat = function (timeout) {
clearTimeout(this.pingTimeoutTimer);
var self = this;
self.pingTimeoutTimer = setTimeout(function () {
if ('closed' === self.readyState) return;
self.onClose('ping timeout');
}, timeout || self.pingInterval + self.pingTimeout);
};
/**
* Pings server every `this.pingInterval` and expects response
* within `this.pingTimeout` or closes connection.
*
* @api private
*/
Socket.prototype.setPing = function () {
var self = this;
clearTimeout(self.pingIntervalTimer);
self.pingIntervalTimer = setTimeout(function () {
debug('writing ping packet - expecting pong within %sms', self.pingTimeout);
self.ping();
self.onHeartbeat(self.pingTimeout);
}, self.pingInterval);
};
/**
* Sends a ping packet.
*
* @api private
*/
Socket.prototype.ping = function () {
var self = this;
this.sendPacket('ping', function () {
self.emit('ping');
});
};
/**
* Called on `drain` event
*
* @api private
*/
Socket.prototype.onDrain = function () {
this.writeBuffer.splice(0, this.prevBufferLen);
// setting prevBufferLen = 0 is very important
// for example, when upgrading, upgrade packet is sent over,
// and a nonzero prevBufferLen could cause problems on `drain`
this.prevBufferLen = 0;
if (0 === this.writeBuffer.length) {
this.emit('drain');
} else {
this.flush();
}
};
/**
* Flush write buffers.
*
* @api private
*/
Socket.prototype.flush = function () {
if ('closed' !== this.readyState && this.transport.writable && !this.upgrading && this.writeBuffer.length) {
debug('flushing %d packets in socket', this.writeBuffer.length);
this.transport.send(this.writeBuffer);
// keep track of current length of writeBuffer
// splice writeBuffer and callbackBuffer on `drain`
this.prevBufferLen = this.writeBuffer.length;
this.emit('flush');
}
};
/**
* Sends a message.
*
* @param {String} message.
* @param {Function} callback function.
* @param {Object} options.
* @return {Socket} for chaining.
* @api public
*/
Socket.prototype.write = Socket.prototype.send = function (msg, options, fn) {
this.sendPacket('message', msg, options, fn);
return this;
};
/**
* Sends a packet.
*
* @param {String} packet type.
* @param {String} data.
* @param {Object} options.
* @param {Function} callback function.
* @api private
*/
Socket.prototype.sendPacket = function (type, data, options, fn) {
if ('function' === typeof data) {
fn = data;
data = undefined;
}
if ('function' === typeof options) {
fn = options;
options = null;
}
if ('closing' === this.readyState || 'closed' === this.readyState) {
return;
}
options = options || {};
options.compress = false !== options.compress;
var packet = {
type: type,
data: data,
options: options
};
this.emit('packetCreate', packet);
this.writeBuffer.push(packet);
if (fn) this.once('flush', fn);
this.flush();
};
/**
* Closes the connection.
*
* @api private
*/
Socket.prototype.close = function () {
if ('opening' === this.readyState || 'open' === this.readyState) {
this.readyState = 'closing';
var self = this;
if (this.writeBuffer.length) {
this.once('drain', function () {
if (this.upgrading) {
waitForUpgrade();
} else {
close();
}
});
} else if (this.upgrading) {
waitForUpgrade();
} else {
close();
}
}
function close() {
self.onClose('forced close');
debug('socket closing - telling transport to close');
self.transport.close();
}
function cleanupAndClose() {
self.removeListener('upgrade', cleanupAndClose);
self.removeListener('upgradeError', cleanupAndClose);
close();
}
function waitForUpgrade() {
// wait for upgrade to finish since we can't send packets while pausing a transport
self.once('upgrade', cleanupAndClose);
self.once('upgradeError', cleanupAndClose);
}
return this;
};
/**
* Called upon transport error
*
* @api private
*/
Socket.prototype.onError = function (err) {
debug('socket error %j', err);
Socket.priorWebsocketSuccess = false;
this.emit('error', err);
this.onClose('transport error', err);
};
/**
* Called upon transport close.
*
* @api private
*/
Socket.prototype.onClose = function (reason, desc) {
if ('opening' === this.readyState || 'open' === this.readyState || 'closing' === this.readyState) {
debug('socket close with reason: "%s"', reason);
var self = this;
// clear timers
clearTimeout(this.pingIntervalTimer);
clearTimeout(this.pingTimeoutTimer);
// stop event from firing again for transport
this.transport.removeAllListeners('close');
// ensure transport won't stay open
this.transport.close();
// ignore further transport communication
this.transport.removeAllListeners();
// set ready state
this.readyState = 'closed';
// clear session id
this.id = null;
// emit close event
this.emit('close', reason, desc);
// clean buffers after, so users can still
// grab the buffers on `close` event
self.writeBuffer = [];
self.prevBufferLen = 0;
}
};
/**
* Filters upgrades, returning only those matching client transports.
*
* @param {Array} server upgrades
* @api private
*
*/
Socket.prototype.filterUpgrades = function (upgrades) {
var filteredUpgrades = [];
for (var i = 0, j = upgrades.length; i < j; i++) {
if (~index(this.transports, upgrades[i])) filteredUpgrades.push(upgrades[i]);
}
return filteredUpgrades;
};
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
/***/ },
/* 3 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {'use strict';
/**
* Module dependencies
*/
var XMLHttpRequest = __webpack_require__(4);
var XHR = __webpack_require__(6);
var JSONP = __webpack_require__(27);
var websocket = __webpack_require__(28);
/**
* Export transports.
*/
exports.polling = polling;
exports.websocket = websocket;
/**
* Polling transport polymorphic constructor.
* Decides on xhr vs jsonp based on feature detection.
*
* @api private
*/
function polling(opts) {
var xhr;
var xd = false;
var xs = false;
var jsonp = false !== opts.jsonp;
if (global.location) {
var isSSL = 'https:' === location.protocol;
var port = location.port;
// some user agents have empty `location.port`
if (!port) {
port = isSSL ? 443 : 80;
}
xd = opts.hostname !== location.hostname || port !== opts.port;
xs = opts.secure !== isSSL;
}
opts.xdomain = xd;
opts.xscheme = xs;
xhr = new XMLHttpRequest(opts);
if ('open' in xhr && !opts.forceJSONP) {
return new XHR(opts);
} else {
if (!jsonp) throw new Error('JSONP disabled');
return new JSONP(opts);
}
}
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
/***/ },
/* 4 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {'use strict';
// browser shim for xmlhttprequest module
var hasCORS = __webpack_require__(5);
module.exports = function (opts) {
var xdomain = opts.xdomain;
// scheme must be same when usign XDomainRequest
// http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx
var xscheme = opts.xscheme;
// XDomainRequest has a flow of not sending cookie, therefore it should be disabled as a default.
// https://github.com/Automattic/engine.io-client/pull/217
var enablesXDR = opts.enablesXDR;
// XMLHttpRequest can be disabled on IE
try {
if ('undefined' !== typeof XMLHttpRequest && (!xdomain || hasCORS)) {
return new XMLHttpRequest();
}
} catch (e) {}
// Use XDomainRequest for IE8 if enablesXDR is true
// because loading bar keeps flashing when using jsonp-polling
// https://github.com/yujiosaka/socke.io-ie8-loading-example
try {
if ('undefined' !== typeof XDomainRequest && !xscheme && enablesXDR) {
return new XDomainRequest();
}
} catch (e) {}
if (!xdomain) {
try {
return new global[['Active'].concat('Object').join('X')]('Microsoft.XMLHTTP');
} catch (e) {}
}
};
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
/***/ },
/* 5 */
/***/ function(module, exports) {
/**
* Module exports.
*
* Logic borrowed from Modernizr:
*
* - https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cors.js
*/
try {
module.exports = typeof XMLHttpRequest !== 'undefined' &&
'withCredentials' in new XMLHttpRequest();
} catch (err) {
// if XMLHttp support is disabled in IE then it will throw
// when trying to create
module.exports = false;
}
/***/ },
/* 6 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {'use strict';
/**
* Module requirements.
*/
var XMLHttpRequest = __webpack_require__(4);
var Polling = __webpack_require__(7);
var Emitter = __webpack_require__(19);
var inherit = __webpack_require__(21);
var debug = __webpack_require__(23)('engine.io-client:polling-xhr');
/**
* Module exports.
*/
module.exports = XHR;
module.exports.Request = Request;
/**
* Empty function
*/
function empty() {}
/**
* XHR Polling constructor.
*
* @param {Object} opts
* @api public
*/
function XHR(opts) {
Polling.call(this, opts);
this.requestTimeout = opts.requestTimeout;
if (global.location) {
var isSSL = 'https:' === location.protocol;
var port = location.port;
// some user agents have empty `location.port`
if (!port) {
port = isSSL ? 443 : 80;
}
this.xd = opts.hostname !== global.location.hostname || port !== opts.port;
this.xs = opts.secure !== isSSL;
} else {
this.extraHeaders = opts.extraHeaders;
}
}
/**
* Inherits from Polling.
*/
inherit(XHR, Polling);
/**
* XHR supports binary
*/
XHR.prototype.supportsBinary = true;
/**
* Creates a request.
*
* @param {String} method
* @api private
*/
XHR.prototype.request = function (opts) {
opts = opts || {};
opts.uri = this.uri();
opts.xd = this.xd;
opts.xs = this.xs;
opts.agent = this.agent || false;
opts.supportsBinary = this.supportsBinary;
opts.enablesXDR = this.enablesXDR;
// SSL options for Node.js client
opts.pfx = this.pfx;
opts.key = this.key;
opts.passphrase = this.passphrase;
opts.cert = this.cert;
opts.ca = this.ca;
opts.ciphers = this.ciphers;
opts.rejectUnauthorized = this.rejectUnauthorized;
opts.requestTimeout = this.requestTimeout;
// other options for Node.js client
opts.extraHeaders = this.extraHeaders;
return new Request(opts);
};
/**
* Sends data.
*
* @param {String} data to send.
* @param {Function} called upon flush.
* @api private
*/
XHR.prototype.doWrite = function (data, fn) {
var isBinary = typeof data !== 'string' && data !== undefined;
var req = this.request({ method: 'POST', data: data, isBinary: isBinary });
var self = this;
req.on('success', fn);
req.on('error', function (err) {
self.onError('xhr post error', err);
});
this.sendXhr = req;
};
/**
* Starts a poll cycle.
*
* @api private
*/
XHR.prototype.doPoll = function () {
debug('xhr poll');
var req = this.request();
var self = this;
req.on('data', function (data) {
self.onData(data);
});
req.on('error', function (err) {
self.onError('xhr poll error', err);
});
this.pollXhr = req;
};
/**
* Request constructor
*
* @param {Object} options
* @api public
*/
function Request(opts) {
this.method = opts.method || 'GET';
this.uri = opts.uri;
this.xd = !!opts.xd;
this.xs = !!opts.xs;
this.async = false !== opts.async;
this.data = undefined !== opts.data ? opts.data : null;
this.agent = opts.agent;
this.isBinary = opts.isBinary;
this.supportsBinary = opts.supportsBinary;
this.enablesXDR = opts.enablesXDR;
this.requestTimeout = opts.requestTimeout;
// SSL options for Node.js client
this.pfx = opts.pfx;
this.key = opts.key;
this.passphrase = opts.passphrase;
this.cert = opts.cert;
this.ca = opts.ca;
this.ciphers = opts.ciphers;
this.rejectUnauthorized = opts.rejectUnauthorized;
// other options for Node.js client
this.extraHeaders = opts.extraHeaders;
this.create();
}
/**
* Mix in `Emitter`.
*/
Emitter(Request.prototype);
/**
* Creates the XHR object and sends the request.
*
* @api private
*/
Request.prototype.create = function () {
var opts = { agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR };
// SSL options for Node.js client
opts.pfx = this.pfx;
opts.key = this.key;
opts.passphrase = this.passphrase;
opts.cert = this.cert;
opts.ca = this.ca;
opts.ciphers = this.ciphers;
opts.rejectUnauthorized = this.rejectUnauthorized;
var xhr = this.xhr = new XMLHttpRequest(opts);
var self = this;
try {
debug('xhr open %s: %s', this.method, this.uri);
xhr.open(this.method, this.uri, this.async);
try {
if (this.extraHeaders) {
xhr.setDisableHeaderCheck(true);
for (var i in this.extraHeaders) {
if (this.extraHeaders.hasOwnProperty(i)) {
xhr.setRequestHeader(i, this.extraHeaders[i]);
}
}
}
} catch (e) {}
if (this.supportsBinary) {
// This has to be done after open because Firefox is stupid
// http://stackoverflow.com/questions/13216903/get-binary-data-with-xmlhttprequest-in-a-firefox-extension
xhr.responseType = 'arraybuffer';
}
if ('POST' === this.method) {
try {
if (this.isBinary) {
xhr.setRequestHeader('Content-type', 'application/octet-stream');
} else {
xhr.setRequestHeader('Content-type', 'text/plain;charset=UTF-8');
}
} catch (e) {}
}
try {
xhr.setRequestHeader('Accept', '*/*');
} catch (e) {}
// ie6 check
if ('withCredentials' in xhr) {
xhr.withCredentials = true;
}
if (this.requestTimeout) {
xhr.timeout = this.requestTimeout;
}
if (this.hasXDR()) {
xhr.onload = function () {
self.onLoad();
};
xhr.onerror = function () {
self.onError(xhr.responseText);
};
} else {
xhr.onreadystatechange = function () {
if (4 !== xhr.readyState) return;
if (200 === xhr.status || 1223 === xhr.status) {
self.onLoad();
} else {
// make sure the `error` event handler that's user-set
// does not throw in the same tick and gets caught here
setTimeout(function () {
self.onError(xhr.status);
}, 0);
}
};
}
debug('xhr data %s', this.data);
xhr.send(this.data);
} catch (e) {
// Need to defer since .create() is called directly fhrom the constructor
// and thus the 'error' event can only be only bound *after* this exception
// occurs. Therefore, also, we cannot throw here at all.
setTimeout(function () {
self.onError(e);
}, 0);
return;
}
if (global.document) {
this.index = Request.requestsCount++;
Request.requests[this.index] = this;
}
};
/**
* Called upon successful response.
*
* @api private
*/
Request.prototype.onSuccess = function () {
this.emit('success');
this.cleanup();
};
/**
* Called if we have data.
*
* @api private
*/
Request.prototype.onData = function (data) {
this.emit('data', data);
this.onSuccess();
};
/**
* Called upon error.
*
* @api private
*/
Request.prototype.onError = function (err) {
this.emit('error', err);
this.cleanup(true);
};
/**
* Cleans up house.
*
* @api private
*/
Request.prototype.cleanup = function (fromError) {
if ('undefined' === typeof this.xhr || null === this.xhr) {
return;
}
// xmlhttprequest
if (this.hasXDR()) {
this.xhr.onload = this.xhr.onerror = empty;
} else {
this.xhr.onreadystatechange = empty;
}
if (fromError) {
try {
this.xhr.abort();
} catch (e) {}
}
if (global.document) {
delete Request.requests[this.index];
}
this.xhr = null;
};
/**
* Called upon load.
*
* @api private
*/
Request.prototype.onLoad = function () {
var data;
try {
var contentType;
try {
contentType = this.xhr.getResponseHeader('Content-Type').split(';')[0];
} catch (e) {}
if (contentType === 'application/octet-stream') {
data = this.xhr.response || this.xhr.responseText;
} else {
if (!this.supportsBinary) {
data = this.xhr.responseText;
} else {
try {
data = String.fromCharCode.apply(null, new Uint8Array(this.xhr.response));
} catch (e) {
var ui8Arr = new Uint8Array(this.xhr.response);
var dataArray = [];
for (var idx = 0, length = ui8Arr.length; idx < length; idx++) {
dataArray.push(ui8Arr[idx]);
}
data = String.fromCharCode.apply(null, dataArray);
}
}
}
} catch (e) {
this.onError(e);
}
if (null != data) {
this.onData(data);
}
};
/**
* Check if it has XDomainRequest.
*
* @api private
*/
Request.prototype.hasXDR = function () {
return 'undefined' !== typeof global.XDomainRequest && !this.xs && this.enablesXDR;
};
/**
* Aborts the request.
*
* @api public
*/
Request.prototype.abort = function () {
this.cleanup();
};
/**
* Aborts pending requests when unloading the window. This is needed to prevent
* memory leaks (e.g. when using IE) and to ensure that no spurious error is
* emitted.
*/
Request.requestsCount = 0;
Request.requests = {};
if (global.document) {
if (global.attachEvent) {
global.attachEvent('onunload', unloadHandler);
} else if (global.addEventListener) {
global.addEventListener('beforeunload', unloadHandler, false);
}
}
function unloadHandler() {
for (var i in Request.requests) {
if (Request.requests.hasOwnProperty(i)) {
Request.requests[i].abort();
}
}
}
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
/***/ },
/* 7 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
/**
* Module dependencies.
*/
var Transport = __webpack_require__(8);
var parseqs = __webpack_require__(20);
var parser = __webpack_require__(9);
var inherit = __webpack_require__(21);
var yeast = __webpack_require__(22);
var debug = __webpack_require__(23)('engine.io-client:polling');
/**
* Module exports.
*/
module.exports = Polling;
/**
* Is XHR2 supported?
*/
var hasXHR2 = function () {
var XMLHttpRequest = __webpack_require__(4);
var xhr = new XMLHttpRequest({ xdomain: false });
return null != xhr.responseType;
}();
/**
* Polling interface.
*
* @param {Object} opts
* @api private
*/
function Polling(opts) {
var forceBase64 = opts && opts.forceBase64;
if (!hasXHR2 || forceBase64) {
this.supportsBinary = false;
}
Transport.call(this, opts);
}
/**
* Inherits from Transport.
*/
inherit(Polling, Transport);
/**
* Transport name.
*/
Polling.prototype.name = 'polling';
/**
* Opens the socket (triggers polling). We write a PING message to determine
* when the transport is open.
*
* @api private
*/
Polling.prototype.doOpen = function () {
this.poll();
};
/**
* Pauses polling.
*
* @param {Function} callback upon buffers are flushed and transport is paused
* @api private
*/
Polling.prototype.pause = function (onPause) {
var self = this;
this.readyState = 'pausing';
function pause() {
debug('paused');
self.readyState = 'paused';
onPause();
}
if (this.polling || !this.writable) {
var total = 0;
if (this.polling) {
debug('we are currently polling - waiting to pause');
total++;
this.once('pollComplete', function () {
debug('pre-pause polling complete');
--total || pause();
});
}
if (!this.writable) {
debug('we are currently writing - waiting to pause');
total++;
this.once('drain', function () {
debug('pre-pause writing complete');
--total || pause();
});
}
} else {
pause();
}
};
/**
* Starts polling cycle.
*
* @api public
*/
Polling.prototype.poll = function () {
debug('polling');
this.polling = true;
this.doPoll();
this.emit('poll');
};
/**
* Overloads onData to detect payloads.
*
* @api private
*/
Polling.prototype.onData = function (data) {
var self = this;
debug('polling got data %s', data);
var callback = function callback(packet, index, total) {
// if its the first message we consider the transport open
if ('opening' === self.readyState) {
self.onOpen();
}
// if its a close packet, we close the ongoing requests
if ('close' === packet.type) {
self.onClose();
return false;
}
// otherwise bypass onData and handle the message
self.onPacket(packet);
};
// decode payload
parser.decodePayload(data, this.socket.binaryType, callback);
// if an event did not trigger closing
if ('closed' !== this.readyState) {
// if we got data we're not polling
this.polling = false;
this.emit('pollComplete');
if ('open' === this.readyState) {
this.poll();
} else {
debug('ignoring poll - transport state "%s"', this.readyState);
}
}
};
/**
* For polling, send a close packet.
*
* @api private
*/
Polling.prototype.doClose = function () {
var self = this;
function close() {
debug('writing close packet');
self.write([{ type: 'close' }]);
}
if ('open' === this.readyState) {
debug('transport open - closing');
close();
} else {
// in case we're trying to close while
// handshaking is in progress (GH-164)
debug('transport not open - deferring close');
this.once('open', close);
}
};
/**
* Writes a packets payload.
*
* @param {Array} data packets
* @param {Function} drain callback
* @api private
*/
Polling.prototype.write = function (packets) {
var self = this;
this.writable = false;
var callbackfn = function callbackfn() {
self.writable = true;
self.emit('drain');
};
parser.encodePayload(packets, this.supportsBinary, function (data) {
self.doWrite(data, callbackfn);
});
};
/**
* Generates uri for connection.
*
* @api private
*/
Polling.prototype.uri = function () {
var query = this.query || {};
var schema = this.secure ? 'https' : 'http';
var port = '';
// cache busting is forced
if (false !== this.timestampRequests) {
query[this.timestampParam] = yeast();
}
if (!this.supportsBinary && !query.sid) {
query.b64 = 1;
}
query = parseqs.encode(query);
// avoid port if default for schema
if (this.port && ('https' === schema && Number(this.port) !== 443 || 'http' === schema && Number(this.port) !== 80)) {
port = ':' + this.port;
}
// prepend ? to query
if (query.length) {
query = '?' + query;
}
var ipv6 = this.hostname.indexOf(':') !== -1;
return schema + '://' + (ipv6 ? '[' + this.hostname + ']' : this.hostname) + port + this.path + query;
};
/***/ },
/* 8 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
/**
* Module dependencies.
*/
var parser = __webpack_require__(9);
var Emitter = __webpack_require__(19);
/**
* Module exports.
*/
module.exports = Transport;
/**
* Transport abstract constructor.
*
* @param {Object} options.
* @api private
*/
function Transport(opts) {
this.path = opts.path;
this.hostname = opts.hostname;
this.port = opts.port;
this.secure = opts.secure;
this.query = opts.query;
this.timestampParam = opts.timestampParam;
this.timestampRequests = opts.timestampRequests;
this.readyState = '';
this.agent = opts.agent || false;
this.socket = opts.socket;
this.enablesXDR = opts.enablesXDR;
// SSL options for Node.js client
this.pfx = opts.pfx;
this.key = opts.key;
this.passphrase = opts.passphrase;
this.cert = opts.cert;
this.ca = opts.ca;
this.ciphers = opts.ciphers;
this.rejectUnauthorized = opts.rejectUnauthorized;
this.forceNode = opts.forceNode;
// other options for Node.js client
this.extraHeaders = opts.extraHeaders;
this.localAddress = opts.localAddress;
}
/**
* Mix in `Emitter`.
*/
Emitter(Transport.prototype);
/**
* Emits an error.
*
* @param {String} str
* @return {Transport} for chaining
* @api public
*/
Transport.prototype.onError = function (msg, desc) {
var err = new Error(msg);
err.type = 'TransportError';
err.description = desc;
this.emit('error', err);
return this;
};
/**
* Opens the transport.
*
* @api public
*/
Transport.prototype.open = function () {
if ('closed' === this.readyState || '' === this.readyState) {
this.readyState = 'opening';
this.doOpen();
}
return this;
};
/**
* Closes the transport.
*
* @api private
*/
Transport.prototype.close = function () {
if ('opening' === this.readyState || 'open' === this.readyState) {
this.doClose();
this.onClose();
}
return this;
};
/**
* Sends multiple packets.
*
* @param {Array} packets
* @api private
*/
Transport.prototype.send = function (packets) {
if ('open' === this.readyState) {
this.write(packets);
} else {
throw new Error('Transport not open');
}
};
/**
* Called upon open
*
* @api private
*/
Transport.prototype.onOpen = function () {
this.readyState = 'open';
this.writable = true;
this.emit('open');
};
/**
* Called with data.
*
* @param {String} data
* @api private
*/
Transport.prototype.onData = function (data) {
var packet = parser.decodePacket(data, this.socket.binaryType);
this.onPacket(packet);
};
/**
* Called with a decoded packet.
*/
Transport.prototype.onPacket = function (packet) {
this.emit('packet', packet);
};
/**
* Called upon close.
*
* @api private
*/
Transport.prototype.onClose = function () {
this.readyState = 'closed';
this.emit('close');
};
/***/ },
/* 9 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {/**
* Module dependencies.
*/
var keys = __webpack_require__(10);
var hasBinary = __webpack_require__(11);
var sliceBuffer = __webpack_require__(13);
var after = __webpack_require__(14);
var utf8 = __webpack_require__(15);
var base64encoder;
if (global && global.ArrayBuffer) {
base64encoder = __webpack_require__(17);
}
/**
* Check if we are running an android browser. That requires us to use
* ArrayBuffer with polling transports...
*
* http://ghinda.net/jpeg-blob-ajax-android/
*/
var isAndroid = typeof navigator !== 'undefined' && /Android/i.test(navigator.userAgent);
/**
* Check if we are running in PhantomJS.
* Uploading a Blob with PhantomJS does not work correctly, as reported here:
* https://github.com/ariya/phantomjs/issues/11395
* @type boolean
*/
var isPhantomJS = typeof navigator !== 'undefined' && /PhantomJS/i.test(navigator.userAgent);
/**
* When true, avoids using Blobs to encode payloads.
* @type boolean
*/
var dontSendBlobs = isAndroid || isPhantomJS;
/**
* Current protocol version.
*/
exports.protocol = 3;
/**
* Packet types.
*/
var packets = exports.packets = {
open: 0 // non-ws
, close: 1 // non-ws
, ping: 2
, pong: 3
, message: 4
, upgrade: 5
, noop: 6
};
var packetslist = keys(packets);
/**
* Premade error packet.
*/
var err = { type: 'error', data: 'parser error' };
/**
* Create a blob api even for blob builder when vendor prefixes exist
*/
var Blob = __webpack_require__(18);
/**
* Encodes a packet.
*
* <packet type id> [ <data> ]
*
* Example:
*
* 5hello world
* 3
* 4
*
* Binary is encoded in an identical principle
*
* @api private
*/
exports.encodePacket = function (packet, supportsBinary, utf8encode, callback) {
if ('function' == typeof supportsBinary) {
callback = supportsBinary;
supportsBinary = false;
}
if ('function' == typeof utf8encode) {
callback = utf8encode;
utf8encode = null;
}
var data = (packet.data === undefined)
? undefined
: packet.data.buffer || packet.data;
if (global.ArrayBuffer && data instanceof ArrayBuffer) {
return encodeArrayBuffer(packet, supportsBinary, callback);
} else if (Blob && data instanceof global.Blob) {
return encodeBlob(packet, supportsBinary, callback);
}
// might be an object with { base64: true, data: dataAsBase64String }
if (data && data.base64) {
return encodeBase64Object(packet, callback);
}
// Sending data as a utf-8 string
var encoded = packets[packet.type];
// data fragment is optional
if (undefined !== packet.data) {
encoded += utf8encode ? utf8.encode(String(packet.data)) : String(packet.data);
}
return callback('' + encoded);
};
function encodeBase64Object(packet, callback) {
// packet data is an object { base64: true, data: dataAsBase64String }
var message = 'b' + exports.packets[packet.type] + packet.data.data;
return callback(message);
}
/**
* Encode packet helpers for binary types
*/
function encodeArrayBuffer(packet, supportsBinary, callback) {
if (!supportsBinary) {
return exports.encodeBase64Packet(packet, callback);
}
var data = packet.data;
var contentArray = new Uint8Array(data);
var resultBuffer = new Uint8Array(1 + data.byteLength);
resultBuffer[0] = packets[packet.type];
for (var i = 0; i < contentArray.length; i++) {
resultBuffer[i+1] = contentArray[i];
}
return callback(resultBuffer.buffer);
}
function encodeBlobAsArrayBuffer(packet, supportsBinary, callback) {
if (!supportsBinary) {
return exports.encodeBase64Packet(packet, callback);
}
var fr = new FileReader();
fr.onload = function() {
packet.data = fr.result;
exports.encodePacket(packet, supportsBinary, true, callback);
};
return fr.readAsArrayBuffer(packet.data);
}
function encodeBlob(packet, supportsBinary, callback) {
if (!supportsBinary) {
return exports.encodeBase64Packet(packet, callback);
}
if (dontSendBlobs) {
return encodeBlobAsArrayBuffer(packet, supportsBinary, callback);
}
var length = new Uint8Array(1);
length[0] = packets[packet.type];
var blob = new Blob([length.buffer, packet.data]);
return callback(blob);
}
/**
* Encodes a packet with binary data in a base64 string
*
* @param {Object} packet, has `type` and `data`
* @return {String} base64 encoded message
*/
exports.encodeBase64Packet = function(packet, callback) {
var message = 'b' + exports.packets[packet.type];
if (Blob && packet.data instanceof global.Blob) {
var fr = new FileReader();
fr.onload = function() {
var b64 = fr.result.split(',')[1];
callback(message + b64);
};
return fr.readAsDataURL(packet.data);
}
var b64data;
try {
b64data = String.fromCharCode.apply(null, new Uint8Array(packet.data));
} catch (e) {
// iPhone Safari doesn't let you apply with typed arrays
var typed = new Uint8Array(packet.data);
var basic = new Array(typed.length);
for (var i = 0; i < typed.length; i++) {
basic[i] = typed[i];
}
b64data = String.fromCharCode.apply(null, basic);
}
message += global.btoa(b64data);
return callback(message);
};
/**
* Decodes a packet. Changes format to Blob if requested.
*
* @return {Object} with `type` and `data` (if any)
* @api private
*/
exports.decodePacket = function (data, binaryType, utf8decode) {
if (data === undefined) {
return err;
}
// String data
if (typeof data == 'string') {
if (data.charAt(0) == 'b') {
return exports.decodeBase64Packet(data.substr(1), binaryType);
}
if (utf8decode) {
data = tryDecode(data);
if (data === false) {
return err;
}
}
var type = data.charAt(0);
if (Number(type) != type || !packetslist[type]) {
return err;
}
if (data.length > 1) {
return { type: packetslist[type], data: data.substring(1) };
} else {
return { type: packetslist[type] };
}
}
var asArray = new Uint8Array(data);
var type = asArray[0];
var rest = sliceBuffer(data, 1);
if (Blob && binaryType === 'blob') {
rest = new Blob([rest]);
}
return { type: packetslist[type], data: rest };
};
function tryDecode(data) {
try {
data = utf8.decode(data);
} catch (e) {
return false;
}
return data;
}
/**
* Decodes a packet encoded in a base64 string
*
* @param {String} base64 encoded message
* @return {Object} with `type` and `data` (if any)
*/
exports.decodeBase64Packet = function(msg, binaryType) {
var type = packetslist[msg.charAt(0)];
if (!base64encoder) {
return { type: type, data: { base64: true, data: msg.substr(1) } };
}
var data = base64encoder.decode(msg.substr(1));
if (binaryType === 'blob' && Blob) {
data = new Blob([data]);
}
return { type: type, data: data };
};
/**
* Encodes multiple messages (payload).
*
* <length>:data
*
* Example:
*
* 11:hello world2:hi
*
* If any contents are binary, they will be encoded as base64 strings. Base64
* encoded strings are marked with a b before the length specifier
*
* @param {Array} packets
* @api private
*/
exports.encodePayload = function (packets, supportsBinary, callback) {
if (typeof supportsBinary == 'function') {
callback = supportsBinary;
supportsBinary = null;
}
var isBinary = hasBinary(packets);
if (supportsBinary && isBinary) {
if (Blob && !dontSendBlobs) {
return exports.encodePayloadAsBlob(packets, callback);
}
return exports.encodePayloadAsArrayBuffer(packets, callback);
}
if (!packets.length) {
return callback('0:');
}
function setLengthHeader(message) {
return message.length + ':' + message;
}
function encodeOne(packet, doneCallback) {
exports.encodePacket(packet, !isBinary ? false : supportsBinary, true, function(message) {
doneCallback(null, setLengthHeader(message));
});
}
map(packets, encodeOne, function(err, results) {
return callback(results.join(''));
});
};
/**
* Async array map using after
*/
function map(ary, each, done) {
var result = new Array(ary.length);
var next = after(ary.length, done);
var eachWithIndex = function(i, el, cb) {
each(el, function(error, msg) {
result[i] = msg;
cb(error, result);
});
};
for (var i = 0; i < ary.length; i++) {
eachWithIndex(i, ary[i], next);
}
}
/*
* Decodes data when a payload is maybe expected. Possible binary contents are
* decoded from their base64 representation
*
* @param {String} data, callback method
* @api public
*/
exports.decodePayload = function (data, binaryType, callback) {
if (typeof data != 'string') {
return exports.decodePayloadAsBinary(data, binaryType, callback);
}
if (typeof binaryType === 'function') {
callback = binaryType;
binaryType = null;
}
var packet;
if (data == '') {
// parser error - ignoring payload
return callback(err, 0, 1);
}
var length = ''
, n, msg;
for (var i = 0, l = data.length; i < l; i++) {
var chr = data.charAt(i);
if (':' != chr) {
length += chr;
} else {
if ('' == length || (length != (n = Number(length)))) {
// parser error - ignoring payload
return callback(err, 0, 1);
}
msg = data.substr(i + 1, n);
if (length != msg.length) {
// parser error - ignoring payload
return callback(err, 0, 1);
}
if (msg.length) {
packet = exports.decodePacket(msg, binaryType, true);
if (err.type == packet.type && err.data == packet.data) {
// parser error in individual packet - ignoring payload
return callback(err, 0, 1);
}
var ret = callback(packet, i + n, l);
if (false === ret) return;
}
// advance cursor
i += n;
length = '';
}
}
if (length != '') {
// parser error - ignoring payload
return callback(err, 0, 1);
}
};
/**
* Encodes multiple messages (payload) as binary.
*
* <1 = binary, 0 = string><number from 0-9><number from 0-9>[...]<number
* 255><data>
*
* Example:
* 1 3 255 1 2 3, if the binary contents are interpreted as 8 bit integers
*
* @param {Array} packets
* @return {ArrayBuffer} encoded payload
* @api private
*/
exports.encodePayloadAsArrayBuffer = function(packets, callback) {
if (!packets.length) {
return callback(new ArrayBuffer(0));
}
function encodeOne(packet, doneCallback) {
exports.encodePacket(packet, true, true, function(data) {
return doneCallback(null, data);
});
}
map(packets, encodeOne, function(err, encodedPackets) {
var totalLength = encodedPackets.reduce(function(acc, p) {
var len;
if (typeof p === 'string'){
len = p.length;
} else {
len = p.byteLength;
}
return acc + len.toString().length + len + 2; // string/binary identifier + separator = 2
}, 0);
var resultArray = new Uint8Array(totalLength);
var bufferIndex = 0;
encodedPackets.forEach(function(p) {
var isString = typeof p === 'string';
var ab = p;
if (isString) {
var view = new Uint8Array(p.length);
for (var i = 0; i < p.length; i++) {
view[i] = p.charCodeAt(i);
}
ab = view.buffer;
}
if (isString) { // not true binary
resultArray[bufferIndex++] = 0;
} else { // true binary
resultArray[bufferIndex++] = 1;
}
var lenStr = ab.byteLength.toString();
for (var i = 0; i < lenStr.length; i++) {
resultArray[bufferIndex++] = parseInt(lenStr[i]);
}
resultArray[bufferIndex++] = 255;
var view = new Uint8Array(ab);
for (var i = 0; i < view.length; i++) {
resultArray[bufferIndex++] = view[i];
}
});
return callback(resultArray.buffer);
});
};
/**
* Encode as Blob
*/
exports.encodePayloadAsBlob = function(packets, callback) {
function encodeOne(packet, doneCallback) {
exports.encodePacket(packet, true, true, function(encoded) {
var binaryIdentifier = new Uint8Array(1);
binaryIdentifier[0] = 1;
if (typeof encoded === 'string') {
var view = new Uint8Array(encoded.length);
for (var i = 0; i < encoded.length; i++) {
view[i] = encoded.charCodeAt(i);
}
encoded = view.buffer;
binaryIdentifier[0] = 0;
}
var len = (encoded instanceof ArrayBuffer)
? encoded.byteLength
: encoded.size;
var lenStr = len.toString();
var lengthAry = new Uint8Array(lenStr.length + 1);
for (var i = 0; i < lenStr.length; i++) {
lengthAry[i] = parseInt(lenStr[i]);
}
lengthAry[lenStr.length] = 255;
if (Blob) {
var blob = new Blob([binaryIdentifier.buffer, lengthAry.buffer, encoded]);
doneCallback(null, blob);
}
});
}
map(packets, encodeOne, function(err, results) {
return callback(new Blob(results));
});
};
/*
* Decodes data when a payload is maybe expected. Strings are decoded by
* interpreting each byte as a key code for entries marked to start with 0. See
* description of encodePayloadAsBinary
*
* @param {ArrayBuffer} data, callback method
* @api public
*/
exports.decodePayloadAsBinary = function (data, binaryType, callback) {
if (typeof binaryType === 'function') {
callback = binaryType;
binaryType = null;
}
var bufferTail = data;
var buffers = [];
var numberTooLong = false;
while (bufferTail.byteLength > 0) {
var tailArray = new Uint8Array(bufferTail);
var isString = tailArray[0] === 0;
var msgLength = '';
for (var i = 1; ; i++) {
if (tailArray[i] == 255) break;
if (msgLength.length > 310) {
numberTooLong = true;
break;
}
msgLength += tailArray[i];
}
if(numberTooLong) return callback(err, 0, 1);
bufferTail = sliceBuffer(bufferTail, 2 + msgLength.length);
msgLength = parseInt(msgLength);
var msg = sliceBuffer(bufferTail, 0, msgLength);
if (isString) {
try {
msg = String.fromCharCode.apply(null, new Uint8Array(msg));
} catch (e) {
// iPhone Safari doesn't let you apply to typed arrays
var typed = new Uint8Array(msg);
msg = '';
for (var i = 0; i < typed.length; i++) {
msg += String.fromCharCode(typed[i]);
}
}
}
buffers.push(msg);
bufferTail = sliceBuffer(bufferTail, msgLength);
}
var total = buffers.length;
buffers.forEach(function(buffer, i) {
callback(exports.decodePacket(buffer, binaryType, true), i, total);
});
};
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
/***/ },
/* 10 */
/***/ function(module, exports) {
/**
* Gets the keys for an object.
*
* @return {Array} keys
* @api private
*/
module.exports = Object.keys || function keys (obj){
var arr = [];
var has = Object.prototype.hasOwnProperty;
for (var i in obj) {
if (has.call(obj, i)) {
arr.push(i);
}
}
return arr;
};
/***/ },
/* 11 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {
/*
* Module requirements.
*/
var isArray = __webpack_require__(12);
/**
* Module exports.
*/
module.exports = hasBinary;
/**
* Checks for binary data.
*
* Right now only Buffer and ArrayBuffer are supported..
*
* @param {Object} anything
* @api public
*/
function hasBinary(data) {
function _hasBinary(obj) {
if (!obj) return false;
if ( (global.Buffer && global.Buffer.isBuffer(obj)) ||
(global.ArrayBuffer && obj instanceof ArrayBuffer) ||
(global.Blob && obj instanceof Blob) ||
(global.File && obj instanceof File)
) {
return true;
}
if (isArray(obj)) {
for (var i = 0; i < obj.length; i++) {
if (_hasBinary(obj[i])) {
return true;
}
}
} else if (obj && 'object' == typeof obj) {
if (obj.toJSON) {
obj = obj.toJSON();
}
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key) && _hasBinary(obj[key])) {
return true;
}
}
}
return false;
}
return _hasBinary(data);
}
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
/***/ },
/* 12 */
/***/ function(module, exports) {
module.exports = Array.isArray || function (arr) {
return Object.prototype.toString.call(arr) == '[object Array]';
};
/***/ },
/* 13 */
/***/ function(module, exports) {
/**
* An abstraction for slicing an arraybuffer even when
* ArrayBuffer.prototype.slice is not supported
*
* @api public
*/
module.exports = function(arraybuffer, start, end) {
var bytes = arraybuffer.byteLength;
start = start || 0;
end = end || bytes;
if (arraybuffer.slice) { return arraybuffer.slice(start, end); }
if (start < 0) { start += bytes; }
if (end < 0) { end += bytes; }
if (end > bytes) { end = bytes; }
if (start >= bytes || start >= end || bytes === 0) {
return new ArrayBuffer(0);
}
var abv = new Uint8Array(arraybuffer);
var result = new Uint8Array(end - start);
for (var i = start, ii = 0; i < end; i++, ii++) {
result[ii] = abv[i];
}
return result.buffer;
};
/***/ },
/* 14 */
/***/ function(module, exports) {
module.exports = after
function after(count, callback, err_cb) {
var bail = false
err_cb = err_cb || noop
proxy.count = count
return (count === 0) ? callback() : proxy
function proxy(err, result) {
if (proxy.count <= 0) {
throw new Error('after called too many times')
}
--proxy.count
// after first error, rest are passed to err_cb
if (err) {
bail = true
callback(err)
// future error callbacks will go to error handler
callback = err_cb
} else if (proxy.count === 0 && !bail) {
callback(null, result)
}
}
}
function noop() {}
/***/ },
/* 15 */
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(module, global) {/*! https://mths.be/wtf8 v1.0.0 by @mathias */
;(function(root) {
// Detect free variables `exports`
var freeExports = typeof exports == 'object' && exports;
// Detect free variable `module`
var freeModule = typeof module == 'object' && module &&
module.exports == freeExports && module;
// Detect free variable `global`, from Node.js or Browserified code,
// and use it as `root`
var freeGlobal = typeof global == 'object' && global;
if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
root = freeGlobal;
}
/*--------------------------------------------------------------------------*/
var stringFromCharCode = String.fromCharCode;
// Taken from https://mths.be/punycode
function ucs2decode(string) {
var output = [];
var counter = 0;
var length = string.length;
var value;
var extra;
while (counter < length) {
value = string.charCodeAt(counter++);
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
// high surrogate, and there is a next character
extra = string.charCodeAt(counter++);
if ((extra & 0xFC00) == 0xDC00) { // low surrogate
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
} else {
// unmatched surrogate; only append this code unit, in case the next
// code unit is the high surrogate of a surrogate pair
output.push(value);
counter--;
}
} else {
output.push(value);
}
}
return output;
}
// Taken from https://mths.be/punycode
function ucs2encode(array) {
var length = array.length;
var index = -1;
var value;
var output = '';
while (++index < length) {
value = array[index];
if (value > 0xFFFF) {
value -= 0x10000;
output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
value = 0xDC00 | value & 0x3FF;
}
output += stringFromCharCode(value);
}
return output;
}
/*--------------------------------------------------------------------------*/
function createByte(codePoint, shift) {
return stringFromCharCode(((codePoint >> shift) & 0x3F) | 0x80);
}
function encodeCodePoint(codePoint) {
if ((codePoint & 0xFFFFFF80) == 0) { // 1-byte sequence
return stringFromCharCode(codePoint);
}
var symbol = '';
if ((codePoint & 0xFFFFF800) == 0) { // 2-byte sequence
symbol = stringFromCharCode(((codePoint >> 6) & 0x1F) | 0xC0);
}
else if ((codePoint & 0xFFFF0000) == 0) { // 3-byte sequence
symbol = stringFromCharCode(((codePoint >> 12) & 0x0F) | 0xE0);
symbol += createByte(codePoint, 6);
}
else if ((codePoint & 0xFFE00000) == 0) { // 4-byte sequence
symbol = stringFromCharCode(((codePoint >> 18) & 0x07) | 0xF0);
symbol += createByte(codePoint, 12);
symbol += createByte(codePoint, 6);
}
symbol += stringFromCharCode((codePoint & 0x3F) | 0x80);
return symbol;
}
function wtf8encode(string) {
var codePoints = ucs2decode(string);
var length = codePoints.length;
var index = -1;
var codePoint;
var byteString = '';
while (++index < length) {
codePoint = codePoints[index];
byteString += encodeCodePoint(codePoint);
}
return byteString;
}
/*--------------------------------------------------------------------------*/
function readContinuationByte() {
if (byteIndex >= byteCount) {
throw Error('Invalid byte index');
}
var continuationByte = byteArray[byteIndex] & 0xFF;
byteIndex++;
if ((continuationByte & 0xC0) == 0x80) {
return continuationByte & 0x3F;
}
// If we end up here, it’s not a continuation byte.
throw Error('Invalid continuation byte');
}
function decodeSymbol() {
var byte1;
var byte2;
var byte3;
var byte4;
var codePoint;
if (byteIndex > byteCount) {
throw Error('Invalid byte index');
}
if (byteIndex == byteCount) {
return false;
}
// Read the first byte.
byte1 = byteArray[byteIndex] & 0xFF;
byteIndex++;
// 1-byte sequence (no continuation bytes)
if ((byte1 & 0x80) == 0) {
return byte1;
}
// 2-byte sequence
if ((byte1 & 0xE0) == 0xC0) {
var byte2 = readContinuationByte();
codePoint = ((byte1 & 0x1F) << 6) | byte2;
if (codePoint >= 0x80) {
return codePoint;
} else {
throw Error('Invalid continuation byte');
}
}
// 3-byte sequence (may include unpaired surrogates)
if ((byte1 & 0xF0) == 0xE0) {
byte2 = readContinuationByte();
byte3 = readContinuationByte();
codePoint = ((byte1 & 0x0F) << 12) | (byte2 << 6) | byte3;
if (codePoint >= 0x0800) {
return codePoint;
} else {
throw Error('Invalid continuation byte');
}
}
// 4-byte sequence
if ((byte1 & 0xF8) == 0xF0) {
byte2 = readContinuationByte();
byte3 = readContinuationByte();
byte4 = readContinuationByte();
codePoint = ((byte1 & 0x0F) << 0x12) | (byte2 << 0x0C) |
(byte3 << 0x06) | byte4;
if (codePoint >= 0x010000 && codePoint <= 0x10FFFF) {
return codePoint;
}
}
throw Error('Invalid WTF-8 detected');
}
var byteArray;
var byteCount;
var byteIndex;
function wtf8decode(byteString) {
byteArray = ucs2decode(byteString);
byteCount = byteArray.length;
byteIndex = 0;
var codePoints = [];
var tmp;
while ((tmp = decodeSymbol()) !== false) {
codePoints.push(tmp);
}
return ucs2encode(codePoints);
}
/*--------------------------------------------------------------------------*/
var wtf8 = {
'version': '1.0.0',
'encode': wtf8encode,
'decode': wtf8decode
};
// Some AMD build optimizers, like r.js, check for specific condition patterns
// like the following:
if (
true
) {
!(__WEBPACK_AMD_DEFINE_RESULT__ = function() {
return wtf8;
}.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else if (freeExports && !freeExports.nodeType) {
if (freeModule) { // in Node.js or RingoJS v0.8.0+
freeModule.exports = wtf8;
} else { // in Narwhal or RingoJS v0.7.0-
var object = {};
var hasOwnProperty = object.hasOwnProperty;
for (var key in wtf8) {
hasOwnProperty.call(wtf8, key) && (freeExports[key] = wtf8[key]);
}
}
} else { // in Rhino or a web browser
root.wtf8 = wtf8;
}
}(this));
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(16)(module), (function() { return this; }())))
/***/ },
/* 16 */
/***/ function(module, exports) {
module.exports = function(module) {
if(!module.webpackPolyfill) {
module.deprecate = function() {};
module.paths = [];
// module.parent = undefined by default
module.children = [];
module.webpackPolyfill = 1;
}
return module;
}
/***/ },
/* 17 */
/***/ function(module, exports) {
/*
* base64-arraybuffer
* https://github.com/niklasvh/base64-arraybuffer
*
* Copyright (c) 2012 Niklas von Hertzen
* Licensed under the MIT license.
*/
(function(){
"use strict";
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
// Use a lookup table to find the index.
var lookup = new Uint8Array(256);
for (var i = 0; i < chars.length; i++) {
lookup[chars.charCodeAt(i)] = i;
}
exports.encode = function(arraybuffer) {
var bytes = new Uint8Array(arraybuffer),
i, len = bytes.length, base64 = "";
for (i = 0; i < len; i+=3) {
base64 += chars[bytes[i] >> 2];
base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];
base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];
base64 += chars[bytes[i + 2] & 63];
}
if ((len % 3) === 2) {
base64 = base64.substring(0, base64.length - 1) + "=";
} else if (len % 3 === 1) {
base64 = base64.substring(0, base64.length - 2) + "==";
}
return base64;
};
exports.decode = function(base64) {
var bufferLength = base64.length * 0.75,
len = base64.length, i, p = 0,
encoded1, encoded2, encoded3, encoded4;
if (base64[base64.length - 1] === "=") {
bufferLength--;
if (base64[base64.length - 2] === "=") {
bufferLength--;
}
}
var arraybuffer = new ArrayBuffer(bufferLength),
bytes = new Uint8Array(arraybuffer);
for (i = 0; i < len; i+=4) {
encoded1 = lookup[base64.charCodeAt(i)];
encoded2 = lookup[base64.charCodeAt(i+1)];
encoded3 = lookup[base64.charCodeAt(i+2)];
encoded4 = lookup[base64.charCodeAt(i+3)];
bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);
bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);
bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);
}
return arraybuffer;
};
})();
/***/ },
/* 18 */
/***/ function(module, exports) {
/* WEBPACK VAR INJECTION */(function(global) {/**
* Create a blob builder even when vendor prefixes exist
*/
var BlobBuilder = global.BlobBuilder
|| global.WebKitBlobBuilder
|| global.MSBlobBuilder
|| global.MozBlobBuilder;
/**
* Check if Blob constructor is supported
*/
var blobSupported = (function() {
try {
var a = new Blob(['hi']);
return a.size === 2;
} catch(e) {
return false;
}
})();
/**
* Check if Blob constructor supports ArrayBufferViews
* Fails in Safari 6, so we need to map to ArrayBuffers there.
*/
var blobSupportsArrayBufferView = blobSupported && (function() {
try {
var b = new Blob([new Uint8Array([1,2])]);
return b.size === 2;
} catch(e) {
return false;
}
})();
/**
* Check if BlobBuilder is supported
*/
var blobBuilderSupported = BlobBuilder
&& BlobBuilder.prototype.append
&& BlobBuilder.prototype.getBlob;
/**
* Helper function that maps ArrayBufferViews to ArrayBuffers
* Used by BlobBuilder constructor and old browsers that didn't
* support it in the Blob constructor.
*/
function mapArrayBufferViews(ary) {
for (var i = 0; i < ary.length; i++) {
var chunk = ary[i];
if (chunk.buffer instanceof ArrayBuffer) {
var buf = chunk.buffer;
// if this is a subarray, make a copy so we only
// include the subarray region from the underlying buffer
if (chunk.byteLength !== buf.byteLength) {
var copy = new Uint8Array(chunk.byteLength);
copy.set(new Uint8Array(buf, chunk.byteOffset, chunk.byteLength));
buf = copy.buffer;
}
ary[i] = buf;
}
}
}
function BlobBuilderConstructor(ary, options) {
options = options || {};
var bb = new BlobBuilder();
mapArrayBufferViews(ary);
for (var i = 0; i < ary.length; i++) {
bb.append(ary[i]);
}
return (options.type) ? bb.getBlob(options.type) : bb.getBlob();
};
function BlobConstructor(ary, options) {
mapArrayBufferViews(ary);
return new Blob(ary, options || {});
};
module.exports = (function() {
if (blobSupported) {
return blobSupportsArrayBufferView ? global.Blob : BlobConstructor;
} else if (blobBuilderSupported) {
return BlobBuilderConstructor;
} else {
return undefined;
}
})();
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
/***/ },
/* 19 */
/***/ function(module, exports, __webpack_require__) {
/**
* Expose `Emitter`.
*/
if (true) {
module.exports = Emitter;
}
/**
* Initialize a new `Emitter`.
*
* @api public
*/
function Emitter(obj) {
if (obj) return mixin(obj);
};
/**
* Mixin the emitter properties.
*
* @param {Object} obj
* @return {Object}
* @api private
*/
function mixin(obj) {
for (var key in Emitter.prototype) {
obj[key] = Emitter.prototype[key];
}
return obj;
}
/**
* Listen on the given `event` with `fn`.
*
* @param {String} event
* @param {Function} fn
* @return {Emitter}
* @api public
*/
Emitter.prototype.on =
Emitter.prototype.addEventListener = function(event, fn){
this._callbacks = this._callbacks || {};
(this._callbacks['$' + event] = this._callbacks['$' + event] || [])
.push(fn);
return this;
};
/**
* Adds an `event` listener that will be invoked a single
* time then automatically removed.
*
* @param {String} event
* @param {Function} fn
* @return {Emitter}
* @api public
*/
Emitter.prototype.once = function(event, fn){
function on() {
this.off(event, on);
fn.apply(this, arguments);
}
on.fn = fn;
this.on(event, on);
return this;
};
/**
* Remove the given callback for `event` or all
* registered callbacks.
*
* @param {String} event
* @param {Function} fn
* @return {Emitter}
* @api public
*/
Emitter.prototype.off =
Emitter.prototype.removeListener =
Emitter.prototype.removeAllListeners =
Emitter.prototype.removeEventListener = function(event, fn){
this._callbacks = this._callbacks || {};
// all
if (0 == arguments.length) {
this._callbacks = {};
return this;
}
// specific event
var callbacks = this._callbacks['$' + event];
if (!callbacks) return this;
// remove all handlers
if (1 == arguments.length) {
delete this._callbacks['$' + event];
return this;
}
// remove specific handler
var cb;
for (var i = 0; i < callbacks.length; i++) {
cb = callbacks[i];
if (cb === fn || cb.fn === fn) {
callbacks.splice(i, 1);
break;
}
}
return this;
};
/**
* Emit `event` with the given args.
*
* @param {String} event
* @param {Mixed} ...
* @return {Emitter}
*/
Emitter.prototype.emit = function(event){
this._callbacks = this._callbacks || {};
var args = [].slice.call(arguments, 1)
, callbacks = this._callbacks['$' + event];
if (callbacks) {
callbacks = callbacks.slice(0);
for (var i = 0, len = callbacks.length; i < len; ++i) {
callbacks[i].apply(this, args);
}
}
return this;
};
/**
* Return array of callbacks for `event`.
*
* @param {String} event
* @return {Array}
* @api public
*/
Emitter.prototype.listeners = function(event){
this._callbacks = this._callbacks || {};
return this._callbacks['$' + event] || [];
};
/**
* Check if this emitter has `event` handlers.
*
* @param {String} event
* @return {Boolean}
* @api public
*/
Emitter.prototype.hasListeners = function(event){
return !! this.listeners(event).length;
};
/***/ },
/* 20 */
/***/ function(module, exports) {
/**
* Compiles a querystring
* Returns string representation of the object
*
* @param {Object}
* @api private
*/
exports.encode = function (obj) {
var str = '';
for (var i in obj) {
if (obj.hasOwnProperty(i)) {
if (str.length) str += '&';
str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]);
}
}
return str;
};
/**
* Parses a simple querystring into an object
*
* @param {String} qs
* @api private
*/
exports.decode = function(qs){
var qry = {};
var pairs = qs.split('&');
for (var i = 0, l = pairs.length; i < l; i++) {
var pair = pairs[i].split('=');
qry[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
}
return qry;
};
/***/ },
/* 21 */
/***/ function(module, exports) {
module.exports = function(a, b){
var fn = function(){};
fn.prototype = b.prototype;
a.prototype = new fn;
a.prototype.constructor = a;
};
/***/ },
/* 22 */
/***/ function(module, exports) {
'use strict';
var alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'.split('')
, length = 64
, map = {}
, seed = 0
, i = 0
, prev;
/**
* Return a string representing the specified number.
*
* @param {Number} num The number to convert.
* @returns {String} The string representation of the number.
* @api public
*/
function encode(num) {
var encoded = '';
do {
encoded = alphabet[num % length] + encoded;
num = Math.floor(num / length);
} while (num > 0);
return encoded;
}
/**
* Return the integer value specified by the given string.
*
* @param {String} str The string to convert.
* @returns {Number} The integer value represented by the string.
* @api public
*/
function decode(str) {
var decoded = 0;
for (i = 0; i < str.length; i++) {
decoded = decoded * length + map[str.charAt(i)];
}
return decoded;
}
/**
* Yeast: A tiny growing id generator.
*
* @returns {String} A unique id.
* @api public
*/
function yeast() {
var now = encode(+new Date());
if (now !== prev) return seed = 0, prev = now;
return now +'.'+ encode(seed++);
}
//
// Map each character to its index.
//
for (; i < length; i++) map[alphabet[i]] = i;
//
// Expose the `yeast`, `encode` and `decode` functions.
//
yeast.encode = encode;
yeast.decode = decode;
module.exports = yeast;
/***/ },
/* 23 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {
/**
* This is the web browser implementation of `debug()`.
*
* Expose `debug()` as the module.
*/
exports = module.exports = __webpack_require__(25);
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.storage = 'undefined' != typeof chrome
&& 'undefined' != typeof chrome.storage
? chrome.storage.local
: localstorage();
/**
* Colors.
*/
exports.colors = [
'lightseagreen',
'forestgreen',
'goldenrod',
'dodgerblue',
'darkorchid',
'crimson'
];
/**
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
* and the Firebug extension (any Firefox version) are known
* to support "%c" CSS customizations.
*
* TODO: add a `localStorage` variable to explicitly enable/disable colors
*/
function useColors() {
// is webkit? http://stackoverflow.com/a/16459606/376773
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
return (typeof document !== 'undefined' && 'WebkitAppearance' in document.documentElement.style) ||
// is firebug? http://stackoverflow.com/a/398120/376773
(window.console && (console.firebug || (console.exception && console.table))) ||
// is firefox >= v31?
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
(navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31);
}
/**
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
*/
exports.formatters.j = function(v) {
try {
return JSON.stringify(v);
} catch (err) {
return '[UnexpectedJSONParseError]: ' + err.message;
}
};
/**
* Colorize log arguments if enabled.
*
* @api public
*/
function formatArgs() {
var args = arguments;
var useColors = this.useColors;
args[0] = (useColors ? '%c' : '')
+ this.namespace
+ (useColors ? ' %c' : ' ')
+ args[0]
+ (useColors ? '%c ' : ' ')
+ '+' + exports.humanize(this.diff);
if (!useColors) return args;
var c = 'color: ' + this.color;
args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));
// the final "%c" is somewhat tricky, because there could be other
// arguments passed either before or after the %c, so we need to
// figure out the correct index to insert the CSS into
var index = 0;
var lastC = 0;
args[0].replace(/%[a-z%]/g, function(match) {
if ('%%' === match) return;
index++;
if ('%c' === match) {
// we only are interested in the *last* %c
// (the user may have provided their own)
lastC = index;
}
});
args.splice(lastC, 0, c);
return args;
}
/**
* Invokes `console.log()` when available.
* No-op when `console.log` is not a "function".
*
* @api public
*/
function log() {
// this hackery is required for IE8/9, where
// the `console.log` function doesn't have 'apply'
return 'object' === typeof console
&& console.log
&& Function.prototype.apply.call(console.log, console, arguments);
}
/**
* Save `namespaces`.
*
* @param {String} namespaces
* @api private
*/
function save(namespaces) {
try {
if (null == namespaces) {
exports.storage.removeItem('debug');
} else {
exports.storage.debug = namespaces;
}
} catch(e) {}
}
/**
* Load `namespaces`.
*
* @return {String} returns the previously persisted debug modes
* @api private
*/
function load() {
var r;
try {
return exports.storage.debug;
} catch(e) {}
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
if (typeof process !== 'undefined' && 'env' in process) {
return process.env.DEBUG;
}
}
/**
* Enable namespaces listed in `localStorage.debug` initially.
*/
exports.enable(load());
/**
* Localstorage attempts to return the localstorage.
*
* This is necessary because safari throws
* when a user disables cookies/localstorage
* and you attempt to access it.
*
* @return {LocalStorage}
* @api private
*/
function localstorage(){
try {
return window.localStorage;
} catch (e) {}
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(24)))
/***/ },
/* 24 */
/***/ function(module, exports) {
// shim for using process in browser
var process = module.exports = {};
// cached from whatever global is present so that test runners that stub it
// don't break things. But we need to wrap it in a try catch in case it is
// wrapped in strict mode code which doesn't define any globals. It's inside a
// function because try/catches deoptimize in certain engines.
var cachedSetTimeout;
var cachedClearTimeout;
function defaultSetTimout() {
throw new Error('setTimeout has not been defined');
}
function defaultClearTimeout () {
throw new Error('clearTimeout has not been defined');
}
(function () {
try {
if (typeof setTimeout === 'function') {
cachedSetTimeout = setTimeout;
} else {
cachedSetTimeout = defaultSetTimout;
}
} catch (e) {
cachedSetTimeout = defaultSetTimout;
}
try {
if (typeof clearTimeout === 'function') {
cachedClearTimeout = clearTimeout;
} else {
cachedClearTimeout = defaultClearTimeout;
}
} catch (e) {
cachedClearTimeout = defaultClearTimeout;
}
} ())
function runTimeout(fun) {
if (cachedSetTimeout === setTimeout) {
//normal enviroments in sane situations
return setTimeout(fun, 0);
}
// if setTimeout wasn't available but was latter defined
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
cachedSetTimeout = setTimeout;
return setTimeout(fun, 0);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedSetTimeout(fun, 0);
} catch(e){
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedSetTimeout.call(null, fun, 0);
} catch(e){
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
return cachedSetTimeout.call(this, fun, 0);
}
}
}
function runClearTimeout(marker) {
if (cachedClearTimeout === clearTimeout) {
//normal enviroments in sane situations
return clearTimeout(marker);
}
// if clearTimeout wasn't available but was latter defined
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
cachedClearTimeout = clearTimeout;
return clearTimeout(marker);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedClearTimeout(marker);
} catch (e){
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedClearTimeout.call(null, marker);
} catch (e){
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
return cachedClearTimeout.call(this, marker);
}
}
}
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;
function cleanUpNextTick() {
if (!draining || !currentQueue) {
return;
}
draining = false;
if (currentQueue.length) {
queue = currentQueue.concat(queue);
} else {
queueIndex = -1;
}
if (queue.length) {
drainQueue();
}
}
function drainQueue() {
if (draining) {
return;
}
var timeout = runTimeout(cleanUpNextTick);
draining = true;
var len = queue.length;
while(len) {
currentQueue = queue;
queue = [];
while (++queueIndex < len) {
if (currentQueue) {
currentQueue[queueIndex].run();
}
}
queueIndex = -1;
len = queue.length;
}
currentQueue = null;
draining = false;
runClearTimeout(timeout);
}
process.nextTick = function (fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) {
for (var i = 1; i < arguments.length; i++) {
args[i - 1] = arguments[i];
}
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
runTimeout(drainQueue);
}
};
// v8 likes predictible objects
function Item(fun, array) {
this.fun = fun;
this.array = array;
}
Item.prototype.run = function () {
this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};
function noop() {}
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.binding = function (name) {
throw new Error('process.binding is not supported');
};
process.cwd = function () { return '/' };
process.chdir = function (dir) {
throw new Error('process.chdir is not supported');
};
process.umask = function() { return 0; };
/***/ },
/* 25 */
/***/ function(module, exports, __webpack_require__) {
/**
* This is the common logic for both the Node.js and web browser
* implementations of `debug()`.
*
* Expose `debug()` as the module.
*/
exports = module.exports = debug.debug = debug;
exports.coerce = coerce;
exports.disable = disable;
exports.enable = enable;
exports.enabled = enabled;
exports.humanize = __webpack_require__(26);
/**
* The currently active debug mode names, and names to skip.
*/
exports.names = [];
exports.skips = [];
/**
* Map of special "%n" handling functions, for the debug "format" argument.
*
* Valid key names are a single, lowercased letter, i.e. "n".
*/
exports.formatters = {};
/**
* Previously assigned color.
*/
var prevColor = 0;
/**
* Previous log timestamp.
*/
var prevTime;
/**
* Select a color.
*
* @return {Number}
* @api private
*/
function selectColor() {
return exports.colors[prevColor++ % exports.colors.length];
}
/**
* Create a debugger with the given `namespace`.
*
* @param {String} namespace
* @return {Function}
* @api public
*/
function debug(namespace) {
// define the `disabled` version
function disabled() {
}
disabled.enabled = false;
// define the `enabled` version
function enabled() {
var self = enabled;
// set `diff` timestamp
var curr = +new Date();
var ms = curr - (prevTime || curr);
self.diff = ms;
self.prev = prevTime;
self.curr = curr;
prevTime = curr;
// add the `color` if not set
if (null == self.useColors) self.useColors = exports.useColors();
if (null == self.color && self.useColors) self.color = selectColor();
var args = new Array(arguments.length);
for (var i = 0; i < args.length; i++) {
args[i] = arguments[i];
}
args[0] = exports.coerce(args[0]);
if ('string' !== typeof args[0]) {
// anything else let's inspect with %o
args = ['%o'].concat(args);
}
// apply any `formatters` transformations
var index = 0;
args[0] = args[0].replace(/%([a-z%])/g, function(match, format) {
// if we encounter an escaped % then don't increase the array index
if (match === '%%') return match;
index++;
var formatter = exports.formatters[format];
if ('function' === typeof formatter) {
var val = args[index];
match = formatter.call(self, val);
// now we need to remove `args[index]` since it's inlined in the `format`
args.splice(index, 1);
index--;
}
return match;
});
// apply env-specific formatting
args = exports.formatArgs.apply(self, args);
var logFn = enabled.log || exports.log || console.log.bind(console);
logFn.apply(self, args);
}
enabled.enabled = true;
var fn = exports.enabled(namespace) ? enabled : disabled;
fn.namespace = namespace;
return fn;
}
/**
* Enables a debug mode by namespaces. This can include modes
* separated by a colon and wildcards.
*
* @param {String} namespaces
* @api public
*/
function enable(namespaces) {
exports.save(namespaces);
var split = (namespaces || '').split(/[\s,]+/);
var len = split.length;
for (var i = 0; i < len; i++) {
if (!split[i]) continue; // ignore empty strings
namespaces = split[i].replace(/[\\^$+?.()|[\]{}]/g, '\\$&').replace(/\*/g, '.*?');
if (namespaces[0] === '-') {
exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
} else {
exports.names.push(new RegExp('^' + namespaces + '$'));
}
}
}
/**
* Disable debug output.
*
* @api public
*/
function disable() {
exports.enable('');
}
/**
* Returns true if the given mode name is enabled, false otherwise.
*
* @param {String} name
* @return {Boolean}
* @api public
*/
function enabled(name) {
var i, len;
for (i = 0, len = exports.skips.length; i < len; i++) {
if (exports.skips[i].test(name)) {
return false;
}
}
for (i = 0, len = exports.names.length; i < len; i++) {
if (exports.names[i].test(name)) {
return true;
}
}
return false;
}
/**
* Coerce `val`.
*
* @param {Mixed} val
* @return {Mixed}
* @api private
*/
function coerce(val) {
if (val instanceof Error) return val.stack || val.message;
return val;
}
/***/ },
/* 26 */
/***/ function(module, exports) {
/**
* Helpers.
*/
var s = 1000
var m = s * 60
var h = m * 60
var d = h * 24
var y = d * 365.25
/**
* Parse or format the given `val`.
*
* Options:
*
* - `long` verbose formatting [false]
*
* @param {String|Number} val
* @param {Object} options
* @throws {Error} throw an error if val is not a non-empty string or a number
* @return {String|Number}
* @api public
*/
module.exports = function (val, options) {
options = options || {}
var type = typeof val
if (type === 'string' && val.length > 0) {
return parse(val)
} else if (type === 'number' && isNaN(val) === false) {
return options.long ?
fmtLong(val) :
fmtShort(val)
}
throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val))
}
/**
* Parse the given `str` and return milliseconds.
*
* @param {String} str
* @return {Number}
* @api private
*/
function parse(str) {
str = String(str)
if (str.length > 10000) {
return
}
var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str)
if (!match) {
return
}
var n = parseFloat(match[1])
var type = (match[2] || 'ms').toLowerCase()
switch (type) {
case 'years':
case 'year':
case 'yrs':
case 'yr':
case 'y':
return n * y
case 'days':
case 'day':
case 'd':
return n * d
case 'hours':
case 'hour':
case 'hrs':
case 'hr':
case 'h':
return n * h
case 'minutes':
case 'minute':
case 'mins':
case 'min':
case 'm':
return n * m
case 'seconds':
case 'second':
case 'secs':
case 'sec':
case 's':
return n * s
case 'milliseconds':
case 'millisecond':
case 'msecs':
case 'msec':
case 'ms':
return n
default:
return undefined
}
}
/**
* Short format for `ms`.
*
* @param {Number} ms
* @return {String}
* @api private
*/
function fmtShort(ms) {
if (ms >= d) {
return Math.round(ms / d) + 'd'
}
if (ms >= h) {
return Math.round(ms / h) + 'h'
}
if (ms >= m) {
return Math.round(ms / m) + 'm'
}
if (ms >= s) {
return Math.round(ms / s) + 's'
}
return ms + 'ms'
}
/**
* Long format for `ms`.
*
* @param {Number} ms
* @return {String}
* @api private
*/
function fmtLong(ms) {
return plural(ms, d, 'day') ||
plural(ms, h, 'hour') ||
plural(ms, m, 'minute') ||
plural(ms, s, 'second') ||
ms + ' ms'
}
/**
* Pluralization helper.
*/
function plural(ms, n, name) {
if (ms < n) {
return
}
if (ms < n * 1.5) {
return Math.floor(ms / n) + ' ' + name
}
return Math.ceil(ms / n) + ' ' + name + 's'
}
/***/ },
/* 27 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {'use strict';
/**
* Module requirements.
*/
var Polling = __webpack_require__(7);
var inherit = __webpack_require__(21);
/**
* Module exports.
*/
module.exports = JSONPPolling;
/**
* Cached regular expressions.
*/
var rNewline = /\n/g;
var rEscapedNewline = /\\n/g;
/**
* Global JSONP callbacks.
*/
var callbacks;
/**
* Noop.
*/
function empty() {}
/**
* JSONP Polling constructor.
*
* @param {Object} opts.
* @api public
*/
function JSONPPolling(opts) {
Polling.call(this, opts);
this.query = this.query || {};
// define global callbacks array if not present
// we do this here (lazily) to avoid unneeded global pollution
if (!callbacks) {
// we need to consider multiple engines in the same page
if (!global.___eio) global.___eio = [];
callbacks = global.___eio;
}
// callback identifier
this.index = callbacks.length;
// add callback to jsonp global
var self = this;
callbacks.push(function (msg) {
self.onData(msg);
});
// append to query string
this.query.j = this.index;
// prevent spurious errors from being emitted when the window is unloaded
if (global.document && global.addEventListener) {
global.addEventListener('beforeunload', function () {
if (self.script) self.script.onerror = empty;
}, false);
}
}
/**
* Inherits from Polling.
*/
inherit(JSONPPolling, Polling);
/*
* JSONP only supports binary as base64 encoded strings
*/
JSONPPolling.prototype.supportsBinary = false;
/**
* Closes the socket.
*
* @api private
*/
JSONPPolling.prototype.doClose = function () {
if (this.script) {
this.script.parentNode.removeChild(this.script);
this.script = null;
}
if (this.form) {
this.form.parentNode.removeChild(this.form);
this.form = null;
this.iframe = null;
}
Polling.prototype.doClose.call(this);
};
/**
* Starts a poll cycle.
*
* @api private
*/
JSONPPolling.prototype.doPoll = function () {
var self = this;
var script = document.createElement('script');
if (this.script) {
this.script.parentNode.removeChild(this.script);
this.script = null;
}
script.async = true;
script.src = this.uri();
script.onerror = function (e) {
self.onError('jsonp poll error', e);
};
var insertAt = document.getElementsByTagName('script')[0];
if (insertAt) {
insertAt.parentNode.insertBefore(script, insertAt);
} else {
(document.head || document.body).appendChild(script);
}
this.script = script;
var isUAgecko = 'undefined' !== typeof navigator && /gecko/i.test(navigator.userAgent);
if (isUAgecko) {
setTimeout(function () {
var iframe = document.createElement('iframe');
document.body.appendChild(iframe);
document.body.removeChild(iframe);
}, 100);
}
};
/**
* Writes with a hidden iframe.
*
* @param {String} data to send
* @param {Function} called upon flush.
* @api private
*/
JSONPPolling.prototype.doWrite = function (data, fn) {
var self = this;
if (!this.form) {
var form = document.createElement('form');
var area = document.createElement('textarea');
var id = this.iframeId = 'eio_iframe_' + this.index;
var iframe;
form.className = 'socketio';
form.style.position = 'absolute';
form.style.top = '-1000px';
form.style.left = '-1000px';
form.target = id;
form.method = 'POST';
form.setAttribute('accept-charset', 'utf-8');
area.name = 'd';
form.appendChild(area);
document.body.appendChild(form);
this.form = form;
this.area = area;
}
this.form.action = this.uri();
function complete() {
initIframe();
fn();
}
function initIframe() {
if (self.iframe) {
try {
self.form.removeChild(self.iframe);
} catch (e) {
self.onError('jsonp polling iframe removal error', e);
}
}
try {
// ie6 dynamic iframes with target="" support (thanks Chris Lambacher)
var html = '<iframe src="javascript:0" name="' + self.iframeId + '">';
iframe = document.createElement(html);
} catch (e) {
iframe = document.createElement('iframe');
iframe.name = self.iframeId;
iframe.src = 'javascript:0';
}
iframe.id = self.iframeId;
self.form.appendChild(iframe);
self.iframe = iframe;
}
initIframe();
// escape \n to prevent it from being converted into \r\n by some UAs
// double escaping is required for escaped new lines because unescaping of new lines can be done safely on server-side
data = data.replace(rEscapedNewline, '\\\n');
this.area.value = data.replace(rNewline, '\\n');
try {
this.form.submit();
} catch (e) {}
if (this.iframe.attachEvent) {
this.iframe.onreadystatechange = function () {
if (self.iframe.readyState === 'complete') {
complete();
}
};
} else {
this.iframe.onload = complete;
}
};
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
/***/ },
/* 28 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {'use strict';
/**
* Module dependencies.
*/
var Transport = __webpack_require__(8);
var parser = __webpack_require__(9);
var parseqs = __webpack_require__(20);
var inherit = __webpack_require__(21);
var yeast = __webpack_require__(22);
var debug = __webpack_require__(23)('engine.io-client:websocket');
var BrowserWebSocket = global.WebSocket || global.MozWebSocket;
var NodeWebSocket;
if (typeof window === 'undefined') {
try {
NodeWebSocket = __webpack_require__(29);
} catch (e) {}
}
/**
* Get either the `WebSocket` or `MozWebSocket` globals
* in the browser or try to resolve WebSocket-compatible
* interface exposed by `ws` for Node-like environment.
*/
var WebSocket = BrowserWebSocket;
if (!WebSocket && typeof window === 'undefined') {
WebSocket = NodeWebSocket;
}
/**
* Module exports.
*/
module.exports = WS;
/**
* WebSocket transport constructor.
*
* @api {Object} connection options
* @api public
*/
function WS(opts) {
var forceBase64 = opts && opts.forceBase64;
if (forceBase64) {
this.supportsBinary = false;
}
this.perMessageDeflate = opts.perMessageDeflate;
this.usingBrowserWebSocket = BrowserWebSocket && !opts.forceNode;
if (!this.usingBrowserWebSocket) {
WebSocket = NodeWebSocket;
}
Transport.call(this, opts);
}
/**
* Inherits from Transport.
*/
inherit(WS, Transport);
/**
* Transport name.
*
* @api public
*/
WS.prototype.name = 'websocket';
/*
* WebSockets support binary
*/
WS.prototype.supportsBinary = true;
/**
* Opens socket.
*
* @api private
*/
WS.prototype.doOpen = function () {
if (!this.check()) {
// let probe timeout
return;
}
var uri = this.uri();
var protocols = void 0;
var opts = {
agent: this.agent,
perMessageDeflate: this.perMessageDeflate
};
// SSL options for Node.js client
opts.pfx = this.pfx;
opts.key = this.key;
opts.passphrase = this.passphrase;
opts.cert = this.cert;
opts.ca = this.ca;
opts.ciphers = this.ciphers;
opts.rejectUnauthorized = this.rejectUnauthorized;
if (this.extraHeaders) {
opts.headers = this.extraHeaders;
}
if (this.localAddress) {
opts.localAddress = this.localAddress;
}
try {
this.ws = this.usingBrowserWebSocket ? new WebSocket(uri) : new WebSocket(uri, protocols, opts);
} catch (err) {
return this.emit('error', err);
}
if (this.ws.binaryType === undefined) {
this.supportsBinary = false;
}
if (this.ws.supports && this.ws.supports.binary) {
this.supportsBinary = true;
this.ws.binaryType = 'nodebuffer';
} else {
this.ws.binaryType = 'arraybuffer';
}
this.addEventListeners();
};
/**
* Adds event listeners to the socket
*
* @api private
*/
WS.prototype.addEventListeners = function () {
var self = this;
this.ws.onopen = function () {
self.onOpen();
};
this.ws.onclose = function () {
self.onClose();
};
this.ws.onmessage = function (ev) {
self.onData(ev.data);
};
this.ws.onerror = function (e) {
self.onError('websocket error', e);
};
};
/**
* Writes data to socket.
*
* @param {Array} array of packets.
* @api private
*/
WS.prototype.write = function (packets) {
var self = this;
this.writable = false;
// encodePacket efficient as it uses WS framing
// no need for encodePayload
var total = packets.length;
for (var i = 0, l = total; i < l; i++) {
(function (packet) {
parser.encodePacket(packet, self.supportsBinary, function (data) {
if (!self.usingBrowserWebSocket) {
// always create a new object (GH-437)
var opts = {};
if (packet.options) {
opts.compress = packet.options.compress;
}
if (self.perMessageDeflate) {
var len = 'string' === typeof data ? global.Buffer.byteLength(data) : data.length;
if (len < self.perMessageDeflate.threshold) {
opts.compress = false;
}
}
}
// Sometimes the websocket has already been closed but the browser didn't
// have a chance of informing us about it yet, in that case send will
// throw an error
try {
if (self.usingBrowserWebSocket) {
// TypeError is thrown when passing the second argument on Safari
self.ws.send(data);
} else {
self.ws.send(data, opts);
}
} catch (e) {
debug('websocket closed before onclose event');
}
--total || done();
});
})(packets[i]);
}
function done() {
self.emit('flush');
// fake drain
// defer to next tick to allow Socket to clear writeBuffer
setTimeout(function () {
self.writable = true;
self.emit('drain');
}, 0);
}
};
/**
* Called upon close
*
* @api private
*/
WS.prototype.onClose = function () {
Transport.prototype.onClose.call(this);
};
/**
* Closes socket.
*
* @api private
*/
WS.prototype.doClose = function () {
if (typeof this.ws !== 'undefined') {
this.ws.close();
}
};
/**
* Generates uri for connection.
*
* @api private
*/
WS.prototype.uri = function () {
var query = this.query || {};
var schema = this.secure ? 'wss' : 'ws';
var port = '';
// avoid port if default for schema
if (this.port && ('wss' === schema && Number(this.port) !== 443 || 'ws' === schema && Number(this.port) !== 80)) {
port = ':' + this.port;
}
// append timestamp to URI
if (this.timestampRequests) {
query[this.timestampParam] = yeast();
}
// communicate binary support capabilities
if (!this.supportsBinary) {
query.b64 = 1;
}
query = parseqs.encode(query);
// prepend ? to query
if (query.length) {
query = '?' + query;
}
var ipv6 = this.hostname.indexOf(':') !== -1;
return schema + '://' + (ipv6 ? '[' + this.hostname + ']' : this.hostname) + port + this.path + query;
};
/**
* Feature detection for WebSocket.
*
* @return {Boolean} whether this transport is available.
* @api public
*/
WS.prototype.check = function () {
return !!WebSocket && !('__initialize' in WebSocket && this.name === WS.prototype.name);
};
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
/***/ },
/* 29 */
/***/ function(module, exports) {
/* (ignored) */
/***/ },
/* 30 */
/***/ function(module, exports) {
var indexOf = [].indexOf;
module.exports = function(arr, obj){
if (indexOf) return arr.indexOf(obj);
for (var i = 0; i < arr.length; ++i) {
if (arr[i] === obj) return i;
}
return -1;
};
/***/ },
/* 31 */
/***/ function(module, exports) {
/**
* Parses an URI
*
* @author Steven Levithan <stevenlevithan.com> (MIT license)
* @api private
*/
var re = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/;
var parts = [
'source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'
];
module.exports = function parseuri(str) {
var src = str,
b = str.indexOf('['),
e = str.indexOf(']');
if (b != -1 && e != -1) {
str = str.substring(0, b) + str.substring(b, e).replace(/:/g, ';') + str.substring(e, str.length);
}
var m = re.exec(str || ''),
uri = {},
i = 14;
while (i--) {
uri[parts[i]] = m[i] || '';
}
if (b != -1 && e != -1) {
uri.source = src;
uri.host = uri.host.substring(1, uri.host.length - 1).replace(/;/g, ':');
uri.authority = uri.authority.replace('[', '').replace(']', '').replace(/;/g, ':');
uri.ipv6uri = true;
}
return uri;
};
/***/ },
/* 32 */
/***/ function(module, exports) {
/* WEBPACK VAR INJECTION */(function(global) {/**
* JSON parse.
*
* @see Based on jQuery#parseJSON (MIT) and JSON2
* @api private
*/
var rvalidchars = /^[\],:{}\s]*$/;
var rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g;
var rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g;
var rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g;
var rtrimLeft = /^\s+/;
var rtrimRight = /\s+$/;
module.exports = function parsejson(data) {
if ('string' != typeof data || !data) {
return null;
}
data = data.replace(rtrimLeft, '').replace(rtrimRight, '');
// Attempt to parse using the native JSON parser first
if (global.JSON && JSON.parse) {
return JSON.parse(data);
}
if (rvalidchars.test(data.replace(rvalidescape, '@')
.replace(rvalidtokens, ']')
.replace(rvalidbraces, ''))) {
return (new Function('return ' + data))();
}
};
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
/***/ }
/******/ ])
});
;
|
src/Alert.js
|
sunnylqm/amazeui-react
|
'use strict';
var React = require('react');
var classNames = require('classnames');
var ClassNameMixin = require('./mixins/ClassNameMixin');
var Alert = React.createClass({
mixins: [ClassNameMixin],
propTypes: {
classPrefix: React.PropTypes.string.isRequired,
amStyle: React.PropTypes.oneOf(['secondary', 'success', 'warning',
'danger']),
onClose: React.PropTypes.func
},
getDefaultProps: function() {
return {
classPrefix: 'alert'
};
},
renderCloseBtn: function() {
return (
<button
type='button'
className={this.setClassNamespace('close')}
onClick={this.props.onClose}>
×
</button>
);
},
render: function() {
var classSet = this.getClassSet();
var isCloseable = !!this.props.onClose;
if (this.props.amStyle) {
classSet[this.prefixClass(this.props.amStyle)] = true;
}
classSet[this.prefixClass('closeable')] = isCloseable;
return (
<div
{...this.props}
className={classNames(this.props.className, classSet)}>
{isCloseable ? this.renderCloseBtn() : null}
{this.props.children}
</div>
);
}
});
module.exports = Alert;
|
ajax/libs/recharts/0.13.2/Recharts.js
|
cdnjs/cdnjs
|
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"), require("ReactDOMServer"), require("ReactTransitionGroup"), require("ReactDOM"));
else if(typeof define === 'function' && define.amd)
define(["react", "ReactDOMServer", "ReactTransitionGroup", "ReactDOM"], factory);
else if(typeof exports === 'object')
exports["Recharts"] = factory(require("react"), require("ReactDOMServer"), require("ReactTransitionGroup"), require("ReactDOM"));
else
root["Recharts"] = factory(root["React"], root["ReactDOMServer"], root["ReactTransitionGroup"], root["ReactDOM"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_43__, __WEBPACK_EXTERNAL_MODULE_128__, __WEBPACK_EXTERNAL_MODULE_195__, __WEBPACK_EXTERNAL_MODULE_199__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ((function(modules) {
// Check all modules for deduplicated modules
for(var i in modules) {
if(Object.prototype.hasOwnProperty.call(modules, i)) {
switch(typeof modules[i]) {
case "function": break;
case "object":
// Module can be created from a template
modules[i] = (function(_m) {
var args = _m.slice(1), fn = modules[_m[0]];
return function (a,b,c) {
fn.apply(this, [a,b,c].concat(args));
};
}(modules[i]));
break;
default:
// Module is a copy of another module
modules[i] = modules[modules[i]];
break;
}
}
}
return modules;
}([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
__webpack_require__(1);
module.exports = __webpack_require__(1);
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ComposedChart = exports.RadialBarChart = exports.AreaChart = exports.ScatterChart = exports.RadarChart = exports.Sankey = exports.Treemap = exports.PieChart = exports.BarChart = exports.LineChart = exports.ZAxis = exports.YAxis = exports.XAxis = exports.Scatter = exports.Bar = exports.Area = exports.Line = exports.CartesianGrid = exports.CartesianAxis = exports.ReferenceDot = exports.ReferenceLine = exports.Brush = exports.RadialBar = exports.Radar = exports.Pie = exports.PolarAngleAxis = exports.PolarRadiusAxis = exports.PolarGrid = exports.Symbols = exports.Cross = exports.Dot = exports.Polygon = exports.Rectangle = exports.Curve = exports.Sector = exports.Cell = exports.ResponsiveContainer = exports.Tooltip = exports.Legend = exports.Layer = exports.Surface = undefined;
__webpack_require__(2);
__webpack_require__(3);
var _Surface2 = __webpack_require__(42);
var _Surface3 = _interopRequireDefault(_Surface2);
var _Layer2 = __webpack_require__(45);
var _Layer3 = _interopRequireDefault(_Layer2);
var _Legend2 = __webpack_require__(46);
var _Legend3 = _interopRequireDefault(_Legend2);
var _Tooltip2 = __webpack_require__(135);
var _Tooltip3 = _interopRequireDefault(_Tooltip2);
var _ResponsiveContainer2 = __webpack_require__(197);
var _ResponsiveContainer3 = _interopRequireDefault(_ResponsiveContainer2);
var _Cell2 = __webpack_require__(216);
var _Cell3 = _interopRequireDefault(_Cell2);
var _Sector2 = __webpack_require__(217);
var _Sector3 = _interopRequireDefault(_Sector2);
var _Curve2 = __webpack_require__(219);
var _Curve3 = _interopRequireDefault(_Curve2);
var _Rectangle2 = __webpack_require__(220);
var _Rectangle3 = _interopRequireDefault(_Rectangle2);
var _Polygon2 = __webpack_require__(221);
var _Polygon3 = _interopRequireDefault(_Polygon2);
var _Dot2 = __webpack_require__(222);
var _Dot3 = _interopRequireDefault(_Dot2);
var _Cross2 = __webpack_require__(223);
var _Cross3 = _interopRequireDefault(_Cross2);
var _Symbols2 = __webpack_require__(130);
var _Symbols3 = _interopRequireDefault(_Symbols2);
var _PolarGrid2 = __webpack_require__(224);
var _PolarGrid3 = _interopRequireDefault(_PolarGrid2);
var _PolarRadiusAxis2 = __webpack_require__(225);
var _PolarRadiusAxis3 = _interopRequireDefault(_PolarRadiusAxis2);
var _PolarAngleAxis2 = __webpack_require__(229);
var _PolarAngleAxis3 = _interopRequireDefault(_PolarAngleAxis2);
var _Pie2 = __webpack_require__(230);
var _Pie3 = _interopRequireDefault(_Pie2);
var _Radar2 = __webpack_require__(232);
var _Radar3 = _interopRequireDefault(_Radar2);
var _RadialBar2 = __webpack_require__(233);
var _RadialBar3 = _interopRequireDefault(_RadialBar2);
var _Brush2 = __webpack_require__(235);
var _Brush3 = _interopRequireDefault(_Brush2);
var _ReferenceLine2 = __webpack_require__(248);
var _ReferenceLine3 = _interopRequireDefault(_ReferenceLine2);
var _ReferenceDot2 = __webpack_require__(249);
var _ReferenceDot3 = _interopRequireDefault(_ReferenceDot2);
var _CartesianAxis2 = __webpack_require__(250);
var _CartesianAxis3 = _interopRequireDefault(_CartesianAxis2);
var _CartesianGrid2 = __webpack_require__(251);
var _CartesianGrid3 = _interopRequireDefault(_CartesianGrid2);
var _Line2 = __webpack_require__(252);
var _Line3 = _interopRequireDefault(_Line2);
var _Area2 = __webpack_require__(253);
var _Area3 = _interopRequireDefault(_Area2);
var _Bar2 = __webpack_require__(254);
var _Bar3 = _interopRequireDefault(_Bar2);
var _Scatter2 = __webpack_require__(255);
var _Scatter3 = _interopRequireDefault(_Scatter2);
var _XAxis2 = __webpack_require__(256);
var _XAxis3 = _interopRequireDefault(_XAxis2);
var _YAxis2 = __webpack_require__(257);
var _YAxis3 = _interopRequireDefault(_YAxis2);
var _ZAxis2 = __webpack_require__(258);
var _ZAxis3 = _interopRequireDefault(_ZAxis2);
var _LineChart2 = __webpack_require__(259);
var _LineChart3 = _interopRequireDefault(_LineChart2);
var _BarChart2 = __webpack_require__(266);
var _BarChart3 = _interopRequireDefault(_BarChart2);
var _PieChart2 = __webpack_require__(267);
var _PieChart3 = _interopRequireDefault(_PieChart2);
var _Treemap2 = __webpack_require__(268);
var _Treemap3 = _interopRequireDefault(_Treemap2);
var _Sankey2 = __webpack_require__(269);
var _Sankey3 = _interopRequireDefault(_Sankey2);
var _RadarChart2 = __webpack_require__(274);
var _RadarChart3 = _interopRequireDefault(_RadarChart2);
var _ScatterChart2 = __webpack_require__(275);
var _ScatterChart3 = _interopRequireDefault(_ScatterChart2);
var _AreaChart2 = __webpack_require__(276);
var _AreaChart3 = _interopRequireDefault(_AreaChart2);
var _RadialBarChart2 = __webpack_require__(277);
var _RadialBarChart3 = _interopRequireDefault(_RadialBarChart2);
var _ComposedChart2 = __webpack_require__(278);
var _ComposedChart3 = _interopRequireDefault(_ComposedChart2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.Surface = _Surface3.default;
exports.Layer = _Layer3.default;
exports.Legend = _Legend3.default;
exports.Tooltip = _Tooltip3.default;
exports.ResponsiveContainer = _ResponsiveContainer3.default;
exports.Cell = _Cell3.default;
exports.Sector = _Sector3.default;
exports.Curve = _Curve3.default;
exports.Rectangle = _Rectangle3.default;
exports.Polygon = _Polygon3.default;
exports.Dot = _Dot3.default;
exports.Cross = _Cross3.default;
exports.Symbols = _Symbols3.default;
exports.PolarGrid = _PolarGrid3.default;
exports.PolarRadiusAxis = _PolarRadiusAxis3.default;
exports.PolarAngleAxis = _PolarAngleAxis3.default;
exports.Pie = _Pie3.default;
exports.Radar = _Radar3.default;
exports.RadialBar = _RadialBar3.default;
exports.Brush = _Brush3.default;
exports.ReferenceLine = _ReferenceLine3.default;
exports.ReferenceDot = _ReferenceDot3.default;
exports.CartesianAxis = _CartesianAxis3.default;
exports.CartesianGrid = _CartesianGrid3.default;
exports.Line = _Line3.default;
exports.Area = _Area3.default;
exports.Bar = _Bar3.default;
exports.Scatter = _Scatter3.default;
exports.XAxis = _XAxis3.default;
exports.YAxis = _YAxis3.default;
exports.ZAxis = _ZAxis3.default;
exports.LineChart = _LineChart3.default;
exports.BarChart = _BarChart3.default;
exports.PieChart = _PieChart3.default;
exports.Treemap = _Treemap3.default;
exports.Sankey = _Sankey3.default;
exports.RadarChart = _RadarChart3.default;
exports.ScatterChart = _ScatterChart3.default;
exports.AreaChart = _AreaChart3.default;
exports.RadialBarChart = _RadialBarChart3.default;
exports.ComposedChart = _ComposedChart3.default;
/***/ },
/* 2 */
/***/ function(module, exports) {
"use strict";
/* eslint no-proto: 0 */
var testObject = {};
if (!(Object.setPrototypeOf || testObject.__proto__)) {
(function () {
var nativeGetPrototypeOf = Object.getPrototypeOf;
Object.getPrototypeOf = function (object) {
if (object.__proto__) {
return object.__proto__;
}
return nativeGetPrototypeOf.call(Object, object);
};
})();
}
/***/ },
/* 3 */
/***/ function(module, exports, __webpack_require__) {
__webpack_require__(4);
__webpack_require__(24);
__webpack_require__(25);
__webpack_require__(26);
__webpack_require__(28);
__webpack_require__(29);
__webpack_require__(30);
__webpack_require__(32);
__webpack_require__(33);
__webpack_require__(34);
__webpack_require__(35);
__webpack_require__(36);
__webpack_require__(37);
__webpack_require__(38);
__webpack_require__(39);
__webpack_require__(40);
__webpack_require__(41);
module.exports = __webpack_require__(7).Math;
/***/ },
/* 4 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.3 Math.acosh(x)
var $export = __webpack_require__(5)
, log1p = __webpack_require__(23)
, sqrt = Math.sqrt
, $acosh = Math.acosh;
$export($export.S + $export.F * !($acosh
// V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
&& Math.floor($acosh(Number.MAX_VALUE)) == 710
// Tor Browser bug: Math.acosh(Infinity) -> NaN
&& $acosh(Infinity) == Infinity
), 'Math', {
acosh: function acosh(x){
return (x = +x) < 1 ? NaN : x > 94906265.62425156
? Math.log(x) + Math.LN2
: log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
}
});
/***/ },
/* 5 */
/***/ function(module, exports, __webpack_require__) {
var global = __webpack_require__(6)
, core = __webpack_require__(7)
, hide = __webpack_require__(8)
, redefine = __webpack_require__(18)
, ctx = __webpack_require__(21)
, PROTOTYPE = 'prototype';
var $export = function(type, name, source){
var IS_FORCED = type & $export.F
, IS_GLOBAL = type & $export.G
, IS_STATIC = type & $export.S
, IS_PROTO = type & $export.P
, IS_BIND = type & $export.B
, target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]
, exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
, expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {})
, key, own, out, exp;
if(IS_GLOBAL)source = name;
for(key in source){
// contains in native
own = !IS_FORCED && target && target[key] !== undefined;
// export native or passed
out = (own ? target : source)[key];
// bind timers to global for call from export context
exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
// extend global
if(target)redefine(target, key, out, type & $export.U);
// export
if(exports[key] != out)hide(exports, key, exp);
if(IS_PROTO && expProto[key] != out)expProto[key] = out;
}
};
global.core = core;
// type bitmap
$export.F = 1; // forced
$export.G = 2; // global
$export.S = 4; // static
$export.P = 8; // proto
$export.B = 16; // bind
$export.W = 32; // wrap
$export.U = 64; // safe
$export.R = 128; // real proto method for `library`
module.exports = $export;
/***/ },
/* 6 */
/***/ function(module, exports) {
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
/***/ },
/* 7 */
/***/ function(module, exports) {
var core = module.exports = {version: '2.4.0'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
/***/ },
/* 8 */
/***/ function(module, exports, __webpack_require__) {
var dP = __webpack_require__(9)
, createDesc = __webpack_require__(17);
module.exports = __webpack_require__(13) ? function(object, key, value){
return dP.f(object, key, createDesc(1, value));
} : function(object, key, value){
object[key] = value;
return object;
};
/***/ },
/* 9 */
/***/ function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(10)
, IE8_DOM_DEFINE = __webpack_require__(12)
, toPrimitive = __webpack_require__(16)
, dP = Object.defineProperty;
exports.f = __webpack_require__(13) ? Object.defineProperty : function defineProperty(O, P, Attributes){
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
if(IE8_DOM_DEFINE)try {
return dP(O, P, Attributes);
} catch(e){ /* empty */ }
if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
if('value' in Attributes)O[P] = Attributes.value;
return O;
};
/***/ },
/* 10 */
/***/ function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(11);
module.exports = function(it){
if(!isObject(it))throw TypeError(it + ' is not an object!');
return it;
};
/***/ },
/* 11 */
/***/ function(module, exports) {
module.exports = function(it){
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ },
/* 12 */
/***/ function(module, exports, __webpack_require__) {
module.exports = !__webpack_require__(13) && !__webpack_require__(14)(function(){
return Object.defineProperty(__webpack_require__(15)('div'), 'a', {get: function(){ return 7; }}).a != 7;
});
/***/ },
/* 13 */
/***/ function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(14)(function(){
return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
});
/***/ },
/* 14 */
/***/ function(module, exports) {
module.exports = function(exec){
try {
return !!exec();
} catch(e){
return true;
}
};
/***/ },
/* 15 */
/***/ function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(11)
, document = __webpack_require__(6).document
// in old IE typeof document.createElement is 'object'
, is = isObject(document) && isObject(document.createElement);
module.exports = function(it){
return is ? document.createElement(it) : {};
};
/***/ },
/* 16 */
/***/ function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__(11);
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function(it, S){
if(!isObject(it))return it;
var fn, val;
if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
throw TypeError("Can't convert object to primitive value");
};
/***/ },
/* 17 */
/***/ function(module, exports) {
module.exports = function(bitmap, value){
return {
enumerable : !(bitmap & 1),
configurable: !(bitmap & 2),
writable : !(bitmap & 4),
value : value
};
};
/***/ },
/* 18 */
/***/ function(module, exports, __webpack_require__) {
var global = __webpack_require__(6)
, hide = __webpack_require__(8)
, has = __webpack_require__(19)
, SRC = __webpack_require__(20)('src')
, TO_STRING = 'toString'
, $toString = Function[TO_STRING]
, TPL = ('' + $toString).split(TO_STRING);
__webpack_require__(7).inspectSource = function(it){
return $toString.call(it);
};
(module.exports = function(O, key, val, safe){
var isFunction = typeof val == 'function';
if(isFunction)has(val, 'name') || hide(val, 'name', key);
if(O[key] === val)return;
if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
if(O === global){
O[key] = val;
} else {
if(!safe){
delete O[key];
hide(O, key, val);
} else {
if(O[key])O[key] = val;
else hide(O, key, val);
}
}
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, TO_STRING, function toString(){
return typeof this == 'function' && this[SRC] || $toString.call(this);
});
/***/ },
/* 19 */
/***/ function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function(it, key){
return hasOwnProperty.call(it, key);
};
/***/ },
/* 20 */
/***/ function(module, exports) {
var id = 0
, px = Math.random();
module.exports = function(key){
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
/***/ },
/* 21 */
/***/ function(module, exports, __webpack_require__) {
// optional / simple context binding
var aFunction = __webpack_require__(22);
module.exports = function(fn, that, length){
aFunction(fn);
if(that === undefined)return fn;
switch(length){
case 1: return function(a){
return fn.call(that, a);
};
case 2: return function(a, b){
return fn.call(that, a, b);
};
case 3: return function(a, b, c){
return fn.call(that, a, b, c);
};
}
return function(/* ...args */){
return fn.apply(that, arguments);
};
};
/***/ },
/* 22 */
/***/ function(module, exports) {
module.exports = function(it){
if(typeof it != 'function')throw TypeError(it + ' is not a function!');
return it;
};
/***/ },
/* 23 */
/***/ function(module, exports) {
// 20.2.2.20 Math.log1p(x)
module.exports = Math.log1p || function log1p(x){
return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);
};
/***/ },
/* 24 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.5 Math.asinh(x)
var $export = __webpack_require__(5)
, $asinh = Math.asinh;
function asinh(x){
return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
}
// Tor Browser bug: Math.asinh(0) -> -0
$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', {asinh: asinh});
/***/ },
/* 25 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.7 Math.atanh(x)
var $export = __webpack_require__(5)
, $atanh = Math.atanh;
// Tor Browser bug: Math.atanh(-0) -> 0
$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
atanh: function atanh(x){
return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
}
});
/***/ },
/* 26 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.9 Math.cbrt(x)
var $export = __webpack_require__(5)
, sign = __webpack_require__(27);
$export($export.S, 'Math', {
cbrt: function cbrt(x){
return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);
}
});
/***/ },
/* 27 */
/***/ function(module, exports) {
// 20.2.2.28 Math.sign(x)
module.exports = Math.sign || function sign(x){
return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
};
/***/ },
/* 28 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.11 Math.clz32(x)
var $export = __webpack_require__(5);
$export($export.S, 'Math', {
clz32: function clz32(x){
return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;
}
});
/***/ },
/* 29 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.12 Math.cosh(x)
var $export = __webpack_require__(5)
, exp = Math.exp;
$export($export.S, 'Math', {
cosh: function cosh(x){
return (exp(x = +x) + exp(-x)) / 2;
}
});
/***/ },
/* 30 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.14 Math.expm1(x)
var $export = __webpack_require__(5)
, $expm1 = __webpack_require__(31);
$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', {expm1: $expm1});
/***/ },
/* 31 */
/***/ function(module, exports) {
// 20.2.2.14 Math.expm1(x)
var $expm1 = Math.expm1;
module.exports = (!$expm1
// Old FF bug
|| $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
// Tor Browser bug
|| $expm1(-2e-17) != -2e-17
) ? function expm1(x){
return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
} : $expm1;
/***/ },
/* 32 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.16 Math.fround(x)
var $export = __webpack_require__(5)
, sign = __webpack_require__(27)
, pow = Math.pow
, EPSILON = pow(2, -52)
, EPSILON32 = pow(2, -23)
, MAX32 = pow(2, 127) * (2 - EPSILON32)
, MIN32 = pow(2, -126);
var roundTiesToEven = function(n){
return n + 1 / EPSILON - 1 / EPSILON;
};
$export($export.S, 'Math', {
fround: function fround(x){
var $abs = Math.abs(x)
, $sign = sign(x)
, a, result;
if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
a = (1 + EPSILON32 / EPSILON) * $abs;
result = a - (a - $abs);
if(result > MAX32 || result != result)return $sign * Infinity;
return $sign * result;
}
});
/***/ },
/* 33 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
var $export = __webpack_require__(5)
, abs = Math.abs;
$export($export.S, 'Math', {
hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars
var sum = 0
, i = 0
, aLen = arguments.length
, larg = 0
, arg, div;
while(i < aLen){
arg = abs(arguments[i++]);
if(larg < arg){
div = larg / arg;
sum = sum * div * div + 1;
larg = arg;
} else if(arg > 0){
div = arg / larg;
sum += div * div;
} else sum += arg;
}
return larg === Infinity ? Infinity : larg * Math.sqrt(sum);
}
});
/***/ },
/* 34 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.18 Math.imul(x, y)
var $export = __webpack_require__(5)
, $imul = Math.imul;
// some WebKit versions fails with big numbers, some has wrong arity
$export($export.S + $export.F * __webpack_require__(14)(function(){
return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
}), 'Math', {
imul: function imul(x, y){
var UINT16 = 0xffff
, xn = +x
, yn = +y
, xl = UINT16 & xn
, yl = UINT16 & yn;
return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
}
});
/***/ },
/* 35 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.21 Math.log10(x)
var $export = __webpack_require__(5);
$export($export.S, 'Math', {
log10: function log10(x){
return Math.log(x) / Math.LN10;
}
});
/***/ },
/* 36 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.20 Math.log1p(x)
var $export = __webpack_require__(5);
$export($export.S, 'Math', {log1p: __webpack_require__(23)});
/***/ },
/* 37 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.22 Math.log2(x)
var $export = __webpack_require__(5);
$export($export.S, 'Math', {
log2: function log2(x){
return Math.log(x) / Math.LN2;
}
});
/***/ },
/* 38 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.28 Math.sign(x)
var $export = __webpack_require__(5);
$export($export.S, 'Math', {sign: __webpack_require__(27)});
/***/ },
/* 39 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.30 Math.sinh(x)
var $export = __webpack_require__(5)
, expm1 = __webpack_require__(31)
, exp = Math.exp;
// V8 near Chromium 38 has a problem with very small numbers
$export($export.S + $export.F * __webpack_require__(14)(function(){
return !Math.sinh(-2e-17) != -2e-17;
}), 'Math', {
sinh: function sinh(x){
return Math.abs(x = +x) < 1
? (expm1(x) - expm1(-x)) / 2
: (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);
}
});
/***/ },
/* 40 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.33 Math.tanh(x)
var $export = __webpack_require__(5)
, expm1 = __webpack_require__(31)
, exp = Math.exp;
$export($export.S, 'Math', {
tanh: function tanh(x){
var a = expm1(x = +x)
, b = expm1(-x);
return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
}
});
/***/ },
/* 41 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.34 Math.trunc(x)
var $export = __webpack_require__(5);
$export($export.S, 'Math', {
trunc: function trunc(it){
return (it > 0 ? Math.floor : Math.ceil)(it);
}
});
/***/ },
/* 42 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @fileOverview Surface
*/
var propTypes = {
width: _react.PropTypes.number.isRequired,
height: _react.PropTypes.number.isRequired,
viewBox: _react.PropTypes.shape({
x: _react.PropTypes.number,
y: _react.PropTypes.number,
width: _react.PropTypes.number,
height: _react.PropTypes.number
}),
className: _react.PropTypes.string,
style: _react.PropTypes.object,
children: _react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.node), _react.PropTypes.node])
};
function Surface(props) {
var children = props.children;
var width = props.width;
var height = props.height;
var viewBox = props.viewBox;
var className = props.className;
var style = props.style;
var svgView = viewBox || { width: width, height: height, x: 0, y: 0 };
var layerClass = (0, _classnames2.default)('recharts-surface', className);
return _react2.default.createElement(
'svg',
{
className: layerClass,
width: width,
height: height,
style: style,
viewBox: svgView.x + ' ' + svgView.y + ' ' + svgView.width + ' ' + svgView.height,
version: '1.1'
},
children
);
}
Surface.propTypes = propTypes;
exports.default = Surface;
/***/ },
/* 43 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_43__;
/***/ },
/* 44 */
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
Copyright (c) 2016 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/* global define */
(function () {
'use strict';
var hasOwn = {}.hasOwnProperty;
function classNames () {
var classes = [];
for (var i = 0; i < arguments.length; i++) {
var arg = arguments[i];
if (!arg) continue;
var argType = typeof arg;
if (argType === 'string' || argType === 'number') {
classes.push(arg);
} else if (Array.isArray(arg)) {
classes.push(classNames.apply(null, arg));
} else if (argType === 'object') {
for (var key in arg) {
if (hasOwn.call(arg, key) && arg[key]) {
classes.push(key);
}
}
}
}
return classes.join(' ');
}
if (typeof module !== 'undefined' && module.exports) {
module.exports = classNames;
} else if (true) {
// register as 'classnames', consistent with npm package name
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () {
return classNames;
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else {
window.classNames = classNames;
}
}());
/***/ },
/* 45 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } /**
* @fileOverview Layer
*/
var propTypes = {
className: _react.PropTypes.string,
children: _react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.node), _react.PropTypes.node])
};
function Layer(props) {
var children = props.children;
var className = props.className;
var others = _objectWithoutProperties(props, ['children', 'className']);
var layerClass = (0, _classnames2.default)('recharts-layer', className);
return _react2.default.createElement(
'g',
_extends({ className: layerClass }, others),
children
);
}
Layer.propTypes = propTypes;
exports.default = Layer;
/***/ },
/* 46 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isNumber2 = __webpack_require__(47);
var _isNumber3 = _interopRequireDefault(_isNumber2);
var _isFunction2 = __webpack_require__(49);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Legend
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _server = __webpack_require__(128);
var _server2 = _interopRequireDefault(_server);
var _Surface = __webpack_require__(42);
var _Surface2 = _interopRequireDefault(_Surface);
var _DefaultLegendContent = __webpack_require__(129);
var _DefaultLegendContent2 = _interopRequireDefault(_DefaultLegendContent);
var _DOMUtils = __webpack_require__(134);
var _ReactUtils = __webpack_require__(133);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var SIZE = 32;
var renderContent = function renderContent(content, props) {
if (_react2.default.isValidElement(content)) {
return _react2.default.cloneElement(content, props);
} else if ((0, _isFunction3.default)(content)) {
return content(props);
}
return _react2.default.createElement(_DefaultLegendContent2.default, props);
};
var Legend = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(Legend, _Component);
function Legend() {
_classCallCheck(this, Legend);
return _possibleConstructorReturn(this, Object.getPrototypeOf(Legend).apply(this, arguments));
}
_createClass(Legend, [{
key: 'getDefaultPosition',
value: function getDefaultPosition(style) {
var _props = this.props;
var layout = _props.layout;
var align = _props.align;
var verticalAlign = _props.verticalAlign;
var margin = _props.margin;
var chartWidth = _props.chartWidth;
var chartHeight = _props.chartHeight;
var hPos = void 0;
var vPos = void 0;
if (!style || (style.left === undefined || style.left === null) && (style.right === undefined || style.right === null)) {
if (align === 'center' && layout === 'vertical') {
var box = Legend.getLegendBBox(this.props) || { width: 0 };
hPos = { left: ((chartWidth || 0) - box.width) / 2 };
} else {
hPos = align === 'right' ? { right: margin && margin.right || 0 } : { left: margin && margin.left || 0 };
}
}
if (!style || (style.top === undefined || style.top === null) && (style.bottom === undefined || style.bottom === null)) {
if (verticalAlign === 'middle') {
var _box = Legend.getLegendBBox(this.props) || { height: 0 };
vPos = { top: ((chartHeight || 0) - _box.height) / 2 };
} else {
vPos = verticalAlign === 'bottom' ? { bottom: margin && margin.bottom || 0 } : { top: margin && margin.top || 0 };
}
}
return _extends({}, hPos, vPos);
}
}, {
key: 'render',
value: function render() {
var _props2 = this.props;
var content = _props2.content;
var width = _props2.width;
var height = _props2.height;
var layout = _props2.layout;
var wrapperStyle = _props2.wrapperStyle;
var outerStyle = _extends({
position: 'absolute',
width: width || 'auto',
height: height || 'auto'
}, this.getDefaultPosition(wrapperStyle), wrapperStyle);
return _react2.default.createElement(
'div',
{ className: 'recharts-legend-wrapper', style: outerStyle },
renderContent(content, this.props)
);
}
}], [{
key: 'getWithHeight',
value: function getWithHeight(item, chartWidth, chartHeight) {
var layout = item.props.layout;
if (layout === 'vertical' && (0, _isNumber3.default)(item.props.height)) {
return {
height: item.props.height
};
} else if (layout === 'horizontal') {
return {
width: item.props.width || chartWidth
};
}
return null;
}
}, {
key: 'getLegendBBox',
value: function getLegendBBox(props) {
if (!(0, _ReactUtils.isSsr)()) {
var content = props.content;
var width = props.width;
var height = props.height;
var wrapperStyle = props.wrapperStyle;
var contentHtml = _server2.default.renderToStaticMarkup(renderContent(content, props));
var style = _extends({
// solve the problem temporarily that the width and height will be affect by the global css
fontSize: 12,
position: 'absolute',
width: width || 'auto',
height: height || 'auto'
}, wrapperStyle, {
top: -20000,
left: 0,
display: 'block'
});
var wrapper = document.createElement('div');
wrapper.setAttribute('style', (0, _DOMUtils.getStyleString)(style));
wrapper.innerHTML = contentHtml;
document.body.appendChild(wrapper);
var box = wrapper.getBoundingClientRect();
document.body.removeChild(wrapper);
return box;
}
return null;
}
}]);
return Legend;
}(_react.Component), _class2.displayName = 'Legend', _class2.propTypes = {
content: _react.PropTypes.oneOfType([_react.PropTypes.element, _react.PropTypes.func]),
wrapperStyle: _react.PropTypes.object,
chartWidth: _react.PropTypes.number,
chartHeight: _react.PropTypes.number,
width: _react.PropTypes.number,
height: _react.PropTypes.number,
iconSize: _react.PropTypes.number,
layout: _react.PropTypes.oneOf(['horizontal', 'vertical']),
align: _react.PropTypes.oneOf(['center', 'left', 'right']),
verticalAlign: _react.PropTypes.oneOf(['top', 'bottom', 'middle']),
margin: _react.PropTypes.shape({
top: _react.PropTypes.number,
left: _react.PropTypes.number,
bottom: _react.PropTypes.number,
right: _react.PropTypes.number
}),
payload: _react.PropTypes.arrayOf(_react.PropTypes.shape({
value: _react.PropTypes.any,
id: _react.PropTypes.any,
type: _react.PropTypes.oneOf(['line', 'square', 'rect', 'circle', 'cross', 'diamond', 'square', 'star', 'triangle', 'wye'])
}))
}, _class2.defaultProps = {
iconSize: 14,
layout: 'horizontal',
align: 'center',
verticalAlign: 'bottom'
}, _temp)) || _class;
exports.default = Legend;
/***/ },
/* 47 */
/***/ function(module, exports, __webpack_require__) {
var isObjectLike = __webpack_require__(48);
/** `Object#toString` result references. */
var numberTag = '[object Number]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/**
* Checks if `value` is classified as a `Number` primitive or object.
*
* **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
* classified as numbers, use the `_.isFinite` method.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example
*
* _.isNumber(3);
* // => true
*
* _.isNumber(Number.MIN_VALUE);
* // => true
*
* _.isNumber(Infinity);
* // => true
*
* _.isNumber('3');
* // => false
*/
function isNumber(value) {
return typeof value == 'number' ||
(isObjectLike(value) && objectToString.call(value) == numberTag);
}
module.exports = isNumber;
/***/ },
/* 48 */
/***/ function(module, exports) {
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return !!value && typeof value == 'object';
}
module.exports = isObjectLike;
/***/ },
/* 49 */
/***/ function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(50);
/** `Object#toString` result references. */
var funcTag = '[object Function]',
genTag = '[object GeneratorFunction]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/**
* Checks if `value` is classified as a `Function` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example
*
* _.isFunction(_);
* // => true
*
* _.isFunction(/abc/);
* // => false
*/
function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 8 which returns 'object' for typed array and weak map constructors,
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag;
}
module.exports = isFunction;
/***/ },
/* 50 */
/***/ function(module, exports) {
/**
* Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
* @example
*
* _.isObject({});
* // => true
*
* _.isObject([1, 2, 3]);
* // => true
*
* _.isObject(_.noop);
* // => true
*
* _.isObject(null);
* // => false
*/
function isObject(value) {
var type = typeof value;
return !!value && (type == 'object' || type == 'function');
}
module.exports = isObject;
/***/ },
/* 51 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.shallowEqual = undefined;
var _isPlainObject2 = __webpack_require__(52);
var _isPlainObject3 = _interopRequireDefault(_isPlainObject2);
var _isEqual2 = __webpack_require__(55);
var _isEqual3 = _interopRequireDefault(_isEqual2);
var _isArray2 = __webpack_require__(118);
var _isArray3 = _interopRequireDefault(_isArray2);
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function shallowEqual(objA, objB) {
if (objA === objB) {
return true;
}
if ((typeof objA === 'undefined' ? 'undefined' : _typeof(objA)) !== 'object' || objA === null || (typeof objB === 'undefined' ? 'undefined' : _typeof(objB)) !== 'object' || objB === null) {
return false;
}
var keysA = Object.keys(objA);
var keysB = Object.keys(objB);
if (keysA.length !== keysB.length) {
return false;
}
var bHasOwnProperty = hasOwnProperty.bind(objB);
for (var i = 0; i < keysA.length; i++) {
var keyA = keysA[i];
if (objA[keyA] === objB[keyA]) {
continue;
}
// special diff with Array or Object
if ((0, _isArray3.default)(objA[keyA])) {
if (!(0, _isArray3.default)(objB[keyA]) || objA[keyA].length !== objB[keyA].length) {
return false;
} else if (!(0, _isEqual3.default)(objA[keyA], objB[keyA])) {
return false;
}
} else if ((0, _isPlainObject3.default)(objA[keyA])) {
if (!(0, _isPlainObject3.default)(objB[keyA]) || !(0, _isEqual3.default)(objA[keyA], objB[keyA])) {
return false;
}
} else if (!bHasOwnProperty(keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) {
return false;
}
}
return true;
}
function shallowCompare(instance, nextProps, nextState) {
return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);
}
function shouldComponentUpdate(nextProps, nextState) {
return shallowCompare(this, nextProps, nextState);
}
/* eslint-disable no-param-reassign */
function pureRenderDecorator(component) {
component.prototype.shouldComponentUpdate = shouldComponentUpdate;
}
exports.shallowEqual = shallowEqual;
exports.default = pureRenderDecorator;
/***/ },
/* 52 */
/***/ function(module, exports, __webpack_require__) {
var getPrototype = __webpack_require__(53),
isHostObject = __webpack_require__(54),
isObjectLike = __webpack_require__(48);
/** `Object#toString` result references. */
var objectTag = '[object Object]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Used to infer the `Object` constructor. */
var objectCtorString = funcToString.call(Object);
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/**
* Checks if `value` is a plain object, that is, an object created by the
* `Object` constructor or one with a `[[Prototype]]` of `null`.
*
* @static
* @memberOf _
* @since 0.8.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a plain object,
* else `false`.
* @example
*
* function Foo() {
* this.a = 1;
* }
*
* _.isPlainObject(new Foo);
* // => false
*
* _.isPlainObject([1, 2, 3]);
* // => false
*
* _.isPlainObject({ 'x': 0, 'y': 0 });
* // => true
*
* _.isPlainObject(Object.create(null));
* // => true
*/
function isPlainObject(value) {
if (!isObjectLike(value) ||
objectToString.call(value) != objectTag || isHostObject(value)) {
return false;
}
var proto = getPrototype(value);
if (proto === null) {
return true;
}
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
return (typeof Ctor == 'function' &&
Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
}
module.exports = isPlainObject;
/***/ },
/* 53 */
/***/ function(module, exports) {
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeGetPrototype = Object.getPrototypeOf;
/**
* Gets the `[[Prototype]]` of `value`.
*
* @private
* @param {*} value The value to query.
* @returns {null|Object} Returns the `[[Prototype]]`.
*/
function getPrototype(value) {
return nativeGetPrototype(Object(value));
}
module.exports = getPrototype;
/***/ },
/* 54 */
/***/ function(module, exports) {
/**
* Checks if `value` is a host object in IE < 9.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
*/
function isHostObject(value) {
// Many host objects are `Object` objects that can coerce to strings
// despite having improperly defined `toString` methods.
var result = false;
if (value != null && typeof value.toString != 'function') {
try {
result = !!(value + '');
} catch (e) {}
}
return result;
}
module.exports = isHostObject;
/***/ },
/* 55 */
/***/ function(module, exports, __webpack_require__) {
var baseIsEqual = __webpack_require__(56);
/**
* Performs a deep comparison between two values to determine if they are
* equivalent.
*
* **Note:** This method supports comparing arrays, array buffers, booleans,
* date objects, error objects, maps, numbers, `Object` objects, regexes,
* sets, strings, symbols, and typed arrays. `Object` objects are compared
* by their own, not inherited, enumerable properties. Functions and DOM
* nodes are **not** supported.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent,
* else `false`.
* @example
*
* var object = { 'user': 'fred' };
* var other = { 'user': 'fred' };
*
* _.isEqual(object, other);
* // => true
*
* object === other;
* // => false
*/
function isEqual(value, other) {
return baseIsEqual(value, other);
}
module.exports = isEqual;
/***/ },
/* 56 */
/***/ function(module, exports, __webpack_require__) {
var baseIsEqualDeep = __webpack_require__(57),
isObject = __webpack_require__(50),
isObjectLike = __webpack_require__(48);
/**
* The base implementation of `_.isEqual` which supports partial comparisons
* and tracks traversed objects.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @param {Function} [customizer] The function to customize comparisons.
* @param {boolean} [bitmask] The bitmask of comparison flags.
* The bitmask may be composed of the following flags:
* 1 - Unordered comparison
* 2 - Partial comparison
* @param {Object} [stack] Tracks traversed `value` and `other` objects.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
*/
function baseIsEqual(value, other, customizer, bitmask, stack) {
if (value === other) {
return true;
}
if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
return value !== value && other !== other;
}
return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
}
module.exports = baseIsEqual;
/***/ },
/* 57 */
/***/ function(module, exports, __webpack_require__) {
var Stack = __webpack_require__(58),
equalArrays = __webpack_require__(96),
equalByTag = __webpack_require__(101),
equalObjects = __webpack_require__(106),
getTag = __webpack_require__(122),
isArray = __webpack_require__(118),
isHostObject = __webpack_require__(54),
isTypedArray = __webpack_require__(127);
/** Used to compose bitmasks for comparison styles. */
var PARTIAL_COMPARE_FLAG = 2;
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
objectTag = '[object Object]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* A specialized version of `baseIsEqual` for arrays and objects which performs
* deep comparisons and tracks traversed objects enabling objects with circular
* references to be compared.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Function} [customizer] The function to customize comparisons.
* @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
* for more details.
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
var objIsArr = isArray(object),
othIsArr = isArray(other),
objTag = arrayTag,
othTag = arrayTag;
if (!objIsArr) {
objTag = getTag(object);
objTag = objTag == argsTag ? objectTag : objTag;
}
if (!othIsArr) {
othTag = getTag(other);
othTag = othTag == argsTag ? objectTag : othTag;
}
var objIsObj = objTag == objectTag && !isHostObject(object),
othIsObj = othTag == objectTag && !isHostObject(other),
isSameTag = objTag == othTag;
if (isSameTag && !objIsObj) {
stack || (stack = new Stack);
return (objIsArr || isTypedArray(object))
? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
: equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
}
if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
if (objIsWrapped || othIsWrapped) {
var objUnwrapped = objIsWrapped ? object.value() : object,
othUnwrapped = othIsWrapped ? other.value() : other;
stack || (stack = new Stack);
return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
}
}
if (!isSameTag) {
return false;
}
stack || (stack = new Stack);
return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
}
module.exports = baseIsEqualDeep;
/***/ },
/* 58 */
/***/ function(module, exports, __webpack_require__) {
var ListCache = __webpack_require__(59),
stackClear = __webpack_require__(67),
stackDelete = __webpack_require__(68),
stackGet = __webpack_require__(69),
stackHas = __webpack_require__(70),
stackSet = __webpack_require__(71);
/**
* Creates a stack cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function Stack(entries) {
this.__data__ = new ListCache(entries);
}
// Add methods to `Stack`.
Stack.prototype.clear = stackClear;
Stack.prototype['delete'] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
module.exports = Stack;
/***/ },
/* 59 */
/***/ function(module, exports, __webpack_require__) {
var listCacheClear = __webpack_require__(60),
listCacheDelete = __webpack_require__(61),
listCacheGet = __webpack_require__(64),
listCacheHas = __webpack_require__(65),
listCacheSet = __webpack_require__(66);
/**
* Creates an list cache object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function ListCache(entries) {
var index = -1,
length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
module.exports = ListCache;
/***/ },
/* 60 */
/***/ function(module, exports) {
/**
* Removes all key-value entries from the list cache.
*
* @private
* @name clear
* @memberOf ListCache
*/
function listCacheClear() {
this.__data__ = [];
}
module.exports = listCacheClear;
/***/ },
/* 61 */
/***/ function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(62);
/** Used for built-in method references. */
var arrayProto = Array.prototype;
/** Built-in value references. */
var splice = arrayProto.splice;
/**
* Removes `key` and its value from the list cache.
*
* @private
* @name delete
* @memberOf ListCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function listCacheDelete(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
return true;
}
module.exports = listCacheDelete;
/***/ },
/* 62 */
/***/ function(module, exports, __webpack_require__) {
var eq = __webpack_require__(63);
/**
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
* @param {Array} array The array to search.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
module.exports = assocIndexOf;
/***/ },
/* 63 */
/***/ function(module, exports) {
/**
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
* var object = { 'user': 'fred' };
* var other = { 'user': 'fred' };
*
* _.eq(object, object);
* // => true
*
* _.eq(object, other);
* // => false
*
* _.eq('a', 'a');
* // => true
*
* _.eq('a', Object('a'));
* // => false
*
* _.eq(NaN, NaN);
* // => true
*/
function eq(value, other) {
return value === other || (value !== value && other !== other);
}
module.exports = eq;
/***/ },
/* 64 */
/***/ function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(62);
/**
* Gets the list cache value for `key`.
*
* @private
* @name get
* @memberOf ListCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function listCacheGet(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
return index < 0 ? undefined : data[index][1];
}
module.exports = listCacheGet;
/***/ },
/* 65 */
/***/ function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(62);
/**
* Checks if a list cache value for `key` exists.
*
* @private
* @name has
* @memberOf ListCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
module.exports = listCacheHas;
/***/ },
/* 66 */
/***/ function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(62);
/**
* Sets the list cache `key` to `value`.
*
* @private
* @name set
* @memberOf ListCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the list cache instance.
*/
function listCacheSet(key, value) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
module.exports = listCacheSet;
/***/ },
/* 67 */
/***/ function(module, exports, __webpack_require__) {
var ListCache = __webpack_require__(59);
/**
* Removes all key-value entries from the stack.
*
* @private
* @name clear
* @memberOf Stack
*/
function stackClear() {
this.__data__ = new ListCache;
}
module.exports = stackClear;
/***/ },
/* 68 */
/***/ function(module, exports) {
/**
* Removes `key` and its value from the stack.
*
* @private
* @name delete
* @memberOf Stack
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function stackDelete(key) {
return this.__data__['delete'](key);
}
module.exports = stackDelete;
/***/ },
/* 69 */
/***/ function(module, exports) {
/**
* Gets the stack value for `key`.
*
* @private
* @name get
* @memberOf Stack
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function stackGet(key) {
return this.__data__.get(key);
}
module.exports = stackGet;
/***/ },
/* 70 */
/***/ function(module, exports) {
/**
* Checks if a stack value for `key` exists.
*
* @private
* @name has
* @memberOf Stack
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function stackHas(key) {
return this.__data__.has(key);
}
module.exports = stackHas;
/***/ },
/* 71 */
/***/ function(module, exports, __webpack_require__) {
var ListCache = __webpack_require__(59),
MapCache = __webpack_require__(72);
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/**
* Sets the stack `key` to `value`.
*
* @private
* @name set
* @memberOf Stack
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the stack cache instance.
*/
function stackSet(key, value) {
var cache = this.__data__;
if (cache instanceof ListCache && cache.__data__.length == LARGE_ARRAY_SIZE) {
cache = this.__data__ = new MapCache(cache.__data__);
}
cache.set(key, value);
return this;
}
module.exports = stackSet;
/***/ },
/* 72 */
/***/ function(module, exports, __webpack_require__) {
var mapCacheClear = __webpack_require__(73),
mapCacheDelete = __webpack_require__(90),
mapCacheGet = __webpack_require__(93),
mapCacheHas = __webpack_require__(94),
mapCacheSet = __webpack_require__(95);
/**
* Creates a map cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function MapCache(entries) {
var index = -1,
length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `MapCache`.
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype['delete'] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
module.exports = MapCache;
/***/ },
/* 73 */
/***/ function(module, exports, __webpack_require__) {
var Hash = __webpack_require__(74),
ListCache = __webpack_require__(59),
Map = __webpack_require__(89);
/**
* Removes all key-value entries from the map.
*
* @private
* @name clear
* @memberOf MapCache
*/
function mapCacheClear() {
this.__data__ = {
'hash': new Hash,
'map': new (Map || ListCache),
'string': new Hash
};
}
module.exports = mapCacheClear;
/***/ },
/* 74 */
/***/ function(module, exports, __webpack_require__) {
var hashClear = __webpack_require__(75),
hashDelete = __webpack_require__(85),
hashGet = __webpack_require__(86),
hashHas = __webpack_require__(87),
hashSet = __webpack_require__(88);
/**
* Creates a hash object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function Hash(entries) {
var index = -1,
length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `Hash`.
Hash.prototype.clear = hashClear;
Hash.prototype['delete'] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
module.exports = Hash;
/***/ },
/* 75 */
/***/ function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(76);
/**
* Removes all key-value entries from the hash.
*
* @private
* @name clear
* @memberOf Hash
*/
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
}
module.exports = hashClear;
/***/ },
/* 76 */
/***/ function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(77);
/* Built-in method references that are verified to be native. */
var nativeCreate = getNative(Object, 'create');
module.exports = nativeCreate;
/***/ },
/* 77 */
/***/ function(module, exports, __webpack_require__) {
var baseIsNative = __webpack_require__(78),
getValue = __webpack_require__(84);
/**
* Gets the native function at `key` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the method to get.
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : undefined;
}
module.exports = getNative;
/***/ },
/* 78 */
/***/ function(module, exports, __webpack_require__) {
var isFunction = __webpack_require__(49),
isHostObject = __webpack_require__(54),
isMasked = __webpack_require__(79),
isObject = __webpack_require__(50),
toSource = __webpack_require__(83);
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);
/**
* The base implementation of `_.isNative` without bad shim checks.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a native function,
* else `false`.
*/
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
module.exports = baseIsNative;
/***/ },
/* 79 */
/***/ function(module, exports, __webpack_require__) {
var coreJsData = __webpack_require__(80);
/** Used to detect methods masquerading as native. */
var maskSrcKey = (function() {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
return uid ? ('Symbol(src)_1.' + uid) : '';
}());
/**
* Checks if `func` has its source masked.
*
* @private
* @param {Function} func The function to check.
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
*/
function isMasked(func) {
return !!maskSrcKey && (maskSrcKey in func);
}
module.exports = isMasked;
/***/ },
/* 80 */
/***/ function(module, exports, __webpack_require__) {
var root = __webpack_require__(81);
/** Used to detect overreaching core-js shims. */
var coreJsData = root['__core-js_shared__'];
module.exports = coreJsData;
/***/ },
/* 81 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {var checkGlobal = __webpack_require__(82);
/** Detect free variable `global` from Node.js. */
var freeGlobal = checkGlobal(typeof global == 'object' && global);
/** Detect free variable `self`. */
var freeSelf = checkGlobal(typeof self == 'object' && self);
/** Detect `this` as the global object. */
var thisGlobal = checkGlobal(typeof this == 'object' && this);
/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || thisGlobal || Function('return this')();
module.exports = root;
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
/***/ },
/* 82 */
/***/ function(module, exports) {
/**
* Checks if `value` is a global object.
*
* @private
* @param {*} value The value to check.
* @returns {null|Object} Returns `value` if it's a global object, else `null`.
*/
function checkGlobal(value) {
return (value && value.Object === Object) ? value : null;
}
module.exports = checkGlobal;
/***/ },
/* 83 */
/***/ function(module, exports) {
/** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString;
/**
* Converts `func` to its source code.
*
* @private
* @param {Function} func The function to process.
* @returns {string} Returns the source code.
*/
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {}
try {
return (func + '');
} catch (e) {}
}
return '';
}
module.exports = toSource;
/***/ },
/* 84 */
/***/ function(module, exports) {
/**
* Gets the value at `key` of `object`.
*
* @private
* @param {Object} [object] The object to query.
* @param {string} key The key of the property to get.
* @returns {*} Returns the property value.
*/
function getValue(object, key) {
return object == null ? undefined : object[key];
}
module.exports = getValue;
/***/ },
/* 85 */
/***/ function(module, exports) {
/**
* Removes `key` and its value from the hash.
*
* @private
* @name delete
* @memberOf Hash
* @param {Object} hash The hash to modify.
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function hashDelete(key) {
return this.has(key) && delete this.__data__[key];
}
module.exports = hashDelete;
/***/ },
/* 86 */
/***/ function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(76);
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Gets the hash value for `key`.
*
* @private
* @name get
* @memberOf Hash
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function hashGet(key) {
var data = this.__data__;
if (nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? undefined : result;
}
return hasOwnProperty.call(data, key) ? data[key] : undefined;
}
module.exports = hashGet;
/***/ },
/* 87 */
/***/ function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(76);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Checks if a hash value for `key` exists.
*
* @private
* @name has
* @memberOf Hash
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function hashHas(key) {
var data = this.__data__;
return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
}
module.exports = hashHas;
/***/ },
/* 88 */
/***/ function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(76);
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/**
* Sets the hash `key` to `value`.
*
* @private
* @name set
* @memberOf Hash
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the hash instance.
*/
function hashSet(key, value) {
var data = this.__data__;
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
return this;
}
module.exports = hashSet;
/***/ },
/* 89 */
/***/ function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(77),
root = __webpack_require__(81);
/* Built-in method references that are verified to be native. */
var Map = getNative(root, 'Map');
module.exports = Map;
/***/ },
/* 90 */
/***/ function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(91);
/**
* Removes `key` and its value from the map.
*
* @private
* @name delete
* @memberOf MapCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function mapCacheDelete(key) {
return getMapData(this, key)['delete'](key);
}
module.exports = mapCacheDelete;
/***/ },
/* 91 */
/***/ function(module, exports, __webpack_require__) {
var isKeyable = __webpack_require__(92);
/**
* Gets the data for `map`.
*
* @private
* @param {Object} map The map to query.
* @param {string} key The reference key.
* @returns {*} Returns the map data.
*/
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key)
? data[typeof key == 'string' ? 'string' : 'hash']
: data.map;
}
module.exports = getMapData;
/***/ },
/* 92 */
/***/ function(module, exports) {
/**
* Checks if `value` is suitable for use as unique object key.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
*/
function isKeyable(value) {
var type = typeof value;
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
? (value !== '__proto__')
: (value === null);
}
module.exports = isKeyable;
/***/ },
/* 93 */
/***/ function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(91);
/**
* Gets the map value for `key`.
*
* @private
* @name get
* @memberOf MapCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
module.exports = mapCacheGet;
/***/ },
/* 94 */
/***/ function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(91);
/**
* Checks if a map value for `key` exists.
*
* @private
* @name has
* @memberOf MapCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
module.exports = mapCacheHas;
/***/ },
/* 95 */
/***/ function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(91);
/**
* Sets the map `key` to `value`.
*
* @private
* @name set
* @memberOf MapCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the map cache instance.
*/
function mapCacheSet(key, value) {
getMapData(this, key).set(key, value);
return this;
}
module.exports = mapCacheSet;
/***/ },
/* 96 */
/***/ function(module, exports, __webpack_require__) {
var SetCache = __webpack_require__(97),
arraySome = __webpack_require__(100);
/** Used to compose bitmasks for comparison styles. */
var UNORDERED_COMPARE_FLAG = 1,
PARTIAL_COMPARE_FLAG = 2;
/**
* A specialized version of `baseIsEqualDeep` for arrays with support for
* partial deep comparisons.
*
* @private
* @param {Array} array The array to compare.
* @param {Array} other The other array to compare.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Function} customizer The function to customize comparisons.
* @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
* for more details.
* @param {Object} stack Tracks traversed `array` and `other` objects.
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
*/
function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
arrLength = array.length,
othLength = other.length;
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
return false;
}
// Assume cyclic values are equal.
var stacked = stack.get(array);
if (stacked) {
return stacked == other;
}
var index = -1,
result = true,
seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;
stack.set(array, other);
// Ignore non-index properties.
while (++index < arrLength) {
var arrValue = array[index],
othValue = other[index];
if (customizer) {
var compared = isPartial
? customizer(othValue, arrValue, index, other, array, stack)
: customizer(arrValue, othValue, index, array, other, stack);
}
if (compared !== undefined) {
if (compared) {
continue;
}
result = false;
break;
}
// Recursively compare arrays (susceptible to call stack limits).
if (seen) {
if (!arraySome(other, function(othValue, othIndex) {
if (!seen.has(othIndex) &&
(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
return seen.add(othIndex);
}
})) {
result = false;
break;
}
} else if (!(
arrValue === othValue ||
equalFunc(arrValue, othValue, customizer, bitmask, stack)
)) {
result = false;
break;
}
}
stack['delete'](array);
return result;
}
module.exports = equalArrays;
/***/ },
/* 97 */
/***/ function(module, exports, __webpack_require__) {
var MapCache = __webpack_require__(72),
setCacheAdd = __webpack_require__(98),
setCacheHas = __webpack_require__(99);
/**
*
* Creates an array cache object to store unique values.
*
* @private
* @constructor
* @param {Array} [values] The values to cache.
*/
function SetCache(values) {
var index = -1,
length = values ? values.length : 0;
this.__data__ = new MapCache;
while (++index < length) {
this.add(values[index]);
}
}
// Add methods to `SetCache`.
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
SetCache.prototype.has = setCacheHas;
module.exports = SetCache;
/***/ },
/* 98 */
/***/ function(module, exports) {
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/**
* Adds `value` to the array cache.
*
* @private
* @name add
* @memberOf SetCache
* @alias push
* @param {*} value The value to cache.
* @returns {Object} Returns the cache instance.
*/
function setCacheAdd(value) {
this.__data__.set(value, HASH_UNDEFINED);
return this;
}
module.exports = setCacheAdd;
/***/ },
/* 99 */
/***/ function(module, exports) {
/**
* Checks if `value` is in the array cache.
*
* @private
* @name has
* @memberOf SetCache
* @param {*} value The value to search for.
* @returns {number} Returns `true` if `value` is found, else `false`.
*/
function setCacheHas(value) {
return this.__data__.has(value);
}
module.exports = setCacheHas;
/***/ },
/* 100 */
/***/ function(module, exports) {
/**
* A specialized version of `_.some` for arrays without support for iteratee
* shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {boolean} Returns `true` if any element passes the predicate check,
* else `false`.
*/
function arraySome(array, predicate) {
var index = -1,
length = array ? array.length : 0;
while (++index < length) {
if (predicate(array[index], index, array)) {
return true;
}
}
return false;
}
module.exports = arraySome;
/***/ },
/* 101 */
/***/ function(module, exports, __webpack_require__) {
var Symbol = __webpack_require__(102),
Uint8Array = __webpack_require__(103),
equalArrays = __webpack_require__(96),
mapToArray = __webpack_require__(104),
setToArray = __webpack_require__(105);
/** Used to compose bitmasks for comparison styles. */
var UNORDERED_COMPARE_FLAG = 1,
PARTIAL_COMPARE_FLAG = 2;
/** `Object#toString` result references. */
var boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
mapTag = '[object Map]',
numberTag = '[object Number]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
symbolTag = '[object Symbol]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]';
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
/**
* A specialized version of `baseIsEqualDeep` for comparing objects of
* the same `toStringTag`.
*
* **Note:** This function only supports comparing values with tags of
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {string} tag The `toStringTag` of the objects to compare.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Function} customizer The function to customize comparisons.
* @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
* for more details.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
switch (tag) {
case dataViewTag:
if ((object.byteLength != other.byteLength) ||
(object.byteOffset != other.byteOffset)) {
return false;
}
object = object.buffer;
other = other.buffer;
case arrayBufferTag:
if ((object.byteLength != other.byteLength) ||
!equalFunc(new Uint8Array(object), new Uint8Array(other))) {
return false;
}
return true;
case boolTag:
case dateTag:
// Coerce dates and booleans to numbers, dates to milliseconds and
// booleans to `1` or `0` treating invalid dates coerced to `NaN` as
// not equal.
return +object == +other;
case errorTag:
return object.name == other.name && object.message == other.message;
case numberTag:
// Treat `NaN` vs. `NaN` as equal.
return (object != +object) ? other != +other : object == +other;
case regexpTag:
case stringTag:
// Coerce regexes to strings and treat strings, primitives and objects,
// as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
// for more details.
return object == (other + '');
case mapTag:
var convert = mapToArray;
case setTag:
var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
convert || (convert = setToArray);
if (object.size != other.size && !isPartial) {
return false;
}
// Assume cyclic values are equal.
var stacked = stack.get(object);
if (stacked) {
return stacked == other;
}
bitmask |= UNORDERED_COMPARE_FLAG;
stack.set(object, other);
// Recursively compare objects (susceptible to call stack limits).
return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
case symbolTag:
if (symbolValueOf) {
return symbolValueOf.call(object) == symbolValueOf.call(other);
}
}
return false;
}
module.exports = equalByTag;
/***/ },
/* 102 */
/***/ function(module, exports, __webpack_require__) {
var root = __webpack_require__(81);
/** Built-in value references. */
var Symbol = root.Symbol;
module.exports = Symbol;
/***/ },
/* 103 */
/***/ function(module, exports, __webpack_require__) {
var root = __webpack_require__(81);
/** Built-in value references. */
var Uint8Array = root.Uint8Array;
module.exports = Uint8Array;
/***/ },
/* 104 */
/***/ function(module, exports) {
/**
* Converts `map` to its key-value pairs.
*
* @private
* @param {Object} map The map to convert.
* @returns {Array} Returns the key-value pairs.
*/
function mapToArray(map) {
var index = -1,
result = Array(map.size);
map.forEach(function(value, key) {
result[++index] = [key, value];
});
return result;
}
module.exports = mapToArray;
/***/ },
/* 105 */
/***/ function(module, exports) {
/**
* Converts `set` to an array of its values.
*
* @private
* @param {Object} set The set to convert.
* @returns {Array} Returns the values.
*/
function setToArray(set) {
var index = -1,
result = Array(set.size);
set.forEach(function(value) {
result[++index] = value;
});
return result;
}
module.exports = setToArray;
/***/ },
/* 106 */
/***/ function(module, exports, __webpack_require__) {
var baseHas = __webpack_require__(107),
keys = __webpack_require__(108);
/** Used to compose bitmasks for comparison styles. */
var PARTIAL_COMPARE_FLAG = 2;
/**
* A specialized version of `baseIsEqualDeep` for objects with support for
* partial deep comparisons.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Function} customizer The function to customize comparisons.
* @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
* for more details.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
objProps = keys(object),
objLength = objProps.length,
othProps = keys(other),
othLength = othProps.length;
if (objLength != othLength && !isPartial) {
return false;
}
var index = objLength;
while (index--) {
var key = objProps[index];
if (!(isPartial ? key in other : baseHas(other, key))) {
return false;
}
}
// Assume cyclic values are equal.
var stacked = stack.get(object);
if (stacked) {
return stacked == other;
}
var result = true;
stack.set(object, other);
var skipCtor = isPartial;
while (++index < objLength) {
key = objProps[index];
var objValue = object[key],
othValue = other[key];
if (customizer) {
var compared = isPartial
? customizer(othValue, objValue, key, other, object, stack)
: customizer(objValue, othValue, key, object, other, stack);
}
// Recursively compare objects (susceptible to call stack limits).
if (!(compared === undefined
? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))
: compared
)) {
result = false;
break;
}
skipCtor || (skipCtor = key == 'constructor');
}
if (result && !skipCtor) {
var objCtor = object.constructor,
othCtor = other.constructor;
// Non `Object` object instances with different constructors are not equal.
if (objCtor != othCtor &&
('constructor' in object && 'constructor' in other) &&
!(typeof objCtor == 'function' && objCtor instanceof objCtor &&
typeof othCtor == 'function' && othCtor instanceof othCtor)) {
result = false;
}
}
stack['delete'](object);
return result;
}
module.exports = equalObjects;
/***/ },
/* 107 */
/***/ function(module, exports, __webpack_require__) {
var getPrototype = __webpack_require__(53);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* The base implementation of `_.has` without support for deep paths.
*
* @private
* @param {Object} [object] The object to query.
* @param {Array|string} key The key to check.
* @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
function baseHas(object, key) {
// Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
// that are composed entirely of index properties, return `false` for
// `hasOwnProperty` checks of them.
return object != null &&
(hasOwnProperty.call(object, key) ||
(typeof object == 'object' && key in object && getPrototype(object) === null));
}
module.exports = baseHas;
/***/ },
/* 108 */
/***/ function(module, exports, __webpack_require__) {
var baseHas = __webpack_require__(107),
baseKeys = __webpack_require__(109),
indexKeys = __webpack_require__(110),
isArrayLike = __webpack_require__(114),
isIndex = __webpack_require__(120),
isPrototype = __webpack_require__(121);
/**
* Creates an array of the own enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects. See the
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
* for more details.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keys(new Foo);
* // => ['a', 'b'] (iteration order is not guaranteed)
*
* _.keys('hi');
* // => ['0', '1']
*/
function keys(object) {
var isProto = isPrototype(object);
if (!(isProto || isArrayLike(object))) {
return baseKeys(object);
}
var indexes = indexKeys(object),
skipIndexes = !!indexes,
result = indexes || [],
length = result.length;
for (var key in object) {
if (baseHas(object, key) &&
!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
!(isProto && key == 'constructor')) {
result.push(key);
}
}
return result;
}
module.exports = keys;
/***/ },
/* 109 */
/***/ function(module, exports) {
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeKeys = Object.keys;
/**
* The base implementation of `_.keys` which doesn't skip the constructor
* property of prototypes or treat sparse arrays as dense.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function baseKeys(object) {
return nativeKeys(Object(object));
}
module.exports = baseKeys;
/***/ },
/* 110 */
/***/ function(module, exports, __webpack_require__) {
var baseTimes = __webpack_require__(111),
isArguments = __webpack_require__(112),
isArray = __webpack_require__(118),
isLength = __webpack_require__(117),
isString = __webpack_require__(119);
/**
* Creates an array of index keys for `object` values of arrays,
* `arguments` objects, and strings, otherwise `null` is returned.
*
* @private
* @param {Object} object The object to query.
* @returns {Array|null} Returns index keys, else `null`.
*/
function indexKeys(object) {
var length = object ? object.length : undefined;
if (isLength(length) &&
(isArray(object) || isString(object) || isArguments(object))) {
return baseTimes(length, String);
}
return null;
}
module.exports = indexKeys;
/***/ },
/* 111 */
/***/ function(module, exports) {
/**
* The base implementation of `_.times` without support for iteratee shorthands
* or max array length checks.
*
* @private
* @param {number} n The number of times to invoke `iteratee`.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the array of results.
*/
function baseTimes(n, iteratee) {
var index = -1,
result = Array(n);
while (++index < n) {
result[index] = iteratee(index);
}
return result;
}
module.exports = baseTimes;
/***/ },
/* 112 */
/***/ function(module, exports, __webpack_require__) {
var isArrayLikeObject = __webpack_require__(113);
/** `Object#toString` result references. */
var argsTag = '[object Arguments]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/** Built-in value references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/**
* Checks if `value` is likely an `arguments` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example
*
* _.isArguments(function() { return arguments; }());
* // => true
*
* _.isArguments([1, 2, 3]);
* // => false
*/
function isArguments(value) {
// Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
}
module.exports = isArguments;
/***/ },
/* 113 */
/***/ function(module, exports, __webpack_require__) {
var isArrayLike = __webpack_require__(114),
isObjectLike = __webpack_require__(48);
/**
* This method is like `_.isArrayLike` except that it also checks if `value`
* is an object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array-like object,
* else `false`.
* @example
*
* _.isArrayLikeObject([1, 2, 3]);
* // => true
*
* _.isArrayLikeObject(document.body.children);
* // => true
*
* _.isArrayLikeObject('abc');
* // => false
*
* _.isArrayLikeObject(_.noop);
* // => false
*/
function isArrayLikeObject(value) {
return isObjectLike(value) && isArrayLike(value);
}
module.exports = isArrayLikeObject;
/***/ },
/* 114 */
/***/ function(module, exports, __webpack_require__) {
var getLength = __webpack_require__(115),
isFunction = __webpack_require__(49),
isLength = __webpack_require__(117);
/**
* Checks if `value` is array-like. A value is considered array-like if it's
* not a function and has a `value.length` that's an integer greater than or
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
* @example
*
* _.isArrayLike([1, 2, 3]);
* // => true
*
* _.isArrayLike(document.body.children);
* // => true
*
* _.isArrayLike('abc');
* // => true
*
* _.isArrayLike(_.noop);
* // => false
*/
function isArrayLike(value) {
return value != null && isLength(getLength(value)) && !isFunction(value);
}
module.exports = isArrayLike;
/***/ },
/* 115 */
/***/ function(module, exports, __webpack_require__) {
var baseProperty = __webpack_require__(116);
/**
* Gets the "length" property value of `object`.
*
* **Note:** This function is used to avoid a
* [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
* Safari on at least iOS 8.1-8.3 ARM64.
*
* @private
* @param {Object} object The object to query.
* @returns {*} Returns the "length" value.
*/
var getLength = baseProperty('length');
module.exports = getLength;
/***/ },
/* 116 */
/***/ function(module, exports) {
/**
* The base implementation of `_.property` without support for deep paths.
*
* @private
* @param {string} key The key of the property to get.
* @returns {Function} Returns the new accessor function.
*/
function baseProperty(key) {
return function(object) {
return object == null ? undefined : object[key];
};
}
module.exports = baseProperty;
/***/ },
/* 117 */
/***/ function(module, exports) {
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/**
* Checks if `value` is a valid array-like length.
*
* **Note:** This function is loosely based on
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a valid length,
* else `false`.
* @example
*
* _.isLength(3);
* // => true
*
* _.isLength(Number.MIN_VALUE);
* // => false
*
* _.isLength(Infinity);
* // => false
*
* _.isLength('3');
* // => false
*/
function isLength(value) {
return typeof value == 'number' &&
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
module.exports = isLength;
/***/ },
/* 118 */
/***/ function(module, exports) {
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @type {Function}
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(document.body.children);
* // => false
*
* _.isArray('abc');
* // => false
*
* _.isArray(_.noop);
* // => false
*/
var isArray = Array.isArray;
module.exports = isArray;
/***/ },
/* 119 */
/***/ function(module, exports, __webpack_require__) {
var isArray = __webpack_require__(118),
isObjectLike = __webpack_require__(48);
/** `Object#toString` result references. */
var stringTag = '[object String]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/**
* Checks if `value` is classified as a `String` primitive or object.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example
*
* _.isString('abc');
* // => true
*
* _.isString(1);
* // => false
*/
function isString(value) {
return typeof value == 'string' ||
(!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
}
module.exports = isString;
/***/ },
/* 120 */
/***/ function(module, exports) {
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;
/**
* Checks if `value` is a valid array-like index.
*
* @private
* @param {*} value The value to check.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length &&
(typeof value == 'number' || reIsUint.test(value)) &&
(value > -1 && value % 1 == 0 && value < length);
}
module.exports = isIndex;
/***/ },
/* 121 */
/***/ function(module, exports) {
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Checks if `value` is likely a prototype object.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
*/
function isPrototype(value) {
var Ctor = value && value.constructor,
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
return value === proto;
}
module.exports = isPrototype;
/***/ },
/* 122 */
/***/ function(module, exports, __webpack_require__) {
var DataView = __webpack_require__(123),
Map = __webpack_require__(89),
Promise = __webpack_require__(124),
Set = __webpack_require__(125),
WeakMap = __webpack_require__(126),
toSource = __webpack_require__(83);
/** `Object#toString` result references. */
var mapTag = '[object Map]',
objectTag = '[object Object]',
promiseTag = '[object Promise]',
setTag = '[object Set]',
weakMapTag = '[object WeakMap]';
var dataViewTag = '[object DataView]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/** Used to detect maps, sets, and weakmaps. */
var dataViewCtorString = toSource(DataView),
mapCtorString = toSource(Map),
promiseCtorString = toSource(Promise),
setCtorString = toSource(Set),
weakMapCtorString = toSource(WeakMap);
/**
* Gets the `toStringTag` of `value`.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
function getTag(value) {
return objectToString.call(value);
}
// Fallback for data views, maps, sets, and weak maps in IE 11,
// for data views in Edge, and promises in Node.js.
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
(Map && getTag(new Map) != mapTag) ||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
(Set && getTag(new Set) != setTag) ||
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
getTag = function(value) {
var result = objectToString.call(value),
Ctor = result == objectTag ? value.constructor : undefined,
ctorString = Ctor ? toSource(Ctor) : undefined;
if (ctorString) {
switch (ctorString) {
case dataViewCtorString: return dataViewTag;
case mapCtorString: return mapTag;
case promiseCtorString: return promiseTag;
case setCtorString: return setTag;
case weakMapCtorString: return weakMapTag;
}
}
return result;
};
}
module.exports = getTag;
/***/ },
/* 123 */
/***/ function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(77),
root = __webpack_require__(81);
/* Built-in method references that are verified to be native. */
var DataView = getNative(root, 'DataView');
module.exports = DataView;
/***/ },
/* 124 */
/***/ function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(77),
root = __webpack_require__(81);
/* Built-in method references that are verified to be native. */
var Promise = getNative(root, 'Promise');
module.exports = Promise;
/***/ },
/* 125 */
/***/ function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(77),
root = __webpack_require__(81);
/* Built-in method references that are verified to be native. */
var Set = getNative(root, 'Set');
module.exports = Set;
/***/ },
/* 126 */
/***/ function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(77),
root = __webpack_require__(81);
/* Built-in method references that are verified to be native. */
var WeakMap = getNative(root, 'WeakMap');
module.exports = WeakMap;
/***/ },
/* 127 */
/***/ function(module, exports, __webpack_require__) {
var isLength = __webpack_require__(117),
isObjectLike = __webpack_require__(48);
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
funcTag = '[object Function]',
mapTag = '[object Map]',
numberTag = '[object Number]',
objectTag = '[object Object]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
typedArrayTags[setTag] = typedArrayTags[stringTag] =
typedArrayTags[weakMapTag] = false;
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/**
* Checks if `value` is classified as a typed array.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example
*
* _.isTypedArray(new Uint8Array);
* // => true
*
* _.isTypedArray([]);
* // => false
*/
function isTypedArray(value) {
return isObjectLike(value) &&
isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
}
module.exports = isTypedArray;
/***/ },
/* 128 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_128__;
/***/ },
/* 129 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Default Legend Content
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _Surface = __webpack_require__(42);
var _Surface2 = _interopRequireDefault(_Surface);
var _Symbols = __webpack_require__(130);
var _Symbols2 = _interopRequireDefault(_Symbols);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var PI = Math.PI;
var SIZE = 32;
var DefaultLegendContent = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(DefaultLegendContent, _Component);
function DefaultLegendContent() {
_classCallCheck(this, DefaultLegendContent);
return _possibleConstructorReturn(this, Object.getPrototypeOf(DefaultLegendContent).apply(this, arguments));
}
_createClass(DefaultLegendContent, [{
key: 'renderIcon',
/**
* Render the path of icon
* @param {Object} data Data of each legend item
* @return {String} Path element
*/
value: function renderIcon(data) {
var color = data.color;
var halfSize = SIZE / 2;
var sixthSize = SIZE / 6;
var thirdSize = SIZE / 3;
if (data.type === 'line') {
return _react2.default.createElement('path', {
strokeWidth: 4,
fill: 'none',
stroke: color,
d: 'M0,' + halfSize + 'h' + thirdSize + '\n A' + sixthSize + ',' + sixthSize + ',0,1,1,' + 2 * thirdSize + ',' + halfSize + '\n H' + SIZE + 'M' + 2 * thirdSize + ',' + halfSize + '\n A' + sixthSize + ',' + sixthSize + ',0,1,1,' + thirdSize + ',' + halfSize,
className: 'recharts-legend-icon'
});
} else if (data.type === 'rect') {
return _react2.default.createElement('path', {
stroke: 'none',
fill: color,
d: 'M0,' + SIZE / 8 + 'h' + SIZE + 'v' + SIZE * 3 / 4 + 'h' + -SIZE + 'z',
className: 'recharts-legend-icon'
});
}
return _react2.default.createElement(_Symbols2.default, {
fill: color,
cx: halfSize,
cy: halfSize,
size: SIZE,
sizeType: 'diameter',
type: data.type
});
}
/**
* Draw items of legend
* @return {ReactElement} Items
*/
}, {
key: 'renderItems',
value: function renderItems() {
var _this2 = this;
var _props = this.props;
var payload = _props.payload;
var iconSize = _props.iconSize;
var layout = _props.layout;
var viewBox = { x: 0, y: 0, width: SIZE, height: SIZE };
var itemStyle = {
display: layout === 'horizontal' ? 'inline-block' : 'block',
marginRight: 10
};
var svgStyle = { display: 'inline-block', verticalAlign: 'middle', marginRight: 4 };
return payload.map(function (entry, i) {
return _react2.default.createElement(
'li',
{
className: 'recharts-legend-item legend-item-' + i,
style: itemStyle,
key: 'legend-item-' + i
},
_react2.default.createElement(
_Surface2.default,
{ width: iconSize, height: iconSize, viewBox: viewBox, style: svgStyle },
_this2.renderIcon(entry, iconSize)
),
_react2.default.createElement(
'span',
{ className: 'recharts-legend-item-text' },
entry.value
)
);
});
}
}, {
key: 'render',
value: function render() {
var _props2 = this.props;
var payload = _props2.payload;
var layout = _props2.layout;
var align = _props2.align;
if (!payload || !payload.length) {
return null;
}
var finalStyle = {
padding: 0,
margin: 0,
textAlign: layout === 'horizontal' ? align : 'left'
};
return _react2.default.createElement(
'ul',
{ className: 'recharts-default-legend', style: finalStyle },
this.renderItems()
);
}
}]);
return DefaultLegendContent;
}(_react.Component), _class2.displayName = 'Legend', _class2.propTypes = {
content: _react.PropTypes.element,
iconSize: _react.PropTypes.number,
layout: _react.PropTypes.oneOf(['horizontal', 'vertical']),
align: _react.PropTypes.oneOf(['center', 'left', 'right']),
verticalAlign: _react.PropTypes.oneOf(['top', 'bottom', 'middle']),
payload: _react.PropTypes.arrayOf(_react.PropTypes.shape({
value: _react.PropTypes.any,
id: _react.PropTypes.any,
type: _react.PropTypes.oneOf(['line', 'square', 'rect', 'circle', 'cross', 'diamond', 'square', 'star', 'triangle', 'wye'])
}))
}, _class2.defaultProps = {
iconSize: 14,
layout: 'horizontal',
align: 'center',
verticalAlign: 'middle'
}, _temp)) || _class;
exports.default = DefaultLegendContent;
/***/ },
/* 130 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Curve
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _d3Shape = __webpack_require__(131);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _ReactUtils = __webpack_require__(133);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var SYMBOL_FACTORIES = {
symbolCircle: _d3Shape.symbolCircle, symbolCross: _d3Shape.symbolCross, symbolDiamond: _d3Shape.symbolDiamond,
symbolSquare: _d3Shape.symbolSquare, symbolStar: _d3Shape.symbolStar, symbolTriangle: _d3Shape.symbolTriangle, symbolWye: _d3Shape.symbolWye
};
var RADIAN = Math.PI / 180;
var getSymbolFactory = function getSymbolFactory(type) {
var name = 'symbol' + type.slice(0, 1).toUpperCase() + type.slice(1);
return SYMBOL_FACTORIES[name] || _d3Shape.symbolCircle;
};
var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
if (sizeType === 'area') {
return size;
}
switch (type) {
case 'cross':
return 5 * size * size / 9;
case 'diamond':
return 0.5 * size * size / Math.sqrt(3);
case 'square':
return size * size;
case 'star':
{
var angle = 18 * RADIAN;
return 1.25 * size * size * (Math.tan(angle) - Math.tan(angle * 2) * Math.pow(Math.tan(angle), 2));
}
case 'triangle':
return Math.sqrt(3) * size * size / 4;
case 'wye':
return (21 - 10 * Math.sqrt(3)) * size * size / 8;
default:
return Math.PI * size * size / 4;
}
};
var Symbols = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(Symbols, _Component);
function Symbols() {
_classCallCheck(this, Symbols);
return _possibleConstructorReturn(this, Object.getPrototypeOf(Symbols).apply(this, arguments));
}
_createClass(Symbols, [{
key: 'getPath',
/**
* Calculate the path of curve
* @return {String} path
*/
value: function getPath() {
var _props = this.props;
var size = _props.size;
var sizeType = _props.sizeType;
var type = _props.type;
var symbolFactory = getSymbolFactory(type);
var symbol = (0, _d3Shape.symbol)().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
return symbol();
}
}, {
key: 'render',
value: function render() {
var _props2 = this.props;
var className = _props2.className;
var cx = _props2.cx;
var cy = _props2.cy;
var size = _props2.size;
if (cx === +cx && cy === +cy && size === +size) {
return _react2.default.createElement('path', _extends({}, (0, _ReactUtils.getPresentationAttributes)(this.props), (0, _ReactUtils.filterEventAttributes)(this.props), {
className: (0, _classnames2.default)('recharts-symbols', className),
transform: 'translate(' + cx + ', ' + cy + ')',
d: this.getPath()
}));
}
return null;
}
}]);
return Symbols;
}(_react.Component), _class2.displayName = 'Symbols', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, {
className: _react.PropTypes.string,
type: _react.PropTypes.oneOf(['circle', 'cross', 'diamond', 'square', 'star', 'triangle', 'wye']),
cx: _react.PropTypes.number,
cy: _react.PropTypes.number,
size: _react.PropTypes.number,
sizeType: _react.PropTypes.oneOf(['area', 'diameter'])
}), _class2.defaultProps = {
type: 'circle',
stroke: 'none',
fill: '#000',
size: 64,
sizeType: 'area'
}, _temp)) || _class;
exports.default = Symbols;
/***/ },
/* 131 */
/***/ function(module, exports, __webpack_require__) {
// https://d3js.org/d3-shape/ Version 1.0.0. Copyright 2016 Mike Bostock.
(function (global, factory) {
true ? factory(exports, __webpack_require__(132)) :
typeof define === 'function' && define.amd ? define(['exports', 'd3-path'], factory) :
(factory((global.d3 = global.d3 || {}),global.d3));
}(this, function (exports,d3Path) { 'use strict';
function constant(x) {
return function constant() {
return x;
};
}
var epsilon = 1e-12;
var pi = Math.PI;
var halfPi = pi / 2;
var tau = 2 * pi;
function arcInnerRadius(d) {
return d.innerRadius;
}
function arcOuterRadius(d) {
return d.outerRadius;
}
function arcStartAngle(d) {
return d.startAngle;
}
function arcEndAngle(d) {
return d.endAngle;
}
function arcPadAngle(d) {
return d && d.padAngle; // Note: optional!
}
function asin(x) {
return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);
}
function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
var x10 = x1 - x0, y10 = y1 - y0,
x32 = x3 - x2, y32 = y3 - y2,
t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / (y32 * x10 - x32 * y10);
return [x0 + t * x10, y0 + t * y10];
}
// Compute perpendicular offset line of length rc.
// http://mathworld.wolfram.com/Circle-LineIntersection.html
function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
var x01 = x0 - x1,
y01 = y0 - y1,
lo = (cw ? rc : -rc) / Math.sqrt(x01 * x01 + y01 * y01),
ox = lo * y01,
oy = -lo * x01,
x11 = x0 + ox,
y11 = y0 + oy,
x10 = x1 + ox,
y10 = y1 + oy,
x00 = (x11 + x10) / 2,
y00 = (y11 + y10) / 2,
dx = x10 - x11,
dy = y10 - y11,
d2 = dx * dx + dy * dy,
r = r1 - rc,
D = x11 * y10 - x10 * y11,
d = (dy < 0 ? -1 : 1) * Math.sqrt(Math.max(0, r * r * d2 - D * D)),
cx0 = (D * dy - dx * d) / d2,
cy0 = (-D * dx - dy * d) / d2,
cx1 = (D * dy + dx * d) / d2,
cy1 = (-D * dx + dy * d) / d2,
dx0 = cx0 - x00,
dy0 = cy0 - y00,
dx1 = cx1 - x00,
dy1 = cy1 - y00;
// Pick the closer of the two intersection points.
// TODO Is there a faster way to determine which intersection to use?
if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;
return {
cx: cx0,
cy: cy0,
x01: -ox,
y01: -oy,
x11: cx0 * (r1 / r - 1),
y11: cy0 * (r1 / r - 1)
};
}
function arc() {
var innerRadius = arcInnerRadius,
outerRadius = arcOuterRadius,
cornerRadius = constant(0),
padRadius = null,
startAngle = arcStartAngle,
endAngle = arcEndAngle,
padAngle = arcPadAngle,
context = null;
function arc() {
var buffer,
r,
r0 = +innerRadius.apply(this, arguments),
r1 = +outerRadius.apply(this, arguments),
a0 = startAngle.apply(this, arguments) - halfPi,
a1 = endAngle.apply(this, arguments) - halfPi,
da = Math.abs(a1 - a0),
cw = a1 > a0;
if (!context) context = buffer = d3Path.path();
// Ensure that the outer radius is always larger than the inner radius.
if (r1 < r0) r = r1, r1 = r0, r0 = r;
// Is it a point?
if (!(r1 > epsilon)) context.moveTo(0, 0);
// Or is it a circle or annulus?
else if (da > tau - epsilon) {
context.moveTo(r1 * Math.cos(a0), r1 * Math.sin(a0));
context.arc(0, 0, r1, a0, a1, !cw);
if (r0 > epsilon) {
context.moveTo(r0 * Math.cos(a1), r0 * Math.sin(a1));
context.arc(0, 0, r0, a1, a0, cw);
}
}
// Or is it a circular or annular sector?
else {
var a01 = a0,
a11 = a1,
a00 = a0,
a10 = a1,
da0 = da,
da1 = da,
ap = padAngle.apply(this, arguments) / 2,
rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : Math.sqrt(r0 * r0 + r1 * r1)),
rc = Math.min(Math.abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),
rc0 = rc,
rc1 = rc,
t0,
t1;
// Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.
if (rp > epsilon) {
var p0 = asin(rp / r0 * Math.sin(ap)),
p1 = asin(rp / r1 * Math.sin(ap));
if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;
else da0 = 0, a00 = a10 = (a0 + a1) / 2;
if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;
else da1 = 0, a01 = a11 = (a0 + a1) / 2;
}
var x01 = r1 * Math.cos(a01),
y01 = r1 * Math.sin(a01),
x10 = r0 * Math.cos(a10),
y10 = r0 * Math.sin(a10);
// Apply rounded corners?
if (rc > epsilon) {
var x11 = r1 * Math.cos(a11),
y11 = r1 * Math.sin(a11),
x00 = r0 * Math.cos(a00),
y00 = r0 * Math.sin(a00);
// Restrict the corner radius according to the sector angle.
if (da < pi) {
var oc = da0 > epsilon ? intersect(x01, y01, x00, y00, x11, y11, x10, y10) : [x10, y10],
ax = x01 - oc[0],
ay = y01 - oc[1],
bx = x11 - oc[0],
by = y11 - oc[1],
kc = 1 / Math.sin(Math.acos((ax * bx + ay * by) / (Math.sqrt(ax * ax + ay * ay) * Math.sqrt(bx * bx + by * by))) / 2),
lc = Math.sqrt(oc[0] * oc[0] + oc[1] * oc[1]);
rc0 = Math.min(rc, (r0 - lc) / (kc - 1));
rc1 = Math.min(rc, (r1 - lc) / (kc + 1));
}
}
// Is the sector collapsed to a line?
if (!(da1 > epsilon)) context.moveTo(x01, y01);
// Does the sector’s outer ring have rounded corners?
else if (rc1 > epsilon) {
t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);
t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);
context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);
// Have the corners merged?
if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, Math.atan2(t0.y01, t0.x01), Math.atan2(t1.y01, t1.x01), !cw);
// Otherwise, draw the two corners and the ring.
else {
context.arc(t0.cx, t0.cy, rc1, Math.atan2(t0.y01, t0.x01), Math.atan2(t0.y11, t0.x11), !cw);
context.arc(0, 0, r1, Math.atan2(t0.cy + t0.y11, t0.cx + t0.x11), Math.atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);
context.arc(t1.cx, t1.cy, rc1, Math.atan2(t1.y11, t1.x11), Math.atan2(t1.y01, t1.x01), !cw);
}
}
// Or is the outer ring just a circular arc?
else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);
// Is there no inner ring, and it’s a circular sector?
// Or perhaps it’s an annular sector collapsed due to padding?
if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);
// Does the sector’s inner ring (or point) have rounded corners?
else if (rc0 > epsilon) {
t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);
t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);
context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);
// Have the corners merged?
if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, Math.atan2(t0.y01, t0.x01), Math.atan2(t1.y01, t1.x01), !cw);
// Otherwise, draw the two corners and the ring.
else {
context.arc(t0.cx, t0.cy, rc0, Math.atan2(t0.y01, t0.x01), Math.atan2(t0.y11, t0.x11), !cw);
context.arc(0, 0, r0, Math.atan2(t0.cy + t0.y11, t0.cx + t0.x11), Math.atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);
context.arc(t1.cx, t1.cy, rc0, Math.atan2(t1.y11, t1.x11), Math.atan2(t1.y01, t1.x01), !cw);
}
}
// Or is the inner ring just a circular arc?
else context.arc(0, 0, r0, a10, a00, cw);
}
context.closePath();
if (buffer) return context = null, buffer + "" || null;
}
arc.centroid = function() {
var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,
a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;
return [Math.cos(a) * r, Math.sin(a) * r];
};
arc.innerRadius = function(_) {
return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant(+_), arc) : innerRadius;
};
arc.outerRadius = function(_) {
return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant(+_), arc) : outerRadius;
};
arc.cornerRadius = function(_) {
return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant(+_), arc) : cornerRadius;
};
arc.padRadius = function(_) {
return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant(+_), arc) : padRadius;
};
arc.startAngle = function(_) {
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), arc) : startAngle;
};
arc.endAngle = function(_) {
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), arc) : endAngle;
};
arc.padAngle = function(_) {
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), arc) : padAngle;
};
arc.context = function(_) {
return arguments.length ? ((context = _ == null ? null : _), arc) : context;
};
return arc;
}
function Linear(context) {
this._context = context;
}
Linear.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._point = 0;
},
lineEnd: function() {
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
this._line = 1 - this._line;
},
point: function(x, y) {
x = +x, y = +y;
switch (this._point) {
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
case 1: this._point = 2; // proceed
default: this._context.lineTo(x, y); break;
}
}
};
function curveLinear(context) {
return new Linear(context);
}
function x(p) {
return p[0];
}
function y(p) {
return p[1];
}
function line() {
var x$$ = x,
y$$ = y,
defined = constant(true),
context = null,
curve = curveLinear,
output = null;
function line(data) {
var i,
n = data.length,
d,
defined0 = false,
buffer;
if (context == null) output = curve(buffer = d3Path.path());
for (i = 0; i <= n; ++i) {
if (!(i < n && defined(d = data[i], i, data)) === defined0) {
if (defined0 = !defined0) output.lineStart();
else output.lineEnd();
}
if (defined0) output.point(+x$$(d, i, data), +y$$(d, i, data));
}
if (buffer) return output = null, buffer + "" || null;
}
line.x = function(_) {
return arguments.length ? (x$$ = typeof _ === "function" ? _ : constant(+_), line) : x$$;
};
line.y = function(_) {
return arguments.length ? (y$$ = typeof _ === "function" ? _ : constant(+_), line) : y$$;
};
line.defined = function(_) {
return arguments.length ? (defined = typeof _ === "function" ? _ : constant(!!_), line) : defined;
};
line.curve = function(_) {
return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;
};
line.context = function(_) {
return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;
};
return line;
}
function area() {
var x0 = x,
x1 = null,
y0 = constant(0),
y1 = y,
defined = constant(true),
context = null,
curve = curveLinear,
output = null;
function area(data) {
var i,
j,
k,
n = data.length,
d,
defined0 = false,
buffer,
x0z = new Array(n),
y0z = new Array(n);
if (context == null) output = curve(buffer = d3Path.path());
for (i = 0; i <= n; ++i) {
if (!(i < n && defined(d = data[i], i, data)) === defined0) {
if (defined0 = !defined0) {
j = i;
output.areaStart();
output.lineStart();
} else {
output.lineEnd();
output.lineStart();
for (k = i - 1; k >= j; --k) {
output.point(x0z[k], y0z[k]);
}
output.lineEnd();
output.areaEnd();
}
}
if (defined0) {
x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);
output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);
}
}
if (buffer) return output = null, buffer + "" || null;
}
function arealine() {
return line().defined(defined).curve(curve).context(context);
}
area.x = function(_) {
return arguments.length ? (x0 = typeof _ === "function" ? _ : constant(+_), x1 = null, area) : x0;
};
area.x0 = function(_) {
return arguments.length ? (x0 = typeof _ === "function" ? _ : constant(+_), area) : x0;
};
area.x1 = function(_) {
return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : constant(+_), area) : x1;
};
area.y = function(_) {
return arguments.length ? (y0 = typeof _ === "function" ? _ : constant(+_), y1 = null, area) : y0;
};
area.y0 = function(_) {
return arguments.length ? (y0 = typeof _ === "function" ? _ : constant(+_), area) : y0;
};
area.y1 = function(_) {
return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : constant(+_), area) : y1;
};
area.lineX0 =
area.lineY0 = function() {
return arealine().x(x0).y(y0);
};
area.lineY1 = function() {
return arealine().x(x0).y(y1);
};
area.lineX1 = function() {
return arealine().x(x1).y(y0);
};
area.defined = function(_) {
return arguments.length ? (defined = typeof _ === "function" ? _ : constant(!!_), area) : defined;
};
area.curve = function(_) {
return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;
};
area.context = function(_) {
return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;
};
return area;
}
function descending(a, b) {
return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
}
function identity(d) {
return d;
}
function pie() {
var value = identity,
sortValues = descending,
sort = null,
startAngle = constant(0),
endAngle = constant(tau),
padAngle = constant(0);
function pie(data) {
var i,
n = data.length,
j,
k,
sum = 0,
index = new Array(n),
arcs = new Array(n),
a0 = +startAngle.apply(this, arguments),
da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),
a1,
p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),
pa = p * (da < 0 ? -1 : 1),
v;
for (i = 0; i < n; ++i) {
if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {
sum += v;
}
}
// Optionally sort the arcs by previously-computed values or by data.
if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });
else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });
// Compute the arcs! They are stored in the original data's order.
for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {
j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {
data: data[j],
index: i,
value: v,
startAngle: a0,
endAngle: a1,
padAngle: p
};
}
return arcs;
}
pie.value = function(_) {
return arguments.length ? (value = typeof _ === "function" ? _ : constant(+_), pie) : value;
};
pie.sortValues = function(_) {
return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;
};
pie.sort = function(_) {
return arguments.length ? (sort = _, sortValues = null, pie) : sort;
};
pie.startAngle = function(_) {
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), pie) : startAngle;
};
pie.endAngle = function(_) {
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), pie) : endAngle;
};
pie.padAngle = function(_) {
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), pie) : padAngle;
};
return pie;
}
var curveRadialLinear = curveRadial(curveLinear);
function Radial(curve) {
this._curve = curve;
}
Radial.prototype = {
areaStart: function() {
this._curve.areaStart();
},
areaEnd: function() {
this._curve.areaEnd();
},
lineStart: function() {
this._curve.lineStart();
},
lineEnd: function() {
this._curve.lineEnd();
},
point: function(a, r) {
this._curve.point(r * Math.sin(a), r * -Math.cos(a));
}
};
function curveRadial(curve) {
function radial(context) {
return new Radial(curve(context));
}
radial._curve = curve;
return radial;
}
function radialLine(l) {
var c = l.curve;
l.angle = l.x, delete l.x;
l.radius = l.y, delete l.y;
l.curve = function(_) {
return arguments.length ? c(curveRadial(_)) : c()._curve;
};
return l;
}
function radialLine$1() {
return radialLine(line().curve(curveRadialLinear));
}
function radialArea() {
var a = area().curve(curveRadialLinear),
c = a.curve,
x0 = a.lineX0,
x1 = a.lineX1,
y0 = a.lineY0,
y1 = a.lineY1;
a.angle = a.x, delete a.x;
a.startAngle = a.x0, delete a.x0;
a.endAngle = a.x1, delete a.x1;
a.radius = a.y, delete a.y;
a.innerRadius = a.y0, delete a.y0;
a.outerRadius = a.y1, delete a.y1;
a.lineStartAngle = function() { return radialLine(x0()); }, delete a.lineX0;
a.lineEndAngle = function() { return radialLine(x1()); }, delete a.lineX1;
a.lineInnerRadius = function() { return radialLine(y0()); }, delete a.lineY0;
a.lineOuterRadius = function() { return radialLine(y1()); }, delete a.lineY1;
a.curve = function(_) {
return arguments.length ? c(curveRadial(_)) : c()._curve;
};
return a;
}
var circle = {
draw: function(context, size) {
var r = Math.sqrt(size / pi);
context.moveTo(r, 0);
context.arc(0, 0, r, 0, tau);
}
};
var cross = {
draw: function(context, size) {
var r = Math.sqrt(size / 5) / 2;
context.moveTo(-3 * r, -r);
context.lineTo(-r, -r);
context.lineTo(-r, -3 * r);
context.lineTo(r, -3 * r);
context.lineTo(r, -r);
context.lineTo(3 * r, -r);
context.lineTo(3 * r, r);
context.lineTo(r, r);
context.lineTo(r, 3 * r);
context.lineTo(-r, 3 * r);
context.lineTo(-r, r);
context.lineTo(-3 * r, r);
context.closePath();
}
};
var tan30 = Math.sqrt(1 / 3);
var tan30_2 = tan30 * 2;
var diamond = {
draw: function(context, size) {
var y = Math.sqrt(size / tan30_2),
x = y * tan30;
context.moveTo(0, -y);
context.lineTo(x, 0);
context.lineTo(0, y);
context.lineTo(-x, 0);
context.closePath();
}
};
var ka = 0.89081309152928522810;
var kr = Math.sin(pi / 10) / Math.sin(7 * pi / 10);
var kx = Math.sin(tau / 10) * kr;
var ky = -Math.cos(tau / 10) * kr;
var star = {
draw: function(context, size) {
var r = Math.sqrt(size * ka),
x = kx * r,
y = ky * r;
context.moveTo(0, -r);
context.lineTo(x, y);
for (var i = 1; i < 5; ++i) {
var a = tau * i / 5,
c = Math.cos(a),
s = Math.sin(a);
context.lineTo(s * r, -c * r);
context.lineTo(c * x - s * y, s * x + c * y);
}
context.closePath();
}
};
var square = {
draw: function(context, size) {
var w = Math.sqrt(size),
x = -w / 2;
context.rect(x, x, w, w);
}
};
var sqrt3 = Math.sqrt(3);
var triangle = {
draw: function(context, size) {
var y = -Math.sqrt(size / (sqrt3 * 3));
context.moveTo(0, y * 2);
context.lineTo(-sqrt3 * y, -y);
context.lineTo(sqrt3 * y, -y);
context.closePath();
}
};
var c = -0.5;
var s = Math.sqrt(3) / 2;
var k = 1 / Math.sqrt(12);
var a = (k / 2 + 1) * 3;
var wye = {
draw: function(context, size) {
var r = Math.sqrt(size / a),
x0 = r / 2,
y0 = r * k,
x1 = x0,
y1 = r * k + r,
x2 = -x1,
y2 = y1;
context.moveTo(x0, y0);
context.lineTo(x1, y1);
context.lineTo(x2, y2);
context.lineTo(c * x0 - s * y0, s * x0 + c * y0);
context.lineTo(c * x1 - s * y1, s * x1 + c * y1);
context.lineTo(c * x2 - s * y2, s * x2 + c * y2);
context.lineTo(c * x0 + s * y0, c * y0 - s * x0);
context.lineTo(c * x1 + s * y1, c * y1 - s * x1);
context.lineTo(c * x2 + s * y2, c * y2 - s * x2);
context.closePath();
}
};
var symbols = [
circle,
cross,
diamond,
square,
star,
triangle,
wye
];
function symbol() {
var type = constant(circle),
size = constant(64),
context = null;
function symbol() {
var buffer;
if (!context) context = buffer = d3Path.path();
type.apply(this, arguments).draw(context, +size.apply(this, arguments));
if (buffer) return context = null, buffer + "" || null;
}
symbol.type = function(_) {
return arguments.length ? (type = typeof _ === "function" ? _ : constant(_), symbol) : type;
};
symbol.size = function(_) {
return arguments.length ? (size = typeof _ === "function" ? _ : constant(+_), symbol) : size;
};
symbol.context = function(_) {
return arguments.length ? (context = _ == null ? null : _, symbol) : context;
};
return symbol;
}
function noop() {}
function point(that, x, y) {
that._context.bezierCurveTo(
(2 * that._x0 + that._x1) / 3,
(2 * that._y0 + that._y1) / 3,
(that._x0 + 2 * that._x1) / 3,
(that._y0 + 2 * that._y1) / 3,
(that._x0 + 4 * that._x1 + x) / 6,
(that._y0 + 4 * that._y1 + y) / 6
);
}
function Basis(context) {
this._context = context;
}
Basis.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 =
this._y0 = this._y1 = NaN;
this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 3: point(this, this._x1, this._y1); // proceed
case 2: this._context.lineTo(this._x1, this._y1); break;
}
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
this._line = 1 - this._line;
},
point: function(x, y) {
x = +x, y = +y;
switch (this._point) {
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
case 1: this._point = 2; break;
case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed
default: point(this, x, y); break;
}
this._x0 = this._x1, this._x1 = x;
this._y0 = this._y1, this._y1 = y;
}
};
function basis(context) {
return new Basis(context);
}
function BasisClosed(context) {
this._context = context;
}
BasisClosed.prototype = {
areaStart: noop,
areaEnd: noop,
lineStart: function() {
this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =
this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;
this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 1: {
this._context.moveTo(this._x2, this._y2);
this._context.closePath();
break;
}
case 2: {
this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);
this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);
this._context.closePath();
break;
}
case 3: {
this.point(this._x2, this._y2);
this.point(this._x3, this._y3);
this.point(this._x4, this._y4);
break;
}
}
},
point: function(x, y) {
x = +x, y = +y;
switch (this._point) {
case 0: this._point = 1; this._x2 = x, this._y2 = y; break;
case 1: this._point = 2; this._x3 = x, this._y3 = y; break;
case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;
default: point(this, x, y); break;
}
this._x0 = this._x1, this._x1 = x;
this._y0 = this._y1, this._y1 = y;
}
};
function basisClosed(context) {
return new BasisClosed(context);
}
function BasisOpen(context) {
this._context = context;
}
BasisOpen.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 =
this._y0 = this._y1 = NaN;
this._point = 0;
},
lineEnd: function() {
if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();
this._line = 1 - this._line;
},
point: function(x, y) {
x = +x, y = +y;
switch (this._point) {
case 0: this._point = 1; break;
case 1: this._point = 2; break;
case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;
case 3: this._point = 4; // proceed
default: point(this, x, y); break;
}
this._x0 = this._x1, this._x1 = x;
this._y0 = this._y1, this._y1 = y;
}
};
function basisOpen(context) {
return new BasisOpen(context);
}
function Bundle(context, beta) {
this._basis = new Basis(context);
this._beta = beta;
}
Bundle.prototype = {
lineStart: function() {
this._x = [];
this._y = [];
this._basis.lineStart();
},
lineEnd: function() {
var x = this._x,
y = this._y,
j = x.length - 1;
if (j > 0) {
var x0 = x[0],
y0 = y[0],
dx = x[j] - x0,
dy = y[j] - y0,
i = -1,
t;
while (++i <= j) {
t = i / j;
this._basis.point(
this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),
this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)
);
}
}
this._x = this._y = null;
this._basis.lineEnd();
},
point: function(x, y) {
this._x.push(+x);
this._y.push(+y);
}
};
var bundle = (function custom(beta) {
function bundle(context) {
return beta === 1 ? new Basis(context) : new Bundle(context, beta);
}
bundle.beta = function(beta) {
return custom(+beta);
};
return bundle;
})(0.85);
function point$1(that, x, y) {
that._context.bezierCurveTo(
that._x1 + that._k * (that._x2 - that._x0),
that._y1 + that._k * (that._y2 - that._y0),
that._x2 + that._k * (that._x1 - x),
that._y2 + that._k * (that._y1 - y),
that._x2,
that._y2
);
}
function Cardinal(context, tension) {
this._context = context;
this._k = (1 - tension) / 6;
}
Cardinal.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 = this._x2 =
this._y0 = this._y1 = this._y2 = NaN;
this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 2: this._context.lineTo(this._x2, this._y2); break;
case 3: point$1(this, this._x1, this._y1); break;
}
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
this._line = 1 - this._line;
},
point: function(x, y) {
x = +x, y = +y;
switch (this._point) {
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
case 1: this._point = 2; this._x1 = x, this._y1 = y; break;
case 2: this._point = 3; // proceed
default: point$1(this, x, y); break;
}
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
}
};
var cardinal = (function custom(tension) {
function cardinal(context) {
return new Cardinal(context, tension);
}
cardinal.tension = function(tension) {
return custom(+tension);
};
return cardinal;
})(0);
function CardinalClosed(context, tension) {
this._context = context;
this._k = (1 - tension) / 6;
}
CardinalClosed.prototype = {
areaStart: noop,
areaEnd: noop,
lineStart: function() {
this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =
this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 1: {
this._context.moveTo(this._x3, this._y3);
this._context.closePath();
break;
}
case 2: {
this._context.lineTo(this._x3, this._y3);
this._context.closePath();
break;
}
case 3: {
this.point(this._x3, this._y3);
this.point(this._x4, this._y4);
this.point(this._x5, this._y5);
break;
}
}
},
point: function(x, y) {
x = +x, y = +y;
switch (this._point) {
case 0: this._point = 1; this._x3 = x, this._y3 = y; break;
case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;
case 2: this._point = 3; this._x5 = x, this._y5 = y; break;
default: point$1(this, x, y); break;
}
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
}
};
var cardinalClosed = (function custom(tension) {
function cardinal(context) {
return new CardinalClosed(context, tension);
}
cardinal.tension = function(tension) {
return custom(+tension);
};
return cardinal;
})(0);
function CardinalOpen(context, tension) {
this._context = context;
this._k = (1 - tension) / 6;
}
CardinalOpen.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 = this._x2 =
this._y0 = this._y1 = this._y2 = NaN;
this._point = 0;
},
lineEnd: function() {
if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();
this._line = 1 - this._line;
},
point: function(x, y) {
x = +x, y = +y;
switch (this._point) {
case 0: this._point = 1; break;
case 1: this._point = 2; break;
case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;
case 3: this._point = 4; // proceed
default: point$1(this, x, y); break;
}
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
}
};
var cardinalOpen = (function custom(tension) {
function cardinal(context) {
return new CardinalOpen(context, tension);
}
cardinal.tension = function(tension) {
return custom(+tension);
};
return cardinal;
})(0);
function point$2(that, x, y) {
var x1 = that._x1,
y1 = that._y1,
x2 = that._x2,
y2 = that._y2;
if (that._l01_a > epsilon) {
var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,
n = 3 * that._l01_a * (that._l01_a + that._l12_a);
x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;
y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;
}
if (that._l23_a > epsilon) {
var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,
m = 3 * that._l23_a * (that._l23_a + that._l12_a);
x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;
y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;
}
that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);
}
function CatmullRom(context, alpha) {
this._context = context;
this._alpha = alpha;
}
CatmullRom.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 = this._x2 =
this._y0 = this._y1 = this._y2 = NaN;
this._l01_a = this._l12_a = this._l23_a =
this._l01_2a = this._l12_2a = this._l23_2a =
this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 2: this._context.lineTo(this._x2, this._y2); break;
case 3: this.point(this, this._x2, this._y2); break;
}
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
this._line = 1 - this._line;
},
point: function(x, y) {
x = +x, y = +y;
if (this._point) {
var x23 = this._x2 - x,
y23 = this._y2 - y;
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
}
switch (this._point) {
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
case 1: this._point = 2; break;
case 2: this._point = 3; // proceed
default: point$2(this, x, y); break;
}
this._l01_a = this._l12_a, this._l12_a = this._l23_a;
this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
}
};
var catmullRom = (function custom(alpha) {
function catmullRom(context) {
return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);
}
catmullRom.alpha = function(alpha) {
return custom(+alpha);
};
return catmullRom;
})(0.5);
function CatmullRomClosed(context, alpha) {
this._context = context;
this._alpha = alpha;
}
CatmullRomClosed.prototype = {
areaStart: noop,
areaEnd: noop,
lineStart: function() {
this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =
this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
this._l01_a = this._l12_a = this._l23_a =
this._l01_2a = this._l12_2a = this._l23_2a =
this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 1: {
this._context.moveTo(this._x3, this._y3);
this._context.closePath();
break;
}
case 2: {
this._context.lineTo(this._x3, this._y3);
this._context.closePath();
break;
}
case 3: {
this.point(this._x3, this._y3);
this.point(this._x4, this._y4);
this.point(this._x5, this._y5);
break;
}
}
},
point: function(x, y) {
x = +x, y = +y;
if (this._point) {
var x23 = this._x2 - x,
y23 = this._y2 - y;
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
}
switch (this._point) {
case 0: this._point = 1; this._x3 = x, this._y3 = y; break;
case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;
case 2: this._point = 3; this._x5 = x, this._y5 = y; break;
default: point$2(this, x, y); break;
}
this._l01_a = this._l12_a, this._l12_a = this._l23_a;
this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
}
};
var catmullRomClosed = (function custom(alpha) {
function catmullRom(context) {
return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);
}
catmullRom.alpha = function(alpha) {
return custom(+alpha);
};
return catmullRom;
})(0.5);
function CatmullRomOpen(context, alpha) {
this._context = context;
this._alpha = alpha;
}
CatmullRomOpen.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 = this._x2 =
this._y0 = this._y1 = this._y2 = NaN;
this._l01_a = this._l12_a = this._l23_a =
this._l01_2a = this._l12_2a = this._l23_2a =
this._point = 0;
},
lineEnd: function() {
if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();
this._line = 1 - this._line;
},
point: function(x, y) {
x = +x, y = +y;
if (this._point) {
var x23 = this._x2 - x,
y23 = this._y2 - y;
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
}
switch (this._point) {
case 0: this._point = 1; break;
case 1: this._point = 2; break;
case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;
case 3: this._point = 4; // proceed
default: point$2(this, x, y); break;
}
this._l01_a = this._l12_a, this._l12_a = this._l23_a;
this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
}
};
var catmullRomOpen = (function custom(alpha) {
function catmullRom(context) {
return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);
}
catmullRom.alpha = function(alpha) {
return custom(+alpha);
};
return catmullRom;
})(0.5);
function LinearClosed(context) {
this._context = context;
}
LinearClosed.prototype = {
areaStart: noop,
areaEnd: noop,
lineStart: function() {
this._point = 0;
},
lineEnd: function() {
if (this._point) this._context.closePath();
},
point: function(x, y) {
x = +x, y = +y;
if (this._point) this._context.lineTo(x, y);
else this._point = 1, this._context.moveTo(x, y);
}
};
function linearClosed(context) {
return new LinearClosed(context);
}
function sign(x) {
return x < 0 ? -1 : 1;
}
// Calculate the slopes of the tangents (Hermite-type interpolation) based on
// the following paper: Steffen, M. 1990. A Simple Method for Monotonic
// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.
// NOV(II), P. 443, 1990.
function slope3(that, x2, y2) {
var h0 = that._x1 - that._x0,
h1 = x2 - that._x1,
s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),
s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),
p = (s0 * h1 + s1 * h0) / (h0 + h1);
return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;
}
// Calculate a one-sided slope.
function slope2(that, t) {
var h = that._x1 - that._x0;
return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;
}
// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations
// "you can express cubic Hermite interpolation in terms of cubic Bézier curves
// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1".
function point$3(that, t0, t1) {
var x0 = that._x0,
y0 = that._y0,
x1 = that._x1,
y1 = that._y1,
dx = (x1 - x0) / 3;
that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);
}
function MonotoneX(context) {
this._context = context;
}
MonotoneX.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 =
this._y0 = this._y1 =
this._t0 = NaN;
this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 2: this._context.lineTo(this._x1, this._y1); break;
case 3: point$3(this, this._t0, slope2(this, this._t0)); break;
}
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
this._line = 1 - this._line;
},
point: function(x, y) {
var t1 = NaN;
x = +x, y = +y;
if (x === this._x1 && y === this._y1) return; // Ignore coincident points.
switch (this._point) {
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
case 1: this._point = 2; break;
case 2: this._point = 3; point$3(this, slope2(this, t1 = slope3(this, x, y)), t1); break;
default: point$3(this, this._t0, t1 = slope3(this, x, y)); break;
}
this._x0 = this._x1, this._x1 = x;
this._y0 = this._y1, this._y1 = y;
this._t0 = t1;
}
}
function MonotoneY(context) {
this._context = new ReflectContext(context);
}
(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {
MonotoneX.prototype.point.call(this, y, x);
};
function ReflectContext(context) {
this._context = context;
}
ReflectContext.prototype = {
moveTo: function(x, y) { this._context.moveTo(y, x); },
closePath: function() { this._context.closePath(); },
lineTo: function(x, y) { this._context.lineTo(y, x); },
bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }
};
function monotoneX(context) {
return new MonotoneX(context);
}
function monotoneY(context) {
return new MonotoneY(context);
}
function Natural(context) {
this._context = context;
}
Natural.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x = [];
this._y = [];
},
lineEnd: function() {
var x = this._x,
y = this._y,
n = x.length;
if (n) {
this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);
if (n === 2) {
this._context.lineTo(x[1], y[1]);
} else {
var px = controlPoints(x),
py = controlPoints(y);
for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {
this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);
}
}
}
if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();
this._line = 1 - this._line;
this._x = this._y = null;
},
point: function(x, y) {
this._x.push(+x);
this._y.push(+y);
}
};
// See https://www.particleincell.com/2012/bezier-splines/ for derivation.
function controlPoints(x) {
var i,
n = x.length - 1,
m,
a = new Array(n),
b = new Array(n),
r = new Array(n);
a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];
for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];
a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];
for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];
a[n - 1] = r[n - 1] / b[n - 1];
for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];
b[n - 1] = (x[n] + a[n - 1]) / 2;
for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];
return [a, b];
}
function natural(context) {
return new Natural(context);
}
function Step(context, t) {
this._context = context;
this._t = t;
}
Step.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x = this._y = NaN;
this._point = 0;
},
lineEnd: function() {
if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;
},
point: function(x, y) {
x = +x, y = +y;
switch (this._point) {
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
case 1: this._point = 2; // proceed
default: {
if (this._t <= 0) {
this._context.lineTo(this._x, y);
this._context.lineTo(x, y);
} else {
var x1 = this._x * (1 - this._t) + x * this._t;
this._context.lineTo(x1, this._y);
this._context.lineTo(x1, y);
}
break;
}
}
this._x = x, this._y = y;
}
};
function step(context) {
return new Step(context, 0.5);
}
function stepBefore(context) {
return new Step(context, 0);
}
function stepAfter(context) {
return new Step(context, 1);
}
var slice = Array.prototype.slice;
function none(series, order) {
if (!((n = series.length) > 1)) return;
for (var i = 1, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {
s0 = s1, s1 = series[order[i]];
for (var j = 0; j < m; ++j) {
s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];
}
}
}
function none$1(series) {
var n = series.length, o = new Array(n);
while (--n >= 0) o[n] = n;
return o;
}
function stackValue(d, key) {
return d[key];
}
function stack() {
var keys = constant([]),
order = none$1,
offset = none,
value = stackValue;
function stack(data) {
var kz = keys.apply(this, arguments),
i,
m = data.length,
n = kz.length,
sz = new Array(n),
oz;
for (i = 0; i < n; ++i) {
for (var ki = kz[i], si = sz[i] = new Array(m), j = 0, sij; j < m; ++j) {
si[j] = sij = [0, +value(data[j], ki, j, data)];
sij.data = data[j];
}
si.key = ki;
}
for (i = 0, oz = order(sz); i < n; ++i) {
sz[oz[i]].index = i;
}
offset(sz, oz);
return sz;
}
stack.keys = function(_) {
return arguments.length ? (keys = typeof _ === "function" ? _ : constant(slice.call(_)), stack) : keys;
};
stack.value = function(_) {
return arguments.length ? (value = typeof _ === "function" ? _ : constant(+_), stack) : value;
};
stack.order = function(_) {
return arguments.length ? (order = _ == null ? none$1 : typeof _ === "function" ? _ : constant(slice.call(_)), stack) : order;
};
stack.offset = function(_) {
return arguments.length ? (offset = _ == null ? none : _, stack) : offset;
};
return stack;
}
function expand(series, order) {
if (!((n = series.length) > 0)) return;
for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) {
for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0;
if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y;
}
none(series, order);
}
function silhouette(series, order) {
if (!((n = series.length) > 0)) return;
for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) {
for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0;
s0[j][1] += s0[j][0] = -y / 2;
}
none(series, order);
}
function wiggle(series, order) {
if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;
for (var y = 0, j = 1, s0, m, n; j < m; ++j) {
for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {
var si = series[order[i]],
sij0 = si[j][1] || 0,
sij1 = si[j - 1][1] || 0,
s3 = (sij0 - sij1) / 2;
for (var k = 0; k < i; ++k) {
var sk = series[order[k]],
skj0 = sk[j][1] || 0,
skj1 = sk[j - 1][1] || 0;
s3 += skj0 - skj1;
}
s1 += sij0, s2 += s3 * sij0;
}
s0[j - 1][1] += s0[j - 1][0] = y;
if (s1) y -= s2 / s1;
}
s0[j - 1][1] += s0[j - 1][0] = y;
none(series, order);
}
function ascending(series) {
var sums = series.map(sum);
return none$1(series).sort(function(a, b) { return sums[a] - sums[b]; });
}
function sum(series) {
var s = 0, i = -1, n = series.length, v;
while (++i < n) if (v = +series[i][1]) s += v;
return s;
}
function descending$1(series) {
return ascending(series).reverse();
}
function insideOut(series) {
var n = series.length,
i,
j,
sums = series.map(sum),
order = none$1(series).sort(function(a, b) { return sums[b] - sums[a]; }),
top = 0,
bottom = 0,
tops = [],
bottoms = [];
for (i = 0; i < n; ++i) {
j = order[i];
if (top < bottom) {
top += sums[j];
tops.push(j);
} else {
bottom += sums[j];
bottoms.push(j);
}
}
return bottoms.reverse().concat(tops);
}
function reverse(series) {
return none$1(series).reverse();
}
exports.arc = arc;
exports.area = area;
exports.line = line;
exports.pie = pie;
exports.radialArea = radialArea;
exports.radialLine = radialLine$1;
exports.symbol = symbol;
exports.symbols = symbols;
exports.symbolCircle = circle;
exports.symbolCross = cross;
exports.symbolDiamond = diamond;
exports.symbolSquare = square;
exports.symbolStar = star;
exports.symbolTriangle = triangle;
exports.symbolWye = wye;
exports.curveBasisClosed = basisClosed;
exports.curveBasisOpen = basisOpen;
exports.curveBasis = basis;
exports.curveBundle = bundle;
exports.curveCardinalClosed = cardinalClosed;
exports.curveCardinalOpen = cardinalOpen;
exports.curveCardinal = cardinal;
exports.curveCatmullRomClosed = catmullRomClosed;
exports.curveCatmullRomOpen = catmullRomOpen;
exports.curveCatmullRom = catmullRom;
exports.curveLinearClosed = linearClosed;
exports.curveLinear = curveLinear;
exports.curveMonotoneX = monotoneX;
exports.curveMonotoneY = monotoneY;
exports.curveNatural = natural;
exports.curveStep = step;
exports.curveStepAfter = stepAfter;
exports.curveStepBefore = stepBefore;
exports.stack = stack;
exports.stackOffsetExpand = expand;
exports.stackOffsetNone = none;
exports.stackOffsetSilhouette = silhouette;
exports.stackOffsetWiggle = wiggle;
exports.stackOrderAscending = ascending;
exports.stackOrderDescending = descending$1;
exports.stackOrderInsideOut = insideOut;
exports.stackOrderNone = none$1;
exports.stackOrderReverse = reverse;
Object.defineProperty(exports, '__esModule', { value: true });
}));
/***/ },
/* 132 */
/***/ function(module, exports, __webpack_require__) {
// https://d3js.org/d3-path/ Version 1.0.0. Copyright 2016 Mike Bostock.
(function (global, factory) {
true ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.d3 = global.d3 || {})));
}(this, function (exports) { 'use strict';
var pi = Math.PI;
var tau = 2 * pi;
var epsilon = 1e-6;
var tauEpsilon = tau - epsilon;
function Path() {
this._x0 = this._y0 = // start of current subpath
this._x1 = this._y1 = null; // end of current subpath
this._ = [];
}
function path() {
return new Path;
}
Path.prototype = path.prototype = {
constructor: Path,
moveTo: function(x, y) {
this._.push("M", this._x0 = this._x1 = +x, ",", this._y0 = this._y1 = +y);
},
closePath: function() {
if (this._x1 !== null) {
this._x1 = this._x0, this._y1 = this._y0;
this._.push("Z");
}
},
lineTo: function(x, y) {
this._.push("L", this._x1 = +x, ",", this._y1 = +y);
},
quadraticCurveTo: function(x1, y1, x, y) {
this._.push("Q", +x1, ",", +y1, ",", this._x1 = +x, ",", this._y1 = +y);
},
bezierCurveTo: function(x1, y1, x2, y2, x, y) {
this._.push("C", +x1, ",", +y1, ",", +x2, ",", +y2, ",", this._x1 = +x, ",", this._y1 = +y);
},
arcTo: function(x1, y1, x2, y2, r) {
x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;
var x0 = this._x1,
y0 = this._y1,
x21 = x2 - x1,
y21 = y2 - y1,
x01 = x0 - x1,
y01 = y0 - y1,
l01_2 = x01 * x01 + y01 * y01;
// Is the radius negative? Error.
if (r < 0) throw new Error("negative radius: " + r);
// Is this path empty? Move to (x1,y1).
if (this._x1 === null) {
this._.push(
"M", this._x1 = x1, ",", this._y1 = y1
);
}
// Or, is (x1,y1) coincident with (x0,y0)? Do nothing.
else if (!(l01_2 > epsilon));
// Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?
// Equivalently, is (x1,y1) coincident with (x2,y2)?
// Or, is the radius zero? Line to (x1,y1).
else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {
this._.push(
"L", this._x1 = x1, ",", this._y1 = y1
);
}
// Otherwise, draw an arc!
else {
var x20 = x2 - x0,
y20 = y2 - y0,
l21_2 = x21 * x21 + y21 * y21,
l20_2 = x20 * x20 + y20 * y20,
l21 = Math.sqrt(l21_2),
l01 = Math.sqrt(l01_2),
l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),
t01 = l / l01,
t21 = l / l21;
// If the start tangent is not coincident with (x0,y0), line to.
if (Math.abs(t01 - 1) > epsilon) {
this._.push(
"L", x1 + t01 * x01, ",", y1 + t01 * y01
);
}
this._.push(
"A", r, ",", r, ",0,0,", +(y01 * x20 > x01 * y20), ",", this._x1 = x1 + t21 * x21, ",", this._y1 = y1 + t21 * y21
);
}
},
arc: function(x, y, r, a0, a1, ccw) {
x = +x, y = +y, r = +r;
var dx = r * Math.cos(a0),
dy = r * Math.sin(a0),
x0 = x + dx,
y0 = y + dy,
cw = 1 ^ ccw,
da = ccw ? a0 - a1 : a1 - a0;
// Is the radius negative? Error.
if (r < 0) throw new Error("negative radius: " + r);
// Is this path empty? Move to (x0,y0).
if (this._x1 === null) {
this._.push(
"M", x0, ",", y0
);
}
// Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).
else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {
this._.push(
"L", x0, ",", y0
);
}
// Is this arc empty? We’re done.
if (!r) return;
// Is this a complete circle? Draw two arcs to complete the circle.
if (da > tauEpsilon) {
this._.push(
"A", r, ",", r, ",0,1,", cw, ",", x - dx, ",", y - dy,
"A", r, ",", r, ",0,1,", cw, ",", this._x1 = x0, ",", this._y1 = y0
);
}
// Otherwise, draw an arc!
else {
if (da < 0) da = da % tau + tau;
this._.push(
"A", r, ",", r, ",0,", +(da >= pi), ",", cw, ",", this._x1 = x + r * Math.cos(a1), ",", this._y1 = y + r * Math.sin(a1)
);
}
},
rect: function(x, y, w, h) {
this._.push("M", this._x0 = this._x1 = +x, ",", this._y0 = this._y1 = +y, "h", +w, "v", +h, "h", -w, "Z");
},
toString: function() {
return this._.join("");
}
};
exports.path = path;
Object.defineProperty(exports, '__esModule', { value: true });
}));
/***/ },
/* 133 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.filterSvgElements = exports.isSsr = exports.validateWidthHeight = exports.filterEventsOfChild = exports.filterEventAttributes = exports.getPresentationAttributes = exports.withoutType = exports.findChildByType = exports.findAllByType = exports.getDisplayName = exports.PRESENTATION_ATTRIBUTES = undefined;
var _isString2 = __webpack_require__(119);
var _isString3 = _interopRequireDefault(_isString2);
var _isNumber2 = __webpack_require__(47);
var _isNumber3 = _interopRequireDefault(_isNumber2);
var _isObject2 = __webpack_require__(50);
var _isObject3 = _interopRequireDefault(_isObject2);
var _isFunction2 = __webpack_require__(49);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _isArray2 = __webpack_require__(118);
var _isArray3 = _interopRequireDefault(_isArray2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var PRESENTATION_ATTRIBUTES = exports.PRESENTATION_ATTRIBUTES = {
alignmentBaseline: _react.PropTypes.string,
baselineShift: _react.PropTypes.string,
clip: _react.PropTypes.string,
clipPath: _react.PropTypes.string,
clipRule: _react.PropTypes.string,
color: _react.PropTypes.string,
colorInterpolation: _react.PropTypes.string,
colorInterpolationFilters: _react.PropTypes.string,
colorProfile: _react.PropTypes.string,
colorRendering: _react.PropTypes.string,
cursor: _react.PropTypes.string,
direction: _react.PropTypes.oneOf(['ltr', 'rtl', 'inherit']),
display: _react.PropTypes.string,
dominantBaseline: _react.PropTypes.string,
enableBackground: _react.PropTypes.string,
fill: _react.PropTypes.string,
fillOpacity: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
fillRule: _react.PropTypes.oneOf(['nonzero', 'evenodd', 'inherit']),
filter: _react.PropTypes.string,
floodColor: _react.PropTypes.string,
floodOpacity: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
font: _react.PropTypes.string,
fontFamily: _react.PropTypes.string,
fontSize: _react.PropTypes.number,
fontSizeAdjust: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
fontStretch: _react.PropTypes.oneOf(['normal', 'wider', 'narrower', 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded', 'inherit']),
fontStyle: _react.PropTypes.oneOf(['normal', 'italic', 'oblique', 'inherit']),
fontVariant: _react.PropTypes.oneOf(['normal', 'small-caps', 'inherit']),
fontWeight: _react.PropTypes.oneOf(['normal', 'bold', 'bolder', 'lighter', 100, 200, 300, 400, 500, 600, 700, 800, 900, 'inherit']),
glyphOrientationHorizontal: _react.PropTypes.string,
glyphOrientationVertical: _react.PropTypes.string,
imageRendering: _react.PropTypes.oneOf(['auto', 'optimizeSpeed', 'optimizeQuality', 'inherit']),
kerning: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
letterSpacing: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
lightingColor: _react.PropTypes.string,
markerEnd: _react.PropTypes.string,
markerMid: _react.PropTypes.string,
markerStart: _react.PropTypes.string,
mask: _react.PropTypes.string,
opacity: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
overflow: _react.PropTypes.oneOf(['visible', 'hidden', 'scroll', 'auto', 'inherit']),
pointerEvents: _react.PropTypes.oneOf(['visiblePainted', 'visibleFill', 'visibleStroke', 'visible', 'painted', 'fill', 'stroke', 'all', 'none', 'inherit']),
shapeRendering: _react.PropTypes.oneOf(['auto', 'optimizeSpeed', 'crispEdges', 'geometricPrecision', 'inherit']),
stopColor: _react.PropTypes.string,
stopOpacity: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
stroke: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
strokeDasharray: _react.PropTypes.string,
strokeDashoffset: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
strokeLinecap: _react.PropTypes.oneOf(['butt', 'round', 'square', 'inherit']),
strokeLinejoin: _react.PropTypes.oneOf(['miter', 'round', 'bevel', 'inherit']),
strokeMiterlimit: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
strokeOpacity: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
strokeWidth: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
textAnchor: _react.PropTypes.oneOf(['start', 'middle', 'end', 'inherit']),
textDecoration: _react.PropTypes.oneOf(['none', 'underline', 'overline', 'line-through', 'blink', 'inherit']),
textRendering: _react.PropTypes.oneOf(['auto', 'optimizeSpeed', 'optimizeLegibility', 'geometricPrecision', 'inherit']),
unicodeBidi: _react.PropTypes.oneOf(['normal', 'embed', 'bidi-override', 'inherit']),
visibility: _react.PropTypes.oneOf(['visible', 'hidden', 'collapse', 'inherit']),
wordSpacing: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
writingMode: _react.PropTypes.oneOf(['lr-tb', 'rl-tb', 'tb-rl', 'lr', 'rl', 'tb', 'inherit']),
transform: _react.PropTypes.string,
style: _react.PropTypes.object,
width: _react.PropTypes.number,
height: _react.PropTypes.number,
dx: _react.PropTypes.number,
dy: _react.PropTypes.number,
x: _react.PropTypes.number,
y: _react.PropTypes.number,
r: _react.PropTypes.number
};
var EVENT_ATTRIBUTES = {
onClick: _react.PropTypes.func,
onMouseDown: _react.PropTypes.func,
onMouseUp: _react.PropTypes.func,
onMouseOver: _react.PropTypes.func,
onMouseMove: _react.PropTypes.func,
onMouseOut: _react.PropTypes.func,
onMouseEnter: _react.PropTypes.func,
onMouseLeave: _react.PropTypes.func
};
/**
* Get the display name of a component
* @param {Object} Comp Specified Component
* @return {String} Display name of Component
*/
var getDisplayName = exports.getDisplayName = function getDisplayName(Comp) {
if (!Comp) {
return '';
}
if (typeof Comp === 'string') {
return Comp;
}
return Comp.displayName || Comp.name || 'Component';
};
/*
* Find and return all matched children by type. `type` can be a React element class or
* string
*/
var findAllByType = exports.findAllByType = function findAllByType(children, type) {
var result = [];
var types = [];
if ((0, _isArray3.default)(type)) {
types = type.map(function (t) {
return getDisplayName(t);
});
} else {
types = [getDisplayName(type)];
}
_react2.default.Children.forEach(children, function (child) {
var childType = child && child.type && (child.type.displayName || child.type.name);
if (types.indexOf(childType) !== -1) {
result.push(child);
}
});
return result;
};
/*
* Return the first matched child by type, return null otherwise.
* `type` can be a React element class or string.
*/
var findChildByType = exports.findChildByType = function findChildByType(children, type) {
var result = findAllByType(children, type);
return result && result[0];
};
/*
* Create a new array of children excluding the ones matched the type
*/
var withoutType = exports.withoutType = function withoutType(children, type) {
var newChildren = [];
var types = void 0;
if ((0, _isArray3.default)(type)) {
types = type.map(function (t) {
return getDisplayName(t);
});
} else {
types = [getDisplayName(type)];
}
_react2.default.Children.forEach(children, function (child) {
if (child && child.type && child.type.displayName && types.indexOf(child.type.displayName) !== -1) {
return;
}
newChildren.push(child);
});
return newChildren;
};
/**
* get all the presentation attribute of svg element
* @param {Object} el A react element or the props of a react element
* @return {Object} attributes or null
*/
var getPresentationAttributes = exports.getPresentationAttributes = function getPresentationAttributes(el) {
if (!el || (0, _isFunction3.default)(el)) {
return null;
}
var props = _react2.default.isValidElement(el) ? el.props : el;
if (!(0, _isObject3.default)(props)) {
return null;
}
var keys = Object.keys(props).filter(function (k) {
return PRESENTATION_ATTRIBUTES[k];
});
return keys && keys.length ? keys.reduce(function (result, k) {
return _extends({}, result, _defineProperty({}, k, props[k]));
}, {}) : null;
};
/**
* get all the event attribute of svg element
* @param {Object} el A react element or the props of a react element
* @return {Object} attributes or null
*/
var filterEventAttributes = exports.filterEventAttributes = function filterEventAttributes(el) {
if (!el || (0, _isFunction3.default)(el)) {
return null;
}
var props = _react2.default.isValidElement(el) ? el.props : el;
if (!(0, _isObject3.default)(props)) {
return null;
}
var keys = Object.keys(props).filter(function (k) {
return EVENT_ATTRIBUTES[k];
});
return keys && keys.length ? keys.reduce(function (result, k) {
return _extends({}, result, _defineProperty({}, k, props[k]));
}, {}) : null;
};
var getEventHandler = function getEventHandler(originalHandler, data, index) {
return function (e) {
originalHandler(data, index, e);
return null;
};
};
var filterEventsOfChild = exports.filterEventsOfChild = function filterEventsOfChild(props, data, index) {
if (!(0, _isObject3.default)(props)) {
return null;
}
var events = Object.keys(props).filter(function (k) {
return EVENT_ATTRIBUTES[k] && (0, _isFunction3.default)(props[k]);
});
return events && events.length ? events.reduce(function (result, e) {
return _extends({}, result, _defineProperty({}, e, getEventHandler(props[e], data, index)));
}, {}) : null;
};
/**
* validate the width and height props of a chart element
* @param {Object} el A chart element
* @return {Boolean} true If the props width and height are number, and greater than 0
*/
var validateWidthHeight = exports.validateWidthHeight = function validateWidthHeight(el) {
if (!el || !el.props) {
return false;
}
var _el$props = el.props;
var width = _el$props.width;
var height = _el$props.height;
if (!(0, _isNumber3.default)(width) || width <= 0 || !(0, _isNumber3.default)(height) || height <= 0) {
return false;
}
return true;
};
var isSsr = exports.isSsr = function isSsr() {
return typeof document === 'undefined';
};
var SVG_TAGS = ['a', 'altGlyph', 'altGlyphDef', 'altGlyphItem', 'animate', 'animateColor', 'animateMotion', 'animateTransform', 'circle', 'clipPath', 'color-profile', 'cursor', 'defs', 'desc', 'ellipse', 'feBlend', 'feColormatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence', 'filter', 'font', 'font-face', 'font-face-format', 'font-face-name', 'font-face-url', 'foreignObject', 'g', 'glyph', 'glyphRef', 'hkern', 'image', 'line', 'lineGradient', 'marker', 'mask', 'metadata', 'missing-glyph', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'script', 'set', 'stop', 'style', 'svg', 'switch', 'symbol', 'text', 'textPath', 'title', 'tref', 'tspan', 'use', 'view', 'vkern'];
/**
* Filter all the svg elements of children
* @param {Array} children The children of a react element
* @return {Array} All the svg elements
*/
var filterSvgElements = exports.filterSvgElements = function filterSvgElements(children) {
var svgElements = [];
_react2.default.Children.forEach(children, function (entry) {
if (entry && entry.type && (0, _isString3.default)(entry.type) && SVG_TAGS.indexOf(entry.type) >= 0) {
svgElements.push(entry);
}
});
return svgElements;
};
/***/ },
/* 134 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.calculateChartCoordinate = exports.getOffset = exports.getStringSize = exports.getStyleString = undefined;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _ReactUtils = __webpack_require__(133);
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
var stringCache = {
widthCache: {},
cacheCount: 0
};
var MAX_CACHE_NUM = 2000;
var SPAN_STYLE = {
position: 'absolute',
top: '-20000px',
left: 0,
padding: 0,
margin: 0,
border: 'none',
whiteSpace: 'pre'
};
var STYLE_LIST = ['minWidth', 'maxWidth', 'width', 'minHeight', 'maxHeight', 'height', 'top', 'left', 'fontSize', 'lineHeight', 'padding', 'margin', 'paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom', 'marginLeft', 'marginRight', 'marginTop', 'marginBottom'];
function autoCompleteStyle(name, value) {
if (STYLE_LIST.indexOf(name) >= 0 && value === +value) {
return value + 'px';
}
return value;
}
function camelToMiddleLine(text) {
var strs = text.split('');
var formatStrs = strs.reduce(function (result, entry) {
if (entry === entry.toUpperCase()) {
return [].concat(_toConsumableArray(result), ['-', entry.toLowerCase()]);
}
return [].concat(_toConsumableArray(result), [entry]);
}, []);
return formatStrs.join('');
}
function getComputedStyles(el) {
return el.ownerDocument.defaultView.getComputedStyle(el, null);
}
var getStyleString = exports.getStyleString = function getStyleString(style) {
return Object.keys(style).reduce(function (result, s) {
return '' + result + camelToMiddleLine(s) + ':' + autoCompleteStyle(s, style[s]) + ';';
}, '');
};
var getStringSize = exports.getStringSize = function getStringSize(text) {
var style = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
if (text === undefined || text === null || (0, _ReactUtils.isSsr)()) {
return 0;
}
var str = '' + text;
var styleString = getStyleString(style);
var cacheKey = str + '-' + styleString;
if (stringCache.widthCache[cacheKey]) {
return stringCache.widthCache[cacheKey];
}
if (!stringCache.span) {
var span = document.createElement('span');
span.setAttribute('style', getStyleString(SPAN_STYLE));
document.body.appendChild(span);
stringCache.span = span;
}
stringCache.span.setAttribute('style', getStyleString(_extends({}, SPAN_STYLE, style)));
stringCache.span.textContent = str;
var rect = stringCache.span.getBoundingClientRect();
var result = { width: rect.width, height: rect.height };
stringCache.widthCache[cacheKey] = result;
if (++stringCache.cacheCount > MAX_CACHE_NUM) {
stringCache.cacheCount = 0;
stringCache.widthCache = {};
}
return result;
};
var getOffset = exports.getOffset = function getOffset(el) {
var html = el.ownerDocument.documentElement;
var box = { top: 0, left: 0 };
// If we don't have gBCR, just use 0,0 rather than error
// BlackBerry 5, iOS 3 (original iPhone)
if (typeof el.getBoundingClientRect !== 'undefined') {
box = el.getBoundingClientRect();
}
return {
top: box.top + window.pageYOffset - html.clientTop,
left: box.left + window.pageXOffset - html.clientLeft
};
};
/**
* Calculate coordinate of cursor in chart
* @param {Object} event Event object
* @param {Object} offset The offset of main part in the svg element
* @return {Object} {chartX, chartY}
*/
var calculateChartCoordinate = exports.calculateChartCoordinate = function calculateChartCoordinate(event, offset) {
return {
chartX: Math.round(event.pageX - offset.left),
chartY: Math.round(event.pageY - offset.top)
};
};
/***/ },
/* 135 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isString2 = __webpack_require__(119);
var _isString3 = _interopRequireDefault(_isString2);
var _isNumber2 = __webpack_require__(47);
var _isNumber3 = _interopRequireDefault(_isNumber2);
var _isFunction2 = __webpack_require__(49);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _temp;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /**
* @fileOverview Tooltip
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _server = __webpack_require__(128);
var _server2 = _interopRequireDefault(_server);
var _DefaultTooltipContent = __webpack_require__(136);
var _DefaultTooltipContent2 = _interopRequireDefault(_DefaultTooltipContent);
var _DOMUtils = __webpack_require__(134);
var _ReactUtils = __webpack_require__(133);
var _reactSmooth = __webpack_require__(137);
var _reactSmooth2 = _interopRequireDefault(_reactSmooth);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var propTypes = {
content: _react.PropTypes.oneOfType([_react.PropTypes.element, _react.PropTypes.func]),
viewBox: _react.PropTypes.shape({
x: _react.PropTypes.number,
y: _react.PropTypes.number,
width: _react.PropTypes.number,
height: _react.PropTypes.number
}),
active: _react.PropTypes.bool,
separator: _react.PropTypes.string,
formatter: _react.PropTypes.func,
offset: _react.PropTypes.number,
itemStyle: _react.PropTypes.object,
labelStyle: _react.PropTypes.object,
wrapperStyle: _react.PropTypes.object,
cursor: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.element, _react.PropTypes.object]),
coordinate: _react.PropTypes.shape({
x: _react.PropTypes.number,
y: _react.PropTypes.number
}),
label: _react.PropTypes.any,
payload: _react.PropTypes.arrayOf(_react.PropTypes.shape({
name: _react.PropTypes.any,
value: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
unit: _react.PropTypes.any
})),
isAnimationActive: _react.PropTypes.bool,
animationDuration: _react.PropTypes.number,
animationEasing: _react.PropTypes.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear']),
itemSorter: _react.PropTypes.func
};
var defaultProps = {
active: false,
offset: 10,
viewBox: { x1: 0, x2: 0, y1: 0, y2: 0 },
coordinate: { x: 0, y: 0 },
cursorStyle: {},
separator: ' : ',
wrapperStyle: {},
itemStyle: {},
labelStyle: {},
cursor: true,
isAnimationActive: true,
animationEasing: 'ease',
animationDuration: 400,
itemSorter: function itemSorter(item1, item2) {
return -1;
}
};
var getTooltipBBox = function getTooltipBBox(wrapperStyle, contentItem) {
if (!(0, _ReactUtils.isSsr)()) {
var contentHtml = _server2.default.renderToStaticMarkup(contentItem);
var style = _extends({
// solve the problem temporarily that the width and height will be affect by the global css
fontSize: 12
}, wrapperStyle, {
top: -20000,
left: 0,
display: 'block'
});
var wrapper = document.createElement('div');
wrapper.setAttribute('style', (0, _DOMUtils.getStyleString)(style));
wrapper.innerHTML = contentHtml;
document.body.appendChild(wrapper);
var box = wrapper.getBoundingClientRect();
document.body.removeChild(wrapper);
return box;
}
return null;
};
var renderContent = function renderContent(content, props) {
if (_react2.default.isValidElement(content)) {
return _react2.default.cloneElement(content, props);
} else if ((0, _isFunction3.default)(content)) {
return content(props);
}
return _react2.default.createElement(_DefaultTooltipContent2.default, props);
};
var Tooltip = (_temp = _class = function (_Component) {
_inherits(Tooltip, _Component);
function Tooltip() {
_classCallCheck(this, Tooltip);
return _possibleConstructorReturn(this, Object.getPrototypeOf(Tooltip).apply(this, arguments));
}
_createClass(Tooltip, [{
key: 'render',
value: function render() {
var _props = this.props;
var payload = _props.payload;
var isAnimationActive = _props.isAnimationActive;
var animationDuration = _props.animationDuration;
var animationEasing = _props.animationEasing;
if (!payload || !payload.length || !payload.filter(function (entry) {
return (0, _isNumber3.default)(entry.value) || (0, _isString3.default)(entry.value);
}).length) {
return null;
}
var _props2 = this.props;
var content = _props2.content;
var viewBox = _props2.viewBox;
var coordinate = _props2.coordinate;
var active = _props2.active;
var offset = _props2.offset;
var wrapperStyle = _props2.wrapperStyle;
var outerStyle = _extends({
pointerEvents: 'none',
display: active ? 'block' : 'none',
position: 'absolute',
top: 0
}, wrapperStyle);
var contentItem = renderContent(content, this.props);
var box = getTooltipBBox(outerStyle, contentItem);
if (!box) {
return null;
}
var translateX = Math.max(coordinate.x + box.width + offset > viewBox.x + viewBox.width ? coordinate.x - box.width - offset : coordinate.x + offset, viewBox.x);
var translateY = Math.max(coordinate.y + box.height + offset > viewBox.y + viewBox.height ? coordinate.y - box.height - offset : coordinate.y + offset, viewBox.y);
return _react2.default.createElement(
_reactSmooth2.default,
{
from: 'translate(' + translateX + 'px, ' + translateY + 'px)',
to: 'translate(' + translateX + 'px, ' + translateY + 'px)',
duration: animationDuration,
isActive: isAnimationActive,
easing: animationEasing,
attributeName: 'transform'
},
_react2.default.createElement(
'div',
{
className: 'recharts-tooltip-wrapper',
style: outerStyle
},
contentItem
)
);
}
}]);
return Tooltip;
}(_react.Component), _class.displayName = 'Tooltip', _class.propTypes = propTypes, _class.defaultProps = defaultProps, _temp);
exports.default = Tooltip;
/***/ },
/* 136 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isString2 = __webpack_require__(119);
var _isString3 = _interopRequireDefault(_isString2);
var _isNumber2 = __webpack_require__(47);
var _isNumber3 = _interopRequireDefault(_isNumber2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Default Tooltip Content
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var DefaultTooltipContent = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(DefaultTooltipContent, _Component);
function DefaultTooltipContent() {
_classCallCheck(this, DefaultTooltipContent);
return _possibleConstructorReturn(this, Object.getPrototypeOf(DefaultTooltipContent).apply(this, arguments));
}
_createClass(DefaultTooltipContent, [{
key: 'renderContent',
value: function renderContent() {
var _props = this.props;
var payload = _props.payload;
var separator = _props.separator;
var formatter = _props.formatter;
var itemStyle = _props.itemStyle;
var itemSorter = _props.itemSorter;
if (payload && payload.length) {
var listStyle = { padding: 0, margin: 0 };
var items = payload.filter(function (entry) {
return (0, _isNumber3.default)(entry.value) || (0, _isString3.default)(entry.value);
}).sort(itemSorter).map(function (entry, i) {
var finalItemStyle = _extends({
display: 'block',
paddingTop: 4,
paddingBottom: 4,
color: entry.color || '#000'
}, itemStyle);
var finalFormatter = entry.formatter || formatter;
return _react2.default.createElement(
'li',
{ className: 'recharts-tooltip-item', key: 'tooltip-item-' + i, style: finalItemStyle },
_react2.default.createElement(
'span',
{ className: 'recharts-tooltip-item-name' },
entry.name
),
_react2.default.createElement(
'span',
{ className: 'recharts-tooltip-item-separator' },
separator
),
_react2.default.createElement(
'span',
{ className: 'recharts-tooltip-item-value' },
finalFormatter ? finalFormatter(entry.value, entry.name) : entry.value
),
_react2.default.createElement(
'span',
{ className: 'recharts-tooltip-item-unit' },
entry.unit || ''
)
);
});
return _react2.default.createElement(
'ul',
{ className: 'recharts-tooltip-item-list', style: listStyle },
items
);
}
return null;
}
}, {
key: 'render',
value: function render() {
var _props2 = this.props;
var labelStyle = _props2.labelStyle;
var label = _props2.label;
var labelFormatter = _props2.labelFormatter;
var wrapperStyle = _props2.wrapperStyle;
var finalStyle = _extends({
margin: 0,
padding: 10,
backgroundColor: '#fff',
border: '1px solid #ccc',
whiteSpace: 'nowrap'
}, wrapperStyle);
var finalLabelStyle = _extends({
margin: 0
}, labelStyle);
var hasLabel = (0, _isNumber3.default)(label) || (0, _isString3.default)(label);
var finalLabel = hasLabel ? label : '';
if (hasLabel && labelFormatter) {
finalLabel = labelFormatter(label);
}
return _react2.default.createElement(
'div',
{ className: 'recharts-default-tooltip', style: finalStyle },
_react2.default.createElement(
'p',
{ className: 'recharts-tooltip-label', style: finalLabelStyle },
finalLabel
),
this.renderContent()
);
}
}]);
return DefaultTooltipContent;
}(_react.Component), _class2.displayName = 'DefaultTooltipContent', _class2.propTypes = {
separator: _react.PropTypes.string,
formatter: _react.PropTypes.func,
wrapperStyle: _react.PropTypes.object,
itemStyle: _react.PropTypes.object,
labelStyle: _react.PropTypes.object,
labelFormatter: _react.PropTypes.func,
label: _react.PropTypes.any,
payload: _react.PropTypes.arrayOf(_react.PropTypes.shape({
name: _react.PropTypes.any,
value: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
unit: _react.PropTypes.any
})),
itemSorter: _react.PropTypes.func
}, _class2.defaultProps = {
separator: ' : ',
itemStyle: {},
labelStyle: {}
}, _temp)) || _class;
exports.default = DefaultTooltipContent;
/***/ },
/* 137 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.translateStyle = exports.AnimateGroup = exports.configBezier = exports.configSpring = undefined;
var _Animate = __webpack_require__(138);
var _Animate2 = _interopRequireDefault(_Animate);
var _easing = __webpack_require__(145);
var _util = __webpack_require__(146);
var _AnimateGroup = __webpack_require__(194);
var _AnimateGroup2 = _interopRequireDefault(_AnimateGroup);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.configSpring = _easing.configSpring;
exports.configBezier = _easing.configBezier;
exports.AnimateGroup = _AnimateGroup2.default;
exports.translateStyle = _util.translateStyle;
exports.default = _Animate2.default;
/***/ },
/* 138 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isEqual2 = __webpack_require__(55);
var _isEqual3 = _interopRequireDefault(_isEqual2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp;
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _AnimateManager = __webpack_require__(139);
var _AnimateManager2 = _interopRequireDefault(_AnimateManager);
var _PureRender = __webpack_require__(144);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _easing = __webpack_require__(145);
var _configUpdate = __webpack_require__(163);
var _configUpdate2 = _interopRequireDefault(_configUpdate);
var _util = __webpack_require__(146);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Animate = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(Animate, _Component);
function Animate(props, context) {
_classCallCheck(this, Animate);
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Animate).call(this, props, context));
var _this$props = _this.props;
var isActive = _this$props.isActive;
var attributeName = _this$props.attributeName;
var from = _this$props.from;
var to = _this$props.to;
var steps = _this$props.steps;
var children = _this$props.children;
_this.handleStyleChange = _this.handleStyleChange.bind(_this);
_this.changeStyle = _this.changeStyle.bind(_this);
if (!isActive) {
_this.state = { style: {} };
// if children is a function and animation is not active, set style to 'to'
if (typeof children === 'function') {
_this.state = { style: to };
}
return _possibleConstructorReturn(_this);
}
if (steps && steps.length) {
_this.state = { style: steps[0].style };
} else if (from) {
if (typeof children === 'function') {
_this.state = {
style: from
};
return _possibleConstructorReturn(_this);
}
_this.state = {
style: attributeName ? _defineProperty({}, attributeName, from) : from
};
} else {
_this.state = { style: {} };
}
return _this;
}
_createClass(Animate, [{
key: 'componentDidMount',
value: function componentDidMount() {
var _props = this.props;
var isActive = _props.isActive;
var canBegin = _props.canBegin;
if (!isActive || !canBegin) {
return;
}
this.runAnimation(this.props);
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
var isActive = nextProps.isActive;
var canBegin = nextProps.canBegin;
var attributeName = nextProps.attributeName;
var shouldReAnimate = nextProps.shouldReAnimate;
if (!canBegin) {
return;
}
if (!isActive) {
this.setState({
style: attributeName ? _defineProperty({}, attributeName, nextProps.to) : nextProps.to
});
return;
}
var animateProps = ['to', 'canBegin', 'isActive'];
if ((0, _isEqual3.default)(this.props.to, nextProps.to) && this.props.canBegin && this.props.isActive) {
return;
}
var isTriggered = !this.props.canBegin || !this.props.isActive;
if (this.manager) {
this.manager.stop();
}
if (this.stopJSAnimation) {
this.stopJSAnimation();
}
var from = isTriggered || shouldReAnimate ? nextProps.from : this.props.to;
this.setState({
style: attributeName ? _defineProperty({}, attributeName, from) : from
});
this.runAnimation(_extends({}, nextProps, {
from: from,
begin: 0
}));
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
if (this.unSubscribe) {
this.unSubscribe();
}
if (this.manager) {
this.manager.stop();
this.manager = null;
}
if (this.stopJSAnimation) {
this.stopJSAnimation();
}
}
}, {
key: 'runJSAnimation',
value: function runJSAnimation(props) {
var _this2 = this;
var from = props.from;
var to = props.to;
var duration = props.duration;
var easing = props.easing;
var begin = props.begin;
var onAnimationEnd = props.onAnimationEnd;
var onAnimationStart = props.onAnimationStart;
var startAnimation = (0, _configUpdate2.default)(from, to, (0, _easing.configEasing)(easing), duration, this.changeStyle);
var finalStartAnimation = function finalStartAnimation() {
_this2.stopJSAnimation = startAnimation();
};
this.manager.start([onAnimationStart, begin, finalStartAnimation, duration, onAnimationEnd]);
}
}, {
key: 'runStepAnimation',
value: function runStepAnimation(props) {
var _this3 = this;
var steps = props.steps;
var begin = props.begin;
var onAnimationStart = props.onAnimationStart;
var _steps$ = steps[0];
var initialStyle = _steps$.style;
var _steps$$duration = _steps$.duration;
var initialTime = _steps$$duration === undefined ? 0 : _steps$$duration;
var addStyle = function addStyle(sequence, nextItem, index) {
if (index === 0) {
return sequence;
}
var duration = nextItem.duration;
var _nextItem$easing = nextItem.easing;
var easing = _nextItem$easing === undefined ? 'ease' : _nextItem$easing;
var style = nextItem.style;
var nextProperties = nextItem.properties;
var onAnimationEnd = nextItem.onAnimationEnd;
var preItem = index > 0 ? steps[index - 1] : nextItem;
var properties = nextProperties || Object.keys(style);
if (typeof easing === 'function' || easing === 'spring') {
return [].concat(_toConsumableArray(sequence), [_this3.runJSAnimation.bind(_this3, {
from: preItem.style,
to: style,
duration: duration,
easing: easing
}), duration]);
}
var transition = (0, _util.getTransitionVal)(properties, duration, easing);
var newStyle = _extends({}, preItem.style, style, {
transition: transition
});
return [].concat(_toConsumableArray(sequence), [newStyle, duration, onAnimationEnd]).filter(_util.identity);
};
return this.manager.start([onAnimationStart].concat(_toConsumableArray(steps.reduce(addStyle, [initialStyle, Math.max(initialTime, begin)])), [props.onAnimationEnd]));
}
}, {
key: 'runAnimation',
value: function runAnimation(props) {
if (!this.manager) {
this.manager = (0, _AnimateManager2.default)();
}
var begin = props.begin;
var duration = props.duration;
var attributeName = props.attributeName;
var propsFrom = props.from;
var propsTo = props.to;
var easing = props.easing;
var onAnimationStart = props.onAnimationStart;
var onAnimationEnd = props.onAnimationEnd;
var steps = props.steps;
var children = props.children;
var manager = this.manager;
this.unSubscribe = manager.subscribe(this.handleStyleChange);
if (typeof easing === 'function' || typeof children === 'function' || easing === 'spring') {
this.runJSAnimation(props);
return;
}
if (steps.length > 1) {
this.runStepAnimation(props);
return;
}
var to = attributeName ? _defineProperty({}, attributeName, propsTo) : propsTo;
var transition = (0, _util.getTransitionVal)(Object.keys(to), duration, easing);
manager.start([onAnimationStart, begin, _extends({}, to, { transition: transition }), duration, onAnimationEnd]);
}
}, {
key: 'handleStyleChange',
value: function handleStyleChange(style) {
this.changeStyle(style);
}
}, {
key: 'changeStyle',
value: function changeStyle(style) {
this.setState({
style: style
});
}
}, {
key: 'render',
value: function render() {
var _props2 = this.props;
var children = _props2.children;
var begin = _props2.begin;
var duration = _props2.duration;
var attributeName = _props2.attributeName;
var easing = _props2.easing;
var isActive = _props2.isActive;
var steps = _props2.steps;
var from = _props2.from;
var to = _props2.to;
var canBegin = _props2.canBegin;
var onAnimationEnd = _props2.onAnimationEnd;
var shouldReAnimate = _props2.shouldReAnimate;
var onAnimationReStart = _props2.onAnimationReStart;
var others = _objectWithoutProperties(_props2, ['children', 'begin', 'duration', 'attributeName', 'easing', 'isActive', 'steps', 'from', 'to', 'canBegin', 'onAnimationEnd', 'shouldReAnimate', 'onAnimationReStart']);
var count = _react.Children.count(children);
var stateStyle = (0, _util.translateStyle)(this.state.style);
if (typeof children === 'function') {
return children(stateStyle);
}
if (!isActive || count === 0) {
return children;
}
var cloneContainer = function cloneContainer(container) {
var _container$props = container.props;
var _container$props$styl = _container$props.style;
var style = _container$props$styl === undefined ? {} : _container$props$styl;
var className = _container$props.className;
var res = (0, _react.cloneElement)(container, _extends({}, others, {
style: _extends({}, style, stateStyle),
className: className
}));
return res;
};
if (count === 1) {
var onlyChild = _react.Children.only(children);
return cloneContainer(_react.Children.only(children));
}
return _react2.default.createElement(
'div',
null,
_react.Children.map(children, function (child) {
return cloneContainer(child);
})
);
}
}]);
return Animate;
}(_react.Component), _class2.displayName = 'Animate', _class2.propTypes = {
from: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.string]),
to: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.string]),
attributeName: _react.PropTypes.string,
// animation duration
duration: _react.PropTypes.number,
begin: _react.PropTypes.number,
easing: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.func]),
steps: _react.PropTypes.arrayOf(_react.PropTypes.shape({
duration: _react.PropTypes.number.isRequired,
style: _react.PropTypes.object.isRequired,
easing: _react.PropTypes.oneOfType([_react.PropTypes.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear']), _react.PropTypes.func]),
// transition css properties(dash case), optional
properties: _react.PropTypes.arrayOf('string'),
onAnimationEnd: _react.PropTypes.func
})),
children: _react.PropTypes.oneOfType([_react.PropTypes.node, _react.PropTypes.func]),
isActive: _react.PropTypes.bool,
canBegin: _react.PropTypes.bool,
onAnimationEnd: _react.PropTypes.func,
// decide if it should reanimate with initial from style when props change
shouldReAnimate: _react.PropTypes.bool,
onAnimationStart: _react.PropTypes.func,
onAnimationReStart: _react.PropTypes.func
}, _class2.defaultProps = {
begin: 0,
duration: 1000,
from: '',
to: '',
attributeName: '',
easing: 'ease',
isActive: true,
canBegin: true,
steps: [],
onAnimationEnd: function onAnimationEnd() {},
onAnimationStart: function onAnimationStart() {}
}, _temp)) || _class;
exports.default = Animate;
/***/ },
/* 139 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
exports.default = createAnimateManager;
var _setRafTimeout = __webpack_require__(140);
var _setRafTimeout2 = _interopRequireDefault(_setRafTimeout);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); }
function createAnimateManager() {
var currStyle = {};
var handleChange = function handleChange() {
return null;
};
var shouldStop = false;
var setStyle = function setStyle(_style) {
if (shouldStop) {
return;
}
if (Array.isArray(_style)) {
if (!_style.length) {
return;
}
var styles = _style;
var _styles = _toArray(styles);
var curr = _styles[0];
var restStyles = _styles.slice(1);
if (typeof curr === 'number') {
(0, _setRafTimeout2.default)(setStyle.bind(null, restStyles), curr);
return;
}
setStyle(curr);
(0, _setRafTimeout2.default)(setStyle.bind(null, restStyles));
return;
}
if ((typeof _style === 'undefined' ? 'undefined' : _typeof(_style)) === 'object') {
currStyle = _style;
handleChange(currStyle);
}
if (typeof _style === 'function') {
_style();
}
};
return {
stop: function stop() {
shouldStop = true;
},
start: function start(style) {
shouldStop = false;
setStyle(style);
},
subscribe: function subscribe(_handleChange) {
handleChange = _handleChange;
return function () {
handleChange = function handleChange() {
return null;
};
};
}
};
}
/***/ },
/* 140 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = setRafTimeout;
var _raf = __webpack_require__(141);
var _raf2 = _interopRequireDefault(_raf);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function setRafTimeout(callback) {
var timeout = arguments.length <= 1 || arguments[1] === undefined ? 0 : arguments[1];
var currTime = -1;
var shouldUpdate = function shouldUpdate(now) {
if (currTime < 0) {
currTime = now;
}
if (now - currTime > timeout) {
callback(now);
currTime = -1;
} else {
(0, _raf2.default)(shouldUpdate);
}
};
(0, _raf2.default)(shouldUpdate);
}
/***/ },
/* 141 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {var now = __webpack_require__(142)
, root = typeof window === 'undefined' ? global : window
, vendors = ['moz', 'webkit']
, suffix = 'AnimationFrame'
, raf = root['request' + suffix]
, caf = root['cancel' + suffix] || root['cancelRequest' + suffix]
for(var i = 0; !raf && i < vendors.length; i++) {
raf = root[vendors[i] + 'Request' + suffix]
caf = root[vendors[i] + 'Cancel' + suffix]
|| root[vendors[i] + 'CancelRequest' + suffix]
}
// Some versions of FF have rAF but not cAF
if(!raf || !caf) {
var last = 0
, id = 0
, queue = []
, frameDuration = 1000 / 60
raf = function(callback) {
if(queue.length === 0) {
var _now = now()
, next = Math.max(0, frameDuration - (_now - last))
last = next + _now
setTimeout(function() {
var cp = queue.slice(0)
// Clear queue here to prevent
// callbacks from appending listeners
// to the current frame's queue
queue.length = 0
for(var i = 0; i < cp.length; i++) {
if(!cp[i].cancelled) {
try{
cp[i].callback(last)
} catch(e) {
setTimeout(function() { throw e }, 0)
}
}
}
}, Math.round(next))
}
queue.push({
handle: ++id,
callback: callback,
cancelled: false
})
return id
}
caf = function(handle) {
for(var i = 0; i < queue.length; i++) {
if(queue[i].handle === handle) {
queue[i].cancelled = true
}
}
}
}
module.exports = function(fn) {
// Wrap in a new function to prevent
// `cancel` potentially being assigned
// to the native rAF function
return raf.call(root, fn)
}
module.exports.cancel = function() {
caf.apply(root, arguments)
}
module.exports.polyfill = function() {
root.requestAnimationFrame = raf
root.cancelAnimationFrame = caf
}
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
/***/ },
/* 142 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {// Generated by CoffeeScript 1.7.1
(function() {
var getNanoSeconds, hrtime, loadTime;
if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
module.exports = function() {
return performance.now();
};
} else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
module.exports = function() {
return (getNanoSeconds() - loadTime) / 1e6;
};
hrtime = process.hrtime;
getNanoSeconds = function() {
var hr;
hr = hrtime();
return hr[0] * 1e9 + hr[1];
};
loadTime = getNanoSeconds();
} else if (Date.now) {
module.exports = function() {
return Date.now() - loadTime;
};
loadTime = Date.now();
} else {
module.exports = function() {
return new Date().getTime() - loadTime;
};
loadTime = new Date().getTime();
}
}).call(this);
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(143)))
/***/ },
/* 143 */
/***/ function(module, exports) {
// shim for using process in browser
var process = module.exports = {};
// cached from whatever global is present so that test runners that stub it
// don't break things. But we need to wrap it in a try catch in case it is
// wrapped in strict mode code which doesn't define any globals. It's inside a
// function because try/catches deoptimize in certain engines.
var cachedSetTimeout;
var cachedClearTimeout;
(function () {
try {
cachedSetTimeout = setTimeout;
} catch (e) {
cachedSetTimeout = function () {
throw new Error('setTimeout is not defined');
}
}
try {
cachedClearTimeout = clearTimeout;
} catch (e) {
cachedClearTimeout = function () {
throw new Error('clearTimeout is not defined');
}
}
} ())
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;
function cleanUpNextTick() {
if (!draining || !currentQueue) {
return;
}
draining = false;
if (currentQueue.length) {
queue = currentQueue.concat(queue);
} else {
queueIndex = -1;
}
if (queue.length) {
drainQueue();
}
}
function drainQueue() {
if (draining) {
return;
}
var timeout = cachedSetTimeout(cleanUpNextTick);
draining = true;
var len = queue.length;
while(len) {
currentQueue = queue;
queue = [];
while (++queueIndex < len) {
if (currentQueue) {
currentQueue[queueIndex].run();
}
}
queueIndex = -1;
len = queue.length;
}
currentQueue = null;
draining = false;
cachedClearTimeout(timeout);
}
process.nextTick = function (fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) {
for (var i = 1; i < arguments.length; i++) {
args[i - 1] = arguments[i];
}
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
cachedSetTimeout(drainQueue, 0);
}
};
// v8 likes predictible objects
function Item(fun, array) {
this.fun = fun;
this.array = array;
}
Item.prototype.run = function () {
this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};
function noop() {}
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.binding = function (name) {
throw new Error('process.binding is not supported');
};
process.cwd = function () { return '/' };
process.chdir = function (dir) {
throw new Error('process.chdir is not supported');
};
process.umask = function() { return 0; };
/***/ },
/* 144 */
51,
/* 145 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.configEasing = exports.configSpring = exports.configBezier = undefined;
var _util = __webpack_require__(146);
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
var ACCURACY = 1e-4;
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
};
var multyTime = function multyTime(params, t) {
return params.map(function (param, i) {
return param * Math.pow(t, i);
}).reduce(function (pre, curr) {
return pre + curr;
});
};
var cubicBezier = function cubicBezier(c1, c2) {
return function (t) {
var params = cubicBezierFactor(c1, c2);
return multyTime(params, t);
};
};
var derivativeCubicBezier = function derivativeCubicBezier(c1, c2) {
return function (t) {
var params = cubicBezierFactor(c1, c2);
var newParams = [].concat(_toConsumableArray(params.map(function (param, i) {
return param * i;
}).slice(1)), [0]);
return multyTime(newParams, t);
};
};
// calculate cubic-bezier using Newton's method
var configBezier = exports.configBezier = function configBezier() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var x1 = args[0];
var y1 = args[1];
var x2 = args[2];
var y2 = args[3];
if (args.length === 1) {
switch (args[0]) {
case 'linear':
x1 = 0.0;
y1 = 0.0;
x2 = 1.0;
y2 = 1.0;
break;
case 'ease':
x1 = 0.25;
y1 = 0.1;
x2 = 0.25;
y2 = 1.0;
break;
case 'ease-in':
x1 = 0.42;
y1 = 0.0;
x2 = 1.0;
y2 = 1.0;
break;
case 'ease-out':
x1 = 0.42;
y1 = 0.0;
x2 = 0.58;
y2 = 1.0;
break;
case 'ease-in-out':
x1 = 0.0;
y1 = 0.0;
x2 = 0.58;
y2 = 1.0;
break;
default:
(0, _util.warn)(false, '[configBezier]: arguments should be one of ' + 'oneOf \'linear\', \'ease\', \'ease-in\', \'ease-out\', ' + '\'ease-in-out\', instead received %s', args);
}
}
(0, _util.warn)([x1, x2, y1, y2].every(function (num) {
return typeof num === 'number' && num >= 0 && num <= 1;
}), '[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s', args);
var curveX = cubicBezier(x1, x2);
var curveY = cubicBezier(y1, y2);
var derCurveX = derivativeCubicBezier(x1, x2);
var rangeValue = function rangeValue(value) {
if (value > 1) {
return 1;
} else if (value < 0) {
return 0;
}
return value;
};
var bezier = function bezier(_t) {
var t = _t > 1 ? 1 : _t;
var x = t;
for (var i = 0; i < 8; ++i) {
var evalT = curveX(x) - t;
var derVal = derCurveX(x);
if (Math.abs(evalT - t) < ACCURACY || derVal < ACCURACY) {
return curveY(x);
}
x = rangeValue(x - evalT / derVal);
}
return curveY(x);
};
bezier.isStepper = false;
return bezier;
};
var configSpring = exports.configSpring = function configSpring() {
var config = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var _config$stiff = config.stiff;
var stiff = _config$stiff === undefined ? 100 : _config$stiff;
var _config$damping = config.damping;
var damping = _config$damping === undefined ? 8 : _config$damping;
var _config$dt = config.dt;
var dt = _config$dt === undefined ? 17 : _config$dt;
var stepper = function stepper(currX, destX, currV) {
var FSpring = -(currX - destX) * stiff;
var FDamping = currV * damping;
var newV = currV + (FSpring - FDamping) * dt / 1000;
var newX = currV * dt / 1000 + currX;
if (Math.abs(newX - destX) < ACCURACY && Math.abs(newV) < ACCURACY) {
return [destX, 0];
}
return [newX, newV];
};
stepper.isStepper = true;
stepper.dt = dt;
return stepper;
};
var configEasing = exports.configEasing = function configEasing() {
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
var easing = args[0];
if (typeof easing === 'string') {
switch (easing) {
case 'ease':
case 'ease-int-out':
case 'ease-out':
case 'ease-in':
case 'linear':
return configBezier(easing);
case 'spring':
return configSpring();
default:
(0, _util.warn)(false, '[configEasing]: first argument should be one of \'ease\', \'ease-in\', ' + '\'ease-out\', \'ease-in-out\', \'linear\' and \'spring\', instead received %s', args);
}
}
if (typeof easing === 'function') {
return easing;
}
(0, _util.warn)(false, '[configEasing]: first argument type should be function or ' + 'string, instead received %s', args);
return null;
};
/***/ },
/* 146 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.warn = exports.getTransitionVal = exports.compose = exports.translateStyle = exports.mapObject = exports.debugf = exports.debug = exports.log = exports.generatePrefixStyle = exports.getDashCase = exports.identity = exports.getIntersectionKeys = undefined;
var _intersection2 = __webpack_require__(147);
var _intersection3 = _interopRequireDefault(_intersection2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
/* eslint no-console: 0 */
var PREFIX_LIST = ['Webkit', 'Moz', 'O', 'ms'];
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
var IN_COMPATIBLE_PROPERTY = ['transform', 'transformOrigin', 'transition'];
var getIntersectionKeys = exports.getIntersectionKeys = function getIntersectionKeys(preObj, nextObj) {
return (0, _intersection3.default)(Object.keys(preObj), Object.keys(nextObj));
};
var identity = exports.identity = function identity(param) {
return param;
};
/*
* @description: convert camel case to dash case
* string => string
*/
var getDashCase = exports.getDashCase = function getDashCase(name) {
return name.replace(/([A-Z])/g, function (v) {
return '-' + v.toLowerCase();
});
};
/*
* @description: add compatible style prefix
* (string, string) => object
*/
var generatePrefixStyle = exports.generatePrefixStyle = function generatePrefixStyle(name, value) {
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
return _defineProperty({}, name, value);
}
var isTransition = name === 'transition';
var camelName = name.replace(/(\w)/, function (v) {
return v.toUpperCase();
});
var styleVal = value;
return PREFIX_LIST.reduce(function (result, property, i) {
if (isTransition) {
styleVal = value.replace(/(transform|transform-origin)/gim, '-webkit-$1');
}
return _extends({}, result, _defineProperty({}, property + camelName, styleVal));
}, {});
};
var log = exports.log = console.log.bind(console);
/*
* @description: log the value of a varible
* string => any => any
*/
var debug = exports.debug = function debug(name) {
return function (item) {
log(name, item);
return item;
};
};
/*
* @description: log name, args, return value of a function
* function => function
*/
var debugf = exports.debugf = function debugf(tag, f) {
return function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var res = f.apply(undefined, args);
var name = tag || f.name || 'anonymous function';
var argNames = '(' + args.map(JSON.stringify).join(', ') + ')';
log(name + ': ' + argNames + ' => ' + JSON.stringify(res));
return res;
};
};
/*
* @description: map object on every element in this object.
* (function, object) => object
*/
var mapObject = exports.mapObject = function mapObject(fn, obj) {
return Object.keys(obj).reduce(function (res, key) {
return _extends({}, res, _defineProperty({}, key, fn(key, obj[key])));
}, {});
};
/*
* @description: add compatible prefix to style
* object => object
*/
var translateStyle = exports.translateStyle = function translateStyle(style) {
return Object.keys(style).reduce(function (res, key) {
return _extends({}, res, generatePrefixStyle(key, res[key]));
}, style);
};
var compose = exports.compose = function compose() {
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
if (!args.length) {
return identity;
}
var fns = args.reverse();
// first function can receive multiply arguments
var firstFn = fns[0];
var tailsFn = fns.slice(1);
return function () {
return tailsFn.reduce(function (res, fn) {
return fn(res);
}, firstFn.apply(undefined, arguments));
};
};
var getTransitionVal = exports.getTransitionVal = function getTransitionVal(props, duration, easing) {
return props.map(function (prop) {
return getDashCase(prop) + ' ' + duration + 'ms ' + easing;
}).join(',');
};
var isDev = ("development") !== 'production';
var warn = exports.warn = function warn(condition, format, a, b, c, d, e, f) {
if (isDev && typeof console !== 'undefined' && console.warn) {
if (format === undefined) {
console.warn('LogUtils requires an error message argument');
}
if (!condition) {
if (format === undefined) {
console.warn('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
} else {
(function () {
var args = [a, b, c, d, e, f];
var argIndex = 0;
console.warn(format.replace(/%s/g, function () {
return args[argIndex++];
}));
})();
}
}
}
};
/***/ },
/* 147 */
/***/ function(module, exports, __webpack_require__) {
var arrayMap = __webpack_require__(148),
baseIntersection = __webpack_require__(149),
castArrayLikeObject = __webpack_require__(156),
rest = __webpack_require__(157);
/**
* Creates an array of unique values that are included in all given arrays
* using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* for equality comparisons. The order of result values is determined by the
* order they occur in the first array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @returns {Array} Returns the new array of intersecting values.
* @example
*
* _.intersection([2, 1], [2, 3]);
* // => [2]
*/
var intersection = rest(function(arrays) {
var mapped = arrayMap(arrays, castArrayLikeObject);
return (mapped.length && mapped[0] === arrays[0])
? baseIntersection(mapped)
: [];
});
module.exports = intersection;
/***/ },
/* 148 */
/***/ function(module, exports) {
/**
* A specialized version of `_.map` for arrays without support for iteratee
* shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
*/
function arrayMap(array, iteratee) {
var index = -1,
length = array ? array.length : 0,
result = Array(length);
while (++index < length) {
result[index] = iteratee(array[index], index, array);
}
return result;
}
module.exports = arrayMap;
/***/ },
/* 149 */
/***/ function(module, exports, __webpack_require__) {
var SetCache = __webpack_require__(97),
arrayIncludes = __webpack_require__(150),
arrayIncludesWith = __webpack_require__(153),
arrayMap = __webpack_require__(148),
baseUnary = __webpack_require__(154),
cacheHas = __webpack_require__(155);
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMin = Math.min;
/**
* The base implementation of methods like `_.intersection`, without support
* for iteratee shorthands, that accepts an array of arrays to inspect.
*
* @private
* @param {Array} arrays The arrays to inspect.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of shared values.
*/
function baseIntersection(arrays, iteratee, comparator) {
var includes = comparator ? arrayIncludesWith : arrayIncludes,
length = arrays[0].length,
othLength = arrays.length,
othIndex = othLength,
caches = Array(othLength),
maxLength = Infinity,
result = [];
while (othIndex--) {
var array = arrays[othIndex];
if (othIndex && iteratee) {
array = arrayMap(array, baseUnary(iteratee));
}
maxLength = nativeMin(array.length, maxLength);
caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
? new SetCache(othIndex && array)
: undefined;
}
array = arrays[0];
var index = -1,
seen = caches[0];
outer:
while (++index < length && result.length < maxLength) {
var value = array[index],
computed = iteratee ? iteratee(value) : value;
value = (comparator || value !== 0) ? value : 0;
if (!(seen
? cacheHas(seen, computed)
: includes(result, computed, comparator)
)) {
othIndex = othLength;
while (--othIndex) {
var cache = caches[othIndex];
if (!(cache
? cacheHas(cache, computed)
: includes(arrays[othIndex], computed, comparator))
) {
continue outer;
}
}
if (seen) {
seen.push(computed);
}
result.push(value);
}
}
return result;
}
module.exports = baseIntersection;
/***/ },
/* 150 */
/***/ function(module, exports, __webpack_require__) {
var baseIndexOf = __webpack_require__(151);
/**
* A specialized version of `_.includes` for arrays without support for
* specifying an index to search from.
*
* @private
* @param {Array} [array] The array to search.
* @param {*} target The value to search for.
* @returns {boolean} Returns `true` if `target` is found, else `false`.
*/
function arrayIncludes(array, value) {
var length = array ? array.length : 0;
return !!length && baseIndexOf(array, value, 0) > -1;
}
module.exports = arrayIncludes;
/***/ },
/* 151 */
/***/ function(module, exports, __webpack_require__) {
var indexOfNaN = __webpack_require__(152);
/**
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
*
* @private
* @param {Array} array The array to search.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseIndexOf(array, value, fromIndex) {
if (value !== value) {
return indexOfNaN(array, fromIndex);
}
var index = fromIndex - 1,
length = array.length;
while (++index < length) {
if (array[index] === value) {
return index;
}
}
return -1;
}
module.exports = baseIndexOf;
/***/ },
/* 152 */
/***/ function(module, exports) {
/**
* Gets the index at which the first occurrence of `NaN` is found in `array`.
*
* @private
* @param {Array} array The array to search.
* @param {number} fromIndex The index to search from.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {number} Returns the index of the matched `NaN`, else `-1`.
*/
function indexOfNaN(array, fromIndex, fromRight) {
var length = array.length,
index = fromIndex + (fromRight ? 1 : -1);
while ((fromRight ? index-- : ++index < length)) {
var other = array[index];
if (other !== other) {
return index;
}
}
return -1;
}
module.exports = indexOfNaN;
/***/ },
/* 153 */
/***/ function(module, exports) {
/**
* This function is like `arrayIncludes` except that it accepts a comparator.
*
* @private
* @param {Array} [array] The array to search.
* @param {*} target The value to search for.
* @param {Function} comparator The comparator invoked per element.
* @returns {boolean} Returns `true` if `target` is found, else `false`.
*/
function arrayIncludesWith(array, value, comparator) {
var index = -1,
length = array ? array.length : 0;
while (++index < length) {
if (comparator(value, array[index])) {
return true;
}
}
return false;
}
module.exports = arrayIncludesWith;
/***/ },
/* 154 */
/***/ function(module, exports) {
/**
* The base implementation of `_.unary` without support for storing wrapper metadata.
*
* @private
* @param {Function} func The function to cap arguments for.
* @returns {Function} Returns the new capped function.
*/
function baseUnary(func) {
return function(value) {
return func(value);
};
}
module.exports = baseUnary;
/***/ },
/* 155 */
/***/ function(module, exports) {
/**
* Checks if a cache value for `key` exists.
*
* @private
* @param {Object} cache The cache to query.
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function cacheHas(cache, key) {
return cache.has(key);
}
module.exports = cacheHas;
/***/ },
/* 156 */
/***/ function(module, exports, __webpack_require__) {
var isArrayLikeObject = __webpack_require__(113);
/**
* Casts `value` to an empty array if it's not an array like object.
*
* @private
* @param {*} value The value to inspect.
* @returns {Array|Object} Returns the cast array-like object.
*/
function castArrayLikeObject(value) {
return isArrayLikeObject(value) ? value : [];
}
module.exports = castArrayLikeObject;
/***/ },
/* 157 */
/***/ function(module, exports, __webpack_require__) {
var apply = __webpack_require__(158),
toInteger = __webpack_require__(159);
/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* Creates a function that invokes `func` with the `this` binding of the
* created function and arguments from `start` and beyond provided as
* an array.
*
* **Note:** This method is based on the
* [rest parameter](https://mdn.io/rest_parameters).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Function
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
* @returns {Function} Returns the new function.
* @example
*
* var say = _.rest(function(what, names) {
* return what + ' ' + _.initial(names).join(', ') +
* (_.size(names) > 1 ? ', & ' : '') + _.last(names);
* });
*
* say('hello', 'fred', 'barney', 'pebbles');
* // => 'hello fred, barney, & pebbles'
*/
function rest(func, start) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0);
return function() {
var args = arguments,
index = -1,
length = nativeMax(args.length - start, 0),
array = Array(length);
while (++index < length) {
array[index] = args[start + index];
}
switch (start) {
case 0: return func.call(this, array);
case 1: return func.call(this, args[0], array);
case 2: return func.call(this, args[0], args[1], array);
}
var otherArgs = Array(start + 1);
index = -1;
while (++index < start) {
otherArgs[index] = args[index];
}
otherArgs[start] = array;
return apply(func, this, otherArgs);
};
}
module.exports = rest;
/***/ },
/* 158 */
/***/ function(module, exports) {
/**
* A faster alternative to `Function#apply`, this function invokes `func`
* with the `this` binding of `thisArg` and the arguments of `args`.
*
* @private
* @param {Function} func The function to invoke.
* @param {*} thisArg The `this` binding of `func`.
* @param {Array} args The arguments to invoke `func` with.
* @returns {*} Returns the result of `func`.
*/
function apply(func, thisArg, args) {
var length = args.length;
switch (length) {
case 0: return func.call(thisArg);
case 1: return func.call(thisArg, args[0]);
case 2: return func.call(thisArg, args[0], args[1]);
case 3: return func.call(thisArg, args[0], args[1], args[2]);
}
return func.apply(thisArg, args);
}
module.exports = apply;
/***/ },
/* 159 */
/***/ function(module, exports, __webpack_require__) {
var toFinite = __webpack_require__(160);
/**
* Converts `value` to an integer.
*
* **Note:** This method is loosely based on
* [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted integer.
* @example
*
* _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
* // => 0
*
* _.toInteger(Infinity);
* // => 1.7976931348623157e+308
*
* _.toInteger('3.2');
* // => 3
*/
function toInteger(value) {
var result = toFinite(value),
remainder = result % 1;
return result === result ? (remainder ? result - remainder : result) : 0;
}
module.exports = toInteger;
/***/ },
/* 160 */
/***/ function(module, exports, __webpack_require__) {
var toNumber = __webpack_require__(161);
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0,
MAX_INTEGER = 1.7976931348623157e+308;
/**
* Converts `value` to a finite number.
*
* @static
* @memberOf _
* @since 4.12.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted number.
* @example
*
* _.toFinite(3.2);
* // => 3.2
*
* _.toFinite(Number.MIN_VALUE);
* // => 5e-324
*
* _.toFinite(Infinity);
* // => 1.7976931348623157e+308
*
* _.toFinite('3.2');
* // => 3.2
*/
function toFinite(value) {
if (!value) {
return value === 0 ? value : 0;
}
value = toNumber(value);
if (value === INFINITY || value === -INFINITY) {
var sign = (value < 0 ? -1 : 1);
return sign * MAX_INTEGER;
}
return value === value ? value : 0;
}
module.exports = toFinite;
/***/ },
/* 161 */
/***/ function(module, exports, __webpack_require__) {
var isFunction = __webpack_require__(49),
isObject = __webpack_require__(50),
isSymbol = __webpack_require__(162);
/** Used as references for various `Number` constants. */
var NAN = 0 / 0;
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;
/** Used to detect bad signed hexadecimal string values. */
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
/** Used to detect binary string values. */
var reIsBinary = /^0b[01]+$/i;
/** Used to detect octal string values. */
var reIsOctal = /^0o[0-7]+$/i;
/** Built-in method references without a dependency on `root`. */
var freeParseInt = parseInt;
/**
* Converts `value` to a number.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
* @example
*
* _.toNumber(3.2);
* // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
*
* _.toNumber(Infinity);
* // => Infinity
*
* _.toNumber('3.2');
* // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
return value;
}
if (isSymbol(value)) {
return NAN;
}
if (isObject(value)) {
var other = isFunction(value.valueOf) ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other;
}
if (typeof value != 'string') {
return value === 0 ? value : +value;
}
value = value.replace(reTrim, '');
var isBinary = reIsBinary.test(value);
return (isBinary || reIsOctal.test(value))
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
: (reIsBadHex.test(value) ? NAN : +value);
}
module.exports = toNumber;
/***/ },
/* 162 */
/***/ function(module, exports, __webpack_require__) {
var isObjectLike = __webpack_require__(48);
/** `Object#toString` result references. */
var symbolTag = '[object Symbol]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/**
* Checks if `value` is classified as a `Symbol` primitive or object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
* // => true
*
* _.isSymbol('abc');
* // => false
*/
function isSymbol(value) {
return typeof value == 'symbol' ||
(isObjectLike(value) && objectToString.call(value) == symbolTag);
}
module.exports = isSymbol;
/***/ },
/* 163 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _filter2 = __webpack_require__(164);
var _filter3 = _interopRequireDefault(_filter2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _raf = __webpack_require__(141);
var _raf2 = _interopRequireDefault(_raf);
var _util = __webpack_require__(146);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var alpha = function alpha(begin, end, k) {
return begin + (end - begin) * k;
};
var needContinue = function needContinue(_ref) {
var from = _ref.from;
var to = _ref.to;
return from !== to;
};
/*
* @description: cal new from value and velocity in each stepper
* @return: { [styleProperty]: { from, to, velocity } }
*/
var calStepperVals = function calStepperVals(easing, preVals, steps) {
var nextStepVals = (0, _util.mapObject)(function (key, val) {
if (needContinue(val)) {
var _easing = easing(val.from, val.to, val.velocity);
var _easing2 = _slicedToArray(_easing, 2);
var newX = _easing2[0];
var newV = _easing2[1];
return _extends({}, val, {
from: newX,
velocity: newV
});
}
return val;
}, preVals);
if (steps < 1) {
return (0, _util.mapObject)(function (key, val) {
if (needContinue(val)) {
return _extends({}, val, {
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
from: alpha(val.from, nextStepVals[key].from, steps)
});
}
return val;
}, preVals);
}
return calStepperVals(easing, nextStepVals, steps - 1);
};
// configure update function
exports.default = function (from, to, easing, duration, render) {
var interKeys = (0, _util.getIntersectionKeys)(from, to);
var timingStyle = interKeys.reduce(function (res, key) {
return _extends({}, res, _defineProperty({}, key, [from[key], to[key]]));
}, {});
var stepperStyle = interKeys.reduce(function (res, key) {
return _extends({}, res, _defineProperty({}, key, {
from: from[key],
velocity: 0,
to: to[key]
}));
}, {});
var cafId = -1;
var preTime = void 0;
var beginTime = void 0;
var update = function update() {
return null;
};
var getCurrStyle = function getCurrStyle() {
return (0, _util.mapObject)(function (key, val) {
return val.from;
}, stepperStyle);
};
var shouldStopAnimation = function shouldStopAnimation() {
return !(0, _filter3.default)(stepperStyle, needContinue).length;
};
// stepper timing function like spring
var stepperUpdate = function stepperUpdate(now) {
if (!preTime) {
preTime = now;
}
var deltaTime = now - preTime;
var steps = deltaTime / easing.dt;
stepperStyle = calStepperVals(easing, stepperStyle, steps);
// get union set and add compatible prefix
render(_extends({}, from, to, getCurrStyle(stepperStyle)));
preTime = now;
if (!shouldStopAnimation()) {
cafId = (0, _raf2.default)(update);
}
};
// t => val timing function like cubic-bezier
var timingUpdate = function timingUpdate(now) {
if (!beginTime) {
beginTime = now;
}
var t = (now - beginTime) / duration;
var currStyle = (0, _util.mapObject)(function (key, val) {
return alpha.apply(undefined, _toConsumableArray(val).concat([easing(t)]));
}, timingStyle);
// get union set and add compatible prefix
render(_extends({}, from, to, currStyle));
if (t < 1) {
cafId = (0, _raf2.default)(update);
}
};
update = easing.isStepper ? stepperUpdate : timingUpdate;
// return start animation method
return function () {
(0, _raf2.default)(update);
// return stop animation method
return function () {
(0, _raf.cancel)(cafId);
};
};
};
/***/ },
/* 164 */
/***/ function(module, exports, __webpack_require__) {
var arrayFilter = __webpack_require__(165),
baseFilter = __webpack_require__(166),
baseIteratee = __webpack_require__(172),
isArray = __webpack_require__(118);
/**
* Iterates over elements of `collection`, returning an array of all elements
* `predicate` returns truthy for. The predicate is invoked with three
* arguments: (value, index|key, collection).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Array|Function|Object|string} [predicate=_.identity]
* The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
* @see _.reject
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36, 'active': true },
* { 'user': 'fred', 'age': 40, 'active': false }
* ];
*
* _.filter(users, function(o) { return !o.active; });
* // => objects for ['fred']
*
* // The `_.matches` iteratee shorthand.
* _.filter(users, { 'age': 36, 'active': true });
* // => objects for ['barney']
*
* // The `_.matchesProperty` iteratee shorthand.
* _.filter(users, ['active', false]);
* // => objects for ['fred']
*
* // The `_.property` iteratee shorthand.
* _.filter(users, 'active');
* // => objects for ['barney']
*/
function filter(collection, predicate) {
var func = isArray(collection) ? arrayFilter : baseFilter;
return func(collection, baseIteratee(predicate, 3));
}
module.exports = filter;
/***/ },
/* 165 */
/***/ function(module, exports) {
/**
* A specialized version of `_.filter` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
*/
function arrayFilter(array, predicate) {
var index = -1,
length = array ? array.length : 0,
resIndex = 0,
result = [];
while (++index < length) {
var value = array[index];
if (predicate(value, index, array)) {
result[resIndex++] = value;
}
}
return result;
}
module.exports = arrayFilter;
/***/ },
/* 166 */
/***/ function(module, exports, __webpack_require__) {
var baseEach = __webpack_require__(167);
/**
* The base implementation of `_.filter` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
*/
function baseFilter(collection, predicate) {
var result = [];
baseEach(collection, function(value, index, collection) {
if (predicate(value, index, collection)) {
result.push(value);
}
});
return result;
}
module.exports = baseFilter;
/***/ },
/* 167 */
/***/ function(module, exports, __webpack_require__) {
var baseForOwn = __webpack_require__(168),
createBaseEach = __webpack_require__(171);
/**
* The base implementation of `_.forEach` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
*/
var baseEach = createBaseEach(baseForOwn);
module.exports = baseEach;
/***/ },
/* 168 */
/***/ function(module, exports, __webpack_require__) {
var baseFor = __webpack_require__(169),
keys = __webpack_require__(108);
/**
* The base implementation of `_.forOwn` without support for iteratee shorthands.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Object} Returns `object`.
*/
function baseForOwn(object, iteratee) {
return object && baseFor(object, iteratee, keys);
}
module.exports = baseForOwn;
/***/ },
/* 169 */
/***/ function(module, exports, __webpack_require__) {
var createBaseFor = __webpack_require__(170);
/**
* The base implementation of `baseForOwn` which iterates over `object`
* properties returned by `keysFunc` and invokes `iteratee` for each property.
* Iteratee functions may exit iteration early by explicitly returning `false`.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {Function} keysFunc The function to get the keys of `object`.
* @returns {Object} Returns `object`.
*/
var baseFor = createBaseFor();
module.exports = baseFor;
/***/ },
/* 170 */
/***/ function(module, exports) {
/**
* Creates a base function for methods like `_.forIn` and `_.forOwn`.
*
* @private
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Function} Returns the new base function.
*/
function createBaseFor(fromRight) {
return function(object, iteratee, keysFunc) {
var index = -1,
iterable = Object(object),
props = keysFunc(object),
length = props.length;
while (length--) {
var key = props[fromRight ? length : ++index];
if (iteratee(iterable[key], key, iterable) === false) {
break;
}
}
return object;
};
}
module.exports = createBaseFor;
/***/ },
/* 171 */
/***/ function(module, exports, __webpack_require__) {
var isArrayLike = __webpack_require__(114);
/**
* Creates a `baseEach` or `baseEachRight` function.
*
* @private
* @param {Function} eachFunc The function to iterate over a collection.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Function} Returns the new base function.
*/
function createBaseEach(eachFunc, fromRight) {
return function(collection, iteratee) {
if (collection == null) {
return collection;
}
if (!isArrayLike(collection)) {
return eachFunc(collection, iteratee);
}
var length = collection.length,
index = fromRight ? length : -1,
iterable = Object(collection);
while ((fromRight ? index-- : ++index < length)) {
if (iteratee(iterable[index], index, iterable) === false) {
break;
}
}
return collection;
};
}
module.exports = createBaseEach;
/***/ },
/* 172 */
/***/ function(module, exports, __webpack_require__) {
var baseMatches = __webpack_require__(173),
baseMatchesProperty = __webpack_require__(178),
identity = __webpack_require__(191),
isArray = __webpack_require__(118),
property = __webpack_require__(192);
/**
* The base implementation of `_.iteratee`.
*
* @private
* @param {*} [value=_.identity] The value to convert to an iteratee.
* @returns {Function} Returns the iteratee.
*/
function baseIteratee(value) {
// Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
// See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
if (typeof value == 'function') {
return value;
}
if (value == null) {
return identity;
}
if (typeof value == 'object') {
return isArray(value)
? baseMatchesProperty(value[0], value[1])
: baseMatches(value);
}
return property(value);
}
module.exports = baseIteratee;
/***/ },
/* 173 */
/***/ function(module, exports, __webpack_require__) {
var baseIsMatch = __webpack_require__(174),
getMatchData = __webpack_require__(175),
matchesStrictComparable = __webpack_require__(177);
/**
* The base implementation of `_.matches` which doesn't clone `source`.
*
* @private
* @param {Object} source The object of property values to match.
* @returns {Function} Returns the new spec function.
*/
function baseMatches(source) {
var matchData = getMatchData(source);
if (matchData.length == 1 && matchData[0][2]) {
return matchesStrictComparable(matchData[0][0], matchData[0][1]);
}
return function(object) {
return object === source || baseIsMatch(object, source, matchData);
};
}
module.exports = baseMatches;
/***/ },
/* 174 */
/***/ function(module, exports, __webpack_require__) {
var Stack = __webpack_require__(58),
baseIsEqual = __webpack_require__(56);
/** Used to compose bitmasks for comparison styles. */
var UNORDERED_COMPARE_FLAG = 1,
PARTIAL_COMPARE_FLAG = 2;
/**
* The base implementation of `_.isMatch` without support for iteratee shorthands.
*
* @private
* @param {Object} object The object to inspect.
* @param {Object} source The object of property values to match.
* @param {Array} matchData The property names, values, and compare flags to match.
* @param {Function} [customizer] The function to customize comparisons.
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
*/
function baseIsMatch(object, source, matchData, customizer) {
var index = matchData.length,
length = index,
noCustomizer = !customizer;
if (object == null) {
return !length;
}
object = Object(object);
while (index--) {
var data = matchData[index];
if ((noCustomizer && data[2])
? data[1] !== object[data[0]]
: !(data[0] in object)
) {
return false;
}
}
while (++index < length) {
data = matchData[index];
var key = data[0],
objValue = object[key],
srcValue = data[1];
if (noCustomizer && data[2]) {
if (objValue === undefined && !(key in object)) {
return false;
}
} else {
var stack = new Stack;
if (customizer) {
var result = customizer(objValue, srcValue, key, object, source, stack);
}
if (!(result === undefined
? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)
: result
)) {
return false;
}
}
}
return true;
}
module.exports = baseIsMatch;
/***/ },
/* 175 */
/***/ function(module, exports, __webpack_require__) {
var isStrictComparable = __webpack_require__(176),
keys = __webpack_require__(108);
/**
* Gets the property names, values, and compare flags of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the match data of `object`.
*/
function getMatchData(object) {
var result = keys(object),
length = result.length;
while (length--) {
var key = result[length],
value = object[key];
result[length] = [key, value, isStrictComparable(value)];
}
return result;
}
module.exports = getMatchData;
/***/ },
/* 176 */
/***/ function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(50);
/**
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` if suitable for strict
* equality comparisons, else `false`.
*/
function isStrictComparable(value) {
return value === value && !isObject(value);
}
module.exports = isStrictComparable;
/***/ },
/* 177 */
/***/ function(module, exports) {
/**
* A specialized version of `matchesProperty` for source values suitable
* for strict equality comparisons, i.e. `===`.
*
* @private
* @param {string} key The key of the property to get.
* @param {*} srcValue The value to match.
* @returns {Function} Returns the new spec function.
*/
function matchesStrictComparable(key, srcValue) {
return function(object) {
if (object == null) {
return false;
}
return object[key] === srcValue &&
(srcValue !== undefined || (key in Object(object)));
};
}
module.exports = matchesStrictComparable;
/***/ },
/* 178 */
/***/ function(module, exports, __webpack_require__) {
var baseIsEqual = __webpack_require__(56),
get = __webpack_require__(179),
hasIn = __webpack_require__(188),
isKey = __webpack_require__(186),
isStrictComparable = __webpack_require__(176),
matchesStrictComparable = __webpack_require__(177),
toKey = __webpack_require__(187);
/** Used to compose bitmasks for comparison styles. */
var UNORDERED_COMPARE_FLAG = 1,
PARTIAL_COMPARE_FLAG = 2;
/**
* The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
*
* @private
* @param {string} path The path of the property to get.
* @param {*} srcValue The value to match.
* @returns {Function} Returns the new spec function.
*/
function baseMatchesProperty(path, srcValue) {
if (isKey(path) && isStrictComparable(srcValue)) {
return matchesStrictComparable(toKey(path), srcValue);
}
return function(object) {
var objValue = get(object, path);
return (objValue === undefined && objValue === srcValue)
? hasIn(object, path)
: baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
};
}
module.exports = baseMatchesProperty;
/***/ },
/* 179 */
/***/ function(module, exports, __webpack_require__) {
var baseGet = __webpack_require__(180);
/**
* Gets the value at `path` of `object`. If the resolved value is
* `undefined`, the `defaultValue` is used in its place.
*
* @static
* @memberOf _
* @since 3.7.0
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to get.
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
* @returns {*} Returns the resolved value.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
*
* _.get(object, 'a[0].b.c');
* // => 3
*
* _.get(object, ['a', '0', 'b', 'c']);
* // => 3
*
* _.get(object, 'a.b.c', 'default');
* // => 'default'
*/
function get(object, path, defaultValue) {
var result = object == null ? undefined : baseGet(object, path);
return result === undefined ? defaultValue : result;
}
module.exports = get;
/***/ },
/* 180 */
/***/ function(module, exports, __webpack_require__) {
var castPath = __webpack_require__(181),
isKey = __webpack_require__(186),
toKey = __webpack_require__(187);
/**
* The base implementation of `_.get` without support for default values.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to get.
* @returns {*} Returns the resolved value.
*/
function baseGet(object, path) {
path = isKey(path, object) ? [path] : castPath(path);
var index = 0,
length = path.length;
while (object != null && index < length) {
object = object[toKey(path[index++])];
}
return (index && index == length) ? object : undefined;
}
module.exports = baseGet;
/***/ },
/* 181 */
/***/ function(module, exports, __webpack_require__) {
var isArray = __webpack_require__(118),
stringToPath = __webpack_require__(182);
/**
* Casts `value` to a path array if it's not one.
*
* @private
* @param {*} value The value to inspect.
* @returns {Array} Returns the cast property path array.
*/
function castPath(value) {
return isArray(value) ? value : stringToPath(value);
}
module.exports = castPath;
/***/ },
/* 182 */
/***/ function(module, exports, __webpack_require__) {
var memoize = __webpack_require__(183),
toString = __webpack_require__(184);
/** Used to match property names within property paths. */
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g;
/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;
/**
* Converts `string` to a property path array.
*
* @private
* @param {string} string The string to convert.
* @returns {Array} Returns the property path array.
*/
var stringToPath = memoize(function(string) {
var result = [];
toString(string).replace(rePropName, function(match, number, quote, string) {
result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
});
return result;
});
module.exports = stringToPath;
/***/ },
/* 183 */
/***/ function(module, exports, __webpack_require__) {
var MapCache = __webpack_require__(72);
/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
/**
* Creates a function that memoizes the result of `func`. If `resolver` is
* provided, it determines the cache key for storing the result based on the
* arguments provided to the memoized function. By default, the first argument
* provided to the memoized function is used as the map cache key. The `func`
* is invoked with the `this` binding of the memoized function.
*
* **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the
* [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
* method interface of `delete`, `get`, `has`, and `set`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to have its output memoized.
* @param {Function} [resolver] The function to resolve the cache key.
* @returns {Function} Returns the new memoized function.
* @example
*
* var object = { 'a': 1, 'b': 2 };
* var other = { 'c': 3, 'd': 4 };
*
* var values = _.memoize(_.values);
* values(object);
* // => [1, 2]
*
* values(other);
* // => [3, 4]
*
* object.a = 2;
* values(object);
* // => [1, 2]
*
* // Modify the result cache.
* values.cache.set(object, ['a', 'b']);
* values(object);
* // => ['a', 'b']
*
* // Replace `_.memoize.Cache`.
* _.memoize.Cache = WeakMap;
*/
function memoize(func, resolver) {
if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = function() {
var args = arguments,
key = resolver ? resolver.apply(this, args) : args[0],
cache = memoized.cache;
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, args);
memoized.cache = cache.set(key, result);
return result;
};
memoized.cache = new (memoize.Cache || MapCache);
return memoized;
}
// Assign cache to `_.memoize`.
memoize.Cache = MapCache;
module.exports = memoize;
/***/ },
/* 184 */
/***/ function(module, exports, __webpack_require__) {
var baseToString = __webpack_require__(185);
/**
* Converts `value` to a string. An empty string is returned for `null`
* and `undefined` values. The sign of `-0` is preserved.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {string} Returns the string.
* @example
*
* _.toString(null);
* // => ''
*
* _.toString(-0);
* // => '-0'
*
* _.toString([1, 2, 3]);
* // => '1,2,3'
*/
function toString(value) {
return value == null ? '' : baseToString(value);
}
module.exports = toString;
/***/ },
/* 185 */
/***/ function(module, exports, __webpack_require__) {
var Symbol = __webpack_require__(102),
isSymbol = __webpack_require__(162);
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolToString = symbolProto ? symbolProto.toString : undefined;
/**
* The base implementation of `_.toString` which doesn't convert nullish
* values to empty strings.
*
* @private
* @param {*} value The value to process.
* @returns {string} Returns the string.
*/
function baseToString(value) {
// Exit early for strings to avoid a performance hit in some environments.
if (typeof value == 'string') {
return value;
}
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : '';
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
module.exports = baseToString;
/***/ },
/* 186 */
/***/ function(module, exports, __webpack_require__) {
var isArray = __webpack_require__(118),
isSymbol = __webpack_require__(162);
/** Used to match property names within property paths. */
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
reIsPlainProp = /^\w*$/;
/**
* Checks if `value` is a property name and not a property path.
*
* @private
* @param {*} value The value to check.
* @param {Object} [object] The object to query keys on.
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
*/
function isKey(value, object) {
if (isArray(value)) {
return false;
}
var type = typeof value;
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
value == null || isSymbol(value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
(object != null && value in Object(object));
}
module.exports = isKey;
/***/ },
/* 187 */
/***/ function(module, exports, __webpack_require__) {
var isSymbol = __webpack_require__(162);
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
/**
* Converts `value` to a string key if it's not a string or symbol.
*
* @private
* @param {*} value The value to inspect.
* @returns {string|symbol} Returns the key.
*/
function toKey(value) {
if (typeof value == 'string' || isSymbol(value)) {
return value;
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
module.exports = toKey;
/***/ },
/* 188 */
/***/ function(module, exports, __webpack_require__) {
var baseHasIn = __webpack_require__(189),
hasPath = __webpack_require__(190);
/**
* Checks if `path` is a direct or inherited property of `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
* @example
*
* var object = _.create({ 'a': _.create({ 'b': 2 }) });
*
* _.hasIn(object, 'a');
* // => true
*
* _.hasIn(object, 'a.b');
* // => true
*
* _.hasIn(object, ['a', 'b']);
* // => true
*
* _.hasIn(object, 'b');
* // => false
*/
function hasIn(object, path) {
return object != null && hasPath(object, path, baseHasIn);
}
module.exports = hasIn;
/***/ },
/* 189 */
/***/ function(module, exports) {
/**
* The base implementation of `_.hasIn` without support for deep paths.
*
* @private
* @param {Object} [object] The object to query.
* @param {Array|string} key The key to check.
* @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
function baseHasIn(object, key) {
return object != null && key in Object(object);
}
module.exports = baseHasIn;
/***/ },
/* 190 */
/***/ function(module, exports, __webpack_require__) {
var castPath = __webpack_require__(181),
isArguments = __webpack_require__(112),
isArray = __webpack_require__(118),
isIndex = __webpack_require__(120),
isKey = __webpack_require__(186),
isLength = __webpack_require__(117),
isString = __webpack_require__(119),
toKey = __webpack_require__(187);
/**
* Checks if `path` exists on `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @param {Function} hasFunc The function to check properties.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
*/
function hasPath(object, path, hasFunc) {
path = isKey(path, object) ? [path] : castPath(path);
var result,
index = -1,
length = path.length;
while (++index < length) {
var key = toKey(path[index]);
if (!(result = object != null && hasFunc(object, key))) {
break;
}
object = object[key];
}
if (result) {
return result;
}
var length = object ? object.length : 0;
return !!length && isLength(length) && isIndex(key, length) &&
(isArray(object) || isString(object) || isArguments(object));
}
module.exports = hasPath;
/***/ },
/* 191 */
/***/ function(module, exports) {
/**
* This method returns the first argument given to it.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {*} value Any value.
* @returns {*} Returns `value`.
* @example
*
* var object = { 'user': 'fred' };
*
* console.log(_.identity(object) === object);
* // => true
*/
function identity(value) {
return value;
}
module.exports = identity;
/***/ },
/* 192 */
/***/ function(module, exports, __webpack_require__) {
var baseProperty = __webpack_require__(116),
basePropertyDeep = __webpack_require__(193),
isKey = __webpack_require__(186),
toKey = __webpack_require__(187);
/**
* Creates a function that returns the value at `path` of a given object.
*
* @static
* @memberOf _
* @since 2.4.0
* @category Util
* @param {Array|string} path The path of the property to get.
* @returns {Function} Returns the new accessor function.
* @example
*
* var objects = [
* { 'a': { 'b': 2 } },
* { 'a': { 'b': 1 } }
* ];
*
* _.map(objects, _.property('a.b'));
* // => [2, 1]
*
* _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
* // => [1, 2]
*/
function property(path) {
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
}
module.exports = property;
/***/ },
/* 193 */
/***/ function(module, exports, __webpack_require__) {
var baseGet = __webpack_require__(180);
/**
* A specialized version of `baseProperty` which supports deep paths.
*
* @private
* @param {Array|string} path The path of the property to get.
* @returns {Function} Returns the new accessor function.
*/
function basePropertyDeep(path) {
return function(object) {
return baseGet(object, path);
};
}
module.exports = basePropertyDeep;
/***/ },
/* 194 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _temp;
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _reactAddonsTransitionGroup = __webpack_require__(195);
var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup);
var _AnimateGroupChild = __webpack_require__(196);
var _AnimateGroupChild2 = _interopRequireDefault(_AnimateGroupChild);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var AnimateGroup = (_temp = _class = function (_Component) {
_inherits(AnimateGroup, _Component);
function AnimateGroup() {
_classCallCheck(this, AnimateGroup);
return _possibleConstructorReturn(this, Object.getPrototypeOf(AnimateGroup).apply(this, arguments));
}
_createClass(AnimateGroup, [{
key: 'wrapChild',
value: function wrapChild(child) {
var _props = this.props;
var appear = _props.appear;
var leave = _props.leave;
var enter = _props.enter;
return _react2.default.createElement(
_AnimateGroupChild2.default,
{
appear: appear,
leave: leave,
enter: enter
},
child
);
}
}, {
key: 'render',
value: function render() {
var _props2 = this.props;
var component = _props2.component;
var children = _props2.children;
return _react2.default.createElement(
_reactAddonsTransitionGroup2.default,
{
component: component,
childFactory: this.wrapChild.bind(this)
},
children
);
}
}]);
return AnimateGroup;
}(_react.Component), _class.propTypes = {
appear: _react.PropTypes.object,
leave: _react.PropTypes.object,
enter: _react.PropTypes.object,
children: _react.PropTypes.oneOfType([_react.PropTypes.array, _react.PropTypes.element]),
component: _react.PropTypes.any
}, _class.defaultProps = {
component: 'span'
}, _temp);
exports.default = AnimateGroup;
/***/ },
/* 195 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_195__;
/***/ },
/* 196 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _temp2;
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _Animate = __webpack_require__(138);
var _Animate2 = _interopRequireDefault(_Animate);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var AnimateGroupChild = (_temp2 = _class = function (_Component) {
_inherits(AnimateGroupChild, _Component);
function AnimateGroupChild() {
var _Object$getPrototypeO;
var _temp, _this, _ret;
_classCallCheck(this, AnimateGroupChild);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(AnimateGroupChild)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = {
isActive: false
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(AnimateGroupChild, [{
key: 'handleStyleActive',
value: function handleStyleActive(style, done) {
if (style) {
var onAnimationEnd = style.onAnimationEnd ? function () {
style.onAnimationEnd();
done();
} : done;
this.setState(_extends({}, style, {
onAnimationEnd: onAnimationEnd,
isActive: true
}));
} else {
done();
}
}
}, {
key: 'componentWillAppear',
value: function componentWillAppear(done) {
this.handleStyleActive(this.props.appear, done);
}
}, {
key: 'componentWillEnter',
value: function componentWillEnter(done) {
this.handleStyleActive(this.props.enter, done);
}
}, {
key: 'componentWillLeave',
value: function componentWillLeave(done) {
this.handleStyleActive(this.props.leave, done);
}
}, {
key: 'render',
value: function render() {
return _react2.default.createElement(
_Animate2.default,
this.state,
_react.Children.only(this.props.children)
);
}
}]);
return AnimateGroupChild;
}(_react.Component), _class.propTypes = {
appear: _react.PropTypes.object,
leave: _react.PropTypes.object,
enter: _react.PropTypes.object,
children: _react.PropTypes.element
}, _temp2);
exports.default = AnimateGroupChild;
/***/ },
/* 197 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /**
* @fileOverview Wrapper component to make charts adapt to the size of parent * DOM
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _reactContainerDimensions = __webpack_require__(198);
var _reactContainerDimensions2 = _interopRequireDefault(_reactContainerDimensions);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _DataUtils = __webpack_require__(214);
var _LogUtils = __webpack_require__(215);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var render = function render(_ref) {
var width = _ref.width;
var height = _ref.height;
var container = _ref.container;
var children = _ref.children;
(0, _LogUtils.warn)((0, _DataUtils.isPercent)(width) || (0, _DataUtils.isPercent)(height), 'The width(%s) and height(%s) are both fixed number,\n maybe you don\'t need to use ResponsiveContainer.', width, height);
var calculatedWidth = (0, _DataUtils.getPercentValue)(width, container.width);
var calculatedHeight = (0, _DataUtils.getPercentValue)(height, container.height);
(0, _LogUtils.warn)(calculatedWidth > 0 && calculatedHeight > 0, 'The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s).', calculatedWidth, calculatedHeight, width, height);
if (calculatedWidth > 0 && calculatedHeight > 0) {
return _react2.default.cloneElement(children, {
width: calculatedWidth,
height: calculatedHeight
});
}
return null;
};
var style = {
width: '100%',
height: '100%'
};
var ResponsiveContainer = function ResponsiveContainer(props) {
return _react2.default.createElement(
'div',
{ className: 'recharts-responsive-container', style: style },
_react2.default.createElement(
_reactContainerDimensions2.default,
null,
function (container) {
return render(_extends({
container: container
}, props));
}
)
);
};
ResponsiveContainer.displayName = 'ResponsiveContainer';
ResponsiveContainer.propTypes = {
width: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
height: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
children: _react.PropTypes.node
};
ResponsiveContainer.defaultProps = {
width: '100%',
height: '100%'
};
exports.default = ResponsiveContainer;
/***/ },
/* 198 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _reactDom = __webpack_require__(199);
var _reactDom2 = _interopRequireDefault(_reactDom);
var _elementResizeDetector = __webpack_require__(200);
var _elementResizeDetector2 = _interopRequireDefault(_elementResizeDetector);
var _invariant = __webpack_require__(213);
var _invariant2 = _interopRequireDefault(_invariant);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var ContainerDimensions = function (_Component) {
_inherits(ContainerDimensions, _Component);
function ContainerDimensions() {
_classCallCheck(this, ContainerDimensions);
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(ContainerDimensions).call(this));
_this.state = {
initiated: false
};
_this.onResize = _this.onResize.bind(_this);
return _this;
}
_createClass(ContainerDimensions, [{
key: 'componentDidMount',
value: function componentDidMount() {
this.parentNode = _reactDom2.default.findDOMNode(this).parentNode;
this.elementResizeDetector = (0, _elementResizeDetector2.default)({ strategy: 'scroll' });
this.elementResizeDetector.listenTo(this.parentNode, this.onResize);
this.onResize();
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.elementResizeDetector.removeListener(this.parentNode, this.onResize);
}
}, {
key: 'onResize',
value: function onResize() {
var clientRect = this.parentNode.getBoundingClientRect();
this.setState({
initiated: true,
width: clientRect.width,
height: clientRect.height
});
}
}, {
key: 'render',
value: function render() {
(0, _invariant2.default)(this.props.children, 'Expected children to be one of function or React.Element');
if (!this.state.initiated) {
return _react2.default.createElement('div', null);
}
if (typeof this.props.children === 'function') {
var renderedChildren = this.props.children(this.state);
return renderedChildren && _react.Children.only(renderedChildren);
}
return _react.Children.only(_react2.default.cloneElement(this.props.children, this.state));
}
}]);
return ContainerDimensions;
}(_react.Component);
ContainerDimensions.propTypes = {
children: _react.PropTypes.oneOfType([_react.PropTypes.element, _react.PropTypes.func]).isRequired
};
exports.default = ContainerDimensions;
/***/ },
/* 199 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_199__;
/***/ },
/* 200 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
var forEach = __webpack_require__(201).forEach;
var elementUtilsMaker = __webpack_require__(202);
var listenerHandlerMaker = __webpack_require__(203);
var idGeneratorMaker = __webpack_require__(204);
var idHandlerMaker = __webpack_require__(205);
var reporterMaker = __webpack_require__(206);
var browserDetector = __webpack_require__(207);
var batchProcessorMaker = __webpack_require__(208);
var stateHandler = __webpack_require__(210);
//Detection strategies.
var objectStrategyMaker = __webpack_require__(211);
var scrollStrategyMaker = __webpack_require__(212);
function isCollection(obj) {
return Array.isArray(obj) || obj.length !== undefined;
}
function toArray(collection) {
if (!Array.isArray(collection)) {
var array = [];
forEach(collection, function (obj) {
array.push(obj);
});
return array;
} else {
return collection;
}
}
function isElement(obj) {
return obj && obj.nodeType === 1;
}
/**
* @typedef idHandler
* @type {object}
* @property {function} get Gets the resize detector id of the element.
* @property {function} set Generate and sets the resize detector id of the element.
*/
/**
* @typedef Options
* @type {object}
* @property {boolean} callOnAdd Determines if listeners should be called when they are getting added.
Default is true. If true, the listener is guaranteed to be called when it has been added.
If false, the listener will not be guarenteed to be called when it has been added (does not prevent it from being called).
* @property {idHandler} idHandler A custom id handler that is responsible for generating, setting and retrieving id's for elements.
If not provided, a default id handler will be used.
* @property {reporter} reporter A custom reporter that handles reporting logs, warnings and errors.
If not provided, a default id handler will be used.
If set to false, then nothing will be reported.
* @property {boolean} debug If set to true, the the system will report debug messages as default for the listenTo method.
*/
/**
* Creates an element resize detector instance.
* @public
* @param {Options?} options Optional global options object that will decide how this instance will work.
*/
module.exports = function(options) {
options = options || {};
//idHandler is currently not an option to the listenTo function, so it should not be added to globalOptions.
var idHandler;
if (options.idHandler) {
// To maintain compatability with idHandler.get(element, readonly), make sure to wrap the given idHandler
// so that readonly flag always is true when it's used here. This may be removed next major version bump.
idHandler = {
get: function (element) { options.idHandler.get(element, true); },
set: options.idHandler.set
};
} else {
var idGenerator = idGeneratorMaker();
var defaultIdHandler = idHandlerMaker({
idGenerator: idGenerator,
stateHandler: stateHandler
});
idHandler = defaultIdHandler;
}
//reporter is currently not an option to the listenTo function, so it should not be added to globalOptions.
var reporter = options.reporter;
if(!reporter) {
//If options.reporter is false, then the reporter should be quiet.
var quiet = reporter === false;
reporter = reporterMaker(quiet);
}
//batchProcessor is currently not an option to the listenTo function, so it should not be added to globalOptions.
var batchProcessor = getOption(options, "batchProcessor", batchProcessorMaker({ reporter: reporter }));
//Options to be used as default for the listenTo function.
var globalOptions = {};
globalOptions.callOnAdd = !!getOption(options, "callOnAdd", true);
globalOptions.debug = !!getOption(options, "debug", false);
var eventListenerHandler = listenerHandlerMaker(idHandler);
var elementUtils = elementUtilsMaker({
stateHandler: stateHandler
});
//The detection strategy to be used.
var detectionStrategy;
var desiredStrategy = getOption(options, "strategy", "object");
var strategyOptions = {
reporter: reporter,
batchProcessor: batchProcessor,
stateHandler: stateHandler,
idHandler: idHandler
};
if(desiredStrategy === "scroll") {
if (browserDetector.isLegacyOpera()) {
reporter.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy.");
desiredStrategy = "object";
} else if (browserDetector.isIE(9)) {
reporter.warn("Scroll strategy is not supported on IE9. Changing to object strategy.");
desiredStrategy = "object";
}
}
if(desiredStrategy === "scroll") {
detectionStrategy = scrollStrategyMaker(strategyOptions);
} else if(desiredStrategy === "object") {
detectionStrategy = objectStrategyMaker(strategyOptions);
} else {
throw new Error("Invalid strategy name: " + desiredStrategy);
}
//Calls can be made to listenTo with elements that are still are being installed.
//Also, same elements can occur in the elements list in the listenTo function.
//With this map, the ready callbacks can be synchronized between the calls
//so that the ready callback can always be called when an element is ready - even if
//it wasn't installed from the function itself.
var onReadyCallbacks = {};
/**
* Makes the given elements resize-detectable and starts listening to resize events on the elements. Calls the event callback for each event for each element.
* @public
* @param {Options?} options Optional options object. These options will override the global options. Some options may not be overriden, such as idHandler.
* @param {element[]|element} elements The given array of elements to detect resize events of. Single element is also valid.
* @param {function} listener The callback to be executed for each resize event for each element.
*/
function listenTo(options, elements, listener) {
function onResizeCallback(element) {
var listeners = eventListenerHandler.get(element);
forEach(listeners, function callListenerProxy(listener) {
listener(element);
});
}
function addListener(callOnAdd, element, listener) {
eventListenerHandler.add(element, listener);
if(callOnAdd) {
listener(element);
}
}
//Options object may be omitted.
if(!listener) {
listener = elements;
elements = options;
options = {};
}
if(!elements) {
throw new Error("At least one element required.");
}
if(!listener) {
throw new Error("Listener required.");
}
if (isElement(elements)) {
// A single element has been passed in.
elements = [elements];
} else if (isCollection(elements)) {
// Convert collection to array for plugins.
// TODO: May want to check so that all the elements in the collection are valid elements.
elements = toArray(elements);
} else {
return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
}
var elementsReady = 0;
var callOnAdd = getOption(options, "callOnAdd", globalOptions.callOnAdd);
var onReadyCallback = getOption(options, "onReady", function noop() {});
var debug = getOption(options, "debug", globalOptions.debug);
forEach(elements, function attachListenerToElement(element) {
if (!stateHandler.getState(element)) {
stateHandler.initState(element);
idHandler.set(element);
}
var id = idHandler.get(element);
debug && reporter.log("Attaching listener to element", id, element);
if(!elementUtils.isDetectable(element)) {
debug && reporter.log(id, "Not detectable.");
if(elementUtils.isBusy(element)) {
debug && reporter.log(id, "System busy making it detectable");
//The element is being prepared to be detectable. Do not make it detectable.
//Just add the listener, because the element will soon be detectable.
addListener(callOnAdd, element, listener);
onReadyCallbacks[id] = onReadyCallbacks[id] || [];
onReadyCallbacks[id].push(function onReady() {
elementsReady++;
if(elementsReady === elements.length) {
onReadyCallback();
}
});
return;
}
debug && reporter.log(id, "Making detectable...");
//The element is not prepared to be detectable, so do prepare it and add a listener to it.
elementUtils.markBusy(element, true);
return detectionStrategy.makeDetectable({ debug: debug }, element, function onElementDetectable(element) {
debug && reporter.log(id, "onElementDetectable");
if (stateHandler.getState(element)) {
elementUtils.markAsDetectable(element);
elementUtils.markBusy(element, false);
detectionStrategy.addListener(element, onResizeCallback);
addListener(callOnAdd, element, listener);
// Since the element size might have changed since the call to "listenTo", we need to check for this change,
// so that a resize event may be emitted.
// Having the startSize object is optional (since it does not make sense in some cases such as unrendered elements), so check for its existance before.
if (stateHandler.getState(element).startSize) {
var width = element.offsetWidth;
var height = element.offsetHeight;
if (stateHandler.getState(element).startSize.width !== width || stateHandler.getState(element).startSize.height !== height) {
onResizeCallback(element);
}
}
if(onReadyCallbacks[id]) {
forEach(onReadyCallbacks[id], function(callback) {
callback();
});
}
} else {
// The element has been unisntalled before being detectable.
debug && reporter.log(id, "Element uninstalled before being detectable.");
}
delete onReadyCallbacks[id];
elementsReady++;
if(elementsReady === elements.length) {
onReadyCallback();
}
});
}
debug && reporter.log(id, "Already detecable, adding listener.");
//The element has been prepared to be detectable and is ready to be listened to.
addListener(callOnAdd, element, listener);
elementsReady++;
});
if(elementsReady === elements.length) {
onReadyCallback();
}
}
function uninstall(elements) {
if(!elements) {
return reporter.error("At least one element is required.");
}
if (isElement(elements)) {
// A single element has been passed in.
elements = [elements];
} else if (isCollection(elements)) {
// Convert collection to array for plugins.
// TODO: May want to check so that all the elements in the collection are valid elements.
elements = toArray(elements);
} else {
return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
}
forEach(elements, function (element) {
eventListenerHandler.removeAllListeners(element);
detectionStrategy.uninstall(element);
stateHandler.cleanState(element);
});
}
return {
listenTo: listenTo,
removeListener: eventListenerHandler.removeListener,
removeAllListeners: eventListenerHandler.removeAllListeners,
uninstall: uninstall
};
};
function getOption(options, name, defaultValue) {
var value = options[name];
if((value === undefined || value === null) && defaultValue !== undefined) {
return defaultValue;
}
return value;
}
/***/ },
/* 201 */
/***/ function(module, exports) {
"use strict";
var utils = module.exports = {};
/**
* Loops through the collection and calls the callback for each element. if the callback returns truthy, the loop is broken and returns the same value.
* @public
* @param {*} collection The collection to loop through. Needs to have a length property set and have indices set from 0 to length - 1.
* @param {function} callback The callback to be called for each element. The element will be given as a parameter to the callback. If this callback returns truthy, the loop is broken and the same value is returned.
* @returns {*} The value that a callback has returned (if truthy). Otherwise nothing.
*/
utils.forEach = function(collection, callback) {
for(var i = 0; i < collection.length; i++) {
var result = callback(collection[i]);
if(result) {
return result;
}
}
};
/***/ },
/* 202 */
/***/ function(module, exports) {
"use strict";
module.exports = function(options) {
var getState = options.stateHandler.getState;
/**
* Tells if the element has been made detectable and ready to be listened for resize events.
* @public
* @param {element} The element to check.
* @returns {boolean} True or false depending on if the element is detectable or not.
*/
function isDetectable(element) {
var state = getState(element);
return state && !!state.isDetectable;
}
/**
* Marks the element that it has been made detectable and ready to be listened for resize events.
* @public
* @param {element} The element to mark.
*/
function markAsDetectable(element) {
getState(element).isDetectable = true;
}
/**
* Tells if the element is busy or not.
* @public
* @param {element} The element to check.
* @returns {boolean} True or false depending on if the element is busy or not.
*/
function isBusy(element) {
return !!getState(element).busy;
}
/**
* Marks the object is busy and should not be made detectable.
* @public
* @param {element} element The element to mark.
* @param {boolean} busy If the element is busy or not.
*/
function markBusy(element, busy) {
getState(element).busy = !!busy;
}
return {
isDetectable: isDetectable,
markAsDetectable: markAsDetectable,
isBusy: isBusy,
markBusy: markBusy
};
};
/***/ },
/* 203 */
/***/ function(module, exports) {
"use strict";
module.exports = function(idHandler) {
var eventListeners = {};
/**
* Gets all listeners for the given element.
* @public
* @param {element} element The element to get all listeners for.
* @returns All listeners for the given element.
*/
function getListeners(element) {
return eventListeners[idHandler.get(element)] || [];
}
/**
* Stores the given listener for the given element. Will not actually add the listener to the element.
* @public
* @param {element} element The element that should have the listener added.
* @param {function} listener The callback that the element has added.
*/
function addListener(element, listener) {
var id = idHandler.get(element);
if(!eventListeners[id]) {
eventListeners[id] = [];
}
eventListeners[id].push(listener);
}
function removeListener(element, listener) {
var listeners = getListeners(element);
for (var i = 0, len = listeners.length; i < len; ++i) {
if (listeners[i] === listener) {
listeners.splice(i, 1);
break;
}
}
}
function removeAllListeners(element) {
var listeners = eventListeners[idHandler.get(element)];
if (!listeners) { return; }
listeners.length = 0;
}
return {
get: getListeners,
add: addListener,
removeListener: removeListener,
removeAllListeners: removeAllListeners
};
};
/***/ },
/* 204 */
/***/ function(module, exports) {
"use strict";
module.exports = function() {
var idCount = 1;
/**
* Generates a new unique id in the context.
* @public
* @returns {number} A unique id in the context.
*/
function generate() {
return idCount++;
}
return {
generate: generate
};
};
/***/ },
/* 205 */
/***/ function(module, exports) {
"use strict";
module.exports = function(options) {
var idGenerator = options.idGenerator;
var getState = options.stateHandler.getState;
/**
* Gets the resize detector id of the element.
* @public
* @param {element} element The target element to get the id of.
* @returns {string|number|null} The id of the element. Null if it has no id.
*/
function getId(element) {
var state = getState(element);
if (state && state.id !== undefined) {
return state.id;
}
return null;
}
/**
* Sets the resize detector id of the element. Requires the element to have a resize detector state initialized.
* @public
* @param {element} element The target element to set the id of.
* @returns {string|number|null} The id of the element.
*/
function setId(element) {
var state = getState(element);
if (!state) {
throw new Error("setId required the element to have a resize detection state.");
}
var id = idGenerator.generate();
state.id = id;
return id;
}
return {
get: getId,
set: setId
};
};
/***/ },
/* 206 */
/***/ function(module, exports) {
"use strict";
/* global console: false */
/**
* Reporter that handles the reporting of logs, warnings and errors.
* @public
* @param {boolean} quiet Tells if the reporter should be quiet or not.
*/
module.exports = function(quiet) {
function noop() {
//Does nothing.
}
var reporter = {
log: noop,
warn: noop,
error: noop
};
if(!quiet && window.console) {
var attachFunction = function(reporter, name) {
//The proxy is needed to be able to call the method with the console context,
//since we cannot use bind.
reporter[name] = function reporterProxy() {
var f = console[name];
if (f.apply) { //IE9 does not support console.log.apply :)
f.apply(console, arguments);
} else {
for (var i = 0; i < arguments.length; i++) {
f(arguments[i]);
}
}
};
};
attachFunction(reporter, "log");
attachFunction(reporter, "warn");
attachFunction(reporter, "error");
}
return reporter;
};
/***/ },
/* 207 */
/***/ function(module, exports) {
"use strict";
var detector = module.exports = {};
detector.isIE = function(version) {
function isAnyIeVersion() {
var agent = navigator.userAgent.toLowerCase();
return agent.indexOf("msie") !== -1 || agent.indexOf("trident") !== -1 || agent.indexOf(" edge/") !== -1;
}
if(!isAnyIeVersion()) {
return false;
}
if(!version) {
return true;
}
//Shamelessly stolen from https://gist.github.com/padolsey/527683
var ieVersion = (function(){
var undef,
v = 3,
div = document.createElement("div"),
all = div.getElementsByTagName("i");
do {
div.innerHTML = "<!--[if gt IE " + (++v) + "]><i></i><![endif]-->";
}
while (all[0]);
return v > 4 ? v : undef;
}());
return version === ieVersion;
};
detector.isLegacyOpera = function() {
return !!window.opera;
};
/***/ },
/* 208 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(209);
module.exports = function batchProcessorMaker(options) {
options = options || {};
var reporter = options.reporter;
var asyncProcess = utils.getOption(options, "async", true);
var autoProcess = utils.getOption(options, "auto", true);
if(autoProcess && !asyncProcess) {
reporter && reporter.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true.");
asyncProcess = true;
}
var batch = Batch();
var asyncFrameHandler;
var isProcessing = false;
function addFunction(level, fn) {
if(!isProcessing && autoProcess && asyncProcess && batch.size() === 0) {
// Since this is async, it is guaranteed to be executed after that the fn is added to the batch.
// This needs to be done before, since we're checking the size of the batch to be 0.
processBatchAsync();
}
batch.add(level, fn);
}
function processBatch() {
// Save the current batch, and create a new batch so that incoming functions are not added into the currently processing batch.
// Continue processing until the top-level batch is empty (functions may be added to the new batch while processing, and so on).
isProcessing = true;
while (batch.size()) {
var processingBatch = batch;
batch = Batch();
processingBatch.process();
}
isProcessing = false;
}
function forceProcessBatch(localAsyncProcess) {
if (isProcessing) {
return;
}
if(localAsyncProcess === undefined) {
localAsyncProcess = asyncProcess;
}
if(asyncFrameHandler) {
cancelFrame(asyncFrameHandler);
asyncFrameHandler = null;
}
if(localAsyncProcess) {
processBatchAsync();
} else {
processBatch();
}
}
function processBatchAsync() {
asyncFrameHandler = requestFrame(processBatch);
}
function clearBatch() {
batch = {};
batchSize = 0;
topLevel = 0;
bottomLevel = 0;
}
function cancelFrame(listener) {
// var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout;
var cancel = clearTimeout;
return cancel(listener);
}
function requestFrame(callback) {
// var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function(fn) { return window.setTimeout(fn, 20); };
var raf = function(fn) { return setTimeout(fn, 0); };
return raf(callback);
}
return {
add: addFunction,
force: forceProcessBatch
};
};
function Batch() {
var batch = {};
var size = 0;
var topLevel = 0;
var bottomLevel = 0;
function add(level, fn) {
if(!fn) {
fn = level;
level = 0;
}
if(level > topLevel) {
topLevel = level;
} else if(level < bottomLevel) {
bottomLevel = level;
}
if(!batch[level]) {
batch[level] = [];
}
batch[level].push(fn);
size++;
}
function process() {
for(var level = bottomLevel; level <= topLevel; level++) {
var fns = batch[level];
for(var i = 0; i < fns.length; i++) {
var fn = fns[i];
fn();
}
}
}
function getSize() {
return size;
}
return {
add: add,
process: process,
size: getSize
};
}
/***/ },
/* 209 */
/***/ function(module, exports) {
"use strict";
var utils = module.exports = {};
utils.getOption = getOption;
function getOption(options, name, defaultValue) {
var value = options[name];
if((value === undefined || value === null) && defaultValue !== undefined) {
return defaultValue;
}
return value;
}
/***/ },
/* 210 */
/***/ function(module, exports) {
"use strict";
var prop = "_erd";
function initState(element) {
element[prop] = {};
return getState(element);
}
function getState(element) {
return element[prop];
}
function cleanState(element) {
delete element[prop];
}
module.exports = {
initState: initState,
getState: getState,
cleanState: cleanState
};
/***/ },
/* 211 */
/***/ function(module, exports, __webpack_require__) {
/**
* Resize detection strategy that injects objects to elements in order to detect resize events.
* Heavily inspired by: http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/
*/
"use strict";
var browserDetector = __webpack_require__(207);
module.exports = function(options) {
options = options || {};
var reporter = options.reporter;
var batchProcessor = options.batchProcessor;
var getState = options.stateHandler.getState;
if(!reporter) {
throw new Error("Missing required dependency: reporter.");
}
/**
* Adds a resize event listener to the element.
* @public
* @param {element} element The element that should have the listener added.
* @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.
*/
function addListener(element, listener) {
if(!getObject(element)) {
throw new Error("Element is not detectable by this strategy.");
}
function listenerProxy() {
listener(element);
}
if(browserDetector.isIE(8)) {
//IE 8 does not support object, but supports the resize event directly on elements.
getState(element).object = {
proxy: listenerProxy
};
element.attachEvent("onresize", listenerProxy);
} else {
var object = getObject(element);
object.contentDocument.defaultView.addEventListener("resize", listenerProxy);
}
}
/**
* Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.
* @private
* @param {object} options Optional options object.
* @param {element} element The element to make detectable
* @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.
*/
function makeDetectable(options, element, callback) {
if (!callback) {
callback = element;
element = options;
options = null;
}
options = options || {};
var debug = options.debug;
function injectObject(element, callback) {
var OBJECT_STYLE = "display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; padding: 0; margin: 0; opacity: 0; z-index: -1000; pointer-events: none;";
//The target element needs to be positioned (everything except static) so the absolute positioned object will be positioned relative to the target element.
// Position altering may be performed directly or on object load, depending on if style resolution is possible directly or not.
var positionCheckPerformed = false;
// The element may not yet be attached to the DOM, and therefore the style object may be empty in some browsers.
// Since the style object is a reference, it will be updated as soon as the element is attached to the DOM.
var style = window.getComputedStyle(element);
var width = element.offsetWidth;
var height = element.offsetHeight;
getState(element).startSize = {
width: width,
height: height
};
function mutateDom() {
function alterPositionStyles() {
if(style.position === "static") {
element.style.position = "relative";
var removeRelativeStyles = function(reporter, element, style, property) {
function getNumericalValue(value) {
return value.replace(/[^-\d\.]/g, "");
}
var value = style[property];
if(value !== "auto" && getNumericalValue(value) !== "0") {
reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element);
element.style[property] = 0;
}
};
//Check so that there are no accidental styles that will make the element styled differently now that is is relative.
//If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).
removeRelativeStyles(reporter, element, style, "top");
removeRelativeStyles(reporter, element, style, "right");
removeRelativeStyles(reporter, element, style, "bottom");
removeRelativeStyles(reporter, element, style, "left");
}
}
function onObjectLoad() {
// The object has been loaded, which means that the element now is guaranteed to be attached to the DOM.
if (!positionCheckPerformed) {
alterPositionStyles();
}
/*jshint validthis: true */
function getDocument(element, callback) {
//Opera 12 seem to call the object.onload before the actual document has been created.
//So if it is not present, poll it with an timeout until it is present.
//TODO: Could maybe be handled better with object.onreadystatechange or similar.
if(!element.contentDocument) {
setTimeout(function checkForObjectDocument() {
getDocument(element, callback);
}, 100);
return;
}
callback(element.contentDocument);
}
//Mutating the object element here seems to fire another load event.
//Mutating the inner document of the object element is fine though.
var objectElement = this;
//Create the style element to be added to the object.
getDocument(objectElement, function onObjectDocumentReady(objectDocument) {
//Notify that the element is ready to be listened to.
callback(element);
});
}
// The element may be detached from the DOM, and some browsers does not support style resolving of detached elements.
// The alterPositionStyles needs to be delayed until we know the element has been attached to the DOM (which we are sure of when the onObjectLoad has been fired), if style resolution is not possible.
if (style.position !== "") {
alterPositionStyles(style);
positionCheckPerformed = true;
}
//Add an object element as a child to the target element that will be listened to for resize events.
var object = document.createElement("object");
object.style.cssText = OBJECT_STYLE;
object.type = "text/html";
object.onload = onObjectLoad;
//Safari: This must occur before adding the object to the DOM.
//IE: Does not like that this happens before, even if it is also added after.
if(!browserDetector.isIE()) {
object.data = "about:blank";
}
element.appendChild(object);
getState(element).object = object;
//IE: This must occur after adding the object to the DOM.
if(browserDetector.isIE()) {
object.data = "about:blank";
}
}
if(batchProcessor) {
batchProcessor.add(mutateDom);
} else {
mutateDom();
}
}
if(browserDetector.isIE(8)) {
//IE 8 does not support objects properly. Luckily they do support the resize event.
//So do not inject the object and notify that the element is already ready to be listened to.
//The event handler for the resize event is attached in the utils.addListener instead.
callback(element);
} else {
injectObject(element, callback);
}
}
/**
* Returns the child object of the target element.
* @private
* @param {element} element The target element.
* @returns The object element of the target.
*/
function getObject(element) {
return getState(element).object;
}
function uninstall(element) {
if(browserDetector.isIE(8)) {
element.detachEvent("onresize", getState(element).object.proxy);
} else {
element.removeChild(getObject(element));
}
delete getState(element).object;
}
return {
makeDetectable: makeDetectable,
addListener: addListener,
uninstall: uninstall
};
};
/***/ },
/* 212 */
/***/ function(module, exports, __webpack_require__) {
/**
* Resize detection strategy that injects divs to elements in order to detect resize events on scroll events.
* Heavily inspired by: https://github.com/marcj/css-element-queries/blob/master/src/ResizeSensor.js
*/
"use strict";
var forEach = __webpack_require__(201).forEach;
module.exports = function(options) {
options = options || {};
var reporter = options.reporter;
var batchProcessor = options.batchProcessor;
var getState = options.stateHandler.getState;
var hasState = options.stateHandler.hasState;
var idHandler = options.idHandler;
if (!batchProcessor) {
throw new Error("Missing required dependency: batchProcessor");
}
if (!reporter) {
throw new Error("Missing required dependency: reporter.");
}
//TODO: Could this perhaps be done at installation time?
var scrollbarSizes = getScrollbarSizes();
// Inject the scrollbar styling that prevents them from appearing sometimes in Chrome.
// The injected container needs to have a class, so that it may be styled with CSS (pseudo elements).
var styleId = "erd_scroll_detection_scrollbar_style";
var detectionContainerClass = "erd_scroll_detection_container";
injectScrollStyle(styleId, detectionContainerClass);
function getScrollbarSizes() {
var width = 500;
var height = 500;
var child = document.createElement("div");
child.style.cssText = "position: absolute; width: " + width*2 + "px; height: " + height*2 + "px; visibility: hidden; margin: 0; padding: 0;";
var container = document.createElement("div");
container.style.cssText = "position: absolute; width: " + width + "px; height: " + height + "px; overflow: scroll; visibility: none; top: " + -width*3 + "px; left: " + -height*3 + "px; visibility: hidden; margin: 0; padding: 0;";
container.appendChild(child);
document.body.insertBefore(container, document.body.firstChild);
var widthSize = width - container.clientWidth;
var heightSize = height - container.clientHeight;
document.body.removeChild(container);
return {
width: widthSize,
height: heightSize
};
}
function injectScrollStyle(styleId, containerClass) {
function injectStyle(style, method) {
method = method || function (element) {
document.head.appendChild(element);
};
var styleElement = document.createElement("style");
styleElement.innerHTML = style;
styleElement.id = styleId;
method(styleElement);
return styleElement;
}
if (!document.getElementById(styleId)) {
var containerAnimationClass = containerClass + "_animation";
var containerAnimationActiveClass = containerClass + "_animation_active";
var style = "/* Created by the element-resize-detector library. */\n";
style += "." + containerClass + " > div::-webkit-scrollbar { display: none; }\n\n";
style += "." + containerAnimationActiveClass + " { -webkit-animation-duration: 0.1s; animation-duration: 0.1s; -webkit-animation-name: " + containerAnimationClass + "; animation-name: " + containerAnimationClass + "; }\n";
style += "@-webkit-keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n";
style += "@keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }";
injectStyle(style);
}
}
function addAnimationClass(element) {
element.className += " " + detectionContainerClass + "_animation_active";
}
/**
* Adds a resize event listener to the element.
* @public
* @param {element} element The element that should have the listener added.
* @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.
*/
function addListener(element, listener) {
var listeners = getState(element).listeners;
if (!listeners.push) {
throw new Error("Cannot add listener to an element that is not detectable.");
}
getState(element).listeners.push(listener);
}
/**
* Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.
* @private
* @param {object} options Optional options object.
* @param {element} element The element to make detectable
* @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.
*/
function makeDetectable(options, element, callback) {
if (!callback) {
callback = element;
element = options;
options = null;
}
options = options || {};
function debug() {
if (options.debug) {
var args = Array.prototype.slice.call(arguments);
args.unshift(idHandler.get(element), "Scroll: ");
if (reporter.log.apply) {
reporter.log.apply(null, args);
} else {
for (var i = 0; i < args.length; i++) {
reporter.log(args[i]);
}
}
}
}
function isDetached(element) {
function isInDocument(element) {
return element === element.ownerDocument.body || element.ownerDocument.body.contains(element);
}
return !isInDocument(element);
}
function isUnrendered(element) {
// Check the absolute positioned container since the top level container is display: inline.
var container = getState(element).container.childNodes[0];
return getComputedStyle(container).width.indexOf("px") === -1; //Can only compute pixel value when rendered.
}
function getStyle() {
// Some browsers only force layouts when actually reading the style properties of the style object, so make sure that they are all read here,
// so that the user of the function can be sure that it will perform the layout here, instead of later (important for batching).
var elementStyle = getComputedStyle(element);
var style = {};
style.position = elementStyle.position;
style.width = element.offsetWidth;
style.height = element.offsetHeight;
style.top = elementStyle.top;
style.right = elementStyle.right;
style.bottom = elementStyle.bottom;
style.left = elementStyle.left;
style.widthCSS = elementStyle.width;
style.heightCSS = elementStyle.height;
return style;
}
function storeStartSize() {
var style = getStyle();
getState(element).startSize = {
width: style.width,
height: style.height
};
debug("Element start size", getState(element).startSize);
}
function initListeners() {
getState(element).listeners = [];
}
function storeStyle() {
debug("storeStyle invoked.");
if (!getState(element)) {
debug("Aborting because element has been uninstalled");
return;
}
var style = getStyle();
getState(element).style = style;
}
function storeCurrentSize(element, width, height) {
getState(element).lastWidth = width;
getState(element).lastHeight = height;
}
function getExpandElement(element) {
return getState(element).container.childNodes[0].childNodes[0].childNodes[0];
}
function getExpandChildElement(element) {
return getExpandElement(element).childNodes[0];
}
function getShrinkElement(element) {
return getState(element).container.childNodes[0].childNodes[0].childNodes[1];
}
function getWidthOffset() {
return 2 * scrollbarSizes.width + 1;
}
function getHeightOffset() {
return 2 * scrollbarSizes.height + 1;
}
function getExpandWidth(width) {
return width + 10 + getWidthOffset();
}
function getExpandHeight(height) {
return height + 10 + getHeightOffset();
}
function getShrinkWidth(width) {
return width * 2 + getWidthOffset();
}
function getShrinkHeight(height) {
return height * 2 + getHeightOffset();
}
function positionScrollbars(element, width, height) {
var expand = getExpandElement(element);
var shrink = getShrinkElement(element);
var expandWidth = getExpandWidth(width);
var expandHeight = getExpandHeight(height);
var shrinkWidth = getShrinkWidth(width);
var shrinkHeight = getShrinkHeight(height);
expand.scrollLeft = expandWidth;
expand.scrollTop = expandHeight;
shrink.scrollLeft = shrinkWidth;
shrink.scrollTop = shrinkHeight;
}
function addEvent(el, name, cb) {
if (el.addEventListener) {
el.addEventListener(name, cb);
} else if(el.attachEvent) {
el.attachEvent("on" + name, cb);
} else {
return reporter.error("[scroll] Don't know how to add event listeners.");
}
}
function injectContainerElement() {
var container = getState(element).container;
if (!container) {
container = document.createElement("div");
container.dir = "ltr"; // Some browsers choke on the resize system being rtl, so force it to ltr. #https://github.com/wnr/element-resize-detector/issues/56
container.className = detectionContainerClass;
container.style.cssText = "visibility: hidden; display: inline; width: 0px; height: 0px; z-index: -1; overflow: hidden; margin: 0; padding: 0;";
getState(element).container = container;
addAnimationClass(container);
element.appendChild(container);
addEvent(container, "animationstart", function onAnimationStart () {
getState(element).onRendered && getState(element).onRendered();
});
}
return container;
}
function injectScrollElements() {
function alterPositionStyles() {
var style = getState(element).style;
if(style.position === "static") {
element.style.position = "relative";
var removeRelativeStyles = function(reporter, element, style, property) {
function getNumericalValue(value) {
return value.replace(/[^-\d\.]/g, "");
}
var value = style[property];
if(value !== "auto" && getNumericalValue(value) !== "0") {
reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element);
element.style[property] = 0;
}
};
//Check so that there are no accidental styles that will make the element styled differently now that is is relative.
//If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).
removeRelativeStyles(reporter, element, style, "top");
removeRelativeStyles(reporter, element, style, "right");
removeRelativeStyles(reporter, element, style, "bottom");
removeRelativeStyles(reporter, element, style, "left");
}
}
function getLeftTopBottomRightCssText(left, top, bottom, right) {
left = (!left ? "0" : (left + "px"));
top = (!top ? "0" : (top + "px"));
bottom = (!bottom ? "0" : (bottom + "px"));
right = (!right ? "0" : (right + "px"));
return "left: " + left + "; top: " + top + "; right: " + right + "; bottom: " + bottom + ";";
}
debug("Injecting elements");
if (!getState(element)) {
debug("Aborting because element has been uninstalled");
return;
}
alterPositionStyles();
var rootContainer = getState(element).container;
if (!rootContainer) {
rootContainer = injectContainerElement();
}
// Due to this WebKit bug https://bugs.webkit.org/show_bug.cgi?id=80808 (currently fixed in Blink, but still present in WebKit browsers such as Safari),
// we need to inject two containers, one that is width/height 100% and another that is left/top -1px so that the final container always is 1x1 pixels bigger than
// the targeted element.
// When the bug is resolved, "containerContainer" may be removed.
// The outer container can occasionally be less wide than the targeted when inside inline elements element in WebKit (see https://bugs.webkit.org/show_bug.cgi?id=152980).
// This should be no problem since the inner container either way makes sure the injected scroll elements are at least 1x1 px.
var scrollbarWidth = scrollbarSizes.width;
var scrollbarHeight = scrollbarSizes.height;
var containerContainerStyle = "position: absolute; overflow: hidden; z-index: -1; visibility: hidden; width: 100%; height: 100%; left: 0px; top: 0px;";
var containerStyle = "position: absolute; overflow: hidden; z-index: -1; visibility: hidden; " + getLeftTopBottomRightCssText(-(1 + scrollbarWidth), -(1 + scrollbarHeight), -scrollbarHeight, -scrollbarWidth);
var expandStyle = "position: absolute; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;";
var shrinkStyle = "position: absolute; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;";
var expandChildStyle = "position: absolute; left: 0; top: 0;";
var shrinkChildStyle = "position: absolute; width: 200%; height: 200%;";
var containerContainer = document.createElement("div");
var container = document.createElement("div");
var expand = document.createElement("div");
var expandChild = document.createElement("div");
var shrink = document.createElement("div");
var shrinkChild = document.createElement("div");
containerContainer.style.cssText = containerContainerStyle;
containerContainer.className = detectionContainerClass;
container.className = detectionContainerClass;
container.style.cssText = containerStyle;
expand.style.cssText = expandStyle;
expandChild.style.cssText = expandChildStyle;
shrink.style.cssText = shrinkStyle;
shrinkChild.style.cssText = shrinkChildStyle;
expand.appendChild(expandChild);
shrink.appendChild(shrinkChild);
container.appendChild(expand);
container.appendChild(shrink);
containerContainer.appendChild(container);
rootContainer.appendChild(containerContainer);
addEvent(expand, "scroll", function onExpandScroll() {
getState(element).onExpand && getState(element).onExpand();
});
addEvent(shrink, "scroll", function onShrinkScroll() {
getState(element).onShrink && getState(element).onShrink();
});
}
function registerListenersAndPositionElements() {
function updateChildSizes(element, width, height) {
var expandChild = getExpandChildElement(element);
var expandWidth = getExpandWidth(width);
var expandHeight = getExpandHeight(height);
expandChild.style.width = expandWidth + "px";
expandChild.style.height = expandHeight + "px";
}
function updateDetectorElements(done) {
var width = element.offsetWidth;
var height = element.offsetHeight;
debug("Storing current size", width, height);
// Store the size of the element sync here, so that multiple scroll events may be ignored in the event listeners.
// Otherwise the if-check in handleScroll is useless.
storeCurrentSize(element, width, height);
batchProcessor.add(0, function performUpdateChildSizes() {
if (options.debug) {
var w = element.offsetWidth;
var h = element.offsetHeight;
if (w !== width || h !== height) {
reporter.warn(idHandler.get(element), "Scroll: Size changed before updating detector elements.");
}
}
updateChildSizes(element, width, height);
});
batchProcessor.add(1, function updateScrollbars() {
positionScrollbars(element, width, height);
});
if (done) {
batchProcessor.add(2, done);
}
}
function areElementsInjected() {
return !!getState(element).container;
}
function notifyListenersIfNeeded() {
function isFirstNotify() {
return getState(element).lastNotifiedWidth === undefined;
}
debug("notifyListenersIfNeeded invoked");
var state = getState(element);
// Don't notify the if the current size is the start size, and this is the first notification.
if (isFirstNotify() && state.lastWidth === state.startSize.width && state.lastHeight === state.startSize.height) {
return debug("Not notifying: Size is the same as the start size, and there has been no notification yet.");
}
// Don't notify if the size already has been notified.
if (state.lastWidth === state.lastNotifiedWidth && state.lastHeight === state.lastNotifiedHeight) {
return debug("Not notifying: Size already notified");
}
debug("Current size not notified, notifying...");
state.lastNotifiedWidth = state.lastWidth;
state.lastNotifiedHeight = state.lastHeight;
forEach(getState(element).listeners, function (listener) {
listener(element);
});
}
function handleRender() {
debug("startanimation triggered.");
if (isUnrendered(element)) {
debug("Ignoring since element is still unrendered...");
return;
}
debug("Element rendered.");
var expand = getExpandElement(element);
var shrink = getShrinkElement(element);
if (expand.scrollLeft === 0 || expand.scrollTop === 0 || shrink.scrollLeft === 0 || shrink.scrollTop === 0) {
debug("Scrollbars out of sync. Updating detector elements...");
updateDetectorElements(notifyListenersIfNeeded);
}
}
function handleScroll() {
debug("Scroll detected.");
if (isUnrendered(element)) {
// Element is still unrendered. Skip this scroll event.
debug("Scroll event fired while unrendered. Ignoring...");
return;
}
var width = element.offsetWidth;
var height = element.offsetHeight;
if (width !== element.lastWidth || height !== element.lastHeight) {
debug("Element size changed.");
updateDetectorElements(notifyListenersIfNeeded);
} else {
debug("Element size has not changed (" + width + "x" + height + ").");
}
}
debug("registerListenersAndPositionElements invoked.");
if (!getState(element)) {
debug("Aborting because element has been uninstalled");
return;
}
getState(element).onRendered = handleRender;
getState(element).onExpand = handleScroll;
getState(element).onShrink = handleScroll;
var style = getState(element).style;
updateChildSizes(element, style.width, style.height);
}
function finalizeDomMutation() {
debug("finalizeDomMutation invoked.");
if (!getState(element)) {
debug("Aborting because element has been uninstalled");
return;
}
var style = getState(element).style;
storeCurrentSize(element, style.width, style.height);
positionScrollbars(element, style.width, style.height);
}
function ready() {
callback(element);
}
function install() {
debug("Installing...");
initListeners();
storeStartSize();
batchProcessor.add(0, storeStyle);
batchProcessor.add(1, injectScrollElements);
batchProcessor.add(2, registerListenersAndPositionElements);
batchProcessor.add(3, finalizeDomMutation);
batchProcessor.add(4, ready);
}
debug("Making detectable...");
if (isDetached(element)) {
debug("Element is detached");
injectContainerElement();
debug("Waiting until element is attached...");
getState(element).onRendered = function () {
debug("Element is now attached");
install();
};
} else {
install();
}
}
function uninstall(element) {
var state = getState(element);
if (!state) {
// Uninstall has been called on a non-erd element.
return;
}
if (state.busy) {
// Uninstall has been called while the element is being prepared.
// Right between the sync code and async batch.
return;
}
element.removeChild(state.container);
}
return {
makeDetectable: makeDetectable,
addListener: addListener,
uninstall: uninstall
};
};
/***/ },
/* 213 */
/***/ function(module, exports, __webpack_require__) {
/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
'use strict';
/**
* Use invariant() to assert state which your program assumes to be true.
*
* Provide sprintf-style format (only %s is supported) and arguments
* to provide information about what broke and what you were
* expecting.
*
* The invariant message will be stripped in production, but the invariant
* will remain to ensure logic does not differ in production.
*/
var invariant = function(condition, format, a, b, c, d, e, f) {
if (true) {
if (format === undefined) {
throw new Error('invariant requires an error message argument');
}
}
if (!condition) {
var error;
if (format === undefined) {
error = new Error(
'Minified exception occurred; use the non-minified dev environment ' +
'for the full error message and additional helpful warnings.'
);
} else {
var args = [a, b, c, d, e, f];
var argIndex = 0;
error = new Error(
format.replace(/%s/g, function() { return args[argIndex++]; })
);
error.name = 'Invariant Violation';
}
error.framesToPop = 1; // we don't care about invariant's own frame
throw error;
}
};
module.exports = invariant;
/***/ },
/* 214 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.hasDuplicate = exports.getAnyElementOfObject = exports.getBandSizeOfScale = exports.validateCoordinateInRange = exports.parseSpecifiedDomain = exports.getPercentValue = exports.isPercent = undefined;
var _isArray2 = __webpack_require__(118);
var _isArray3 = _interopRequireDefault(_isArray2);
var _isNumber2 = __webpack_require__(47);
var _isNumber3 = _interopRequireDefault(_isNumber2);
var _isString2 = __webpack_require__(119);
var _isString3 = _interopRequireDefault(_isString2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var isPercent = exports.isPercent = function isPercent(value) {
return (0, _isString3.default)(value) && value.indexOf('%') === value.length - 1;
};
/**
* Get percent value of a total value
* @param {Number|String} percent A percent
* @param {Number} totalValue Total value
* @param {NUmber} defaultValue The value returned when percent is undefined or invalid
* @param {Boolean} validate If set to be true, the result will be validated
* @return {Number} value
*/
var getPercentValue = exports.getPercentValue = function getPercentValue(percent, totalValue) {
var defaultValue = arguments.length <= 2 || arguments[2] === undefined ? 0 : arguments[2];
var validate = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3];
if (!(0, _isNumber3.default)(percent) && !(0, _isString3.default)(percent)) {
return defaultValue;
}
var value = void 0;
if (isPercent(percent)) {
var index = percent.indexOf('%');
value = totalValue * parseFloat(percent.slice(0, index)) / 100;
} else {
value = +percent;
}
if (isNaN(value)) {
value = defaultValue;
}
if (validate && value > totalValue) {
value = totalValue;
}
return value;
};
var MIN_VALUE_REG = /^dataMin[\s]*-[\s]*([\d]+)$/;
var MAX_VALUE_REG = /^dataMax[\s]*\+[\s]*([\d]+)$/;
var parseSpecifiedDomain = exports.parseSpecifiedDomain = function parseSpecifiedDomain(specifiedDomain, dataDomain) {
if (!(0, _isArray3.default)(specifiedDomain)) {
return dataDomain;
}
var domain = [];
if ((0, _isNumber3.default)(specifiedDomain[0]) && specifiedDomain[0] <= dataDomain[0]) {
domain[0] = specifiedDomain[0];
} else if (MIN_VALUE_REG.test(specifiedDomain[0])) {
var value = +MIN_VALUE_REG.exec(specifiedDomain[0])[1];
domain[0] = dataDomain[0] - value;
} else {
domain[0] = dataDomain[0];
}
if ((0, _isNumber3.default)(specifiedDomain[1]) && specifiedDomain[1] >= dataDomain[1]) {
domain[1] = specifiedDomain[1];
} else if (MAX_VALUE_REG.test(specifiedDomain[1])) {
var _value = +MAX_VALUE_REG.exec(specifiedDomain[1])[1];
domain[1] = dataDomain[1] + _value;
} else {
domain[1] = dataDomain[1];
}
return domain;
};
var validateCoordinateInRange = exports.validateCoordinateInRange = function validateCoordinateInRange(coordinate, scale) {
if (!scale) {
return false;
}
var range = scale.range();
var first = range[0];
var last = range[range.length - 1];
var isValidate = first <= last ? coordinate >= first && coordinate <= last : coordinate >= last && coordinate <= first;
return isValidate;
};
/**
* Calculate the size between two category
* @param {Function} scale Scale function
* @return {Number} Size
*/
var getBandSizeOfScale = exports.getBandSizeOfScale = function getBandSizeOfScale(scale) {
if (scale && scale.bandwidth) {
return scale.bandwidth();
}
return 0;
};
var getAnyElementOfObject = exports.getAnyElementOfObject = function getAnyElementOfObject(obj) {
if (!obj) {
return null;
}
var keys = Object.keys(obj);
if (keys && keys.length) {
return obj[keys[0]];
}
return null;
};
var hasDuplicate = exports.hasDuplicate = function hasDuplicate(ary) {
if (!(0, _isArray3.default)(ary)) {
return false;
}
var len = ary.length;
var cache = {};
for (var i = 0; i < len; i++) {
if (!cache[ary[i]]) {
cache[ary[i]] = true;
} else {
return true;
}
}
return false;
};
/***/ },
/* 215 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
/* eslint no-console: 0 */
var isDev = ("development") !== 'production';
var warn = exports.warn = function warn(condition, format, a, b, c, d, e, f) {
if (isDev && typeof console !== 'undefined' && console.warn) {
if (format === undefined) {
console.warn('LogUtils requires an error message argument');
}
if (!condition) {
if (format === undefined) {
console.warn('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
} else {
(function () {
var args = [a, b, c, d, e, f];
var argIndex = 0;
console.warn(format.replace(/%s/g, function () {
return args[argIndex++];
}));
})();
}
}
}
};
/***/ },
/* 216 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Cross
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Cell = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(Cell, _Component);
function Cell() {
_classCallCheck(this, Cell);
return _possibleConstructorReturn(this, Object.getPrototypeOf(Cell).apply(this, arguments));
}
_createClass(Cell, [{
key: 'render',
value: function render() {
return null;
}
}]);
return Cell;
}(_react.Component), _class2.displayName = 'Cell', _temp)) || _class;
exports.default = Cell;
/***/ },
/* 217 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Sector
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _ReactUtils = __webpack_require__(133);
var _PolarUtils = __webpack_require__(218);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
var sign = Math.sign(endAngle - startAngle);
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
return sign * deltaAngle;
};
var getSectorPath = function getSectorPath(_ref) {
var cx = _ref.cx;
var cy = _ref.cy;
var innerRadius = _ref.innerRadius;
var outerRadius = _ref.outerRadius;
var startAngle = _ref.startAngle;
var endAngle = _ref.endAngle;
var angle = getDeltaAngle(startAngle, endAngle);
// When the angle of sector equals to 360, star point and end point coincide
var tempEndAngle = startAngle + angle;
var outerStartPoint = (0, _PolarUtils.polarToCartesian)(cx, cy, outerRadius, startAngle);
var outerEndPoint = (0, _PolarUtils.polarToCartesian)(cx, cy, outerRadius, tempEndAngle);
var path = void 0;
if (innerRadius > 0) {
var innerStartPoint = (0, _PolarUtils.polarToCartesian)(cx, cy, innerRadius, startAngle);
var innerEndPoint = (0, _PolarUtils.polarToCartesian)(cx, cy, innerRadius, tempEndAngle);
path = 'M ' + outerStartPoint.x + ',' + outerStartPoint.y + '\n A ' + outerRadius + ',' + outerRadius + ',0,\n ' + +(Math.abs(angle) > 180) + ',' + +(startAngle > tempEndAngle) + ',\n ' + outerEndPoint.x + ',' + outerEndPoint.y + '\n L ' + innerEndPoint.x + ',' + innerEndPoint.y + '\n A ' + innerRadius + ',' + innerRadius + ',0,\n ' + +(Math.abs(angle) > 180) + ',' + +(startAngle <= tempEndAngle) + ',\n ' + innerStartPoint.x + ',' + innerStartPoint.y + ' Z';
} else {
path = 'M ' + outerStartPoint.x + ',' + outerStartPoint.y + '\n A ' + outerRadius + ',' + outerRadius + ',0,\n ' + +(Math.abs(angle) > 180) + ',' + +(startAngle > tempEndAngle) + ',\n ' + outerEndPoint.x + ',' + outerEndPoint.y + '\n L ' + cx + ',' + cy + ' Z';
}
return path;
};
var Sector = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(Sector, _Component);
function Sector() {
_classCallCheck(this, Sector);
return _possibleConstructorReturn(this, Object.getPrototypeOf(Sector).apply(this, arguments));
}
_createClass(Sector, [{
key: 'render',
value: function render() {
var _props = this.props;
var cx = _props.cx;
var cy = _props.cy;
var innerRadius = _props.innerRadius;
var outerRadius = _props.outerRadius;
var startAngle = _props.startAngle;
var endAngle = _props.endAngle;
var className = _props.className;
if (outerRadius < innerRadius || startAngle === endAngle) {
return null;
}
var layerClass = (0, _classnames2.default)('recharts-sector', className);
return _react2.default.createElement('path', _extends({}, (0, _ReactUtils.getPresentationAttributes)(this.props), (0, _ReactUtils.filterEventAttributes)(this.props), {
className: layerClass,
d: getSectorPath({ cx: cx, cy: cy, innerRadius: innerRadius, outerRadius: outerRadius, startAngle: startAngle, endAngle: endAngle })
}));
}
}]);
return Sector;
}(_react.Component), _class2.displayName = 'Sector', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, {
className: _react.PropTypes.string,
cx: _react.PropTypes.number,
cy: _react.PropTypes.number,
innerRadius: _react.PropTypes.number,
outerRadius: _react.PropTypes.number,
startAngle: _react.PropTypes.number,
endAngle: _react.PropTypes.number
}), _class2.defaultProps = {
cx: 0,
cy: 0,
innerRadius: 0,
outerRadius: 0,
startAngle: 0,
endAngle: 0
}, _temp)) || _class;
exports.default = Sector;
/***/ },
/* 218 */
/***/ function(module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var RADIAN = Math.PI / 180;
var polarToCartesian = exports.polarToCartesian = function polarToCartesian(cx, cy, radius, angle) {
return {
x: cx + Math.cos(-RADIAN * angle) * radius,
y: cy + Math.sin(-RADIAN * angle) * radius
};
};
var getMaxRadius = exports.getMaxRadius = function getMaxRadius(width, height) {
var margin = arguments.length <= 2 || arguments[2] === undefined ? {
top: 0, right: 0, bottom: 0, left: 0
} : arguments[2];
return Math.min(Math.abs(width - (margin.left || 0) - (margin.right || 0)), Math.abs(height - (margin.left || 0) - (margin.right || 0))) / 2;
};
/***/ },
/* 219 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isNumber2 = __webpack_require__(47);
var _isNumber3 = _interopRequireDefault(_isNumber2);
var _isArray2 = __webpack_require__(118);
var _isArray3 = _interopRequireDefault(_isArray2);
var _isFunction2 = __webpack_require__(49);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Curve
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _d3Shape = __webpack_require__(131);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _ReactUtils = __webpack_require__(133);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var CURVE_FACTORIES = {
curveBasisClosed: _d3Shape.curveBasisClosed, curveBasisOpen: _d3Shape.curveBasisOpen, curveBasis: _d3Shape.curveBasis, curveLinearClosed: _d3Shape.curveLinearClosed, curveLinear: _d3Shape.curveLinear,
curveMonotoneX: _d3Shape.curveMonotoneX, curveMonotoneY: _d3Shape.curveMonotoneY, curveNatural: _d3Shape.curveNatural, curveStep: _d3Shape.curveStep, curveStepAfter: _d3Shape.curveStepAfter,
curveStepBefore: _d3Shape.curveStepBefore
};
var defined = function defined(p) {
return p.x === +p.x && p.y === +p.y;
};
var getX = function getX(p) {
return p.x;
};
var getY = function getY(p) {
return p.y;
};
var getCurveFactory = function getCurveFactory(type, layout) {
if ((0, _isFunction3.default)(type)) {
return type;
}
var name = 'curve' + type.slice(0, 1).toUpperCase() + type.slice(1);
if (name === 'curveMonotone' && layout) {
return CURVE_FACTORIES['' + name + (layout === 'vertical' ? 'Y' : 'X')];
}
return CURVE_FACTORIES[name] || _d3Shape.curveLinear;
};
var Curve = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(Curve, _Component);
function Curve() {
_classCallCheck(this, Curve);
return _possibleConstructorReturn(this, Object.getPrototypeOf(Curve).apply(this, arguments));
}
_createClass(Curve, [{
key: 'getPath',
/**
* Calculate the path of curve
* @return {String} path
*/
value: function getPath() {
var _props = this.props;
var type = _props.type;
var points = _props.points;
var baseLine = _props.baseLine;
var layout = _props.layout;
var connectNulls = _props.connectNulls;
var curveFactory = getCurveFactory(type, layout);
var formatPoints = connectNulls ? points.filter(function (entry) {
return defined(entry);
}) : points;
var lineFunction = void 0;
if ((0, _isArray3.default)(baseLine)) {
var areaPoints = formatPoints.map(function (entry, index) {
return _extends({}, entry, { base: baseLine[index] });
});
if (layout === 'vertical') {
lineFunction = (0, _d3Shape.area)().y(getY).x1(getX).x0(function (d) {
return d.base.x;
});
} else {
lineFunction = (0, _d3Shape.area)().x(getX).y1(getY).y0(function (d) {
return d.base.y;
});
}
lineFunction.defined(defined).curve(curveFactory);
return lineFunction(areaPoints);
} else if (layout === 'vertical' && (0, _isNumber3.default)(baseLine)) {
lineFunction = (0, _d3Shape.area)().y(getY).x1(getX).x0(baseLine);
} else if ((0, _isNumber3.default)(baseLine)) {
lineFunction = (0, _d3Shape.area)().x(getX).y1(getY).y0(baseLine);
} else {
lineFunction = (0, _d3Shape.line)().x(getX).y(getY);
}
lineFunction.defined(defined).curve(curveFactory);
return lineFunction(formatPoints);
}
}, {
key: 'render',
value: function render() {
var _props2 = this.props;
var className = _props2.className;
var points = _props2.points;
var type = _props2.type;
if (!points || !points.length) {
return null;
}
return _react2.default.createElement('path', _extends({}, (0, _ReactUtils.getPresentationAttributes)(this.props), (0, _ReactUtils.filterEventAttributes)(this.props), {
className: (0, _classnames2.default)('recharts-curve', className),
d: this.getPath()
}));
}
}]);
return Curve;
}(_react.Component), _class2.displayName = 'Curve', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, {
className: _react.PropTypes.string,
type: _react.PropTypes.oneOfType([_react.PropTypes.oneOf(['basis', 'basisClosed', 'basisOpen', 'linear', 'linearClosed', 'natural', 'monotoneX', 'monotoneY', 'monotone', 'step', 'stepBefore', 'stepAfter']), _react.PropTypes.func]),
layout: _react.PropTypes.oneOf(['horizontal', 'vertical']),
baseLine: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.array]),
points: _react.PropTypes.arrayOf(_react.PropTypes.object),
connectNulls: _react.PropTypes.bool
}), _class2.defaultProps = {
type: 'linear',
stroke: '#000',
fill: 'none',
strokeWidth: 1,
strokeDasharray: 'none',
points: [],
connectNulls: false
}, _temp)) || _class;
exports.default = Curve;
/***/ },
/* 220 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp2; /**
* @fileOverview Rectangle
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _reactDom = __webpack_require__(199);
var _reactSmooth = __webpack_require__(137);
var _reactSmooth2 = _interopRequireDefault(_reactSmooth);
var _ReactUtils = __webpack_require__(133);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var getRectangePath = function getRectangePath(x, y, width, height, radius) {
var maxRadius = Math.min(width / 2, height / 2);
var newRadius = [];
var path = void 0;
if (maxRadius > 0 && radius instanceof Array) {
for (var i = 0, len = 4; i < len; i++) {
newRadius[i] = radius[i] > maxRadius ? maxRadius : radius[i];
}
path = 'M' + x + ',' + (y + newRadius[0]);
if (newRadius[0] > 0) {
path += 'A ' + newRadius[0] + ',' + newRadius[0] + ',0,0,1,' + (x + newRadius[0]) + ',' + y;
}
path += 'L ' + (x + width - newRadius[1]) + ',' + y;
if (newRadius[1] > 0) {
path += 'A ' + newRadius[1] + ',' + newRadius[1] + ',0,0,1,' + (x + width) + ',' + (y + newRadius[1]);
}
path += 'L ' + (x + width) + ',' + (y + height - newRadius[2]);
if (newRadius[2] > 0) {
path += 'A ' + newRadius[2] + ',' + newRadius[2] + ',0,0,1,' + (x + width - newRadius[2]) + ',' + (y + height);
}
path += 'L ' + (x + newRadius[3]) + ',' + (y + height);
if (newRadius[3] > 0) {
path += 'A ' + newRadius[3] + ',' + newRadius[3] + ',0,0,1,' + x + ',' + (y + height - newRadius[3]);
}
path += 'Z';
} else if (maxRadius > 0 && radius === +radius && radius > 0) {
newRadius = radius > maxRadius ? maxRadius : radius;
path = 'M ' + x + ',' + (y + newRadius) + ' A ' + newRadius + ',' + newRadius + ',0,0,1,' + (x + newRadius) + ',' + y + '\n L ' + (x + width - newRadius) + ',' + y + '\n A ' + newRadius + ',' + newRadius + ',0,0,1,' + (x + width) + ',' + (y + newRadius) + '\n L ' + (x + width) + ',' + (y + height - newRadius) + '\n A ' + newRadius + ',' + newRadius + ',0,0,1,' + (x + width - newRadius) + ',' + (y + height) + '\n L ' + (x + newRadius) + ',' + (y + height) + '\n A ' + newRadius + ',' + newRadius + ',0,0,1,' + x + ',' + (y + height - newRadius) + ' Z';
} else {
path = 'M ' + x + ',' + y + ' h ' + width + ' v ' + height + ' h ' + -width + ' Z';
}
return path;
};
var Rectangle = (0, _PureRender2.default)(_class = (_temp2 = _class2 = function (_Component) {
_inherits(Rectangle, _Component);
function Rectangle() {
var _Object$getPrototypeO;
var _temp, _this, _ret;
_classCallCheck(this, Rectangle);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Rectangle)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = {
totalLength: -1
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Rectangle, [{
key: 'componentDidMount',
/* eslint-disable react/no-did-mount-set-state */
value: function componentDidMount() {
var path = (0, _reactDom.findDOMNode)(this);
var totalLength = path && path.getTotalLength && path.getTotalLength();
if (totalLength) {
this.setState({
totalLength: totalLength
});
}
}
}, {
key: 'render',
value: function render() {
var _this2 = this;
var _props = this.props;
var x = _props.x;
var y = _props.y;
var width = _props.width;
var height = _props.height;
var radius = _props.radius;
var className = _props.className;
var totalLength = this.state.totalLength;
var _props2 = this.props;
var animationEasing = _props2.animationEasing;
var animationDuration = _props2.animationDuration;
var animationBegin = _props2.animationBegin;
var isAnimationActive = _props2.isAnimationActive;
var isUpdateAnimationActive = _props2.isUpdateAnimationActive;
if (x !== +x || y !== +y || width !== +width || height !== +height) {
return null;
}
var layerClass = (0, _classnames2.default)('recharts-rectangle', className);
return _react2.default.createElement(
_reactSmooth2.default,
{
canBegin: totalLength > 0,
from: { width: width, height: height, x: x, y: y },
to: { width: width, height: height, x: x, y: y },
duration: animationDuration,
animationEasing: animationEasing,
isActive: isUpdateAnimationActive
},
function (_ref) {
var currWidth = _ref.width;
var currHeight = _ref.height;
var currX = _ref.x;
var currY = _ref.y;
return _react2.default.createElement(
_reactSmooth2.default,
{
canBegin: totalLength > 0,
from: '0px ' + (totalLength === -1 ? 1 : totalLength) + 'px',
to: totalLength + 'px 0px',
attributeName: 'strokeDasharray',
begin: animationBegin,
duration: animationDuration,
isActive: isAnimationActive,
easing: animationEasing
},
_react2.default.createElement('path', _extends({}, (0, _ReactUtils.getPresentationAttributes)(_this2.props), (0, _ReactUtils.filterEventAttributes)(_this2.props), {
className: layerClass,
d: getRectangePath(currX, currY, currWidth, currHeight, radius)
}))
);
}
);
}
}]);
return Rectangle;
}(_react.Component), _class2.displayName = 'Rectangle', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, {
className: _react.PropTypes.string,
x: _react.PropTypes.number,
y: _react.PropTypes.number,
width: _react.PropTypes.number,
height: _react.PropTypes.number,
radius: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.array]),
isAnimationActive: _react.PropTypes.bool,
isUpdateAnimationActive: _react.PropTypes.bool,
animationBegin: _react.PropTypes.number,
animationDuration: _react.PropTypes.number,
animationEasing: _react.PropTypes.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear'])
}), _class2.defaultProps = {
x: 0,
y: 0,
width: 0,
height: 0,
// The radius of border
// The radius of four corners when radius is a number
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
radius: 0,
stroke: 'none',
strokeWidth: 1,
strokeDasharray: 'none',
fill: '#000',
isAnimationActive: false,
isUpdateAnimationActive: false,
animationBegin: 0,
animationDuration: 1500,
animationEasing: 'ease'
}, _temp2)) || _class;
exports.default = Rectangle;
/***/ },
/* 221 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Polygon
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _ReactUtils = __webpack_require__(133);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var getPolygonPoints = function getPolygonPoints(points) {
return points.reduce(function (result, entry) {
if (entry.x === +entry.x && entry.y === +entry.y) {
result.push([entry.x, entry.y]);
}
return result;
}, []).join(' ');
};
var Polygon = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(Polygon, _Component);
function Polygon() {
_classCallCheck(this, Polygon);
return _possibleConstructorReturn(this, Object.getPrototypeOf(Polygon).apply(this, arguments));
}
_createClass(Polygon, [{
key: 'render',
value: function render() {
var _props = this.props;
var points = _props.points;
var className = _props.className;
if (!points || !points.length) {
return null;
}
var layerClass = (0, _classnames2.default)('recharts-polygon', className);
return _react2.default.createElement('polygon', _extends({}, (0, _ReactUtils.getPresentationAttributes)(this.props), (0, _ReactUtils.filterEventAttributes)(this.props), {
className: layerClass,
points: getPolygonPoints(points)
}));
}
}]);
return Polygon;
}(_react.Component), _class2.displayName = 'Polygon', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, {
className: _react.PropTypes.string,
points: _react.PropTypes.arrayOf(_react.PropTypes.shape({
x: _react.PropTypes.number,
y: _react.PropTypes.number
}))
}), _class2.defaultProps = {
fill: 'none',
stroke: '#333',
strokeWidth: 1
}, _temp)) || _class;
exports.default = Polygon;
/***/ },
/* 222 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Dot
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _ReactUtils = __webpack_require__(133);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Dot = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(Dot, _Component);
function Dot() {
_classCallCheck(this, Dot);
return _possibleConstructorReturn(this, Object.getPrototypeOf(Dot).apply(this, arguments));
}
_createClass(Dot, [{
key: 'render',
value: function render() {
var _props = this.props;
var cx = _props.cx;
var cy = _props.cy;
var r = _props.r;
var className = _props.className;
var layerClass = (0, _classnames2.default)('recharts-dot', className);
if (cx === +cx && cy === +cy && r === +r) {
return _react2.default.createElement('circle', _extends({}, (0, _ReactUtils.getPresentationAttributes)(this.props), {
className: layerClass,
cx: cx,
cy: cy,
r: r
}));
}
return null;
}
}]);
return Dot;
}(_react.Component), _class2.displayName = 'Dot', _class2.propTypes = {
className: _react.PropTypes.string,
cx: _react.PropTypes.number,
cy: _react.PropTypes.number,
r: _react.PropTypes.number
}, _temp)) || _class;
exports.default = Dot;
/***/ },
/* 223 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isNumber2 = __webpack_require__(47);
var _isNumber3 = _interopRequireDefault(_isNumber2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Cross
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _ReactUtils = __webpack_require__(133);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Cross = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(Cross, _Component);
function Cross() {
_classCallCheck(this, Cross);
return _possibleConstructorReturn(this, Object.getPrototypeOf(Cross).apply(this, arguments));
}
_createClass(Cross, [{
key: 'getPath',
value: function getPath(x, y, width, height, top, left) {
return 'M' + x + ',' + top + 'v' + height + 'M' + left + ',' + y + 'h' + width;
}
}, {
key: 'render',
value: function render() {
var _props = this.props;
var x = _props.x;
var y = _props.y;
var width = _props.width;
var height = _props.height;
var top = _props.top;
var left = _props.left;
var className = _props.className;
if (!(0, _isNumber3.default)(x) || !(0, _isNumber3.default)(y) || !(0, _isNumber3.default)(width) || !(0, _isNumber3.default)(height) || !(0, _isNumber3.default)(top) || !(0, _isNumber3.default)(left)) {
return null;
}
return _react2.default.createElement('path', _extends({}, (0, _ReactUtils.getPresentationAttributes)(this.props), {
className: (0, _classnames2.default)('recharts-cross', className),
d: this.getPath(x, y, width, height, top, left)
}));
}
}]);
return Cross;
}(_react.Component), _class2.displayName = 'Cross', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, {
x: _react.PropTypes.number,
y: _react.PropTypes.number,
width: _react.PropTypes.number,
height: _react.PropTypes.number,
top: _react.PropTypes.number,
left: _react.PropTypes.number,
className: _react.PropTypes.string
}), _class2.defaultProps = {
x: 0,
y: 0,
top: 0,
left: 0,
width: 0,
height: 0,
stroke: '#000',
fill: 'none'
}, _temp)) || _class;
exports.default = Cross;
/***/ },
/* 224 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Polar Grid
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _PolarUtils = __webpack_require__(218);
var _ReactUtils = __webpack_require__(133);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var PolarGrid = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(PolarGrid, _Component);
function PolarGrid() {
_classCallCheck(this, PolarGrid);
return _possibleConstructorReturn(this, Object.getPrototypeOf(PolarGrid).apply(this, arguments));
}
_createClass(PolarGrid, [{
key: 'renderPolarAngles',
/**
* Draw axis of radial line
* @return {[type]} The lines
*/
value: function renderPolarAngles() {
var _props = this.props;
var cx = _props.cx;
var cy = _props.cy;
var innerRadius = _props.innerRadius;
var outerRadius = _props.outerRadius;
var polarAngles = _props.polarAngles;
if (!polarAngles || !polarAngles.length) {
return null;
}
var props = _extends({
stroke: '#ccc'
}, (0, _ReactUtils.getPresentationAttributes)(this.props));
return _react2.default.createElement(
'g',
{ className: 'recharts-polar-grid-angle' },
polarAngles.map(function (entry, i) {
var start = (0, _PolarUtils.polarToCartesian)(cx, cy, innerRadius, entry);
var end = (0, _PolarUtils.polarToCartesian)(cx, cy, outerRadius, entry);
return _react2.default.createElement('line', _extends({}, props, {
key: 'line-' + i,
x1: start.x,
y1: start.y,
x2: end.x,
y2: end.y
}));
})
);
}
/**
* Draw concentric circles
* @param {Number} radius The radius of circle
* @param {Number} index The index of circle
* @return {ReactElement} circle
*/
}, {
key: 'renderConcentricCircle',
value: function renderConcentricCircle(radius, index) {
var _props2 = this.props;
var cx = _props2.cx;
var cy = _props2.cy;
var props = _extends({
stroke: '#ccc',
fill: 'none'
}, (0, _ReactUtils.getPresentationAttributes)(this.props));
return _react2.default.createElement('circle', _extends({}, props, {
className: 'recharts-polar-grid-concentric-circle',
key: 'circle-' + index,
cx: cx,
cy: cy,
r: radius
}));
}
/**
* Draw concentric polygons
* @param {Number} radius The radius of polygon
* @param {Number} index The index of polygon
* @return {ReactElement} polygon
*/
}, {
key: 'renderConcentricPolygon',
value: function renderConcentricPolygon(radius, index) {
var _props3 = this.props;
var cx = _props3.cx;
var cy = _props3.cy;
var polarAngles = _props3.polarAngles;
var props = _extends({
stroke: '#ccc',
fill: 'none'
}, (0, _ReactUtils.getPresentationAttributes)(this.props));
var path = '';
polarAngles.forEach(function (angle, i) {
var point = (0, _PolarUtils.polarToCartesian)(cx, cy, radius, angle);
if (i) {
path += 'L ' + point.x + ',' + point.y;
} else {
path += 'M ' + point.x + ',' + point.y;
}
});
path += 'Z';
return _react2.default.createElement('path', _extends({}, props, {
className: 'recharts-polar-grid-concentric-polygon',
key: 'path-' + index,
d: path
}));
}
/**
* Draw concentric axis
* @return {ReactElement} Concentric axis
* @todo Optimize the name
*/
}, {
key: 'renderConcentricPath',
value: function renderConcentricPath() {
var _this2 = this;
var _props4 = this.props;
var polarRadius = _props4.polarRadius;
var gridType = _props4.gridType;
if (!polarRadius || !polarRadius.length) {
return null;
}
return _react2.default.createElement(
'g',
{ className: 'recharts-polar-grid-concentric' },
polarRadius.map(function (entry, i) {
return gridType === 'circle' ? _this2.renderConcentricCircle(entry, i) : _this2.renderConcentricPolygon(entry, i);
})
);
}
}, {
key: 'render',
value: function render() {
var outerRadius = this.props.outerRadius;
if (outerRadius <= 0) {
return null;
}
return _react2.default.createElement(
'g',
{ className: 'recharts-polar-grid' },
this.renderPolarAngles(),
this.renderConcentricPath()
);
}
}]);
return PolarGrid;
}(_react.Component), _class2.displayName = 'PolarGrid', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, {
cx: _react.PropTypes.number,
cy: _react.PropTypes.number,
innerRadius: _react.PropTypes.number,
outerRadius: _react.PropTypes.number,
polarAngles: _react.PropTypes.arrayOf(_react.PropTypes.number),
polarRadius: _react.PropTypes.arrayOf(_react.PropTypes.number),
gridType: _react.PropTypes.oneOf(['polygon', 'circle'])
}), _class2.defaultProps = {
cx: 0,
cy: 0,
innerRadius: 0,
outerRadius: 0,
gridType: 'polygon'
}, _temp)) || _class;
exports.default = PolarGrid;
/***/ },
/* 225 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isNumber2 = __webpack_require__(47);
var _isNumber3 = _interopRequireDefault(_isNumber2);
var _isString2 = __webpack_require__(119);
var _isString3 = _interopRequireDefault(_isString2);
var _maxBy2 = __webpack_require__(226);
var _maxBy3 = _interopRequireDefault(_maxBy2);
var _isFunction2 = __webpack_require__(49);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview The axis of polar coordinate system
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
var _ReactUtils = __webpack_require__(133);
var _PolarUtils = __webpack_require__(218);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var PolarRadiusAxis = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(PolarRadiusAxis, _Component);
function PolarRadiusAxis() {
_classCallCheck(this, PolarRadiusAxis);
return _possibleConstructorReturn(this, Object.getPrototypeOf(PolarRadiusAxis).apply(this, arguments));
}
_createClass(PolarRadiusAxis, [{
key: 'getTickValueCoord',
/**
* Calculate the coordinate of tick
* @param {Object} radius The data of a simple tick
* @return {Object} (x, y)
*/
value: function getTickValueCoord(_ref) {
var radius = _ref.radius;
var _props = this.props;
var angle = _props.angle;
var cx = _props.cx;
var cy = _props.cy;
return (0, _PolarUtils.polarToCartesian)(cx, cy, radius, angle);
}
}, {
key: 'getTickTextAnchor',
value: function getTickTextAnchor() {
var orientation = this.props.orientation;
var textAnchor = void 0;
switch (orientation) {
case 'left':
textAnchor = 'end';
break;
case 'right':
textAnchor = 'start';
break;
default:
textAnchor = 'middle';
break;
}
return textAnchor;
}
}, {
key: 'renderAxisLine',
value: function renderAxisLine() {
var _props2 = this.props;
var cx = _props2.cx;
var cy = _props2.cy;
var angle = _props2.angle;
var ticks = _props2.ticks;
var axisLine = _props2.axisLine;
var extent = ticks.reduce(function (result, entry) {
return [Math.min(result[0], entry.radius), Math.max(result[1], entry.radius)];
}, [Infinity, -Infinity]);
var point0 = (0, _PolarUtils.polarToCartesian)(cx, cy, extent[0], angle);
var point1 = (0, _PolarUtils.polarToCartesian)(cx, cy, extent[1], angle);
var props = _extends({}, (0, _ReactUtils.getPresentationAttributes)(this.props), {
fill: 'none'
}, (0, _ReactUtils.getPresentationAttributes)(axisLine), {
x1: point0.x,
y1: point0.y,
x2: point1.x,
y2: point1.y
});
return _react2.default.createElement('line', _extends({ className: 'recharts-polar-radius-axis-line' }, props));
}
}, {
key: 'renderTickItem',
value: function renderTickItem(option, props, value) {
var tickItem = void 0;
if (_react2.default.isValidElement(option)) {
tickItem = _react2.default.cloneElement(option, props);
} else if ((0, _isFunction3.default)(option)) {
tickItem = option(props);
} else {
tickItem = _react2.default.createElement(
'text',
_extends({}, (0, _ReactUtils.getPresentationAttributes)(props), {
className: 'recharts-polar-radius-axis-tick-value'
}),
value
);
}
return tickItem;
}
}, {
key: 'renderTicks',
value: function renderTicks() {
var _this2 = this;
var _props3 = this.props;
var ticks = _props3.ticks;
var tick = _props3.tick;
var angle = _props3.angle;
var tickFormatter = _props3.tickFormatter;
var stroke = _props3.stroke;
var textAnchor = this.getTickTextAnchor();
var axisProps = (0, _ReactUtils.getPresentationAttributes)(this.props);
var customTickProps = (0, _ReactUtils.getPresentationAttributes)(tick);
var items = ticks.map(function (entry, i) {
var coord = _this2.getTickValueCoord(entry);
var tickProps = _extends({
textAnchor: textAnchor,
transform: 'rotate(' + (90 - angle) + ', ' + coord.x + ', ' + coord.y + ')'
}, axisProps, {
stroke: 'none', fill: stroke
}, customTickProps, {
index: i
}, coord, {
payload: entry
});
return _react2.default.createElement(
'g',
{ className: 'recharts-polar-radius-axis-tick', key: 'tick-' + i },
_this2.renderTickItem(tick, tickProps, tickFormatter ? tickFormatter(entry.value) : entry.value)
);
});
return _react2.default.createElement(
'g',
{ className: 'recharts-polar-radius-axis-ticks' },
items
);
}
}, {
key: 'renderLabel',
value: function renderLabel() {
var label = this.props.label;
var _props4 = this.props;
var ticks = _props4.ticks;
var angle = _props4.angle;
var stroke = _props4.stroke;
var maxRadiusTick = (0, _maxBy3.default)(ticks, function (entry) {
return entry.radius || 0;
});
var radius = maxRadiusTick.radius || 0;
var coord = this.getTickValueCoord({ radius: radius + 10 });
var props = _extends({}, this.props, {
stroke: 'none',
fill: stroke
}, coord, {
textAnchor: 'middle',
transform: 'rotate(' + (90 - angle) + ', ' + coord.x + ', ' + coord.y + ')'
});
if (_react2.default.isValidElement(label)) {
return _react2.default.cloneElement(label, props);
} else if ((0, _isFunction3.default)(label)) {
return label(props);
} else if ((0, _isString3.default)(label) || (0, _isNumber3.default)(label)) {
return _react2.default.createElement(
'g',
{ className: 'recharts-polar-radius-axis-label' },
_react2.default.createElement(
'text',
(0, _ReactUtils.getPresentationAttributes)(props),
label
)
);
}
return null;
}
}, {
key: 'render',
value: function render() {
var _props5 = this.props;
var ticks = _props5.ticks;
var axisLine = _props5.axisLine;
var tick = _props5.tick;
if (!ticks || !ticks.length) {
return null;
}
return _react2.default.createElement(
'g',
{ className: 'recharts-polar-radius-axis' },
axisLine && this.renderAxisLine(),
tick && this.renderTicks(),
this.renderLabel()
);
}
}]);
return PolarRadiusAxis;
}(_react.Component), _class2.displayName = 'PolarRadiusAxis', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, {
cx: _react.PropTypes.number,
cy: _react.PropTypes.number,
hide: _react.PropTypes.bool,
angle: _react.PropTypes.number,
tickCount: _react.PropTypes.number,
ticks: _react.PropTypes.arrayOf(_react.PropTypes.shape({
value: _react.PropTypes.any,
radius: _react.PropTypes.value
})),
orientation: _react.PropTypes.oneOf(['left', 'right', 'middle']),
axisLine: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.object]),
label: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string, _react.PropTypes.element, _react.PropTypes.func]),
tick: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.object, _react.PropTypes.element, _react.PropTypes.func]),
stroke: _react.PropTypes.string,
tickFormatter: _react.PropTypes.func,
domain: _react.PropTypes.arrayOf(_react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.oneOf(['auto', 'dataMin', 'dataMax'])]))
}), _class2.defaultProps = {
cx: 0,
cy: 0,
angle: 0,
orientation: 'right',
stroke: '#ccc',
axisLine: true,
tick: true,
tickCount: 5,
domain: [0, 'auto']
}, _temp)) || _class;
exports.default = PolarRadiusAxis;
/***/ },
/* 226 */
/***/ function(module, exports, __webpack_require__) {
var baseExtremum = __webpack_require__(227),
baseGt = __webpack_require__(228),
baseIteratee = __webpack_require__(172);
/**
* This method is like `_.max` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the criterion by which
* the value is ranked. The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Math
* @param {Array} array The array to iterate over.
* @param {Array|Function|Object|string} [iteratee=_.identity]
* The iteratee invoked per element.
* @returns {*} Returns the maximum value.
* @example
*
* var objects = [{ 'n': 1 }, { 'n': 2 }];
*
* _.maxBy(objects, function(o) { return o.n; });
* // => { 'n': 2 }
*
* // The `_.property` iteratee shorthand.
* _.maxBy(objects, 'n');
* // => { 'n': 2 }
*/
function maxBy(array, iteratee) {
return (array && array.length)
? baseExtremum(array, baseIteratee(iteratee), baseGt)
: undefined;
}
module.exports = maxBy;
/***/ },
/* 227 */
/***/ function(module, exports, __webpack_require__) {
var isSymbol = __webpack_require__(162);
/**
* The base implementation of methods like `_.max` and `_.min` which accepts a
* `comparator` to determine the extremum value.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The iteratee invoked per iteration.
* @param {Function} comparator The comparator used to compare values.
* @returns {*} Returns the extremum value.
*/
function baseExtremum(array, iteratee, comparator) {
var index = -1,
length = array.length;
while (++index < length) {
var value = array[index],
current = iteratee(value);
if (current != null && (computed === undefined
? (current === current && !isSymbol(current))
: comparator(current, computed)
)) {
var computed = current,
result = value;
}
}
return result;
}
module.exports = baseExtremum;
/***/ },
/* 228 */
/***/ function(module, exports) {
/**
* The base implementation of `_.gt` which doesn't coerce arguments to numbers.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is greater than `other`,
* else `false`.
*/
function baseGt(value, other) {
return value > other;
}
module.exports = baseGt;
/***/ },
/* 229 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isFunction2 = __webpack_require__(49);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Axis of radial direction
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
var _ReactUtils = __webpack_require__(133);
var _Dot = __webpack_require__(222);
var _Dot2 = _interopRequireDefault(_Dot);
var _Polygon = __webpack_require__(221);
var _Polygon2 = _interopRequireDefault(_Polygon);
var _PolarUtils = __webpack_require__(218);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var RADIAN = Math.PI / 180;
var eps = 1e-5;
var PolarAngleAxis = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(PolarAngleAxis, _Component);
function PolarAngleAxis() {
_classCallCheck(this, PolarAngleAxis);
return _possibleConstructorReturn(this, Object.getPrototypeOf(PolarAngleAxis).apply(this, arguments));
}
_createClass(PolarAngleAxis, [{
key: 'getTickLineCoord',
/**
* Calculate the coordinate of line endpoint
* @param {Object} data The Data if ticks
* @return {Object} (x0, y0): The start point of text,
* (x1, y1): The end point close to text,
* (x2, y2): The end point close to axis
*/
value: function getTickLineCoord(data) {
var _props = this.props;
var cx = _props.cx;
var cy = _props.cy;
var radius = _props.radius;
var orientation = _props.orientation;
var tickLine = _props.tickLine;
var tickLineSize = tickLine && tickLine.size || 8;
var p1 = (0, _PolarUtils.polarToCartesian)(cx, cy, radius, data.angle);
var p2 = (0, _PolarUtils.polarToCartesian)(cx, cy, radius + (orientation === 'inner' ? -1 : 1) * tickLineSize, data.angle);
return { x1: p1.x, y1: p1.y, x2: p2.x, y2: p2.y };
}
/**
* Get the text-anchor of each tick
* @param {Object} data Data of ticks
* @return {String} text-anchor
*/
}, {
key: 'getTickTextAnchor',
value: function getTickTextAnchor(data) {
var orientation = this.props.orientation;
var cos = Math.cos(-data.angle * RADIAN);
var textAnchor = void 0;
if (cos > eps) {
textAnchor = orientation === 'outer' ? 'start' : 'end';
} else if (cos < -eps) {
textAnchor = orientation === 'outer' ? 'end' : 'start';
} else {
textAnchor = 'middle';
}
return textAnchor;
}
}, {
key: 'renderAxisLine',
value: function renderAxisLine() {
var _props2 = this.props;
var cx = _props2.cx;
var cy = _props2.cy;
var radius = _props2.radius;
var axisLine = _props2.axisLine;
var axisLineType = _props2.axisLineType;
var props = _extends({}, (0, _ReactUtils.getPresentationAttributes)(this.props), {
fill: 'none'
}, (0, _ReactUtils.getPresentationAttributes)(axisLine));
if (axisLineType === 'circle') {
return _react2.default.createElement(_Dot2.default, _extends({
className: 'recharts-polar-angle-axis-line'
}, props, {
cx: cx,
cy: cy,
r: radius
}));
}
var ticks = this.props.ticks;
var points = ticks.map(function (entry) {
return (0, _PolarUtils.polarToCartesian)(cx, cy, radius, entry.angle);
});
return _react2.default.createElement(_Polygon2.default, _extends({ className: 'recharts-polar-angle-axis-line' }, props, { points: points }));
}
}, {
key: 'renderTickItem',
value: function renderTickItem(option, props, value) {
var tickItem = void 0;
if (_react2.default.isValidElement(option)) {
tickItem = _react2.default.cloneElement(option, props);
} else if ((0, _isFunction3.default)(option)) {
tickItem = option(props);
} else {
tickItem = _react2.default.createElement(
'text',
_extends({}, (0, _ReactUtils.getPresentationAttributes)(props), {
className: 'recharts-polar-angle-axis-tick-value'
}),
value
);
}
return tickItem;
}
}, {
key: 'renderTicks',
value: function renderTicks() {
var _this2 = this;
var _props3 = this.props;
var ticks = _props3.ticks;
var tick = _props3.tick;
var tickLine = _props3.tickLine;
var tickFormatter = _props3.tickFormatter;
var stroke = _props3.stroke;
var axisProps = (0, _ReactUtils.getPresentationAttributes)(this.props);
var customTickProps = (0, _ReactUtils.getPresentationAttributes)(tick);
var tickLineProps = _extends({}, axisProps, { fill: 'none' }, (0, _ReactUtils.getPresentationAttributes)(tickLine));
var items = ticks.map(function (entry, i) {
var lineCoord = _this2.getTickLineCoord(entry);
var textAnchor = _this2.getTickTextAnchor(entry);
var tickProps = _extends({
textAnchor: textAnchor
}, axisProps, {
stroke: 'none', fill: stroke
}, customTickProps, {
index: i, payload: entry,
x: lineCoord.x2, y: lineCoord.y2
});
return _react2.default.createElement(
'g',
{ className: 'recharts-polar-angle-axis-tick', key: 'tick-' + i },
tickLine && _react2.default.createElement('line', _extends({
className: 'recharts-polar-angle-axis-tick-line'
}, tickLineProps, lineCoord)),
tick && _this2.renderTickItem(tick, tickProps, tickFormatter ? tickFormatter(entry.value) : entry.value)
);
});
return _react2.default.createElement(
'g',
{ className: 'recharts-polar-angle-axis-ticks' },
items
);
}
}, {
key: 'render',
value: function render() {
var _props4 = this.props;
var ticks = _props4.ticks;
var radius = _props4.radius;
var axisLine = _props4.axisLine;
var tickLine = _props4.tickLine;
if (radius <= 0 || !ticks || !ticks.length) {
return null;
}
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-polar-angle-axis' },
axisLine && this.renderAxisLine(),
this.renderTicks()
);
}
}]);
return PolarAngleAxis;
}(_react.Component), _class2.displayName = 'PolarAngleAxis', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, {
dataKey: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
cx: _react.PropTypes.number,
cy: _react.PropTypes.number,
radius: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
hide: _react.PropTypes.bool,
axisLine: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.object]),
axisLineType: _react.PropTypes.oneOf(['polygon', 'circle']),
tickLine: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.object]),
tick: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.func, _react.PropTypes.object, _react.PropTypes.element]),
ticks: _react.PropTypes.arrayOf(_react.PropTypes.shape({
value: _react.PropTypes.any,
angle: _react.PropTypes.number
})),
stroke: _react.PropTypes.string,
orientation: _react.PropTypes.oneOf(['inner', 'outer']),
tickFormatter: _react.PropTypes.func
}), _class2.defaultProps = {
cx: 0,
cy: 0,
orientation: 'outer',
fill: '#666',
stroke: '#ccc',
axisLine: true,
tickLine: true,
tick: true,
hide: false
}, _temp)) || _class;
exports.default = PolarAngleAxis;
/***/ },
/* 230 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isNumber2 = __webpack_require__(47);
var _isNumber3 = _interopRequireDefault(_isNumber2);
var _isPlainObject2 = __webpack_require__(52);
var _isPlainObject3 = _interopRequireDefault(_isPlainObject2);
var _isFunction2 = __webpack_require__(49);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Render sectors of a pie
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
var _Sector = __webpack_require__(217);
var _Sector2 = _interopRequireDefault(_Sector);
var _Curve = __webpack_require__(219);
var _Curve2 = _interopRequireDefault(_Curve);
var _reactSmooth = __webpack_require__(137);
var _reactSmooth2 = _interopRequireDefault(_reactSmooth);
var _ReactUtils = __webpack_require__(133);
var _PolarUtils = __webpack_require__(218);
var _AnimationDecorator = __webpack_require__(231);
var _AnimationDecorator2 = _interopRequireDefault(_AnimationDecorator);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Pie = (0, _AnimationDecorator2.default)(_class = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(Pie, _Component);
function Pie(props, ctx) {
_classCallCheck(this, Pie);
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Pie).call(this, props, ctx));
_this.handleAnimationEnd = function () {
_this.setState({
isAnimationFinished: true
});
};
_this.state = {
isAnimationFinished: false
};
if (!_this.id) {
_this.id = 'clipPath' + Date.now();
}
return _this;
}
_createClass(Pie, [{
key: 'getDeltaAngle',
value: function getDeltaAngle() {
var _props = this.props;
var startAngle = _props.startAngle;
var endAngle = _props.endAngle;
var sign = Math.sign(endAngle - startAngle);
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 360);
return sign * deltaAngle;
}
}, {
key: 'getSectors',
value: function getSectors(data) {
var _props2 = this.props;
var cx = _props2.cx;
var cy = _props2.cy;
var innerRadius = _props2.innerRadius;
var outerRadius = _props2.outerRadius;
var startAngle = _props2.startAngle;
var paddingAngle = _props2.paddingAngle;
var minAngle = _props2.minAngle;
var endAngle = _props2.endAngle;
var nameKey = _props2.nameKey;
var valueKey = _props2.valueKey;
var len = data.length;
var deltaAngle = this.getDeltaAngle();
var absDeltaAngle = Math.abs(deltaAngle);
var totalPadingAngle = (absDeltaAngle >= 360 ? len : len - 1) * paddingAngle;
var sum = data.reduce(function (result, entry) {
return result + entry[valueKey];
}, 0);
var sectors = [];
var prev = void 0;
if (sum > 0) {
sectors = data.map(function (entry, i) {
var percent = entry[valueKey] / sum;
var tempStartAngle = void 0;
if (i) {
tempStartAngle = (deltaAngle < 0 ? prev.endAngle : prev.startAngle) + Math.sign(deltaAngle) * paddingAngle;
} else {
tempStartAngle = startAngle;
}
var tempEndAngle = tempStartAngle + Math.sign(deltaAngle) * (minAngle + percent * (absDeltaAngle - len * minAngle - totalPadingAngle));
prev = _extends({
percent: percent
}, entry, {
cx: cx,
cy: cy,
innerRadius: innerRadius,
outerRadius: outerRadius,
name: entry[nameKey],
value: entry[valueKey],
startAngle: deltaAngle < 0 ? tempStartAngle : tempEndAngle,
endAngle: deltaAngle < 0 ? tempEndAngle : tempStartAngle,
payload: entry,
midAngle: (tempStartAngle + tempEndAngle) / 2
});
return prev;
});
}
return sectors;
}
}, {
key: 'getTextAnchor',
value: function getTextAnchor(x, cx) {
if (x > cx) {
return 'start';
} else if (x < cx) {
return 'end';
}
return 'middle';
}
}, {
key: 'isActiveIndex',
value: function isActiveIndex(i) {
var activeIndex = this.props.activeIndex;
if (Array.isArray(activeIndex)) {
return activeIndex.indexOf(i) !== -1;
}
return i === activeIndex;
}
}, {
key: 'renderClipPath',
value: function renderClipPath() {
var _props3 = this.props;
var cx = _props3.cx;
var cy = _props3.cy;
var maxRadius = _props3.maxRadius;
var startAngle = _props3.startAngle;
var isAnimationActive = _props3.isAnimationActive;
var animationDuration = _props3.animationDuration;
var animationEasing = _props3.animationEasing;
var animationBegin = _props3.animationBegin;
var animationId = _props3.animationId;
return _react2.default.createElement(
'defs',
null,
_react2.default.createElement(
'clipPath',
{ id: this.id },
_react2.default.createElement(
_reactSmooth2.default,
{
easing: animationEasing,
isActive: isAnimationActive,
duration: animationDuration,
key: animationId,
animationBegin: animationBegin,
onAnimationEnd: this.handleAnimationEnd,
from: {
endAngle: startAngle
},
to: {
outerRadius: Math.max(this.props.outerRadius, maxRadius || 0),
innerRadius: 0,
endAngle: this.props.endAngle
}
},
function (_ref) {
var outerRadius = _ref.outerRadius;
var innerRadius = _ref.innerRadius;
var endAngle = _ref.endAngle;
return _react2.default.createElement(_Sector2.default, {
cx: cx,
cy: cy,
outerRadius: outerRadius,
innerRadius: innerRadius,
startAngle: startAngle,
endAngle: endAngle
});
}
)
)
);
}
}, {
key: 'renderLabelLineItem',
value: function renderLabelLineItem(option, props) {
if (_react2.default.isValidElement(option)) {
return _react2.default.cloneElement(option, props);
} else if ((0, _isFunction3.default)(option)) {
return option(props);
}
return _react2.default.createElement(_Curve2.default, _extends({}, props, { type: 'linear', className: 'recharts-pie-label-line' }));
}
}, {
key: 'renderLabelItem',
value: function renderLabelItem(option, props, value) {
if (_react2.default.isValidElement(option)) {
return _react2.default.cloneElement(option, props);
} else if ((0, _isFunction3.default)(option)) {
return option(props);
}
return _react2.default.createElement(
'text',
_extends({}, (0, _ReactUtils.getPresentationAttributes)(props), {
alignmentBaseline: 'middle',
className: 'recharts-pie-label-text'
}),
value
);
}
}, {
key: 'renderLabels',
value: function renderLabels(sectors) {
var _this2 = this;
var isAnimationActive = this.props.isAnimationActive;
if (isAnimationActive && !this.state.isAnimationFinished) {
return null;
}
var _props4 = this.props;
var label = _props4.label;
var labelLine = _props4.labelLine;
var valueKey = _props4.valueKey;
var pieProps = (0, _ReactUtils.getPresentationAttributes)(this.props);
var customLabelProps = (0, _ReactUtils.getPresentationAttributes)(label);
var customLabelLineProps = (0, _ReactUtils.getPresentationAttributes)(labelLine);
var offsetRadius = label && label.offsetRadius || 20;
var labels = sectors.map(function (entry, i) {
var midAngle = (entry.startAngle + entry.endAngle) / 2;
var endPoint = (0, _PolarUtils.polarToCartesian)(entry.cx, entry.cy, entry.outerRadius + offsetRadius, midAngle);
var labelProps = _extends({}, pieProps, entry, {
stroke: 'none'
}, customLabelProps, {
index: i,
textAnchor: _this2.getTextAnchor(endPoint.x, entry.cx)
}, endPoint);
var lineProps = _extends({}, pieProps, entry, {
fill: 'none',
stroke: entry.fill
}, customLabelLineProps, {
points: [(0, _PolarUtils.polarToCartesian)(entry.cx, entry.cy, entry.outerRadius, midAngle), endPoint]
});
return _react2.default.createElement(
_Layer2.default,
{ key: 'label-' + i },
labelLine && _this2.renderLabelLineItem(labelLine, lineProps),
_this2.renderLabelItem(label, labelProps, entry[valueKey])
);
});
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-pie-labels' },
labels
);
}
}, {
key: 'renderSectorItem',
value: function renderSectorItem(option, props) {
if (_react2.default.isValidElement(option)) {
return _react2.default.cloneElement(option, props);
} else if ((0, _isFunction3.default)(option)) {
return option(props);
} else if ((0, _isPlainObject3.default)(option)) {
return _react2.default.createElement(_Sector2.default, _extends({}, props, option));
}
return _react2.default.createElement(_Sector2.default, props);
}
}, {
key: 'renderSectors',
value: function renderSectors(sectors) {
var _this3 = this;
var activeShape = this.props.activeShape;
return sectors.map(function (entry, i) {
return _react2.default.createElement(
_Layer2.default,
_extends({
className: 'recharts-pie-sector'
}, (0, _ReactUtils.filterEventsOfChild)(_this3.props, entry, i), {
key: 'sector-' + i
}),
_this3.renderSectorItem(_this3.isActiveIndex(i) ? activeShape : null, entry)
);
});
}
}, {
key: 'render',
value: function render() {
var _props5 = this.props;
var data = _props5.data;
var composedData = _props5.composedData;
var className = _props5.className;
var label = _props5.label;
var cx = _props5.cx;
var cy = _props5.cy;
var innerRadius = _props5.innerRadius;
var outerRadius = _props5.outerRadius;
var pieData = composedData || data;
if (!pieData || !pieData.length || !(0, _isNumber3.default)(cx) || !(0, _isNumber3.default)(cy) || !(0, _isNumber3.default)(innerRadius) || !(0, _isNumber3.default)(outerRadius)) {
return null;
}
var sectors = this.getSectors(pieData);
var layerClass = (0, _classnames2.default)('recharts-pie', className);
return _react2.default.createElement(
_Layer2.default,
{ className: layerClass },
this.renderClipPath(),
_react2.default.createElement(
'g',
{ clipPath: 'url(#' + this.id + ')' },
this.renderSectors(sectors)
),
label && this.renderLabels(sectors)
);
}
}]);
return Pie;
}(_react.Component), _class2.displayName = 'Pie', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, {
className: _react.PropTypes.string,
cx: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
cy: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
startAngle: _react.PropTypes.number,
endAngle: _react.PropTypes.number,
paddingAngle: _react.PropTypes.number,
innerRadius: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
outerRadius: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
nameKey: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
valueKey: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
data: _react.PropTypes.arrayOf(_react.PropTypes.object),
composedData: _react.PropTypes.arrayOf(_react.PropTypes.object),
minAngle: _react.PropTypes.number,
legendType: _react.PropTypes.string,
maxRadius: _react.PropTypes.number,
labelLine: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.func, _react.PropTypes.element, _react.PropTypes.bool]),
label: _react.PropTypes.oneOfType([_react.PropTypes.shape({
offsetRadius: _react.PropTypes.number
}), _react.PropTypes.func, _react.PropTypes.element, _react.PropTypes.bool]),
activeShape: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.func, _react.PropTypes.element]),
activeIndex: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.arrayOf(_react.PropTypes.number)]),
onMouseEnter: _react.PropTypes.func,
onMouseLeave: _react.PropTypes.func,
onClick: _react.PropTypes.func,
isAnimationActive: _react.PropTypes.bool,
animationBegin: _react.PropTypes.number,
animationDuration: _react.PropTypes.number,
animationEasing: _react.PropTypes.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'spring', 'linear'])
}), _class2.defaultProps = {
stroke: '#fff',
fill: '#808080',
legendType: 'rect',
// The abscissa of pole
cx: '50%',
// The ordinate of pole
cy: '50%',
// The start angle of first sector
startAngle: 0,
// The direction of drawing sectors
endAngle: 360,
// The inner radius of sectors
innerRadius: 0,
// The outer radius of sectors
outerRadius: '80%',
paddingAngle: 0,
nameKey: 'name',
valueKey: 'value',
labelLine: true,
data: [],
minAngle: 0,
animationId: _react.PropTypes.number,
isAnimationActive: true,
animationBegin: 400,
animationDuration: 1500,
animationEasing: 'ease'
}, _temp)) || _class) || _class;
exports.default = Pie;
/***/ },
/* 231 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
exports.default = function (WrappedComponent) {
var _class, _temp2;
var AniamtionDecorator = (_temp2 = _class = function (_Component) {
_inherits(AniamtionDecorator, _Component);
function AniamtionDecorator() {
var _Object$getPrototypeO;
var _temp, _this, _ret;
_classCallCheck(this, AniamtionDecorator);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(AniamtionDecorator)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = {
animationId: 0
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(AniamtionDecorator, [{
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
var animationId = this.state.animationId;
if (this.props.data !== nextProps.data) {
this.setState({
animationId: animationId + 1
});
}
}
}, {
key: 'render',
value: function render() {
return _react2.default.createElement(WrappedComponent, _extends({}, this.props, { animationId: this.state.animationId }));
}
}]);
return AniamtionDecorator;
}(_react.Component), _class.displayName = 'AniamtionDecorator(' + (0, _ReactUtils.getDisplayName)(WrappedComponent) + ')', _class.propTypes = _extends({}, WrappedComponent.propTypes, {
data: _react.PropTypes.array
}), _class.WrappedComponent = WrappedComponent, _class.defaultProps = WrappedComponent.defaultProps, _temp2);
return AniamtionDecorator;
};
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _ReactUtils = __webpack_require__(133);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/***/ },
/* 232 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isFunction2 = __webpack_require__(49);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp2; /**
* @fileOverview Radar
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _ReactUtils = __webpack_require__(133);
var _Polygon = __webpack_require__(221);
var _Polygon2 = _interopRequireDefault(_Polygon);
var _Dot = __webpack_require__(222);
var _Dot2 = _interopRequireDefault(_Dot);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
var _reactSmooth = __webpack_require__(137);
var _reactSmooth2 = _interopRequireDefault(_reactSmooth);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Radar = (0, _PureRender2.default)(_class = (_temp2 = _class2 = function (_Component) {
_inherits(Radar, _Component);
function Radar() {
var _Object$getPrototypeO;
var _temp, _this, _ret;
_classCallCheck(this, Radar);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Radar)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.handleMouseEnter = function (e) {
var onMouseEnter = _this.props.onMouseEnter;
if (onMouseEnter) {
onMouseEnter(_this.props, e);
}
}, _this.handleMouseLeave = function (e) {
var onMouseLeave = _this.props.onMouseLeave;
if (onMouseLeave) {
onMouseLeave(_this.props, e);
}
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Radar, [{
key: 'renderPolygon',
value: function renderPolygon() {
var _props = this.props;
var shape = _props.shape;
var points = _props.points;
var animationDuration = _props.animationDuration;
var animationEasing = _props.animationEasing;
var animationBegin = _props.animationBegin;
var isAnimationActive = _props.isAnimationActive;
var animationId = _props.animationId;
var dataKey = _props.dataKey;
var className = _props.className;
var others = _objectWithoutProperties(_props, ['shape', 'points', 'animationDuration', 'animationEasing', 'animationBegin', 'isAnimationActive', 'animationId', 'dataKey', 'className']);
if (_react2.default.isValidElement(shape)) {
return _react2.default.cloneElement(shape, _extends({}, others, { points: points }));
} else if ((0, _isFunction3.default)(shape)) {
return shape(this.props);
}
var point = points[0];
var transformPoints = points.map(function (p) {
return { x: p.x - point.cx, y: p.y - point.cy };
});
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-radar-polygon', transform: 'translate(' + point.cx + ', ' + point.cy + ')' },
_react2.default.createElement(
_reactSmooth2.default,
{
from: 'scale(0)',
to: 'scale(1)',
attributeName: 'transform',
isActive: isAnimationActive,
begin: animationBegin,
easing: animationEasing,
duration: animationDuration,
key: animationId
},
_react2.default.createElement(_Polygon2.default, _extends({
onMouseEnter: this.handleMouseEnter,
onMouseLeave: this.handleMouseLeave
}, (0, _ReactUtils.getPresentationAttributes)(this.props), {
points: transformPoints
}))
)
);
}
}, {
key: 'renderLabelItem',
value: function renderLabelItem(option, props, value) {
var labelItem = void 0;
if (_react2.default.isValidElement(option)) {
labelItem = _react2.default.cloneElement(option, props);
} else if ((0, _isFunction3.default)(option)) {
labelItem = option(props);
} else {
labelItem = _react2.default.createElement(
'text',
_extends({
key: props.key
}, (0, _ReactUtils.getPresentationAttributes)(props), {
className: 'recharts-radar-label'
}),
value
);
}
return labelItem;
}
}, {
key: 'renderLabels',
value: function renderLabels() {
var _this2 = this;
var _props2 = this.props;
var points = _props2.points;
var label = _props2.label;
var baseProps = (0, _ReactUtils.getPresentationAttributes)(this.props);
var customLabelProps = (0, _ReactUtils.getPresentationAttributes)(label);
var labels = points.map(function (entry, i) {
var labelProps = _extends({
textAnchor: 'middle'
}, baseProps, {
stroke: 'none',
fill: baseProps && baseProps.stroke || '#666'
}, customLabelProps, entry, {
index: i,
key: 'label-' + i,
payload: entry
});
return _this2.renderLabelItem(label, labelProps, entry.value);
});
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-radar-labels' },
labels
);
}
}, {
key: 'renderDotItem',
value: function renderDotItem(option, props) {
var dotItem = void 0;
if (_react2.default.isValidElement(option)) {
dotItem = _react2.default.cloneElement(option, props);
} else if ((0, _isFunction3.default)(option)) {
dotItem = option(props);
} else {
dotItem = _react2.default.createElement(_Dot2.default, _extends({}, props, { className: 'recharts-radar-dot' }));
}
return dotItem;
}
}, {
key: 'renderDots',
value: function renderDots() {
var _this3 = this;
var _props3 = this.props;
var dot = _props3.dot;
var points = _props3.points;
var baseProps = (0, _ReactUtils.getPresentationAttributes)(this.props);
var customDotProps = (0, _ReactUtils.getPresentationAttributes)(dot);
var dots = points.map(function (entry, i) {
var dotProps = _extends({
key: 'dot-' + i,
r: 3
}, baseProps, customDotProps, {
cx: entry.x,
cy: entry.y,
index: i,
playload: entry
});
return _this3.renderDotItem(dot, dotProps);
});
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-radar-dots' },
dots
);
}
}, {
key: 'render',
value: function render() {
var _props4 = this.props;
var className = _props4.className;
var points = _props4.points;
var label = _props4.label;
var dot = _props4.dot;
if (!points || !points.length) {
return null;
}
var layerClass = (0, _classnames2.default)('recharts-radar', className);
var transformOrigin = 'center center';
return _react2.default.createElement(
_Layer2.default,
{ className: layerClass },
this.renderPolygon(),
label && this.renderLabels(),
dot && this.renderDots()
);
}
}]);
return Radar;
}(_react.Component), _class2.displayName = 'Radar', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, {
className: _react.PropTypes.string,
dataKey: _react.PropTypes.string.isRequired,
points: _react.PropTypes.arrayOf(_react.PropTypes.shape({
x: _react.PropTypes.number,
y: _react.PropTypes.number,
cx: _react.PropTypes.number,
cy: _react.PropTypes.number,
angle: _react.PropTypes.number,
radius: _react.PropTypes.number,
value: _react.PropTypes.number,
payload: _react.PropTypes.object
})),
shape: _react.PropTypes.oneOfType([_react.PropTypes.element, _react.PropTypes.func]),
dot: _react.PropTypes.oneOfType([_react.PropTypes.element, _react.PropTypes.func, _react.PropTypes.object, _react.PropTypes.bool]),
label: _react.PropTypes.oneOfType([_react.PropTypes.element, _react.PropTypes.func, _react.PropTypes.object, _react.PropTypes.bool]),
onMouseEnter: _react.PropTypes.func,
onMouseLeave: _react.PropTypes.func,
isAnimationActive: _react.PropTypes.bool,
animationId: _react.PropTypes.number,
animationBegin: _react.PropTypes.number,
animationDuration: _react.PropTypes.number,
animationEasing: _react.PropTypes.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear'])
}), _class2.defaultProps = {
dot: false,
label: false,
isAnimationActive: true,
animationBegin: 0,
animationDuration: 1500,
animationEasing: 'ease'
}, _temp2)) || _class;
exports.default = Radar;
/***/ },
/* 233 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _uniqueId2 = __webpack_require__(234);
var _uniqueId3 = _interopRequireDefault(_uniqueId2);
var _isFunction2 = __webpack_require__(49);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp2; /**
* @fileOverview Render a group of radial bar
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _Sector = __webpack_require__(217);
var _Sector2 = _interopRequireDefault(_Sector);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
var _DOMUtils = __webpack_require__(134);
var _ReactUtils = __webpack_require__(133);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _PolarUtils = __webpack_require__(218);
var _reactSmooth = __webpack_require__(137);
var _reactSmooth2 = _interopRequireDefault(_reactSmooth);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var RADIAN = Math.PI / 180;
var RadialBar = (0, _PureRender2.default)(_class = (_temp2 = _class2 = function (_Component) {
_inherits(RadialBar, _Component);
function RadialBar() {
var _Object$getPrototypeO;
var _temp, _this, _ret;
_classCallCheck(this, RadialBar);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(RadialBar)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = {
isAnimationFinished: false
}, _this.handleAnimationEnd = function () {
_this.setState({ isAnimationFinished: true });
}, _this.handleAnimationStart = function () {
_this.setState({ isAnimationFinished: false });
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(RadialBar, [{
key: 'getDeltaAngle',
value: function getDeltaAngle() {
var _props = this.props;
var startAngle = _props.startAngle;
var endAngle = _props.endAngle;
var sign = Math.sign(endAngle - startAngle);
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 360);
return sign * deltaAngle;
}
}, {
key: 'getSectors',
value: function getSectors() {
var _props2 = this.props;
var cx = _props2.cx;
var cy = _props2.cy;
var startAngle = _props2.startAngle;
var endAngle = _props2.endAngle;
var data = _props2.data;
var minAngle = _props2.minAngle;
var maxAngle = _props2.maxAngle;
var maxValue = Math.max.apply(null, data.map(function (entry) {
return Math.abs(entry.value);
}));
var absMinAngle = Math.abs(minAngle);
var absMaxAngle = Math.abs(maxAngle);
var deltaAngle = this.getDeltaAngle();
var gapAngle = Math.min(Math.abs(absMaxAngle - absMinAngle), 360);
var sectors = data.map(function (entry) {
var value = entry.value;
var tempEndAngle = maxValue === 0 ? startAngle : startAngle + Math.sign(value * deltaAngle) * (absMinAngle + gapAngle * Math.abs(entry.value) / maxValue);
return _extends({}, entry, {
cx: cx, cy: cy,
startAngle: startAngle,
endAngle: tempEndAngle,
payload: entry
});
});
return sectors;
}
}, {
key: 'getLabelPathArc',
value: function getLabelPathArc(data, labelContent, style) {
var label = this.props.label;
var labelProps = _react2.default.isValidElement(label) ? label.props : label;
var offsetRadius = labelProps.offsetRadius || 2;
var orientation = labelProps.orientation || 'inner';
var cx = data.cx;
var cy = data.cy;
var innerRadius = data.innerRadius;
var outerRadius = data.outerRadius;
var startAngle = data.startAngle;
var endAngle = data.endAngle;
var clockWise = this.getDeltaAngle() < 0 && data.value > 0;
var radius = clockWise ? innerRadius + offsetRadius : Math.max(outerRadius - offsetRadius, 0);
if (radius <= 0) {
return '';
}
var labelSize = (0, _DOMUtils.getStringSize)(labelContent, style);
var deltaAngle = labelSize.width / (radius * RADIAN);
var tempStartAngle = void 0;
var tempEndAngle = void 0;
if (clockWise) {
tempStartAngle = orientation === 'inner' ? Math.min(endAngle + deltaAngle, startAngle) : endAngle;
tempEndAngle = tempStartAngle - deltaAngle;
} else {
tempStartAngle = orientation === 'inner' ? Math.max(endAngle - deltaAngle, startAngle) : endAngle;
tempEndAngle = tempStartAngle + deltaAngle;
}
var startPoint = (0, _PolarUtils.polarToCartesian)(cx, cy, radius, tempStartAngle);
var endPoint = (0, _PolarUtils.polarToCartesian)(cx, cy, radius, tempEndAngle);
return 'M' + startPoint.x + ',' + startPoint.y + '\n A' + radius + ',' + radius + ',0,\n ' + (deltaAngle >= 180 ? 1 : 0) + ',\n ' + (clockWise ? 1 : 0) + ',\n ' + endPoint.x + ',' + endPoint.y;
}
}, {
key: 'renderSectorShape',
value: function renderSectorShape(shape, props) {
var sectorShape = void 0;
if (_react2.default.isValidElement(shape)) {
sectorShape = _react2.default.cloneElement(shape, props);
} else if ((0, _isFunction3.default)(shape)) {
sectorShape = shape(props);
} else {
sectorShape = _react2.default.createElement(_Sector2.default, props);
}
return sectorShape;
}
}, {
key: 'renderSectors',
value: function renderSectors(sectors) {
var _this2 = this;
var _props3 = this.props;
var className = _props3.className;
var shape = _props3.shape;
var activeShape = _props3.activeShape;
var activeIndex = _props3.activeIndex;
var data = _props3.data;
var _props4 = this.props;
var animationEasing = _props4.animationEasing;
var animationDuration = _props4.animationDuration;
var animationBegin = _props4.animationBegin;
var isAnimationActive = _props4.isAnimationActive;
var baseProps = (0, _ReactUtils.getPresentationAttributes)(this.props);
return sectors.map(function (entry, i) {
var startAngle = entry.startAngle;
var endAngle = entry.endAngle;
return _react2.default.createElement(
_reactSmooth2.default,
{
from: { angle: startAngle },
to: { angle: endAngle },
begin: animationBegin,
isActive: isAnimationActive,
duration: animationDuration,
easing: animationEasing,
shouldReAnimate: true,
key: 'aniamte-' + i,
onAnimationStart: _this2.handleAnimationStart,
onAnimationEnd: _this2.handleAnimationEnd
},
function (_ref) {
var angle = _ref.angle;
var props = _extends({}, baseProps, entry, (0, _ReactUtils.filterEventsOfChild)(_this2.props, entry, i), {
endAngle: angle,
key: 'sector-' + i,
className: 'recharts-radial-bar-sector'
});
return _this2.renderSectorShape(i === activeIndex ? activeShape : shape, props);
}
);
});
}
}, {
key: 'renderBackground',
value: function renderBackground(sectors) {
var _this3 = this;
var _props5 = this.props;
var startAngle = _props5.startAngle;
var endAngle = _props5.endAngle;
var background = _props5.background;
var backgroundProps = (0, _ReactUtils.getPresentationAttributes)(background);
return sectors.map(function (entry, i) {
var value = entry.value;
var rest = _objectWithoutProperties(entry, ['value']);
var props = _extends({}, rest, {
fill: '#eee'
}, backgroundProps, {
startAngle: startAngle,
endAngle: endAngle,
index: i,
key: 'sector-' + i,
className: 'recharts-radial-bar-background-sector'
});
return _this3.renderSectorShape(background, props);
});
}
}, {
key: 'renderLabels',
value: function renderLabels(sectors) {
var _this4 = this;
var isAnimationActive = this.props.isAnimationActive;
if (isAnimationActive && !this.state.isAnimationFinished) {
return null;
}
var label = this.props.label;
var isElement = _react2.default.isValidElement(label);
var formatter = isElement ? label.props.formatter : label.formatter;
var hasFormatter = (0, _isFunction3.default)(formatter);
return sectors.map(function (entry, i) {
var content = hasFormatter ? formatter(entry.value) : entry.value;
var id = (0, _uniqueId3.default)('recharts-defs-');
var style = (0, _ReactUtils.getPresentationAttributes)(label) || { fontSize: 10, fill: '#000' };
var path = _this4.getLabelPathArc(entry, content, style);
return _react2.default.createElement(
'text',
_extends({}, style, { key: 'label-' + i, className: 'recharts-radial-bar-label' }),
_react2.default.createElement(
'defs',
null,
_react2.default.createElement('path', { id: id, d: path })
),
_react2.default.createElement(
'textPath',
{ xlinkHref: '#' + id },
content
)
);
});
}
}, {
key: 'render',
value: function render() {
var _props6 = this.props;
var data = _props6.data;
var className = _props6.className;
var background = _props6.background;
var label = _props6.label;
if (!data || !data.length) {
return null;
}
var sectors = this.getSectors();
var layerClass = (0, _classnames2.default)('recharts-area', className);
return _react2.default.createElement(
_Layer2.default,
{ className: layerClass },
background && _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-radial-bar-background' },
this.renderBackground(sectors)
),
_react2.default.createElement(
_Layer2.default,
{ className: 'recharts-radial-bar-sectors' },
this.renderSectors(sectors)
),
label && _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-radial-bar-labels' },
this.renderLabels(sectors)
)
);
}
}]);
return RadialBar;
}(_react.Component), _class2.displayName = 'RadialBar', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, {
className: _react.PropTypes.string,
shape: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.element]),
activeShape: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.func, _react.PropTypes.element]),
activeIndex: _react.PropTypes.number,
cx: _react.PropTypes.number,
cy: _react.PropTypes.number,
startAngle: _react.PropTypes.number,
endAngle: _react.PropTypes.number,
maxAngle: _react.PropTypes.number,
minAngle: _react.PropTypes.number,
data: _react.PropTypes.arrayOf(_react.PropTypes.shape({
cx: _react.PropTypes.number,
cy: _react.PropTypes.number,
innerRadius: _react.PropTypes.number,
outerRadius: _react.PropTypes.number,
value: _react.PropTypes.value
})),
legendType: _react.PropTypes.string,
label: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.func, _react.PropTypes.element, _react.PropTypes.object]),
background: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.func, _react.PropTypes.object, _react.PropTypes.element]),
onMouseEnter: _react.PropTypes.func,
onMouseLeave: _react.PropTypes.func,
onClick: _react.PropTypes.func,
isAnimationActive: _react.PropTypes.bool,
animationBegin: _react.PropTypes.number,
animationDuration: _react.PropTypes.number,
animationEasing: _react.PropTypes.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear', 'spring'])
}), _class2.defaultProps = {
startAngle: 180,
endAngle: 0,
maxAngle: 135,
minAngle: 0,
stroke: '#fff',
fill: '#808080',
legendType: 'rect',
data: [],
isAnimationActive: true,
animationBegin: 0,
animationDuration: 1500,
animationEasing: 'ease'
}, _temp2)) || _class;
exports.default = RadialBar;
/***/ },
/* 234 */
/***/ function(module, exports, __webpack_require__) {
var toString = __webpack_require__(184);
/** Used to generate unique IDs. */
var idCounter = 0;
/**
* Generates a unique ID. If `prefix` is given, the ID is appended to it.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {string} [prefix=''] The value to prefix the ID with.
* @returns {string} Returns the unique ID.
* @example
*
* _.uniqueId('contact_');
* // => 'contact_104'
*
* _.uniqueId();
* // => '105'
*/
function uniqueId(prefix) {
var id = ++idCounter;
return toString(prefix) + id;
}
module.exports = uniqueId;
/***/ },
/* 235 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _range2 = __webpack_require__(236);
var _range3 = _interopRequireDefault(_range2);
var _isFunction2 = __webpack_require__(49);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Brush
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _d3Scale = __webpack_require__(240);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Brush = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(Brush, _Component);
function Brush(props) {
_classCallCheck(this, Brush);
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Brush).call(this, props));
_this.handleMove = function (e) {
if (_this.leaveTimer) {
clearTimeout(_this.leaveTimer);
_this.leaveTimer = null;
}
if (_this.state.isTravellerMoving) {
_this.handleTravellerMove(e);
} else if (_this.state.isSlideMoving) {
_this.handleSlideMove(e);
}
};
_this.handleUp = function () {
_this.setState({
isTravellerMoving: false,
isSlideMoving: false
});
};
_this.handleLeaveWrapper = function () {
if (_this.state.isTravellerMoving || _this.state.isSlideMoving) {
_this.leaveTimer = setTimeout(_this.handleUp, 1000);
}
};
_this.handleEnterSlideOrTraveller = function () {
_this.setState({
isTextActive: true
});
};
_this.handleLeaveSlideOrTraveller = function () {
_this.setState({
isTextActive: false
});
};
_this.handleSlideDown = function (e) {
_this.setState({
isTravellerMoving: false,
isSlideMoving: true,
slideMoveStartX: e.pageX
});
};
_this.travellerDownHandlers = {
startX: _this.handleTravellerDown.bind(_this, 'startX'),
endX: _this.handleTravellerDown.bind(_this, 'endX')
};
if (props.data && props.data.length) {
_this.updateScale(props);
} else {
_this.state = {};
}
return _this;
}
_createClass(Brush, [{
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
var _this2 = this;
var _props = this.props;
var data = _props.data;
var width = _props.width;
var x = _props.x;
var travellerWidth = _props.travellerWidth;
if (nextProps.data !== data) {
this.updateScale(nextProps);
} else if (nextProps.width !== width || nextProps.x !== x || nextProps.travellerWidth !== travellerWidth) {
this.scale.range([nextProps.x, nextProps.x + nextProps.width - nextProps.travellerWidth]);
this.scaleValues = this.scale.domain().map(function (entry) {
return _this2.scale(entry);
});
this.setState({
startX: this.scale(nextProps.startIndex),
endX: this.scale(nextProps.endIndex)
});
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.scale = null;
this.scaleValues = null;
if (this.leaveTimer) {
clearTimeout(this.leaveTimer);
this.leaveTimer = null;
}
}
}, {
key: 'getIndexInRange',
value: function getIndexInRange(range, x) {
var len = range.length;
var start = 0;
var end = len - 1;
while (end - start > 1) {
var middle = Math.floor((start + end) / 2);
if (range[middle] > x) {
end = middle;
} else {
start = middle;
}
}
return x >= range[end] ? end : start;
}
}, {
key: 'getIndex',
value: function getIndex(_ref) {
var startX = _ref.startX;
var endX = _ref.endX;
var min = Math.min(startX, endX);
var max = Math.max(startX, endX);
var minIndex = this.getIndexInRange(this.scaleValues, min);
var maxIndex = this.getIndexInRange(this.scaleValues, max);
return {
startIndex: minIndex,
endIndex: maxIndex
};
}
}, {
key: 'getTextOfTick',
value: function getTextOfTick(index) {
var _props2 = this.props;
var data = _props2.data;
var tickFormatter = _props2.tickFormatter;
var dataKey = _props2.dataKey;
var text = data[index] && dataKey ? data[index][dataKey] : index;
return (0, _isFunction3.default)(tickFormatter) ? tickFormatter(text) : text;
}
}, {
key: 'handleSlideMove',
value: function handleSlideMove(e) {
var _state = this.state;
var slideMoveStartX = _state.slideMoveStartX;
var startX = _state.startX;
var endX = _state.endX;
var _props3 = this.props;
var x = _props3.x;
var width = _props3.width;
var travellerWidth = _props3.travellerWidth;
var onChange = _props3.onChange;
var delta = e.pageX - slideMoveStartX;
if (delta > 0) {
delta = Math.min(delta, x + width - travellerWidth - endX, x + width - travellerWidth - startX);
} else if (delta < 0) {
delta = Math.max(delta, x - startX, x - endX);
}
var newIndex = this.getIndex({
startX: startX + delta,
endX: endX + delta
});
this.setState({
startX: startX + delta,
endX: endX + delta,
slideMoveStartX: e.pageX
}, function () {
if (onChange) {
onChange(newIndex);
}
});
}
}, {
key: 'handleTravellerDown',
value: function handleTravellerDown(id, e) {
this.setState({
isSlideMoving: false,
isTravellerMoving: true,
movingTravellerId: id,
brushMoveStartX: e.pageX
});
}
}, {
key: 'handleTravellerMove',
value: function handleTravellerMove(e) {
var _setState;
var _state2 = this.state;
var brushMoveStartX = _state2.brushMoveStartX;
var movingTravellerId = _state2.movingTravellerId;
var prevValue = this.state[movingTravellerId];
var _props4 = this.props;
var x = _props4.x;
var width = _props4.width;
var travellerWidth = _props4.travellerWidth;
var onChange = _props4.onChange;
var params = { startX: this.state.startX, endX: this.state.endX };
var delta = e.pageX - brushMoveStartX;
if (delta > 0) {
delta = Math.min(delta, x + width - travellerWidth - prevValue);
} else if (delta < 0) {
delta = Math.max(delta, x - prevValue);
}
params[movingTravellerId] = prevValue + delta;
var newIndex = this.getIndex(params);
this.setState((_setState = {}, _defineProperty(_setState, movingTravellerId, prevValue + delta), _defineProperty(_setState, 'brushMoveStartX', e.pageX), _setState), function () {
if (onChange) {
onChange(newIndex);
}
});
}
}, {
key: 'updateScale',
value: function updateScale(props) {
var _this3 = this;
var data = props.data;
var startIndex = props.startIndex;
var endIndex = props.endIndex;
var x = props.x;
var width = props.width;
var travellerWidth = props.travellerWidth;
if (data && data.length) {
var len = data.length;
this.scale = (0, _d3Scale.scalePoint)().domain((0, _range3.default)(0, len)).range([x, x + width - travellerWidth]);
this.scaleValues = this.scale.domain().map(function (entry) {
return _this3.scale(entry);
});
this.state = {
isTextActive: false,
isSlideMoving: false,
isTravellerMoving: false,
startX: this.scale(startIndex),
endX: this.scale(endIndex)
};
}
}
}, {
key: 'renderBackground',
value: function renderBackground() {
var _props5 = this.props;
var x = _props5.x;
var y = _props5.y;
var width = _props5.width;
var height = _props5.height;
var fill = _props5.fill;
var stroke = _props5.stroke;
return _react2.default.createElement('rect', {
stroke: stroke,
fill: fill,
x: x,
y: y,
width: width,
height: height
});
}
}, {
key: 'renderTraveller',
value: function renderTraveller(startX, id) {
var _props6 = this.props;
var y = _props6.y;
var travellerWidth = _props6.travellerWidth;
var height = _props6.height;
var stroke = _props6.stroke;
var lineY = Math.floor(y + height / 2) - 1;
var x = Math.max(startX, this.props.x);
return _react2.default.createElement(
_Layer2.default,
{
className: 'recharts-brush-traveller',
onMouseEnter: this.handleEnterSlideOrTraveller,
onMouseLeave: this.handleLeaveSlideOrTraveller,
onMouseDown: this.travellerDownHandlers[id],
style: { cursor: 'col-resize' }
},
_react2.default.createElement('rect', {
x: x,
y: y,
width: travellerWidth,
height: height,
fill: stroke,
stroke: 'none'
}),
_react2.default.createElement('line', {
x1: x + 1,
y1: lineY,
x2: x + travellerWidth - 1,
y2: lineY,
fill: 'none',
stroke: '#fff'
}),
_react2.default.createElement('line', {
x1: x + 1,
y1: lineY + 2,
x2: x + travellerWidth - 1,
y2: lineY + 2,
fill: 'none',
stroke: '#fff'
})
);
}
}, {
key: 'renderSlide',
value: function renderSlide(startX, endX) {
var _props7 = this.props;
var y = _props7.y;
var height = _props7.height;
var stroke = _props7.stroke;
return _react2.default.createElement('rect', {
className: 'recharts-brush-slide',
onMouseEnter: this.handleEnterSlideOrTraveller,
onMouseLeave: this.handleLeaveSlideOrTraveller,
onMouseDown: this.handleSlideDown,
style: { cursor: 'move' },
stroke: 'none',
fill: stroke,
fillOpacity: 0.2,
x: Math.min(startX, endX),
y: y,
width: Math.abs(endX - startX),
height: height
});
}
}, {
key: 'renderText',
value: function renderText() {
var _props8 = this.props;
var startIndex = _props8.startIndex;
var endIndex = _props8.endIndex;
var data = _props8.data;
var y = _props8.y;
var height = _props8.height;
var travellerWidth = _props8.travellerWidth;
var stroke = _props8.stroke;
var tickFormatter = _props8.tickFormatter;
var _state3 = this.state;
var startX = _state3.startX;
var endX = _state3.endX;
var offset = 5;
var style = {
pointerEvents: 'none',
fill: stroke
};
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-brush-texts' },
_react2.default.createElement(
'text',
{
textAnchor: 'end',
style: style,
dy: offset,
x: Math.min(startX, endX) - offset,
y: y + height / 2
},
this.getTextOfTick(startIndex)
),
_react2.default.createElement(
'text',
{
textAnchor: 'start',
style: style,
dy: offset,
x: Math.max(startX, endX) + travellerWidth + offset,
y: y + height / 2
},
this.getTextOfTick(endIndex)
)
);
}
}, {
key: 'render',
value: function render() {
var _props9 = this.props;
var x = _props9.x;
var width = _props9.width;
var travellerWidth = _props9.travellerWidth;
var data = _props9.data;
var className = _props9.className;
var _state4 = this.state;
var startX = _state4.startX;
var endX = _state4.endX;
var isTextActive = _state4.isTextActive;
var isSlideMoving = _state4.isSlideMoving;
var isTravellerMoving = _state4.isTravellerMoving;
if (!data || !data.length) {
return null;
}
var layerClass = (0, _classnames2.default)('recharts-brush', className);
return _react2.default.createElement(
_Layer2.default,
{
className: layerClass,
onMouseUp: this.handleUp,
onMouseMove: this.handleMove,
onMouseLeave: this.handleLeaveWrapper
},
this.renderBackground(),
this.renderSlide(startX, endX),
this.renderTraveller(startX, 'startX'),
this.renderTraveller(endX, 'endX'),
(isTextActive || isSlideMoving || isTravellerMoving) && this.renderText()
);
}
}]);
return Brush;
}(_react.Component), _class2.displayName = 'Brush', _class2.propTypes = {
className: _react.PropTypes.string,
fill: _react.PropTypes.string,
stroke: _react.PropTypes.string,
x: _react.PropTypes.number.isRequired,
y: _react.PropTypes.number.isRequired,
width: _react.PropTypes.number.isRequired,
height: _react.PropTypes.number.isRequired,
travellerWidth: _react.PropTypes.number,
dataKey: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
data: _react.PropTypes.array,
startIndex: _react.PropTypes.number,
endIndex: _react.PropTypes.number,
tickFormatter: _react.PropTypes.func,
onChange: _react.PropTypes.func
}, _class2.defaultProps = {
x: 0,
y: 0,
width: 0,
height: 40,
travellerWidth: 5,
fill: '#fff',
stroke: '#666'
}, _temp)) || _class;
exports.default = Brush;
/***/ },
/* 236 */
/***/ function(module, exports, __webpack_require__) {
var createRange = __webpack_require__(237);
/**
* Creates an array of numbers (positive and/or negative) progressing from
* `start` up to, but not including, `end`. A step of `-1` is used if a negative
* `start` is specified without an `end` or `step`. If `end` is not specified,
* it's set to `start` with `start` then set to `0`.
*
* **Note:** JavaScript follows the IEEE-754 standard for resolving
* floating-point values which can produce unexpected results.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {number} [start=0] The start of the range.
* @param {number} end The end of the range.
* @param {number} [step=1] The value to increment or decrement by.
* @returns {Array} Returns the range of numbers.
* @see _.inRange, _.rangeRight
* @example
*
* _.range(4);
* // => [0, 1, 2, 3]
*
* _.range(-4);
* // => [0, -1, -2, -3]
*
* _.range(1, 5);
* // => [1, 2, 3, 4]
*
* _.range(0, 20, 5);
* // => [0, 5, 10, 15]
*
* _.range(0, -4, -1);
* // => [0, -1, -2, -3]
*
* _.range(1, 4, 0);
* // => [1, 1, 1]
*
* _.range(0);
* // => []
*/
var range = createRange();
module.exports = range;
/***/ },
/* 237 */
/***/ function(module, exports, __webpack_require__) {
var baseRange = __webpack_require__(238),
isIterateeCall = __webpack_require__(239),
toNumber = __webpack_require__(161);
/**
* Creates a `_.range` or `_.rangeRight` function.
*
* @private
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Function} Returns the new range function.
*/
function createRange(fromRight) {
return function(start, end, step) {
if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
end = step = undefined;
}
// Ensure the sign of `-0` is preserved.
start = toNumber(start);
start = start === start ? start : 0;
if (end === undefined) {
end = start;
start = 0;
} else {
end = toNumber(end) || 0;
}
step = step === undefined ? (start < end ? 1 : -1) : (toNumber(step) || 0);
return baseRange(start, end, step, fromRight);
};
}
module.exports = createRange;
/***/ },
/* 238 */
/***/ function(module, exports) {
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeCeil = Math.ceil,
nativeMax = Math.max;
/**
* The base implementation of `_.range` and `_.rangeRight` which doesn't
* coerce arguments to numbers.
*
* @private
* @param {number} start The start of the range.
* @param {number} end The end of the range.
* @param {number} step The value to increment or decrement by.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Array} Returns the range of numbers.
*/
function baseRange(start, end, step, fromRight) {
var index = -1,
length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
result = Array(length);
while (length--) {
result[fromRight ? length : ++index] = start;
start += step;
}
return result;
}
module.exports = baseRange;
/***/ },
/* 239 */
/***/ function(module, exports, __webpack_require__) {
var eq = __webpack_require__(63),
isArrayLike = __webpack_require__(114),
isIndex = __webpack_require__(120),
isObject = __webpack_require__(50);
/**
* Checks if the given arguments are from an iteratee call.
*
* @private
* @param {*} value The potential iteratee value argument.
* @param {*} index The potential iteratee index or key argument.
* @param {*} object The potential iteratee object argument.
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
* else `false`.
*/
function isIterateeCall(value, index, object) {
if (!isObject(object)) {
return false;
}
var type = typeof index;
if (type == 'number'
? (isArrayLike(object) && isIndex(index, object.length))
: (type == 'string' && index in object)
) {
return eq(object[index], value);
}
return false;
}
module.exports = isIterateeCall;
/***/ },
/* 240 */
/***/ function(module, exports, __webpack_require__) {
// https://d3js.org/d3-scale/ Version 1.0.0. Copyright 2016 Mike Bostock.
(function (global, factory) {
true ? factory(exports, __webpack_require__(241), __webpack_require__(242), __webpack_require__(243), __webpack_require__(245), __webpack_require__(246), __webpack_require__(247), __webpack_require__(244)) :
typeof define === 'function' && define.amd ? define(['exports', 'd3-array', 'd3-collection', 'd3-interpolate', 'd3-format', 'd3-time', 'd3-time-format', 'd3-color'], factory) :
(factory((global.d3 = global.d3 || {}),global.d3,global.d3,global.d3,global.d3,global.d3,global.d3,global.d3));
}(this, function (exports,d3Array,d3Collection,d3Interpolate,d3Format,d3Time,d3TimeFormat,d3Color) { 'use strict';
var array = Array.prototype;
var map$1 = array.map;
var slice = array.slice;
var implicit = {name: "implicit"};
function ordinal(range) {
var index = d3Collection.map(),
domain = [],
unknown = implicit;
range = range == null ? [] : slice.call(range);
function scale(d) {
var key = d + "", i = index.get(key);
if (!i) {
if (unknown !== implicit) return unknown;
index.set(key, i = domain.push(d));
}
return range[(i - 1) % range.length];
}
scale.domain = function(_) {
if (!arguments.length) return domain.slice();
domain = [], index = d3Collection.map();
var i = -1, n = _.length, d, key;
while (++i < n) if (!index.has(key = (d = _[i]) + "")) index.set(key, domain.push(d));
return scale;
};
scale.range = function(_) {
return arguments.length ? (range = slice.call(_), scale) : range.slice();
};
scale.unknown = function(_) {
return arguments.length ? (unknown = _, scale) : unknown;
};
scale.copy = function() {
return ordinal()
.domain(domain)
.range(range)
.unknown(unknown);
};
return scale;
}
function band() {
var scale = ordinal().unknown(undefined),
domain = scale.domain,
ordinalRange = scale.range,
range = [0, 1],
step,
bandwidth,
round = false,
paddingInner = 0,
paddingOuter = 0,
align = 0.5;
delete scale.unknown;
function rescale() {
var n = domain().length,
reverse = range[1] < range[0],
start = range[reverse - 0],
stop = range[1 - reverse];
step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);
if (round) step = Math.floor(step);
start += (stop - start - step * (n - paddingInner)) * align;
bandwidth = step * (1 - paddingInner);
if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);
var values = d3Array.range(n).map(function(i) { return start + step * i; });
return ordinalRange(reverse ? values.reverse() : values);
}
scale.domain = function(_) {
return arguments.length ? (domain(_), rescale()) : domain();
};
scale.range = function(_) {
return arguments.length ? (range = [+_[0], +_[1]], rescale()) : range.slice();
};
scale.rangeRound = function(_) {
return range = [+_[0], +_[1]], round = true, rescale();
};
scale.bandwidth = function() {
return bandwidth;
};
scale.step = function() {
return step;
};
scale.round = function(_) {
return arguments.length ? (round = !!_, rescale()) : round;
};
scale.padding = function(_) {
return arguments.length ? (paddingInner = paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingInner;
};
scale.paddingInner = function(_) {
return arguments.length ? (paddingInner = Math.max(0, Math.min(1, _)), rescale()) : paddingInner;
};
scale.paddingOuter = function(_) {
return arguments.length ? (paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingOuter;
};
scale.align = function(_) {
return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;
};
scale.copy = function() {
return band()
.domain(domain())
.range(range)
.round(round)
.paddingInner(paddingInner)
.paddingOuter(paddingOuter)
.align(align);
};
return rescale();
}
function pointish(scale) {
var copy = scale.copy;
scale.padding = scale.paddingOuter;
delete scale.paddingInner;
delete scale.paddingOuter;
scale.copy = function() {
return pointish(copy());
};
return scale;
}
function point() {
return pointish(band().paddingInner(1));
}
function constant(x) {
return function() {
return x;
};
}
function number(x) {
return +x;
}
var unit = [0, 1];
function deinterpolate(a, b) {
return (b -= (a = +a))
? function(x) { return (x - a) / b; }
: constant(b);
}
function deinterpolateClamp(deinterpolate) {
return function(a, b) {
var d = deinterpolate(a = +a, b = +b);
return function(x) { return x <= a ? 0 : x >= b ? 1 : d(x); };
};
}
function reinterpolateClamp(reinterpolate) {
return function(a, b) {
var r = reinterpolate(a = +a, b = +b);
return function(t) { return t <= 0 ? a : t >= 1 ? b : r(t); };
};
}
function bimap(domain, range, deinterpolate, reinterpolate) {
var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];
if (d1 < d0) d0 = deinterpolate(d1, d0), r0 = reinterpolate(r1, r0);
else d0 = deinterpolate(d0, d1), r0 = reinterpolate(r0, r1);
return function(x) { return r0(d0(x)); };
}
function polymap(domain, range, deinterpolate, reinterpolate) {
var j = Math.min(domain.length, range.length) - 1,
d = new Array(j),
r = new Array(j),
i = -1;
// Reverse descending domains.
if (domain[j] < domain[0]) {
domain = domain.slice().reverse();
range = range.slice().reverse();
}
while (++i < j) {
d[i] = deinterpolate(domain[i], domain[i + 1]);
r[i] = reinterpolate(range[i], range[i + 1]);
}
return function(x) {
var i = d3Array.bisect(domain, x, 1, j) - 1;
return r[i](d[i](x));
};
}
function copy(source, target) {
return target
.domain(source.domain())
.range(source.range())
.interpolate(source.interpolate())
.clamp(source.clamp());
}
// deinterpolate(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].
// reinterpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding domain value x in [a,b].
function continuous(deinterpolate$$, reinterpolate) {
var domain = unit,
range = unit,
interpolate = d3Interpolate.interpolate,
clamp = false,
piecewise,
output,
input;
function rescale() {
piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;
output = input = null;
return scale;
}
function scale(x) {
return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate$$) : deinterpolate$$, interpolate)))(+x);
}
scale.invert = function(y) {
return (input || (input = piecewise(range, domain, deinterpolate, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);
};
scale.domain = function(_) {
return arguments.length ? (domain = map$1.call(_, number), rescale()) : domain.slice();
};
scale.range = function(_) {
return arguments.length ? (range = slice.call(_), rescale()) : range.slice();
};
scale.rangeRound = function(_) {
return range = slice.call(_), interpolate = d3Interpolate.interpolateRound, rescale();
};
scale.clamp = function(_) {
return arguments.length ? (clamp = !!_, rescale()) : clamp;
};
scale.interpolate = function(_) {
return arguments.length ? (interpolate = _, rescale()) : interpolate;
};
return rescale();
}
function tickFormat(domain, count, specifier) {
var start = domain[0],
stop = domain[domain.length - 1],
step = d3Array.tickStep(start, stop, count == null ? 10 : count),
precision;
specifier = d3Format.formatSpecifier(specifier == null ? ",f" : specifier);
switch (specifier.type) {
case "s": {
var value = Math.max(Math.abs(start), Math.abs(stop));
if (specifier.precision == null && !isNaN(precision = d3Format.precisionPrefix(step, value))) specifier.precision = precision;
return d3Format.formatPrefix(specifier, value);
}
case "":
case "e":
case "g":
case "p":
case "r": {
if (specifier.precision == null && !isNaN(precision = d3Format.precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e");
break;
}
case "f":
case "%": {
if (specifier.precision == null && !isNaN(precision = d3Format.precisionFixed(step))) specifier.precision = precision - (specifier.type === "%") * 2;
break;
}
}
return d3Format.format(specifier);
}
function linearish(scale) {
var domain = scale.domain;
scale.ticks = function(count) {
var d = domain();
return d3Array.ticks(d[0], d[d.length - 1], count == null ? 10 : count);
};
scale.tickFormat = function(count, specifier) {
return tickFormat(domain(), count, specifier);
};
scale.nice = function(count) {
var d = domain(),
i = d.length - 1,
n = count == null ? 10 : count,
start = d[0],
stop = d[i],
step = d3Array.tickStep(start, stop, n);
if (step) {
step = d3Array.tickStep(Math.floor(start / step) * step, Math.ceil(stop / step) * step, n);
d[0] = Math.floor(start / step) * step;
d[i] = Math.ceil(stop / step) * step;
domain(d);
}
return scale;
};
return scale;
}
function linear() {
var scale = continuous(deinterpolate, d3Interpolate.interpolateNumber);
scale.copy = function() {
return copy(scale, linear());
};
return linearish(scale);
}
function identity() {
var domain = [0, 1];
function scale(x) {
return +x;
}
scale.invert = scale;
scale.domain = scale.range = function(_) {
return arguments.length ? (domain = map$1.call(_, number), scale) : domain.slice();
};
scale.copy = function() {
return identity().domain(domain);
};
return linearish(scale);
}
function nice(domain, interval) {
domain = domain.slice();
var i0 = 0,
i1 = domain.length - 1,
x0 = domain[i0],
x1 = domain[i1],
t;
if (x1 < x0) {
t = i0, i0 = i1, i1 = t;
t = x0, x0 = x1, x1 = t;
}
domain[i0] = interval.floor(x0);
domain[i1] = interval.ceil(x1);
return domain;
}
function deinterpolate$1(a, b) {
return (b = Math.log(b / a))
? function(x) { return Math.log(x / a) / b; }
: constant(b);
}
function reinterpolate(a, b) {
return a < 0
? function(t) { return -Math.pow(-b, t) * Math.pow(-a, 1 - t); }
: function(t) { return Math.pow(b, t) * Math.pow(a, 1 - t); };
}
function pow10(x) {
return isFinite(x) ? +("1e" + x) : x < 0 ? 0 : x;
}
function powp(base) {
return base === 10 ? pow10
: base === Math.E ? Math.exp
: function(x) { return Math.pow(base, x); };
}
function logp(base) {
return base === Math.E ? Math.log
: base === 10 && Math.log10
|| base === 2 && Math.log2
|| (base = Math.log(base), function(x) { return Math.log(x) / base; });
}
function reflect(f) {
return function(x) {
return -f(-x);
};
}
function log() {
var scale = continuous(deinterpolate$1, reinterpolate).domain([1, 10]),
domain = scale.domain,
base = 10,
logs = logp(10),
pows = powp(10);
function rescale() {
logs = logp(base), pows = powp(base);
if (domain()[0] < 0) logs = reflect(logs), pows = reflect(pows);
return scale;
}
scale.base = function(_) {
return arguments.length ? (base = +_, rescale()) : base;
};
scale.domain = function(_) {
return arguments.length ? (domain(_), rescale()) : domain();
};
scale.ticks = function(count) {
var d = domain(),
u = d[0],
v = d[d.length - 1],
r;
if (r = v < u) i = u, u = v, v = i;
var i = logs(u),
j = logs(v),
p,
k,
t,
n = count == null ? 10 : +count,
z = [];
if (!(base % 1) && j - i < n) {
i = Math.round(i) - 1, j = Math.round(j) + 1;
if (u > 0) for (; i < j; ++i) {
for (k = 1, p = pows(i); k < base; ++k) {
t = p * k;
if (t < u) continue;
if (t > v) break;
z.push(t);
}
} else for (; i < j; ++i) {
for (k = base - 1, p = pows(i); k >= 1; --k) {
t = p * k;
if (t < u) continue;
if (t > v) break;
z.push(t);
}
}
} else {
z = d3Array.ticks(i, j, Math.min(j - i, n)).map(pows);
}
return r ? z.reverse() : z;
};
scale.tickFormat = function(count, specifier) {
if (specifier == null) specifier = base === 10 ? ".0e" : ",";
if (typeof specifier !== "function") specifier = d3Format.format(specifier);
if (count === Infinity) return specifier;
if (count == null) count = 10;
var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?
return function(d) {
var i = d / pows(Math.round(logs(d)));
if (i * base < base - 0.5) i *= base;
return i <= k ? specifier(d) : "";
};
};
scale.nice = function() {
return domain(nice(domain(), {
floor: function(x) { return pows(Math.floor(logs(x))); },
ceil: function(x) { return pows(Math.ceil(logs(x))); }
}));
};
scale.copy = function() {
return copy(scale, log().base(base));
};
return scale;
}
function raise(x, exponent) {
return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);
}
function pow() {
var exponent = 1,
scale = continuous(deinterpolate, reinterpolate),
domain = scale.domain;
function deinterpolate(a, b) {
return (b = raise(b, exponent) - (a = raise(a, exponent)))
? function(x) { return (raise(x, exponent) - a) / b; }
: constant(b);
}
function reinterpolate(a, b) {
b = raise(b, exponent) - (a = raise(a, exponent));
return function(t) { return raise(a + b * t, 1 / exponent); };
}
scale.exponent = function(_) {
return arguments.length ? (exponent = +_, domain(domain())) : exponent;
};
scale.copy = function() {
return copy(scale, pow().exponent(exponent));
};
return linearish(scale);
}
function sqrt() {
return pow().exponent(0.5);
}
function quantile$1() {
var domain = [],
range = [],
thresholds = [];
function rescale() {
var i = 0, n = Math.max(1, range.length);
thresholds = new Array(n - 1);
while (++i < n) thresholds[i - 1] = d3Array.quantile(domain, i / n);
return scale;
}
function scale(x) {
if (!isNaN(x = +x)) return range[d3Array.bisect(thresholds, x)];
}
scale.invertExtent = function(y) {
var i = range.indexOf(y);
return i < 0 ? [NaN, NaN] : [
i > 0 ? thresholds[i - 1] : domain[0],
i < thresholds.length ? thresholds[i] : domain[domain.length - 1]
];
};
scale.domain = function(_) {
if (!arguments.length) return domain.slice();
domain = [];
for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d);
domain.sort(d3Array.ascending);
return rescale();
};
scale.range = function(_) {
return arguments.length ? (range = slice.call(_), rescale()) : range.slice();
};
scale.quantiles = function() {
return thresholds.slice();
};
scale.copy = function() {
return quantile$1()
.domain(domain)
.range(range);
};
return scale;
}
function quantize() {
var x0 = 0,
x1 = 1,
n = 1,
domain = [0.5],
range = [0, 1];
function scale(x) {
if (x <= x) return range[d3Array.bisect(domain, x, 0, n)];
}
function rescale() {
var i = -1;
domain = new Array(n);
while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1);
return scale;
}
scale.domain = function(_) {
return arguments.length ? (x0 = +_[0], x1 = +_[1], rescale()) : [x0, x1];
};
scale.range = function(_) {
return arguments.length ? (n = (range = slice.call(_)).length - 1, rescale()) : range.slice();
};
scale.invertExtent = function(y) {
var i = range.indexOf(y);
return i < 0 ? [NaN, NaN]
: i < 1 ? [x0, domain[0]]
: i >= n ? [domain[n - 1], x1]
: [domain[i - 1], domain[i]];
};
scale.copy = function() {
return quantize()
.domain([x0, x1])
.range(range);
};
return linearish(scale);
}
function threshold() {
var domain = [0.5],
range = [0, 1],
n = 1;
function scale(x) {
if (x <= x) return range[d3Array.bisect(domain, x, 0, n)];
}
scale.domain = function(_) {
return arguments.length ? (domain = slice.call(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();
};
scale.range = function(_) {
return arguments.length ? (range = slice.call(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();
};
scale.invertExtent = function(y) {
var i = range.indexOf(y);
return [domain[i - 1], domain[i]];
};
scale.copy = function() {
return threshold()
.domain(domain)
.range(range);
};
return scale;
}
var durationSecond = 1000;
var durationMinute = durationSecond * 60;
var durationHour = durationMinute * 60;
var durationDay = durationHour * 24;
var durationWeek = durationDay * 7;
var durationMonth = durationDay * 30;
var durationYear = durationDay * 365;
function date(t) {
return new Date(t);
}
function number$1(t) {
return t instanceof Date ? +t : +new Date(+t);
}
function calendar(year, month, week, day, hour, minute, second, millisecond, format) {
var scale = continuous(deinterpolate, d3Interpolate.interpolateNumber),
invert = scale.invert,
domain = scale.domain;
var formatMillisecond = format(".%L"),
formatSecond = format(":%S"),
formatMinute = format("%I:%M"),
formatHour = format("%I %p"),
formatDay = format("%a %d"),
formatWeek = format("%b %d"),
formatMonth = format("%B"),
formatYear = format("%Y");
var tickIntervals = [
[second, 1, durationSecond],
[second, 5, 5 * durationSecond],
[second, 15, 15 * durationSecond],
[second, 30, 30 * durationSecond],
[minute, 1, durationMinute],
[minute, 5, 5 * durationMinute],
[minute, 15, 15 * durationMinute],
[minute, 30, 30 * durationMinute],
[ hour, 1, durationHour ],
[ hour, 3, 3 * durationHour ],
[ hour, 6, 6 * durationHour ],
[ hour, 12, 12 * durationHour ],
[ day, 1, durationDay ],
[ day, 2, 2 * durationDay ],
[ week, 1, durationWeek ],
[ month, 1, durationMonth ],
[ month, 3, 3 * durationMonth ],
[ year, 1, durationYear ]
];
function tickFormat(date) {
return (second(date) < date ? formatMillisecond
: minute(date) < date ? formatSecond
: hour(date) < date ? formatMinute
: day(date) < date ? formatHour
: month(date) < date ? (week(date) < date ? formatDay : formatWeek)
: year(date) < date ? formatMonth
: formatYear)(date);
}
function tickInterval(interval, start, stop, step) {
if (interval == null) interval = 10;
// If a desired tick count is specified, pick a reasonable tick interval
// based on the extent of the domain and a rough estimate of tick size.
// Otherwise, assume interval is already a time interval and use it.
if (typeof interval === "number") {
var target = Math.abs(stop - start) / interval,
i = d3Array.bisector(function(i) { return i[2]; }).right(tickIntervals, target);
if (i === tickIntervals.length) {
step = d3Array.tickStep(start / durationYear, stop / durationYear, interval);
interval = year;
} else if (i) {
i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];
step = i[1];
interval = i[0];
} else {
step = d3Array.tickStep(start, stop, interval);
interval = millisecond;
}
}
return step == null ? interval : interval.every(step);
}
scale.invert = function(y) {
return new Date(invert(y));
};
scale.domain = function(_) {
return arguments.length ? domain(map$1.call(_, number$1)) : domain().map(date);
};
scale.ticks = function(interval, step) {
var d = domain(),
t0 = d[0],
t1 = d[d.length - 1],
r = t1 < t0,
t;
if (r) t = t0, t0 = t1, t1 = t;
t = tickInterval(interval, t0, t1, step);
t = t ? t.range(t0, t1 + 1) : []; // inclusive stop
return r ? t.reverse() : t;
};
scale.tickFormat = function(count, specifier) {
return specifier == null ? tickFormat : format(specifier);
};
scale.nice = function(interval, step) {
var d = domain();
return (interval = tickInterval(interval, d[0], d[d.length - 1], step))
? domain(nice(d, interval))
: scale;
};
scale.copy = function() {
return copy(scale, calendar(year, month, week, day, hour, minute, second, millisecond, format));
};
return scale;
}
function time() {
return calendar(d3Time.timeYear, d3Time.timeMonth, d3Time.timeWeek, d3Time.timeDay, d3Time.timeHour, d3Time.timeMinute, d3Time.timeSecond, d3Time.timeMillisecond, d3TimeFormat.timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]);
}
function utcTime() {
return calendar(d3Time.utcYear, d3Time.utcMonth, d3Time.utcWeek, d3Time.utcDay, d3Time.utcHour, d3Time.utcMinute, d3Time.utcSecond, d3Time.utcMillisecond, d3TimeFormat.utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]);
}
function colors(s) {
return s.match(/.{6}/g).map(function(x) {
return "#" + x;
});
}
var category10 = colors("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");
var category20b = colors("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6");
var category20c = colors("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9");
var category20 = colors("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5");
var cubehelix$1 = d3Interpolate.interpolateCubehelixLong(d3Color.cubehelix(300, 0.5, 0.0), d3Color.cubehelix(-240, 0.5, 1.0));
var warm = d3Interpolate.interpolateCubehelixLong(d3Color.cubehelix(-100, 0.75, 0.35), d3Color.cubehelix(80, 1.50, 0.8));
var cool = d3Interpolate.interpolateCubehelixLong(d3Color.cubehelix(260, 0.75, 0.35), d3Color.cubehelix(80, 1.50, 0.8));
var rainbow = d3Color.cubehelix();
function rainbow$1(t) {
if (t < 0 || t > 1) t -= Math.floor(t);
var ts = Math.abs(t - 0.5);
rainbow.h = 360 * t - 100;
rainbow.s = 1.5 - 1.5 * ts;
rainbow.l = 0.8 - 0.9 * ts;
return rainbow + "";
}
function ramp(range) {
var n = range.length;
return function(t) {
return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];
};
}
var viridis = ramp(colors("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));
var magma = ramp(colors("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf"));
var inferno = ramp(colors("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4"));
var plasma = ramp(colors("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));
function sequential(interpolator) {
var x0 = 0,
x1 = 1,
clamp = false;
function scale(x) {
var t = (x - x0) / (x1 - x0);
return interpolator(clamp ? Math.max(0, Math.min(1, t)) : t);
}
scale.domain = function(_) {
return arguments.length ? (x0 = +_[0], x1 = +_[1], scale) : [x0, x1];
};
scale.clamp = function(_) {
return arguments.length ? (clamp = !!_, scale) : clamp;
};
scale.interpolator = function(_) {
return arguments.length ? (interpolator = _, scale) : interpolator;
};
scale.copy = function() {
return sequential(interpolator).domain([x0, x1]).clamp(clamp);
};
return linearish(scale);
}
exports.scaleBand = band;
exports.scalePoint = point;
exports.scaleIdentity = identity;
exports.scaleLinear = linear;
exports.scaleLog = log;
exports.scaleOrdinal = ordinal;
exports.scaleImplicit = implicit;
exports.scalePow = pow;
exports.scaleSqrt = sqrt;
exports.scaleQuantile = quantile$1;
exports.scaleQuantize = quantize;
exports.scaleThreshold = threshold;
exports.scaleTime = time;
exports.scaleUtc = utcTime;
exports.schemeCategory10 = category10;
exports.schemeCategory20b = category20b;
exports.schemeCategory20c = category20c;
exports.schemeCategory20 = category20;
exports.interpolateCubehelixDefault = cubehelix$1;
exports.interpolateRainbow = rainbow$1;
exports.interpolateWarm = warm;
exports.interpolateCool = cool;
exports.interpolateViridis = viridis;
exports.interpolateMagma = magma;
exports.interpolateInferno = inferno;
exports.interpolatePlasma = plasma;
exports.scaleSequential = sequential;
Object.defineProperty(exports, '__esModule', { value: true });
}));
/***/ },
/* 241 */
/***/ function(module, exports, __webpack_require__) {
// https://d3js.org/d3-array/ Version 1.0.0. Copyright 2016 Mike Bostock.
(function (global, factory) {
true ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.d3 = global.d3 || {})));
}(this, function (exports) { 'use strict';
function ascending(a, b) {
return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
}
function bisector(compare) {
if (compare.length === 1) compare = ascendingComparator(compare);
return {
left: function(a, x, lo, hi) {
if (lo == null) lo = 0;
if (hi == null) hi = a.length;
while (lo < hi) {
var mid = lo + hi >>> 1;
if (compare(a[mid], x) < 0) lo = mid + 1;
else hi = mid;
}
return lo;
},
right: function(a, x, lo, hi) {
if (lo == null) lo = 0;
if (hi == null) hi = a.length;
while (lo < hi) {
var mid = lo + hi >>> 1;
if (compare(a[mid], x) > 0) hi = mid;
else lo = mid + 1;
}
return lo;
}
};
}
function ascendingComparator(f) {
return function(d, x) {
return ascending(f(d), x);
};
}
var ascendingBisect = bisector(ascending);
var bisectRight = ascendingBisect.right;
var bisectLeft = ascendingBisect.left;
function descending(a, b) {
return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
}
function number(x) {
return x === null ? NaN : +x;
}
function variance(array, f) {
var n = array.length,
m = 0,
a,
d,
s = 0,
i = -1,
j = 0;
if (f == null) {
while (++i < n) {
if (!isNaN(a = number(array[i]))) {
d = a - m;
m += d / ++j;
s += d * (a - m);
}
}
}
else {
while (++i < n) {
if (!isNaN(a = number(f(array[i], i, array)))) {
d = a - m;
m += d / ++j;
s += d * (a - m);
}
}
}
if (j > 1) return s / (j - 1);
}
function deviation(array, f) {
var v = variance(array, f);
return v ? Math.sqrt(v) : v;
}
function extent(array, f) {
var i = -1,
n = array.length,
a,
b,
c;
if (f == null) {
while (++i < n) if ((b = array[i]) != null && b >= b) { a = c = b; break; }
while (++i < n) if ((b = array[i]) != null) {
if (a > b) a = b;
if (c < b) c = b;
}
}
else {
while (++i < n) if ((b = f(array[i], i, array)) != null && b >= b) { a = c = b; break; }
while (++i < n) if ((b = f(array[i], i, array)) != null) {
if (a > b) a = b;
if (c < b) c = b;
}
}
return [a, c];
}
var array = Array.prototype;
var slice = array.slice;
var map = array.map;
function constant(x) {
return function() {
return x;
};
}
function identity(x) {
return x;
}
function range(start, stop, step) {
start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;
var i = -1,
n = Math.max(0, Math.ceil((stop - start) / step)) | 0,
range = new Array(n);
while (++i < n) {
range[i] = start + i * step;
}
return range;
}
var e10 = Math.sqrt(50);
var e5 = Math.sqrt(10);
var e2 = Math.sqrt(2);
function ticks(start, stop, count) {
var step = tickStep(start, stop, count);
return range(
Math.ceil(start / step) * step,
Math.floor(stop / step) * step + step / 2, // inclusive
step
);
}
function tickStep(start, stop, count) {
var step0 = Math.abs(stop - start) / Math.max(0, count),
step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),
error = step0 / step1;
if (error >= e10) step1 *= 10;
else if (error >= e5) step1 *= 5;
else if (error >= e2) step1 *= 2;
return stop < start ? -step1 : step1;
}
function sturges(values) {
return Math.ceil(Math.log(values.length) / Math.LN2) + 1;
}
function histogram() {
var value = identity,
domain = extent,
threshold = sturges;
function histogram(data) {
var i,
n = data.length,
x,
values = new Array(n);
for (i = 0; i < n; ++i) {
values[i] = value(data[i], i, data);
}
var xz = domain(values),
x0 = xz[0],
x1 = xz[1],
tz = threshold(values, x0, x1);
// Convert number of thresholds into uniform thresholds.
if (!Array.isArray(tz)) tz = ticks(x0, x1, tz);
// Remove any thresholds outside the domain.
var m = tz.length;
while (tz[0] <= x0) tz.shift(), --m;
while (tz[m - 1] >= x1) tz.pop(), --m;
var bins = new Array(m + 1),
bin;
// Initialize bins.
for (i = 0; i <= m; ++i) {
bin = bins[i] = [];
bin.x0 = i > 0 ? tz[i - 1] : x0;
bin.x1 = i < m ? tz[i] : x1;
}
// Assign data to bins by value, ignoring any outside the domain.
for (i = 0; i < n; ++i) {
x = values[i];
if (x0 <= x && x <= x1) {
bins[bisectRight(tz, x, 0, m)].push(data[i]);
}
}
return bins;
}
histogram.value = function(_) {
return arguments.length ? (value = typeof _ === "function" ? _ : constant(_), histogram) : value;
};
histogram.domain = function(_) {
return arguments.length ? (domain = typeof _ === "function" ? _ : constant([_[0], _[1]]), histogram) : domain;
};
histogram.thresholds = function(_) {
return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), histogram) : threshold;
};
return histogram;
}
function quantile(array, p, f) {
if (f == null) f = number;
if (!(n = array.length)) return;
if ((p = +p) <= 0 || n < 2) return +f(array[0], 0, array);
if (p >= 1) return +f(array[n - 1], n - 1, array);
var n,
h = (n - 1) * p,
i = Math.floor(h),
a = +f(array[i], i, array),
b = +f(array[i + 1], i + 1, array);
return a + (b - a) * (h - i);
}
function freedmanDiaconis(values, min, max) {
values = map.call(values, number).sort(ascending);
return Math.ceil((max - min) / (2 * (quantile(values, 0.75) - quantile(values, 0.25)) * Math.pow(values.length, -1 / 3)));
}
function scott(values, min, max) {
return Math.ceil((max - min) / (3.5 * deviation(values) * Math.pow(values.length, -1 / 3)));
}
function max(array, f) {
var i = -1,
n = array.length,
a,
b;
if (f == null) {
while (++i < n) if ((b = array[i]) != null && b >= b) { a = b; break; }
while (++i < n) if ((b = array[i]) != null && b > a) a = b;
}
else {
while (++i < n) if ((b = f(array[i], i, array)) != null && b >= b) { a = b; break; }
while (++i < n) if ((b = f(array[i], i, array)) != null && b > a) a = b;
}
return a;
}
function mean(array, f) {
var s = 0,
n = array.length,
a,
i = -1,
j = n;
if (f == null) {
while (++i < n) if (!isNaN(a = number(array[i]))) s += a; else --j;
}
else {
while (++i < n) if (!isNaN(a = number(f(array[i], i, array)))) s += a; else --j;
}
if (j) return s / j;
}
function median(array, f) {
var numbers = [],
n = array.length,
a,
i = -1;
if (f == null) {
while (++i < n) if (!isNaN(a = number(array[i]))) numbers.push(a);
}
else {
while (++i < n) if (!isNaN(a = number(f(array[i], i, array)))) numbers.push(a);
}
return quantile(numbers.sort(ascending), 0.5);
}
function merge(arrays) {
var n = arrays.length,
m,
i = -1,
j = 0,
merged,
array;
while (++i < n) j += arrays[i].length;
merged = new Array(j);
while (--n >= 0) {
array = arrays[n];
m = array.length;
while (--m >= 0) {
merged[--j] = array[m];
}
}
return merged;
}
function min(array, f) {
var i = -1,
n = array.length,
a,
b;
if (f == null) {
while (++i < n) if ((b = array[i]) != null && b >= b) { a = b; break; }
while (++i < n) if ((b = array[i]) != null && a > b) a = b;
}
else {
while (++i < n) if ((b = f(array[i], i, array)) != null && b >= b) { a = b; break; }
while (++i < n) if ((b = f(array[i], i, array)) != null && a > b) a = b;
}
return a;
}
function pairs(array) {
var i = 0, n = array.length - 1, p = array[0], pairs = new Array(n < 0 ? 0 : n);
while (i < n) pairs[i] = [p, p = array[++i]];
return pairs;
}
function permute(array, indexes) {
var i = indexes.length, permutes = new Array(i);
while (i--) permutes[i] = array[indexes[i]];
return permutes;
}
function scan(array, compare) {
if (!(n = array.length)) return;
var i = 0,
n,
j = 0,
xi,
xj = array[j];
if (!compare) compare = ascending;
while (++i < n) if (compare(xi = array[i], xj) < 0 || compare(xj, xj) !== 0) xj = xi, j = i;
if (compare(xj, xj) === 0) return j;
}
function shuffle(array, i0, i1) {
var m = (i1 == null ? array.length : i1) - (i0 = i0 == null ? 0 : +i0),
t,
i;
while (m) {
i = Math.random() * m-- | 0;
t = array[m + i0];
array[m + i0] = array[i + i0];
array[i + i0] = t;
}
return array;
}
function sum(array, f) {
var s = 0,
n = array.length,
a,
i = -1;
if (f == null) {
while (++i < n) if (a = +array[i]) s += a; // Note: zero and null are equivalent.
}
else {
while (++i < n) if (a = +f(array[i], i, array)) s += a;
}
return s;
}
function transpose(matrix) {
if (!(n = matrix.length)) return [];
for (var i = -1, m = min(matrix, length), transpose = new Array(m); ++i < m;) {
for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) {
row[j] = matrix[j][i];
}
}
return transpose;
}
function length(d) {
return d.length;
}
function zip() {
return transpose(arguments);
}
exports.bisect = bisectRight;
exports.bisectRight = bisectRight;
exports.bisectLeft = bisectLeft;
exports.ascending = ascending;
exports.bisector = bisector;
exports.descending = descending;
exports.deviation = deviation;
exports.extent = extent;
exports.histogram = histogram;
exports.thresholdFreedmanDiaconis = freedmanDiaconis;
exports.thresholdScott = scott;
exports.thresholdSturges = sturges;
exports.max = max;
exports.mean = mean;
exports.median = median;
exports.merge = merge;
exports.min = min;
exports.pairs = pairs;
exports.permute = permute;
exports.quantile = quantile;
exports.range = range;
exports.scan = scan;
exports.shuffle = shuffle;
exports.sum = sum;
exports.ticks = ticks;
exports.tickStep = tickStep;
exports.transpose = transpose;
exports.variance = variance;
exports.zip = zip;
Object.defineProperty(exports, '__esModule', { value: true });
}));
/***/ },
/* 242 */
/***/ function(module, exports, __webpack_require__) {
// https://d3js.org/d3-collection/ Version 1.0.0. Copyright 2016 Mike Bostock.
(function (global, factory) {
true ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.d3 = global.d3 || {})));
}(this, function (exports) { 'use strict';
var prefix = "$";
function Map() {}
Map.prototype = map.prototype = {
constructor: Map,
has: function(key) {
return (prefix + key) in this;
},
get: function(key) {
return this[prefix + key];
},
set: function(key, value) {
this[prefix + key] = value;
return this;
},
remove: function(key) {
var property = prefix + key;
return property in this && delete this[property];
},
clear: function() {
for (var property in this) if (property[0] === prefix) delete this[property];
},
keys: function() {
var keys = [];
for (var property in this) if (property[0] === prefix) keys.push(property.slice(1));
return keys;
},
values: function() {
var values = [];
for (var property in this) if (property[0] === prefix) values.push(this[property]);
return values;
},
entries: function() {
var entries = [];
for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]});
return entries;
},
size: function() {
var size = 0;
for (var property in this) if (property[0] === prefix) ++size;
return size;
},
empty: function() {
for (var property in this) if (property[0] === prefix) return false;
return true;
},
each: function(f) {
for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this);
}
};
function map(object, f) {
var map = new Map;
// Copy constructor.
if (object instanceof Map) object.each(function(value, key) { map.set(key, value); });
// Index array by numeric index or specified key function.
else if (Array.isArray(object)) {
var i = -1,
n = object.length,
o;
if (f == null) while (++i < n) map.set(i, object[i]);
else while (++i < n) map.set(f(o = object[i], i, object), o);
}
// Convert object to map.
else if (object) for (var key in object) map.set(key, object[key]);
return map;
}
function nest() {
var keys = [],
sortKeys = [],
sortValues,
rollup,
nest;
function apply(array, depth, createResult, setResult) {
if (depth >= keys.length) return rollup != null
? rollup(array) : (sortValues != null
? array.sort(sortValues)
: array);
var i = -1,
n = array.length,
key = keys[depth++],
keyValue,
value,
valuesByKey = map(),
values,
result = createResult();
while (++i < n) {
if (values = valuesByKey.get(keyValue = key(value = array[i]) + "")) {
values.push(value);
} else {
valuesByKey.set(keyValue, [value]);
}
}
valuesByKey.each(function(values, key) {
setResult(result, key, apply(values, depth, createResult, setResult));
});
return result;
}
function entries(map, depth) {
if (++depth > keys.length) return map;
var array, sortKey = sortKeys[depth - 1];
if (rollup != null && depth >= keys.length) array = map.entries();
else array = [], map.each(function(v, k) { array.push({key: k, values: entries(v, depth)}); });
return sortKey != null ? array.sort(function(a, b) { return sortKey(a.key, b.key); }) : array;
}
return nest = {
object: function(array) { return apply(array, 0, createObject, setObject); },
map: function(array) { return apply(array, 0, createMap, setMap); },
entries: function(array) { return entries(apply(array, 0, createMap, setMap), 0); },
key: function(d) { keys.push(d); return nest; },
sortKeys: function(order) { sortKeys[keys.length - 1] = order; return nest; },
sortValues: function(order) { sortValues = order; return nest; },
rollup: function(f) { rollup = f; return nest; }
};
}
function createObject() {
return {};
}
function setObject(object, key, value) {
object[key] = value;
}
function createMap() {
return map();
}
function setMap(map, key, value) {
map.set(key, value);
}
function Set() {}
var proto = map.prototype;
Set.prototype = set.prototype = {
constructor: Set,
has: proto.has,
add: function(value) {
value += "";
this[prefix + value] = value;
return this;
},
remove: proto.remove,
clear: proto.clear,
values: proto.keys,
size: proto.size,
empty: proto.empty,
each: proto.each
};
function set(object, f) {
var set = new Set;
// Copy constructor.
if (object instanceof Set) object.each(function(value) { set.add(value); });
// Otherwise, assume it’s an array.
else if (object) {
var i = -1, n = object.length;
if (f == null) while (++i < n) set.add(object[i]);
else while (++i < n) set.add(f(object[i], i, object));
}
return set;
}
function keys(map) {
var keys = [];
for (var key in map) keys.push(key);
return keys;
}
function values(map) {
var values = [];
for (var key in map) values.push(map[key]);
return values;
}
function entries(map) {
var entries = [];
for (var key in map) entries.push({key: key, value: map[key]});
return entries;
}
exports.nest = nest;
exports.set = set;
exports.map = map;
exports.keys = keys;
exports.values = values;
exports.entries = entries;
Object.defineProperty(exports, '__esModule', { value: true });
}));
/***/ },
/* 243 */
/***/ function(module, exports, __webpack_require__) {
// https://d3js.org/d3-interpolate/ Version 1.1.0. Copyright 2016 Mike Bostock.
(function (global, factory) {
true ? factory(exports, __webpack_require__(244)) :
typeof define === 'function' && define.amd ? define(['exports', 'd3-color'], factory) :
(factory((global.d3 = global.d3 || {}),global.d3));
}(this, function (exports,d3Color) { 'use strict';
function basis(t1, v0, v1, v2, v3) {
var t2 = t1 * t1, t3 = t2 * t1;
return ((1 - 3 * t1 + 3 * t2 - t3) * v0
+ (4 - 6 * t2 + 3 * t3) * v1
+ (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2
+ t3 * v3) / 6;
}
function basis$1(values) {
var n = values.length - 1;
return function(t) {
var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),
v1 = values[i],
v2 = values[i + 1],
v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,
v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;
return basis((t - i / n) * n, v0, v1, v2, v3);
};
}
function basisClosed(values) {
var n = values.length;
return function(t) {
var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),
v0 = values[(i + n - 1) % n],
v1 = values[i % n],
v2 = values[(i + 1) % n],
v3 = values[(i + 2) % n];
return basis((t - i / n) * n, v0, v1, v2, v3);
};
}
function constant(x) {
return function() {
return x;
};
}
function linear(a, d) {
return function(t) {
return a + t * d;
};
}
function exponential(a, b, y) {
return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {
return Math.pow(a + t * b, y);
};
}
function hue(a, b) {
var d = b - a;
return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);
}
function gamma(y) {
return (y = +y) === 1 ? nogamma : function(a, b) {
return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);
};
}
function nogamma(a, b) {
var d = b - a;
return d ? linear(a, d) : constant(isNaN(a) ? b : a);
}
var rgb$1 = (function rgbGamma(y) {
var color = gamma(y);
function rgb(start, end) {
var r = color((start = d3Color.rgb(start)).r, (end = d3Color.rgb(end)).r),
g = color(start.g, end.g),
b = color(start.b, end.b),
opacity = color(start.opacity, end.opacity);
return function(t) {
start.r = r(t);
start.g = g(t);
start.b = b(t);
start.opacity = opacity(t);
return start + "";
};
}
rgb.gamma = rgbGamma;
return rgb;
})(1);
function rgbSpline(spline) {
return function(colors) {
var n = colors.length,
r = new Array(n),
g = new Array(n),
b = new Array(n),
i, color;
for (i = 0; i < n; ++i) {
color = d3Color.rgb(colors[i]);
r[i] = color.r || 0;
g[i] = color.g || 0;
b[i] = color.b || 0;
}
r = spline(r);
g = spline(g);
b = spline(b);
color.opacity = 1;
return function(t) {
color.r = r(t);
color.g = g(t);
color.b = b(t);
return color + "";
};
};
}
var rgbBasis = rgbSpline(basis$1);
var rgbBasisClosed = rgbSpline(basisClosed);
function array(a, b) {
var nb = b ? b.length : 0,
na = a ? Math.min(nb, a.length) : 0,
x = new Array(nb),
c = new Array(nb),
i;
for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);
for (; i < nb; ++i) c[i] = b[i];
return function(t) {
for (i = 0; i < na; ++i) c[i] = x[i](t);
return c;
};
}
function date(a, b) {
var d = new Date;
return a = +a, b -= a, function(t) {
return d.setTime(a + b * t), d;
};
}
function number(a, b) {
return a = +a, b -= a, function(t) {
return a + b * t;
};
}
function object(a, b) {
var i = {},
c = {},
k;
if (a === null || typeof a !== "object") a = {};
if (b === null || typeof b !== "object") b = {};
for (k in b) {
if (k in a) {
i[k] = value(a[k], b[k]);
} else {
c[k] = b[k];
}
}
return function(t) {
for (k in i) c[k] = i[k](t);
return c;
};
}
var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;
var reB = new RegExp(reA.source, "g");
function zero(b) {
return function() {
return b;
};
}
function one(b) {
return function(t) {
return b(t) + "";
};
}
function string(a, b) {
var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b
am, // current match in a
bm, // current match in b
bs, // string preceding current number in b, if any
i = -1, // index in s
s = [], // string constants and placeholders
q = []; // number interpolators
// Coerce inputs to strings.
a = a + "", b = b + "";
// Interpolate pairs of numbers in a & b.
while ((am = reA.exec(a))
&& (bm = reB.exec(b))) {
if ((bs = bm.index) > bi) { // a string precedes the next number in b
bs = b.slice(bi, bs);
if (s[i]) s[i] += bs; // coalesce with previous string
else s[++i] = bs;
}
if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match
if (s[i]) s[i] += bm; // coalesce with previous string
else s[++i] = bm;
} else { // interpolate non-matching numbers
s[++i] = null;
q.push({i: i, x: number(am, bm)});
}
bi = reB.lastIndex;
}
// Add remains of b.
if (bi < b.length) {
bs = b.slice(bi);
if (s[i]) s[i] += bs; // coalesce with previous string
else s[++i] = bs;
}
// Special optimization for only a single match.
// Otherwise, interpolate each of the numbers and rejoin the string.
return s.length < 2 ? (q[0]
? one(q[0].x)
: zero(b))
: (b = q.length, function(t) {
for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);
return s.join("");
});
}
function value(a, b) {
var t = typeof b, c;
return b == null || t === "boolean" ? constant(b)
: (t === "number" ? number
: t === "string" ? ((c = d3Color.color(b)) ? (b = c, rgb$1) : string)
: b instanceof d3Color.color ? rgb$1
: b instanceof Date ? date
: Array.isArray(b) ? array
: isNaN(b) ? object
: number)(a, b);
}
function round(a, b) {
return a = +a, b -= a, function(t) {
return Math.round(a + b * t);
};
}
var degrees = 180 / Math.PI;
var identity = {
translateX: 0,
translateY: 0,
rotate: 0,
skewX: 0,
scaleX: 1,
scaleY: 1
};
function decompose(a, b, c, d, e, f) {
var scaleX, scaleY, skewX;
if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;
if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;
if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;
if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;
return {
translateX: e,
translateY: f,
rotate: Math.atan2(b, a) * degrees,
skewX: Math.atan(skewX) * degrees,
scaleX: scaleX,
scaleY: scaleY
};
}
var cssNode;
var cssRoot;
var cssView;
var svgNode;
function parseCss(value) {
if (value === "none") return identity;
if (!cssNode) cssNode = document.createElement("DIV"), cssRoot = document.documentElement, cssView = document.defaultView;
cssNode.style.transform = value;
value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue("transform");
cssRoot.removeChild(cssNode);
value = value.slice(7, -1).split(",");
return decompose(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]);
}
function parseSvg(value) {
if (value == null) return identity;
if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
svgNode.setAttribute("transform", value);
if (!(value = svgNode.transform.baseVal.consolidate())) return identity;
value = value.matrix;
return decompose(value.a, value.b, value.c, value.d, value.e, value.f);
}
function interpolateTransform(parse, pxComma, pxParen, degParen) {
function pop(s) {
return s.length ? s.pop() + " " : "";
}
function translate(xa, ya, xb, yb, s, q) {
if (xa !== xb || ya !== yb) {
var i = s.push("translate(", null, pxComma, null, pxParen);
q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});
} else if (xb || yb) {
s.push("translate(" + xb + pxComma + yb + pxParen);
}
}
function rotate(a, b, s, q) {
if (a !== b) {
if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path
q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: number(a, b)});
} else if (b) {
s.push(pop(s) + "rotate(" + b + degParen);
}
}
function skewX(a, b, s, q) {
if (a !== b) {
q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: number(a, b)});
} else if (b) {
s.push(pop(s) + "skewX(" + b + degParen);
}
}
function scale(xa, ya, xb, yb, s, q) {
if (xa !== xb || ya !== yb) {
var i = s.push(pop(s) + "scale(", null, ",", null, ")");
q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});
} else if (xb !== 1 || yb !== 1) {
s.push(pop(s) + "scale(" + xb + "," + yb + ")");
}
}
return function(a, b) {
var s = [], // string constants and placeholders
q = []; // number interpolators
a = parse(a), b = parse(b);
translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);
rotate(a.rotate, b.rotate, s, q);
skewX(a.skewX, b.skewX, s, q);
scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);
a = b = null; // gc
return function(t) {
var i = -1, n = q.length, o;
while (++i < n) s[(o = q[i]).i] = o.x(t);
return s.join("");
};
};
}
var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)");
var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")");
var rho = Math.SQRT2;
var rho2 = 2;
var rho4 = 4;
var epsilon2 = 1e-12;
function cosh(x) {
return ((x = Math.exp(x)) + 1 / x) / 2;
}
function sinh(x) {
return ((x = Math.exp(x)) - 1 / x) / 2;
}
function tanh(x) {
return ((x = Math.exp(2 * x)) - 1) / (x + 1);
}
// p0 = [ux0, uy0, w0]
// p1 = [ux1, uy1, w1]
function zoom(p0, p1) {
var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],
ux1 = p1[0], uy1 = p1[1], w1 = p1[2],
dx = ux1 - ux0,
dy = uy1 - uy0,
d2 = dx * dx + dy * dy,
i,
S;
// Special case for u0 ≅ u1.
if (d2 < epsilon2) {
S = Math.log(w1 / w0) / rho;
i = function(t) {
return [
ux0 + t * dx,
uy0 + t * dy,
w0 * Math.exp(rho * t * S)
];
}
}
// General case.
else {
var d1 = Math.sqrt(d2),
b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),
b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),
r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),
r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);
S = (r1 - r0) / rho;
i = function(t) {
var s = t * S,
coshr0 = cosh(r0),
u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));
return [
ux0 + u * dx,
uy0 + u * dy,
w0 * coshr0 / cosh(rho * s + r0)
];
}
}
i.duration = S * 1000;
return i;
}
function hsl$1(hue) {
return function(start, end) {
var h = hue((start = d3Color.hsl(start)).h, (end = d3Color.hsl(end)).h),
s = nogamma(start.s, end.s),
l = nogamma(start.l, end.l),
opacity = nogamma(start.opacity, end.opacity);
return function(t) {
start.h = h(t);
start.s = s(t);
start.l = l(t);
start.opacity = opacity(t);
return start + "";
};
}
}
var hsl$2 = hsl$1(hue);
var hslLong = hsl$1(nogamma);
function lab$1(start, end) {
var l = nogamma((start = d3Color.lab(start)).l, (end = d3Color.lab(end)).l),
a = nogamma(start.a, end.a),
b = nogamma(start.b, end.b),
opacity = nogamma(start.opacity, end.opacity);
return function(t) {
start.l = l(t);
start.a = a(t);
start.b = b(t);
start.opacity = opacity(t);
return start + "";
};
}
function hcl$1(hue) {
return function(start, end) {
var h = hue((start = d3Color.hcl(start)).h, (end = d3Color.hcl(end)).h),
c = nogamma(start.c, end.c),
l = nogamma(start.l, end.l),
opacity = nogamma(start.opacity, end.opacity);
return function(t) {
start.h = h(t);
start.c = c(t);
start.l = l(t);
start.opacity = opacity(t);
return start + "";
};
}
}
var hcl$2 = hcl$1(hue);
var hclLong = hcl$1(nogamma);
function cubehelix$1(hue) {
return (function cubehelixGamma(y) {
y = +y;
function cubehelix(start, end) {
var h = hue((start = d3Color.cubehelix(start)).h, (end = d3Color.cubehelix(end)).h),
s = nogamma(start.s, end.s),
l = nogamma(start.l, end.l),
opacity = nogamma(start.opacity, end.opacity);
return function(t) {
start.h = h(t);
start.s = s(t);
start.l = l(Math.pow(t, y));
start.opacity = opacity(t);
return start + "";
};
}
cubehelix.gamma = cubehelixGamma;
return cubehelix;
})(1);
}
var cubehelix$2 = cubehelix$1(hue);
var cubehelixLong = cubehelix$1(nogamma);
function quantize(interpolator, n) {
var samples = new Array(n);
for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));
return samples;
}
exports.interpolate = value;
exports.interpolateArray = array;
exports.interpolateBasis = basis$1;
exports.interpolateBasisClosed = basisClosed;
exports.interpolateDate = date;
exports.interpolateNumber = number;
exports.interpolateObject = object;
exports.interpolateRound = round;
exports.interpolateString = string;
exports.interpolateTransformCss = interpolateTransformCss;
exports.interpolateTransformSvg = interpolateTransformSvg;
exports.interpolateZoom = zoom;
exports.interpolateRgb = rgb$1;
exports.interpolateRgbBasis = rgbBasis;
exports.interpolateRgbBasisClosed = rgbBasisClosed;
exports.interpolateHsl = hsl$2;
exports.interpolateHslLong = hslLong;
exports.interpolateLab = lab$1;
exports.interpolateHcl = hcl$2;
exports.interpolateHclLong = hclLong;
exports.interpolateCubehelix = cubehelix$2;
exports.interpolateCubehelixLong = cubehelixLong;
exports.quantize = quantize;
Object.defineProperty(exports, '__esModule', { value: true });
}));
/***/ },
/* 244 */
/***/ function(module, exports, __webpack_require__) {
// https://d3js.org/d3-color/ Version 1.0.0. Copyright 2016 Mike Bostock.
(function (global, factory) {
true ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.d3 = global.d3 || {})));
}(this, function (exports) { 'use strict';
function define(constructor, factory, prototype) {
constructor.prototype = factory.prototype = prototype;
prototype.constructor = constructor;
}
function extend(parent, definition) {
var prototype = Object.create(parent.prototype);
for (var key in definition) prototype[key] = definition[key];
return prototype;
}
function Color() {}
var darker = 0.7;
var brighter = 1 / darker;
var reHex3 = /^#([0-9a-f]{3})$/;
var reHex6 = /^#([0-9a-f]{6})$/;
var reRgbInteger = /^rgb\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*\)$/;
var reRgbPercent = /^rgb\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/;
var reRgbaInteger = /^rgba\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/;
var reRgbaPercent = /^rgba\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/;
var reHslPercent = /^hsl\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/;
var reHslaPercent = /^hsla\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/;
var named = {
aliceblue: 0xf0f8ff,
antiquewhite: 0xfaebd7,
aqua: 0x00ffff,
aquamarine: 0x7fffd4,
azure: 0xf0ffff,
beige: 0xf5f5dc,
bisque: 0xffe4c4,
black: 0x000000,
blanchedalmond: 0xffebcd,
blue: 0x0000ff,
blueviolet: 0x8a2be2,
brown: 0xa52a2a,
burlywood: 0xdeb887,
cadetblue: 0x5f9ea0,
chartreuse: 0x7fff00,
chocolate: 0xd2691e,
coral: 0xff7f50,
cornflowerblue: 0x6495ed,
cornsilk: 0xfff8dc,
crimson: 0xdc143c,
cyan: 0x00ffff,
darkblue: 0x00008b,
darkcyan: 0x008b8b,
darkgoldenrod: 0xb8860b,
darkgray: 0xa9a9a9,
darkgreen: 0x006400,
darkgrey: 0xa9a9a9,
darkkhaki: 0xbdb76b,
darkmagenta: 0x8b008b,
darkolivegreen: 0x556b2f,
darkorange: 0xff8c00,
darkorchid: 0x9932cc,
darkred: 0x8b0000,
darksalmon: 0xe9967a,
darkseagreen: 0x8fbc8f,
darkslateblue: 0x483d8b,
darkslategray: 0x2f4f4f,
darkslategrey: 0x2f4f4f,
darkturquoise: 0x00ced1,
darkviolet: 0x9400d3,
deeppink: 0xff1493,
deepskyblue: 0x00bfff,
dimgray: 0x696969,
dimgrey: 0x696969,
dodgerblue: 0x1e90ff,
firebrick: 0xb22222,
floralwhite: 0xfffaf0,
forestgreen: 0x228b22,
fuchsia: 0xff00ff,
gainsboro: 0xdcdcdc,
ghostwhite: 0xf8f8ff,
gold: 0xffd700,
goldenrod: 0xdaa520,
gray: 0x808080,
green: 0x008000,
greenyellow: 0xadff2f,
grey: 0x808080,
honeydew: 0xf0fff0,
hotpink: 0xff69b4,
indianred: 0xcd5c5c,
indigo: 0x4b0082,
ivory: 0xfffff0,
khaki: 0xf0e68c,
lavender: 0xe6e6fa,
lavenderblush: 0xfff0f5,
lawngreen: 0x7cfc00,
lemonchiffon: 0xfffacd,
lightblue: 0xadd8e6,
lightcoral: 0xf08080,
lightcyan: 0xe0ffff,
lightgoldenrodyellow: 0xfafad2,
lightgray: 0xd3d3d3,
lightgreen: 0x90ee90,
lightgrey: 0xd3d3d3,
lightpink: 0xffb6c1,
lightsalmon: 0xffa07a,
lightseagreen: 0x20b2aa,
lightskyblue: 0x87cefa,
lightslategray: 0x778899,
lightslategrey: 0x778899,
lightsteelblue: 0xb0c4de,
lightyellow: 0xffffe0,
lime: 0x00ff00,
limegreen: 0x32cd32,
linen: 0xfaf0e6,
magenta: 0xff00ff,
maroon: 0x800000,
mediumaquamarine: 0x66cdaa,
mediumblue: 0x0000cd,
mediumorchid: 0xba55d3,
mediumpurple: 0x9370db,
mediumseagreen: 0x3cb371,
mediumslateblue: 0x7b68ee,
mediumspringgreen: 0x00fa9a,
mediumturquoise: 0x48d1cc,
mediumvioletred: 0xc71585,
midnightblue: 0x191970,
mintcream: 0xf5fffa,
mistyrose: 0xffe4e1,
moccasin: 0xffe4b5,
navajowhite: 0xffdead,
navy: 0x000080,
oldlace: 0xfdf5e6,
olive: 0x808000,
olivedrab: 0x6b8e23,
orange: 0xffa500,
orangered: 0xff4500,
orchid: 0xda70d6,
palegoldenrod: 0xeee8aa,
palegreen: 0x98fb98,
paleturquoise: 0xafeeee,
palevioletred: 0xdb7093,
papayawhip: 0xffefd5,
peachpuff: 0xffdab9,
peru: 0xcd853f,
pink: 0xffc0cb,
plum: 0xdda0dd,
powderblue: 0xb0e0e6,
purple: 0x800080,
rebeccapurple: 0x663399,
red: 0xff0000,
rosybrown: 0xbc8f8f,
royalblue: 0x4169e1,
saddlebrown: 0x8b4513,
salmon: 0xfa8072,
sandybrown: 0xf4a460,
seagreen: 0x2e8b57,
seashell: 0xfff5ee,
sienna: 0xa0522d,
silver: 0xc0c0c0,
skyblue: 0x87ceeb,
slateblue: 0x6a5acd,
slategray: 0x708090,
slategrey: 0x708090,
snow: 0xfffafa,
springgreen: 0x00ff7f,
steelblue: 0x4682b4,
tan: 0xd2b48c,
teal: 0x008080,
thistle: 0xd8bfd8,
tomato: 0xff6347,
turquoise: 0x40e0d0,
violet: 0xee82ee,
wheat: 0xf5deb3,
white: 0xffffff,
whitesmoke: 0xf5f5f5,
yellow: 0xffff00,
yellowgreen: 0x9acd32
};
define(Color, color, {
displayable: function() {
return this.rgb().displayable();
},
toString: function() {
return this.rgb() + "";
}
});
function color(format) {
var m;
format = (format + "").trim().toLowerCase();
return (m = reHex3.exec(format)) ? (m = parseInt(m[1], 16), new Rgb((m >> 8 & 0xf) | (m >> 4 & 0x0f0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1)) // #f00
: (m = reHex6.exec(format)) ? rgbn(parseInt(m[1], 16)) // #ff0000
: (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
: (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)
: (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
: (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)
: (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
: (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
: named.hasOwnProperty(format) ? rgbn(named[format])
: format === "transparent" ? new Rgb(NaN, NaN, NaN, 0)
: null;
}
function rgbn(n) {
return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
}
function rgba(r, g, b, a) {
if (a <= 0) r = g = b = NaN;
return new Rgb(r, g, b, a);
}
function rgbConvert(o) {
if (!(o instanceof Color)) o = color(o);
if (!o) return new Rgb;
o = o.rgb();
return new Rgb(o.r, o.g, o.b, o.opacity);
}
function rgb(r, g, b, opacity) {
return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
}
function Rgb(r, g, b, opacity) {
this.r = +r;
this.g = +g;
this.b = +b;
this.opacity = +opacity;
}
define(Rgb, rgb, extend(Color, {
brighter: function(k) {
k = k == null ? brighter : Math.pow(brighter, k);
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
},
darker: function(k) {
k = k == null ? darker : Math.pow(darker, k);
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
},
rgb: function() {
return this;
},
displayable: function() {
return (0 <= this.r && this.r <= 255)
&& (0 <= this.g && this.g <= 255)
&& (0 <= this.b && this.b <= 255)
&& (0 <= this.opacity && this.opacity <= 1);
},
toString: function() {
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
return (a === 1 ? "rgb(" : "rgba(")
+ Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
+ Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
+ Math.max(0, Math.min(255, Math.round(this.b) || 0))
+ (a === 1 ? ")" : ", " + a + ")");
}
}));
function hsla(h, s, l, a) {
if (a <= 0) h = s = l = NaN;
else if (l <= 0 || l >= 1) h = s = NaN;
else if (s <= 0) h = NaN;
return new Hsl(h, s, l, a);
}
function hslConvert(o) {
if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
if (!(o instanceof Color)) o = color(o);
if (!o) return new Hsl;
if (o instanceof Hsl) return o;
o = o.rgb();
var r = o.r / 255,
g = o.g / 255,
b = o.b / 255,
min = Math.min(r, g, b),
max = Math.max(r, g, b),
h = NaN,
s = max - min,
l = (max + min) / 2;
if (s) {
if (r === max) h = (g - b) / s + (g < b) * 6;
else if (g === max) h = (b - r) / s + 2;
else h = (r - g) / s + 4;
s /= l < 0.5 ? max + min : 2 - max - min;
h *= 60;
} else {
s = l > 0 && l < 1 ? 0 : h;
}
return new Hsl(h, s, l, o.opacity);
}
function hsl(h, s, l, opacity) {
return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
}
function Hsl(h, s, l, opacity) {
this.h = +h;
this.s = +s;
this.l = +l;
this.opacity = +opacity;
}
define(Hsl, hsl, extend(Color, {
brighter: function(k) {
k = k == null ? brighter : Math.pow(brighter, k);
return new Hsl(this.h, this.s, this.l * k, this.opacity);
},
darker: function(k) {
k = k == null ? darker : Math.pow(darker, k);
return new Hsl(this.h, this.s, this.l * k, this.opacity);
},
rgb: function() {
var h = this.h % 360 + (this.h < 0) * 360,
s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
l = this.l,
m2 = l + (l < 0.5 ? l : 1 - l) * s,
m1 = 2 * l - m2;
return new Rgb(
hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),
hsl2rgb(h, m1, m2),
hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),
this.opacity
);
},
displayable: function() {
return (0 <= this.s && this.s <= 1 || isNaN(this.s))
&& (0 <= this.l && this.l <= 1)
&& (0 <= this.opacity && this.opacity <= 1);
}
}));
/* From FvD 13.37, CSS Color Module Level 3 */
function hsl2rgb(h, m1, m2) {
return (h < 60 ? m1 + (m2 - m1) * h / 60
: h < 180 ? m2
: h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
: m1) * 255;
}
var deg2rad = Math.PI / 180;
var rad2deg = 180 / Math.PI;
var Kn = 18;
var Xn = 0.950470;
var Yn = 1;
var Zn = 1.088830;
var t0 = 4 / 29;
var t1 = 6 / 29;
var t2 = 3 * t1 * t1;
var t3 = t1 * t1 * t1;
function labConvert(o) {
if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);
if (o instanceof Hcl) {
var h = o.h * deg2rad;
return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);
}
if (!(o instanceof Rgb)) o = rgbConvert(o);
var b = rgb2xyz(o.r),
a = rgb2xyz(o.g),
l = rgb2xyz(o.b),
x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn),
y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.0721750 * l) / Yn),
z = xyz2lab((0.0193339 * b + 0.1191920 * a + 0.9503041 * l) / Zn);
return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);
}
function lab(l, a, b, opacity) {
return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);
}
function Lab(l, a, b, opacity) {
this.l = +l;
this.a = +a;
this.b = +b;
this.opacity = +opacity;
}
define(Lab, lab, extend(Color, {
brighter: function(k) {
return new Lab(this.l + Kn * (k == null ? 1 : k), this.a, this.b, this.opacity);
},
darker: function(k) {
return new Lab(this.l - Kn * (k == null ? 1 : k), this.a, this.b, this.opacity);
},
rgb: function() {
var y = (this.l + 16) / 116,
x = isNaN(this.a) ? y : y + this.a / 500,
z = isNaN(this.b) ? y : y - this.b / 200;
y = Yn * lab2xyz(y);
x = Xn * lab2xyz(x);
z = Zn * lab2xyz(z);
return new Rgb(
xyz2rgb( 3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB
xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),
xyz2rgb( 0.0556434 * x - 0.2040259 * y + 1.0572252 * z),
this.opacity
);
}
}));
function xyz2lab(t) {
return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;
}
function lab2xyz(t) {
return t > t1 ? t * t * t : t2 * (t - t0);
}
function xyz2rgb(x) {
return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);
}
function rgb2xyz(x) {
return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
}
function hclConvert(o) {
if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);
if (!(o instanceof Lab)) o = labConvert(o);
var h = Math.atan2(o.b, o.a) * rad2deg;
return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);
}
function hcl(h, c, l, opacity) {
return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
}
function Hcl(h, c, l, opacity) {
this.h = +h;
this.c = +c;
this.l = +l;
this.opacity = +opacity;
}
define(Hcl, hcl, extend(Color, {
brighter: function(k) {
return new Hcl(this.h, this.c, this.l + Kn * (k == null ? 1 : k), this.opacity);
},
darker: function(k) {
return new Hcl(this.h, this.c, this.l - Kn * (k == null ? 1 : k), this.opacity);
},
rgb: function() {
return labConvert(this).rgb();
}
}));
var A = -0.14861;
var B = +1.78277;
var C = -0.29227;
var D = -0.90649;
var E = +1.97294;
var ED = E * D;
var EB = E * B;
var BC_DA = B * C - D * A;
function cubehelixConvert(o) {
if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);
if (!(o instanceof Rgb)) o = rgbConvert(o);
var r = o.r / 255,
g = o.g / 255,
b = o.b / 255,
l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),
bl = b - l,
k = (E * (g - l) - C * bl) / D,
s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1
h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN;
return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);
}
function cubehelix(h, s, l, opacity) {
return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);
}
function Cubehelix(h, s, l, opacity) {
this.h = +h;
this.s = +s;
this.l = +l;
this.opacity = +opacity;
}
define(Cubehelix, cubehelix, extend(Color, {
brighter: function(k) {
k = k == null ? brighter : Math.pow(brighter, k);
return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
},
darker: function(k) {
k = k == null ? darker : Math.pow(darker, k);
return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
},
rgb: function() {
var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad,
l = +this.l,
a = isNaN(this.s) ? 0 : this.s * l * (1 - l),
cosh = Math.cos(h),
sinh = Math.sin(h);
return new Rgb(
255 * (l + a * (A * cosh + B * sinh)),
255 * (l + a * (C * cosh + D * sinh)),
255 * (l + a * (E * cosh)),
this.opacity
);
}
}));
exports.color = color;
exports.rgb = rgb;
exports.hsl = hsl;
exports.lab = lab;
exports.hcl = hcl;
exports.cubehelix = cubehelix;
Object.defineProperty(exports, '__esModule', { value: true });
}));
/***/ },
/* 245 */
/***/ function(module, exports, __webpack_require__) {
// https://d3js.org/d3-format/ Version 1.0.0. Copyright 2016 Mike Bostock.
(function (global, factory) {
true ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.d3 = global.d3 || {})));
}(this, function (exports) { 'use strict';
// Computes the decimal coefficient and exponent of the specified number x with
// significant digits p, where x is positive and p is in [1, 21] or undefined.
// For example, formatDecimal(1.23) returns ["123", 0].
function formatDecimal(x, p) {
if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity
var i, coefficient = x.slice(0, i);
// The string returned by toExponential either has the form \d\.\d+e[-+]\d+
// (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3).
return [
coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
+x.slice(i + 1)
];
}
function exponent(x) {
return x = formatDecimal(Math.abs(x)), x ? x[1] : NaN;
}
function formatGroup(grouping, thousands) {
return function(value, width) {
var i = value.length,
t = [],
j = 0,
g = grouping[0],
length = 0;
while (i > 0 && g > 0) {
if (length + g + 1 > width) g = Math.max(1, width - length);
t.push(value.substring(i -= g, i + g));
if ((length += g + 1) > width) break;
g = grouping[j = (j + 1) % grouping.length];
}
return t.reverse().join(thousands);
};
}
function formatDefault(x, p) {
x = x.toPrecision(p);
out: for (var n = x.length, i = 1, i0 = -1, i1; i < n; ++i) {
switch (x[i]) {
case ".": i0 = i1 = i; break;
case "0": if (i0 === 0) i0 = i; i1 = i; break;
case "e": break out;
default: if (i0 > 0) i0 = 0; break;
}
}
return i0 > 0 ? x.slice(0, i0) + x.slice(i1 + 1) : x;
}
var prefixExponent;
function formatPrefixAuto(x, p) {
var d = formatDecimal(x, p);
if (!d) return x + "";
var coefficient = d[0],
exponent = d[1],
i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,
n = coefficient.length;
return i === n ? coefficient
: i > n ? coefficient + new Array(i - n + 1).join("0")
: i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i)
: "0." + new Array(1 - i).join("0") + formatDecimal(x, Math.max(0, p + i - 1))[0]; // less than 1y!
}
function formatRounded(x, p) {
var d = formatDecimal(x, p);
if (!d) return x + "";
var coefficient = d[0],
exponent = d[1];
return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient
: coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1)
: coefficient + new Array(exponent - coefficient.length + 2).join("0");
}
var formatTypes = {
"": formatDefault,
"%": function(x, p) { return (x * 100).toFixed(p); },
"b": function(x) { return Math.round(x).toString(2); },
"c": function(x) { return x + ""; },
"d": function(x) { return Math.round(x).toString(10); },
"e": function(x, p) { return x.toExponential(p); },
"f": function(x, p) { return x.toFixed(p); },
"g": function(x, p) { return x.toPrecision(p); },
"o": function(x) { return Math.round(x).toString(8); },
"p": function(x, p) { return formatRounded(x * 100, p); },
"r": formatRounded,
"s": formatPrefixAuto,
"X": function(x) { return Math.round(x).toString(16).toUpperCase(); },
"x": function(x) { return Math.round(x).toString(16); }
};
// [[fill]align][sign][symbol][0][width][,][.precision][type]
var re = /^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;
function formatSpecifier(specifier) {
return new FormatSpecifier(specifier);
}
function FormatSpecifier(specifier) {
if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
var match,
fill = match[1] || " ",
align = match[2] || ">",
sign = match[3] || "-",
symbol = match[4] || "",
zero = !!match[5],
width = match[6] && +match[6],
comma = !!match[7],
precision = match[8] && +match[8].slice(1),
type = match[9] || "";
// The "n" type is an alias for ",g".
if (type === "n") comma = true, type = "g";
// Map invalid types to the default format.
else if (!formatTypes[type]) type = "";
// If zero fill is specified, padding goes after sign and before digits.
if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "=";
this.fill = fill;
this.align = align;
this.sign = sign;
this.symbol = symbol;
this.zero = zero;
this.width = width;
this.comma = comma;
this.precision = precision;
this.type = type;
}
FormatSpecifier.prototype.toString = function() {
return this.fill
+ this.align
+ this.sign
+ this.symbol
+ (this.zero ? "0" : "")
+ (this.width == null ? "" : Math.max(1, this.width | 0))
+ (this.comma ? "," : "")
+ (this.precision == null ? "" : "." + Math.max(0, this.precision | 0))
+ this.type;
};
var prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];
function identity(x) {
return x;
}
function formatLocale(locale) {
var group = locale.grouping && locale.thousands ? formatGroup(locale.grouping, locale.thousands) : identity,
currency = locale.currency,
decimal = locale.decimal;
function newFormat(specifier) {
specifier = formatSpecifier(specifier);
var fill = specifier.fill,
align = specifier.align,
sign = specifier.sign,
symbol = specifier.symbol,
zero = specifier.zero,
width = specifier.width,
comma = specifier.comma,
precision = specifier.precision,
type = specifier.type;
// Compute the prefix and suffix.
// For SI-prefix, the suffix is lazily computed.
var prefix = symbol === "$" ? currency[0] : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "",
suffix = symbol === "$" ? currency[1] : /[%p]/.test(type) ? "%" : "";
// What format function should we use?
// Is this an integer type?
// Can this type generate exponential notation?
var formatType = formatTypes[type],
maybeSuffix = !type || /[defgprs%]/.test(type);
// Set the default precision if not specified,
// or clamp the specified precision to the supported range.
// For significant precision, it must be in [1, 21].
// For fixed precision, it must be in [0, 20].
precision = precision == null ? (type ? 6 : 12)
: /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))
: Math.max(0, Math.min(20, precision));
function format(value) {
var valuePrefix = prefix,
valueSuffix = suffix,
i, n, c;
if (type === "c") {
valueSuffix = formatType(value) + valueSuffix;
value = "";
} else {
value = +value;
// Convert negative to positive, and compute the prefix.
// Note that -0 is not less than 0, but 1 / -0 is!
var valueNegative = (value < 0 || 1 / value < 0) && (value *= -1, true);
// Perform the initial formatting.
value = formatType(value, precision);
// If the original value was negative, it may be rounded to zero during
// formatting; treat this as (positive) zero.
if (valueNegative) {
i = -1, n = value.length;
valueNegative = false;
while (++i < n) {
if (c = value.charCodeAt(i), (48 < c && c < 58)
|| (type === "x" && 96 < c && c < 103)
|| (type === "X" && 64 < c && c < 71)) {
valueNegative = true;
break;
}
}
}
// Compute the prefix and suffix.
valuePrefix = (valueNegative ? (sign === "(" ? sign : "-") : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
valueSuffix = valueSuffix + (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + (valueNegative && sign === "(" ? ")" : "");
// Break the formatted value into the integer “value” part that can be
// grouped, and fractional or exponential “suffix” part that is not.
if (maybeSuffix) {
i = -1, n = value.length;
while (++i < n) {
if (c = value.charCodeAt(i), 48 > c || c > 57) {
valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;
value = value.slice(0, i);
break;
}
}
}
}
// If the fill character is not "0", grouping is applied before padding.
if (comma && !zero) value = group(value, Infinity);
// Compute the padding.
var length = valuePrefix.length + value.length + valueSuffix.length,
padding = length < width ? new Array(width - length + 1).join(fill) : "";
// If the fill character is "0", grouping is applied after padding.
if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = "";
// Reconstruct the final output based on the desired alignment.
switch (align) {
case "<": return valuePrefix + value + valueSuffix + padding;
case "=": return valuePrefix + padding + value + valueSuffix;
case "^": return padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length);
}
return padding + valuePrefix + value + valueSuffix;
}
format.toString = function() {
return specifier + "";
};
return format;
}
function formatPrefix(specifier, value) {
var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)),
e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,
k = Math.pow(10, -e),
prefix = prefixes[8 + e / 3];
return function(value) {
return f(k * value) + prefix;
};
}
return {
format: newFormat,
formatPrefix: formatPrefix
};
}
var locale;
exports.format;
exports.formatPrefix;
defaultLocale({
decimal: ".",
thousands: ",",
grouping: [3],
currency: ["$", ""]
});
function defaultLocale(definition) {
locale = formatLocale(definition);
exports.format = locale.format;
exports.formatPrefix = locale.formatPrefix;
return locale;
}
function precisionFixed(step) {
return Math.max(0, -exponent(Math.abs(step)));
}
function precisionPrefix(step, value) {
return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));
}
function precisionRound(step, max) {
step = Math.abs(step), max = Math.abs(max) - step;
return Math.max(0, exponent(max) - exponent(step)) + 1;
}
exports.formatDefaultLocale = defaultLocale;
exports.formatLocale = formatLocale;
exports.formatSpecifier = formatSpecifier;
exports.precisionFixed = precisionFixed;
exports.precisionPrefix = precisionPrefix;
exports.precisionRound = precisionRound;
Object.defineProperty(exports, '__esModule', { value: true });
}));
/***/ },
/* 246 */
/***/ function(module, exports, __webpack_require__) {
// https://d3js.org/d3-time/ Version 1.0.0. Copyright 2016 Mike Bostock.
(function (global, factory) {
true ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.d3 = global.d3 || {})));
}(this, function (exports) { 'use strict';
var t0 = new Date;
var t1 = new Date;
function newInterval(floori, offseti, count, field) {
function interval(date) {
return floori(date = new Date(+date)), date;
}
interval.floor = interval;
interval.ceil = function(date) {
return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;
};
interval.round = function(date) {
var d0 = interval(date),
d1 = interval.ceil(date);
return date - d0 < d1 - date ? d0 : d1;
};
interval.offset = function(date, step) {
return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;
};
interval.range = function(start, stop, step) {
var range = [];
start = interval.ceil(start);
step = step == null ? 1 : Math.floor(step);
if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date
do range.push(new Date(+start)); while (offseti(start, step), floori(start), start < stop)
return range;
};
interval.filter = function(test) {
return newInterval(function(date) {
while (floori(date), !test(date)) date.setTime(date - 1);
}, function(date, step) {
while (--step >= 0) while (offseti(date, 1), !test(date));
});
};
if (count) {
interval.count = function(start, end) {
t0.setTime(+start), t1.setTime(+end);
floori(t0), floori(t1);
return Math.floor(count(t0, t1));
};
interval.every = function(step) {
step = Math.floor(step);
return !isFinite(step) || !(step > 0) ? null
: !(step > 1) ? interval
: interval.filter(field
? function(d) { return field(d) % step === 0; }
: function(d) { return interval.count(0, d) % step === 0; });
};
}
return interval;
}
var millisecond = newInterval(function() {
// noop
}, function(date, step) {
date.setTime(+date + step);
}, function(start, end) {
return end - start;
});
// An optimized implementation for this simple case.
millisecond.every = function(k) {
k = Math.floor(k);
if (!isFinite(k) || !(k > 0)) return null;
if (!(k > 1)) return millisecond;
return newInterval(function(date) {
date.setTime(Math.floor(date / k) * k);
}, function(date, step) {
date.setTime(+date + step * k);
}, function(start, end) {
return (end - start) / k;
});
};
var milliseconds = millisecond.range;
var durationSecond = 1e3;
var durationMinute = 6e4;
var durationHour = 36e5;
var durationDay = 864e5;
var durationWeek = 6048e5;
var second = newInterval(function(date) {
date.setTime(Math.floor(date / durationSecond) * durationSecond);
}, function(date, step) {
date.setTime(+date + step * durationSecond);
}, function(start, end) {
return (end - start) / durationSecond;
}, function(date) {
return date.getUTCSeconds();
});
var seconds = second.range;
var minute = newInterval(function(date) {
date.setTime(Math.floor(date / durationMinute) * durationMinute);
}, function(date, step) {
date.setTime(+date + step * durationMinute);
}, function(start, end) {
return (end - start) / durationMinute;
}, function(date) {
return date.getMinutes();
});
var minutes = minute.range;
var hour = newInterval(function(date) {
var offset = date.getTimezoneOffset() * durationMinute % durationHour;
if (offset < 0) offset += durationHour;
date.setTime(Math.floor((+date - offset) / durationHour) * durationHour + offset);
}, function(date, step) {
date.setTime(+date + step * durationHour);
}, function(start, end) {
return (end - start) / durationHour;
}, function(date) {
return date.getHours();
});
var hours = hour.range;
var day = newInterval(function(date) {
date.setHours(0, 0, 0, 0);
}, function(date, step) {
date.setDate(date.getDate() + step);
}, function(start, end) {
return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay;
}, function(date) {
return date.getDate() - 1;
});
var days = day.range;
function weekday(i) {
return newInterval(function(date) {
date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);
date.setHours(0, 0, 0, 0);
}, function(date, step) {
date.setDate(date.getDate() + step * 7);
}, function(start, end) {
return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;
});
}
var sunday = weekday(0);
var monday = weekday(1);
var tuesday = weekday(2);
var wednesday = weekday(3);
var thursday = weekday(4);
var friday = weekday(5);
var saturday = weekday(6);
var sundays = sunday.range;
var mondays = monday.range;
var tuesdays = tuesday.range;
var wednesdays = wednesday.range;
var thursdays = thursday.range;
var fridays = friday.range;
var saturdays = saturday.range;
var month = newInterval(function(date) {
date.setDate(1);
date.setHours(0, 0, 0, 0);
}, function(date, step) {
date.setMonth(date.getMonth() + step);
}, function(start, end) {
return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;
}, function(date) {
return date.getMonth();
});
var months = month.range;
var year = newInterval(function(date) {
date.setMonth(0, 1);
date.setHours(0, 0, 0, 0);
}, function(date, step) {
date.setFullYear(date.getFullYear() + step);
}, function(start, end) {
return end.getFullYear() - start.getFullYear();
}, function(date) {
return date.getFullYear();
});
// An optimized implementation for this simple case.
year.every = function(k) {
return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) {
date.setFullYear(Math.floor(date.getFullYear() / k) * k);
date.setMonth(0, 1);
date.setHours(0, 0, 0, 0);
}, function(date, step) {
date.setFullYear(date.getFullYear() + step * k);
});
};
var years = year.range;
var utcMinute = newInterval(function(date) {
date.setUTCSeconds(0, 0);
}, function(date, step) {
date.setTime(+date + step * durationMinute);
}, function(start, end) {
return (end - start) / durationMinute;
}, function(date) {
return date.getUTCMinutes();
});
var utcMinutes = utcMinute.range;
var utcHour = newInterval(function(date) {
date.setUTCMinutes(0, 0, 0);
}, function(date, step) {
date.setTime(+date + step * durationHour);
}, function(start, end) {
return (end - start) / durationHour;
}, function(date) {
return date.getUTCHours();
});
var utcHours = utcHour.range;
var utcDay = newInterval(function(date) {
date.setUTCHours(0, 0, 0, 0);
}, function(date, step) {
date.setUTCDate(date.getUTCDate() + step);
}, function(start, end) {
return (end - start) / durationDay;
}, function(date) {
return date.getUTCDate() - 1;
});
var utcDays = utcDay.range;
function utcWeekday(i) {
return newInterval(function(date) {
date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);
date.setUTCHours(0, 0, 0, 0);
}, function(date, step) {
date.setUTCDate(date.getUTCDate() + step * 7);
}, function(start, end) {
return (end - start) / durationWeek;
});
}
var utcSunday = utcWeekday(0);
var utcMonday = utcWeekday(1);
var utcTuesday = utcWeekday(2);
var utcWednesday = utcWeekday(3);
var utcThursday = utcWeekday(4);
var utcFriday = utcWeekday(5);
var utcSaturday = utcWeekday(6);
var utcSundays = utcSunday.range;
var utcMondays = utcMonday.range;
var utcTuesdays = utcTuesday.range;
var utcWednesdays = utcWednesday.range;
var utcThursdays = utcThursday.range;
var utcFridays = utcFriday.range;
var utcSaturdays = utcSaturday.range;
var utcMonth = newInterval(function(date) {
date.setUTCDate(1);
date.setUTCHours(0, 0, 0, 0);
}, function(date, step) {
date.setUTCMonth(date.getUTCMonth() + step);
}, function(start, end) {
return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;
}, function(date) {
return date.getUTCMonth();
});
var utcMonths = utcMonth.range;
var utcYear = newInterval(function(date) {
date.setUTCMonth(0, 1);
date.setUTCHours(0, 0, 0, 0);
}, function(date, step) {
date.setUTCFullYear(date.getUTCFullYear() + step);
}, function(start, end) {
return end.getUTCFullYear() - start.getUTCFullYear();
}, function(date) {
return date.getUTCFullYear();
});
// An optimized implementation for this simple case.
utcYear.every = function(k) {
return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) {
date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);
date.setUTCMonth(0, 1);
date.setUTCHours(0, 0, 0, 0);
}, function(date, step) {
date.setUTCFullYear(date.getUTCFullYear() + step * k);
});
};
var utcYears = utcYear.range;
exports.timeInterval = newInterval;
exports.timeMillisecond = millisecond;
exports.timeMilliseconds = milliseconds;
exports.utcMillisecond = millisecond;
exports.utcMilliseconds = milliseconds;
exports.timeSecond = second;
exports.timeSeconds = seconds;
exports.utcSecond = second;
exports.utcSeconds = seconds;
exports.timeMinute = minute;
exports.timeMinutes = minutes;
exports.timeHour = hour;
exports.timeHours = hours;
exports.timeDay = day;
exports.timeDays = days;
exports.timeWeek = sunday;
exports.timeWeeks = sundays;
exports.timeSunday = sunday;
exports.timeSundays = sundays;
exports.timeMonday = monday;
exports.timeMondays = mondays;
exports.timeTuesday = tuesday;
exports.timeTuesdays = tuesdays;
exports.timeWednesday = wednesday;
exports.timeWednesdays = wednesdays;
exports.timeThursday = thursday;
exports.timeThursdays = thursdays;
exports.timeFriday = friday;
exports.timeFridays = fridays;
exports.timeSaturday = saturday;
exports.timeSaturdays = saturdays;
exports.timeMonth = month;
exports.timeMonths = months;
exports.timeYear = year;
exports.timeYears = years;
exports.utcMinute = utcMinute;
exports.utcMinutes = utcMinutes;
exports.utcHour = utcHour;
exports.utcHours = utcHours;
exports.utcDay = utcDay;
exports.utcDays = utcDays;
exports.utcWeek = utcSunday;
exports.utcWeeks = utcSundays;
exports.utcSunday = utcSunday;
exports.utcSundays = utcSundays;
exports.utcMonday = utcMonday;
exports.utcMondays = utcMondays;
exports.utcTuesday = utcTuesday;
exports.utcTuesdays = utcTuesdays;
exports.utcWednesday = utcWednesday;
exports.utcWednesdays = utcWednesdays;
exports.utcThursday = utcThursday;
exports.utcThursdays = utcThursdays;
exports.utcFriday = utcFriday;
exports.utcFridays = utcFridays;
exports.utcSaturday = utcSaturday;
exports.utcSaturdays = utcSaturdays;
exports.utcMonth = utcMonth;
exports.utcMonths = utcMonths;
exports.utcYear = utcYear;
exports.utcYears = utcYears;
Object.defineProperty(exports, '__esModule', { value: true });
}));
/***/ },
/* 247 */
/***/ function(module, exports, __webpack_require__) {
// https://d3js.org/d3-time-format/ Version 2.0.0. Copyright 2016 Mike Bostock.
(function (global, factory) {
true ? factory(exports, __webpack_require__(246)) :
typeof define === 'function' && define.amd ? define(['exports', 'd3-time'], factory) :
(factory((global.d3 = global.d3 || {}),global.d3));
}(this, function (exports,d3Time) { 'use strict';
function localDate(d) {
if (0 <= d.y && d.y < 100) {
var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);
date.setFullYear(d.y);
return date;
}
return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);
}
function utcDate(d) {
if (0 <= d.y && d.y < 100) {
var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));
date.setUTCFullYear(d.y);
return date;
}
return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));
}
function newYear(y) {
return {y: y, m: 0, d: 1, H: 0, M: 0, S: 0, L: 0};
}
function formatLocale(locale) {
var locale_dateTime = locale.dateTime,
locale_date = locale.date,
locale_time = locale.time,
locale_periods = locale.periods,
locale_weekdays = locale.days,
locale_shortWeekdays = locale.shortDays,
locale_months = locale.months,
locale_shortMonths = locale.shortMonths;
var periodRe = formatRe(locale_periods),
periodLookup = formatLookup(locale_periods),
weekdayRe = formatRe(locale_weekdays),
weekdayLookup = formatLookup(locale_weekdays),
shortWeekdayRe = formatRe(locale_shortWeekdays),
shortWeekdayLookup = formatLookup(locale_shortWeekdays),
monthRe = formatRe(locale_months),
monthLookup = formatLookup(locale_months),
shortMonthRe = formatRe(locale_shortMonths),
shortMonthLookup = formatLookup(locale_shortMonths);
var formats = {
"a": formatShortWeekday,
"A": formatWeekday,
"b": formatShortMonth,
"B": formatMonth,
"c": null,
"d": formatDayOfMonth,
"e": formatDayOfMonth,
"H": formatHour24,
"I": formatHour12,
"j": formatDayOfYear,
"L": formatMilliseconds,
"m": formatMonthNumber,
"M": formatMinutes,
"p": formatPeriod,
"S": formatSeconds,
"U": formatWeekNumberSunday,
"w": formatWeekdayNumber,
"W": formatWeekNumberMonday,
"x": null,
"X": null,
"y": formatYear,
"Y": formatFullYear,
"Z": formatZone,
"%": formatLiteralPercent
};
var utcFormats = {
"a": formatUTCShortWeekday,
"A": formatUTCWeekday,
"b": formatUTCShortMonth,
"B": formatUTCMonth,
"c": null,
"d": formatUTCDayOfMonth,
"e": formatUTCDayOfMonth,
"H": formatUTCHour24,
"I": formatUTCHour12,
"j": formatUTCDayOfYear,
"L": formatUTCMilliseconds,
"m": formatUTCMonthNumber,
"M": formatUTCMinutes,
"p": formatUTCPeriod,
"S": formatUTCSeconds,
"U": formatUTCWeekNumberSunday,
"w": formatUTCWeekdayNumber,
"W": formatUTCWeekNumberMonday,
"x": null,
"X": null,
"y": formatUTCYear,
"Y": formatUTCFullYear,
"Z": formatUTCZone,
"%": formatLiteralPercent
};
var parses = {
"a": parseShortWeekday,
"A": parseWeekday,
"b": parseShortMonth,
"B": parseMonth,
"c": parseLocaleDateTime,
"d": parseDayOfMonth,
"e": parseDayOfMonth,
"H": parseHour24,
"I": parseHour24,
"j": parseDayOfYear,
"L": parseMilliseconds,
"m": parseMonthNumber,
"M": parseMinutes,
"p": parsePeriod,
"S": parseSeconds,
"U": parseWeekNumberSunday,
"w": parseWeekdayNumber,
"W": parseWeekNumberMonday,
"x": parseLocaleDate,
"X": parseLocaleTime,
"y": parseYear,
"Y": parseFullYear,
"Z": parseZone,
"%": parseLiteralPercent
};
// These recursive directive definitions must be deferred.
formats.x = newFormat(locale_date, formats);
formats.X = newFormat(locale_time, formats);
formats.c = newFormat(locale_dateTime, formats);
utcFormats.x = newFormat(locale_date, utcFormats);
utcFormats.X = newFormat(locale_time, utcFormats);
utcFormats.c = newFormat(locale_dateTime, utcFormats);
function newFormat(specifier, formats) {
return function(date) {
var string = [],
i = -1,
j = 0,
n = specifier.length,
c,
pad,
format;
if (!(date instanceof Date)) date = new Date(+date);
while (++i < n) {
if (specifier.charCodeAt(i) === 37) {
string.push(specifier.slice(j, i));
if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);
else pad = c === "e" ? " " : "0";
if (format = formats[c]) c = format(date, pad);
string.push(c);
j = i + 1;
}
}
string.push(specifier.slice(j, i));
return string.join("");
};
}
function newParse(specifier, newDate) {
return function(string) {
var d = newYear(1900),
i = parseSpecifier(d, specifier, string += "", 0);
if (i != string.length) return null;
// The am-pm flag is 0 for AM, and 1 for PM.
if ("p" in d) d.H = d.H % 12 + d.p * 12;
// Convert day-of-week and week-of-year to day-of-year.
if ("W" in d || "U" in d) {
if (!("w" in d)) d.w = "W" in d ? 1 : 0;
var day = "Z" in d ? utcDate(newYear(d.y)).getUTCDay() : newDate(newYear(d.y)).getDay();
d.m = 0;
d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;
}
// If a time zone is specified, all fields are interpreted as UTC and then
// offset according to the specified time zone.
if ("Z" in d) {
d.H += d.Z / 100 | 0;
d.M += d.Z % 100;
return utcDate(d);
}
// Otherwise, all fields are in local time.
return newDate(d);
};
}
function parseSpecifier(d, specifier, string, j) {
var i = 0,
n = specifier.length,
m = string.length,
c,
parse;
while (i < n) {
if (j >= m) return -1;
c = specifier.charCodeAt(i++);
if (c === 37) {
c = specifier.charAt(i++);
parse = parses[c in pads ? specifier.charAt(i++) : c];
if (!parse || ((j = parse(d, string, j)) < 0)) return -1;
} else if (c != string.charCodeAt(j++)) {
return -1;
}
}
return j;
}
function parsePeriod(d, string, i) {
var n = periodRe.exec(string.slice(i));
return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;
}
function parseShortWeekday(d, string, i) {
var n = shortWeekdayRe.exec(string.slice(i));
return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;
}
function parseWeekday(d, string, i) {
var n = weekdayRe.exec(string.slice(i));
return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;
}
function parseShortMonth(d, string, i) {
var n = shortMonthRe.exec(string.slice(i));
return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;
}
function parseMonth(d, string, i) {
var n = monthRe.exec(string.slice(i));
return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;
}
function parseLocaleDateTime(d, string, i) {
return parseSpecifier(d, locale_dateTime, string, i);
}
function parseLocaleDate(d, string, i) {
return parseSpecifier(d, locale_date, string, i);
}
function parseLocaleTime(d, string, i) {
return parseSpecifier(d, locale_time, string, i);
}
function formatShortWeekday(d) {
return locale_shortWeekdays[d.getDay()];
}
function formatWeekday(d) {
return locale_weekdays[d.getDay()];
}
function formatShortMonth(d) {
return locale_shortMonths[d.getMonth()];
}
function formatMonth(d) {
return locale_months[d.getMonth()];
}
function formatPeriod(d) {
return locale_periods[+(d.getHours() >= 12)];
}
function formatUTCShortWeekday(d) {
return locale_shortWeekdays[d.getUTCDay()];
}
function formatUTCWeekday(d) {
return locale_weekdays[d.getUTCDay()];
}
function formatUTCShortMonth(d) {
return locale_shortMonths[d.getUTCMonth()];
}
function formatUTCMonth(d) {
return locale_months[d.getUTCMonth()];
}
function formatUTCPeriod(d) {
return locale_periods[+(d.getUTCHours() >= 12)];
}
return {
format: function(specifier) {
var f = newFormat(specifier += "", formats);
f.toString = function() { return specifier; };
return f;
},
parse: function(specifier) {
var p = newParse(specifier += "", localDate);
p.toString = function() { return specifier; };
return p;
},
utcFormat: function(specifier) {
var f = newFormat(specifier += "", utcFormats);
f.toString = function() { return specifier; };
return f;
},
utcParse: function(specifier) {
var p = newParse(specifier, utcDate);
p.toString = function() { return specifier; };
return p;
}
};
}
var pads = {"-": "", "_": " ", "0": "0"};
var numberRe = /^\s*\d+/;
var percentRe = /^%/;
var requoteRe = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;
function pad(value, fill, width) {
var sign = value < 0 ? "-" : "",
string = (sign ? -value : value) + "",
length = string.length;
return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);
}
function requote(s) {
return s.replace(requoteRe, "\\$&");
}
function formatRe(names) {
return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i");
}
function formatLookup(names) {
var map = {}, i = -1, n = names.length;
while (++i < n) map[names[i].toLowerCase()] = i;
return map;
}
function parseWeekdayNumber(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 1));
return n ? (d.w = +n[0], i + n[0].length) : -1;
}
function parseWeekNumberSunday(d, string, i) {
var n = numberRe.exec(string.slice(i));
return n ? (d.U = +n[0], i + n[0].length) : -1;
}
function parseWeekNumberMonday(d, string, i) {
var n = numberRe.exec(string.slice(i));
return n ? (d.W = +n[0], i + n[0].length) : -1;
}
function parseFullYear(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 4));
return n ? (d.y = +n[0], i + n[0].length) : -1;
}
function parseYear(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;
}
function parseZone(d, string, i) {
var n = /^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(string.slice(i, i + 6));
return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1;
}
function parseMonthNumber(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.m = n[0] - 1, i + n[0].length) : -1;
}
function parseDayOfMonth(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.d = +n[0], i + n[0].length) : -1;
}
function parseDayOfYear(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 3));
return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;
}
function parseHour24(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.H = +n[0], i + n[0].length) : -1;
}
function parseMinutes(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.M = +n[0], i + n[0].length) : -1;
}
function parseSeconds(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.S = +n[0], i + n[0].length) : -1;
}
function parseMilliseconds(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 3));
return n ? (d.L = +n[0], i + n[0].length) : -1;
}
function parseLiteralPercent(d, string, i) {
var n = percentRe.exec(string.slice(i, i + 1));
return n ? i + n[0].length : -1;
}
function formatDayOfMonth(d, p) {
return pad(d.getDate(), p, 2);
}
function formatHour24(d, p) {
return pad(d.getHours(), p, 2);
}
function formatHour12(d, p) {
return pad(d.getHours() % 12 || 12, p, 2);
}
function formatDayOfYear(d, p) {
return pad(1 + d3Time.timeDay.count(d3Time.timeYear(d), d), p, 3);
}
function formatMilliseconds(d, p) {
return pad(d.getMilliseconds(), p, 3);
}
function formatMonthNumber(d, p) {
return pad(d.getMonth() + 1, p, 2);
}
function formatMinutes(d, p) {
return pad(d.getMinutes(), p, 2);
}
function formatSeconds(d, p) {
return pad(d.getSeconds(), p, 2);
}
function formatWeekNumberSunday(d, p) {
return pad(d3Time.timeSunday.count(d3Time.timeYear(d), d), p, 2);
}
function formatWeekdayNumber(d) {
return d.getDay();
}
function formatWeekNumberMonday(d, p) {
return pad(d3Time.timeMonday.count(d3Time.timeYear(d), d), p, 2);
}
function formatYear(d, p) {
return pad(d.getFullYear() % 100, p, 2);
}
function formatFullYear(d, p) {
return pad(d.getFullYear() % 10000, p, 4);
}
function formatZone(d) {
var z = d.getTimezoneOffset();
return (z > 0 ? "-" : (z *= -1, "+"))
+ pad(z / 60 | 0, "0", 2)
+ pad(z % 60, "0", 2);
}
function formatUTCDayOfMonth(d, p) {
return pad(d.getUTCDate(), p, 2);
}
function formatUTCHour24(d, p) {
return pad(d.getUTCHours(), p, 2);
}
function formatUTCHour12(d, p) {
return pad(d.getUTCHours() % 12 || 12, p, 2);
}
function formatUTCDayOfYear(d, p) {
return pad(1 + d3Time.utcDay.count(d3Time.utcYear(d), d), p, 3);
}
function formatUTCMilliseconds(d, p) {
return pad(d.getUTCMilliseconds(), p, 3);
}
function formatUTCMonthNumber(d, p) {
return pad(d.getUTCMonth() + 1, p, 2);
}
function formatUTCMinutes(d, p) {
return pad(d.getUTCMinutes(), p, 2);
}
function formatUTCSeconds(d, p) {
return pad(d.getUTCSeconds(), p, 2);
}
function formatUTCWeekNumberSunday(d, p) {
return pad(d3Time.utcSunday.count(d3Time.utcYear(d), d), p, 2);
}
function formatUTCWeekdayNumber(d) {
return d.getUTCDay();
}
function formatUTCWeekNumberMonday(d, p) {
return pad(d3Time.utcMonday.count(d3Time.utcYear(d), d), p, 2);
}
function formatUTCYear(d, p) {
return pad(d.getUTCFullYear() % 100, p, 2);
}
function formatUTCFullYear(d, p) {
return pad(d.getUTCFullYear() % 10000, p, 4);
}
function formatUTCZone() {
return "+0000";
}
function formatLiteralPercent() {
return "%";
}
var locale;
exports.timeFormat;
exports.timeParse;
exports.utcFormat;
exports.utcParse;
defaultLocale({
dateTime: "%x, %X",
date: "%-m/%-d/%Y",
time: "%-I:%M:%S %p",
periods: ["AM", "PM"],
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
});
function defaultLocale(definition) {
locale = formatLocale(definition);
exports.timeFormat = locale.format;
exports.timeParse = locale.parse;
exports.utcFormat = locale.utcFormat;
exports.utcParse = locale.utcParse;
return locale;
}
var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ";
function formatIsoNative(date) {
return date.toISOString();
}
var formatIso = Date.prototype.toISOString
? formatIsoNative
: exports.utcFormat(isoSpecifier);
function parseIsoNative(string) {
var date = new Date(string);
return isNaN(date) ? null : date;
}
var parseIso = +new Date("2000-01-01T00:00:00.000Z")
? parseIsoNative
: exports.utcParse(isoSpecifier);
exports.timeFormatDefaultLocale = defaultLocale;
exports.timeFormatLocale = formatLocale;
exports.isoFormat = formatIso;
exports.isoParse = parseIso;
Object.defineProperty(exports, '__esModule', { value: true });
}));
/***/ },
/* 248 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isNumber2 = __webpack_require__(47);
var _isNumber3 = _interopRequireDefault(_isNumber2);
var _isString2 = __webpack_require__(119);
var _isString3 = _interopRequireDefault(_isString2);
var _isFunction2 = __webpack_require__(49);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Reference Line
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
var _ReactUtils = __webpack_require__(133);
var _DataUtils = __webpack_require__(214);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var ReferenceLine = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(ReferenceLine, _Component);
function ReferenceLine() {
_classCallCheck(this, ReferenceLine);
return _possibleConstructorReturn(this, Object.getPrototypeOf(ReferenceLine).apply(this, arguments));
}
_createClass(ReferenceLine, [{
key: 'getEndPoints',
value: function getEndPoints(isX, isY) {
var _props = this.props;
var xAxis = _props.xAxis;
var yAxis = _props.yAxis;
var viewBox = _props.viewBox;
var x = viewBox.x;
var y = viewBox.y;
var width = viewBox.width;
var height = viewBox.height;
if (isY) {
var value = this.props.y;
var scale = yAxis.scale;
var offset = scale.bandwidth ? scale.bandwidth() / 2 : 0;
var coord = scale(value) + offset;
if ((0, _DataUtils.validateCoordinateInRange)(coord, scale)) {
return yAxis.orientation === 'left' ? [{ x: x, y: coord }, { x: x + width, y: coord }] : [{ x: x + width, y: coord }, { x: x, y: coord }];
}
} else if (isX) {
var _value = this.props.x;
var _scale = xAxis.scale;
var _offset = _scale.bandwidth ? _scale.bandwidth() / 2 : 0;
var _coord = _scale(_value) + _offset;
if ((0, _DataUtils.validateCoordinateInRange)(_coord, _scale)) {
return xAxis.orientation === 'top' ? [{ x: _coord, y: y }, { x: _coord, y: y + height }] : [{ x: _coord, y: y + height }, { x: _coord, y: y }];
}
}
return null;
}
}, {
key: 'getLabelProps',
value: function getLabelProps(isX, isY) {
var _props2 = this.props;
var xAxis = _props2.xAxis;
var yAxis = _props2.yAxis;
var labelPosition = _props2.labelPosition;
if (isY) {
var axis = yAxis;
if (axis.orientation === 'left' && labelPosition === 'end') {
return { dx: 6, dy: 6, textAnchor: 'start' };
}
if (axis.orientation === 'right' && labelPosition === 'start') {
return { dx: 6, dy: 6, textAnchor: 'start' };
}
return { dx: -6, dy: 6, textAnchor: 'end' };
} else if (isX) {
var _axis = xAxis;
if (_axis.orientation === 'top') {
return { dy: 6, textAnchor: 'middle' };
}
return { dy: -6, textAnchor: 'middle' };
}
return null;
}
}, {
key: 'renderLabel',
value: function renderLabel(isX, isY, end) {
var _props3 = this.props;
var label = _props3.label;
var stroke = _props3.stroke;
var props = _extends({}, (0, _ReactUtils.getPresentationAttributes)(label), {
stroke: 'none',
fill: stroke
}, end, this.getLabelProps(isX, isY));
if (_react2.default.isValidElement(label)) {
return _react2.default.cloneElement(label, props);
} else if ((0, _isFunction3.default)(label)) {
return label(props);
} else if ((0, _isString3.default)(label) || (0, _isNumber3.default)(label)) {
return _react2.default.createElement(
'g',
{ className: 'recharts-reference-line-label' },
_react2.default.createElement(
'text',
props,
label
)
);
}
return null;
}
}, {
key: 'render',
value: function render() {
var _props4 = this.props;
var x = _props4.x;
var y = _props4.y;
var labelPosition = _props4.labelPosition;
var isX = (0, _isNumber3.default)(x) || (0, _isString3.default)(x);
var isY = (0, _isNumber3.default)(y) || (0, _isString3.default)(y);
if (!isX && !isY) {
return null;
}
var endPoints = this.getEndPoints(isX, isY);
if (!endPoints) {
return null;
}
var _endPoints = _slicedToArray(endPoints, 2);
var start = _endPoints[0];
var end = _endPoints[1];
var props = (0, _ReactUtils.getPresentationAttributes)(this.props);
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-reference-line' },
_react2.default.createElement('line', _extends({}, props, {
className: 'recharts-reference-line-line',
x1: start.x,
y1: start.y,
x2: end.x,
y2: end.y
})),
this.renderLabel(isX, isY, labelPosition === 'start' ? start : end)
);
}
}]);
return ReferenceLine;
}(_react.Component), _class2.displayName = 'ReferenceLine', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, {
viewBox: _react.PropTypes.shape({
x: _react.PropTypes.number,
y: _react.PropTypes.number,
width: _react.PropTypes.number,
height: _react.PropTypes.number
}),
label: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string, _react.PropTypes.element, _react.PropTypes.func]),
xAxis: _react.PropTypes.object,
yAxis: _react.PropTypes.object,
isFront: _react.PropTypes.bool,
alwaysShow: _react.PropTypes.bool,
x: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
y: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
yAxisId: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
xAxisId: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
labelPosition: _react.PropTypes.oneOf(['start', 'end'])
}), _class2.defaultProps = {
isFront: false,
alwaysShow: false,
xAxisId: 0,
yAxisId: 0,
fill: 'none',
stroke: '#ccc',
fillOpacity: 1,
strokeWidth: 1,
labelPosition: 'end'
}, _temp)) || _class;
exports.default = ReferenceLine;
/***/ },
/* 249 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isNumber2 = __webpack_require__(47);
var _isNumber3 = _interopRequireDefault(_isNumber2);
var _isString2 = __webpack_require__(119);
var _isString3 = _interopRequireDefault(_isString2);
var _isFunction2 = __webpack_require__(49);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Reference Line
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
var _Dot = __webpack_require__(222);
var _Dot2 = _interopRequireDefault(_Dot);
var _ReactUtils = __webpack_require__(133);
var _DataUtils = __webpack_require__(214);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var ReferenceDot = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(ReferenceDot, _Component);
function ReferenceDot() {
_classCallCheck(this, ReferenceDot);
return _possibleConstructorReturn(this, Object.getPrototypeOf(ReferenceDot).apply(this, arguments));
}
_createClass(ReferenceDot, [{
key: 'getCoordinate',
value: function getCoordinate() {
var _props = this.props;
var x = _props.x;
var y = _props.y;
var xAxis = _props.xAxis;
var yAxis = _props.yAxis;
var xScale = xAxis.scale;
var yScale = yAxis.scale;
var result = {
cx: xScale(x) + (xScale.bandwidth ? xScale.bandwidth() / 2 : 0),
cy: yScale(y) + (yScale.bandwidth ? yScale.bandwidth() / 2 : 0)
};
if ((0, _DataUtils.validateCoordinateInRange)(result.cx, xScale) && (0, _DataUtils.validateCoordinateInRange)(result.cy, yScale)) {
return result;
}
return null;
}
}, {
key: 'renderLabel',
value: function renderLabel(coordinate) {
var _props2 = this.props;
var label = _props2.label;
var stroke = _props2.stroke;
var props = _extends({}, (0, _ReactUtils.getPresentationAttributes)(label), {
stroke: 'none',
fill: stroke,
x: coordinate.cx,
y: coordinate.cy,
textAnchor: 'middle'
});
if (_react2.default.isValidElement(label)) {
return _react2.default.cloneElement(label, props);
} else if ((0, _isFunction3.default)(label)) {
return label(props);
} else if ((0, _isString3.default)(label) || (0, _isNumber3.default)(label)) {
return _react2.default.createElement(
'g',
{ className: 'recharts-reference-dot-label' },
_react2.default.createElement(
'text',
props,
label
)
);
}
return null;
}
}, {
key: 'renderDot',
value: function renderDot(option, props) {
var dot = void 0;
if (_react2.default.isValidElement(option)) {
dot = _react2.default.cloneElement(option, props);
} else if ((0, _isFunction3.default)(option)) {
dot = option(props);
} else {
dot = _react2.default.createElement(_Dot2.default, _extends({}, props, {
cx: props.cx,
cy: props.cy,
className: 'recharts-reference-dot-dot'
}));
}
return dot;
}
}, {
key: 'render',
value: function render() {
var _props3 = this.props;
var x = _props3.x;
var y = _props3.y;
var isX = (0, _isNumber3.default)(x) || (0, _isString3.default)(x);
var isY = (0, _isNumber3.default)(y) || (0, _isString3.default)(y);
if (!isX || !isY) {
return null;
}
var coordinate = this.getCoordinate();
if (!coordinate) {
return null;
}
var shape = this.props.shape;
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-reference-dot' },
this.renderDot(shape, _extends({}, (0, _ReactUtils.getPresentationAttributes)(this.props), coordinate)),
this.renderLabel(coordinate)
);
}
}]);
return ReferenceDot;
}(_react.Component), _class2.displayName = 'ReferenceDot', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, {
r: _react.PropTypes.number,
label: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string, _react.PropTypes.func, _react.PropTypes.element]),
xAxis: _react.PropTypes.object,
yAxis: _react.PropTypes.object,
isFront: _react.PropTypes.bool,
alwaysShow: _react.PropTypes.bool,
x: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
y: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
yAxisId: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
xAxisId: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
shape: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.element])
}), _class2.defaultProps = {
isFront: false,
alwaysShow: false,
xAxisId: 0,
yAxisId: 0,
r: 10,
fill: '#fff',
stroke: '#ccc',
fillOpacity: 1,
strokeWidth: 1
}, _temp)) || _class;
exports.default = ReferenceDot;
/***/ },
/* 250 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isString2 = __webpack_require__(119);
var _isString3 = _interopRequireDefault(_isString2);
var _isFunction2 = __webpack_require__(49);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _isNumber2 = __webpack_require__(47);
var _isNumber3 = _interopRequireDefault(_isNumber2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Cartesian Axis
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _DOMUtils = __webpack_require__(134);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
var _ReactUtils = __webpack_require__(133);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var CartesianAxis = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(CartesianAxis, _Component);
function CartesianAxis() {
_classCallCheck(this, CartesianAxis);
return _possibleConstructorReturn(this, Object.getPrototypeOf(CartesianAxis).apply(this, arguments));
}
_createClass(CartesianAxis, [{
key: 'getTickLineCoord',
/**
* Calculate the coordinates of endpoints in ticks
* @param {Object} data The data of a simple tick
* @return {Object} (x1, y1): The coordinate of endpoint close to tick text
* (x2, y2): The coordinate of endpoint close to axis
*/
value: function getTickLineCoord(data) {
var _props = this.props;
var x = _props.x;
var y = _props.y;
var width = _props.width;
var height = _props.height;
var orientation = _props.orientation;
var tickSize = _props.tickSize;
var x1 = void 0;
var x2 = void 0;
var y1 = void 0;
var y2 = void 0;
var finalTickSize = data.tickSize || tickSize;
switch (orientation) {
case 'top':
x1 = x2 = data.coordinate;
y1 = y + height - finalTickSize;
y2 = y + height;
break;
case 'left':
y1 = y2 = data.coordinate;
x1 = x + width - finalTickSize;
x2 = x + width;
break;
case 'right':
y1 = y2 = data.coordinate;
x1 = x + finalTickSize;
x2 = x;
break;
default:
x1 = x2 = data.coordinate;
y1 = y + finalTickSize;
y2 = y;
break;
}
return { x1: x1, y1: y1, x2: x2, y2: y2 };
}
}, {
key: 'getBaseline',
value: function getBaseline() {
var orientation = this.props.orientation;
var baseline = void 0;
switch (orientation) {
case 'top':
baseline = 'auto';
break;
case 'bottom':
baseline = 'text-before-edge';
break;
default:
baseline = 'central';
break;
}
return baseline;
}
}, {
key: 'getTickTextAnchor',
value: function getTickTextAnchor() {
var orientation = this.props.orientation;
var textAnchor = void 0;
switch (orientation) {
case 'left':
textAnchor = 'end';
break;
case 'right':
textAnchor = 'start';
break;
default:
textAnchor = 'middle';
break;
}
return textAnchor;
}
}, {
key: 'getDy',
value: function getDy() {
var orientation = this.props.orientation;
var dy = 0;
switch (orientation) {
case 'left':
case 'right':
dy = 8;
break;
case 'top':
dy = -2;
break;
default:
dy = 15;
break;
}
return dy;
}
}, {
key: 'getLabelProps',
value: function getLabelProps() {
var _props2 = this.props;
var x = _props2.x;
var y = _props2.y;
var width = _props2.width;
var height = _props2.height;
var orientation = _props2.orientation;
switch (orientation) {
case 'left':
return { x: x + width, y: y - 6, textAnchor: 'middle' };
case 'right':
return { x: x, y: y - 6, textAnchor: 'middle' };
case 'top':
return { x: x + width + 6, y: y + height + 6, textAnchor: 'start' };
default:
return { x: x + width + 6, y: y + 6, textAnchor: 'start' };
}
}
}, {
key: 'renderAxisLine',
value: function renderAxisLine() {
var _props3 = this.props;
var x = _props3.x;
var y = _props3.y;
var width = _props3.width;
var height = _props3.height;
var orientation = _props3.orientation;
var axisLine = _props3.axisLine;
var props = _extends({}, (0, _ReactUtils.getPresentationAttributes)(this.props), {
fill: 'none'
}, (0, _ReactUtils.getPresentationAttributes)(axisLine));
switch (orientation) {
case 'top':
props = _extends({}, props, { x1: x, y1: y + height, x2: x + width, y2: y + height });
break;
case 'left':
props = _extends({}, props, { x1: x + width, y1: y, x2: x + width, y2: y + height });
break;
case 'right':
props = _extends({}, props, { x1: x, y1: y, x2: x, y2: y + height });
break;
default:
props = _extends({}, props, { x1: x, y1: y, x2: x + width, y2: y });
break;
}
return _react2.default.createElement('line', _extends({ className: 'recharts-cartesian-axis-line' }, props));
}
}, {
key: 'renderTickItem',
value: function renderTickItem(option, props, value) {
var tickItem = void 0;
if (_react2.default.isValidElement(option)) {
tickItem = _react2.default.cloneElement(option, props);
} else if ((0, _isFunction3.default)(option)) {
tickItem = option(props);
} else {
tickItem = _react2.default.createElement(
'text',
_extends({}, (0, _ReactUtils.getPresentationAttributes)(props), {
className: 'recharts-cartesian-axis-tick-value'
}),
value
);
}
return tickItem;
}
}, {
key: 'renderTicks',
value: function renderTicks() {
var _this2 = this;
var _props4 = this.props;
var ticks = _props4.ticks;
var tickLine = _props4.tickLine;
var stroke = _props4.stroke;
var tick = _props4.tick;
var tickFormatter = _props4.tickFormatter;
var finalTicks = CartesianAxis.getTicks(this.props);
var textAnchor = this.getTickTextAnchor();
var axisProps = (0, _ReactUtils.getPresentationAttributes)(this.props);
var customTickProps = (0, _ReactUtils.getPresentationAttributes)(tick);
var tickLineProps = _extends({}, axisProps, { fill: 'none' }, (0, _ReactUtils.getPresentationAttributes)(tickLine));
var items = finalTicks.map(function (entry, i) {
var lineCoord = _this2.getTickLineCoord(entry);
var tickProps = _extends({
dy: _this2.getDy(entry), textAnchor: textAnchor
}, axisProps, {
stroke: 'none', fill: stroke
}, customTickProps, {
index: i, x: lineCoord.x1, y: lineCoord.y1, payload: entry
});
return _react2.default.createElement(
'g',
{ className: 'recharts-cartesian-axis-tick', key: 'tick-' + i },
tickLine && _react2.default.createElement('line', _extends({
className: 'recharts-cartesian-axis-tick-line'
}, tickLineProps, lineCoord)),
tick && _this2.renderTickItem(tick, tickProps, (0, _isFunction3.default)(tickFormatter) ? tickFormatter(entry.value) : entry.value)
);
});
return _react2.default.createElement(
'g',
{ className: 'recharts-cartesian-axis-ticks' },
items
);
}
}, {
key: 'renderLabel',
value: function renderLabel() {
var _props5 = this.props;
var label = _props5.label;
var stroke = _props5.stroke;
var orientation = _props5.orientation;
var viewBox = _props5.viewBox;
var presentation = (0, _ReactUtils.getPresentationAttributes)(this.props);
if (_react2.default.isValidElement(label)) {
return _react2.default.cloneElement(label, _extends({}, presentation, { orientation: orientation, viewBox: viewBox }));
} else if ((0, _isFunction3.default)(label)) {
return label(this.props);
} else if ((0, _isString3.default)(label) || (0, _isNumber3.default)(label)) {
var props = _extends({}, presentation, {
stroke: 'none',
fill: stroke
}, this.getLabelProps());
return _react2.default.createElement(
'g',
{ className: 'recharts-cartesian-axis-label' },
_react2.default.createElement(
'text',
props,
label
)
);
}
return null;
}
}, {
key: 'render',
value: function render() {
var _props6 = this.props;
var axisLine = _props6.axisLine;
var width = _props6.width;
var height = _props6.height;
var ticks = _props6.ticks;
var label = _props6.label;
if (width <= 0 || height <= 0 || !ticks || !ticks.length) {
return null;
}
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-cartesian-axis' },
axisLine && this.renderAxisLine(),
this.renderTicks(),
this.renderLabel()
);
}
}], [{
key: 'getTicks',
value: function getTicks(props) {
var ticks = props.ticks;
var viewBox = props.viewBox;
var minTickGap = props.minTickGap;
var orientation = props.orientation;
var interval = props.interval;
var tickFormatter = props.tickFormatter;
if (!ticks || !ticks.length) {
return [];
}
return (0, _isNumber3.default)(interval) || (0, _ReactUtils.isSsr)() ? CartesianAxis.getNumberIntervalTicks(ticks, (0, _isNumber3.default)(interval) ? interval : 0) : CartesianAxis.getAutoIntervalTicks(ticks, tickFormatter, viewBox, orientation, minTickGap);
}
}, {
key: 'getNumberIntervalTicks',
value: function getNumberIntervalTicks(ticks, interval) {
return ticks.filter(function (entry, i) {
return i % (interval + 1) === 0;
});
}
}, {
key: 'getAutoIntervalTicks',
value: function getAutoIntervalTicks(ticks, tickFormatter, viewBox, orientation, minTickGap) {
var x = viewBox.x;
var y = viewBox.y;
var width = viewBox.width;
var height = viewBox.height;
var sizeKey = orientation === 'top' || orientation === 'bottom' ? 'width' : 'height';
var sign = ticks.length >= 2 ? Math.sign(ticks[1].coordinate - ticks[0].coordinate) : 1;
var pointer = void 0;
if (sign === 1) {
pointer = sizeKey === 'width' ? x : y;
} else {
pointer = sizeKey === 'width' ? x + width : y + height;
}
return ticks.filter(function (entry) {
var tickContent = (0, _isFunction3.default)(tickFormatter) ? tickFormatter(entry.value) : entry.value;
var tickSize = (0, _DOMUtils.getStringSize)(tickContent)[sizeKey];
var isShow = sign === 1 ? entry.coordinate - tickSize / 2 >= pointer : entry.coordinate + tickSize / 2 <= pointer;
if (isShow) {
pointer = entry.coordinate + sign * tickSize / 2 + minTickGap;
}
return isShow;
});
}
}]);
return CartesianAxis;
}(_react.Component), _class2.displayName = 'CartesianAxis', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, {
x: _react.PropTypes.number,
y: _react.PropTypes.number,
width: _react.PropTypes.number,
height: _react.PropTypes.number,
orientation: _react.PropTypes.oneOf(['top', 'bottom', 'left', 'right']),
viewBox: _react.PropTypes.shape({
x: _react.PropTypes.number,
y: _react.PropTypes.number,
width: _react.PropTypes.number,
height: _react.PropTypes.number
}),
label: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string, _react.PropTypes.func, _react.PropTypes.element]),
tick: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.func, _react.PropTypes.object, _react.PropTypes.element]),
axisLine: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.object]),
tickLine: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.object]),
minLabelGap: _react.PropTypes.number,
ticks: _react.PropTypes.arrayOf(_react.PropTypes.shape({
value: _react.PropTypes.any,
coordinate: _react.PropTypes.value
})),
tickSize: _react.PropTypes.number,
stroke: _react.PropTypes.string,
tickFormatter: _react.PropTypes.func,
interval: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string])
}), _class2.defaultProps = {
x: 0,
y: 0,
width: 0,
height: 0,
viewBox: { x: 0, y: 0, width: 0, height: 0 },
// The orientation of axis
orientation: 'bottom',
// The ticks
ticks: [],
stroke: '#666',
tickLine: true,
axisLine: true,
tick: true,
minTickGap: 5,
// The width or height of tick
tickSize: 6,
interval: 'auto'
}, _temp)) || _class;
exports.default = CartesianAxis;
/***/ },
/* 251 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Cartesian Grid
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _ReactUtils = __webpack_require__(133);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var CartesianGrid = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(CartesianGrid, _Component);
function CartesianGrid() {
_classCallCheck(this, CartesianGrid);
return _possibleConstructorReturn(this, Object.getPrototypeOf(CartesianGrid).apply(this, arguments));
}
_createClass(CartesianGrid, [{
key: 'renderHorizontal',
/**
* Draw the horizontal grid lines
* @return {Group} Horizontal lines
*/
value: function renderHorizontal() {
var _props = this.props;
var x = _props.x;
var width = _props.width;
var horizontalPoints = _props.horizontalPoints;
if (!horizontalPoints || !horizontalPoints.length) {
return null;
}
var props = (0, _ReactUtils.getPresentationAttributes)(this.props);
var items = horizontalPoints.map(function (entry, i) {
return _react2.default.createElement('line', _extends({}, props, { key: 'line-' + i, x1: x, y1: entry, x2: x + width, y2: entry }));
});
return _react2.default.createElement(
'g',
{ className: 'recharts-cartesian-grid-horizontal' },
items
);
}
/**
* Draw vertical grid lines
* @return {Group} Vertical lines
*/
}, {
key: 'renderVertical',
value: function renderVertical() {
var _props2 = this.props;
var y = _props2.y;
var height = _props2.height;
var verticalPoints = _props2.verticalPoints;
if (!verticalPoints || !verticalPoints.length) {
return null;
}
var props = (0, _ReactUtils.getPresentationAttributes)(this.props);
var items = verticalPoints.map(function (entry, i) {
return _react2.default.createElement('line', _extends({}, props, { key: 'line-' + i, x1: entry, y1: y, x2: entry, y2: y + height }));
});
return _react2.default.createElement(
'g',
{ className: 'recharts-cartesian-grid-vertical' },
items
);
}
}, {
key: 'render',
value: function render() {
var _props3 = this.props;
var width = _props3.width;
var height = _props3.height;
var horizontal = _props3.horizontal;
var vertical = _props3.vertical;
if (width <= 0 || height <= 0) {
return null;
}
return _react2.default.createElement(
'g',
{ className: 'recharts-cartesian-grid' },
horizontal && this.renderHorizontal(),
vertical && this.renderVertical()
);
}
}]);
return CartesianGrid;
}(_react.Component), _class2.displayName = 'CartesianGrid', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, {
x: _react.PropTypes.number,
y: _react.PropTypes.number,
width: _react.PropTypes.number,
height: _react.PropTypes.number,
horizontal: _react.PropTypes.bool,
vertical: _react.PropTypes.bool,
horizontalPoints: _react.PropTypes.arrayOf(_react.PropTypes.number),
verticalPoints: _react.PropTypes.arrayOf(_react.PropTypes.number)
}), _class2.defaultProps = {
x: 0,
y: 0,
width: 0,
height: 0,
horizontal: true,
vertical: true,
// The ordinates of horizontal grid lines
horizontalPoints: [],
// The abscissas of vertical grid lines
verticalPoints: [],
stroke: '#ccc',
fill: 'none'
}, _temp)) || _class;
exports.default = CartesianGrid;
/***/ },
/* 252 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isFunction2 = __webpack_require__(49);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Line
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _reactDom = __webpack_require__(199);
var _reactSmooth = __webpack_require__(137);
var _reactSmooth2 = _interopRequireDefault(_reactSmooth);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _Curve = __webpack_require__(219);
var _Curve2 = _interopRequireDefault(_Curve);
var _Dot = __webpack_require__(222);
var _Dot2 = _interopRequireDefault(_Dot);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
var _ReactUtils = __webpack_require__(133);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var FACTOR = 1.0000001;
var Line = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(Line, _Component);
function Line(props, ctx) {
_classCallCheck(this, Line);
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Line).call(this, props, ctx));
_this.handleAnimationEnd = function () {
_this.setState({ isAnimationFinished: true });
};
_this.handleAnimationStart = function () {
_this.setState({ isAnimationFinished: false });
};
var points = props.points;
_this.state = {
isAnimationFinished: true,
totalLength: 0
};
return _this;
}
/* eslint-disable react/no-did-mount-set-state */
_createClass(Line, [{
key: 'componentDidMount',
value: function componentDidMount() {
var isAnimationActive = this.props.isAnimationActive;
if (!isAnimationActive) {
return;
}
var totalLength = this.getTotalLength();
this.setState({ totalLength: totalLength });
}
/* eslint-disable react/no-did-update-set-state */
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps, prevState) {
var _props = this.props;
var animationId = _props.animationId;
var points = _props.points;
if (animationId !== prevProps.animationId || points !== prevProps.points) {
var cur = this.getTotalLength();
var totalLength = prevState.totalLength;
// A hack method to trigger animation
this.setState({
totalLength: cur === totalLength ? cur * FACTOR : cur
});
}
}
}, {
key: 'getTotalLength',
value: function getTotalLength() {
var curveDom = (0, _reactDom.findDOMNode)(this.refs.animate);
var totalLength = curveDom && curveDom.getTotalLength && curveDom.getTotalLength() || 0;
return totalLength;
}
}, {
key: 'getStrokeDasharray',
value: function getStrokeDasharray(length, totalLength, lines) {
var lineLength = lines.reduce(function (pre, next) {
return pre + next;
});
var count = parseInt(length / lineLength, 10);
var remainLength = length % lineLength;
var restLength = totalLength - length;
var remainLines = [];
for (var i = 0, sum = 0;; sum += lines[i], ++i) {
if (sum + lines[i] > remainLength) {
remainLines = [].concat(_toConsumableArray(lines.slice(0, i)), [remainLength - sum]);
break;
}
}
var emptyLines = remainLines.length % 2 === 0 ? [0, restLength] : [restLength];
return [].concat(_toConsumableArray(this.repeat(lines, count)), _toConsumableArray(remainLines), emptyLines).map(function (line) {
return line + 'px';
}).join(', ');
}
}, {
key: 'repeat',
value: function repeat(lines, count) {
var linesUnit = lines.length % 2 !== 0 ? [].concat(_toConsumableArray(lines), [0]) : lines;
var result = [];
for (var i = 0; i < count; ++i) {
result = [].concat(_toConsumableArray(result), _toConsumableArray(linesUnit));
}
return result;
}
}, {
key: 'renderLabelItem',
value: function renderLabelItem(option, props, value) {
var labelItem = void 0;
if (_react2.default.isValidElement(option)) {
labelItem = _react2.default.cloneElement(option, props);
} else if ((0, _isFunction3.default)(option)) {
labelItem = option(props);
} else {
labelItem = _react2.default.createElement(
'text',
_extends({
key: props.key
}, (0, _ReactUtils.getPresentationAttributes)(props), {
className: 'recharts-line-label'
}),
value
);
}
return labelItem;
}
}, {
key: 'renderLabels',
value: function renderLabels() {
var _this2 = this;
var isAnimationActive = this.props.isAnimationActive;
if (isAnimationActive && !this.state.isAnimationFinished) {
return null;
}
var _props2 = this.props;
var points = _props2.points;
var label = _props2.label;
var lineProps = (0, _ReactUtils.getPresentationAttributes)(this.props);
var customLabelProps = (0, _ReactUtils.getPresentationAttributes)(label);
var labels = points.map(function (entry, i) {
var x = entry.x + entry.width / 2;
var y = entry.y;
var labelProps = _extends({
textAnchor: 'middle'
}, entry, lineProps, customLabelProps, {
index: i,
key: 'label-' + i,
payload: entry
});
return _this2.renderLabelItem(label, labelProps, entry.value);
});
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-line-labels' },
labels
);
}
}, {
key: 'renderDotItem',
value: function renderDotItem(option, props) {
var dotItem = void 0;
if (_react2.default.isValidElement(option)) {
dotItem = _react2.default.cloneElement(option, props);
} else if ((0, _isFunction3.default)(option)) {
dotItem = option(props);
} else {
dotItem = _react2.default.createElement(_Dot2.default, _extends({}, props, { className: 'recharts-line-dot' }));
}
return dotItem;
}
}, {
key: 'renderDots',
value: function renderDots() {
var _this3 = this;
var isAnimationActive = this.props.isAnimationActive;
if (isAnimationActive && !this.state.isAnimationFinished) {
return null;
}
var _props3 = this.props;
var dot = _props3.dot;
var points = _props3.points;
var lineProps = (0, _ReactUtils.getPresentationAttributes)(this.props);
var customDotProps = (0, _ReactUtils.getPresentationAttributes)(dot);
var dots = points.map(function (entry, i) {
var dotProps = _extends({
key: 'dot-' + i,
r: 3
}, lineProps, customDotProps, {
cx: entry.x, cy: entry.y, index: i, payload: entry
});
return _this3.renderDotItem(dot, dotProps);
});
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-line-dots', key: 'dots' },
dots
);
}
}, {
key: 'renderCurve',
value: function renderCurve() {
var _this4 = this;
var _props4 = this.props;
var points = _props4.points;
var className = _props4.className;
var strokeDasharray = _props4.strokeDasharray;
var isAnimationActive = _props4.isAnimationActive;
var animationBegin = _props4.animationBegin;
var animationDuration = _props4.animationDuration;
var animationEasing = _props4.animationEasing;
var onClick = _props4.onClick;
var onMouseEnter = _props4.onMouseEnter;
var onMouseLeave = _props4.onMouseLeave;
var other = _objectWithoutProperties(_props4, ['points', 'className', 'strokeDasharray', 'isAnimationActive', 'animationBegin', 'animationDuration', 'animationEasing', 'onClick', 'onMouseEnter', 'onMouseLeave']);
var totalLength = this.state.totalLength;
var animationProps = {
isActive: isAnimationActive,
begin: animationBegin,
canBegin: totalLength > 0,
easing: animationEasing,
duration: animationDuration,
onAnimationEnd: this.handleAnimationEnd,
onAnimationStart: this.handleAnimationStart,
ref: 'animate',
shouldReAnimate: true
};
var curveProps = _extends({}, other, { className: 'recharts-line-curve', fill: 'none',
onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, points: points });
if (strokeDasharray) {
var _ret = function () {
var lines = strokeDasharray.split(/[,\s]+/gim).map(function (num) {
return parseFloat(num);
});
return {
v: _react2.default.createElement(
_reactSmooth2.default,
_extends({}, animationProps, {
from: { length: 0 },
to: { length: totalLength }
}),
function (_ref) {
var length = _ref.length;
return _react2.default.createElement(_Curve2.default, _extends({}, curveProps, {
strokeDasharray: _this4.getStrokeDasharray(length, totalLength, lines)
}));
}
)
};
}();
if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
}
return _react2.default.createElement(
_reactSmooth2.default,
_extends({}, animationProps, {
from: '0px ' + (totalLength === 0 ? 1 : totalLength) + 'px',
to: totalLength + 'px 0px',
attributeName: 'strokeDasharray'
}),
_react2.default.createElement(_Curve2.default, curveProps)
);
}
}, {
key: 'render',
value: function render() {
var _props5 = this.props;
var dot = _props5.dot;
var points = _props5.points;
var label = _props5.label;
var className = _props5.className;
if (!points || !points.length) {
return null;
}
var hasSinglePoint = points.length === 1;
var layerClass = (0, _classnames2.default)('recharts-line', className);
return _react2.default.createElement(
_Layer2.default,
{ className: layerClass },
!hasSinglePoint && this.renderCurve(),
(hasSinglePoint || dot) && this.renderDots(),
label && this.renderLabels()
);
}
}]);
return Line;
}(_react.Component), _class2.displayName = 'Line', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, {
className: _react.PropTypes.string,
type: _react.PropTypes.oneOfType([_react.PropTypes.oneOf(['basis', 'basisClosed', 'basisOpen', 'linear', 'linearClosed', 'natural', 'monotoneX', 'monotoneY', 'monotone', 'step', 'stepBefore', 'stepAfter']), _react.PropTypes.func]),
unit: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
name: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
dataKey: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]).isRequired,
yAxisId: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
xAxisId: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
legendType: _react.PropTypes.string,
layout: _react.PropTypes.oneOf(['horizontal', 'vertical']),
connectNulls: _react.PropTypes.bool,
// whether have dot in line
activeDot: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.element, _react.PropTypes.func, _react.PropTypes.bool]),
dot: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.element, _react.PropTypes.func, _react.PropTypes.bool]),
label: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.element, _react.PropTypes.func, _react.PropTypes.bool]),
points: _react.PropTypes.arrayOf(_react.PropTypes.shape({
x: _react.PropTypes.number,
y: _react.PropTypes.number,
value: _react.PropTypes.value
})),
onMouseEnter: _react.PropTypes.func,
onMouseLeave: _react.PropTypes.func,
onClick: _react.PropTypes.func,
isAnimationActive: _react.PropTypes.bool,
animationBegin: _react.PropTypes.number,
animationDuration: _react.PropTypes.number,
animationEasing: _react.PropTypes.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear']),
animationId: _react.PropTypes.number
}), _class2.defaultProps = {
xAxisId: 0,
yAxisId: 0,
connectNulls: false,
activeDot: true,
dot: true,
legendType: 'line',
stroke: '#3182bd',
strokeWidth: 1,
fill: '#fff',
points: [],
isAnimationActive: true,
animationBegin: 0,
animationDuration: 1500,
animationEasing: 'ease'
}, _temp)) || _class;
exports.default = Line;
/***/ },
/* 253 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isArray2 = __webpack_require__(118);
var _isArray3 = _interopRequireDefault(_isArray2);
var _isFunction2 = __webpack_require__(49);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _isNumber2 = __webpack_require__(47);
var _isNumber3 = _interopRequireDefault(_isNumber2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Area
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _Curve = __webpack_require__(219);
var _Curve2 = _interopRequireDefault(_Curve);
var _Dot = __webpack_require__(222);
var _Dot2 = _interopRequireDefault(_Dot);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
var _reactSmooth = __webpack_require__(137);
var _reactSmooth2 = _interopRequireDefault(_reactSmooth);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _ReactUtils = __webpack_require__(133);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Area = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(Area, _Component);
function Area(props, ctx) {
_classCallCheck(this, Area);
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Area).call(this, props, ctx));
_this.handleAnimationEnd = function () {
_this.setState({ isAnimationFinished: true });
};
_this.handleAnimationStart = function () {
_this.setState({ isAnimationFinished: false });
};
var points = props.points;
_this.state = { isAnimationFinished: true };
if (!_this.id) {
_this.id = 'clipPath' + Date.now();
}
return _this;
}
_createClass(Area, [{
key: 'renderCurve',
value: function renderCurve() {
var _props = this.props;
var layout = _props.layout;
var type = _props.type;
var curve = _props.curve;
var points = _props.points;
var connectNulls = _props.connectNulls;
return _react2.default.createElement(
'g',
null,
curve && _react2.default.createElement(_Curve2.default, _extends({}, (0, _ReactUtils.getPresentationAttributes)(this.props), {
className: 'recharts-area-curve',
layout: layout,
type: type,
connectNulls: connectNulls,
fill: 'none',
points: points
})),
_react2.default.createElement(_Curve2.default, _extends({}, this.props, {
stroke: 'none',
className: 'recharts-area-area'
}))
);
}
}, {
key: 'renderHorizontalRect',
value: function renderHorizontalRect(alpha) {
var _props2 = this.props;
var baseLine = _props2.baseLine;
var layout = _props2.layout;
var points = _props2.points;
var strokeWidth = _props2.strokeWidth;
var startX = points[0].x;
var endX = points[points.length - 1].x;
var width = alpha * Math.abs(startX - endX);
var maxY = Math.max.apply(null, points.map(function (entry) {
return entry.y || 0;
}));
if ((0, _isNumber3.default)(baseLine)) {
maxY = Math.max(baseLine, maxY);
} else {
maxY = Math.max(Math.max.apply(null, baseLine.map(function (entry) {
return entry.y || 0;
})), maxY);
}
return _react2.default.createElement('rect', {
x: startX < endX ? startX : startX - width,
y: 0,
width: width,
height: maxY + (strokeWidth || 1)
});
}
}, {
key: 'renderVerticalRect',
value: function renderVerticalRect(alpha) {
var _props3 = this.props;
var baseLine = _props3.baseLine;
var layout = _props3.layout;
var points = _props3.points;
var strokeWidth = _props3.strokeWidth;
var startY = points[0].y;
var endY = points[points.length - 1].y;
var height = alpha * Math.abs(startY - endY);
var maxX = Math.max.apply(null, points.map(function (entry) {
return entry.x || 0;
}));
if ((0, _isNumber3.default)(baseLine)) {
maxX = Math.max(baseLine, maxX);
} else {
maxX = Math.max(Math.max.apply(null, baseLine.map(function (entry) {
return entry.x || 0;
})), maxX);
}
return _react2.default.createElement('rect', {
x: 0,
y: startY < endY ? startY : startY - height,
width: maxX + (strokeWidth || 1),
height: height
});
}
}, {
key: 'renderClipRect',
value: function renderClipRect(alpha) {
var layout = this.props.layout;
if (layout === 'vertical') {
return this.renderVerticalRect(alpha);
}
return this.renderHorizontalRect(alpha);
}
}, {
key: 'renderClipPath',
value: function renderClipPath() {
var _this2 = this;
var _props4 = this.props;
var isAnimationActive = _props4.isAnimationActive;
var animationDuration = _props4.animationDuration;
var animationEasing = _props4.animationEasing;
var animationBegin = _props4.animationBegin;
var animationId = _props4.animationId;
return _react2.default.createElement(
'defs',
null,
_react2.default.createElement(
'clipPath',
{ id: this.id },
_react2.default.createElement(
_reactSmooth2.default,
{
easing: animationEasing,
isActive: isAnimationActive,
duration: animationDuration,
key: animationId,
animationBegin: animationBegin,
onAnimationStart: this.handleAnimationStart,
onAnimationEnd: this.handleAnimationEnd,
from: { alpha: 0 },
to: { alpha: 1 }
},
function (_ref) {
var alpha = _ref.alpha;
return _this2.renderClipRect(alpha);
}
)
)
);
}
}, {
key: 'renderDotItem',
value: function renderDotItem(option, props) {
var dotItem = void 0;
if (_react2.default.isValidElement(option)) {
dotItem = _react2.default.cloneElement(option, props);
} else if ((0, _isFunction3.default)(option)) {
dotItem = option(props);
} else {
dotItem = _react2.default.createElement(_Dot2.default, _extends({}, props, { className: 'recharts-area-dot' }));
}
return dotItem;
}
}, {
key: 'renderDots',
value: function renderDots() {
var _this3 = this;
var isAnimationActive = this.props.isAnimationActive;
if (isAnimationActive && !this.state.isAnimationFinished) {
return null;
}
var _props5 = this.props;
var dot = _props5.dot;
var points = _props5.points;
var areaProps = (0, _ReactUtils.getPresentationAttributes)(this.props);
var customDotProps = (0, _ReactUtils.getPresentationAttributes)(dot);
var dots = points.map(function (entry, i) {
var dotProps = _extends({
key: 'dot-' + i,
r: 3
}, areaProps, customDotProps, {
cx: entry.x,
cy: entry.y,
index: i,
playload: entry
});
return _this3.renderDotItem(dot, dotProps);
});
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-area-dots' },
dots
);
}
}, {
key: 'renderLabelItem',
value: function renderLabelItem(option, props, value) {
var labelItem = void 0;
if (_react2.default.isValidElement(option)) {
labelItem = _react2.default.cloneElement(option, props);
} else if ((0, _isFunction3.default)(option)) {
labelItem = option(props);
} else {
labelItem = _react2.default.createElement(
'text',
_extends({
key: props.key
}, (0, _ReactUtils.getPresentationAttributes)(props), {
className: 'recharts-area-label'
}),
(0, _isArray3.default)(value) ? value[1] : value
);
}
return labelItem;
}
}, {
key: 'renderLabels',
value: function renderLabels() {
var _this4 = this;
var isAnimationActive = this.props.isAnimationActive;
if (isAnimationActive && !this.state.isAnimationFinished) {
return null;
}
var _props6 = this.props;
var points = _props6.points;
var label = _props6.label;
var areaProps = (0, _ReactUtils.getPresentationAttributes)(this.props);
var customLabelProps = (0, _ReactUtils.getPresentationAttributes)(label);
var labels = points.map(function (entry, i) {
var labelProps = _extends({
textAnchor: 'middle'
}, entry, areaProps, customLabelProps, {
index: i,
key: 'label-' + i,
payload: entry
});
return _this4.renderLabelItem(label, labelProps, entry.value);
});
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-area-labels' },
labels
);
}
}, {
key: 'render',
value: function render() {
var _props7 = this.props;
var dot = _props7.dot;
var label = _props7.label;
var points = _props7.points;
var className = _props7.className;
if (!points || !points.length) {
return null;
}
var hasSinglePoint = points.length === 1;
var layerClass = (0, _classnames2.default)('recharts-area', className);
return _react2.default.createElement(
_Layer2.default,
{ className: layerClass },
!hasSinglePoint ? this.renderClipPath() : null,
!hasSinglePoint ? _react2.default.createElement(
'g',
{ clipPath: 'url(#' + this.id + ')' },
this.renderCurve()
) : null,
(dot || hasSinglePoint) && this.renderDots(),
label && this.renderLabels()
);
}
}]);
return Area;
}(_react.Component), _class2.displayName = 'Area', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, {
className: _react.PropTypes.string,
dataKey: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]).isRequired,
type: _react.PropTypes.oneOfType([_react.PropTypes.oneOf(['basis', 'basisClosed', 'basisOpen', 'linear', 'linearClosed', 'natural', 'monotoneX', 'monotoneY', 'monotone', 'step', 'stepBefore', 'stepAfter']), _react.PropTypes.func]),
unit: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
name: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
yAxisId: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
xAxisId: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
stackId: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
legendType: _react.PropTypes.string,
connectNulls: _react.PropTypes.bool,
activeDot: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.element, _react.PropTypes.func, _react.PropTypes.bool]),
// dot configuration
dot: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.element, _react.PropTypes.object, _react.PropTypes.bool]),
label: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.element, _react.PropTypes.object, _react.PropTypes.bool]),
// have curve configuration
curve: _react.PropTypes.bool,
layout: _react.PropTypes.oneOf(['horizontal', 'vertical']),
baseLine: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.array]),
points: _react.PropTypes.arrayOf(_react.PropTypes.shape({
x: _react.PropTypes.number,
y: _react.PropTypes.number,
value: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.array])
})),
onMouseEnter: _react.PropTypes.func,
onMouseLeave: _react.PropTypes.func,
onClick: _react.PropTypes.func,
animationId: _react.PropTypes.number,
isAnimationActive: _react.PropTypes.bool,
animationBegin: _react.PropTypes.number,
animationDuration: _react.PropTypes.number,
animationEasing: _react.PropTypes.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear'])
}), _class2.defaultProps = {
strokeWidth: 1,
stroke: '#3182bd',
fill: '#3182bd',
fillOpacity: 0.6,
xAxisId: 0,
yAxisId: 0,
legendType: 'line',
connectNulls: false,
// points of area
points: [],
dot: false,
label: false,
curve: true,
activeDot: true,
isAnimationActive: true,
animationBegin: 0,
animationDuration: 1500,
animationEasing: 'ease'
}, _temp)) || _class;
exports.default = Area;
/***/ },
/* 254 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isArray2 = __webpack_require__(118);
var _isArray3 = _interopRequireDefault(_isArray2);
var _isFunction2 = __webpack_require__(49);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp2; /**
* @fileOverview Render a group of bar
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _reactSmooth = __webpack_require__(137);
var _reactSmooth2 = _interopRequireDefault(_reactSmooth);
var _Rectangle = __webpack_require__(220);
var _Rectangle2 = _interopRequireDefault(_Rectangle);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _ReactUtils = __webpack_require__(133);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Bar = (0, _PureRender2.default)(_class = (_temp2 = _class2 = function (_Component) {
_inherits(Bar, _Component);
function Bar() {
var _Object$getPrototypeO;
var _temp, _this, _ret;
_classCallCheck(this, Bar);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Bar)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = {
isAnimationFinished: false
}, _this.handleAnimationEnd = function () {
_this.setState({ isAnimationFinished: true });
}, _this.handleAnimationStart = function () {
_this.setState({ isAnimationFinished: false });
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Bar, [{
key: 'renderRectangle',
value: function renderRectangle(option, props) {
var rectangle = void 0;
if (_react2.default.isValidElement(option)) {
rectangle = _react2.default.cloneElement(option, props);
} else if ((0, _isFunction3.default)(option)) {
rectangle = option(props);
} else {
rectangle = _react2.default.createElement(_Rectangle2.default, _extends({}, props, { className: 'recharts-bar-rectangle' }));
}
return rectangle;
}
}, {
key: 'renderRectangles',
value: function renderRectangles() {
var _this2 = this;
var _props = this.props;
var data = _props.data;
var shape = _props.shape;
var layout = _props.layout;
var isAnimationActive = _props.isAnimationActive;
var animationBegin = _props.animationBegin;
var animationDuration = _props.animationDuration;
var animationEasing = _props.animationEasing;
var animationId = _props.animationId;
var baseProps = (0, _ReactUtils.getPresentationAttributes)(this.props);
var getStyle = function getStyle(isBegin) {
return {
transform: 'scale' + (layout === 'vertical' ? 'X' : 'Y') + '(' + (isBegin ? 0 : 1) + ')'
};
};
return data.map(function (entry, index) {
var width = entry.width;
var height = entry.height;
var props = _extends({}, baseProps, entry, { index: index }, (0, _ReactUtils.filterEventsOfChild)(_this2.props, entry, index));
var transformOrigin = '';
if (layout === 'vertical') {
transformOrigin = width > 0 ? 'left center' : 'right center';
} else {
transformOrigin = height > 0 ? 'center bottom' : 'center top';
}
return _react2.default.createElement(
_reactSmooth2.default,
{
begin: animationBegin,
duration: animationDuration,
isActive: isAnimationActive,
easing: animationEasing,
from: getStyle(true),
to: getStyle(false),
key: 'rectangle-' + index + '-' + animationId,
onAnimationEnd: _this2.handleAnimationEnd,
onAnimationStart: _this2.handleAnimationStart
},
_react2.default.createElement(
'g',
{ style: { transformOrigin: transformOrigin } },
_this2.renderRectangle(shape, props)
)
);
});
}
}, {
key: 'renderLabelItem',
value: function renderLabelItem(option, props, value) {
var labelItem = void 0;
if (_react2.default.isValidElement(option)) {
labelItem = _react2.default.cloneElement(option, props);
} else if ((0, _isFunction3.default)(option)) {
labelItem = option(props);
} else {
labelItem = _react2.default.createElement(
'text',
_extends({}, (0, _ReactUtils.getPresentationAttributes)(props), {
key: props.key,
className: 'recharts-bar-label'
}),
(0, _isArray3.default)(value) ? value[1] : value
);
}
return labelItem;
}
}, {
key: 'renderLabels',
value: function renderLabels() {
var _this3 = this;
var isAnimationActive = this.props.isAnimationActive;
if (isAnimationActive && !this.state.isAnimationFinished) {
return null;
}
var _props2 = this.props;
var data = _props2.data;
var label = _props2.label;
var layout = _props2.layout;
var barProps = (0, _ReactUtils.getPresentationAttributes)(this.props);
var customLabelProps = (0, _ReactUtils.getPresentationAttributes)(label);
var textAnchor = layout === 'vertical' ? 'start' : 'middle';
var labels = data.map(function (entry, i) {
var x = 0;
var y = 0;
if (layout === 'vertical') {
x = 5 + entry.x + entry.width;
y = 5 + entry.y + entry.height / 2;
} else {
x = entry.x + entry.width / 2;
y = entry.y - 5;
}
var labelProps = _extends({
textAnchor: textAnchor
}, barProps, entry, customLabelProps, {
x: x,
y: y,
index: i,
key: 'label-' + i,
payload: entry
});
var labelValue = entry.value;
if (label === true && entry.value && labelProps.label) {
labelValue = labelProps.label;
}
return _this3.renderLabelItem(label, labelProps, labelValue);
});
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-bar-labels' },
labels
);
}
}, {
key: 'render',
value: function render() {
var _props3 = this.props;
var data = _props3.data;
var className = _props3.className;
var label = _props3.label;
if (!data || !data.length) {
return null;
}
var layerClass = (0, _classnames2.default)('recharts-bar', className);
return _react2.default.createElement(
_Layer2.default,
{ className: layerClass },
_react2.default.createElement(
_Layer2.default,
{ className: 'recharts-bar-rectangles' },
this.renderRectangles()
),
label && _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-bar-rectangle-labels' },
this.renderLabels()
)
);
}
}]);
return Bar;
}(_react.Component), _class2.displayName = 'Bar', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, {
className: _react.PropTypes.string,
layout: _react.PropTypes.oneOf(['vertical', 'horizontal']),
xAxisId: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
yAxisId: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
stackId: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
barSize: _react.PropTypes.number,
unit: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
name: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
dataKey: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]).isRequired,
minPointSize: _react.PropTypes.number,
shape: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.element]),
label: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.func, _react.PropTypes.object, _react.PropTypes.element]),
data: _react.PropTypes.arrayOf(_react.PropTypes.shape({
x: _react.PropTypes.number,
y: _react.PropTypes.number,
width: _react.PropTypes.number,
height: _react.PropTypes.number,
radius: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.array]),
value: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.array])
})),
onMouseEnter: _react.PropTypes.func,
onMouseLeave: _react.PropTypes.func,
onClick: _react.PropTypes.func,
animationId: _react.PropTypes.number,
isAnimationActive: _react.PropTypes.bool,
animationBegin: _react.PropTypes.number,
animationDuration: _react.PropTypes.number,
animationEasing: _react.PropTypes.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear'])
}), _class2.defaultProps = {
fill: '#000',
xAxisId: 0,
yAxisId: 0,
legendType: 'rect',
minPointSize: 0,
// data of bar
data: [],
layout: 'vertical',
isAnimationActive: true,
animationBegin: 0,
animationDuration: 1500,
animationEasing: 'ease'
}, _temp2)) || _class;
exports.default = Bar;
/***/ },
/* 255 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isFunction2 = __webpack_require__(49);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp2; /**
* @fileOverview Render a group of scatters
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
var _ReactUtils = __webpack_require__(133);
var _Curve = __webpack_require__(219);
var _Curve2 = _interopRequireDefault(_Curve);
var _Symbols = __webpack_require__(130);
var _Symbols2 = _interopRequireDefault(_Symbols);
var _reactSmooth = __webpack_require__(137);
var _reactSmooth2 = _interopRequireDefault(_reactSmooth);
var _AnimationDecorator = __webpack_require__(231);
var _AnimationDecorator2 = _interopRequireDefault(_AnimationDecorator);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var PI = Math.PI;
var SYMBOL_STYLE = { transformOrigin: 'center center' };
var Scatter = (0, _AnimationDecorator2.default)(_class = (0, _PureRender2.default)(_class = (_temp2 = _class2 = function (_Component) {
_inherits(Scatter, _Component);
function Scatter() {
var _Object$getPrototypeO;
var _temp, _this, _ret;
_classCallCheck(this, Scatter);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Scatter)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = { activeIndex: -1 }, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Scatter, [{
key: 'renderSymbolItem',
value: function renderSymbolItem(option, props) {
var symbol = void 0;
if (_react2.default.isValidElement(option)) {
symbol = _react2.default.cloneElement(option, props);
} else if ((0, _isFunction3.default)(option)) {
symbol = option(props);
} else {
symbol = _react2.default.createElement(_Symbols2.default, _extends({}, props, { type: option }));
}
return symbol;
}
}, {
key: 'renderSymbols',
value: function renderSymbols() {
var _this2 = this;
var _props = this.props;
var points = _props.points;
var shape = _props.shape;
var activeShape = _props.activeShape;
var activeIndex = _props.activeIndex;
var animationBegin = _props.animationBegin;
var animationDuration = _props.animationDuration;
var isAnimationActive = _props.isAnimationActive;
var animationEasing = _props.animationEasing;
var animationId = _props.animationId;
var baseProps = (0, _ReactUtils.getPresentationAttributes)(this.props);
return points.map(function (entry, i) {
var props = _extends({
key: 'symbol-' + i
}, baseProps, entry);
return _react2.default.createElement(
_Layer2.default,
_extends({
className: 'recharts-scatter-symbol'
}, (0, _ReactUtils.filterEventsOfChild)(_this2.props, entry, i), {
key: 'symbol-' + i
}),
_react2.default.createElement(
_reactSmooth2.default,
{
from: { size: 0 },
to: { size: props.size },
duration: animationDuration,
begin: animationBegin,
isActive: isAnimationActive,
key: animationId,
easing: animationEasing
},
function (_ref) {
var size = _ref.size;
var finalProps = _extends({}, props, { size: size });
return _this2.renderSymbolItem(activeIndex === i ? activeShape : shape, finalProps);
}
)
);
});
}
}, {
key: 'renderLine',
value: function renderLine() {
var _props2 = this.props;
var points = _props2.points;
var line = _props2.line;
var lineType = _props2.lineType;
var lineJointType = _props2.lineJointType;
var scatterProps = (0, _ReactUtils.getPresentationAttributes)(this.props);
var customLineProps = (0, _ReactUtils.getPresentationAttributes)(line);
var linePoints = void 0;
if (lineType === 'joint') {
linePoints = points.map(function (entry) {
return { x: entry.cx, y: entry.cy };
});
}
var lineProps = _extends({}, scatterProps, {
fill: 'none',
stroke: scatterProps.fill
}, customLineProps, {
points: linePoints
});
var lineItem = void 0;
if (_react2.default.isValidElement(line)) {
lineItem = _react2.default.cloneElement(line, lineProps);
} else if ((0, _isFunction3.default)(line)) {
lineItem = line(lineProps);
} else {
lineItem = _react2.default.createElement(_Curve2.default, _extends({}, lineProps, { type: lineJointType }));
}
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-scatter-line', key: 'recharts-scatter-line' },
lineItem
);
}
}, {
key: 'render',
value: function render() {
var _props3 = this.props;
var points = _props3.points;
var line = _props3.line;
var className = _props3.className;
if (!points || !points.length) {
return null;
}
var layerClass = (0, _classnames2.default)('recharts-scatter', className);
return _react2.default.createElement(
_Layer2.default,
{ className: layerClass },
line && this.renderLine(),
_react2.default.createElement(
_Layer2.default,
{ key: 'recharts-scatter-symbols' },
this.renderSymbols()
)
);
}
}]);
return Scatter;
}(_react.Component), _class2.displayName = 'Scatter', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, {
legendType: _react.PropTypes.string,
xAxisId: _react.PropTypes.number,
yAxisId: _react.PropTypes.number,
zAxisId: _react.PropTypes.number,
line: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.object, _react.PropTypes.func, _react.PropTypes.element]),
lineType: _react.PropTypes.oneOf(['fitting', 'joint']),
lineJointType: _react.PropTypes.oneOfType([_react.PropTypes.oneOf(['basis', 'basisClosed', 'basisOpen', 'linear', 'linearClosed', 'natural', 'monotoneX', 'monotoneY', 'monotone', 'step', 'stepBefore', 'stepAfter']), _react.PropTypes.func]),
className: _react.PropTypes.string,
activeIndex: _react.PropTypes.number,
activeShape: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.func, _react.PropTypes.element]),
shape: _react.PropTypes.oneOfType([_react.PropTypes.oneOf(['circle', 'cross', 'diamond', 'square', 'star', 'triangle', 'wye']), _react.PropTypes.element, _react.PropTypes.func]),
points: _react.PropTypes.arrayOf(_react.PropTypes.shape({
cx: _react.PropTypes.number,
cy: _react.PropTypes.number,
size: _react.PropTypes.number,
payload: _react.PropTypes.shape({
x: _react.PropTypes.number,
y: _react.PropTypes.number,
z: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string])
})
})),
onMouseEnter: _react.PropTypes.func,
onMouseLeave: _react.PropTypes.func,
onClick: _react.PropTypes.func,
isAnimationActive: _react.PropTypes.bool,
animationId: _react.PropTypes.number,
animationBegin: _react.PropTypes.number,
animationDuration: _react.PropTypes.number,
animationEasing: _react.PropTypes.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear'])
}), _class2.defaultProps = {
fill: '#fff',
xAxisId: 0,
yAxisId: 0,
zAxisId: 0,
legendType: 'circle',
lineType: 'joint',
lineJointType: 'linear',
data: [],
shape: 'circle',
isAnimationActive: true,
animationBegin: 0,
animationDuration: 400,
animationEasing: 'linear'
}, _temp2)) || _class) || _class;
exports.default = Scatter;
/***/ },
/* 256 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview X Axis
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var XAxis = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(XAxis, _Component);
function XAxis() {
_classCallCheck(this, XAxis);
return _possibleConstructorReturn(this, Object.getPrototypeOf(XAxis).apply(this, arguments));
}
_createClass(XAxis, [{
key: 'render',
value: function render() {
return null;
}
}]);
return XAxis;
}(_react.Component), _class2.displayName = 'XAxis', _class2.propTypes = {
allowDecimals: _react.PropTypes.bool,
hide: _react.PropTypes.bool,
// The name of data displayed in the axis
name: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
// The unit of data displayed in the axis
unit: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
// The unique id of x-axis
xAxisId: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
domain: _react.PropTypes.arrayOf(_react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number, _react.PropTypes.oneOf(['auto', 'dataMin', 'dataMax'])])),
// The key of data displayed in the axis
dataKey: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
// The width of axis which is usually calculated internally
width: _react.PropTypes.number,
// The height of axis, which need to be setted by user
height: _react.PropTypes.number,
// The orientation of axis
orientation: _react.PropTypes.oneOf(['top', 'bottom']),
type: _react.PropTypes.oneOf(['number', 'category']),
// Ticks can be any type when the axis is the type of category
// Ticks must be numbers when the axis is the type of number
ticks: _react.PropTypes.array,
// The count of ticks
tickCount: _react.PropTypes.number,
// The formatter function of tick
tickFormatter: _react.PropTypes.func,
padding: _react.PropTypes.shape({
left: _react.PropTypes.number,
right: _react.PropTypes.number
})
}, _class2.defaultProps = {
allowDecimals: true,
hide: false,
orientation: 'bottom',
width: 0,
height: 30,
xAxisId: 0,
tickCount: 5,
type: 'category',
domain: [0, 'auto'],
padding: { left: 0, right: 0 }
}, _temp)) || _class;
exports.default = XAxis;
/***/ },
/* 257 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Y Axis
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var YAxis = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(YAxis, _Component);
function YAxis() {
_classCallCheck(this, YAxis);
return _possibleConstructorReturn(this, Object.getPrototypeOf(YAxis).apply(this, arguments));
}
_createClass(YAxis, [{
key: 'render',
value: function render() {
return null;
}
}]);
return YAxis;
}(_react.Component), _class2.displayName = 'YAxis', _class2.propTypes = {
allowDecimals: _react.PropTypes.bool,
hide: _react.PropTypes.bool,
// The name of data displayed in the axis
name: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
// The unit of data displayed in the axis
unit: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
// The unique id of y-axis
yAxisId: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
domain: _react.PropTypes.arrayOf(_react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number, _react.PropTypes.oneOf(['auto', 'dataMin', 'dataMax'])])),
// The key of data displayed in the axis
dataKey: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
// Ticks can be any type when the axis is the type of category
// Ticks must be numbers when the axis is the type of number
ticks: _react.PropTypes.array,
// The count of ticks
tickCount: _react.PropTypes.number,
// The formatter function of tick
tickFormatter: _react.PropTypes.func,
// The width of axis, which need to be setted by user
width: _react.PropTypes.number,
// The height of axis which is usually calculated in Chart
height: _react.PropTypes.number,
// The orientation of axis
orientation: _react.PropTypes.oneOf(['left', 'right']),
type: _react.PropTypes.oneOf(['number', 'category']),
padding: _react.PropTypes.shape({
top: _react.PropTypes.number,
bottom: _react.PropTypes.number
})
}, _class2.defaultProps = {
allowDecimals: true,
hide: false,
orientation: 'left',
width: 60,
height: 0,
yAxisId: 0,
tickCount: 5,
type: 'number',
domain: [0, 'auto'],
padding: { top: 0, bottom: 0 }
}, _temp)) || _class;
exports.default = YAxis;
/***/ },
/* 258 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Z Axis
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var ZAxis = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(ZAxis, _Component);
function ZAxis() {
_classCallCheck(this, ZAxis);
return _possibleConstructorReturn(this, Object.getPrototypeOf(ZAxis).apply(this, arguments));
}
_createClass(ZAxis, [{
key: 'render',
value: function render() {
return null;
}
}]);
return ZAxis;
}(_react.Component), _class2.displayName = 'ZAxis', _class2.propTypes = {
// The name of data displayed in the axis
name: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
// The unit of data displayed in the axis
unit: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
// The unique id of z-axis
zAxisId: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
// The key of data displayed in the axis
dataKey: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
// The range of axis
range: _react.PropTypes.arrayOf(_react.PropTypes.number)
}, _class2.defaultProps = {
zAxisId: 0,
range: [64, 64]
}, _temp)) || _class;
exports.default = ZAxis;
/***/ },
/* 259 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.LineChart = undefined;
var _isFunction2 = __webpack_require__(49);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Line Chart
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
var _Tooltip = __webpack_require__(135);
var _Tooltip2 = _interopRequireDefault(_Tooltip);
var _Curve = __webpack_require__(219);
var _Curve2 = _interopRequireDefault(_Curve);
var _Dot = __webpack_require__(222);
var _Dot2 = _interopRequireDefault(_Dot);
var _generateCategoricalChart = __webpack_require__(260);
var _generateCategoricalChart2 = _interopRequireDefault(_generateCategoricalChart);
var _Line = __webpack_require__(252);
var _Line2 = _interopRequireDefault(_Line);
var _ReactUtils = __webpack_require__(133);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _CartesianUtils = __webpack_require__(261);
var _DataUtils = __webpack_require__(214);
var _reactSmooth = __webpack_require__(137);
var _reactSmooth2 = _interopRequireDefault(_reactSmooth);
var _AnimationDecorator = __webpack_require__(231);
var _AnimationDecorator2 = _interopRequireDefault(_AnimationDecorator);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var LineChart = (0, _AnimationDecorator2.default)(_class = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(LineChart, _Component);
function LineChart() {
_classCallCheck(this, LineChart);
return _possibleConstructorReturn(this, Object.getPrototypeOf(LineChart).apply(this, arguments));
}
_createClass(LineChart, [{
key: 'getComposedData',
/**
* Compose the data of each group
* @param {Object} xAxis The configuration of x-axis
* @param {Object} yAxis The configuration of y-axis
* @param {String} dataKey The unique key of a group
* @return {Array} Composed data
*/
value: function getComposedData(xAxis, yAxis, dataKey) {
var _props = this.props;
var layout = _props.layout;
var dataStartIndex = _props.dataStartIndex;
var dataEndIndex = _props.dataEndIndex;
var isComposed = _props.isComposed;
var data = this.props.data.slice(dataStartIndex, dataEndIndex + 1);
var bandSize = (0, _DataUtils.getBandSizeOfScale)(layout === 'horizontal' ? xAxis.scale : yAxis.scale);
var xTicks = (0, _CartesianUtils.getTicksOfAxis)(xAxis);
var yTicks = (0, _CartesianUtils.getTicksOfAxis)(yAxis);
return data.map(function (entry, index) {
return {
x: layout === 'horizontal' ? xTicks[index].coordinate + bandSize / 2 : xAxis.scale(entry[dataKey]),
y: layout === 'horizontal' ? yAxis.scale(entry[dataKey]) : yTicks[index].coordinate + bandSize / 2,
value: entry[dataKey]
};
});
}
}, {
key: 'renderCursor',
value: function renderCursor(xAxisMap, yAxisMap, offset) {
var _props2 = this.props;
var children = _props2.children;
var isTooltipActive = _props2.isTooltipActive;
var layout = _props2.layout;
var activeTooltipIndex = _props2.activeTooltipIndex;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
if (!tooltipItem || !tooltipItem.props.cursor || !isTooltipActive || activeTooltipIndex < 0) {
return null;
}
var axisMap = layout === 'horizontal' ? xAxisMap : yAxisMap;
var axis = (0, _DataUtils.getAnyElementOfObject)(axisMap);
var ticks = (0, _CartesianUtils.getTicksOfAxis)(axis);
if (!ticks || !ticks[activeTooltipIndex]) {
return null;
}
var start = ticks[activeTooltipIndex].coordinate;
var x1 = layout === 'horizontal' ? start : offset.left;
var y1 = layout === 'horizontal' ? offset.top : start;
var x2 = layout === 'horizontal' ? start : offset.left + offset.width;
var y2 = layout === 'horizontal' ? offset.top + offset.height : start;
var cursorProps = _extends({
stroke: '#ccc'
}, (0, _ReactUtils.getPresentationAttributes)(tooltipItem.props.cursor), {
points: [{ x: x1, y: y1 }, { x: x2, y: y2 }]
});
return _react2.default.isValidElement(tooltipItem.props.cursor) ? _react2.default.cloneElement(tooltipItem.props.cursor, cursorProps) : _react2.default.createElement(_Curve2.default, _extends({}, cursorProps, { type: 'linear', className: 'recharts-tooltip-cursor' }));
}
}, {
key: 'renderActiveDot',
value: function renderActiveDot(option, props, index) {
var dot = void 0;
if (_react2.default.isValidElement(option)) {
dot = _react2.default.cloneElement(option, props);
} else if ((0, _isFunction3.default)(option)) {
dot = option(props);
} else {
dot = _react2.default.createElement(_Dot2.default, _extends({}, props, { className: 'recharts-line-active-dot' }));
}
return _react2.default.createElement(
_reactSmooth2.default,
{
from: 'scale(0)',
to: 'scale(1)',
duration: 400,
key: 'dot-' + props.dataKey,
attributeName: 'transform'
},
_react2.default.createElement(
_Layer2.default,
{ style: { transformOrigin: 'center center' } },
dot
)
);
}
/**
* Draw the main part of line chart
* @param {Array} items All the instance of Line
* @param {Object} xAxisMap The configuration of all x-axes
* @param {Object} yAxisMap The configuration of all y-axes
* @param {Object} offset The offset of main part in the svg element
* @return {ReactComponent} All the instances of Line
*/
}, {
key: 'renderItems',
value: function renderItems(items, xAxisMap, yAxisMap, offset) {
var _this2 = this;
var _props3 = this.props;
var children = _props3.children;
var layout = _props3.layout;
var isTooltipActive = _props3.isTooltipActive;
var activeTooltipIndex = _props3.activeTooltipIndex;
var animationId = _props3.animationId;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
var hasDot = tooltipItem && isTooltipActive;
var dotItems = [];
var lineItems = items.map(function (child, i) {
var _child$props = child.props;
var xAxisId = _child$props.xAxisId;
var yAxisId = _child$props.yAxisId;
var dataKey = _child$props.dataKey;
var stroke = _child$props.stroke;
var activeDot = _child$props.activeDot;
var points = _this2.getComposedData(xAxisMap[xAxisId], yAxisMap[yAxisId], dataKey);
var activePoint = points[activeTooltipIndex];
if (hasDot && activeDot && activePoint) {
var dotProps = _extends({
index: i,
dataKey: dataKey,
cx: activePoint.x, cy: activePoint.y, r: 4,
fill: stroke, strokeWidth: 2, stroke: '#fff'
}, (0, _ReactUtils.getPresentationAttributes)(activeDot));
dotItems.push(_this2.renderActiveDot(activeDot, dotProps, i));
}
return _react2.default.cloneElement(child, _extends({
key: 'line-' + i
}, offset, {
layout: layout,
points: points,
animationId: animationId
}));
}, this);
return _react2.default.createElement(
'g',
{ key: 'recharts-line-wrapper' },
_react2.default.createElement(
'g',
{ key: 'recharts-line' },
lineItems
),
_react2.default.createElement(
'g',
{ key: 'recharts-line-dot' },
dotItems
)
);
}
}, {
key: 'render',
value: function render() {
var _props4 = this.props;
var isComposed = _props4.isComposed;
var xAxisMap = _props4.xAxisMap;
var yAxisMap = _props4.yAxisMap;
var offset = _props4.offset;
var graphicalItems = _props4.graphicalItems;
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-line-graphical' },
!isComposed && this.renderCursor(xAxisMap, yAxisMap, offset),
this.renderItems(graphicalItems, xAxisMap, yAxisMap, offset)
);
}
}]);
return LineChart;
}(_react.Component), _class2.displayName = 'LineChart', _class2.propTypes = {
layout: _react.PropTypes.oneOf(['horizontal', 'vertical']),
dataStartIndex: _react.PropTypes.number,
dataEndIndex: _react.PropTypes.number,
data: _react.PropTypes.array,
isTooltipActive: _react.PropTypes.bool,
activeTooltipIndex: _react.PropTypes.number,
xAxisMap: _react.PropTypes.object,
yAxisMap: _react.PropTypes.object,
offset: _react.PropTypes.object,
graphicalItems: _react.PropTypes.array,
children: _react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.node), _react.PropTypes.node]),
// used internally
isComposed: _react.PropTypes.bool,
animationId: _react.PropTypes.number
}, _temp)) || _class) || _class;
exports.default = (0, _generateCategoricalChart2.default)(LineChart, _Line2.default);
exports.LineChart = LineChart;
/***/ },
/* 260 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isNumber2 = __webpack_require__(47);
var _isNumber3 = _interopRequireDefault(_isNumber2);
var _range2 = __webpack_require__(236);
var _range3 = _interopRequireDefault(_range2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _reactDom = __webpack_require__(199);
var _reactDom2 = _interopRequireDefault(_reactDom);
var _d3Scale = __webpack_require__(240);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _Surface = __webpack_require__(42);
var _Surface2 = _interopRequireDefault(_Surface);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
var _Tooltip = __webpack_require__(135);
var _Tooltip2 = _interopRequireDefault(_Tooltip);
var _Legend = __webpack_require__(46);
var _Legend2 = _interopRequireDefault(_Legend);
var _LogUtils = __webpack_require__(215);
var _ReactUtils = __webpack_require__(133);
var _CartesianAxis = __webpack_require__(250);
var _CartesianAxis2 = _interopRequireDefault(_CartesianAxis);
var _CartesianGrid = __webpack_require__(251);
var _CartesianGrid2 = _interopRequireDefault(_CartesianGrid);
var _ReferenceLine = __webpack_require__(248);
var _ReferenceLine2 = _interopRequireDefault(_ReferenceLine);
var _ReferenceDot = __webpack_require__(249);
var _ReferenceDot2 = _interopRequireDefault(_ReferenceDot);
var _XAxis = __webpack_require__(256);
var _XAxis2 = _interopRequireDefault(_XAxis);
var _YAxis = __webpack_require__(257);
var _YAxis2 = _interopRequireDefault(_YAxis);
var _Brush = __webpack_require__(235);
var _Brush2 = _interopRequireDefault(_Brush);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _DOMUtils = __webpack_require__(134);
var _DataUtils = __webpack_require__(214);
var _CartesianUtils = __webpack_require__(261);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var ORIENT_MAP = {
xAxis: ['bottom', 'top'],
yAxis: ['left', 'right']
};
var generateCategoricalChart = function generateCategoricalChart(ChartComponent, GraphicalChild) {
var _class, _temp;
var CategoricalChartWrapper = (_temp = _class = function (_Component) {
_inherits(CategoricalChartWrapper, _Component);
function CategoricalChartWrapper(props) {
_classCallCheck(this, CategoricalChartWrapper);
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(CategoricalChartWrapper).call(this, props));
_this.handleBrushChange = function (_ref) {
var startIndex = _ref.startIndex;
var endIndex = _ref.endIndex;
_this.setState({
dataStartIndex: startIndex,
dataEndIndex: endIndex
});
};
_this.handleMouseLeave = function () {
_this.setState({
isTooltipActive: false
});
};
_this.state = _this.createDefaultState(_this.props);
_this.validateAxes();
return _this;
}
_createClass(CategoricalChartWrapper, [{
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (nextProps.data !== this.props.data) {
this.setState(this.createDefaultState(nextProps));
}
}
/**
* Get the configuration of all x-axis or y-axis
* @param {String} axisType The type of axis
* @param {Array} items The instances of item
* @param {Object} stackGroups The items grouped by axisId and stackId
* @return {Object} Configuration
*/
}, {
key: 'getAxisMap',
value: function getAxisMap() {
var axisType = arguments.length <= 0 || arguments[0] === undefined ? 'xAxis' : arguments[0];
var items = arguments[1];
var stackGroups = arguments[2];
var children = this.props.children;
var Axis = axisType === 'xAxis' ? _XAxis2.default : _YAxis2.default;
var axisIdKey = axisType === 'xAxis' ? 'xAxisId' : 'yAxisId';
// Get all the instance of Axis
var axes = (0, _ReactUtils.findAllByType)(children, Axis);
var axisMap = {};
if (axes && axes.length) {
axisMap = this.getAxisMapByAxes(axes, items, axisType, axisIdKey, stackGroups);
} else if (items && items.length) {
axisMap = this.getAxisMapByItems(items, Axis, axisType, axisIdKey, stackGroups);
}
return axisMap;
}
/**
* Get the configuration of axis by the options of axis instance
* @param {Array} axes The instance of axes
* @param {Array} items The instances of item
* @param {String} axisType The type of axis, xAxis - x-axis, yAxis - y-axis
* @param {String} axisIdKey The unique id of an axis
* @param {Object} stackGroups The items grouped by axisId and stackId
* @return {Object} Configuration
*/
}, {
key: 'getAxisMapByAxes',
value: function getAxisMapByAxes(axes, items, axisType, axisIdKey, stackGroups) {
var _props = this.props;
var layout = _props.layout;
var children = _props.children;
var data = _props.data;
var _state = this.state;
var dataEndIndex = _state.dataEndIndex;
var dataStartIndex = _state.dataStartIndex;
var displayedData = data.slice(dataStartIndex, dataEndIndex + 1);
var len = displayedData.length;
var isCategorial = (0, _CartesianUtils.isCategorialAxis)(layout, axisType);
// Eliminate duplicated axes
var axisMap = axes.reduce(function (result, child) {
var _child$props = child.props;
var type = _child$props.type;
var dataKey = _child$props.dataKey;
var axisId = child.props[axisIdKey];
if (!result[axisId]) {
var domain = void 0;
var duplicateDomain = void 0;
if (dataKey) {
domain = (0, _CartesianUtils.getDomainOfDataByKey)(displayedData, dataKey, type);
var duplicate = (0, _DataUtils.hasDuplicate)(domain);
duplicateDomain = duplicate ? domain : null;
// When axis has duplicated text, serial numbers are used to generate scale
domain = duplicate ? (0, _range3.default)(0, len) : domain;
} else if (stackGroups && stackGroups[axisId] && stackGroups[axisId].hasStack && type === 'number') {
domain = (0, _CartesianUtils.getDomainOfStackGroups)(stackGroups[axisId].stackGroups, dataStartIndex, dataEndIndex);
} else if (isCategorial) {
domain = (0, _range3.default)(0, len);
} else {
domain = (0, _CartesianUtils.getDomainOfItemsWithSameAxis)(displayedData, items.filter(function (entry) {
return entry.props[axisIdKey] === axisId;
}), type);
}
if (type === 'number') {
// To detect wether there is any reference lines whose props alwaysShow is true
domain = (0, _CartesianUtils.detectReferenceElementsDomain)(children, domain, axisId, axisType);
if (child.props.domain) {
domain = (0, _DataUtils.parseSpecifiedDomain)(child.props.domain, domain);
}
}
return _extends({}, result, _defineProperty({}, axisId, _extends({}, child.props, {
axisType: axisType,
domain: domain,
duplicateDomain: duplicateDomain,
originalDomain: child.props.domain
})));
}
return result;
}, {});
return axisMap;
}
/**
* Get the configuration of axis by the options of item,
* this kind of axis does not display in chart
* @param {Array} items The instances of item
* @param {ReactElement} Axis Axis Component
* @param {String} axisType The type of axis, xAxis - x-axis, yAxis - y-axis
* @param {String} axisIdKey The unique id of an axis
* @param {Object} stackGroups The items grouped by axisId and stackId
* @return {Object} Configuration
*/
}, {
key: 'getAxisMapByItems',
value: function getAxisMapByItems(items, Axis, axisType, axisIdKey, stackGroups) {
var _props2 = this.props;
var layout = _props2.layout;
var children = _props2.children;
var data = _props2.data;
var _state2 = this.state;
var dataEndIndex = _state2.dataEndIndex;
var dataStartIndex = _state2.dataStartIndex;
var displayedData = data.slice(dataStartIndex, dataEndIndex + 1);
var len = displayedData.length;
var isCategorial = (0, _CartesianUtils.isCategorialAxis)(layout, axisType);
var index = -1;
// The default type of x-axis is category axis,
// The default contents of x-axis is the serial numbers of data
// The default type of y-axis is number axis
// The default contents of y-axis is the domain of data
var axisMap = items.reduce(function (result, child) {
var axisId = child.props[axisIdKey];
if (!result[axisId]) {
index++;
var domain = void 0;
if (isCategorial) {
domain = (0, _range3.default)(0, len);
} else if (stackGroups && stackGroups[axisId] && stackGroups[axisId].hasStack) {
domain = (0, _CartesianUtils.getDomainOfStackGroups)(stackGroups[axisId].stackGroups, dataStartIndex, dataEndIndex);
domain = (0, _CartesianUtils.detectReferenceElementsDomain)(children, domain, axisId, axisType);
} else {
domain = (0, _DataUtils.parseSpecifiedDomain)(Axis.defaultProps.domain, (0, _CartesianUtils.getDomainOfItemsWithSameAxis)(displayedData, items.filter(function (entry) {
return entry.props[axisIdKey] === axisId;
}), 'number'));
domain = (0, _CartesianUtils.detectReferenceElementsDomain)(children, domain, axisId, axisType);
}
return _extends({}, result, _defineProperty({}, axisId, _extends({
axisType: axisType
}, Axis.defaultProps, {
hide: true,
orientation: ORIENT_MAP[axisType][index % 2],
domain: domain,
originalDomain: Axis.defaultProps.domain
})));
}
return result;
}, {});
return axisMap;
}
/**
* Calculate the scale function, position, width, height of axes
* @param {Object} axisMap The configuration of axes
* @param {Object} offset The offset of main part in the svg element
* @param {Object} axisType The type of axes, x-axis or y-axis
* @return {Object} Configuration
*/
}, {
key: 'getFormatAxisMap',
value: function getFormatAxisMap(axisMap, offset, axisType) {
var _props3 = this.props;
var width = _props3.width;
var height = _props3.height;
var layout = _props3.layout;
var displayName = this.constructor.displayName;
var ids = Object.keys(axisMap);
var steps = {
left: offset.left,
right: width - offset.right,
top: offset.top,
bottom: height - offset.bottom
};
return ids.reduce(function (result, id) {
var axis = axisMap[id];
var orientation = axis.orientation;
var type = axis.type;
var domain = axis.domain;
var _axis$padding = axis.padding;
var padding = _axis$padding === undefined ? {} : _axis$padding;
var range = void 0;
if (axisType === 'xAxis') {
range = [offset.left + (padding.left || 0), offset.left + offset.width - (padding.right || 0)];
} else {
range = layout === 'horizontal' ? [offset.top + offset.height - (padding.bottom || 0), offset.top + (padding.top || 0)] : [offset.top + (padding.top || 0), offset.top + offset.height - (padding.bottom || 0)];
}
var scale = void 0;
if (type === 'number') {
scale = (0, _d3Scale.scaleLinear)().domain(domain).range(range);
} else if (displayName.indexOf('LineChart') >= 0 || displayName.indexOf('AreaChart') >= 0) {
scale = (0, _d3Scale.scalePoint)().domain(domain).range(range);
} else {
scale = (0, _d3Scale.scaleBand)().domain(domain).range(range);
}
var ticks = (0, _CartesianUtils.getTicksOfScale)(scale, axis);
var x = void 0;
var y = void 0;
if (axisType === 'xAxis') {
x = offset.left;
y = orientation === 'top' ? steps[orientation] - axis.height : steps[orientation];
} else {
x = orientation === 'left' ? steps[orientation] - axis.width : steps[orientation];
y = offset.top;
}
var finalAxis = _extends({}, axis, ticks, {
x: x, y: y, scale: scale,
width: axisType === 'xAxis' ? offset.width : axis.width,
height: axisType === 'yAxis' ? offset.height : axis.height
});
if (!axis.hide && axisType === 'xAxis') {
steps[orientation] += (orientation === 'top' ? -1 : 1) * finalAxis.height;
} else if (!axis.hide) {
steps[orientation] += (orientation === 'left' ? -1 : 1) * finalAxis.width;
}
return _extends({}, result, _defineProperty({}, id, finalAxis));
}, {});
}
/**
* Get the information of mouse in chart, return null when the mouse is not in the chart
* @param {Object} xAxisMap The configuration of all x-axes
* @param {Object} yAxisMap The configuration of all y-axes
* @param {Object} offset The offset of main part in the svg element
* @param {Object} e The event object
* @return {Object} Mouse data
*/
}, {
key: 'getMouseInfo',
value: function getMouseInfo(xAxisMap, yAxisMap, offset, e) {
var isIn = e.chartX >= offset.left && e.chartX <= offset.left + offset.width && e.chartY >= offset.top && e.chartY <= offset.top + offset.height;
if (!isIn) {
return null;
}
var layout = this.props.layout;
var axisMap = layout === 'horizontal' ? xAxisMap : yAxisMap;
var pos = layout === 'horizontal' ? e.chartX : e.chartY;
var axis = (0, _DataUtils.getAnyElementOfObject)(axisMap);
var ticks = (0, _CartesianUtils.getTicksOfAxis)(axis, false, true);
var activeIndex = (0, _CartesianUtils.calculateActiveTickIndex)(pos, ticks);
if (activeIndex >= 0) {
return {
activeTooltipIndex: activeIndex,
activeTooltipLabel: ticks[activeIndex].value,
activeTooltipCoord: {
x: layout === 'horizontal' ? ticks[activeIndex].coordinate : e.chartX,
y: layout === 'horizontal' ? e.chartY : ticks[activeIndex].coordinate
}
};
}
return null;
}
/**
* Get the content to be displayed in the tooltip
* @param {Array} items The instances of item
* @return {Array} The content of tooltip
*/
}, {
key: 'getTooltipContent',
value: function getTooltipContent(items) {
var _state3 = this.state;
var activeTooltipIndex = _state3.activeTooltipIndex;
var dataStartIndex = _state3.dataStartIndex;
var dataEndIndex = _state3.dataEndIndex;
var data = this.props.data.slice(dataStartIndex, dataEndIndex + 1);
if (activeTooltipIndex < 0 || !items || !items.length) {
return null;
}
return items.map(function (child) {
var _child$props2 = child.props;
var dataKey = _child$props2.dataKey;
var name = _child$props2.name;
var unit = _child$props2.unit;
var formatter = _child$props2.formatter;
return _extends({}, (0, _ReactUtils.getPresentationAttributes)(child), {
dataKey: dataKey, unit: unit, formatter: formatter,
name: name || dataKey,
color: (0, _CartesianUtils.getMainColorOfGraphicItem)(child),
value: data[activeTooltipIndex][dataKey],
payload: data[activeTooltipIndex]
});
});
}
/**
* Returns default, reset state for the categorical chart.
* @param {Object} props Props object to use when creating the default state
* @return {Object} Whole new state
*/
}, {
key: 'createDefaultState',
value: function createDefaultState(props) {
return {
dataStartIndex: 0,
dataEndIndex: props.data && props.data.length - 1 || 0,
activeTooltipIndex: -1,
activeTooltipLabel: '',
activeTooltipCoord: { x: 0, y: 0 },
isTooltipActive: false
};
}
/**
* Calculate the offset of main part in the svg element
* @param {Array} items The instances of item
* @param {Object} xAxisMap The configuration of x-axis
* @param {Object} yAxisMap The configuration of y-axis
* @return {Object} The offset of main part in the svg element
*/
}, {
key: 'calculateOffset',
value: function calculateOffset(items, xAxisMap, yAxisMap) {
var _props4 = this.props;
var width = _props4.width;
var height = _props4.height;
var margin = _props4.margin;
var children = _props4.children;
var brushItem = (0, _ReactUtils.findChildByType)(children, _Brush2.default);
var offsetH = Object.keys(yAxisMap).reduce(function (result, id) {
var entry = yAxisMap[id];
var orientation = entry.orientation;
return _extends({}, result, _defineProperty({}, orientation, result[orientation] + (entry.hide ? 0 : entry.width)));
}, { left: margin.left || 0, right: margin.right || 0 });
var offsetV = Object.keys(xAxisMap).reduce(function (result, id) {
var entry = xAxisMap[id];
var orientation = entry.orientation;
return _extends({}, result, _defineProperty({}, orientation, result[orientation] + (entry.hide ? 0 : entry.height)));
}, { top: margin.top || 0, bottom: margin.bottom || 0 });
var brushBottom = offsetV.bottom;
if (brushItem) {
offsetV.bottom += brushItem.props.height || _Brush2.default.defaultProps.height;
}
var legendProps = (0, _CartesianUtils.getLegendProps)(children, items, width, height);
if (legendProps) {
var box = _Legend2.default.getLegendBBox(legendProps, width, height) || {};
if (legendProps.layout === 'horizontal' && (0, _isNumber3.default)(offsetV[legendProps.verticalAlign])) {
offsetV[legendProps.verticalAlign] += box.height || 0;
} else if (legendProps.layout === 'vertical' && (0, _isNumber3.default)(offsetH[legendProps.align])) {
offsetH[legendProps.align] += box.width || 0;
}
}
return _extends({
brushBottom: brushBottom
}, offsetH, offsetV, {
width: width - offsetH.left - offsetH.right,
height: height - offsetV.top - offsetV.bottom
});
}
}, {
key: 'handleMouseEnter',
/**
* The handler of mouse entering chart
* @param {Object} offset The offset of main part in the svg element
* @param {Object} xAxisMap The configuration of all x-axes
* @param {Object} yAxisMap The configuration of all y-axes
* @param {Object} e Event object
* @return {Null} null
*/
value: function handleMouseEnter(offset, xAxisMap, yAxisMap, e) {
var container = _reactDom2.default.findDOMNode(this);
var containerOffset = (0, _DOMUtils.getOffset)(container);
var ne = (0, _DOMUtils.calculateChartCoordinate)(e, containerOffset);
var mouse = this.getMouseInfo(xAxisMap, yAxisMap, offset, ne);
if (mouse) {
this.setState(_extends({}, mouse, {
isTooltipActive: true
}));
}
}
/**
* The handler of mouse moving in chart
* @param {Object} offset The offset of main part in the svg element
* @param {Object} xAxisMap The configuration of all x-axes
* @param {Object} yAxisMap The configuration of all y-axes
* @param {Object} e Event object
* @return {Null} no return
*/
}, {
key: 'handleMouseMove',
value: function handleMouseMove(offset, xAxisMap, yAxisMap, e) {
var container = _reactDom2.default.findDOMNode(this);
var containerOffset = (0, _DOMUtils.getOffset)(container);
var ne = (0, _DOMUtils.calculateChartCoordinate)(e, containerOffset);
var mouse = this.getMouseInfo(xAxisMap, yAxisMap, offset, ne);
if (mouse) {
this.setState(_extends({}, mouse, {
isTooltipActive: true
}));
} else {
this.setState({
isTooltipActive: false
});
}
}
/**
* The handler if mouse leaving chart
* @return {Null} no return
*/
}, {
key: 'validateAxes',
value: function validateAxes() {
var _props5 = this.props;
var layout = _props5.layout;
var children = _props5.children;
var xAxes = (0, _ReactUtils.findAllByType)(children, _XAxis2.default);
var yAxes = (0, _ReactUtils.findAllByType)(children, _YAxis2.default);
if (layout === 'horizontal' && xAxes && xAxes.length) {
xAxes.forEach(function (axis) {
(0, _LogUtils.warn)(axis.props.type === 'category', 'x-axis should be category axis when the layout is horizontal');
});
} else if (layout === 'vertical') {
var displayName = this.constructor.displayName;
(0, _LogUtils.warn)(yAxes && yAxes.length, 'You should add <YAxis type="number" /> in ' + displayName + '.\n The layout is vertical now, y-axis should be category axis,\n but y-axis is number axis when no YAxis is added.');
(0, _LogUtils.warn)(xAxes && xAxes.length, 'You should add <XAxis /> in ' + displayName + '.\n The layout is vertical now, x-axis is category when no XAxis is added.');
if (yAxes && yAxes.length) {
yAxes.forEach(function (axis) {
(0, _LogUtils.warn)(axis.props.type === 'category', 'y-axis should be category axis when the layout is vertical');
});
}
}
return null;
}
/**
* Draw axes
* @param {Object} axisMap The configuration of all x-axes or y-axes
* @param {String} name The name of axes
* @return {ReactElement} The instance of x-axes
*/
}, {
key: 'renderAxes',
value: function renderAxes(axisMap, name) {
var _props6 = this.props;
var width = _props6.width;
var height = _props6.height;
var ids = axisMap && Object.keys(axisMap);
if (ids && ids.length) {
var axes = [];
for (var i = 0, len = ids.length; i < len; i++) {
var axis = axisMap[ids[i]];
if (!axis.hide) {
axes.push(_react2.default.createElement(_CartesianAxis2.default, _extends({}, axis, {
key: name + '-' + ids[i],
viewBox: { x: 0, y: 0, width: width, height: height },
ticks: (0, _CartesianUtils.getTicksOfAxis)(axis, true)
})));
}
}
return axes.length ? _react2.default.createElement(
_Layer2.default,
{ key: name + '-layer', className: 'recharts-' + name },
axes
) : null;
}
return null;
}
/**
* Draw grid
* @param {Object} xAxisMap The configuration of all x-axes
* @param {Object} yAxisMap The configuration of all y-axes
* @param {Object} offset The offset of main part in the svg element
* @return {ReactElement} The instance of grid
*/
}, {
key: 'renderGrid',
value: function renderGrid(xAxisMap, yAxisMap, offset) {
var _props7 = this.props;
var children = _props7.children;
var width = _props7.width;
var height = _props7.height;
var gridItem = (0, _ReactUtils.findChildByType)(children, _CartesianGrid2.default);
if (!gridItem) {
return null;
}
var xAxis = (0, _DataUtils.getAnyElementOfObject)(xAxisMap);
var yAxis = (0, _DataUtils.getAnyElementOfObject)(yAxisMap);
var verticalPoints = (0, _CartesianUtils.getCoordinatesOfGrid)(_CartesianAxis2.default.getTicks(_extends({}, _CartesianAxis2.default.defaultProps, xAxis, {
ticks: (0, _CartesianUtils.getTicksOfAxis)(xAxis, true),
viewBox: { x: 0, y: 0, width: width, height: height }
})), offset.left, offset.left + offset.width);
var horizontalPoints = (0, _CartesianUtils.getCoordinatesOfGrid)(_CartesianAxis2.default.getTicks(_extends({}, _CartesianAxis2.default.defaultProps, yAxis, {
ticks: (0, _CartesianUtils.getTicksOfAxis)(yAxis, true),
viewBox: { x: 0, y: 0, width: width, height: height }
})), offset.top, offset.top + offset.height);
return _react2.default.cloneElement(gridItem, {
key: 'grid',
x: offset.left,
y: offset.top,
width: offset.width,
height: offset.height,
verticalPoints: verticalPoints, horizontalPoints: horizontalPoints
});
}
/**
* Draw legend
* @param {Array} items The instances of item
* @return {ReactElement} The instance of Legend
*/
}, {
key: 'renderLegend',
value: function renderLegend(items) {
var _props8 = this.props;
var children = _props8.children;
var width = _props8.width;
var height = _props8.height;
var margin = _props8.margin;
var legendWidth = width - margin.left - margin.right;
var legendHeight = height - margin.top - margin.bottom;
var props = (0, _CartesianUtils.getLegendProps)(children, items, legendWidth, legendHeight);
if (!props) {
return null;
}
return _react2.default.createElement(_Legend2.default, _extends({}, props, {
chartWidth: width,
chartHeight: height,
margin: margin
}));
}
/**
* Draw Tooltip
* @param {ReactElement} tooltipItem The instance of Tooltip
* @param {Array} items The instances of GraphicalChild
* @param {Object} offset The offset of main part in the svg element
* @return {ReactElement} The instance of Tooltip
*/
}, {
key: 'renderTooltip',
value: function renderTooltip(tooltipItem, items, offset) {
var _state4 = this.state;
var isTooltipActive = _state4.isTooltipActive;
var activeTooltipLabel = _state4.activeTooltipLabel;
var activeTooltipCoord = _state4.activeTooltipCoord;
var viewBox = {
x: offset.left,
y: offset.top,
width: offset.width,
height: offset.height
};
return _react2.default.cloneElement(tooltipItem, {
viewBox: viewBox,
active: isTooltipActive,
label: activeTooltipLabel,
payload: isTooltipActive ? this.getTooltipContent(items) : [],
coordinate: activeTooltipCoord
});
}
}, {
key: 'renderBrush',
value: function renderBrush(xAxisMap, yAxisMap, offset) {
var _props9 = this.props;
var children = _props9.children;
var margin = _props9.margin;
var data = _props9.data;
var _state5 = this.state;
var dataStartIndex = _state5.dataStartIndex;
var dataEndIndex = _state5.dataEndIndex;
var brushItem = (0, _ReactUtils.findChildByType)(children, _Brush2.default);
if (!brushItem) {
return null;
}
return _react2.default.cloneElement(brushItem, {
onChange: this.handleBrushChange,
data: data,
x: offset.left,
y: offset.top + offset.height + offset.brushBottom - (margin.bottom || 0),
width: offset.width,
startIndex: dataStartIndex,
endIndex: dataEndIndex
});
}
}, {
key: 'renderReferenceElements',
value: function renderReferenceElements(xAxisMap, yAxisMap, offset, isFront, Compt) {
var children = this.props.children;
var elements = (0, _ReactUtils.findAllByType)(children, Compt);
if (!elements || !elements.length) {
return null;
}
var keyPrefix = (0, _ReactUtils.getDisplayName)(Compt) + '-' + (isFront ? 'front' : 'back');
return elements.filter(function (entry) {
return isFront === entry.props.isFront;
}).map(function (entry, i) {
var _entry$props = entry.props;
var xAxisId = _entry$props.xAxisId;
var yAxisId = _entry$props.yAxisId;
return _react2.default.cloneElement(entry, {
key: keyPrefix + '-' + i,
xAxis: xAxisMap[xAxisId],
yAxis: yAxisMap[yAxisId],
viewBox: {
x: offset.left,
y: offset.top,
width: offset.width,
height: offset.height
}
});
});
}
}, {
key: 'render',
value: function render() {
var data = this.props.data;
if (!(0, _ReactUtils.validateWidthHeight)(this) || !data || !data.length) {
return null;
}
var _props10 = this.props;
var style = _props10.style;
var children = _props10.children;
var layout = _props10.layout;
var className = _props10.className;
var width = _props10.width;
var height = _props10.height;
var stackOffset = _props10.stackOffset;
var numberAxisName = layout === 'horizontal' ? 'yAxis' : 'xAxis';
var items = (0, _ReactUtils.findAllByType)(children, GraphicalChild);
var stackGroups = (0, _CartesianUtils.getStackGroupsByAxisId)(data, items, numberAxisName + 'Id', stackOffset);
var xAxisMap = this.getAxisMap('xAxis', items, numberAxisName === 'xAxis' && stackGroups);
var yAxisMap = this.getAxisMap('yAxis', items, numberAxisName === 'yAxis' && stackGroups);
var offset = this.calculateOffset(items, xAxisMap, yAxisMap);
xAxisMap = this.getFormatAxisMap(xAxisMap, offset, 'xAxis');
yAxisMap = this.getFormatAxisMap(yAxisMap, offset, 'yAxis');
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
var events = tooltipItem ? {
onMouseEnter: this.handleMouseEnter.bind(this, offset, xAxisMap, yAxisMap),
onMouseMove: this.handleMouseMove.bind(this, offset, xAxisMap, yAxisMap),
onMouseLeave: this.handleMouseLeave
} : null;
return _react2.default.createElement(
'div',
_extends({
className: (0, _classnames2.default)('recharts-wrapper', className),
style: _extends({ position: 'relative', cursor: 'default' }, style, { width: width, height: height })
}, events),
_react2.default.createElement(
_Surface2.default,
{ width: width, height: height },
this.renderGrid(xAxisMap, yAxisMap, offset),
this.renderReferenceElements(xAxisMap, yAxisMap, offset, false, _ReferenceLine2.default),
this.renderReferenceElements(xAxisMap, yAxisMap, offset, false, _ReferenceDot2.default),
this.renderAxes(xAxisMap, 'x-axis'),
this.renderAxes(yAxisMap, 'y-axis'),
_react2.default.createElement(ChartComponent, _extends({}, this.props, this.state, {
graphicalItems: items,
xAxisMap: xAxisMap,
yAxisMap: yAxisMap,
offset: offset,
stackGroups: stackGroups
})),
this.renderReferenceElements(xAxisMap, yAxisMap, offset, true, _ReferenceLine2.default),
this.renderReferenceElements(xAxisMap, yAxisMap, offset, true, _ReferenceDot2.default),
this.renderBrush(xAxisMap, yAxisMap, offset),
(0, _ReactUtils.filterSvgElements)(children)
),
this.renderLegend(items),
tooltipItem && this.renderTooltip(tooltipItem, items, offset)
);
}
}]);
return CategoricalChartWrapper;
}(_react.Component), _class.displayName = (0, _ReactUtils.getDisplayName)(ChartComponent), _class.propTypes = {
width: _react.PropTypes.number,
height: _react.PropTypes.number,
data: _react.PropTypes.arrayOf(_react.PropTypes.object),
layout: _react.PropTypes.oneOf(['horizontal', 'vertical']),
stackOffset: _react.PropTypes.oneOf(['sign', 'expand', 'none', 'wiggle', 'silhouette']),
margin: _react.PropTypes.shape({
top: _react.PropTypes.number,
right: _react.PropTypes.number,
bottom: _react.PropTypes.number,
left: _react.PropTypes.number
}),
style: _react.PropTypes.object,
className: _react.PropTypes.string,
children: _react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.node), _react.PropTypes.node])
}, _class.defaultProps = {
layout: 'horizontal',
stackOffset: 'none',
margin: { top: 5, right: 5, bottom: 5, left: 5 }
}, _temp);
return CategoricalChartWrapper;
};
exports.default = generateCategoricalChart;
/***/ },
/* 261 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getTicksOfScale = exports.getLegendProps = exports.getMainColorOfGraphicItem = exports.calculateActiveTickIndex = exports.getTicksOfAxis = exports.getCoordinatesOfGrid = exports.isCategorialAxis = exports.getDomainOfItemsWithSameAxis = exports.getDomainOfStackGroups = exports.getDomainOfDataByKey = exports.calculateDomainOfTicks = exports.getStackedDataOfItem = exports.getStackGroupsByAxisId = exports.getStackedData = exports.detectReferenceElementsDomain = undefined;
var _uniqueId2 = __webpack_require__(234);
var _uniqueId3 = _interopRequireDefault(_uniqueId2);
var _isString2 = __webpack_require__(119);
var _isString3 = _interopRequireDefault(_isString2);
var _isNumber2 = __webpack_require__(47);
var _isNumber3 = _interopRequireDefault(_isNumber2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _ReactUtils = __webpack_require__(133);
var _ReferenceDot = __webpack_require__(249);
var _ReferenceDot2 = _interopRequireDefault(_ReferenceDot);
var _ReferenceLine = __webpack_require__(248);
var _ReferenceLine2 = _interopRequireDefault(_ReferenceLine);
var _Legend = __webpack_require__(46);
var _Legend2 = _interopRequireDefault(_Legend);
var _rechartsScale = __webpack_require__(262);
var _d3Shape = __webpack_require__(131);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
/* eslint no-param-reassign: 0 */
var offsetSign = function offsetSign(series, order) {
var n = series.length;
if (n <= 0) {
return;
}
for (var j = 0, m = series[0].length; j < m; ++j) {
var positive = 0;
var negative = 0;
for (var i = 0; i < n; ++i) {
var value = isNaN(series[i][j][1]) ? series[i][j][0] : series[i][j][1];
if (value >= 0) {
series[i][j][0] = positive;
series[i][j][1] = positive + value;
positive += series[i][j][1];
} else {
series[i][j][0] = negative;
series[i][j][1] = negative + value;
negative = series[i][j][1];
}
}
}
};
var STACK_OFFSET_MAP = {
sign: offsetSign,
expand: _d3Shape.stackOffsetExpand,
none: _d3Shape.stackOffsetNone,
silhouette: _d3Shape.stackOffsetSilhouette,
wiggle: _d3Shape.stackOffsetWiggle
};
var detectReferenceElementsDomain = exports.detectReferenceElementsDomain = function detectReferenceElementsDomain(children, domain, axisId, axisType) {
var lines = (0, _ReactUtils.findAllByType)(children, _ReferenceLine2.default);
var dots = (0, _ReactUtils.findAllByType)(children, _ReferenceDot2.default);
var elements = lines.concat(dots);
var idKey = axisType + 'Id';
var valueKey = axisType[0];
return elements.reduce(function (result, el) {
if (el.props[idKey] === axisId && el.props.alwaysShow && (0, _isNumber3.default)(el.props[valueKey])) {
var value = el.props[valueKey];
return [Math.min(result[0], value), Math.max(result[1], value)];
}
return result;
}, domain);
};
var getStackedData = exports.getStackedData = function getStackedData(data, stackItems, offsetType) {
var dataKeys = stackItems.map(function (item) {
return item.props.dataKey;
});
var stack = (0, _d3Shape.stack)().keys(dataKeys).value(function (d, key) {
return +d[key] || 0;
}).order(_d3Shape.stackOrderNone).offset(offsetSign);
return stack(data);
};
var getStackGroupsByAxisId = exports.getStackGroupsByAxisId = function getStackGroupsByAxisId(data, items, axisIdKey, offsetType) {
var stackGroups = items.reduce(function (result, item) {
var _item$props = item.props;
var stackId = _item$props.stackId;
var dataKey = _item$props.dataKey;
var axisId = item.props[axisIdKey];
var parentGroup = result[axisId] || { hasStack: false, stackGroups: {} };
if ((0, _isNumber3.default)(stackId) || (0, _isString3.default)(stackId)) {
var childGroup = parentGroup.stackGroups[stackId] || { items: [] };
childGroup.items.push(item);
if (childGroup.items.length >= 2) {
parentGroup.hasStack = true;
}
parentGroup.stackGroups[stackId] = childGroup;
} else {
parentGroup.stackGroups[(0, _uniqueId3.default)('_stackId_')] = {
items: [item]
};
}
return _extends({}, result, _defineProperty({}, axisId, parentGroup));
}, {});
return Object.keys(stackGroups).reduce(function (result, axisId) {
var group = stackGroups[axisId];
if (group.hasStack) {
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
var g = group.stackGroups[stackId];
return _extends({}, res, _defineProperty({}, stackId, {
items: g.items,
stackedData: getStackedData(data, g.items, offsetType)
}));
}, {});
}
return _extends({}, result, _defineProperty({}, axisId, group));
}, {});
};
var getStackedDataOfItem = exports.getStackedDataOfItem = function getStackedDataOfItem(item, stackGroups) {
var stackId = item.props.stackId;
if ((0, _isNumber3.default)(stackId) || (0, _isString3.default)(stackId)) {
var group = stackGroups[stackId];
if (group && group.items.length) {
var itemIndex = -1;
for (var i = 0, len = group.items.length; i < len; i++) {
if (group.items[i] === item) {
itemIndex = i;
break;
}
}
return itemIndex >= 0 ? group.stackedData[itemIndex] : null;
}
}
return null;
};
/**
* get domain of ticks
* @param {Array} ticks Ticks of axis
* @param {String} type The type of axis
* @return {Array} domain
*/
var calculateDomainOfTicks = exports.calculateDomainOfTicks = function calculateDomainOfTicks(ticks, type) {
if (type === 'number') {
return [Math.min.apply(null, ticks), Math.max.apply(null, ticks)];
}
return ticks;
};
/**
* Get domain of data by key
* @param {Array} data The data displayed in the chart
* @param {String} key The unique key of a group of data
* @param {String} type The type of axis
* @return {Array} Domain of data
*/
var getDomainOfDataByKey = exports.getDomainOfDataByKey = function getDomainOfDataByKey(data, key, type) {
if (type === 'number') {
var domain = data.map(function (entry) {
return (0, _isNumber3.default)(entry[key]) ? entry[key] : 0;
});
return [Math.min.apply(null, domain), Math.max.apply(null, domain)];
}
return data.map(function (entry) {
var value = entry[key];
return (0, _isNumber3.default)(value) || (0, _isString3.default)(value) ? value : '';
});
};
var getDomainOfSingle = function getDomainOfSingle(data) {
return data.reduce(function (result, entry) {
return [Math.min(result[0], entry[0], entry[1]), Math.max(result[1], entry[0], entry[1])];
}, [Infinity, -Infinity]);
};
var getDomainOfStackGroups = exports.getDomainOfStackGroups = function getDomainOfStackGroups(stackGroups, startIndex, endIndex) {
return Object.keys(stackGroups).reduce(function (result, stackId) {
var group = stackGroups[stackId];
var stackedData = group.stackedData;
var domain = stackedData.reduce(function (res, entry) {
var s = getDomainOfSingle(entry.slice(startIndex, endIndex + 1));
return [Math.min(res[0], s[0]), Math.max(res[1], s[1])];
}, [Infinity, -Infinity]);
return [Math.min(domain[0], result[0]), Math.max(domain[1], result[1])];
}, [Infinity, -Infinity]);
};
/**
* Get domain of data by the configuration of item element
* @param {Array} data The data displayed in the chart
* @param {Array} items The instances of item
* @param {String} type The type of axis, number - Number Axis, category - Category Axis
* @return {Array} Domain
*/
var getDomainOfItemsWithSameAxis = exports.getDomainOfItemsWithSameAxis = function getDomainOfItemsWithSameAxis(data, items, type) {
var domains = items.map(function (item) {
return getDomainOfDataByKey(data, item.props.dataKey, type);
});
if (type === 'number') {
// Calculate the domain of number axis
return domains.reduce(function (result, entry) {
return [Math.min(result[0], entry[0]), Math.max(result[1], entry[1])];
}, [Infinity, -Infinity]);
}
var tag = {};
// Get the union set of category axis
return domains.reduce(function (result, entry) {
for (var i = 0, len = entry.length; i < len; i++) {
if (!tag[entry[i]]) {
tag[entry[i]] = true;
result.push(entry[i]);
}
}
return result;
}, []);
};
var isCategorialAxis = exports.isCategorialAxis = function isCategorialAxis(layout, axisType) {
return layout === 'horizontal' && axisType === 'xAxis' || layout === 'vertical' && axisType === 'yAxis';
};
/**
* Calculate the Coordinates of grid
* @param {Array} ticks The ticks in axis
* @param {Number} min The minimun value of axis
* @param {Number} max The maximun value of axis
* @return {Array} Coordinates
*/
var getCoordinatesOfGrid = exports.getCoordinatesOfGrid = function getCoordinatesOfGrid(ticks, min, max) {
var hasMin = void 0;
var hasMax = void 0;
var values = ticks.map(function (entry) {
if (entry.coordinate === min) {
hasMin = true;
}
if (entry.coordinate === max) {
hasMax = true;
}
return entry.coordinate;
});
if (!hasMin) {
values.push(min);
}
if (!hasMax) {
values.push(max);
}
return values;
};
/**
* Get the ticks of an axis
* @param {Object} axis The configuration of an axis
* @param {Boolean} isGrid Whether or not are the ticks in grid
* @param {Boolean} isAll Return the ticks of all the points or not
* @return {Array} Ticks
*/
var getTicksOfAxis = exports.getTicksOfAxis = function getTicksOfAxis(axis, isGrid, isAll) {
var scale = axis.scale;
var duplicateDomain = axis.duplicateDomain;
var type = axis.type;
var offset = (isGrid || isAll) && type === 'category' ? scale.bandwidth() / 2 : 0;
// The ticks setted by user should only affect the ticks adjacent to axis line
if (isGrid && (axis.ticks || axis.niceTicks)) {
return (axis.ticks || axis.niceTicks).map(function (entry) {
var scaleContent = duplicateDomain ? duplicateDomain.indexOf(entry) : entry;
return {
coordinate: scale(scaleContent) + offset,
value: entry
};
});
}
if (scale.ticks && !isAll) {
return scale.ticks(axis.tickCount).map(function (entry) {
return { coordinate: scale(entry) + offset, value: entry };
});
}
// When axis has duplicated text, serial numbers are used to generate scale
return scale.domain().map(function (entry) {
return {
coordinate: scale(entry) + offset,
value: duplicateDomain ? duplicateDomain[entry] : entry
};
});
};
var calculateActiveTickIndex = exports.calculateActiveTickIndex = function calculateActiveTickIndex(coordinate, ticks) {
var index = -1;
var len = ticks.length;
if (len > 1) {
for (var i = 0; i < len; i++) {
if (i === 0 && coordinate <= (ticks[i].coordinate + ticks[i + 1].coordinate) / 2 || i > 0 && i < len - 1 && coordinate > (ticks[i].coordinate + ticks[i - 1].coordinate) / 2 && coordinate <= (ticks[i].coordinate + ticks[i + 1].coordinate) / 2 || i === len - 1 && coordinate > (ticks[i].coordinate + ticks[i - 1].coordinate) / 2) {
index = i;
break;
}
}
} else {
index = 0;
}
return index;
};
/**
* Get the main color of each graphic item
* @param {ReactElement} item A graphic item
* @return {String} Color
*/
var getMainColorOfGraphicItem = exports.getMainColorOfGraphicItem = function getMainColorOfGraphicItem(item) {
var displayName = item.type.displayName;
var result = void 0;
switch (displayName) {
case 'Line':
case 'Area':
result = item.props.stroke;
break;
default:
result = item.props.fill;
break;
}
return result;
};
var getLegendProps = exports.getLegendProps = function getLegendProps(children, graphicItems, width, height) {
var legendItem = (0, _ReactUtils.findChildByType)(children, _Legend2.default);
if (!legendItem) {
return null;
}
var legendData = legendItem.props && legendItem.props.payload || graphicItems.map(function (child) {
var _child$props = child.props;
var dataKey = _child$props.dataKey;
var name = _child$props.name;
var legendType = _child$props.legendType;
return {
type: legendType || 'square',
color: getMainColorOfGraphicItem(child),
value: name || dataKey
};
}, undefined);
return _extends({}, legendItem.props, _Legend2.default.getWithHeight(legendItem, width, height), {
payload: legendData
});
};
/**
* Configure the scale function of axis
* @param {Object} scale The scale function
* @param {Object} opts The configuration of axis
* @return {Object} null
*/
var getTicksOfScale = exports.getTicksOfScale = function getTicksOfScale(scale, opts) {
var type = opts.type;
var tickCount = opts.tickCount;
var ticks = opts.ticks;
var originalDomain = opts.originalDomain;
var allowDecimals = opts.allowDecimals;
if (tickCount && type === 'number' && originalDomain && (originalDomain[0] === 'auto' || originalDomain[1] === 'auto')) {
// Calculate the ticks by the number of grid when the axis is a number axis
var domain = scale.domain();
var tickValues = (0, _rechartsScale.getNiceTickValues)(domain, tickCount, allowDecimals);
scale.domain(calculateDomainOfTicks(tickValues, type));
return { niceTicks: tickValues };
} else if (tickCount && type === 'number') {
var _domain = scale.domain();
var _tickValues = (0, _rechartsScale.getTickValues)(_domain, tickCount, allowDecimals);
return { niceTicks: _tickValues };
}
return null;
};
/***/ },
/* 262 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _getNiceTickValues = __webpack_require__(263);
Object.defineProperty(exports, 'getTickValues', {
enumerable: true,
get: function get() {
return _getNiceTickValues.getTickValues;
}
});
Object.defineProperty(exports, 'getNiceTickValues', {
enumerable: true,
get: function get() {
return _getNiceTickValues.getNiceTickValues;
}
});
/***/ },
/* 263 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getTickValues = exports.getNiceTickValues = undefined;
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); /**
* @fileOverview calculate tick values of scale
* @author xile611, arcthur
* @date 2015-09-17
*/
var _utils = __webpack_require__(264);
var _arithmetic = __webpack_require__(265);
var _arithmetic2 = _interopRequireDefault(_arithmetic);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Calculate a interval of a minimum value and a maximum value
*
* @param {Number} min The minimum value
* @param {Number} max The maximum value
* @return {Array} An interval
*/
function getValidInterval(_ref) {
var _ref2 = _slicedToArray(_ref, 2);
var min = _ref2[0];
var max = _ref2[1];
var validMin = min;
var validMax = max;
// exchange
if (min > max) {
validMin = max;
validMax = min;
}
return [validMin, validMax];
}
/**
* Calculate the step which is easy to understand between ticks, like 10, 20, 25
*
* @param {Number} roughStep The rough step calculated by deviding the
* difference by the tickCount
* @param {Boolean} allowDecimals Allow the ticks to be decimals or not
* @param {Integer} correctionFactor A correction factor
* @return {Number} The step which is easy to understand between two ticks
*/
function getFormatStep(roughStep, allowDecimals, correctionFactor) {
if (roughStep <= 0) {
return 0;
}
var digitCount = _arithmetic2.default.getDigitCount(roughStep);
// The ratio between the rough step and the smallest number which has a bigger
// order of magnitudes than the rough step
var stepRatio = roughStep / Math.pow(10, digitCount);
// When an integer and a float multiplied, the accuracy of result may be wrong
var amendStepRatio = digitCount !== 1 ? _arithmetic2.default.multiply(Math.ceil(stepRatio / 0.05) + correctionFactor, 0.05) : _arithmetic2.default.multiply(Math.ceil(stepRatio / 0.1) + correctionFactor, 0.1);
var formatStep = _arithmetic2.default.multiply(amendStepRatio, Math.pow(10, digitCount));
return allowDecimals ? formatStep : Math.ceil(formatStep);
}
/**
* calculate the ticks when the minimum value equals to the maximum value
*
* @param {Number} value The minimum valuue which is also the maximum value
* @param {Integer} tickCount The count of ticks
* @param {Boolean} allowDecimals Allow the ticks to be decimals or not
* @return {Array} ticks
*/
function getTickOfSingleValue(value, tickCount, allowDecimals) {
var isFlt = _arithmetic2.default.isFloat(value);
var step = 1;
// calculate the middle value of ticks
var middle = value;
if (isFlt && allowDecimals) {
var absVal = Math.abs(value);
if (absVal < 1) {
// The step should be a float number when the difference is smaller than 1
step = Math.pow(10, _arithmetic2.default.getDigitCount(value) - 1);
middle = _arithmetic2.default.multiply(Math.floor(value / step), step);
} else if (absVal > 1) {
// Return the maximum integer which is smaller than 'value' when 'value' is greater than 1
middle = Math.floor(value);
}
} else if (value === 0) {
middle = Math.floor((tickCount - 1) / 2);
} else if (!allowDecimals) {
middle = Math.floor(value);
}
var middleIndex = Math.floor((tickCount - 1) / 2);
var fn = (0, _utils.compose)((0, _utils.map)(function (n) {
return _arithmetic2.default.sum(middle, _arithmetic2.default.multiply(n - middleIndex, step));
}), _utils.range);
return fn(0, tickCount);
}
/**
* Calculate the step
*
* @param {Number} min The minimum value of an interval
* @param {Number} max The maximum value of an interval
* @param {Integer} tickCount The count of ticks
* @param {Boolean} allowDecimals Allow the ticks to be decimals or not
* @param {Number} correctionFactor A correction factor
* @return {Object} The step, minimum value of ticks, maximum value of ticks
*/
function calculateStep(min, max, tickCount, allowDecimals) {
var correctionFactor = arguments.length <= 4 || arguments[4] === undefined ? 0 : arguments[4];
// The step which is easy to understand between two ticks
var step = getFormatStep((max - min) / (tickCount - 1), allowDecimals, correctionFactor);
// A medial value of ticks
var middle = void 0;
// When 0 is inside the interval, 0 should be a tick
if (min <= 0 && max >= 0) {
middle = 0;
} else {
middle = (min + max) / 2;
middle = middle - middle % step;
}
var belowCount = Math.ceil((middle - min) / step);
var upCount = Math.ceil((max - middle) / step);
var scaleCount = belowCount + upCount + 1;
if (scaleCount > tickCount) {
// When more ticks need to cover the interval, step should be bigger.
return calculateStep(min, max, tickCount, allowDecimals, correctionFactor + 1);
} else if (scaleCount < tickCount) {
// When less ticks can cover the interval, we should add some additional ticks
upCount = max > 0 ? upCount + (tickCount - scaleCount) : upCount;
belowCount = max > 0 ? belowCount : belowCount + (tickCount - scaleCount);
}
return {
step: step,
tickMin: _arithmetic2.default.minus(middle, _arithmetic2.default.multiply(belowCount, step)),
tickMax: _arithmetic2.default.sum(middle, _arithmetic2.default.multiply(upCount, step))
};
}
/**
* Calculate the ticks of an interval
*
* @param {Number} min, max min: The minimum value, max: The maximum value
* @param {Integer} tickCount The count of ticks
* @param {Boolean} allowDecimals Allow the ticks to be decimals or not
* @return {Array} ticks
*/
function getNiceTickValuesFn(_ref3) {
var _ref4 = _slicedToArray(_ref3, 2);
var min = _ref4[0];
var max = _ref4[1];
var tickCount = arguments.length <= 1 || arguments[1] === undefined ? 6 : arguments[1];
var allowDecimals = arguments.length <= 2 || arguments[2] === undefined ? true : arguments[2];
// More than two ticks should be return
var count = Math.max(tickCount, 2);
var _getValidInterval = getValidInterval([min, max]);
var _getValidInterval2 = _slicedToArray(_getValidInterval, 2);
var cormin = _getValidInterval2[0];
var cormax = _getValidInterval2[1];
if (cormin === cormax) {
return getTickOfSingleValue(cormin, tickCount, allowDecimals);
}
// Get the step between two ticks
var _calculateStep = calculateStep(cormin, cormax, count, allowDecimals);
var step = _calculateStep.step;
var tickMin = _calculateStep.tickMin;
var tickMax = _calculateStep.tickMax;
var values = _arithmetic2.default.rangeStep(tickMin, tickMax + 0.1 * step, step);
return min > max ? (0, _utils.reverse)(values) : values;
}
function getTickValuesFn(_ref5) {
var _ref6 = _slicedToArray(_ref5, 2);
var min = _ref6[0];
var max = _ref6[1];
var tickCount = arguments.length <= 1 || arguments[1] === undefined ? 6 : arguments[1];
var allowDecimals = arguments.length <= 2 || arguments[2] === undefined ? true : arguments[2];
// More than two ticks should be return
var count = Math.max(tickCount, 2);
var _getValidInterval3 = getValidInterval([min, max]);
var _getValidInterval4 = _slicedToArray(_getValidInterval3, 2);
var cormin = _getValidInterval4[0];
var cormax = _getValidInterval4[1];
if (cormin === cormax) {
return getTickOfSingleValue(cormin, tickCount, allowDecimals);
}
var step = getFormatStep((cormax - cormin) / (count - 1), allowDecimals, 0);
var fn = (0, _utils.compose)((0, _utils.map)(function (n) {
return cormin + n * step;
}), _utils.range);
var values = fn(0, count).filter(function (entry) {
return entry >= cormin && entry <= cormax;
});
return min > max ? (0, _utils.reverse)(values) : values;
}
var getNiceTickValues = exports.getNiceTickValues = (0, _utils.memoize)(getNiceTickValuesFn);
var getTickValues = exports.getTickValues = (0, _utils.memoize)(getTickValuesFn);
/***/ },
/* 264 */
/***/ function(module, exports) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
var identity = function identity(i) {
return i;
};
var PLACE_HOLDER = exports.PLACE_HOLDER = {
'@@functional/placeholder': true
};
var isPlaceHolder = function isPlaceHolder(val) {
return val === PLACE_HOLDER;
};
var curry0 = function curry0(fn) {
return function _curried() {
if (arguments.length === 0 || arguments.length === 1 && isPlaceHolder(arguments.length <= 0 ? undefined : arguments[0])) {
return _curried;
}
return fn.apply(undefined, arguments);
};
};
var curryN = function curryN(n, fn) {
if (n === 1) {
return fn;
}
return curry0(function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var argsLength = args.filter(function (arg) {
return arg !== PLACE_HOLDER;
}).length;
if (argsLength >= n) {
return fn.apply(undefined, args);
}
return curryN(n - argsLength, curry0(function () {
for (var _len2 = arguments.length, restArgs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
restArgs[_key2] = arguments[_key2];
}
var newArgs = args.map(function (arg) {
return isPlaceHolder(arg) ? restArgs.shift() : arg;
});
return fn.apply(undefined, _toConsumableArray(newArgs).concat(restArgs));
}));
});
};
var curry = exports.curry = function curry(fn) {
return curryN(fn.length, fn);
};
var range = exports.range = function range(begin, end) {
var arr = [];
for (var i = begin; i < end; ++i) {
arr[i - begin] = i;
}
return arr;
};
var map = exports.map = curry(function (fn, arr) {
if (Array.isArray(arr)) {
return arr.map(fn);
}
return Object.keys(arr).map(function (key) {
return arr[key];
}).map(fn);
});
var compose = exports.compose = function compose() {
for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
args[_key3] = arguments[_key3];
}
if (!args.length) {
return identity;
}
var fns = args.reverse();
// first function can receive multiply arguments
var firstFn = fns[0];
var tailsFn = fns.slice(1);
return function () {
return tailsFn.reduce(function (res, fn) {
return fn(res);
}, firstFn.apply(undefined, arguments));
};
};
var reverse = exports.reverse = function reverse(arr) {
if (Array.isArray(arr)) {
return arr.reverse();
}
// can be string
return arr.split('').reverse.join('');
};
var memoize = exports.memoize = function memoize(fn) {
var lastArgs = null;
var lastResult = null;
return function () {
for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
args[_key4] = arguments[_key4];
}
if (lastArgs && args.every(function (val, i) {
return val === lastArgs[i];
})) {
return lastResult;
}
lastArgs = args;
lastResult = fn.apply(undefined, args);
return lastResult;
};
};
/***/ },
/* 265 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _utils = __webpack_require__(264);
/**
* 判断数据是否为浮点类型
*
* @param {Number} num 输入值
* @return {Boolean} 是否是浮点类型
*/
function isFloat(num) {
return (/^([+-]?)\d*\.\d+$/.test(num)
);
}
/**
* 获取数值的位数
* 其中绝对值属于区间[0.1, 1), 得到的值为0
* 绝对值属于区间[0.01, 0.1),得到的位数为 -1
* 绝对值属于区间[0.001, 0.01),得到的位数为 -2
*
* @param {Number} value 数值
* @return {Integer} 位数
*/
/**
* @fileOverview 一些公用的运算方法
* @author xile611
* @date 2015-09-17
*/
function getDigitCount(value) {
var abs = Math.abs(value);
var result = void 0;
if (value === 0) {
result = 1;
} else if (abs < 1) {
result = Math.floor(Math.log(abs) / Math.log(10)) + 1;
} else {
var str = '' + value;
var ary = str.split('.');
result = ary[0].length;
}
return result;
}
/**
* 计算数值的小数点后的位数
* @param {Number} a 数值,可能为整数,也可能为浮点数
* @return {Integer} 位数
*/
function getDecimalDigitCount(a) {
var str = a ? '' + a : '';
var ary = str.split('.');
return ary.length > 1 ? ary[1].length : 0;
}
/**
* 乘法运算,解决了js运算的精度问题
* @param {Number} a 被乘数
* @param {Number} b 乘数
* @return {Number} 积
*/
function multiply(a, b) {
var intA = parseInt(('' + a).replace('.', ''), 10);
var intB = parseInt(('' + b).replace('.', ''), 10);
var count = getDecimalDigitCount(a) + getDecimalDigitCount(b);
return intA * intB / Math.pow(10, count);
}
/**
* 加法运算,解决了js运算的精度问题
* @param {Number} a 被加数
* @param {Number} b 加数
* @return {Number} 和
*/
function sum(a, b) {
var count = Math.max(getDecimalDigitCount(a), getDecimalDigitCount(b));
count = Math.pow(10, count);
return (multiply(a, count) + multiply(b, count)) / count;
}
/**
* 减法运算,解决了js运算的精度问题
* @param {Number} a 被减数
* @param {Number} b 减数
* @return {Number} 差
*/
function minus(a, b) {
return sum(a, -b);
}
/**
* 除法运算,解决了js运算的精度问题
* @param {Number} a 被除数
* @param {Number} b 除数
* @return {Number} 结果
*/
function divide(a, b) {
var ca = getDecimalDigitCount(a);
var cb = getDecimalDigitCount(b);
var intA = parseInt(('' + a).replace('.', ''), 10);
var intB = parseInt(('' + b).replace('.', ''), 10);
return intA / intB * Math.pow(10, cb - ca);
}
/**
* 按照固定的步长获取[start, end)这个区间的数据
* 并且需要处理js计算精度的问题
*
* @param {Number} start 起点
* @param {Number} end 终点,不包含该值
* @param {Number} step 步长
* @return {Array} 若干数值
*/
function rangeStep(start, end, step) {
var num = start;
var result = [];
while (num < end) {
result.push(num);
num = sum(num, step);
}
return result;
}
/**
* 对数值进行线性插值
*
* @param {Number} a 定义域的极点
* @param {Number} b 定义域的极点
* @param {Number} t [0, 1]内的某个值
* @return {Number} 定义域内的某个值
*/
var interpolateNumber = (0, _utils.curry)(function (a, b, t) {
var newA = +a;
var newB = +b;
return newA + t * (newB - newA);
});
/**
* 线性插值的逆运算
*
* @param {Number} a 定义域的极点
* @param {Number} b 定义域的极点
* @param {Number} x 可以认为是插值后的一个输出值
* @return {Number} 当x在 a ~ b这个范围内时,返回值属于[0, 1]
*/
var uninterpolateNumber = (0, _utils.curry)(function (a, b, x) {
var diff = b - +a;
diff = diff || Infinity;
return (x - a) / diff;
});
/**
* 线性插值的逆运算,并且有截断的操作
*
* @param {Number} a 定义域的极点
* @param {Number} b 定义域的极点
* @param {Number} x 可以认为是插值后的一个输出值
* @return {Number} 当x在 a ~ b这个区间内时,返回值属于[0, 1],
* 当x不在 a ~ b这个区间时,会截断到 a ~ b 这个区间
*/
var uninterpolateTruncation = (0, _utils.curry)(function (a, b, x) {
var diff = b - +a;
diff = diff || Infinity;
return Math.max(0, Math.min(1, (x - a) / diff));
});
exports.default = {
rangeStep: rangeStep,
isFloat: isFloat,
getDigitCount: getDigitCount,
getDecimalDigitCount: getDecimalDigitCount,
sum: sum,
minus: minus,
multiply: multiply,
divide: divide,
interpolateNumber: interpolateNumber,
uninterpolateNumber: uninterpolateNumber,
uninterpolateTruncation: uninterpolateTruncation
};
/***/ },
/* 266 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.BarChart = undefined;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Bar Chart
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
var _Tooltip = __webpack_require__(135);
var _Tooltip2 = _interopRequireDefault(_Tooltip);
var _Rectangle = __webpack_require__(220);
var _Rectangle2 = _interopRequireDefault(_Rectangle);
var _DataUtils = __webpack_require__(214);
var _ReactUtils = __webpack_require__(133);
var _generateCategoricalChart = __webpack_require__(260);
var _generateCategoricalChart2 = _interopRequireDefault(_generateCategoricalChart);
var _Cell = __webpack_require__(216);
var _Cell2 = _interopRequireDefault(_Cell);
var _Bar = __webpack_require__(254);
var _Bar2 = _interopRequireDefault(_Bar);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _CartesianUtils = __webpack_require__(261);
var _AnimationDecorator = __webpack_require__(231);
var _AnimationDecorator2 = _interopRequireDefault(_AnimationDecorator);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var BarChart = (0, _AnimationDecorator2.default)(_class = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(BarChart, _Component);
function BarChart() {
_classCallCheck(this, BarChart);
return _possibleConstructorReturn(this, Object.getPrototypeOf(BarChart).apply(this, arguments));
}
_createClass(BarChart, [{
key: 'getComposedData',
/**
* Compose the data of each group
* @param {Object} item An instance of Bar
* @param {Array} barPosition The offset and size of each bar
* @param {Object} xAxis The configuration of x-axis
* @param {Object} yAxis The configuration of y-axis
* @param {Object} offset The offset of main part in the svg element
* @param {Array} stackedData The stacked data of a bar item
* @return {Array} Composed data
*/
value: function getComposedData(item, barPosition, xAxis, yAxis, offset, stackedData) {
var _props = this.props;
var layout = _props.layout;
var dataStartIndex = _props.dataStartIndex;
var dataEndIndex = _props.dataEndIndex;
var _item$props = item.props;
var dataKey = _item$props.dataKey;
var children = _item$props.children;
var minPointSize = _item$props.minPointSize;
var pos = barPosition[dataKey];
var data = this.props.data.slice(dataStartIndex, dataEndIndex + 1);
var xTicks = (0, _CartesianUtils.getTicksOfAxis)(xAxis);
var yTicks = (0, _CartesianUtils.getTicksOfAxis)(yAxis);
var baseValue = this.getBaseValue(xAxis, yAxis);
var hasStack = stackedData && stackedData.length;
var cells = (0, _ReactUtils.findAllByType)(children, _Cell2.default);
return data.map(function (entry, index) {
var value = stackedData ? stackedData[dataStartIndex + index] : [baseValue, entry[dataKey]];
var x = void 0;
var y = void 0;
var width = void 0;
var height = void 0;
if (layout === 'horizontal') {
x = xTicks[index].coordinate + pos.offset;
y = yAxis.scale(xAxis.orientation === 'top' ? value[0] : value[1]);
width = pos.size;
height = xAxis.orientation === 'top' ? yAxis.scale(value[1]) - yAxis.scale(value[0]) : yAxis.scale(value[0]) - yAxis.scale(value[1]);
if (minPointSize > 0 && Math.abs(height) < minPointSize) {
var delta = Math.sign(height) * (minPointSize - Math.abs(height));
y -= delta;
height += delta;
}
} else {
x = xAxis.scale(yAxis.orientation === 'left' ? value[0] : value[1]);
y = yTicks[index].coordinate + pos.offset;
width = yAxis.orientation === 'left' ? xAxis.scale(value[1]) - xAxis.scale(value[0]) : xAxis.scale(value[0]) - xAxis.scale(value[1]);
height = pos.size;
if (minPointSize > 0 && Math.abs(width) < minPointSize) {
var _delta = Math.sign(width) * (minPointSize - Math.abs(width));
x -= _delta;
width += _delta;
}
}
return _extends({}, entry, {
x: x, y: y, width: width, height: height, value: stackedData ? value : value[1]
}, cells && cells[index] && cells[index].props);
});
}
}, {
key: 'getBaseValue',
value: function getBaseValue(xAxis, yAxis) {
var layout = this.props.layout;
var numberAxis = layout === 'horizontal' ? yAxis : xAxis;
var domain = numberAxis.scale.domain();
if (numberAxis.type === 'number') {
return Math.max(Math.min(domain[0], domain[1]), 0);
}
return domain[0];
}
/**
* Calculate the size of each bar and the gap between two bars
* @param {Number} bandSize The size of each category
* @param {sizeList} sizeList The size of all groups
* @return {Number} The size of each bar and the gap between two bars
*/
}, {
key: 'getBarPosition',
value: function getBarPosition(bandSize, sizeList) {
var _props2 = this.props;
var barGap = _props2.barGap;
var barCategoryGap = _props2.barCategoryGap;
var len = sizeList.length;
var result = void 0;
// whether or not is barSize setted by user
if (sizeList[0].barSize === +sizeList[0].barSize) {
(function () {
var sum = sizeList.reduce(function (res, entry) {
return res + entry.barSize || 0;
}, 0);
sum += (len - 1) * barGap;
var offset = (bandSize - sum) / 2 >> 0;
var prev = { offset: offset - barGap, size: 0 };
result = sizeList.reduce(function (res, entry) {
var newRes = _extends({}, res, _defineProperty({}, entry.dataKey, {
offset: prev.offset + prev.size + barGap,
size: entry.barSize
}));
prev = newRes[entry.dataKey];
if (entry.stackList && entry.stackList.length) {
entry.stackList.forEach(function (key) {
newRes[key] = newRes[entry.dataKey];
});
}
return newRes;
}, {});
})();
} else {
(function () {
var offset = (0, _DataUtils.getPercentValue)(barCategoryGap, bandSize, 0, true);
var size = (bandSize - 2 * offset - (len - 1) * barGap) / len >> 0;
result = sizeList.reduce(function (res, entry, i) {
var newRes = _extends({}, res, _defineProperty({}, entry.dataKey, {
offset: offset + (size + barGap) * i,
size: size
}));
if (entry.stackList && entry.stackList.length) {
entry.stackList.forEach(function (key) {
newRes[key] = newRes[entry.dataKey];
});
}
return newRes;
}, {});
})();
}
return result;
}
/**
* Calculate the size of all groups
* @param {Object} stackGroups The items grouped by axisId and stackId
* @return {Object} The size of all groups
*/
}, {
key: 'getSizeList',
value: function getSizeList(stackGroups) {
var _props3 = this.props;
var layout = _props3.layout;
var barSize = _props3.barSize;
return Object.keys(stackGroups).reduce(function (result, axisId) {
var sgs = stackGroups[axisId].stackGroups;
return _extends({}, result, _defineProperty({}, axisId, Object.keys(sgs).reduce(function (res, stackId) {
var items = sgs[stackId].items;
var barItems = items.filter(function (item) {
return item.type.displayName === 'Bar';
});
if (barItems && barItems.length) {
var dataKey = barItems[0].props.dataKey;
return [].concat(_toConsumableArray(res), [{
dataKey: dataKey,
stackList: barItems.slice(1).map(function (item) {
return item.props.dataKey;
}),
barSize: barItems[0].props.barSize || barSize
}]);
}
return res;
}, [])));
}, {});
}
}, {
key: 'renderCursor',
value: function renderCursor(xAxisMap, yAxisMap, offset) {
var _props4 = this.props;
var children = _props4.children;
var isTooltipActive = _props4.isTooltipActive;
var layout = _props4.layout;
var activeTooltipIndex = _props4.activeTooltipIndex;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
if (!tooltipItem || !tooltipItem.props.cursor || !isTooltipActive || activeTooltipIndex < 0) {
return null;
}
var axisMap = layout === 'horizontal' ? xAxisMap : yAxisMap;
var axis = (0, _DataUtils.getAnyElementOfObject)(axisMap);
var ticks = (0, _CartesianUtils.getTicksOfAxis)(axis);
if (!ticks || !ticks[activeTooltipIndex]) {
return null;
}
var start = ticks[activeTooltipIndex].coordinate;
var bandSize = axis.scale.bandwidth();
var cursorProps = _extends({
fill: '#f1f1f1'
}, (0, _ReactUtils.getPresentationAttributes)(tooltipItem.props.cursor), {
x: layout === 'horizontal' ? start : offset.left + 0.5,
y: layout === 'horizontal' ? offset.top + 0.5 : start,
width: layout === 'horizontal' ? bandSize : offset.width - 1,
height: layout === 'horizontal' ? offset.height - 1 : bandSize
});
return _react2.default.isValidElement(tooltipItem.props.cursor) ? _react2.default.cloneElement(tooltipItem.props.cursor, cursorProps) : _react2.default.createElement(_Rectangle2.default, _extends({}, cursorProps, { className: 'recharts-bar-cursor' }));
}
/**
* Draw the main part of bar chart
* @param {Array} items All the instance of Bar
* @param {Object} xAxisMap The configuration of all x-axis
* @param {Object} yAxisMap The configuration of all y-axis
* @param {Object} offset The offset of main part in the svg element
* @param {Object} stackGroups The items grouped by axisId and stackId
* @return {ReactComponent} All the instances of Bar
*/
}, {
key: 'renderItems',
value: function renderItems(items, xAxisMap, yAxisMap, offset, stackGroups) {
var _this2 = this;
if (!items || !items.length) {
return null;
}
var layout = this.props.layout;
var sizeList = this.getSizeList(stackGroups);
var animationId = this.props.animationId;
var barPositionMap = {};
return items.map(function (child, i) {
var _child$props = child.props;
var xAxisId = _child$props.xAxisId;
var yAxisId = _child$props.yAxisId;
var axisId = layout === 'horizontal' ? yAxisId : xAxisId;
var bandSize = (0, _DataUtils.getBandSizeOfScale)(layout === 'horizontal' ? xAxisMap[xAxisId].scale : yAxisMap[yAxisId].scale);
var barPosition = barPositionMap[axisId] || _this2.getBarPosition(bandSize, sizeList[axisId]);
var stackedData = stackGroups && stackGroups[axisId] && stackGroups[axisId].hasStack && (0, _CartesianUtils.getStackedDataOfItem)(child, stackGroups[axisId].stackGroups);
return _react2.default.cloneElement(child, _extends({
key: 'bar-' + i
}, (0, _ReactUtils.filterEventAttributes)(_this2.props), {
layout: layout,
animationId: animationId,
data: _this2.getComposedData(child, barPosition, xAxisMap[xAxisId], yAxisMap[yAxisId], offset, stackedData)
}));
}, this);
}
}, {
key: 'render',
value: function render() {
var _props5 = this.props;
var isComposed = _props5.isComposed;
var graphicalItems = _props5.graphicalItems;
var xAxisMap = _props5.xAxisMap;
var yAxisMap = _props5.yAxisMap;
var offset = _props5.offset;
var stackGroups = _props5.stackGroups;
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-bar-graphical' },
!isComposed && this.renderCursor(xAxisMap, yAxisMap, offset),
this.renderItems(graphicalItems, xAxisMap, yAxisMap, offset, stackGroups)
);
}
}]);
return BarChart;
}(_react.Component), _class2.displayName = 'BarChart', _class2.propTypes = {
layout: _react.PropTypes.oneOf(['horizontal', 'vertical']),
dataStartIndex: _react.PropTypes.number,
dataEndIndex: _react.PropTypes.number,
data: _react.PropTypes.array,
isTooltipActive: _react.PropTypes.bool,
activeTooltipIndex: _react.PropTypes.number,
xAxisMap: _react.PropTypes.object,
yAxisMap: _react.PropTypes.object,
offset: _react.PropTypes.object,
graphicalItems: _react.PropTypes.array,
children: _react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.node), _react.PropTypes.node]),
stackGroups: _react.PropTypes.object,
barCategoryGap: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
barGap: _react.PropTypes.number,
barSize: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
// used internally
isComposed: _react.PropTypes.bool,
animationId: _react.PropTypes.number
}, _class2.defaultProps = {
barCategoryGap: '10%',
barGap: 4
}, _temp)) || _class) || _class;
exports.default = (0, _generateCategoricalChart2.default)(BarChart, _Bar2.default);
exports.BarChart = BarChart;
/***/ },
/* 267 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp2; /**
* @fileOverview Pie Chart
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _Surface = __webpack_require__(42);
var _Surface2 = _interopRequireDefault(_Surface);
var _Legend = __webpack_require__(46);
var _Legend2 = _interopRequireDefault(_Legend);
var _Tooltip = __webpack_require__(135);
var _Tooltip2 = _interopRequireDefault(_Tooltip);
var _Pie = __webpack_require__(230);
var _Pie2 = _interopRequireDefault(_Pie);
var _Cell = __webpack_require__(216);
var _Cell2 = _interopRequireDefault(_Cell);
var _DataUtils = __webpack_require__(214);
var _ReactUtils = __webpack_require__(133);
var _PolarUtils = __webpack_require__(218);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var PieChart = (0, _PureRender2.default)(_class = (_temp2 = _class2 = function (_Component) {
_inherits(PieChart, _Component);
function PieChart() {
var _Object$getPrototypeO;
var _temp, _this, _ret;
_classCallCheck(this, PieChart);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(PieChart)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = {
activeTooltipLabel: '',
activeTooltipCoord: { x: 0, y: 0 },
activeTooltipPayload: [],
isTooltipActive: false
}, _this.handleMouseEnter = function (el, index, e) {
var _this$props = _this.props;
var children = _this$props.children;
var onMouseEnter = _this$props.onMouseEnter;
var cx = el.cx;
var cy = el.cy;
var outerRadius = el.outerRadius;
var midAngle = el.midAngle;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
if (tooltipItem) {
_this.setState({
isTooltipActive: true,
activeTooltipCoord: (0, _PolarUtils.polarToCartesian)(cx, cy, outerRadius, midAngle),
activeTooltipPayload: [el]
}, function () {
if (onMouseEnter) {
onMouseEnter(el, index, e);
}
});
} else if (onMouseEnter) {
onMouseEnter(el, index, e);
}
}, _this.handleMouseLeave = function (el, index, e) {
var _this$props2 = _this.props;
var children = _this$props2.children;
var onMouseLeave = _this$props2.onMouseLeave;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
if (tooltipItem) {
_this.setState({
isTooltipActive: false
}, function () {
if (onMouseLeave) {
onMouseLeave(el, index, e);
}
});
} else if (onMouseLeave) {
onMouseLeave(el, index, e);
}
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(PieChart, [{
key: 'getComposedData',
value: function getComposedData(item) {
var _item$props = item.props;
var data = _item$props.data;
var children = _item$props.children;
var props = (0, _ReactUtils.getPresentationAttributes)(item.props);
var cells = (0, _ReactUtils.findAllByType)(children, _Cell2.default);
if (data && data.length) {
return data.map(function (entry, index) {
return _extends({}, props, entry, cells && cells[index] && cells[index].props);
});
}
if (cells && cells.length) {
return cells.map(function (cell) {
return _extends({}, props, cell.props);
});
}
return [];
}
}, {
key: 'renderLegend',
/**
* Draw legend
* @param {Array} items The instances of Pie
* @return {ReactElement} The instance of Legend
*/
value: function renderLegend(items) {
var _this2 = this;
var children = this.props.children;
var legendItem = (0, _ReactUtils.findChildByType)(children, _Legend2.default);
if (!legendItem) {
return null;
}
var _props = this.props;
var width = _props.width;
var height = _props.height;
var margin = _props.margin;
var legendData = legendItem.props && legendItem.props.payload || items.reduce(function (result, child) {
var nameKey = child.props.nameKey;
var data = _this2.getComposedData(child);
return result.concat(data.map(function (entry) {
return _extends({}, entry, { type: child.props.legendType, value: entry[nameKey],
color: entry.fill
});
}));
}, []);
return _react2.default.cloneElement(legendItem, _extends({}, _Legend2.default.getWithHeight(legendItem, width, height), {
payload: legendData,
chartWidth: width,
chartHeight: height,
margin: margin
}));
}
}, {
key: 'renderTooltip',
value: function renderTooltip() {
var children = this.props.children;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
if (!tooltipItem) {
return null;
}
var _props2 = this.props;
var width = _props2.width;
var height = _props2.height;
var _state = this.state;
var isTooltipActive = _state.isTooltipActive;
var activeTooltipLabel = _state.activeTooltipLabel;
var activeTooltipCoord = _state.activeTooltipCoord;
var activeTooltipPayload = _state.activeTooltipPayload;
var viewBox = { x: 0, y: 0, width: width, height: height };
return _react2.default.cloneElement(tooltipItem, {
viewBox: viewBox,
active: isTooltipActive,
label: activeTooltipLabel,
payload: activeTooltipPayload,
coordinate: activeTooltipCoord
});
}
/**
* Draw the main part of bar chart
* @param {Array} items All the instance of Pie
* @return {ReactComponent} All the instance of Pie
*/
}, {
key: 'renderItems',
value: function renderItems(items) {
var _this3 = this;
var _props3 = this.props;
var width = _props3.width;
var height = _props3.height;
var margin = _props3.margin;
var onClick = _props3.onClick;
return items.map(function (child, i) {
var _child$props = child.props;
var innerRadius = _child$props.innerRadius;
var outerRadius = _child$props.outerRadius;
var data = _child$props.data;
var cx = (0, _DataUtils.getPercentValue)(child.props.cx, width, width / 2);
var cy = (0, _DataUtils.getPercentValue)(child.props.cy, height, height / 2);
var maxRadius = (0, _PolarUtils.getMaxRadius)(width, height, margin);
return _react2.default.cloneElement(child, {
key: 'recharts-pie-' + i,
cx: cx,
cy: cy,
maxRadius: child.props.maxRadius || Math.sqrt(width * width + height * height) / 2,
innerRadius: (0, _DataUtils.getPercentValue)(innerRadius, maxRadius, 0),
outerRadius: (0, _DataUtils.getPercentValue)(outerRadius, maxRadius, maxRadius * 0.8),
composedData: _this3.getComposedData(child),
onMouseEnter: _this3.handleMouseEnter,
onMouseLeave: _this3.handleMouseLeave,
onClick: onClick
});
});
}
}, {
key: 'render',
value: function render() {
if (!(0, _ReactUtils.validateWidthHeight)(this)) {
return null;
}
var _props4 = this.props;
var style = _props4.style;
var children = _props4.children;
var className = _props4.className;
var width = _props4.width;
var height = _props4.height;
var items = (0, _ReactUtils.findAllByType)(children, _Pie2.default);
return _react2.default.createElement(
'div',
{
className: (0, _classnames2.default)('recharts-wrapper', className),
style: _extends({ position: 'relative', cursor: 'default' }, style, { width: width, height: height })
},
_react2.default.createElement(
_Surface2.default,
{ width: width, height: height },
this.renderItems(items),
(0, _ReactUtils.filterSvgElements)(children)
),
this.renderLegend(items),
this.renderTooltip()
);
}
}]);
return PieChart;
}(_react.Component), _class2.displayName = 'PieChart', _class2.propTypes = {
width: _react.PropTypes.number,
height: _react.PropTypes.number,
margin: _react.PropTypes.shape({
top: _react.PropTypes.number,
right: _react.PropTypes.number,
bottom: _react.PropTypes.number,
left: _react.PropTypes.number
}),
title: _react.PropTypes.string,
style: _react.PropTypes.object,
children: _react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.node), _react.PropTypes.node]),
className: _react.PropTypes.string,
onMouseEnter: _react.PropTypes.func,
onMouseLeave: _react.PropTypes.func,
onClick: _react.PropTypes.func
}, _class2.defaultProps = {
style: {},
margin: { top: 0, right: 0, bottom: 0, left: 0 }
}, _temp2)) || _class;
exports.default = PieChart;
/***/ },
/* 268 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isFunction2 = __webpack_require__(49);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp2;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /**
* @fileOverview TreemapChart
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _Surface = __webpack_require__(42);
var _Surface2 = _interopRequireDefault(_Surface);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
var _Rectangle = __webpack_require__(220);
var _Rectangle2 = _interopRequireDefault(_Rectangle);
var _ReactUtils = __webpack_require__(133);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _reactSmooth = __webpack_require__(137);
var _reactSmooth2 = _interopRequireDefault(_reactSmooth);
var _Tooltip = __webpack_require__(135);
var _Tooltip2 = _interopRequireDefault(_Tooltip);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var computeNode = function computeNode(_ref) {
var depth = _ref.depth;
var node = _ref.node;
var index = _ref.index;
var valueKey = _ref.valueKey;
var children = node.children;
var childDepth = depth + 1;
var computedChildren = children && children.length ? children.map(function (child, i) {
return computeNode({ depth: childDepth, node: child, index: i, valueKey: valueKey });
}) : null;
var value = void 0;
if (children && children.length) {
value = computedChildren.reduce(function (result, child) {
return result + child.value;
}, 0);
} else {
value = isNaN(node[valueKey]) || node[valueKey] <= 0 ? 0 : node[valueKey];
}
return _extends({}, node, {
children: computedChildren,
value: value, depth: depth, index: index
});
};
var filterRect = function filterRect(node) {
return { x: node.x, y: node.y, width: node.width, height: node.height };
};
// Compute the area for each child based on value & scale.
var getAreaOfChildren = function getAreaOfChildren(children, areaValueRatio) {
var ratio = areaValueRatio < 0 ? 0 : areaValueRatio;
return children.map(function (child) {
var area = child.value * ratio;
return _extends({}, child, {
area: isNaN(area) || area <= 0 ? 0 : area
});
});
};
// Computes the score for the specified row, as the worst aspect ratio.
var getWorstScore = function getWorstScore(row, parentSize, aspectRatio) {
var parentArea = parentSize * parentSize;
var rowArea = row.area * row.area;
var _row$reduce = row.reduce(function (result, child) {
return {
min: Math.min(result.min, child.area),
max: Math.max(result.max, child.area)
};
}, { min: Infinity, max: 0 });
var min = _row$reduce.min;
var max = _row$reduce.max;
return rowArea ? Math.max(parentArea * max * aspectRatio / rowArea, rowArea / (parentArea * min * aspectRatio)) : Infinity;
};
var horizontalPosition = function horizontalPosition(row, parentSize, parentRect, isFlush) {
var rowHeight = parentSize ? Math.round(row.area / parentSize) : 0;
if (isFlush || rowHeight > parentRect.height) {
rowHeight = parentRect.height;
}
var curX = parentRect.x;
var child = void 0;
for (var i = 0, len = row.length; i < len; i++) {
child = row[i];
child.x = curX;
child.y = parentRect.y;
child.height = rowHeight;
child.width = Math.min(rowHeight ? Math.round(child.area / rowHeight) : 0, parentRect.x + parentRect.width - curX);
curX += child.width;
}
// what's z
child.z = true;
// add the remain x to the last one of row
child.width += parentRect.x + parentRect.width - curX;
return _extends({}, parentRect, {
y: parentRect.y + rowHeight,
height: parentRect.height - rowHeight
});
};
var verticalPosition = function verticalPosition(row, parentSize, parentRect, isFlush) {
var rowWidth = parentSize ? Math.round(row.area / parentSize) : 0;
if (isFlush || rowWidth > parentRect.width) {
rowWidth = parentRect.width;
}
var curY = parentRect.y;
var child = void 0;
for (var i = 0, len = row.length; i < len; i++) {
child = row[i];
child.x = parentRect.x;
child.y = curY;
child.width = rowWidth;
child.height = Math.min(rowWidth ? Math.round(child.area / rowWidth) : 0, parentRect.y + parentRect.height - curY);
curY += child.height;
}
child.z = false;
child.height += parentRect.y + parentRect.height - curY;
return _extends({}, parentRect, {
x: parentRect.x + rowWidth,
width: parentRect.width - rowWidth
});
};
var position = function position(row, parentSize, parentRect, isFlush) {
if (parentSize === parentRect.width) {
return horizontalPosition(row, parentSize, parentRect, isFlush);
}
return verticalPosition(row, parentSize, parentRect, isFlush);
};
// Recursively arranges the specified node's children into squarified rows.
var squarify = function squarify(node, aspectRatio) {
var children = node.children;
if (children && children.length) {
var rect = filterRect(node);
var row = [];
var best = Infinity; // the best row score so far
var score = void 0; // the current row score
var size = Math.min(rect.width, rect.height); // initial orientation
var scaleChildren = getAreaOfChildren(children, rect.width * rect.height / node.value);
var tempChildren = scaleChildren.slice();
row.area = 0;
var child = void 0;
while (tempChildren.length > 0) {
// row first
row.push(child = tempChildren[0]);
row.area += child.area;
score = getWorstScore(row, size, aspectRatio);
if (score <= best) {
// continue with this orientation
tempChildren.shift();
best = score;
} else {
// abort, and try a different orientation
row.area -= row.pop().area;
rect = position(row, size, rect, false);
size = Math.min(rect.width, rect.height);
row.length = row.area = 0;
best = Infinity;
}
}
if (row.length) {
rect = position(row, size, rect, true);
row.length = row.area = 0;
}
return _extends({}, node, { children: scaleChildren.map(function (c) {
return squarify(c, aspectRatio);
}) });
}
return node;
};
var Treemap = (0, _PureRender2.default)(_class = (_temp2 = _class2 = function (_Component) {
_inherits(Treemap, _Component);
function Treemap() {
var _Object$getPrototypeO;
var _temp, _this, _ret;
_classCallCheck(this, Treemap);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Treemap)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = _this.createDefaultState(), _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Treemap, [{
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (nextProps.data !== this.props.data) {
this.setState(this.createDefaultState());
}
}
/**
* Returns default, reset state for the treemap chart.
* @return {Object} Whole new state
*/
}, {
key: 'createDefaultState',
value: function createDefaultState() {
return {
isTooltipActive: false,
activeNode: null
};
}
}, {
key: 'handleMouseEnter',
value: function handleMouseEnter(node, e) {
var _props = this.props;
var onMouseEnter = _props.onMouseEnter;
var children = _props.children;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
if (tooltipItem) {
this.setState({
isTooltipActive: true,
activeNode: node
}, function () {
if (onMouseEnter) {
onMouseEnter(node, e);
}
});
} else if (onMouseEnter) {
onMouseEnter(node, e);
}
}
}, {
key: 'handleMouseLeave',
value: function handleMouseLeave(node, e) {
var _props2 = this.props;
var onMouseLeave = _props2.onMouseLeave;
var children = _props2.children;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
if (tooltipItem) {
this.setState({
isTooltipActive: false,
activeNode: null
}, function () {
if (onMouseLeave) {
onMouseLeave(node, e);
}
});
} else if (onMouseLeave) {
onMouseLeave(node, e);
}
}
}, {
key: 'handleClick',
value: function handleClick(node) {
var onClick = this.props.onClick;
if (onClick) {
onClick(node);
}
}
}, {
key: 'renderAnimatedItem',
value: function renderAnimatedItem(content, nodeProps, isLeaf) {
var _this2 = this;
var _props3 = this.props;
var isAnimationActive = _props3.isAnimationActive;
var animationBegin = _props3.animationBegin;
var animationDuration = _props3.animationDuration;
var animationEasing = _props3.animationEasing;
var isUpdateAnimationActive = _props3.isUpdateAnimationActive;
var width = nodeProps.width;
var height = nodeProps.height;
var x = nodeProps.x;
var y = nodeProps.y;
var translateX = parseInt((Math.random() * 2 - 1) * width, 10);
var translateY = parseInt((Math.random() * 2 - 1) * height, 10);
var event = {};
if (isLeaf) {
event = {
onMouseEnter: this.handleMouseEnter.bind(this, nodeProps),
onMouseLeave: this.handleMouseLeave.bind(this, nodeProps),
onClick: this.handleClick.bind(this, nodeProps)
};
}
return _react2.default.createElement(
_reactSmooth2.default,
{
from: { x: x, y: y, width: width, height: height },
to: { x: x, y: y, width: width, height: height },
duration: animationDuration,
easing: animationEasing,
isActive: isUpdateAnimationActive
},
function (_ref2) {
var currX = _ref2.x;
var currY = _ref2.y;
var currWidth = _ref2.width;
var currHeight = _ref2.height;
return _react2.default.createElement(
_reactSmooth2.default,
{
from: 'translate(' + translateX + 'px, ' + translateX + 'px)',
to: 'translate(0, 0)',
attributeName: 'transform',
begin: animationBegin,
easing: animationEasing,
isActive: isAnimationActive,
duration: animationDuration
},
_react2.default.createElement(
_Layer2.default,
event,
_this2.renderContentItem(content, _extends({}, nodeProps, {
isAnimationActive: isAnimationActive,
isUpdateAnimationActive: !isUpdateAnimationActive,
width: currWidth,
height: currHeight,
x: currX,
y: currY
}))
)
);
}
);
}
}, {
key: 'renderContentItem',
value: function renderContentItem(content, nodeProps) {
if (_react2.default.isValidElement(content)) {
return _react2.default.cloneElement(content, nodeProps);
} else if ((0, _isFunction3.default)(content)) {
return content(nodeProps);
}
return _react2.default.createElement(_Rectangle2.default, nodeProps);
}
}, {
key: 'renderNode',
value: function renderNode(root, node, i) {
var _this3 = this;
var content = this.props.content;
var nodeProps = _extends({}, (0, _ReactUtils.getPresentationAttributes)(this.props), node, { root: root });
var isLeaf = !node.children || !node.children.length;
return _react2.default.createElement(
_Layer2.default,
{ key: 'recharts-treemap-node-' + i },
this.renderAnimatedItem(content, nodeProps, isLeaf),
node.children && node.children.length ? node.children.map(function (child, index) {
return _this3.renderNode(node, child, index);
}) : null
);
}
}, {
key: 'renderAllNodes',
value: function renderAllNodes() {
var _props4 = this.props;
var width = _props4.width;
var height = _props4.height;
var data = _props4.data;
var dataKey = _props4.dataKey;
var aspectRatio = _props4.aspectRatio;
var root = computeNode({
depth: 0,
node: { children: data, x: 0, y: 0, width: width, height: height },
index: 0,
valueKey: dataKey
});
var formatRoot = squarify(root, aspectRatio);
return this.renderNode(formatRoot, formatRoot, 0);
}
}, {
key: 'renderTooltip',
value: function renderTooltip(items, offset) {
var children = this.props.children;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
if (!tooltipItem) {
return null;
}
var _props5 = this.props;
var width = _props5.width;
var height = _props5.height;
var dataKey = _props5.dataKey;
var _state = this.state;
var isTooltipActive = _state.isTooltipActive;
var activeNode = _state.activeNode;
var viewBox = { x: 0, y: 0, width: width, height: height };
var coordinate = activeNode ? {
x: activeNode.x + activeNode.width / 2,
y: activeNode.y + activeNode.height / 2
} : null;
var payload = isTooltipActive && activeNode ? [{
name: '', value: activeNode[dataKey]
}] : [];
return _react2.default.cloneElement(tooltipItem, {
viewBox: viewBox,
active: isTooltipActive,
coordinate: coordinate,
label: '',
payload: payload,
separator: ''
});
}
}, {
key: 'render',
value: function render() {
if (!(0, _ReactUtils.validateWidthHeight)(this)) {
return null;
}
var _props6 = this.props;
var width = _props6.width;
var height = _props6.height;
var className = _props6.className;
var style = _props6.style;
var children = _props6.children;
return _react2.default.createElement(
'div',
{
className: (0, _classnames2.default)('recharts-wrapper', className),
style: _extends({ position: 'relative', cursor: 'default' }, style, { width: width, height: height })
},
_react2.default.createElement(
_Surface2.default,
{ width: width, height: height },
this.renderAllNodes(),
(0, _ReactUtils.filterSvgElements)(children)
),
this.renderTooltip()
);
}
}]);
return Treemap;
}(_react.Component), _class2.displayName = 'Treemap', _class2.propTypes = {
width: _react.PropTypes.number,
height: _react.PropTypes.number,
data: _react.PropTypes.array,
style: _react.PropTypes.object,
aspectRatio: _react.PropTypes.number,
content: _react.PropTypes.oneOfType([_react.PropTypes.element, _react.PropTypes.func]),
fill: _react.PropTypes.string,
stroke: _react.PropTypes.string,
className: _react.PropTypes.string,
dataKey: _react.PropTypes.string,
children: _react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.node), _react.PropTypes.node]),
onMouseEnter: _react.PropTypes.func,
onMouseLeave: _react.PropTypes.func,
onClick: _react.PropTypes.func,
isAnimationActive: _react.PropTypes.bool,
isUpdateAnimationActive: _react.PropTypes.bool,
animationBegin: _react.PropTypes.number,
animationDuration: _react.PropTypes.number,
animationEasing: _react.PropTypes.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear'])
}, _class2.defaultProps = {
fill: '#fff',
stroke: '#000',
dataKey: 'value',
aspectRatio: 0.5 * (1 + Math.sqrt(5)),
isAnimationActive: true,
isUpdateAnimationActive: true,
animationBegin: 0,
animationDuration: 1500,
animationEasing: 'linear'
}, _temp2)) || _class;
exports.default = Treemap;
/***/ },
/* 269 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isObject2 = __webpack_require__(50);
var _isObject3 = _interopRequireDefault(_isObject2);
var _isFunction2 = __webpack_require__(49);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _sumBy2 = __webpack_require__(270);
var _sumBy3 = _interopRequireDefault(_sumBy2);
var _min2 = __webpack_require__(272);
var _min3 = _interopRequireDefault(_min2);
var _maxBy2 = __webpack_require__(226);
var _maxBy3 = _interopRequireDefault(_maxBy2);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp2;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /**
* @file TreemapChart
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _Surface = __webpack_require__(42);
var _Surface2 = _interopRequireDefault(_Surface);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
var _Tooltip = __webpack_require__(135);
var _Tooltip2 = _interopRequireDefault(_Tooltip);
var _Rectangle = __webpack_require__(220);
var _Rectangle2 = _interopRequireDefault(_Rectangle);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _ReactUtils = __webpack_require__(133);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var interpolationGenerator = function interpolationGenerator(a, b) {
var ka = +a;
var kb = b - ka;
return function (t) {
return ka + kb * t;
};
};
var centerY = function centerY(node) {
return node.y + node.dy / 2;
};
var getValue = function getValue(entry) {
return entry && entry.value || 0;
};
var getSumOfIds = function getSumOfIds(links, ids) {
return ids.reduce(function (result, id) {
return result + getValue(links[id]);
}, 0);
};
var getSumWithWeightedSource = function getSumWithWeightedSource(tree, links, ids) {
return ids.reduce(function (result, id) {
var link = links[id];
var sourceNode = tree[link.source];
return result + centerY(sourceNode) * getValue(links[id]);
}, 0);
};
var getSumWithWeightedTarget = function getSumWithWeightedTarget(tree, links, ids) {
return ids.reduce(function (result, id) {
var link = links[id];
var targetNode = tree[link.target];
return result + centerY(targetNode) * getValue(links[id]);
}, 0);
};
var ascendingY = function ascendingY(a, b) {
return a.y - b.y;
};
var searchTargetsAndSources = function searchTargetsAndSources(links, id) {
var sourceNodes = [];
var sourceLinks = [];
var targetNodes = [];
var targetLinks = [];
for (var i = 0, len = links.length; i < len; i++) {
var link = links[i];
if (link.source === id) {
targetNodes.push(link.target);
targetLinks.push(i);
}
if (link.target === id) {
sourceNodes.push(link.source);
sourceLinks.push(i);
}
}
return { sourceNodes: sourceNodes, sourceLinks: sourceLinks, targetLinks: targetLinks, targetNodes: targetNodes };
};
var updateDepthOfTargets = function updateDepthOfTargets(tree, curNode) {
var targetNodes = curNode.targetNodes;
for (var i = 0, len = targetNodes.length; i < len; i++) {
var target = tree[targetNodes[i]];
if (target) {
target.depth = Math.max(curNode.depth + 1, target.depth);
updateDepthOfTargets(tree, target);
}
}
};
var getNodesTree = function getNodesTree(_ref, width, nodeWidth) {
var nodes = _ref.nodes;
var links = _ref.links;
var tree = nodes.map(function (entry, index) {
var result = searchTargetsAndSources(links, index);
return _extends({}, entry, result, {
value: Math.max(getSumOfIds(links, result.sourceLinks), getSumOfIds(links, result.targetLinks)),
depth: 0
});
});
for (var i = 0, len = tree.length; i < len; i++) {
var node = tree[i];
if (!node.sourceNodes.length) {
updateDepthOfTargets(tree, node);
}
}
var maxDepth = (0, _maxBy3.default)(tree, function (entry) {
return entry.depth;
}).depth;
if (maxDepth >= 1) {
var childWidth = (width - nodeWidth) / maxDepth;
for (var _i = 0, _len = tree.length; _i < _len; _i++) {
var _node = tree[_i];
if (!_node.targetNodes.length) {
_node.depth = maxDepth;
}
_node.x = _node.depth * childWidth;
_node.dx = nodeWidth;
}
}
return { tree: tree, maxDepth: maxDepth };
};
var getDepthTree = function getDepthTree(tree, maxDepth) {
var result = [];
for (var i = 0, len = tree.length; i < len; i++) {
var node = tree[i];
if (!result[node.depth]) {
result[node.depth] = [];
}
result[node.depth].push(node);
}
return result;
};
var updateYOfTree = function updateYOfTree(depthTree, height, nodePadding, links) {
var yRatio = (0, _min3.default)(depthTree.map(function (nodes) {
return (height - (nodes.length - 1) * nodePadding) / (0, _sumBy3.default)(nodes, getValue);
}));
for (var d = 0, maxDepth = depthTree.length; d < maxDepth; d++) {
for (var i = 0, len = depthTree[d].length; i < len; i++) {
var node = depthTree[d][i];
node.y = i;
node.dy = node.value * yRatio;
}
}
return links.map(function (link) {
return _extends({}, link, { dy: getValue(link) * yRatio });
});
};
var resolveCollisions = function resolveCollisions(depthTree, height, nodePadding) {
for (var i = 0, len = depthTree.length; i < len; i++) {
var nodes = depthTree[i];
var n = nodes.length;
// Sort by the value of y
nodes.sort(ascendingY);
var y0 = 0;
for (var j = 0; j < n; j++) {
var node = nodes[j];
var dy = y0 - node.y;
if (dy > 0) {
node.y += dy;
}
y0 = node.y + node.dy + nodePadding;
}
y0 = height + nodePadding;
for (var _j = n - 1; _j >= 0; _j--) {
var _node2 = nodes[_j];
var _dy = _node2.y + _node2.dy + nodePadding - y0;
if (_dy > 0) {
_node2.y -= _dy;
y0 = _node2.y;
} else {
break;
}
}
}
};
var relaxLeftToRight = function relaxLeftToRight(tree, depthTree, links, alpha) {
for (var i = 0, maxDepth = depthTree.length; i < maxDepth; i++) {
var nodes = depthTree[i];
for (var j = 0, len = nodes.length; j < len; j++) {
var node = nodes[j];
if (node.sourceLinks.length) {
var sourceSum = getSumOfIds(links, node.sourceLinks);
var weightedSum = getSumWithWeightedSource(tree, links, node.sourceLinks);
var y = weightedSum / sourceSum;
node.y += (y - centerY(node)) * alpha;
}
}
}
};
var relaxRightToLeft = function relaxRightToLeft(tree, depthTree, links, alpha) {
for (var i = depthTree.length - 1; i >= 0; i--) {
var nodes = depthTree[i];
for (var j = 0, len = nodes.length; j < len; j++) {
var node = nodes[j];
if (node.targetLinks.length) {
var targetSum = getSumOfIds(links, node.targetLinks);
var weightedSum = getSumWithWeightedTarget(tree, links, node.targetLinks);
var y = weightedSum / targetSum;
node.y += (y - centerY(node)) * alpha;
}
}
}
};
var updateYOfLinks = function updateYOfLinks(tree, links) {
for (var i = 0, len = tree.length; i < len; i++) {
var node = tree[i];
var sy = 0;
var ty = 0;
node.targetLinks.sort(function (a, b) {
return tree[links[a].target].y - tree[links[b].target].y;
});
node.sourceLinks.sort(function (a, b) {
return tree[links[a].source].y - tree[links[b].source].y;
});
for (var j = 0, tLen = node.targetLinks.length; j < tLen; j++) {
var link = links[node.targetLinks[j]];
if (link) {
link.sy = sy;
sy += link.dy;
}
}
for (var _j2 = 0, sLen = node.sourceLinks.length; _j2 < sLen; _j2++) {
var _link = links[node.sourceLinks[_j2]];
if (_link) {
_link.ty = ty;
ty += _link.dy;
}
}
}
};
var computeData = function computeData(_ref2) {
var data = _ref2.data;
var width = _ref2.width;
var height = _ref2.height;
var iterations = _ref2.iterations;
var nodeWidth = _ref2.nodeWidth;
var nodePadding = _ref2.nodePadding;
var nodes = data.nodes;
var links = data.links;
var _getNodesTree = getNodesTree(data, width, nodeWidth);
var tree = _getNodesTree.tree;
var maxDepth = _getNodesTree.maxDepth;
var depthTree = getDepthTree(tree, maxDepth);
var newLinks = updateYOfTree(depthTree, height, nodePadding, links);
resolveCollisions(depthTree, height, nodePadding);
var alpha = 1;
for (var i = 1; i <= iterations; i++) {
relaxRightToLeft(tree, depthTree, newLinks, alpha *= 0.99);
resolveCollisions(depthTree, height, nodePadding);
relaxLeftToRight(tree, depthTree, newLinks, alpha);
resolveCollisions(depthTree, height, nodePadding);
}
updateYOfLinks(tree, newLinks);
return { nodes: tree, links: newLinks };
};
var Sankey = (0, _PureRender2.default)(_class = (_temp2 = _class2 = function (_Component) {
_inherits(Sankey, _Component);
function Sankey() {
var _Object$getPrototypeO;
var _temp, _this, _ret;
_classCallCheck(this, Sankey);
for (var _len2 = arguments.length, args = Array(_len2), _key = 0; _key < _len2; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Sankey)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = _this.createDefaultState(), _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Sankey, [{
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (nextProps.data !== this.props.data) {
this.setState(this.createDefaultState());
}
}
/**
* Returns default, reset state for the sankey chart.
* @return {Object} Whole new state
*/
}, {
key: 'createDefaultState',
value: function createDefaultState() {
return {
isTooltipActive: false
};
}
}, {
key: 'handleMouseEnter',
value: function handleMouseEnter(el, index, e) {
var _props = this.props;
var onMouseEnter = _props.onMouseEnter;
var children = _props.children;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
if (tooltipItem) {
this.setState({
activeLink: el,
isTooltipActive: true
}, function () {
if (onMouseEnter) {
onMouseEnter(el, index, e);
}
});
} else if (onMouseEnter) {
onMouseEnter(el, index, e);
}
}
}, {
key: 'handleMouseLeave',
value: function handleMouseLeave(el, index, e) {
var _props2 = this.props;
var onMouseLeave = _props2.onMouseLeave;
var children = _props2.children;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
if (tooltipItem) {
this.setState({
isTooltipActive: false
}, function () {
if (onMouseLeave) {
onMouseLeave(el, index, e);
}
});
} else if (onMouseLeave) {
onMouseLeave(el, index, e);
}
}
}, {
key: 'handleClick',
value: function handleClick(el, index, e) {
var onClick = this.props.onClick;
if (onClick) {
onClick(el, index, e);
}
}
}, {
key: 'renderLinks',
value: function renderLinks(links, nodes) {
var _props3 = this.props;
var linkCurvature = _props3.linkCurvature;
var linkContent = _props3.link;
var margin = _props3.margin;
var top = margin.top || 0;
var left = margin.left || 0;
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-sankey-links', key: 'recharts-sankey-links' },
links.map(function (link, i) {
var sourceRelativeY = link.sy;
var targetRelativeY = link.ty;
var linkWidth = link.dy;
var source = nodes[link.source];
var target = nodes[link.target];
var sourceX = source.x + source.dx + left;
var targetX = target.x + left;
var interpolationFunc = interpolationGenerator(sourceX, targetX);
var sourceControlX = interpolationFunc(linkCurvature);
var targetControlX = interpolationFunc(1 - linkCurvature);
var sourceY = source.y + sourceRelativeY + linkWidth / 2 + top;
var targetY = target.y + targetRelativeY + linkWidth / 2 + top;
var linkProps = {
sourceX: sourceX, targetX: targetX,
sourceY: sourceY, targetY: targetY,
sourceControlX: sourceControlX, targetControlX: targetControlX,
sourceRelativeY: sourceRelativeY, targetRelativeY: targetRelativeY,
linkWidth: linkWidth,
index: i,
payload: link
};
var linkPresentationAttributes = {};
if (_react2.default.isValidElement(linkContent)) {
return _react2.default.createElement(
_Layer2.default,
{ key: 'link' + i },
_react2.default.cloneElement(linkContent, linkProps)
);
} else if ((0, _isFunction3.default)(linkContent)) {
return _react2.default.createElement(
_Layer2.default,
{ key: 'link' + i },
linkContent(linkProps)
);
} else if ((0, _isObject3.default)(linkContent)) {
linkPresentationAttributes = (0, _ReactUtils.getPresentationAttributes)(linkContent);
}
return _react2.default.createElement(
_Layer2.default,
{ key: 'link' + i },
_react2.default.createElement('path', _extends({
className: 'recharts-sankey-link',
d: '\n M' + sourceX + ',' + sourceY + '\n C' + sourceControlX + ',' + sourceY + ' ' + targetControlX + ',' + targetY + ' ' + targetX + ',' + targetY + '\n ',
fill: 'none',
stroke: '#333',
strokeWidth: linkWidth,
strokeOpacity: '0.2'
}, linkPresentationAttributes))
);
})
);
}
}, {
key: 'renderNodes',
value: function renderNodes(nodes) {
var _props4 = this.props;
var nodeContent = _props4.node;
var margin = _props4.margin;
var top = margin.top || 0;
var left = margin.left || 0;
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-sankey-nodes', key: 'recharts-sankey-nodes' },
nodes.map(function (node, i) {
var x = node.x;
var y = node.y;
var dx = node.dx;
var dy = node.dy;
var nodeProps = {
x: x + left,
y: y + top,
width: dx,
height: dy,
index: i,
payload: node
};
var nodePresentationAttributes = {};
if (_react2.default.isValidElement(nodeContent)) {
return _react2.default.createElement(
_Layer2.default,
{ key: 'node' + i },
_react2.default.cloneElement(nodeContent, nodeProps)
);
} else if ((0, _isFunction3.default)(nodeContent)) {
return _react2.default.createElement(
_Layer2.default,
{ key: 'node' + i },
nodeContent(nodeProps)
);
} else if ((0, _isObject3.default)(nodeContent)) {
nodePresentationAttributes = (0, _ReactUtils.getPresentationAttributes)(nodeContent);
}
return _react2.default.createElement(
_Layer2.default,
{ key: 'node' + i },
_react2.default.createElement(_Rectangle2.default, _extends({
className: 'recharts-sankey-node',
fill: '#0088fe',
fillOpacity: '0.8'
}, nodeProps, nodePresentationAttributes))
);
})
);
}
}, {
key: 'renderTooltip',
value: function renderTooltip(links, nodes) {
var children = this.props.children;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
if (!tooltipItem) {
return null;
}
var _state = this.state;
var isTooltipActive = _state.isTooltipActive;
var activeLink = _state.activeLink;
var viewBox = { x: 0, y: 0, width: 100, height: 100 };
var coordinate = {
x: 0,
y: 0
};
var payload = isTooltipActive ? [{
name: 'hh', value: 'aa'
}] : [];
return _react2.default.cloneElement(tooltipItem, {
viewBox: viewBox,
active: isTooltipActive,
coordinate: coordinate,
label: 'bb',
payload: payload,
separator: 'cc'
});
}
}, {
key: 'render',
value: function render() {
if (!(0, _ReactUtils.validateWidthHeight)(this)) {
return null;
}
var _props5 = this.props;
var data = _props5.data;
var iterations = _props5.iterations;
var nodeWidth = _props5.nodeWidth;
var nodePadding = _props5.nodePadding;
var width = _props5.width;
var height = _props5.height;
var className = _props5.className;
var style = _props5.style;
var children = _props5.children;
var margin = _props5.margin;
var contentWidth = width - (margin.left || 0) - (margin.right || 0);
var contentHeight = height - (margin.top || 0) - (margin.bottom || 0);
var _computeData = computeData({
data: data,
width: contentWidth,
height: contentHeight,
iterations: iterations, nodeWidth: nodeWidth, nodePadding: nodePadding
});
var links = _computeData.links;
var nodes = _computeData.nodes;
return _react2.default.createElement(
'div',
{
className: (0, _classnames2.default)('recharts-wrapper', className),
style: _extends({ position: 'relative', cursor: 'default' }, style, { width: width, height: height })
},
_react2.default.createElement(
_Surface2.default,
_extends({
width: width,
height: height
}, (0, _ReactUtils.filterEventAttributes)(this.props), (0, _ReactUtils.getPresentationAttributes)(this.props)),
(0, _ReactUtils.filterSvgElements)(children),
this.renderLinks(links, nodes),
this.renderNodes(nodes)
),
this.renderTooltip(links, nodes)
);
}
}]);
return Sankey;
}(_react.Component), _class2.displayName = 'Sankey', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, _ReactUtils.EVENT_ATTRIBUTES, {
width: _react.PropTypes.number,
height: _react.PropTypes.number,
data: _react.PropTypes.shape({
nodes: _react.PropTypes.array,
links: _react.PropTypes.arrayOf(_react.PropTypes.shape({
target: _react.PropTypes.number,
source: _react.PropTypes.number,
value: _react.PropTypes.number
}))
}),
nodePadding: _react.PropTypes.number,
nodeWidth: _react.PropTypes.number,
linkCurvature: _react.PropTypes.number,
iterations: _react.PropTypes.number,
node: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.element, _react.PropTypes.func]),
link: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.element, _react.PropTypes.func]),
style: _react.PropTypes.object,
className: _react.PropTypes.string,
children: _react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.node), _react.PropTypes.node]),
margin: _react.PropTypes.shape({
top: _react.PropTypes.number,
right: _react.PropTypes.number,
bottom: _react.PropTypes.number,
left: _react.PropTypes.number
})
}), _class2.defaultProps = {
nodePadding: 10,
nodeWidth: 10,
linkCurvature: 0.5,
iterations: 32,
margin: { top: 5, right: 5, bottom: 5, left: 5 }
}, _temp2)) || _class;
exports.default = Sankey;
/***/ },
/* 270 */
/***/ function(module, exports, __webpack_require__) {
var baseIteratee = __webpack_require__(172),
baseSum = __webpack_require__(271);
/**
* This method is like `_.sum` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the value to be summed.
* The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Math
* @param {Array} array The array to iterate over.
* @param {Array|Function|Object|string} [iteratee=_.identity]
* The iteratee invoked per element.
* @returns {number} Returns the sum.
* @example
*
* var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
*
* _.sumBy(objects, function(o) { return o.n; });
* // => 20
*
* // The `_.property` iteratee shorthand.
* _.sumBy(objects, 'n');
* // => 20
*/
function sumBy(array, iteratee) {
return (array && array.length)
? baseSum(array, baseIteratee(iteratee))
: 0;
}
module.exports = sumBy;
/***/ },
/* 271 */
/***/ function(module, exports) {
/**
* The base implementation of `_.sum` and `_.sumBy` without support for
* iteratee shorthands.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {number} Returns the sum.
*/
function baseSum(array, iteratee) {
var result,
index = -1,
length = array.length;
while (++index < length) {
var current = iteratee(array[index]);
if (current !== undefined) {
result = result === undefined ? current : (result + current);
}
}
return result;
}
module.exports = baseSum;
/***/ },
/* 272 */
/***/ function(module, exports, __webpack_require__) {
var baseExtremum = __webpack_require__(227),
baseLt = __webpack_require__(273),
identity = __webpack_require__(191);
/**
* Computes the minimum value of `array`. If `array` is empty or falsey,
* `undefined` is returned.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Math
* @param {Array} array The array to iterate over.
* @returns {*} Returns the minimum value.
* @example
*
* _.min([4, 2, 8, 6]);
* // => 2
*
* _.min([]);
* // => undefined
*/
function min(array) {
return (array && array.length)
? baseExtremum(array, identity, baseLt)
: undefined;
}
module.exports = min;
/***/ },
/* 273 */
/***/ function(module, exports) {
/**
* The base implementation of `_.lt` which doesn't coerce arguments to numbers.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is less than `other`,
* else `false`.
*/
function baseLt(value, other) {
return value < other;
}
module.exports = baseLt;
/***/ },
/* 274 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _range2 = __webpack_require__(236);
var _range3 = _interopRequireDefault(_range2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp2; /**
* @fileOverview Radar Chart
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _reactDom = __webpack_require__(199);
var _reactDom2 = _interopRequireDefault(_reactDom);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _d3Scale = __webpack_require__(240);
var _rechartsScale = __webpack_require__(262);
var _Surface = __webpack_require__(42);
var _Surface2 = _interopRequireDefault(_Surface);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
var _Legend = __webpack_require__(46);
var _Legend2 = _interopRequireDefault(_Legend);
var _Tooltip = __webpack_require__(135);
var _Tooltip2 = _interopRequireDefault(_Tooltip);
var _Radar = __webpack_require__(232);
var _Radar2 = _interopRequireDefault(_Radar);
var _PolarGrid = __webpack_require__(224);
var _PolarGrid2 = _interopRequireDefault(_PolarGrid);
var _PolarAngleAxis = __webpack_require__(229);
var _PolarAngleAxis2 = _interopRequireDefault(_PolarAngleAxis);
var _PolarRadiusAxis = __webpack_require__(225);
var _PolarRadiusAxis2 = _interopRequireDefault(_PolarRadiusAxis);
var _ReactUtils = __webpack_require__(133);
var _DOMUtils = __webpack_require__(134);
var _PolarUtils = __webpack_require__(218);
var _DataUtils = __webpack_require__(214);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _AnimationDecorator = __webpack_require__(231);
var _AnimationDecorator2 = _interopRequireDefault(_AnimationDecorator);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var RadarChart = (0, _AnimationDecorator2.default)(_class = (0, _PureRender2.default)(_class = (_temp2 = _class2 = function (_Component) {
_inherits(RadarChart, _Component);
function RadarChart() {
var _Object$getPrototypeO;
var _temp, _this, _ret;
_classCallCheck(this, RadarChart);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(RadarChart)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = _this.createDefaultState(), _this.handleMouseEnter = function (itemProps, e) {
var _this$props = _this.props;
var children = _this$props.children;
var onMouseEnter = _this$props.onMouseEnter;
var points = itemProps.points;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
if (tooltipItem && points.length) {
var container = _reactDom2.default.findDOMNode(_this);
var containerOffset = (0, _DOMUtils.getOffset)(container);
var ne = (0, _DOMUtils.calculateChartCoordinate)(e, containerOffset);
_this.setState({
isTooltipActive: true,
activeTooltipLabel: itemProps.name || itemProps.dataKey,
activeTooltipCoord: { x: ne.chartX, y: ne.chartY },
activeTooltipPayload: _this.getTooltipContent(itemProps)
}, function () {
if (onMouseEnter) {
onMouseEnter(points, e);
}
});
} else if (onMouseEnter) {
onMouseEnter(points, e);
}
}, _this.handleMouseLeave = function (itemProps, e) {
var _this$props2 = _this.props;
var children = _this$props2.children;
var onMouseLeave = _this$props2.onMouseLeave;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
if (tooltipItem) {
_this.setState({
isTooltipActive: false
}, function () {
if (onMouseLeave) {
onMouseLeave(itemProps, e);
}
});
} else if (onMouseLeave) {
onMouseLeave(itemProps, e);
}
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(RadarChart, [{
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (nextProps.data !== this.props.data) {
this.setState(this.createDefaultState());
}
}
}, {
key: 'getTooltipContent',
value: function getTooltipContent(itemProps) {
var points = itemProps.points;
var dataKey = itemProps.dataKey;
var unit = itemProps.unit;
return points.map(function (entry) {
var name = entry.name;
var value = entry.value;
var payload = entry.payload;
return _extends({}, (0, _ReactUtils.getPresentationAttributes)(itemProps), {
dataKey: dataKey, unit: unit, name: name, value: value, payload: payload
});
});
}
}, {
key: 'getRadiusAxisCfg',
value: function getRadiusAxisCfg(radiusAxis, innerRadius, outerRadius) {
var children = this.props.children;
var domain = void 0;
var tickCount = void 0;
var ticks = void 0;
if (radiusAxis && radiusAxis.props.ticks) {
ticks = radiusAxis.props.ticks;
tickCount = ticks.length;
domain = [Math.min.apply(null, ticks), Math.max.apply(null, ticks)];
} else {
tickCount = Math.max(radiusAxis && radiusAxis.props.tickCount || _PolarRadiusAxis2.default.defaultProps.tickCount, 2);
ticks = this.getTicksByItems(radiusAxis, tickCount);
domain = [Math.min.apply(null, ticks), Math.max.apply(null, ticks)];
}
return {
tickCount: tickCount,
ticks: ticks,
scale: (0, _d3Scale.scaleLinear)().domain(domain).range([innerRadius, outerRadius])
};
}
}, {
key: 'getTicksByItems',
value: function getTicksByItems(axisItem, tickCount) {
var _props = this.props;
var data = _props.data;
var children = _props.children;
var _ref = axisItem ? axisItem.props : _PolarRadiusAxis2.default.defaultProps;
var domain = _ref.domain;
var radarItems = (0, _ReactUtils.findAllByType)(children, _Radar2.default);
var dataKeys = radarItems.map(function (item) {
return item.props.dataKey;
});
var extent = data.reduce(function (prev, current) {
var values = dataKeys.map(function (v) {
return current[v] || 0;
});
var currentMax = Math.max.apply(null, values);
var currentMin = Math.min.apply(null, values);
return [Math.min(prev[0], currentMin), Math.max(prev[1], currentMax)];
}, [Infinity, -Infinity]);
var finalDomain = (0, _DataUtils.parseSpecifiedDomain)(domain, extent);
if (domain && (domain[0] === 'auto' || domain[1] === 'auto')) {
return (0, _rechartsScale.getNiceTickValues)(finalDomain, tickCount);
}
return finalDomain;
}
}, {
key: 'getGridRadius',
value: function getGridRadius(gridCount, innerRadius, outerRadius) {
var domain = (0, _range3.default)(0, gridCount);
var scale = (0, _d3Scale.scalePoint)().domain(domain).range([innerRadius, outerRadius]);
return domain.map(function (v) {
return scale(v);
});
}
}, {
key: 'getAngle',
value: function getAngle(index, dataLength, startAngle, clockWise) {
var sign = clockWise ? -1 : 1;
var angleInterval = 360 / dataLength;
return startAngle + index * sign * angleInterval;
}
}, {
key: 'getAngleTicks',
value: function getAngleTicks(dataLength, startAngle, clockWise) {
var angles = [];
for (var i = 0; i < dataLength; i++) {
angles.push(this.getAngle(i, dataLength, startAngle, clockWise));
}
return angles;
}
}, {
key: 'getRadiusTicks',
value: function getRadiusTicks(axisCfg) {
var ticks = axisCfg.ticks;
var scale = axisCfg.scale;
if (ticks && ticks.length) {
return ticks.map(function (entry) {
return {
radius: scale(entry),
value: entry
};
});
}
var tickCount = axisCfg.tickCount;
var domain = scale.domain();
return (0, _range3.default)(0, tickCount).map(function (v, i) {
var value = domain[0] + i * (domain[1] - domain[0]) / (tickCount - 1);
return {
value: value,
radius: scale(value)
};
});
}
}, {
key: 'getComposedData',
value: function getComposedData(item, scale, cx, cy, innerRadius, outerRadius) {
var _this2 = this;
var dataKey = item.props.dataKey;
var _props2 = this.props;
var data = _props2.data;
var startAngle = _props2.startAngle;
var clockWise = _props2.clockWise;
var children = _props2.children;
var angleAxis = (0, _ReactUtils.findChildByType)(children, _PolarAngleAxis2.default);
var nameKey = angleAxis && angleAxis.props.dataKey;
var len = data.length;
return data.map(function (entry, i) {
var value = entry[dataKey] || 0;
var angle = _this2.getAngle(i, len, startAngle, clockWise);
var radius = scale(value);
return _extends({}, (0, _PolarUtils.polarToCartesian)(cx, cy, radius, angle), {
value: value,
name: nameKey ? entry[nameKey] || i : i,
cx: cx, cy: cy, radius: radius, angle: angle,
payload: entry
});
});
}
/**
* Returns default, reset state for the radar chart.
* @return {Object} Whole new state
*/
}, {
key: 'createDefaultState',
value: function createDefaultState() {
return {
activeTooltipLabel: '',
activeTooltipCoord: { x: 0, y: 0 },
isTooltipActive: false
};
}
}, {
key: 'renderRadars',
value: function renderRadars(items, scale, cx, cy, innerRadius, outerRadius) {
var _this3 = this;
if (!items || !items.length) {
return null;
}
var baseProps = (0, _ReactUtils.getPresentationAttributes)(this.props);
return items.map(function (el, index) {
return _react2.default.cloneElement(el, _extends({}, baseProps, (0, _ReactUtils.getPresentationAttributes)(el), {
animationId: _this3.props.animationId,
points: _this3.getComposedData(el, scale, cx, cy, innerRadius, outerRadius),
key: 'radar-' + index,
onMouseEnter: _this3.handleMouseEnter,
onMouseLeave: _this3.handleMouseLeave
}));
});
}
}, {
key: 'renderGrid',
value: function renderGrid(radiusAxisCfg, cx, cy, innerRadius, outerRadius) {
var children = this.props.children;
var grid = (0, _ReactUtils.findChildByType)(children, _PolarGrid2.default);
if (!grid) {
return null;
}
var _props3 = this.props;
var startAngle = _props3.startAngle;
var clockWise = _props3.clockWise;
var data = _props3.data;
var len = data.length;
var gridCount = radiusAxisCfg.tickCount;
return _react2.default.cloneElement(grid, {
polarAngles: this.getAngleTicks(len, startAngle, clockWise),
polarRadius: this.getGridRadius(gridCount, innerRadius, outerRadius),
cx: cx, cy: cy, innerRadius: innerRadius, outerRadius: outerRadius,
key: 'layer-grid'
});
}
}, {
key: 'renderAngleAxis',
value: function renderAngleAxis(cx, cy, outerRadius, maxRadius) {
var _this4 = this;
var children = this.props.children;
var angleAxis = (0, _ReactUtils.findChildByType)(children, _PolarAngleAxis2.default);
if (!angleAxis || angleAxis.props.hide) {
return null;
}
var _props4 = this.props;
var data = _props4.data;
var width = _props4.width;
var height = _props4.height;
var startAngle = _props4.startAngle;
var clockWise = _props4.clockWise;
var len = data.length;
var grid = (0, _ReactUtils.findChildByType)(children, _PolarGrid2.default);
var radius = (0, _DataUtils.getPercentValue)(angleAxis.props.radius, maxRadius, outerRadius);
var dataKey = angleAxis.props.dataKey;
return _react2.default.cloneElement(angleAxis, {
ticks: data.map(function (v, i) {
return {
value: dataKey ? v[dataKey] : i,
angle: _this4.getAngle(i, len, startAngle, clockWise)
};
}),
cx: cx, cy: cy, radius: radius,
axisLineType: grid && grid.props && grid.props.gridType || _PolarGrid2.default.defaultProps.gridType,
key: 'layer-angle-axis'
});
}
}, {
key: 'renderRadiusAxis',
value: function renderRadiusAxis(radiusAxis, radiusAxisCfg, cx, cy) {
if (!radiusAxis || radiusAxis.props.hide) {
return null;
}
var startAngle = this.props.startAngle;
return _react2.default.cloneElement(radiusAxis, {
angle: radiusAxis.props.angle || startAngle,
ticks: this.getRadiusTicks(radiusAxisCfg),
cx: cx, cy: cy
});
}
}, {
key: 'renderTooltip',
value: function renderTooltip() {
var children = this.props.children;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
if (!tooltipItem) {
return null;
}
var _props5 = this.props;
var width = _props5.width;
var height = _props5.height;
var _state = this.state;
var isTooltipActive = _state.isTooltipActive;
var activeTooltipLabel = _state.activeTooltipLabel;
var activeTooltipCoord = _state.activeTooltipCoord;
var activeTooltipPayload = _state.activeTooltipPayload;
var viewBox = { x: 0, y: 0, width: width, height: height };
return _react2.default.cloneElement(tooltipItem, {
viewBox: viewBox,
active: isTooltipActive,
label: activeTooltipLabel,
payload: activeTooltipPayload,
coordinate: activeTooltipCoord
});
}
/**
* Draw legend
* @param {Array} items The instances of item
* @return {ReactElement} The instance of Legend
*/
}, {
key: 'renderLegend',
value: function renderLegend(items) {
var children = this.props.children;
var legendItem = (0, _ReactUtils.findChildByType)(children, _Legend2.default);
if (!legendItem) {
return null;
}
var _props6 = this.props;
var width = _props6.width;
var height = _props6.height;
var margin = _props6.margin;
var legendData = legendItem.props && legendItem.props.payload || items.map(function (child) {
var _child$props = child.props;
var dataKey = _child$props.dataKey;
var name = _child$props.name;
var legendType = _child$props.legendType;
return {
type: legendType || 'square',
color: child.props.stroke || child.props.fill,
value: name || dataKey
};
}, this);
return _react2.default.cloneElement(legendItem, _extends({}, _Legend2.default.getWithHeight(legendItem, width, height), {
payload: legendData,
chartWidth: width,
chartHeight: height,
margin: margin
}));
}
}, {
key: 'render',
value: function render() {
if (!(0, _ReactUtils.validateWidthHeight)(this)) {
return null;
}
var _props7 = this.props;
var className = _props7.className;
var data = _props7.data;
var width = _props7.width;
var height = _props7.height;
var margin = _props7.margin;
var children = _props7.children;
var style = _props7.style;
var cx = (0, _DataUtils.getPercentValue)(this.props.cx, width, width / 2);
var cy = (0, _DataUtils.getPercentValue)(this.props.cy, height, height / 2);
var maxRadius = (0, _PolarUtils.getMaxRadius)(width, height, margin);
var innerRadius = (0, _DataUtils.getPercentValue)(this.props.innerRadius, maxRadius, 0);
var outerRadius = (0, _DataUtils.getPercentValue)(this.props.outerRadius, maxRadius, maxRadius * 0.8);
if (outerRadius <= 0 || !data || !data.length) {
return null;
}
var items = (0, _ReactUtils.findAllByType)(children, _Radar2.default);
var radiusAxis = (0, _ReactUtils.findChildByType)(children, _PolarRadiusAxis2.default);
var radiusAxisCfg = this.getRadiusAxisCfg(radiusAxis, innerRadius, outerRadius);
return _react2.default.createElement(
'div',
{
className: (0, _classnames2.default)('recharts-wrapper', className),
style: _extends({ position: 'relative', cursor: 'default' }, style, { width: width, height: height })
},
_react2.default.createElement(
_Surface2.default,
{ width: width, height: height },
this.renderGrid(radiusAxisCfg, cx, cy, innerRadius, outerRadius),
this.renderRadiusAxis(radiusAxis, radiusAxisCfg, cx, cy),
this.renderAngleAxis(cx, cy, outerRadius, maxRadius),
this.renderRadars(items, radiusAxisCfg.scale, cx, cy, innerRadius, outerRadius),
(0, _ReactUtils.filterSvgElements)(children)
),
this.renderLegend(items),
this.renderTooltip()
);
}
}]);
return RadarChart;
}(_react.Component), _class2.displayName = 'RadarChart', _class2.propTypes = {
width: _react.PropTypes.number,
height: _react.PropTypes.number,
margin: _react.PropTypes.shape({
top: _react.PropTypes.number,
right: _react.PropTypes.number,
bottom: _react.PropTypes.number,
left: _react.PropTypes.number
}),
cx: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
cy: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
startAngle: _react.PropTypes.number,
innerRadius: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
outerRadius: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
clockWise: _react.PropTypes.bool,
data: _react.PropTypes.array,
style: _react.PropTypes.object,
children: _react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.node), _react.PropTypes.node]),
className: _react.PropTypes.string,
animationId: _react.PropTypes.number,
onMouseEnter: _react.PropTypes.func,
onMouseLeave: _react.PropTypes.func
}, _class2.defaultProps = {
width: 0,
height: 0,
cx: '50%',
cy: '50%',
innerRadius: 0,
outerRadius: '80%',
startAngle: 90,
clockWise: true,
data: [],
margin: { top: 0, right: 0, bottom: 0, left: 0 }
}, _temp2)) || _class) || _class;
exports.default = RadarChart;
/***/ },
/* 275 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isNumber2 = __webpack_require__(47);
var _isNumber3 = _interopRequireDefault(_isNumber2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp2; /**
* @fileOverview Scatter Chart
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _d3Scale = __webpack_require__(240);
var _Surface = __webpack_require__(42);
var _Surface2 = _interopRequireDefault(_Surface);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
var _Legend = __webpack_require__(46);
var _Legend2 = _interopRequireDefault(_Legend);
var _Tooltip = __webpack_require__(135);
var _Tooltip2 = _interopRequireDefault(_Tooltip);
var _Cross = __webpack_require__(223);
var _Cross2 = _interopRequireDefault(_Cross);
var _CartesianAxis = __webpack_require__(250);
var _CartesianAxis2 = _interopRequireDefault(_CartesianAxis);
var _CartesianGrid = __webpack_require__(251);
var _CartesianGrid2 = _interopRequireDefault(_CartesianGrid);
var _Scatter = __webpack_require__(255);
var _Scatter2 = _interopRequireDefault(_Scatter);
var _XAxis = __webpack_require__(256);
var _XAxis2 = _interopRequireDefault(_XAxis);
var _YAxis = __webpack_require__(257);
var _YAxis2 = _interopRequireDefault(_YAxis);
var _ZAxis = __webpack_require__(258);
var _ZAxis2 = _interopRequireDefault(_ZAxis);
var _ReferenceLine = __webpack_require__(248);
var _ReferenceLine2 = _interopRequireDefault(_ReferenceLine);
var _ReferenceDot = __webpack_require__(249);
var _ReferenceDot2 = _interopRequireDefault(_ReferenceDot);
var _ReactUtils = __webpack_require__(133);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _DataUtils = __webpack_require__(214);
var _LogUtils = __webpack_require__(215);
var _CartesianUtils = __webpack_require__(261);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var ScatterChart = (0, _PureRender2.default)(_class = (_temp2 = _class2 = function (_Component) {
_inherits(ScatterChart, _Component);
function ScatterChart() {
var _Object$getPrototypeO;
var _temp, _this, _ret;
_classCallCheck(this, ScatterChart);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(ScatterChart)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = {
activeTooltipCoord: { x: 0, y: 0 },
isTooltipActive: false,
activeItem: null
}, _this.handleScatterMouseEnter = function (el, e) {
_this.setState({
isTooltipActive: true,
activeItem: el,
activeTooltipCoord: { x: el.cx, y: el.cy }
});
}, _this.handleScatterMouseLeave = function () {
_this.setState({
isTooltipActive: false
});
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(ScatterChart, [{
key: 'getComposedData',
/**
* Compose the data of each group
* @param {Array} data The original data
* @param {Object} xAxis The configuration of x-axis
* @param {Object} yAxis The configuration of y-axis
* @param {Object} zAxis The configuration of z-axis
* @return {Array} Composed data
*/
value: function getComposedData(data, xAxis, yAxis, zAxis) {
var xAxisDataKey = xAxis.dataKey;
var yAxisDataKey = yAxis.dataKey;
var zAxisDataKey = zAxis.dataKey;
return data.map(function (entry) {
return {
cx: xAxis.scale(entry[xAxisDataKey]),
cy: yAxis.scale(entry[yAxisDataKey]),
size: zAxisDataKey !== undefined ? zAxis.scale(entry[zAxisDataKey]) : zAxis.range[0],
payload: {
x: entry[xAxisDataKey],
y: entry[yAxisDataKey],
z: zAxisDataKey !== undefined && entry[zAxisDataKey] || '-'
}
};
});
}
}, {
key: 'getDomain',
value: function getDomain(items, dataKey, axisId, axisType) {
var domain = items.reduce(function (result, item) {
return result.concat(item.props.data.map(function (entry) {
return entry[dataKey];
}));
}, []);
if (axisType === 'xAxis' || axisType === 'yAxis') {
domain = (0, _CartesianUtils.detectReferenceElementsDomain)(this.props.children, domain, axisId, axisType);
}
return [Math.min.apply(null, domain), Math.max.apply(null, domain)];
}
/**
* Get the configuration of x-axis or y-axis
* @param {String} axisType The type of axis
* @param {Array} items The instances of item
* @return {Object} Configuration
*/
}, {
key: 'getAxis',
value: function getAxis() {
var axisType = arguments.length <= 0 || arguments[0] === undefined ? 'xAxis' : arguments[0];
var items = arguments[1];
var children = this.props.children;
var Axis = axisType === 'xAxis' ? _XAxis2.default : _YAxis2.default;
var axis = (0, _ReactUtils.findChildByType)(children, Axis);
(0, _LogUtils.warn)(axis, 'recharts: ScatterChart must has %s', Axis.displayName);
if (axis) {
var domain = (0, _DataUtils.parseSpecifiedDomain)(axis.props.domain, this.getDomain(items, axis.props.dataKey, axis.props[axisType + 'Id'], axisType));
return _extends({}, axis.props, {
axisType: axisType,
domain: domain,
type: 'number',
originalDomain: axis.props.domain
});
}
return null;
}
/**
* Get the configuration of z-axis
* @param {Array} items The instances of item
* @return {Object} Configuration
*/
}, {
key: 'getZAxis',
value: function getZAxis(items) {
var children = this.props.children;
var axisItem = (0, _ReactUtils.findChildByType)(children, _ZAxis2.default);
var axisProps = axisItem && axisItem.props || _ZAxis2.default.defaultProps;
var domain = axisProps.dataKey ? this.getDomain(items, axisProps.dataKey) : [-1, 1];
return _extends({}, axisProps, {
domain: domain,
scale: (0, _d3Scale.scaleLinear)().domain(domain).range(axisProps.range)
});
}
}, {
key: 'getOffset',
value: function getOffset(items, xAxis, yAxis) {
var _props = this.props;
var children = _props.children;
var width = _props.width;
var height = _props.height;
var margin = _props.margin;
var offset = _extends({}, margin);
var legendProps = (0, _CartesianUtils.getLegendProps)(children, items, width, height);
offset[xAxis.orientation] += xAxis.height;
offset[yAxis.orientation] += yAxis.width;
if (legendProps) {
var box = _Legend2.default.getLegendBBox(legendProps, width, height) || {};
if (legendProps.layout === 'horizontal' && (0, _isNumber3.default)(offset[legendProps.verticalAlign])) {
offset[legendProps.verticalAlign] += box.height || 0;
} else if (legendProps.layout === 'vertical' && (0, _isNumber3.default)(offset[legendProps.align])) {
offset[legendProps.align] += box.width || 0;
}
}
return _extends({}, offset, {
width: width - offset.left - offset.right,
height: height - offset.top - offset.bottom
});
}
/**
* Calculate the scale function, position, width, height of axes
* @param {Object} axis The configuration of axis
* @param {Object} offset The offset of main part in the svg element
* @param {Object} axisType The type of axis, x-axis or y-axis
* @return {Object} Configuration
*/
}, {
key: 'getFormatAxis',
value: function getFormatAxis(axis, offset, axisType) {
var orientation = axis.orientation;
var domain = axis.domain;
var tickFormat = axis.tickFormat;
var _axis$padding = axis.padding;
var padding = _axis$padding === undefined ? {} : _axis$padding;
var range = axisType === 'xAxis' ? [offset.left + (padding.left || 0), offset.left + offset.width - (padding.right || 0)] : [offset.top + offset.height - (padding.bottom || 0), offset.top + (padding.top || 0)];
var scale = (0, _d3Scale.scaleLinear)().domain(domain).range(range);
var ticks = (0, _CartesianUtils.getTicksOfScale)(scale, axis);
if (tickFormat) {
scale.tickFormat(tickFormat);
}
var x = void 0;
var y = void 0;
if (axisType === 'xAxis') {
x = offset.left;
y = orientation === 'top' ? offset.top - axis.height : offset.top + offset.height;
} else {
x = orientation === 'left' ? offset.left - axis.width : offset.right;
y = offset.top;
}
return _extends({}, axis, ticks, {
scale: scale,
width: axisType === 'xAxis' ? offset.width : axis.width,
height: axisType === 'yAxis' ? offset.height : axis.height,
x: x, y: y
});
}
/**
* Get the content to be displayed in the tooltip
* @param {Object} data The data of active item
* @param {Object} xAxis The configuration of x-axis
* @param {Object} yAxis The configuration of y-axis
* @param {Object} zAxis The configuration of z-axis
* @return {Array} The content of tooltip
*/
}, {
key: 'getTooltipContent',
value: function getTooltipContent(data, xAxis, yAxis, zAxis) {
if (!data) {
return null;
}
var content = [{
name: xAxis.name || xAxis.dataKey,
unit: xAxis.unit || '',
value: data.x
}, {
name: yAxis.name || yAxis.dataKey,
unit: yAxis.unit || '',
value: data.y
}];
if (data.z && data.z !== '-') {
content.push({
name: zAxis.name || zAxis.dataKey,
unit: zAxis.unit || '',
value: data.z
});
}
return content;
}
/**
* The handler of mouse entering a scatter
* @param {Object} el The active scatter
* @param {Object} e Event object
* @return {Object} no return
*/
/**
* The handler of mouse leaving a scatter
* @return {Object} no return
*/
}, {
key: 'renderTooltip',
/**
* Draw Tooltip
* @param {Array} items The instances of Scatter
* @param {Object} xAxis The configuration of x-axis
* @param {Object} yAxis The configuration of y-axis
* @param {Object} zAxis The configuration of z-axis
* @param {Object} offset The offset of main part in the svg element
* @return {ReactElement} The instance of Tooltip
*/
value: function renderTooltip(items, xAxis, yAxis, zAxis, offset) {
var children = this.props.children;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
if (!tooltipItem || !tooltipItem.props.cursor || !this.state.isTooltipActive) {
return null;
}
var _state = this.state;
var isTooltipActive = _state.isTooltipActive;
var activeItem = _state.activeItem;
var activeTooltipCoord = _state.activeTooltipCoord;
var viewBox = {
x: offset.left,
y: offset.top,
width: offset.width,
height: offset.height
};
return _react2.default.cloneElement(tooltipItem, {
viewBox: viewBox,
active: isTooltipActive,
label: '',
payload: this.getTooltipContent(activeItem && activeItem.payload, xAxis, yAxis, zAxis),
coordinate: activeTooltipCoord
});
}
/**
* Draw grid
* @param {Object} xAxis The configuration of x-axis
* @param {Object} yAxis The configuration of y-axis
* @param {Object} offset The offset of main part in the svg element
* @return {ReactElement} The instance of grid
*/
}, {
key: 'renderGrid',
value: function renderGrid(xAxis, yAxis, offset) {
var _props2 = this.props;
var children = _props2.children;
var width = _props2.width;
var height = _props2.height;
var gridItem = (0, _ReactUtils.findChildByType)(children, _CartesianGrid2.default);
if (!gridItem) {
return null;
}
var verticalPoints = (0, _CartesianUtils.getCoordinatesOfGrid)(_CartesianAxis2.default.getTicks(_extends({}, _CartesianAxis2.default.defaultProps, xAxis, {
ticks: (0, _CartesianUtils.getTicksOfAxis)(xAxis, true),
viewBox: { x: 0, y: 0, width: width, height: height }
})), offset.left, offset.left + offset.width);
var horizontalPoints = (0, _CartesianUtils.getCoordinatesOfGrid)(_CartesianAxis2.default.getTicks(_extends({}, _CartesianAxis2.default.defaultProps, yAxis, {
ticks: (0, _CartesianUtils.getTicksOfAxis)(yAxis, true),
viewBox: { x: 0, y: 0, width: width, height: height }
})), offset.top, offset.top + offset.height);
return _react2.default.cloneElement(gridItem, {
key: 'grid',
x: offset.left,
y: offset.top,
width: offset.width,
height: offset.height,
verticalPoints: verticalPoints,
horizontalPoints: horizontalPoints
});
}
/**
* Draw legend
* @param {Array} items The instances of Scatters
* @return {ReactElement} The instance of Legend
*/
}, {
key: 'renderLegend',
value: function renderLegend(items) {
var _props3 = this.props;
var children = _props3.children;
var width = _props3.width;
var height = _props3.height;
var margin = _props3.margin;
var legendWidth = width - margin.left - margin.right;
var legendHeight = height - margin.top - margin.bottom;
var props = (0, _CartesianUtils.getLegendProps)(children, items, legendWidth, legendHeight);
if (!props) {
return null;
}
return _react2.default.createElement(_Legend2.default, _extends({}, props, {
chartWidth: width,
chartHeight: height,
margin: margin
}));
}
/**
* Draw axis
* @param {Object} axis The configuration of axis
* @param {String} layerKey The key of layer
* @return {ReactElement} The instance of axis
*/
}, {
key: 'renderAxis',
value: function renderAxis(axis, layerKey) {
var _props4 = this.props;
var width = _props4.width;
var height = _props4.height;
if (axis && !axis.hide) {
return _react2.default.createElement(
_Layer2.default,
{ key: layerKey, className: layerKey },
_react2.default.createElement(_CartesianAxis2.default, {
x: axis.x,
y: axis.y,
width: axis.width,
height: axis.height,
orientation: axis.orientation,
viewBox: { x: 0, y: 0, width: width, height: height },
ticks: (0, _CartesianUtils.getTicksOfAxis)(axis),
tickFormatter: axis.tickFormatter
})
);
}
return null;
}
}, {
key: 'renderCursor',
value: function renderCursor(xAxis, yAxis, offset) {
var children = this.props.children;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
if (!tooltipItem || !this.state.isTooltipActive) {
return null;
}
var activeItem = this.state.activeItem;
var cursorProps = _extends({
fill: '#f1f1f1'
}, (0, _ReactUtils.getPresentationAttributes)(tooltipItem.props.cursor), offset, {
x: activeItem.cx,
y: activeItem.cy,
payload: activeItem
});
return _react2.default.isValidElement(tooltipItem.props.cursor) ? _react2.default.cloneElement(tooltipItem.props.cursor, cursorProps) : _react2.default.createElement(_Cross2.default, cursorProps);
}
/**
* Draw the main part of scatter chart
* @param {Array} items All the instance of Scatter
* @param {Object} xAxis The configuration of all x-axis
* @param {Object} yAxis The configuration of all y-axis
* @param {Object} zAxis The configuration of all z-axis
* @return {ReactComponent} All the instances of Scatter
*/
}, {
key: 'renderItems',
value: function renderItems(items, xAxis, yAxis, zAxis) {
var _this2 = this;
var activeGroupId = this.state.activeGroupId;
return items.map(function (child, i) {
var _child$props = child.props;
var strokeWidth = _child$props.strokeWidth;
var data = _child$props.data;
var finalStrokeWidth = strokeWidth === +strokeWidth ? strokeWidth : 1;
finalStrokeWidth = activeGroupId === 'scatter-' + i ? finalStrokeWidth + 2 : finalStrokeWidth;
return _react2.default.cloneElement(child, {
key: 'scatter-' + i,
groupId: 'scatter-' + i,
strokeWidth: finalStrokeWidth,
onMouseLeave: _this2.handleScatterMouseLeave,
onMouseEnter: _this2.handleScatterMouseEnter,
points: _this2.getComposedData(data, xAxis, yAxis, zAxis)
});
}, this);
}
}, {
key: 'renderReferenceElements',
value: function renderReferenceElements(xAxis, yAxis, offset, isFront, Compt) {
var children = this.props.children;
var elements = (0, _ReactUtils.findAllByType)(children, Compt);
if (!elements || !elements.length) {
return null;
}
var keyPrefix = (0, _ReactUtils.getDisplayName)(Compt) + '-' + (isFront ? 'front' : 'back');
return elements.filter(function (entry) {
return isFront === entry.props.isFront;
}).map(function (entry, i) {
return _react2.default.cloneElement(entry, {
key: keyPrefix + '-' + i,
xAxis: xAxis, yAxis: yAxis,
viewBox: {
x: offset.left,
y: offset.top,
width: offset.width,
height: offset.height
}
});
});
}
}, {
key: 'render',
value: function render() {
if (!(0, _ReactUtils.validateWidthHeight)(this)) {
return null;
}
var _props5 = this.props;
var style = _props5.style;
var children = _props5.children;
var className = _props5.className;
var width = _props5.width;
var height = _props5.height;
var items = (0, _ReactUtils.findAllByType)(children, _Scatter2.default);
var zAxis = this.getZAxis(items);
var xAxis = this.getAxis('xAxis', items);
var yAxis = this.getAxis('yAxis', items);
var offset = this.getOffset(items, xAxis, yAxis);
xAxis = this.getFormatAxis(xAxis, offset, 'xAxis');
yAxis = this.getFormatAxis(yAxis, offset, 'yAxis');
return _react2.default.createElement(
'div',
{
className: (0, _classnames2.default)('recharts-wrapper', className),
style: _extends({ position: 'relative', cursor: 'default' }, style, { width: width, height: height })
},
_react2.default.createElement(
_Surface2.default,
{ width: width, height: height },
this.renderGrid(xAxis, yAxis, offset),
this.renderReferenceElements(xAxis, yAxis, offset, false, _ReferenceLine2.default),
this.renderReferenceElements(xAxis, yAxis, offset, false, _ReferenceDot2.default),
this.renderAxis(xAxis, 'recharts-x-axis'),
this.renderAxis(yAxis, 'recharts-y-axis'),
this.renderCursor(xAxis, yAxis, offset),
this.renderItems(items, xAxis, yAxis, zAxis, offset),
this.renderReferenceElements(xAxis, yAxis, offset, true, _ReferenceLine2.default),
this.renderReferenceElements(xAxis, yAxis, offset, true, _ReferenceDot2.default),
(0, _ReactUtils.filterSvgElements)(children)
),
this.renderLegend(items),
this.renderTooltip(items, xAxis, yAxis, zAxis, offset)
);
}
}]);
return ScatterChart;
}(_react.Component), _class2.displayName = 'ScatterChart', _class2.propTypes = {
width: _react.PropTypes.number,
height: _react.PropTypes.number,
margin: _react.PropTypes.shape({
top: _react.PropTypes.number,
right: _react.PropTypes.number,
bottom: _react.PropTypes.number,
left: _react.PropTypes.number
}),
title: _react.PropTypes.string,
style: _react.PropTypes.object,
children: _react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.node), _react.PropTypes.node]),
className: _react.PropTypes.string
}, _class2.defaultProps = {
style: {},
margin: { top: 5, right: 5, bottom: 5, left: 5 }
}, _temp2)) || _class;
exports.default = ScatterChart;
/***/ },
/* 276 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.AreaChart = undefined;
var _isFunction2 = __webpack_require__(49);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _isNumber2 = __webpack_require__(47);
var _isNumber3 = _interopRequireDefault(_isNumber2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Area Chart
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
var _Tooltip = __webpack_require__(135);
var _Tooltip2 = _interopRequireDefault(_Tooltip);
var _Dot = __webpack_require__(222);
var _Dot2 = _interopRequireDefault(_Dot);
var _Curve = __webpack_require__(219);
var _Curve2 = _interopRequireDefault(_Curve);
var _ReactUtils = __webpack_require__(133);
var _CartesianUtils = __webpack_require__(261);
var _generateCategoricalChart = __webpack_require__(260);
var _generateCategoricalChart2 = _interopRequireDefault(_generateCategoricalChart);
var _Area = __webpack_require__(253);
var _Area2 = _interopRequireDefault(_Area);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _DataUtils = __webpack_require__(214);
var _reactSmooth = __webpack_require__(137);
var _reactSmooth2 = _interopRequireDefault(_reactSmooth);
var _AnimationDecorator = __webpack_require__(231);
var _AnimationDecorator2 = _interopRequireDefault(_AnimationDecorator);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var AreaChart = (0, _AnimationDecorator2.default)(_class = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(AreaChart, _Component);
function AreaChart() {
_classCallCheck(this, AreaChart);
return _possibleConstructorReturn(this, Object.getPrototypeOf(AreaChart).apply(this, arguments));
}
_createClass(AreaChart, [{
key: 'getComposedData',
/**
* Compose the data of each area
* @param {Object} xAxis The configuration of x-axis
* @param {Object} yAxis The configuration of y-axis
* @param {String} dataKey The unique key of a group
* @param {Array} stackedData If the area is stacked,
* the stackedData is an array of min value and max value
* @return {Array} Composed data
*/
value: function getComposedData(xAxis, yAxis, dataKey, stackedData) {
var _props = this.props;
var layout = _props.layout;
var dataStartIndex = _props.dataStartIndex;
var dataEndIndex = _props.dataEndIndex;
var data = this.props.data.slice(dataStartIndex, dataEndIndex + 1);
var xTicks = (0, _CartesianUtils.getTicksOfAxis)(xAxis);
var yTicks = (0, _CartesianUtils.getTicksOfAxis)(yAxis);
var bandSize = (0, _DataUtils.getBandSizeOfScale)(layout === 'horizontal' ? xAxis.scale : yAxis.scale);
var hasStack = stackedData && stackedData.length;
var baseValue = this.getBaseValue(xAxis, yAxis);
var points = data.map(function (entry, index) {
var value = hasStack ? stackedData[dataStartIndex + index] : [baseValue, entry[dataKey]];
if (layout === 'horizontal') {
return {
x: xTicks[index].coordinate + bandSize / 2,
y: (0, _isNumber3.default)(value[1]) ? yAxis.scale(value[1]) : null,
value: value
};
}
return {
x: (0, _isNumber3.default)(value[1]) ? xAxis.scale(value[1]) : null,
y: yTicks[index].coordinate + bandSize / 2,
value: value
};
});
var baseLine = void 0;
if (hasStack) {
baseLine = stackedData.slice(dataStartIndex, dataEndIndex + 1).map(function (entry, index) {
return {
x: layout === 'horizontal' ? xTicks[index].coordinate + bandSize / 2 : xAxis.scale(entry[0]),
y: layout === 'horizontal' ? yAxis.scale(entry[0]) : yTicks[index].coordinate + bandSize / 2
};
});
} else if (layout === 'horizontal') {
baseLine = yAxis.scale(baseValue);
} else {
baseLine = xAxis.scale(baseValue);
}
return { points: points, baseLine: baseLine, layout: layout };
}
}, {
key: 'getBaseValue',
value: function getBaseValue(xAxis, yAxis) {
var layout = this.props.layout;
var numberAxis = layout === 'horizontal' ? yAxis : xAxis;
var domain = numberAxis.scale.domain();
if (numberAxis.type === 'number') {
var max = Math.max(domain[0], domain[1]);
return max < 0 ? max : Math.max(Math.min(domain[0], domain[1]), 0);
}
return domain[0];
}
}, {
key: 'renderCursor',
value: function renderCursor(xAxisMap, yAxisMap, offset) {
var _props2 = this.props;
var children = _props2.children;
var isTooltipActive = _props2.isTooltipActive;
var layout = _props2.layout;
var activeTooltipIndex = _props2.activeTooltipIndex;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
if (!tooltipItem || !tooltipItem.props.cursor || !isTooltipActive || activeTooltipIndex < 0) {
return null;
}
var axisMap = layout === 'horizontal' ? xAxisMap : yAxisMap;
var axis = (0, _DataUtils.getAnyElementOfObject)(axisMap);
var ticks = (0, _CartesianUtils.getTicksOfAxis)(axis);
if (!ticks || !ticks[activeTooltipIndex]) {
return null;
}
var start = ticks[activeTooltipIndex].coordinate;
var x1 = layout === 'horizontal' ? start : offset.left;
var y1 = layout === 'horizontal' ? offset.top : start;
var x2 = layout === 'horizontal' ? start : offset.left + offset.width;
var y2 = layout === 'horizontal' ? offset.top + offset.height : start;
var cursorProps = _extends({
stroke: '#ccc'
}, (0, _ReactUtils.getPresentationAttributes)(tooltipItem.props.cursor), {
points: [{ x: x1, y: y1 }, { x: x2, y: y2 }]
});
return _react2.default.isValidElement(tooltipItem.props.cursor) ? _react2.default.cloneElement(tooltipItem.props.cursor, cursorProps) : _react2.default.createElement(_Curve2.default, _extends({}, cursorProps, { type: 'linear', className: 'recharts-tooltip-cursor' }));
}
}, {
key: 'renderActiveDot',
value: function renderActiveDot(option, props) {
var dot = void 0;
if (_react2.default.isValidElement(option)) {
dot = _react2.default.cloneElement(option, props);
} else if ((0, _isFunction3.default)(option)) {
dot = option(props);
} else {
dot = _react2.default.createElement(_Dot2.default, props);
}
return _react2.default.createElement(
_reactSmooth2.default,
{
from: 'scale(0)',
to: 'scale(1)',
duration: 400,
key: 'dot-' + props.dataKey,
attributeName: 'transform'
},
_react2.default.createElement(
_Layer2.default,
{ style: { transformOrigin: 'center center' } },
dot
)
);
}
/**
* Draw the main part of area chart
* @param {Array} items React elements of Area
* @param {Object} xAxisMap The configuration of all x-axis
* @param {Object} yAxisMap The configuration of all y-axis
* @param {Object} offset The offset of main part in the svg element
* @param {Object} stackGroups The items grouped by axisId and stackId
* @return {ReactComponent} The instances of Area
*/
}, {
key: 'renderItems',
value: function renderItems(items, xAxisMap, yAxisMap, offset, stackGroups) {
var _this2 = this;
var _props3 = this.props;
var children = _props3.children;
var layout = _props3.layout;
var isTooltipActive = _props3.isTooltipActive;
var activeTooltipIndex = _props3.activeTooltipIndex;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
var hasDot = tooltipItem && isTooltipActive;
var dotItems = [];
var animationId = this.props.animationId;
var areaItems = items.reduce(function (result, child, i) {
var _child$props = child.props;
var xAxisId = _child$props.xAxisId;
var yAxisId = _child$props.yAxisId;
var dataKey = _child$props.dataKey;
var fillOpacity = _child$props.fillOpacity;
var fill = _child$props.fill;
var activeDot = _child$props.activeDot;
var axisId = layout === 'horizontal' ? xAxisId : yAxisId;
var stackedData = stackGroups && stackGroups[axisId] && stackGroups[axisId].hasStack && (0, _CartesianUtils.getStackedDataOfItem)(child, stackGroups[axisId].stackGroups);
var composeData = _this2.getComposedData(xAxisMap[xAxisId], yAxisMap[yAxisId], dataKey, stackedData);
var activePoint = composeData.points && composeData.points[activeTooltipIndex];
if (hasDot && activeDot && activePoint) {
var dotProps = _extends({
index: i,
dataKey: dataKey,
animationId: animationId,
cx: activePoint.x, cy: activePoint.y, r: 4,
fill: (0, _CartesianUtils.getMainColorOfGraphicItem)(child),
strokeWidth: 2, stroke: '#fff'
}, (0, _ReactUtils.getPresentationAttributes)(activeDot));
dotItems.push(_react2.default.createElement(
_Layer2.default,
{ key: 'dot-' + dataKey },
_this2.renderActiveDot(activeDot, dotProps)
));
}
var area = _react2.default.cloneElement(child, _extends({
key: 'area-' + i
}, offset, composeData, {
animationId: animationId,
layout: layout
}));
return [].concat(_toConsumableArray(result), [area]);
}, []);
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-area-chart-group' },
_react2.default.createElement(
_Layer2.default,
{ className: 'recharts-area-chart-shapes' },
areaItems
),
_react2.default.createElement(
_Layer2.default,
{ className: 'recharts-area-chart-dots' },
dotItems
)
);
}
}, {
key: 'render',
value: function render() {
var _props4 = this.props;
var isComposed = _props4.isComposed;
var graphicalItems = _props4.graphicalItems;
var xAxisMap = _props4.xAxisMap;
var yAxisMap = _props4.yAxisMap;
var offset = _props4.offset;
var stackGroups = _props4.stackGroups;
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-area-graphical' },
!isComposed && this.renderCursor(xAxisMap, yAxisMap, offset),
this.renderItems(graphicalItems, xAxisMap, yAxisMap, offset, stackGroups)
);
}
}]);
return AreaChart;
}(_react.Component), _class2.displayName = 'AreaChart', _class2.propTypes = {
layout: _react.PropTypes.oneOf(['horizontal', 'vertical']),
dataStartIndex: _react.PropTypes.number,
dataEndIndex: _react.PropTypes.number,
data: _react.PropTypes.array,
isTooltipActive: _react.PropTypes.bool,
activeTooltipIndex: _react.PropTypes.number,
xAxisMap: _react.PropTypes.object,
yAxisMap: _react.PropTypes.object,
offset: _react.PropTypes.object,
graphicalItems: _react.PropTypes.array,
children: _react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.node), _react.PropTypes.node]),
stackGroups: _react.PropTypes.object,
// used internally
isComposed: _react.PropTypes.bool,
animationId: _react.PropTypes.number
}, _temp)) || _class) || _class;
exports.default = (0, _generateCategoricalChart2.default)(AreaChart, _Area2.default);
exports.AreaChart = AreaChart;
/***/ },
/* 277 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _range2 = __webpack_require__(236);
var _range3 = _interopRequireDefault(_range2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp2; /**
* @fileOverview Radar Bar Chart
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _d3Scale = __webpack_require__(240);
var _Surface = __webpack_require__(42);
var _Surface2 = _interopRequireDefault(_Surface);
var _RadialBar = __webpack_require__(233);
var _RadialBar2 = _interopRequireDefault(_RadialBar);
var _DataUtils = __webpack_require__(214);
var _Cell = __webpack_require__(216);
var _Cell2 = _interopRequireDefault(_Cell);
var _Legend = __webpack_require__(46);
var _Legend2 = _interopRequireDefault(_Legend);
var _Tooltip = __webpack_require__(135);
var _Tooltip2 = _interopRequireDefault(_Tooltip);
var _ReactUtils = __webpack_require__(133);
var _PolarUtils = __webpack_require__(218);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _AnimationDecorator = __webpack_require__(231);
var _AnimationDecorator2 = _interopRequireDefault(_AnimationDecorator);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var RadialBarChart = (0, _PureRender2.default)(_class = (_temp2 = _class2 = function (_Component) {
_inherits(RadialBarChart, _Component);
function RadialBarChart() {
var _Object$getPrototypeO;
var _temp, _this, _ret;
_classCallCheck(this, RadialBarChart);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(RadialBarChart)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = _this.createDefaultState(), _this.handleMouseEnter = function (el, index, e) {
var _this$props = _this.props;
var children = _this$props.children;
var onMouseEnter = _this$props.onMouseEnter;
var cx = el.cx;
var cy = el.cy;
var endAngle = el.endAngle;
var outerRadius = el.outerRadius;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
if (tooltipItem) {
_this.setState({
isTooltipActive: true,
activeTooltipCoord: (0, _PolarUtils.polarToCartesian)(cx, cy, outerRadius, endAngle),
activeTooltipPayload: [el.payload]
}, function () {
if (onMouseEnter) {
onMouseEnter(el, index, e);
}
});
} else if (onMouseEnter) {
onMouseEnter(el, index, e);
}
}, _this.handleMouseLeave = function (el, index, e) {
var _this$props2 = _this.props;
var children = _this$props2.children;
var onMouseLeave = _this$props2.onMouseLeave;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
if (tooltipItem) {
_this.setState({
isTooltipActive: false
}, function () {
if (onMouseLeave) {
onMouseLeave(el, index, e);
}
});
} else if (onMouseLeave) {
onMouseLeave(el, index, e);
}
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(RadialBarChart, [{
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (nextProps.data !== this.props.data) {
this.setState(this.createDefaultState());
}
}
/**
* Compose the data of each group
* @param {Object} item An instance of RadialBar
* @param {Array} barPosition The offset and size of each bar
* @param {Object} radiusScale The scale function of radius of bars
* @param {Object} center The coordinate of center
* @param {String} dataKey The unique key of a group
* @return {Array} Composed data
*/
}, {
key: 'getComposedData',
value: function getComposedData(item, barPosition, radiusScale, center, dataKey) {
var data = this.props.data;
var pos = barPosition[dataKey];
var cells = (0, _ReactUtils.findAllByType)(item.props.children, _Cell2.default);
return data.map(function (entry, index) {
var value = entry[dataKey];
var radius = radiusScale(index);
return _extends({}, entry, center, {
value: value,
innerRadius: radius - pos.offset,
outerRadius: radius - pos.offset + pos.radius
}, cells && cells[index] && cells[index].props);
});
}
/**
* Calculate the size of all groups
* @param {Array} items All the instance of RadialBar
* @return {Object} The size of all groups
*/
}, {
key: 'getRadiusList',
value: function getRadiusList(items) {
var barSize = this.props.barSize;
return items.map(function (child) {
return _extends({}, child.props, {
barSize: child.props.barSize || barSize
});
});
}
/**
* Calculate the scale function of radius
* @param {Number} innerRadius The outer radius
* @param {Number} outerRadius The inner radius
* @return {Object} A scale function
*/
}, {
key: 'getRadiusScale',
value: function getRadiusScale(innerRadius, outerRadius) {
var data = this.props.data;
var bandCount = Math.max(data.length, 1);
var range = [outerRadius, innerRadius];
var scale = (0, _d3Scale.scaleBand)().domain((0, _range3.default)(0, bandCount)).range(range);
return scale;
}
/**
* Calculate the size of each bar and the gap between two bars
* @param {Number} bandRadius The radius of each category
* @param {Array} radiusList The radius of all groups
* @return {Number} The size of each bar and the gap between two bars
*/
}, {
key: 'getBarPosition',
value: function getBarPosition(bandRadius, radiusList) {
var _props = this.props;
var barGap = _props.barGap;
var barCategoryGap = _props.barCategoryGap;
var len = radiusList.length;
var result = void 0;
// whether or not is barSize setted by user
if (len && radiusList[0].barSize === +radiusList[0].barSize) {
(function () {
var sum = radiusList.reduce(function (res, entry) {
return res + entry.barSize;
}, 0);
sum += (len - 1) * barGap;
var offset = -sum / 2 >> 0;
var prev = { offset: offset - barGap, radius: 0 };
result = radiusList.reduce(function (res, entry) {
prev = {
offset: prev.offset + prev.radius + barGap,
radius: entry.barSize
};
return _extends({}, res, _defineProperty({}, entry.dataKey, prev));
}, {});
})();
} else {
(function () {
var offset = (0, _DataUtils.getPercentValue)(barCategoryGap, bandRadius);
var radius = (bandRadius - 2 * offset - (len - 1) * barGap) / len >> 0;
offset = -Math.max((radius * len + (len - 1) * barGap) / 2 >> 0, 0);
result = radiusList.reduce(function (res, entry, i) {
return _extends({}, res, _defineProperty({}, entry.dataKey, {
offset: offset + (radius + barGap) * i,
radius: radius
}));
}, {});
})();
}
return result;
}
/**
* Returns default, reset state for the radial bar chart.
* @return {Object} Whole new state
*/
}, {
key: 'createDefaultState',
value: function createDefaultState() {
return {
activeTooltipLabel: '',
activeTooltipPayload: [],
activeTooltipCoord: { x: 0, y: 0 },
isTooltipActive: false
};
}
}, {
key: 'renderLegend',
/**
* Draw legend
* @param {ReactElement} legendItem The instance of Legend
* @return {ReactElement} The instance of Legend
*/
value: function renderLegend() {
var children = this.props.children;
var legendItem = (0, _ReactUtils.findChildByType)(children, _Legend2.default);
if (!legendItem) {
return null;
}
var _props2 = this.props;
var data = _props2.data;
var width = _props2.width;
var height = _props2.height;
var margin = _props2.margin;
var legendData = legendItem.props && legendItem.props.payload || data.map(function (entry) {
return {
type: 'square',
color: entry.fill || '#000',
value: entry.name
};
});
return _react2.default.cloneElement(legendItem, _extends({}, _Legend2.default.getWithHeight(legendItem, width, height), {
payload: legendData,
chartWidth: width,
chartHeight: height,
margin: margin
}));
}
}, {
key: 'renderTooltip',
value: function renderTooltip() {
var children = this.props.children;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
if (!tooltipItem) {
return null;
}
var _props3 = this.props;
var width = _props3.width;
var height = _props3.height;
var _state = this.state;
var isTooltipActive = _state.isTooltipActive;
var activeTooltipLabel = _state.activeTooltipLabel;
var activeTooltipCoord = _state.activeTooltipCoord;
var activeTooltipPayload = _state.activeTooltipPayload;
var viewBox = { x: 0, y: 0, width: width, height: height };
return _react2.default.cloneElement(tooltipItem, {
viewBox: viewBox,
active: isTooltipActive,
label: activeTooltipLabel,
payload: activeTooltipPayload,
coordinate: activeTooltipCoord
});
}
/**
* Draw the main part of bar chart
* @param {Array} items All the instance of RadialBar
* @param {Object} radiusScale The scale function of radius of bars
* @param {Object} center The coordinate of center
* @return {ReactComponent} All the instances of RadialBar
*/
}, {
key: 'renderItems',
value: function renderItems(items, radiusScale, center) {
var _this2 = this;
if (!items || !items.length) {
return null;
}
var onClick = this.props.onClick;
var radiusList = this.getRadiusList(items);
var bandRadius = radiusScale.bandwidth();
var barPosition = this.getBarPosition(bandRadius, radiusList);
return items.map(function (child, i) {
var dataKey = child.props.dataKey;
return _react2.default.cloneElement(child, _extends({}, center, {
key: 'radial-bar-' + i,
onMouseEnter: _this2.handleMouseEnter,
onMouseLeave: _this2.handleMouseLeave,
onClick: onClick,
data: _this2.getComposedData(child, barPosition, radiusScale, center, dataKey)
}));
}, this);
}
}, {
key: 'render',
value: function render() {
var data = this.props.data;
if (!(0, _ReactUtils.validateWidthHeight)(this) || !data || !data.length) {
return null;
}
var _props4 = this.props;
var style = _props4.style;
var children = _props4.children;
var className = _props4.className;
var width = _props4.width;
var height = _props4.height;
var margin = _props4.margin;
var items = (0, _ReactUtils.findAllByType)(children, _RadialBar2.default);
var cx = (0, _DataUtils.getPercentValue)(this.props.cx, width, width / 2);
var cy = (0, _DataUtils.getPercentValue)(this.props.cy, height, height / 2);
var maxRadius = (0, _PolarUtils.getMaxRadius)(width, height, margin);
var innerRadius = (0, _DataUtils.getPercentValue)(this.props.innerRadius, maxRadius, 0);
var outerRadius = (0, _DataUtils.getPercentValue)(this.props.outerRadius, maxRadius, maxRadius * 0.8);
var radiusScale = this.getRadiusScale(innerRadius, outerRadius);
return _react2.default.createElement(
'div',
{
className: (0, _classnames2.default)('recharts-wrapper', className),
style: _extends({ cursor: 'default', position: 'relative' }, style, { width: width, height: height })
},
_react2.default.createElement(
_Surface2.default,
{ width: width, height: height },
this.renderItems(items, radiusScale, { cx: cx, cy: cy }),
(0, _ReactUtils.filterSvgElements)(children)
),
this.renderLegend(),
this.renderTooltip(items)
);
}
}]);
return RadialBarChart;
}(_react.Component), _class2.displayName = 'RadialBarChart', _class2.propTypes = {
width: _react.PropTypes.number,
height: _react.PropTypes.number,
margin: _react.PropTypes.shape({
top: _react.PropTypes.number,
right: _react.PropTypes.number,
bottom: _react.PropTypes.number,
left: _react.PropTypes.number
}),
cy: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
cx: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
data: _react.PropTypes.array,
innerRadius: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
outerRadius: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
// The offset radius between two categorys
barCategoryGap: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),
// The gap radius of two radial bar in one category
barGap: _react.PropTypes.number,
// The radius of each radial bar
barSize: _react.PropTypes.number,
title: _react.PropTypes.string,
style: _react.PropTypes.object,
onMouseEnter: _react.PropTypes.func,
onMouseLeave: _react.PropTypes.func,
onClick: _react.PropTypes.func,
children: _react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.node), _react.PropTypes.node]),
className: _react.PropTypes.string
}, _class2.defaultProps = {
cx: '50%',
cy: '50%',
innerRadius: '30%',
outerRadius: '90%',
barGap: 2,
barCategoryGap: '10%',
style: {},
margin: { top: 0, right: 0, bottom: 0, left: 0 }
}, _temp2)) || _class;
exports.default = RadialBarChart;
/***/ },
/* 278 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp; /**
* @fileOverview Composed Chart
*/
var _react = __webpack_require__(43);
var _react2 = _interopRequireDefault(_react);
var _classnames = __webpack_require__(44);
var _classnames2 = _interopRequireDefault(_classnames);
var _Surface = __webpack_require__(42);
var _Surface2 = _interopRequireDefault(_Surface);
var _Layer = __webpack_require__(45);
var _Layer2 = _interopRequireDefault(_Layer);
var _Tooltip = __webpack_require__(135);
var _Tooltip2 = _interopRequireDefault(_Tooltip);
var _Line = __webpack_require__(252);
var _Line2 = _interopRequireDefault(_Line);
var _Bar = __webpack_require__(254);
var _Bar2 = _interopRequireDefault(_Bar);
var _Area = __webpack_require__(253);
var _Area2 = _interopRequireDefault(_Area);
var _Curve = __webpack_require__(219);
var _Curve2 = _interopRequireDefault(_Curve);
var _Dot = __webpack_require__(222);
var _Dot2 = _interopRequireDefault(_Dot);
var _Rectangle = __webpack_require__(220);
var _Rectangle2 = _interopRequireDefault(_Rectangle);
var _generateCategoricalChart = __webpack_require__(260);
var _generateCategoricalChart2 = _interopRequireDefault(_generateCategoricalChart);
var _DataUtils = __webpack_require__(214);
var _ReactUtils = __webpack_require__(133);
var _PureRender = __webpack_require__(51);
var _PureRender2 = _interopRequireDefault(_PureRender);
var _CartesianUtils = __webpack_require__(261);
var _AreaChart = __webpack_require__(276);
var _LineChart = __webpack_require__(259);
var _BarChart = __webpack_require__(266);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var ComposedChart = (0, _PureRender2.default)(_class = (_temp = _class2 = function (_Component) {
_inherits(ComposedChart, _Component);
function ComposedChart() {
_classCallCheck(this, ComposedChart);
return _possibleConstructorReturn(this, Object.getPrototypeOf(ComposedChart).apply(this, arguments));
}
_createClass(ComposedChart, [{
key: 'renderCursor',
value: function renderCursor(xAxisMap, yAxisMap, offset) {
var _props = this.props;
var children = _props.children;
var isTooltipActive = _props.isTooltipActive;
var layout = _props.layout;
var activeTooltipIndex = _props.activeTooltipIndex;
var tooltipItem = (0, _ReactUtils.findChildByType)(children, _Tooltip2.default);
if (!tooltipItem || !tooltipItem.props.cursor || !isTooltipActive || activeTooltipIndex < 0) {
return null;
}
var axisMap = layout === 'horizontal' ? xAxisMap : yAxisMap;
var axis = (0, _DataUtils.getAnyElementOfObject)(axisMap);
var ticks = (0, _CartesianUtils.getTicksOfAxis)(axis);
if (!ticks || !ticks[activeTooltipIndex]) {
return null;
}
var bandSize = (0, _DataUtils.getBandSizeOfScale)(axis.scale);
var start = ticks[activeTooltipIndex].coordinate;
var cursorProps = _extends({
fill: '#f1f1f1'
}, (0, _ReactUtils.getPresentationAttributes)(tooltipItem.props.cursor), {
x: layout === 'horizontal' ? start : offset.left + 0.5,
y: layout === 'horizontal' ? offset.top + 0.5 : start,
width: layout === 'horizontal' ? bandSize : offset.width - 1,
height: layout === 'horizontal' ? offset.height - 1 : bandSize
});
return _react2.default.isValidElement(tooltipItem.props.cursor) ? _react2.default.cloneElement(tooltipItem.props.cursor, cursorProps) : _react2.default.createElement(_Rectangle2.default, cursorProps);
}
}, {
key: 'render',
value: function render() {
var _props2 = this.props;
var xAxisMap = _props2.xAxisMap;
var yAxisMap = _props2.yAxisMap;
var offset = _props2.offset;
var graphicalItems = _props2.graphicalItems;
var stackGroups = _props2.stackGroups;
var areaItems = graphicalItems.filter(function (item) {
return item.type.displayName === 'Area';
});
var lineItems = graphicalItems.filter(function (item) {
return item.type.displayName === 'Line';
});
var barItems = graphicalItems.filter(function (item) {
return item.type.displayName === 'Bar';
});
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-composed' },
this.renderCursor(xAxisMap, yAxisMap, offset),
_react2.default.createElement(_AreaChart.AreaChart, _extends({}, this.props, { graphicalItems: areaItems, isComposed: true })),
_react2.default.createElement(_BarChart.BarChart, _extends({}, this.props, { graphicalItems: barItems, isComposed: true })),
_react2.default.createElement(_LineChart.LineChart, _extends({}, this.props, { graphicalItems: lineItems, isComposed: true }))
);
}
}]);
return ComposedChart;
}(_react.Component), _class2.displayName = 'ComposedChart', _class2.propTypes = {
layout: _react.PropTypes.oneOf(['horizontal', 'vertical']),
dataStartIndex: _react.PropTypes.number,
dataEndIndex: _react.PropTypes.number,
isTooltipActive: _react.PropTypes.bool,
activeTooltipIndex: _react.PropTypes.number,
xAxisMap: _react.PropTypes.object,
yAxisMap: _react.PropTypes.object,
offset: _react.PropTypes.object,
graphicalItems: _react.PropTypes.array,
stackGroups: _react.PropTypes.object,
children: _react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.node), _react.PropTypes.node])
}, _temp)) || _class;
exports.default = (0, _generateCategoricalChart2.default)(ComposedChart, [_Line2.default, _Area2.default, _Bar2.default]);
/***/ }
/******/ ])))
});
;
|
newclient/scripts/components/admin/detail-view/comment-bubble/viewable-by-reporter-button.js
|
kuali/research-coi
|
/*
The Conflict of Interest (COI) module of Kuali Research
Copyright © 2005-2016 Kuali, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
*/
import styles from './style';
import React from 'react';
import { AdminActions } from '../../../../actions/admin-actions';
import { ROLES } from '../../../../../../coi-constants';
export default class ViewableByReporterButton extends React.Component {
constructor() {
super();
this.toggleViewableByReporter = this.toggleViewableByReporter.bind(this);
}
toggleViewableByReporter() {
AdminActions.toggleCommentViewableByReporter(this.props.id);
}
render() {
let toggleText = 'Show to Reporter';
let toggleIconClass = 'fa-eye-slash';
if (this.props.piVisible) {
toggleText = 'Hide from Reporter';
toggleIconClass = 'fa-eye';
}
let viewableButton = null;
if (this.props.role === ROLES.ADMIN && !this.props.disclosureReadonly) {
viewableButton = (
<button className={styles.viewableByReporterButton} id="viewableByReporterButton" onClick={this.toggleViewableByReporter}>
<i className={`fa ${toggleIconClass}`} aria-hidden="true" />
{toggleText}
</button>
);
}
return viewableButton;
}
}
|
app/components/ThankYou.js
|
gidich/votrient-kiosk
|
import React, { Component } from 'react';
import { Link } from 'react-router';
import styles from './ThankYou.css';
export default class ThankYou extends Component {
render() {
return (
<div className={styles.container}>
<Link to="/" className={styles.home}></Link>
<Link to="/ProductInfo" className={styles.productInformation}></Link>
<Link to="/" className={styles.logo}></Link>
</div>
);
}
}
|
components/svgs/DoubleShadowTriangle.js
|
nvbf/pepper
|
import React from 'react';
import BaseSvg from './BaseSvg';
import GradientFill from './GradientFill';
import type { Gradient } from '../../types/types';
function DoubleShadowTriangle(props: {
leftGradient: Gradient,
rightGradient: Gradient,
width: number,
height: number,
}) {
const offset = 12;
const doubleOffset = offset * 2;
return (
<BaseSvg width={props.width + doubleOffset} height={props.height}>
<defs>
<filter id="f3" x="0" y="0" width="300%" height="300%">
<feOffset result="offOut" in="SourceAlpha" dx="-4" dy="0" />
<feGaussianBlur result="blurOut" in="offOut" stdDeviation="10" />
<feBlend in="SourceGraphic" in2="blurOut" mode="normal" />
</filter>
<GradientFill
start={props.leftGradient.start}
stop={props.leftGradient.stop}
id="leftGrad"
/>
<GradientFill
start={props.rightGradient.start}
stop={props.rightGradient.stop}
id="rightGrad"
/>
</defs>
<polygon
shapeRendering="optimizeQuality"
points={`
0,${props.height}
${props.width + doubleOffset},${props.height}
${props.width + doubleOffset},0
${props.width}, 0
`}
fill="url(#rightGrad)"
/>
<polygon
shapeRendering="optimizeQuality"
points={`
0,${props.height}
0,0
${props.width + offset},0
${offset},${props.height}
`}
fill="url(#leftGrad)"
filter="url(#f3)"
/>
</BaseSvg>
);
}
export default DoubleShadowTriangle;
|
app/containers/HomePage/index.js
|
rvsiqueira/client
|
/*
* HomePage
*
* This is the first thing users see of our App, at the '/' route
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If hot
* reloading is not a neccessity for you then you can refactor it and remove
* the linting exception.
*/
import React from 'react';
import { FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
import { push } from 'react-router-redux';
import Helmet from 'react-helmet';
import messages from './messages';
import { createStructuredSelector } from 'reselect';
import Button from 'components/Button';
import Heading from 'components/Heading';
import Bgcover from 'components/Bgcover';
import Body from 'components/Body';
import Icon from 'components/Icon';
import Header from 'components/Header';
import hey from '../../assets/icon/hey.svg';
import smile from '../../assets/icon/smile-white.svg';
import styles from './styles.css';
import { Field, reduxForm } from 'redux-form/immutable';
import RenderField from 'components/RenderField';
import { selectSaved, selectName, selectAge, formValues } from './selectors';
import { saveDemography, logout } from './actions';
const validate = values => {
const errors = {};
if (!values.get('name')) {
errors.name = 'Obrigatório';
} else if (/[^a-zA-Z ]+/gi.test(values.get('name'))) {
errors.name = 'Must be only characters';
} else if (values.get('name').length < 2) {
errors.name = 'Must have at least 2 characters';
}
if (!values.get('age')) {
errors.age = 'Obrigatório';
} else if (/\D+/.test(values.get('age'))) {
errors.age = 'Must be only numbers';
}
return errors;
};
export class HomePage extends React.Component { // eslint-disable-line react/prefer-stateless-function
componentDidMount() {
this.handleInitialize();
}
handleInitialize() {
let initData = {};
if (sessionStorage.getItem('userDetails')) {
const userDetails = JSON.parse(sessionStorage.getItem('userDetails')).data.userDetails;
initData = {
name: userDetails.completeName,
age: userDetails.age,
};
} else {
initData = {
name: this.props.name,
age: this.props.age,
};
}
this.props.initialize(initData);
}
submit = (e) => {
this.props.handleRoutes(e);
};
render() {
return (
<article>
<Helmet
title="Home Page"
meta={[
{ name: 'description', content: 'Bank of Brazil' },
]}
/>
<Bgcover ascent>
<Body>
<Heading level={'h1'}>
<img src={smile} alt="smile" className={styles.smile} />
<FormattedMessage {...messages.hello} />
<FormattedMessage {...messages.primaryHeadingMessage} />
</Heading>
{<Button href="#heading" className="btn btn-block">
<FormattedMessage {...messages.headerButton} />
</Button>}
<Button href="#heading" className="btn btn_link btn_bottom btn-block">
<Icon file="ARROW_DOWN" />
</Button>
</Body>
</Bgcover>
<Header transparent logo logoWhite logout={this.props.logout} enter />
<Body relaxed>
<img src={hey} alt="hi" style={{ margin: '32px 0 16px 0' }} />
<Heading level={'h2'} id="heading">
<FormattedMessage {...messages.h2} />
</Heading>
<form className={styles.inline} onSubmit={this.props.handleSubmit(this.submit)}>
<FormattedMessage {...messages.name} />
<Field
component={RenderField}
type="text"
name="name"
placeholder="Nome"
className="inline"
noValidationMessage
/>
<FormattedMessage {...messages.age} />
<Field
component={RenderField}
type="number"
name="age"
placeholder="0"
maxLength={2}
className="inline xs text-center"
noValidationMessage
format={value => value && value.toString().replace(/\D*/g, '')}
/>
<FormattedMessage {...messages.years} />.
<hr />
<Button className="btn btn-block" loaderDisplay={this.props.submitting} disabledButton={this.props.submitting || !this.props.valid} type="submit" nextIcon>
<FormattedMessage {...messages.button} />
</Button>
</form>
</Body>
</article>
);
}
}
HomePage.propTypes = {
changeRoute: React.PropTypes.func,
handleSubmit: React.PropTypes.func,
handleRoutes: React.PropTypes.func,
initialize: React.PropTypes.func,
data: React.PropTypes.func,
name: React.PropTypes.string,
submitting: React.PropTypes.bool,
valid: React.PropTypes.bool,
logout: React.PropTypes.func,
age: React.PropTypes.number,
loading: React.PropTypes.bool,
plans: React.PropTypes.oneOfType([
React.PropTypes.array,
React.PropTypes.bool,
]),
};
const HomePageForm = reduxForm({
form: 'Demography', // a unique identifier for this form
validate,
})(HomePage);
function mapDispatchToProps(dispatch) {
return {
changeRoute: (url) => dispatch(push(url)),
handleRoutes: (data) => dispatch(saveDemography(data)),
logout: (url) => dispatch(logout(url)),
dispatch,
};
}
const mapStateToProps = createStructuredSelector({
saved: selectSaved(),
name: selectName(),
age: selectAge(),
values: formValues(),
});
// Wrap the component to inject dispatch and state into it
export default connect(mapStateToProps, mapDispatchToProps)(HomePageForm);
|
packages/material-ui-icons/src/SettingsEthernetRounded.js
|
allanalexandre/material-ui
|
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path fill="none" d="M0 0h24v24H0V0z" /><path d="M7 6.12c-.43-.35-1.06-.3-1.41.13l-4.24 5.11c-.31.37-.31.91 0 1.28l4.24 5.11c.35.43.98.48 1.41.13.43-.35.48-.98.13-1.41L3.42 12l3.71-4.47c.35-.43.3-1.06-.13-1.41zM7 13h2v-2H7v2zm10-2h-2v2h2v-2zm-6 2h2v-2h-2v2zm6-6.88c-.43.35-.48.98-.13 1.41L20.58 12l-3.71 4.47c-.35.43-.29 1.06.13 1.41.43.35 1.06.3 1.41-.13l4.24-5.11c.31-.37.31-.91 0-1.28l-4.24-5.11c-.35-.42-.99-.48-1.41-.13z" /></React.Fragment>
, 'SettingsEthernetRounded');
|
themes/semantic-cards/semantic/node_modules/accord/lib/adapters/cjsx/4.x - 5.x.js
|
cleverswine/cleverswine-hugo
|
// Generated by CoffeeScript 1.12.5
(function() {
var Adapter, CJSX, W, path, sourcemaps,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
Adapter = require('../../adapter_base');
sourcemaps = require('../../sourcemaps');
path = require('path');
W = require('when');
CJSX = (function(superClass) {
var compile;
extend(CJSX, superClass);
function CJSX() {
return CJSX.__super__.constructor.apply(this, arguments);
}
CJSX.prototype.name = 'cjsx';
CJSX.prototype.extensions = ['cjsx'];
CJSX.prototype.output = 'coffee';
CJSX.prototype.supportedEngines = ['coffee-react-transform'];
CJSX.prototype.isolated = true;
CJSX.prototype._render = function(str, options) {
var filename;
filename = options.filename;
return compile((function(_this) {
return function() {
return _this.engine(str);
};
})(this));
};
compile = function(fn) {
var err, res;
try {
res = fn();
} catch (error) {
err = error;
return W.reject(err);
}
return W.resolve({
result: res
});
};
return CJSX;
})(Adapter);
module.exports = CJSX;
}).call(this);
|
modules/__tests__/serverRendering-test.js
|
batmanimal/react-router
|
/*eslint-env mocha */
/*eslint react/prop-types: 0*/
import expect from 'expect'
import React from 'react'
import createLocation from 'history/lib/createLocation'
import RoutingContext from '../RoutingContext'
import match from '../match'
import Link from '../Link'
describe('server rendering', function () {
let App, Dashboard, About, RedirectRoute, AboutRoute, DashboardRoute, routes
beforeEach(function () {
App = React.createClass({
render() {
return (
<div className="App">
<h1>App</h1>
<Link to="/about" activeClassName="about-is-active">About</Link>{' '}
<Link to="/dashboard" activeClassName="dashboard-is-active">Dashboard</Link>
<div>
{this.props.children}
</div>
</div>
)
}
})
Dashboard = React.createClass({
render() {
return (
<div className="Dashboard">
<h1>The Dashboard</h1>
</div>
)
}
})
About = React.createClass({
render() {
return (
<div className="About">
<h1>About</h1>
</div>
)
}
})
DashboardRoute = {
path: '/dashboard',
component: Dashboard
}
AboutRoute = {
path: '/about',
component: About
}
RedirectRoute = {
path: '/company',
onEnter (nextState, replaceState) {
replaceState(null, '/about')
}
}
routes = {
path: '/',
component: App,
childRoutes: [ DashboardRoute, AboutRoute, RedirectRoute ]
}
})
it('works', function (done) {
const location = createLocation('/dashboard')
match({ routes, location }, function (error, redirectLocation, renderProps) {
const string = React.renderToString(
<RoutingContext {...renderProps} />
)
expect(string).toMatch(/The Dashboard/)
done()
})
})
it('renders active Links as active', function (done) {
const location = createLocation('/about')
match({ routes, location }, function (error, redirectLocation, renderProps) {
const string = React.renderToString(
<RoutingContext {...renderProps} />
)
expect(string).toMatch(/about-is-active/)
//expect(string).toNotMatch(/dashboard-is-active/) TODO add toNotMatch to expect
done()
})
})
it('sends the redirect location', function (done) {
const location = createLocation('/company')
match({ routes, location }, function (error, redirectLocation) {
expect(redirectLocation).toExist()
expect(redirectLocation.pathname).toEqual('/about')
expect(redirectLocation.search).toEqual('')
expect(redirectLocation.state).toEqual(null)
expect(redirectLocation.action).toEqual('REPLACE')
done()
})
})
it('sends null values when no routes match', function (done) {
const location = createLocation('/no-match')
match({ routes, location }, function (error, redirectLocation, state) {
expect(error).toBe(null)
expect(redirectLocation).toBe(null)
expect(state).toBe(null)
done()
})
})
})
|
react/dashboard_example/src/vendor/recharts/lib/cartesian/Scatter.js
|
webmaster444/webmaster444.github.io
|
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isFunction2 = require('lodash/isFunction');
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _class2, _temp2; /**
* @fileOverview Render a group of scatters
*/
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _classnames = require('classnames');
var _classnames2 = _interopRequireDefault(_classnames);
var _PureRender = require('../util/PureRender');
var _PureRender2 = _interopRequireDefault(_PureRender);
var _Layer = require('../container/Layer');
var _Layer2 = _interopRequireDefault(_Layer);
var _ReactUtils = require('../util/ReactUtils');
var _Curve = require('../shape/Curve');
var _Curve2 = _interopRequireDefault(_Curve);
var _Symbols = require('../shape/Symbols');
var _Symbols2 = _interopRequireDefault(_Symbols);
var _reactSmooth = require('react-smooth');
var _reactSmooth2 = _interopRequireDefault(_reactSmooth);
var _AnimationDecorator = require('../util/AnimationDecorator');
var _AnimationDecorator2 = _interopRequireDefault(_AnimationDecorator);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var PI = Math.PI;
var SYMBOL_STYLE = { transformOrigin: 'center center' };
var Scatter = (0, _AnimationDecorator2.default)(_class = (0, _PureRender2.default)(_class = (_temp2 = _class2 = function (_Component) {
_inherits(Scatter, _Component);
function Scatter() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, Scatter);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Scatter.__proto__ || Object.getPrototypeOf(Scatter)).call.apply(_ref, [this].concat(args))), _this), _this.state = { activeIndex: -1 }, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Scatter, [{
key: 'renderSymbolItem',
value: function renderSymbolItem(option, props) {
var symbol = void 0;
if (_react2.default.isValidElement(option)) {
symbol = _react2.default.cloneElement(option, props);
} else if ((0, _isFunction3.default)(option)) {
symbol = option(props);
} else {
symbol = _react2.default.createElement(_Symbols2.default, _extends({}, props, { type: option }));
}
return symbol;
}
}, {
key: 'renderSymbols',
value: function renderSymbols() {
var _this2 = this;
var _props = this.props;
var points = _props.points;
var shape = _props.shape;
var activeShape = _props.activeShape;
var activeIndex = _props.activeIndex;
var animationBegin = _props.animationBegin;
var animationDuration = _props.animationDuration;
var isAnimationActive = _props.isAnimationActive;
var animationEasing = _props.animationEasing;
var animationId = _props.animationId;
var baseProps = (0, _ReactUtils.getPresentationAttributes)(this.props);
return points.map(function (entry, i) {
var props = _extends({
key: 'symbol-' + i
}, baseProps, entry);
return _react2.default.createElement(
_Layer2.default,
_extends({
className: 'recharts-scatter-symbol'
}, (0, _ReactUtils.filterEventsOfChild)(_this2.props, entry, i), {
key: 'symbol-' + i
}),
_react2.default.createElement(
_reactSmooth2.default,
{
from: { size: 0 },
to: { size: props.size },
duration: animationDuration,
begin: animationBegin,
isActive: isAnimationActive,
key: animationId,
easing: animationEasing
},
function (_ref2) {
var size = _ref2.size;
var finalProps = _extends({}, props, { size: size });
return _this2.renderSymbolItem(activeIndex === i ? activeShape : shape, finalProps);
}
)
);
});
}
}, {
key: 'renderLine',
value: function renderLine() {
var _props2 = this.props;
var points = _props2.points;
var line = _props2.line;
var lineType = _props2.lineType;
var lineJointType = _props2.lineJointType;
var scatterProps = (0, _ReactUtils.getPresentationAttributes)(this.props);
var customLineProps = (0, _ReactUtils.getPresentationAttributes)(line);
var linePoints = void 0;
if (lineType === 'joint') {
linePoints = points.map(function (entry) {
return { x: entry.cx, y: entry.cy };
});
}
var lineProps = _extends({}, scatterProps, {
fill: 'none',
stroke: scatterProps.fill
}, customLineProps, {
points: linePoints
});
var lineItem = void 0;
if (_react2.default.isValidElement(line)) {
lineItem = _react2.default.cloneElement(line, lineProps);
} else if ((0, _isFunction3.default)(line)) {
lineItem = line(lineProps);
} else {
lineItem = _react2.default.createElement(_Curve2.default, _extends({}, lineProps, { type: lineJointType }));
}
return _react2.default.createElement(
_Layer2.default,
{ className: 'recharts-scatter-line', key: 'recharts-scatter-line' },
lineItem
);
}
}, {
key: 'render',
value: function render() {
var _props3 = this.props;
var points = _props3.points;
var line = _props3.line;
var className = _props3.className;
if (!points || !points.length) {
return null;
}
var layerClass = (0, _classnames2.default)('recharts-scatter', className);
return _react2.default.createElement(
_Layer2.default,
{ className: layerClass },
line && this.renderLine(),
_react2.default.createElement(
_Layer2.default,
{ key: 'recharts-scatter-symbols' },
this.renderSymbols()
)
);
}
}]);
return Scatter;
}(_react.Component), _class2.displayName = 'Scatter', _class2.propTypes = _extends({}, _ReactUtils.PRESENTATION_ATTRIBUTES, {
xAxisId: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
yAxisId: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
zAxisId: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
line: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.object, _react.PropTypes.func, _react.PropTypes.element]),
lineType: _react.PropTypes.oneOf(['fitting', 'joint']),
lineJointType: _react.PropTypes.oneOfType([_react.PropTypes.oneOf(['basis', 'basisClosed', 'basisOpen', 'linear', 'linearClosed', 'natural', 'monotoneX', 'monotoneY', 'monotone', 'step', 'stepBefore', 'stepAfter']), _react.PropTypes.func]),
legendType: _react.PropTypes.oneOf(['line', 'square', 'rect', 'circle', 'cross', 'diamond', 'square', 'star', 'triangle', 'wye']),
className: _react.PropTypes.string,
activeIndex: _react.PropTypes.number,
activeShape: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.func, _react.PropTypes.element]),
shape: _react.PropTypes.oneOfType([_react.PropTypes.oneOf(['circle', 'cross', 'diamond', 'square', 'star', 'triangle', 'wye']), _react.PropTypes.element, _react.PropTypes.func]),
points: _react.PropTypes.arrayOf(_react.PropTypes.shape({
cx: _react.PropTypes.number,
cy: _react.PropTypes.number,
size: _react.PropTypes.number,
payload: _react.PropTypes.shape({
x: _react.PropTypes.number,
y: _react.PropTypes.number,
z: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string])
})
})),
onMouseEnter: _react.PropTypes.func,
onMouseLeave: _react.PropTypes.func,
onClick: _react.PropTypes.func,
isAnimationActive: _react.PropTypes.bool,
animationId: _react.PropTypes.number,
animationBegin: _react.PropTypes.number,
animationDuration: _react.PropTypes.number,
animationEasing: _react.PropTypes.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear'])
}), _class2.defaultProps = {
fill: '#fff',
xAxisId: 0,
yAxisId: 0,
zAxisId: 0,
legendType: 'circle',
lineType: 'joint',
lineJointType: 'linear',
data: [],
shape: 'circle',
isAnimationActive: true,
animationBegin: 0,
animationDuration: 400,
animationEasing: 'linear'
}, _temp2)) || _class) || _class;
exports.default = Scatter;
|
node_modules/react-icons/io/arrow-up-a.js
|
bengimbel/Solstice-React-Contacts-Project
|
import React from 'react'
import Icon from 'react-icon-base'
const IoArrowUpA = props => (
<Icon viewBox="0 0 40 40" {...props}>
<g><path d="m20 5l15 15h-8.7v15h-12.5v-15h-8.8z"/></g>
</Icon>
)
export default IoArrowUpA
|
assets/index.js
|
mijia/web-starter-kit
|
import "./stylesheets/base.scss";
import "material-design-lite";
import React from 'react';
import ReactDom from 'react-dom';
import Button from '#coms/Button';
ReactDom.render(
<Button icon="search" title="MdlButton" color="primary" raised />,
document.getElementById("mount"));
|
client/views/about/About.js
|
kriasoft/AspNet-Server-Template
|
/**
* ASP.NET Core Starter Kit (https://dotnetreact.com)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import Layout from '../../components/Layout';
class About extends React.Component {
componentDidMount() {
document.title = 'About Us';
}
render() {
return (
<Layout>
<h1 className="mdl-typography--title">About Us</h1>
<p className="mdl-typography--body-1">
Coming soon.
</p>
</Layout>
);
}
}
export default About;
|
src/icons/DateRangeIcon.js
|
kiloe/ui
|
import React from 'react';
import Icon from '../Icon';
export default class DateRangeIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M18 22h-4v4h4v-4zm8 0h-4v4h4v-4zm8 0h-4v4h4v-4zm4-14h-2V4h-4v4H16V4h-4v4h-2c-2.22 0-3.98 1.8-3.98 4L6 40c0 2.2 1.78 4 4 4h28c2.2 0 4-1.8 4-4V12c0-2.2-1.8-4-4-4zm0 32H10V18h28v22z"/></svg>;}
};
|
wrappers/yaml.js
|
mongus/mongus.com
|
import React from 'react'
import yaml from 'js-yaml'
import Helmet from 'react-helmet'
import { config } from 'config'
module.exports = React.createClass({
propTypes () {
return {
route: React.PropTypes.object,
}
},
render () {
const data = this.props.route.page.data
return (
<div>
<Helmet
title={`${config.siteTitle} | ${data.title}`}
/>
<h1>{data.title}</h1>
<p>Raw view of yaml file</p>
<pre dangerouslySetInnerHTML={{ __html: yaml.safeDump(data) }} />
</div>
)
},
})
|
admin/client/App/components/Navigation/Mobile/index.js
|
snowkeeper/keystone
|
/**
* The mobile navigation, displayed on screens < 768px
*/
import React from 'react';
import Transition from 'react-addons-css-transition-group';
import MobileSectionItem from './SectionItem';
const ESCAPE_KEY_CODE = 27;
const MobileNavigation = React.createClass({
displayName: 'MobileNavigation',
propTypes: {
brand: React.PropTypes.string,
currentListKey: React.PropTypes.string,
currentSectionKey: React.PropTypes.string,
sections: React.PropTypes.array.isRequired,
signoutUrl: React.PropTypes.string,
},
getInitialState () {
return {
barIsVisible: false,
};
},
// Handle showing and hiding the menu based on the window size when
// resizing
componentDidMount () {
this.handleResize();
window.addEventListener('resize', this.handleResize);
},
componentWillUnmount () {
window.removeEventListener('resize', this.handleResize);
},
handleResize () {
this.setState({
barIsVisible: window.innerWidth < 768,
});
},
// Toggle the menu
toggleMenu () {
this[this.state.menuIsVisible ? 'hideMenu' : 'showMenu']();
},
// Show the menu
showMenu () {
this.setState({
menuIsVisible: true,
});
// Make the body unscrollable, so you can only scroll in the menu
document.body.style.overflow = 'hidden';
document.body.addEventListener('keyup', this.handleEscapeKey, false);
},
// Hide the menu
hideMenu () {
this.setState({
menuIsVisible: false,
});
// Make the body scrollable again
document.body.style.overflow = null;
document.body.removeEventListener('keyup', this.handleEscapeKey, false);
},
// If the escape key was pressed, hide the menu
handleEscapeKey (event) {
if (event.which === ESCAPE_KEY_CODE) {
this.hideMenu();
}
},
renderNavigation () {
if (!this.props.sections || !this.props.sections.length) return null;
return this.props.sections.map((section) => {
// Get the link and the classname
const href = section.lists[0].external ? section.lists[0].path : `${Keystone.adminPath}/${section.lists[0].path}`;
const className = (this.props.currentSectionKey && this.props.currentSectionKey === section.key) ? 'MobileNavigation__section is-active' : 'MobileNavigation__section';
// Render a SectionItem
return (
<MobileSectionItem
key={section.key}
className={className}
href={href}
lists={section.lists}
currentListKey={this.props.currentListKey}
onClick={this.toggleMenu}
>
{section.label}
</MobileSectionItem>
);
});
},
// Render a blockout
renderBlockout () {
if (!this.state.menuIsVisible) return null;
return <div className="MobileNavigation__blockout" onClick={this.toggleMenu} />;
},
// Render the sidebar menu
renderMenu () {
if (!this.state.menuIsVisible) return null;
return (
<nav className="MobileNavigation__menu">
<div className="MobileNavigation__sections">
{this.renderNavigation()}
</div>
</nav>
);
},
render () {
if (!this.state.barIsVisible) return null;
return (
<div className="MobileNavigation">
<div className="MobileNavigation__bar">
<button
type="button"
onClick={this.toggleMenu}
className="MobileNavigation__bar__button MobileNavigation__bar__button--menu"
>
<span className={'MobileNavigation__bar__icon octicon octicon-' + (this.state.menuIsVisible ? 'x' : 'three-bars')} />
</button>
<span className="MobileNavigation__bar__label">
{this.props.brand}
</span>
<a
href={this.props.signoutUrl}
className="MobileNavigation__bar__button MobileNavigation__bar__button--signout"
>
<span className="MobileNavigation__bar__icon octicon octicon-sign-out" />
</a>
</div>
<div className="MobileNavigation__bar--placeholder" />
<Transition
transitionName="MobileNavigation__menu"
transitionEnterTimeout={260}
transitionLeaveTimeout={200}
>
{this.renderMenu()}
</Transition>
<Transition
transitionName="react-transitiongroup-fade"
transitionEnterTimeout={0}
transitionLeaveTimeout={0}
>
{this.renderBlockout()}
</Transition>
</div>
);
},
});
module.exports = MobileNavigation;
|
src/components/pages/tasks/TaskListItem.js
|
juandjara/open-crono
|
import React, { Component } from 'react';
import Icon from 'react-toolbox/lib/font_icon/FontIcon'
import IconButton from 'react-toolbox/lib/button/IconButton'
import styled from 'styled-components'
import {Link} from 'react-router'
import Initials from './Initials'
const SpaceBetween = styled.div`
display: flex;
justify-content: space-between;
align-items: center;
`
const Task = styled.li`
padding: .5rem;
margin: .8rem .5rem;
background: white;
border: 1px solid #ccc;
white-space: normal;
box-shadow: 1px 1px 2px rgba(0,0,0, .5);
.material-icons {
vertical-align: middle;
}
`
const TitleInput = styled.input`
flex: 1;
margin: 12px 0;
padding: 4px 0;
font-family: inherit;
font-size: 1rem;
background: rgb(250, 250, 250);
border: 1px solid #ccc;
`
const EditContainer = styled.div`
flex: 1;
.edit-button {
visibility: ${props => props.editMode ? 'visible':'hidden'}
}
&:hover .edit-button {
visibility: visible;
}
`
export default class TaskListItem extends Component {
handleTitleBlur = () => {
const {value} = this.titleInputNode
const {onChange, task} = this.props
onChange({
...task,
name: value
})
}
handleTitleKeyDown = (ev) => {
const enterKeycode = 13
const escapeKeycode = 27
const keycode = ev.keyCode
if(keycode === enterKeycode || keycode === escapeKeycode) {
this.titleInputNode.blur()
}
}
render () {
const {
task, editMode, onEdit,
hasActiveTime, onStartTime, onFinishTime
} = this.props
const user = task.asignee || {name: '', surname: '', full_name: ''}
const initials = user.name[0] + user.surname[0]
return (
<Task>
<SpaceBetween>
<EditContainer editMode={editMode}>
{editMode ? (
<TitleInput
onKeyDown={this.handleTitleKeyDown}
innerRef={node => {this.titleInputNode = node}}
autoFocus
type="text"
defaultValue={task.name}
onBlur={this.handleTitleBlur} />
) : (
<span style={{marginRight: '.5rem'}}>
{task.name}
</span>
)}
<IconButton
className="edit-button"
style={{marginBottom: 8}}
title={editMode ? 'Completar edicion':'Editar nombre de la tarea'}
icon={editMode ? 'done':'edit'}
onClick={() => onEdit(task, !editMode)} />
</EditContainer>
<div>
<Link to={`/tasks/${task._id}`} style={{color: 'inherit'}}>
<IconButton tabIndex="-1" icon="edit" title="Editar tarea" />
</Link>
<Link to={`/tasks/${task._id}/times`} style={{color: 'inherit'}}>
<IconButton tabIndex="-1" icon="timer" title="Tiempos de la tarea" />
</Link>
</div>
</SpaceBetween>
<SpaceBetween>
<div style={{color: '#666'}} >
{task.description && (
<Icon title="Esta tarea tiene una descripcion"
style={{verticalAlign: 'middle', marginRight: 8}}
value="sort" />
)}
<span style={{marginRight: 8, display: 'inline-block'}}>
<Icon title={`${task.comments.length} comentarios`}
style={{verticalAlign: 'middle', marginRight: 2}}
value="chat_bubble_outline" />
<span>{task.comments.length}</span>
</span>
{task.asignee ? (
<Initials title={`Asignada a ${user.full_name}`}>{initials}</Initials>
) : null}
</div>
<div>
{hasActiveTime ? (
<div>
<span>{this.props.time}</span>
<IconButton
onClick={() => onFinishTime(task)}
title="Parar tiempo"
icon="stop"
style={{
color: 'var(--palette-red-500)'
}} />
</div>
) : (
<IconButton
onClick={() => onStartTime(task)}
title="Iniciar tiempo"
icon="play_arrow"
style={{
color: 'var(--palette-green-500)'
}} />
)}
</div>
</SpaceBetween>
</Task>
)
}
}
|
src/helpers/__tests__/getDataDependencies-test.js
|
isTravis/radiumSSRBugDemo
|
import { expect } from 'chai';
import React from 'react';
import { div } from 'react-dom';
import getDataDependencies from '../getDataDependencies';
describe('getDataDependencies', () => {
let getState;
let dispatch;
let location;
let params;
let CompWithFetchData;
let CompWithNoData;
let CompWithFetchDataDeferred;
let ConnectedCompWithFetchData;
let ConnectedCompWithFetchDataDeferred;
beforeEach(() => {
getState = 'getState';
dispatch = 'dispatch';
location = 'location';
params = 'params';
CompWithNoData = () =>
<div />;
CompWithFetchData = () =>
<div />;
CompWithFetchData.fetchData = (_getState, _dispatch, _location, _params) => {
return `fetchData ${_getState} ${_dispatch} ${_location} ${_params}`;
};
CompWithFetchDataDeferred = () =>
<div />;
CompWithFetchDataDeferred.fetchDataDeferred = (_getState, _dispatch, _location, _params) => {
return `fetchDataDeferred ${_getState} ${_dispatch} ${_location} ${_params}`;
};
ConnectedCompWithFetchData = () =>
<div/>;
ConnectedCompWithFetchData.WrappedComponent = CompWithFetchData;
ConnectedCompWithFetchDataDeferred = () =>
<div/>;
ConnectedCompWithFetchDataDeferred.WrappedComponent = CompWithFetchDataDeferred;
});
it('should get fetchDatas', () => {
const deps = getDataDependencies([
CompWithFetchData,
CompWithNoData,
CompWithFetchDataDeferred,
ConnectedCompWithFetchData,
ConnectedCompWithFetchDataDeferred
], getState, dispatch, location, params);
expect(deps).to.deep.equal([
'fetchData getState dispatch location params',
'fetchData getState dispatch location params'
]);
});
it('should get fetchDataDeferreds', () => {
const deps = getDataDependencies([
CompWithFetchData,
CompWithNoData,
CompWithFetchDataDeferred,
ConnectedCompWithFetchDataDeferred
], getState, dispatch, location, params, true);
expect(deps).to.deep.equal([
'fetchDataDeferred getState dispatch location params',
'fetchDataDeferred getState dispatch location params'
]);
});
});
|
app/app.js
|
qq541167695/ReduxTest
|
import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import { createStore } from 'redux'
import App from './container/App'
import appReducers from './reducers/AppReducer'
const store = createStore( appReducers );
render(
<div>
<Provider store={store} >
<App />
</Provider>
</div>,
document.querySelector('#app')
);
|
packages/material-ui-icons/src/PowerSettingsNew.js
|
cherniavskii/material-ui
|
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M13 3h-2v10h2V3zm4.83 2.17l-1.42 1.42C17.99 7.86 19 9.81 19 12c0 3.87-3.13 7-7 7s-7-3.13-7-7c0-2.19 1.01-4.14 2.58-5.42L6.17 5.17C4.23 6.82 3 9.26 3 12c0 4.97 4.03 9 9 9s9-4.03 9-9c0-2.74-1.23-5.18-3.17-6.83z" /></g>
, 'PowerSettingsNew');
|
app/javascript/mastodon/components/regeneration_indicator.js
|
lynlynlynx/mastodon
|
import React from 'react';
import { FormattedMessage } from 'react-intl';
import illustration from 'mastodon/../images/elephant_ui_working.svg';
const RegenerationIndicator = () => (
<div className='regeneration-indicator'>
<div className='regeneration-indicator__figure'>
<img src={illustration} alt='' />
</div>
<div className='regeneration-indicator__label'>
<FormattedMessage id='regeneration_indicator.label' tagName='strong' defaultMessage='Loading…' />
<FormattedMessage id='regeneration_indicator.sublabel' defaultMessage='Your home feed is being prepared!' />
</div>
</div>
);
export default RegenerationIndicator;
|
src/components/FormField.js
|
codereviewvideos/react-login-registration
|
import React from 'react';
import classNames from 'classnames';
const formField = ({ input, label, type, meta: { touched, error } }) => {
const formGroup = classNames(
'form-group',
{'has-danger': touched && error}
);
const formControlCss = classNames(
'form-control',
{'form-control-danger': touched && error}
);
return (
<div className={formGroup}>
<label className="form-control-label">{label}</label>
<div>
<input {...input} placeholder={label} type={type} className={formControlCss}/>
{touched && error && <span className="form-control-feedback">{error}</span>}
</div>
</div>
);
};
formField.propTypes = {
input: React.PropTypes.object.isRequired,
meta: React.PropTypes.object.isRequired,
type: React.PropTypes.string.isRequired,
label: React.PropTypes.string
};
export default formField;
|
dotCMS/src/main/webapp/html/js/dojo/custom-build/dojox/widget/FisheyeList.js
|
dotCMS/core
|
define("dojox/widget/FisheyeList", ["dojo/_base/declare", "dojo/_base/sniff", "dojo/_base/lang", "dojo/aspect", "dojo/dom", "dojo/dom-attr", "dojo/dom-class", "dojo/dom-geometry", "dojo/dom-style", "dojo/dom-construct", "dojo/on", "dojo/_base/window", "dojo/mouse", "dijit/_WidgetBase", "dijit/_TemplatedMixin", "dijit/_Container", "./FisheyeListItem"],
function(declare, has, lang, aspect, dom, attr, domClass, geometry, style, construct, on, winUtil, mouse, _WidgetBase, _TemplatedMixin, _Container, FisheyeListItem){
return declare("dojox.widget.FisheyeList",
[_WidgetBase, _TemplatedMixin, _Container], {
// summary:
// Menu similar to the fish eye menu on the Mac OS
// example:
// | <div dojoType="dojo.widget.FisheyeList"
// | itemWidth="40" itemHeight="40"
// | itemMaxWidth="150" itemMaxHeight="150"
// | orientation="horizontal"
// | effectUnits="2"
// | itemPadding="10"
// | attachEdge="center"
// | labelEdge="bottom">
// |
// | <div dojoType="dojox.widget.FisheyeListItem"
// | id="item1"
// | onclick="alert('click on' + this.label + '(from widget id ' + this.widgetId + ')!');"
// | label="Item 1"
// | iconSrc="images/fisheye_1.png">
// | </div>
// | ...
// | </div>
constructor: function(){
//
// TODO
// fix really long labels in vertical mode
//
this.pos = {'x': -1, 'y': -1}; // current cursor position, relative to the grid
// for conservative trigger mode, when triggered, timerScale is gradually increased from 0 to 1
this.timerScale = 1.0;
},
EDGE: {
CENTER: 0,
LEFT: 1,
RIGHT: 2,
TOP: 3,
BOTTOM: 4
},
templateString: '<div class="dojoxFisheyeListBar" data-dojo-attach-point="containerNode"></div>',
snarfChildDomOutput: true,
// itemWidth: Integer
// width of menu item (in pixels) in it's dormant state (when the mouse is far away)
itemWidth: 40,
// itemHeight: Integer
// height of menu item (in pixels) in it's dormant state (when the mouse is far away)
itemHeight: 40,
// itemMaxWidth: Integer
// width of menu item (in pixels) in it's fully enlarged state (when the mouse is directly over it)
itemMaxWidth: 150,
// itemMaxHeight: Integer
// height of menu item (in pixels) in it's fully enlarged state (when the mouse is directly over it)
itemMaxHeight: 150,
imgNode: null,
// orientation: String
// orientation of the menu, either "horizontal" or "vertical"
orientation: 'horizontal',
// isFixed: Boolean
// toggle to enable additional listener (window scroll) if FisheyeList is in a fixed postion
isFixed: false,
// conservativeTrigger: Boolean
// if true, don't start enlarging menu items until mouse is over an image;
// if false, start enlarging menu items as the mouse moves near them.
conservativeTrigger: false,
// effectUnits: Number
// controls how much reaction the menu makes, relative to the distance of the mouse from the menu
effectUnits: 2,
// itemPadding: Integer
// padding (in pixels) between each menu item
itemPadding: 10,
// attachEdge: String
// Controls the border that the menu items don't expand past;
// for example, if set to "top", then the menu items will drop downwards as they expand.
// Values: "center", "left", "right", "top", "bottom".
attachEdge: 'center',
// labelEdge: String
// Controls were the labels show up in relation to the menu item icons.
// Values: "center", "left", "right", "top", "bottom".
labelEdge: 'bottom',
postCreate: function(){
var e = this.EDGE,
isHorizontal = this.isHorizontal = (this.orientation == 'horizontal');
dom.setSelectable(this.domNode, false);
this.selectedNode = -1;
this.isOver = false;
this.hitX1 = -1;
this.hitY1 = -1;
this.hitX2 = -1;
this.hitY2 = -1;
//
// only some edges make sense...
//
this.anchorEdge = this._toEdge(this.attachEdge, e.CENTER);
this.labelEdge = this._toEdge(this.labelEdge, e.TOP);
if(this.labelEdge == e.CENTER){ this.labelEdge = e.TOP; }
if(isHorizontal){
if(this.anchorEdge == e.LEFT){ this.anchorEdge = e.CENTER; }
if(this.anchorEdge == e.RIGHT){ this.anchorEdge = e.CENTER; }
if(this.labelEdge == e.LEFT){ this.labelEdge = e.TOP; }
if(this.labelEdge == e.RIGHT){ this.labelEdge = e.TOP; }
}else{
if(this.anchorEdge == e.TOP){ this.anchorEdge = e.CENTER; }
if(this.anchorEdge == e.BOTTOM){ this.anchorEdge = e.CENTER; }
if(this.labelEdge == e.TOP){ this.labelEdge = e.LEFT; }
if(this.labelEdge == e.BOTTOM){ this.labelEdge = e.LEFT; }
}
//
// figure out the proximity size
//
var effectUnits = this.effectUnits;
this.proximityLeft = this.itemWidth * (effectUnits - 0.5);
this.proximityRight = this.itemWidth * (effectUnits - 0.5);
this.proximityTop = this.itemHeight * (effectUnits - 0.5);
this.proximityBottom = this.itemHeight * (effectUnits - 0.5);
if(this.anchorEdge == e.LEFT){
this.proximityLeft = 0;
}
if(this.anchorEdge == e.RIGHT){
this.proximityRight = 0;
}
if(this.anchorEdge == e.TOP){
this.proximityTop = 0;
}
if(this.anchorEdge == e.BOTTOM){
this.proximityBottom = 0;
}
if(this.anchorEdge == e.CENTER){
this.proximityLeft /= 2;
this.proximityRight /= 2;
this.proximityTop /= 2;
this.proximityBottom /= 2;
}
},
startup: function(){
// summary:
// create our connections and setup our FisheyeList
this.children = this.getChildren();
//original postCreate() --tk
this._initializePositioning();
//
// in liberal trigger mode, activate menu whenever mouse is close, in conservative mode, pause until needed
//
this._onMouseMoveHandle = on.pausable(winUtil.doc.documentElement, "mousemove", lang.hitch(this, "_onMouseMove"));
if(this.conservativeTrigger){
this._onMouseMoveHandle.pause();
}
if(this.isFixed){
this.own(on(winUtil.doc,"scroll", lang.hitch(this, this._onScroll)));
}
// Deactivate the menu if mouse is moved off screen (doesn't work for FF?)
this.own(
on(winUtil.doc.documentElement, mouse.leave, lang.hitch(this, "_onBodyOut")),
aspect.after(this, "addChild", lang.hitch(this, "_initializePositioning"), true),
aspect.after(winUtil.global, "onresize", lang.hitch(this, "_initializePositioning"), true)
);
},
_initializePositioning: function(){
this.itemCount = this.children.length;
this.barWidth = (this.isHorizontal ? this.itemCount : 1) * this.itemWidth;
this.barHeight = (this.isHorizontal ? 1 : this.itemCount) * this.itemHeight;
this.totalWidth = this.proximityLeft + this.proximityRight + this.barWidth;
this.totalHeight = this.proximityTop + this.proximityBottom + this.barHeight;
//
// calculate effect ranges for each item
//
for(var i=0; i<this.children.length; i++){
this.children[i].posX = this.itemWidth * (this.isHorizontal ? i : 0);
this.children[i].posY = this.itemHeight * (this.isHorizontal ? 0 : i);
this.children[i].cenX = this.children[i].posX + (this.itemWidth / 2);
this.children[i].cenY = this.children[i].posY + (this.itemHeight / 2);
var isz = this.isHorizontal ? this.itemWidth : this.itemHeight,
r = this.effectUnits * isz,
c = this.isHorizontal ? this.children[i].cenX : this.children[i].cenY,
lhs = this.isHorizontal ? this.proximityLeft : this.proximityTop,
rhs = this.isHorizontal ? this.proximityRight : this.proximityBottom,
siz = this.isHorizontal ? this.barWidth : this.barHeight,
range_lhs = r,
range_rhs = r;
if(range_lhs > c+lhs){ range_lhs = c+lhs; }
if(range_rhs > (siz-c+rhs)){ range_rhs = siz-c+rhs; }
this.children[i].effectRangeLeft = range_lhs / isz;
this.children[i].effectRangeRght = range_rhs / isz;
//dojo.debug('effect range for '+i+' is '+range_lhs+'/'+range_rhs);
}
//
// create the bar
//
style.set(this.domNode, {width: this.barWidth + 'px', height: this.barHeight + 'px'});
//
// position the items
//
for(i=0; i<this.children.length; i++){
var itm = this.children[i];
var elm = itm.domNode;
style.set(elm, {left: itm.posX + 'px', top: itm.posY + 'px', width: this.itemWidth + 'px', height: this.itemHeight + 'px'});
style.set(itm.imgNode, {left: this.itemPadding+'%', top: this.itemPadding+'%', width: (100 - 2 * this.itemPadding) + '%', height: (100 - 2 * this.itemPadding) + '%'});
}
//
// calc the grid
//
this._calcHitGrid();
},
_overElement: function(/* DomNode|String */ node, /* Event */ e){
// summary:
// Returns whether the mouse is over the passed element.
// node:
// Must must be display:block (ie, not a `<span>`)
node = dom.byId(node);
var mouse = {x: e.pageX, y: e.pageY},
absolute = geometry.position(node, true),
top = absolute.y,
bottom = top + absolute.h,
left = absolute.x,
right = left + absolute.w;
return (mouse.x >= left
&& mouse.x <= right
&& mouse.y >= top
&& mouse.y <= bottom
); // Boolean
},
_onBodyOut: function(/*Event*/ e){
// clicking over an object inside of body causes this event to fire; ignore that case
if( this._overElement(winUtil.body(), e) ){
return;
}
this._setDormant(e);
},
_setDormant: function(/*Event*/ e){
// summary:
// called when mouse moves out of menu's range
if(!this.isOver){ return; } // already dormant?
this.isOver = false;
if(this.conservativeTrigger){
// user can't re-trigger the menu expansion
// until he mouses over a icon again
this._onMouseMoveHandle.pause();
}
this._onGridMouseMove(-1, -1);
},
_setActive: function(/*Event*/ e){
// summary:
// called when mouse is moved into menu's range
if(this.isOver){ return; } // already activated?
this.isOver = true;
if(this.conservativeTrigger){
// switch event handlers so that we handle mouse events from anywhere near
// the menu
this._onMouseMoveHandle.resume();
this.timerScale=0.0;
// call mouse handler to do some initial necessary calculations/positioning
this._onMouseMove(e);
// slowly expand the icon size so it isn't jumpy
this._expandSlowly();
}
},
_onMouseMove: function(/*Event*/ e){
// summary:
// called when mouse is moved
if( (e.pageX >= this.hitX1) && (e.pageX <= this.hitX2) &&
(e.pageY >= this.hitY1) && (e.pageY <= this.hitY2) ){
if(!this.isOver){
this._setActive(e);
}
this._onGridMouseMove(e.pageX-this.hitX1, e.pageY-this.hitY1);
}else{
if(this.isOver){
this._setDormant(e);
}
}
},
_onScroll: function(){
this._calcHitGrid();
},
onResized: function(){
this._calcHitGrid();
},
_onGridMouseMove: function(x, y){
// summary:
// called when mouse is moved in the vicinity of the menu
this.pos = {x:x, y:y};
this._paint();
},
_paint: function(){
var x=this.pos.x;
var y=this.pos.y;
if(this.itemCount <= 0){ return; }
//
// figure out our main index
//
var pos = this.isHorizontal ? x : y,
prx = this.isHorizontal ? this.proximityLeft : this.proximityTop,
siz = this.isHorizontal ? this.itemWidth : this.itemHeight,
sim = this.isHorizontal ?
(1.0-this.timerScale)*this.itemWidth + this.timerScale*this.itemMaxWidth :
(1.0-this.timerScale)*this.itemHeight + this.timerScale*this.itemMaxHeight,
cen = ((pos - prx) / siz) - 0.5,
max_off_cen = (sim / siz) - 0.5;
if(max_off_cen > this.effectUnits){ max_off_cen = this.effectUnits; }
//
// figure out our off-axis weighting
//
var off_weight = 0, cen2;
if(this.anchorEdge == this.EDGE.BOTTOM){
cen2 = (y - this.proximityTop) / this.itemHeight;
off_weight = (cen2 > 0.5) ? 1 : y / (this.proximityTop + (this.itemHeight / 2));
}
if(this.anchorEdge == this.EDGE.TOP){
cen2 = (y - this.proximityTop) / this.itemHeight;
off_weight = (cen2 < 0.5) ? 1 : (this.totalHeight - y) / (this.proximityBottom + (this.itemHeight / 2));
}
if(this.anchorEdge == this.EDGE.RIGHT){
cen2 = (x - this.proximityLeft) / this.itemWidth;
off_weight = (cen2 > 0.5) ? 1 : x / (this.proximityLeft + (this.itemWidth / 2));
}
if(this.anchorEdge == this.EDGE.LEFT){
cen2 = (x - this.proximityLeft) / this.itemWidth;
off_weight = (cen2 < 0.5) ? 1 : (this.totalWidth - x) / (this.proximityRight + (this.itemWidth / 2));
}
if(this.anchorEdge == this.EDGE.CENTER){
if(this.isHorizontal){
off_weight = y / (this.totalHeight);
}else{
off_weight = x / (this.totalWidth);
}
if(off_weight > 0.5){
off_weight = 1 - off_weight;
}
off_weight *= 2;
}
//
// set the sizes
//
for(var i=0; i<this.itemCount; i++){
var weight = this._weighAt(cen, i);
if(weight < 0){weight = 0;}
this._setItemSize(i, weight * off_weight);
}
//
// set the positions
//
var main_p = Math.round(cen),
offset = 0;
if(cen < 0){
main_p = 0;
}else if(cen > this.itemCount - 1){
main_p = this.itemCount -1;
}else{
offset = (cen - main_p) * ((this.isHorizontal ? this.itemWidth : this.itemHeight) - this.children[main_p].sizeMain);
}
this._positionElementsFrom(main_p, offset);
},
_weighAt: function(/*Integer*/ cen, /*Integer*/ i){
var dist = Math.abs(cen - i),
limit = ((cen - i) > 0) ? this.children[i].effectRangeRght : this.children[i].effectRangeLeft;
return (dist > limit) ? 0 : (1 - dist / limit); // Integer
},
_setItemSize: function(p, scale){
if(this.children[p].scale == scale){ return; }
this.children[p].scale = scale;
scale *= this.timerScale;
var w = Math.round(this.itemWidth + ((this.itemMaxWidth - this.itemWidth ) * scale)),
h = Math.round(this.itemHeight + ((this.itemMaxHeight - this.itemHeight) * scale));
if(this.isHorizontal){
this.children[p].sizeW = w;
this.children[p].sizeH = h;
this.children[p].sizeMain = w;
this.children[p].sizeOff = h;
var y = 0;
if(this.anchorEdge == this.EDGE.TOP){
y = (this.children[p].cenY - (this.itemHeight / 2));
}else if(this.anchorEdge == this.EDGE.BOTTOM){
y = (this.children[p].cenY - (h - (this.itemHeight / 2)));
}else{
y = (this.children[p].cenY - (h / 2));
}
this.children[p].usualX = Math.round(this.children[p].cenX - (w / 2));
style.set(this.children[p].domNode, {top: y + 'px', left: this.children[p].usualX + 'px'});
}else{
this.children[p].sizeW = w;
this.children[p].sizeH = h;
this.children[p].sizeOff = w;
this.children[p].sizeMain = h;
var x = 0;
if(this.anchorEdge == this.EDGE.LEFT){
x = this.children[p].cenX - (this.itemWidth / 2);
}else if(this.anchorEdge == this.EDGE.RIGHT){
x = this.children[p].cenX - (w - (this.itemWidth / 2));
}else{
x = this.children[p].cenX - (w / 2);
}
this.children[p].usualY = Math.round(this.children[p].cenY - (h / 2));
style.set(this.children[p].domNode, {left: x + 'px', top: this.children[p].usualY + 'px'});
}
style.set(this.children[p].domNode, {width: w + 'px', height: h + 'px'});
if(this.children[p].svgNode){
this.children[p].svgNode.setSize(w, h);
}
},
_positionElementsFrom: function(p, offset){
var pos = 0;
var usual, start;
if(this.isHorizontal){
usual = "usualX";
start = "left";
}else{
usual = "usualY";
start = "top";
}
pos = Math.round(this.children[p][usual] + offset);
if(style.get(this.children[p].domNode, start) != (pos + 'px')){
style.set(this.children[p].domNode, start, pos + 'px');
this._positionLabel(this.children[p]);
}
// position before
var bpos = pos;
for(var i=p-1; i>=0; i--){
bpos -= this.children[i].sizeMain;
if(style.get(this.children[p].domNode, start) != (bpos + 'px')){
style.set(this.children[i].domNode, start, bpos + 'px');
this._positionLabel(this.children[i]);
}
}
// position after
var apos = pos;
for(i=p+1; i<this.itemCount; i++){
apos += this.children[i-1].sizeMain;
if(style.get(this.children[p].domNode, start) != (apos + 'px')){
style.set(this.children[i].domNode, start, apos + 'px');
this._positionLabel(this.children[i]);
}
}
},
_positionLabel: function(itm){
var x = 0;
var y = 0;
var mb = geometry.getMarginBox(itm.lblNode);
if(this.labelEdge == this.EDGE.TOP){
x = Math.round((itm.sizeW / 2) - (mb.w / 2));
y = -mb.h;
}
if(this.labelEdge == this.EDGE.BOTTOM){
x = Math.round((itm.sizeW / 2) - (mb.w / 2));
y = itm.sizeH;
}
if(this.labelEdge == this.EDGE.LEFT){
x = -mb.w;
y = Math.round((itm.sizeH / 2) - (mb.h / 2));
}
if(this.labelEdge == this.EDGE.RIGHT){
x = itm.sizeW;
y = Math.round((itm.sizeH / 2) - (mb.h / 2));
}
style.set(itm.lblNode, {left: x + 'px', top: y + 'px'});
},
_calcHitGrid: function(){
var pos = geometry.position(this.domNode, true);
this.hitX1 = pos.x - this.proximityLeft;
this.hitY1 = pos.y - this.proximityTop;
this.hitX2 = this.hitX1 + this.totalWidth;
this.hitY2 = this.hitY1 + this.totalHeight;
},
_toEdge: function(inp, def){
return this.EDGE[inp.toUpperCase()] || def;
},
_expandSlowly: function(){
// summary:
// slowly expand the image to user specified max size
if(!this.isOver){ return; }
this.timerScale += 0.2;
this._paint();
if(this.timerScale<1.0){
setTimeout(lang.hitch(this, "_expandSlowly"), 10);
}
}
});
});
|
src/admin/pages/Widgets/BoxItemAvailable.js
|
rendact/rendact
|
import React from 'react';
import {DragSource} from 'react-dnd';
import AddToWidgetAreaForm from './AddToWidgetAreaForm';
const dragSource = {
beginDrag(props, monitor, component){
return {widget: props.widget}
},
}
const dragCollect = (connect, monitor) => ({
connectDragToDom: connect.dragSource(),
isDragging: monitor.isDragging()
});
class BoxItemAvailable extends React.Component {
render(){
var widget = this.props.widget;
var widgetValue = JSON.parse(widget.value);
var {connectDragToDom, isDragging, widgetAreas} = this.props;
let opacity = isDragging? 0.5 : 1;
return connectDragToDom(
<div className="box box-default collapsed-box box-solid" style={{opacity, cursor: 'move'}} id={widget.item}>
<div className="box-header with-border">
<h3 className="box-title">{widgetValue.title}</h3>
<div className="box-tools pull-right">
<button type="button" className="btn btn-box-tool" disabled={this.props.selectedMenuName===""} data-widget="collapse"><i className="fa fa-plus"></i>
</button>
</div>
</div>
<div className="box-body">
<p>{widgetValue.help}</p>
</div>
<div className="box-footer text-center">
<AddToWidgetAreaForm widget={widget} widgetAreas={widgetAreas} />
</div>
</div>
)
}
}
BoxItemAvailable = DragSource('available', dragSource, dragCollect)(BoxItemAvailable);
export default BoxItemAvailable;
|
src/Hoverable.js
|
jaredlunde/react-cake
|
import React from 'react'
import PropTypes from 'prop-types'
import Toggle from './Toggle'
import EventTracker from './EventTracker'
import {requestTimeout, clearRequestTimeout} from './utils'
/**
const HoverableButton = props => (
<Hoverable enterDelay={500} leaveDelay={200}>
{
({isHovering, canHover, hoverableRef}) => (
<button
ref={hoverableRef}
className={`
btn
${iAmHovering ? 'btn--m' : 'btn--s'}
`}
>
Hovering? {JSON.stringify(iAmHovering)}
</button>
)
}
</Hoverable>
)
*/
export const canHover = !("ontouchstart" in window)
export class Hoverable extends React.Component {
static propTypes = {
propName: PropTypes.string.isRequired,
enterDelay: PropTypes.number,
leaveDelay: PropTypes.number,
on: PropTypes.func.isRequired,
off: PropTypes.func.isRequired
}
_hoverable = null
_timeout = null
componentWillUnmount () {
if (this._timeout) {
clearRequestTimeout(this._timeout)
}
}
control (onOrOff, delay) {
if (!canHover) {
return
}
if (this._timeout) {
clearRequestTimeout(this._timeout)
}
if (delay) {
this._timeout = requestTimeout(onOrOff, delay)
} else {
onOrOff()
}
}
hoverableRef = e => {
if (this._hoverable !== null) {
this.props.removeAllEvents()
}
if (e !== null) {
this._hoverable = e
this.props.addEvent(this._hoverable, 'mouseenter', this.onEnter)
this.props.addEvent(this._hoverable, 'mouseleave', this.onLeave)
}
}
onEnter = () => {
const {on, enterDelay} = this.props
this.control(on, enterDelay)
}
onLeave = () => {
const {off, leaveDelay} = this.props
this.control(off, leaveDelay)
}
render () {
return children({
hoverableRef: this.hoverableRef,
[this.props.propName]: this.props[this.props.propName]
})
}
}
export default function (props) {
const propName = props.propName || 'isHovering'
return (
<EventTracker>
{function (eventContext) {
return (
<Toggle propName={propName} initialValue={props.initialValue || false}>
{function (toggleContext) {
return <Hoverable
{...eventContext}
{...toggleContext}
{...props}
propName={propName}
/>
}}
</Toggle>
)
}}
</EventTracker>
)
}
|
src/views/Main/Container.js
|
nt591/Wilks-Calculator
|
import React from 'react'
import Header from 'components/Header/Header.js'
import styles from './styles.module.css'
const Container = React.createClass({
render() {
return (
<div className={styles.wrapper}>
<Header />
Hello from the container
</div>
)
}
})
export default Container
|
src/svg-icons/av/hd.js
|
ArcanisCz/material-ui
|
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvHd = (props) => (
<SvgIcon {...props}>
<path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z"/>
</SvgIcon>
);
AvHd = pure(AvHd);
AvHd.displayName = 'AvHd';
AvHd.muiName = 'SvgIcon';
export default AvHd;
|
src/components/UI/ActivityIndicator.js
|
bocasfx/Q
|
import React from 'react';
import './ActivityIndicator.css';
import { connect } from 'react-redux';
import config from '../../config/config';
import PropTypes from 'prop-types';
const color = {
midi: config.midi.color,
stream: config.stream.color,
};
class ActivityIndicator extends React.Component {
static propTypes = {
nodes: PropTypes.array,
streams: PropTypes.array,
transport: PropTypes.object,
item: PropTypes.object,
}
renderBullet() {
let style = {
color: color[this.props.item.type],
};
if (this.props.item.type === 'stream') {
if (this.props.item.disabled) {
return <span className="activity-indicator-bullet" style={style}><i className="fa fa-ban"></i></span>;
} else if (this.props.transport.playing) {
return <span className="activity-indicator-bullet" style={style}><i className="fa fa-circle"></i></span>;
} else {
return <span className="activity-indicator-bullet" style={style}><i className="fa fa-circle-o"></i></span>;
}
} else if (!this.props.item.disabled) {
if (this.props.item.active) {
return <span className="activity-indicator-bullet" style={style}><i className="fa fa-circle"></i></span>;
}
return <span className="activity-indicator-bullet" style={style}><i className="fa fa-circle-o"></i></span>;
}
return <span className="activity-indicator-bullet" style={style}><i className="fa fa-ban"></i></span>;
}
render() {
return (
<div className="activity-indicator-container">
{this.renderBullet()}
</div>
);
}
}
const mapStateToProps = (state) => {
return {
nodes: state.nodes,
streams: state.streams,
transport: state.transport,
};
};
export default connect(mapStateToProps)(ActivityIndicator);
|
app/containers/App.js
|
lamosty/spin-bike-ui
|
import React, { Component } from 'react';
import MainNav from '../components/main-nav';
import 'bootstrap-loader';
import '../assets/style.scss';
export default class App extends Component {
constructor(props) {
super(props);
}
render() {
const { children } = this.props;
return (
<div>
<MainNav />
{children}
</div>
);
}
}
|
plugin/exo/Resources/modules/bank/index.js
|
ClaroBot/Distribution
|
import React from 'react'
import ReactDOM from 'react-dom'
import {Provider} from 'react-redux'
import {createStore} from './store'
import {registerDefaultItemTypes} from './../items/item-types'
import {registerModalType} from '#/main/core/layout/modal'
import {MODAL_ADD_ITEM, AddItemModal} from './../quiz/editor/components/add-item-modal.jsx'
import {MODAL_SEARCH, SearchModal} from './components/modal/search.jsx'
import {MODAL_SHARE, ShareModal} from './components/modal/share.jsx'
import {Bank} from './components/bank.jsx'
// Load question types
registerDefaultItemTypes()
// Register needed modals
registerModalType(MODAL_SEARCH, SearchModal)
registerModalType(MODAL_ADD_ITEM, AddItemModal)
registerModalType(MODAL_SHARE, ShareModal)
// Get initial data
const container = document.getElementById('questions-bank')
const initialData = JSON.parse(container.dataset['initial'])
const currentUser = JSON.parse(container.dataset['user'])
const store = createStore(Object.assign({}, initialData, {
currentUser
}))
ReactDOM.render(
React.createElement(
Provider,
{store},
React.createElement(Bank)
),
document.getElementById('questions-bank')
)
|
examples/todomvc/test/components/TodoItem.spec.js
|
zalmoxisus/redux-devtools-extension
|
import expect from 'expect';
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import TodoItem from '../../components/TodoItem';
import TodoTextInput from '../../components/TodoTextInput';
function setup( editing = false ) {
const props = {
todo: {
id: 0,
text: 'Use Redux',
completed: false
},
editTodo: expect.createSpy(),
deleteTodo: expect.createSpy(),
completeTodo: expect.createSpy()
};
const renderer = TestUtils.createRenderer();
renderer.render(
<TodoItem {...props} />
);
let output = renderer.getRenderOutput();
if (editing) {
const label = output.props.children.props.children[1];
label.props.onDoubleClick({});
output = renderer.getRenderOutput();
}
return {
props: props,
output: output,
renderer: renderer
};
}
describe('components', () => {
describe('TodoItem', () => {
it('initial render', () => {
const { output } = setup();
expect(output.type).toBe('li');
expect(output.props.className).toBe('');
const div = output.props.children;
expect(div.type).toBe('div');
expect(div.props.className).toBe('view');
const [input, label, button] = div.props.children;
expect(input.type).toBe('input');
expect(input.props.checked).toBe(false);
expect(label.type).toBe('label');
expect(label.props.children).toBe('Use Redux');
expect(button.type).toBe('button');
expect(button.props.className).toBe('destroy');
});
it('input onChange should call completeTodo', () => {
const { output, props } = setup();
const input = output.props.children.props.children[0];
input.props.onChange({});
expect(props.completeTodo).toHaveBeenCalledWith(0);
});
it('button onClick should call deleteTodo', () => {
const { output, props } = setup();
const button = output.props.children.props.children[2];
button.props.onClick({});
expect(props.deleteTodo).toHaveBeenCalledWith(0);
});
it('label onDoubleClick should put component in edit state', () => {
const { output, renderer } = setup();
const label = output.props.children.props.children[1];
label.props.onDoubleClick({});
const updated = renderer.getRenderOutput();
expect(updated.type).toBe('li');
expect(updated.props.className).toBe('editing');
});
it('edit state render', () => {
const { output } = setup(true);
expect(output.type).toBe('li');
expect(output.props.className).toBe('editing');
const input = output.props.children;
expect(input.type).toBe(TodoTextInput);
expect(input.props.text).toBe('Use Redux');
expect(input.props.editing).toBe(true);
});
it('TodoTextInput onSave should call editTodo', () => {
const { output, props } = setup(true);
output.props.children.props.onSave('Use Redux');
expect(props.editTodo).toHaveBeenCalledWith(0, 'Use Redux');
});
it('TodoTextInput onSave should call deleteTodo if text is empty', () => {
const { output, props } = setup(true);
output.props.children.props.onSave('');
expect(props.deleteTodo).toHaveBeenCalledWith(0);
});
it('TodoTextInput onSave should exit component from edit state', () => {
const { output, renderer } = setup(true);
output.props.children.props.onSave('Use Redux');
const updated = renderer.getRenderOutput();
expect(updated.type).toBe('li');
expect(updated.props.className).toBe('');
});
});
});
|
src/app/components/error/ErrorBoundary.js
|
meedan/check-web
|
import React from 'react';
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
import { Notifier } from '@airbrake/browser';
import config from 'config'; // eslint-disable-line require-path-exists/exists
import ErrorPage from './ErrorPage';
import GenericUnknownErrorMessage from '../GenericUnknownErrorMessage';
const messages = defineMessages({
askSupport: {
id: 'errorBoundary.message',
defaultMessage: 'Hello, I\'m having trouble with Check. The web interface has just crashed and is blocking me from doing work!',
description: 'Prefilled support request message when Check UI crashes',
},
});
class ErrorBoundary extends React.Component {
constructor(props) {
super(props);
this.state = { hasError: false };
if (config.errbitApiKey && config.errbitHost) {
this.airbrake = new Notifier({
host: config.errbitHost,
projectId: 1,
projectKey: config.errbitApiKey,
});
}
}
static getDerivedStateFromError() {
return { hasError: true };
}
componentDidCatch(error, errorInfo) {
const { component, intl } = this.props;
if (this.airbrake) {
const { dbid, email, name } = window.Check.store.getState().app.context.currentUser;
this.airbrake.notify({
// For some reason we need to reinstantiate the error or pass the error as string.
// Not doing this causes the additional info (contex, params, session) to be empty
error: new Error(error),
context: { component },
params: { info: errorInfo },
session: { name, dbid, email },
}).then((response) => {
if (Intercom) {
Intercom(
'showNewMessage',
`${intl.formatMessage(messages.askSupport)}\n\n${response.url}`,
);
}
});
}
}
render() {
if (this.state.hasError) {
return (
<ErrorPage
pageTitle={null}
cardTitle={
<FormattedMessage
id="mainErrorBoundary.cardTitle"
defaultMessage="An unexpected error happened"
description="Title for error state card displayed in error page"
/>
}
cardText={<GenericUnknownErrorMessage />}
/>
);
}
return this.props.children;
}
}
export default injectIntl(ErrorBoundary);
|
jekyll-strapi-tutorial/api/plugins/content-type-builder/admin/src/components/PluginLeftMenuLink/index.js
|
strapi/strapi-examples
|
/**
*
* PluginLeftMenuLink
* - Required props:
* - {object} Link
*
* - Optionnal props:
* - {function} renderCustomLink : overrides the behavior of the link
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import { NavLink } from 'react-router-dom';
import styles from './styles.scss';
class PluginLeftMenuLink extends React.Component { // eslint-disable-line react/prefer-stateless-function
render() {
if (this.props.renderCustomLink) return this.props.renderCustomLink(this.props, styles);
const icon = this.props.customIcon || this.props.link.icon;
return (
<li className={styles.pluginLeftMenuLink}>
<NavLink className={styles.link} to={`/plugins/${this.props.basePath}/${this.props.link.name}`} activeClassName={styles.linkActive}>
<div>
<i className={`fa ${icon}`} />
</div>
<span>{this.props.link.name}</span>
</NavLink>
</li>
);
}
}
PluginLeftMenuLink.propTypes = {
basePath: PropTypes.string,
customIcon: PropTypes.string,
link: PropTypes.object.isRequired,
renderCustomLink: PropTypes.oneOfType([
PropTypes.bool,
PropTypes.func,
]),
};
PluginLeftMenuLink.defaultProps = {
basePath: '',
customIcon: '',
renderCustomLink: false,
};
export default PluginLeftMenuLink;
|
client/js/components/environments/Feedback.js
|
Code4HR/hrtb.us
|
import React from 'react';
import Radium from 'radium';
class Feedback extends React.Component {
render() {
return (
<pre>Feedback</pre>
);
}
}
export default Feedback
|
src/svg-icons/hardware/memory.js
|
frnk94/material-ui
|
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareMemory = (props) => (
<SvgIcon {...props}>
<path d="M15 9H9v6h6V9zm-2 4h-2v-2h2v2zm8-2V9h-2V7c0-1.1-.9-2-2-2h-2V3h-2v2h-2V3H9v2H7c-1.1 0-2 .9-2 2v2H3v2h2v2H3v2h2v2c0 1.1.9 2 2 2h2v2h2v-2h2v2h2v-2h2c1.1 0 2-.9 2-2v-2h2v-2h-2v-2h2zm-4 6H7V7h10v10z"/>
</SvgIcon>
);
HardwareMemory = pure(HardwareMemory);
HardwareMemory.displayName = 'HardwareMemory';
HardwareMemory.muiName = 'SvgIcon';
export default HardwareMemory;
|
client/internals/templates/containers/NotFoundPage/index.js
|
sosaucily/r3-go
|
/**
* NotFoundPage
*
* This is the page we show when the user visits a url that doesn't have a route
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If hot
* reloading is not a necessity for you then you can refactor it and remove
* the linting exception.
*/
import React from 'react';
import { FormattedMessage } from 'react-intl';
import messages from './messages';
export default class NotFound extends React.PureComponent { // eslint-disable-line react/prefer-stateless-function
render() {
return (
<h1>
<FormattedMessage {...messages.header} />
</h1>
);
}
}
|
client/src/components/StreamStatus.js
|
mconstanza/TwitchAvidReact
|
import React, { Component } from 'react';
import helpers from "../utils/helpers";
class StreamStatus extends Component {
constructor(props) {
super(props);
this.state = {
stream: null
};
}
componentWillReceiveProps(nextProps) {
if(nextProps.channel.name) {
helpers.getStream(nextProps.channel.name, function(data) {
this.setState({stream: data});
}.bind(this));
}
}
render() {
var style = {
marginLeft: "10px",
cursor: "pointer"
}
var status, viewable;
if(this.state.stream == null) status = "";
else if(this.state.stream.stream) status = "Online";
else status = "Offline";
if(status == "Online") viewable = <i onClick={() => this.props.addStreamToCanvas(this.state.stream.stream)} style={style} className="fa fa-eye" aria-hidden="true"></i>;
return (
<p>
<i className={status == "Online" ? "online" : "offline"}>{status}</i>
{viewable}
</p>
)
}
}
module.exports = StreamStatus;
|
docs/src/pages/components/autocomplete/CustomInputAutocomplete.js
|
lgollut/material-ui
|
import React from 'react';
import Autocomplete from '@material-ui/lab/Autocomplete';
const options = ['Option 1', 'Option 2'];
export default function CustomInputAutocomplete() {
return (
<Autocomplete
id="custom-input-demo"
options={options}
renderInput={(params) => (
<div ref={params.InputProps.ref}>
<input style={{ width: 200 }} type="text" {...params.inputProps} />
</div>
)}
/>
);
}
|
js/jqwidgets/demos/react/app/treegrid/dataprinting/app.js
|
luissancheza/sice
|
import React from 'react';
import ReactDOM from 'react-dom';
import JqxTreeGrid from '../../../jqwidgets-react/react_jqxtreegrid.js';
import JqxButton from '../../../jqwidgets-react/react_jqxbuttons.js';
class App extends React.Component {
componentDidMount() {
this.refs.myTreeGrid.expandRow(2);
this.refs.print.on('click', () => {
let gridContent = this.refs.myTreeGrid.exportData('html');
let newWindow = window.open('', '', 'width=800, height=500'),
document = newWindow.document.open(),
pageContent =
'<!DOCTYPE html>' +
'<html>' +
'<head>' +
'<meta charset="utf-8" />' +
'<title>jQWidgets TreeGrid</title>' +
'</head>' +
'<body>' + gridContent + '</body></html>';
document.write(pageContent);
document.close();
newWindow.print();
});
}
render () {
let employees = [{ 'EmployeeID': 1, 'FirstName': 'Nancy', 'LastName': 'Davolio', 'ReportsTo': 2, 'Country': 'USA', 'Title': 'Sales Representative', 'HireDate': '1992-05-01 00:00:00', 'BirthDate': '1948-12-08 00:00:00', 'City': 'Seattle', 'Address': '507 - 20th Ave. E.Apt. 2A' }, { 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'ReportsTo': null, 'Country': 'USA', 'Title': 'Vice President, Sales', 'HireDate': '1992-08-14 00:00:00', 'BirthDate': '1952-02-19 00:00:00', 'City': 'Tacoma', 'Address': '908 W. Capital Way' }, { 'EmployeeID': 3, 'FirstName': 'Janet', 'LastName': 'Leverling', 'ReportsTo': 2, 'Country': 'USA', 'Title': 'Sales Representative', 'HireDate': '1992-04-01 00:00:00', 'BirthDate': '1963-08-30 00:00:00', 'City': 'Kirkland', 'Address': '722 Moss Bay Blvd.' }, { 'EmployeeID': 4, 'FirstName': 'Margaret', 'LastName': 'Peacock', 'ReportsTo': 2, 'Country': 'USA', 'Title': 'Sales Representative', 'HireDate': '1993-05-03 00:00:00', 'BirthDate': '1937-09-19 00:00:00', 'City': 'Redmond', 'Address': '4110 Old Redmond Rd.' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'ReportsTo': 2, 'Country': 'UK', 'Title': 'Sales Manager', 'HireDate': '1993-10-17 00:00:00', 'BirthDate': '1955-03-04 00:00:00', 'City': 'London', 'Address': '14 Garrett Hill' }, { 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'ReportsTo': 5, 'Country': 'UK', 'Title': 'Sales Representative', 'HireDate': '1993-10-17 00:00:00', 'BirthDate': '1963-07-02 00:00:00', 'City': 'London', 'Address': 'Coventry House Miner Rd.' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'ReportsTo': 5, 'Country': 'UK', 'Title': 'Sales Representative', 'HireDate': '1994-01-02 00:00:00', 'BirthDate': '1960-05-29 00:00:00', 'City': 'London', 'Address': 'Edgeham Hollow Winchester Way' }, { 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'ReportsTo': 2, 'Country': 'USA', 'Title': 'Inside Sales Coordinator', 'HireDate': '1994-03-05 00:00:00', 'BirthDate': '1958-01-09 00:00:00', 'City': 'Seattle', 'Address': '4726 - 11th Ave. N.E.' }, { 'EmployeeID': 9, 'FirstName': 'Anne', 'LastName': 'Dodsworth', 'ReportsTo': 5, 'Country': 'UK', 'Title': 'Sales Representative', 'HireDate': '1994-11-15 00:00:00', 'BirthDate': '1966-01-27 00:00:00', 'City': 'London', 'Address': '7 Houndstooth Rd.' }];
// prepare the data
let source = {
dataType: 'json',
dataFields: [
{ name: 'EmployeeID', type: 'number' },
{ name: 'ReportsTo', type: 'number' },
{ name: 'FirstName', type: 'string' },
{ name: 'LastName', type: 'string' },
{ name: 'Country', type: 'string' },
{ name: 'City', type: 'string' },
{ name: 'Address', type: 'string' },
{ name: 'Title', type: 'string' },
{ name: 'HireDate', type: 'date' },
{ name: 'BirthDate', type: 'date' }
],
hierarchy:
{
keyDataField: { name: 'EmployeeID' },
parentDataField: { name: 'ReportsTo' }
},
id: 'EmployeeID',
localData: employees
};
let dataAdapter = new $.jqx.dataAdapter(source);
// create Tree Grid
let columns = [
{ text: 'FirstName', dataField: 'FirstName', width: 200 },
{ text: 'LastName', dataField: 'LastName', width: 170 },
{ text: 'Title', dataField: 'Title', width: 160 },
{ text: 'Birth Date', dataField: 'BirthDate', cellsFormat: 'd', width: 120 },
{ text: 'Hire Date', dataField: 'HireDate', cellsFormat: 'd', width: 120 },
{ text: 'Address', dataField: 'Address', width: 250 },
{ text: 'City', dataField: 'City', width: 120 },
{ text: 'Country', dataField: 'Country' }
];
return (
<div>
<JqxTreeGrid ref='myTreeGrid'
width={850}
source={dataAdapter}
sortable={true}
exportSettings={{fileName: null}}
columns={columns}
/>
<div style={{ marginTop: 20 }}>
<div style={{ float: 'left', marginLeft: 10 }}>
<JqxButton ref='print' width={80} value='Print'/>
</div>
</div>
</div>
)
}
}
ReactDOM.render(<App />, document.getElementById('app'));
|
common/static/js/vendor/mathjax-MathJax-c9db6ac/unpacked/extensions/TeX/mhchem.js
|
mahendra-r/edx-platform
|
/*************************************************************
*
* MathJax/extensions/TeX/mhchem.js
*
* Implements the \ce command for handling chemical formulas
* from the mhchem LaTeX package.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2011-2012 Design Science, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Extension["TeX/mhchem"] = {
version: "2.0"
};
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
var TEX = MathJax.InputJax.TeX,
MACROS = TEX.Definitions.macros;
/*
* This is the main class for handing the \ce and related commands.
* Its main method is Parse() which takes the argument to \ce and
* returns the corresponding TeX string.
*/
var CE = MathJax.Object.Subclass({
string: "", // the \ce string being parsed
i: 0, // the current position in the string
tex: "", // the processed TeX result
atom: false, // last processed token is an atom
sup: "", // pending superscript
sub: "", // pending subscript
//
// Store the string when a CE object is created
//
Init: function (string) {this.string = string},
//
// These are the special characters and the methods that
// handle them. All others are passed through verbatim.
//
ParseTable: {
'-': "Minus",
'+': "Plus",
'(': "Open",
')': "Close",
'[': "Open",
']': "Close",
'<': "Less",
'^': "Superscript",
'_': "Subscript",
'*': "Dot",
'.': "Dot",
'=': "Equal",
'#': "Pound",
'$': "Math",
'\\': "Macro",
' ': "Space"
},
//
// Basic arrow names for reactions
//
Arrows: {
'->': "rightarrow",
'<-': "leftarrow",
'<->': "leftrightarrow",
'<=>': "rightleftharpoons",
'<=>>': "Rightleftharpoons",
'^': "uparrow",
'v': "downarrow"
},
//
// Implementations for the various bonds
// (the ~ ones are hacks that don't work well in NativeMML)
//
Bonds: {
'-': "-",
'=': "=",
'#': "\\equiv",
'~': "\\tripledash",
'~-': "\\begin{CEstack}{}\\tripledash\\\\-\\end{CEstack}",
'~=': "\\raise2mu{\\begin{CEstack}{}\\tripledash\\\\-\\\\-\\end{CEstack}}",
'~--': "\\raise2mu{\\begin{CEstack}{}\\tripledash\\\\-\\\\-\\end{CEstack}}",
'-~-': "\\raise2mu{\\begin{CEstack}{}-\\\\\\tripledash\\\\-\\end{CEstack}}",
'...': "{\\cdot}{\\cdot}{\\cdot}",
'....': "{\\cdot}{\\cdot}{\\cdot}{\\cdot}",
'->': "\\rightarrow",
'<-': "\\leftarrow",
'??': "\\text{??}" // unknown bond
},
//
// This converts the CE string to a TeX string.
// It loops through the string and calls the proper
// method depending on the ccurrent character.
//
Parse: function () {
this.tex = ""; this.atom = false;
while (this.i < this.string.length) {
var c = this.string.charAt(this.i);
if (c.match(/[a-z]/i)) {this.ParseLetter()}
else if (c.match(/[0-9]/)) {this.ParseNumber()}
else {this["Parse"+(this.ParseTable[c]||"Other")](c)}
}
this.FinishAtom();
return this.tex;
},
//
// Make an atom name or a down arrow
//
ParseLetter: function () {
this.FinishAtom();
if (this.Match(/^v( |$)/)) {
this.tex += "{\\"+this.Arrows["v"]+"}";
} else {
this.tex += "\\text{"+this.Match(/^[a-z]+/i)+"}";
this.atom = true;
}
},
//
// Make a number of fraction preceeding an atom,
// or a subscript for an atom.
//
ParseNumber: function () {
var n = this.Match(/^\d+/);
if (this.atom && !this.sub) {
this.sub = n;
} else {
this.FinishAtom();
var match = this.Match(/^\/\d+/);
if (match) {
var frac = "\\frac{"+n+"}{"+match.substr(1)+"}";
this.tex += "\\mathchoice{\\textstyle"+frac+"}{"+frac+"}{"+frac+"}{"+frac+"}";
} else {
this.tex += n;
if (this.i < this.string.length) {this.tex += "\\,"}
}
}
},
//
// Make a superscript minus, or an arrow, or a single bond.
//
ParseMinus: function (c) {
if (this.atom && (this.i === this.string.length-1 || this.string.charAt(this.i+1) === " ")) {
this.sup += c;
} else {
this.FinishAtom();
if (this.string.substr(this.i,2) === "->") {this.i += 2; this.AddArrow("->"); return}
else {this.tex += "{-}"}
}
this.i++;
},
//
// Make a superscript plus, or pass it through
//
ParsePlus: function (c) {
if (this.atom) {this.sup += c} else {this.FinishAtom(); this.tex += c}
this.i++;
},
//
// Handle dots and double or triple bonds
//
ParseDot: function (c) {this.FinishAtom(); this.tex += "\\cdot "; this.i++},
ParseEqual: function (c) {this.FinishAtom(); this.tex += "{=}"; this.i++},
ParsePound: function (c) {this.FinishAtom(); this.tex += "{\\equiv}"; this.i++},
//
// Look for (v) or (^), or pass it through
//
ParseOpen: function (c) {
this.FinishAtom();
var match = this.Match(/^\([v^]\)/);
if (match) {this.tex += "{\\"+this.Arrows[match.charAt(1)]+"}"}
else {this.tex += "{"+c; this.i++}
},
//
// Allow ) and ] to get super- and subscripts
//
ParseClose: function (c) {this.FinishAtom(); this.atom = true; this.tex += c+"}"; this.i++},
//
// Make the proper arrow
//
ParseLess: function (c) {
this.FinishAtom();
var arrow = this.Match(/^(<->?|<=>>?)/);
if (!arrow) {this.tex += c; this.i++} else {this.AddArrow(arrow)}
},
//
// Look for a superscript, or an up arrow
//
ParseSuperscript: function (c) {
c = this.string.charAt(++this.i);
if (c === "{") {
this.i++; var m = this.Find("}");
if (m === "-.") {this.sup += "{-}{\\cdot}"} else if (m) {this.sup += CE(m).Parse()}
} else if (c === " " || c === "") {
this.tex += "{\\"+this.Arrows["^"]+"}"; this.i++;
} else {
var n = this.Match(/^(\d+|-\.)/);
if (n) {this.sup += n}
}
},
//
// Look for subscripts
//
ParseSubscript: function (c) {
if (this.string.charAt(++this.i) == "{") {
this.i++; this.sub += CE(this.Find("}")).Parse();
} else {
var n = this.Match(/^\d+/);
if (n) {this.sub += n}
}
},
//
// Look for raw TeX code to include
//
ParseMath: function (c) {
this.FinishAtom();
this.i++; this.tex += this.Find(c);
},
//
// Look for specific macros for bonds
// and allow \} to have subscripts
//
ParseMacro: function (c) {
this.FinishAtom();
this.i++; var match = this.Match(/^([a-z]+|.)/i)||" ";
if (match === "sbond") {this.tex += "{-}"}
else if (match === "dbond") {this.tex += "{=}"}
else if (match === "tbond") {this.tex += "{\\equiv}"}
else if (match === "bond") {
var bond = (this.Match(/^\{.*?\}/)||"");
bond = bond.substr(1,bond.length-2);
this.tex += "{"+(this.Bonds[bond]||"\\text{??}")+"}";
}
else if (match === "{") {this.tex += "{\\{"}
else if (match === "}") {this.tex += "\\}}"; this.atom = true}
else {this.tex += c+match}
},
//
// Ignore spaces
//
ParseSpace: function (c) {this.FinishAtom(); this.i++},
//
// Pass anything else on verbatim
//
ParseOther: function (c) {this.FinishAtom(); this.tex += c; this.i++},
//
// Process an arrow (looking for brackets for above and below)
//
AddArrow: function (arrow) {
var c = this.Match(/^[CT]\[/);
if (c) {this.i--; c = c.charAt(0)}
var above = this.GetBracket(c), below = this.GetBracket(c);
arrow = this.Arrows[arrow];
if (above || below) {
if (below) {arrow += "["+below+"]"}
arrow += "{"+above+"}";
arrow = "\\mathrel{\\x"+arrow+"}";
} else {
arrow = "\\long"+arrow+" ";
}
this.tex += arrow;
},
//
// Handle the super and subscripts for an atom
//
FinishAtom: function () {
if (this.sup || this.sub) {
if (this.sup && this.sub && !this.atom) {
//
// right-justify super- and subscripts when they are before the atom
//
var n = Math.abs(this.sup.length-this.sub.length);
if (n) {
var zeros = "0000000000".substr(0,n);
var script = (this.sup.length > this.sub.length ? "sub" : "sup");
this[script] = "\\phantom{"+zeros+"}" + this[script];
}
}
if (!this.sup) {this.sup = "\\Space{0pt}{0pt}{.2em}"} // forces subscripts to align properly
this.tex += "^{"+this.sup+"}_{"+this.sub+"}";
this.sup = this.sub = "";
}
this.atom = false;
},
//
// Find a bracket group and handle C and T prefixes
//
GetBracket: function (c) {
if (this.string.charAt(this.i) !== "[") {return ""}
this.i++; var bracket = this.Find("]");
if (c === "C") {bracket = "\\ce{"+bracket+"}"} else
if (c === "T") {
if (!bracket.match(/^\{.*\}$/)) {bracket = "{"+bracket+"}"}
bracket = "\\text"+bracket;
};
return bracket;
},
//
// Check if the string matches a regular expression
// and move past it if so, returning the match
//
Match: function (regex) {
var match = regex.exec(this.string.substr(this.i));
if (match) {match = match[0]; this.i += match.length}
return match;
},
//
// Find a particular character, skipping over braced groups
//
Find: function (c) {
var m = this.string.length, i = this.i, braces = 0;
while (this.i < m) {
var C = this.string.charAt(this.i++);
if (C === c && braces === 0) {return this.string.substr(i,this.i-i-1)}
if (C === "{") {braces++} else
if (C === "}") {
if (braces) {braces--}
else {TEX.Error("Extra close brace or missing open brace")}
}
}
if (braces) {TEX.Error("Missing close brace")};
TEX.Error("Can't find closing "+c);
}
});
/***************************************************************************/
//
// Set up the macros for chemistry
//
MACROS.ce = 'CE';
MACROS.cf = 'CE';
MACROS.cee = 'CE';
//
// Include some missing arrows (some are hacks)
//
MACROS.xleftrightarrow = ['xArrow',0x2194,6,6];
MACROS.xrightleftharpoons = ['xArrow',0x21CC,5,7]; // FIXME: doesn't stretch in HTML-CSS output
MACROS.xRightleftharpoons = ['xArrow',0x21CC,5,7]; // FIXME: how should this be handled?
// FIXME: These don't work well in FF NativeMML mode
MACROS.longrightleftharpoons = ["Macro","\\stackrel{\\textstyle{{-}\\!\\!{\\rightharpoonup}}}{\\smash{{\\leftharpoondown}\\!\\!{-}}}"];
MACROS.longRightleftharpoons = ["Macro","\\stackrel{\\textstyle{-}\\!\\!{\\rightharpoonup}}{\\small\\smash\\leftharpoondown}"];
//
// Needed for \bond for the ~ forms
//
MACROS.tripledash = ["Macro","\\raise3mu{\\tiny\\text{-}\\kern2mu\\text{-}\\kern2mu\\text{-}}"];
TEX.Definitions.environment.CEstack = ['Array',null,null,null,'r',null,"0.001em",'T',1]
//
// Add \hyphen used in some mhchem examples
//
MACROS.hyphen = ["Macro","\\text{-}"];
TEX.Parse.Augment({
//
// Implements \ce and friends
//
CE: function (name) {
var arg = this.GetArgument(name);
var tex = CE(arg).Parse();
this.string = tex + this.string.substr(this.i); this.i = 0;
}
});
//
// Indicate that the extension is ready
//
MathJax.Hub.Startup.signal.Post("TeX mhchem Ready");
});
MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/mhchem.js");
|
src/svg-icons/hardware/keyboard-return.js
|
barakmitz/material-ui
|
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareKeyboardReturn = (props) => (
<SvgIcon {...props}>
<path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"/>
</SvgIcon>
);
HardwareKeyboardReturn = pure(HardwareKeyboardReturn);
HardwareKeyboardReturn.displayName = 'HardwareKeyboardReturn';
HardwareKeyboardReturn.muiName = 'SvgIcon';
export default HardwareKeyboardReturn;
|
investninja-web-ui-app/src/frontend/component/Carteira/Carteira.js
|
InvestNinja/InvestNinja-web-ui
|
import React from 'react';
import Input from 'react-toolbox/lib/input';
import DatePicker from 'react-toolbox/lib/date_picker';
import {Button, IconButton} from 'react-toolbox/lib/button';
export default class Carteira extends React.Component {
render () {
return (
<section>
<form onSubmit={this.props.adicionarCarteira} method="post">
<Input type='text' label='Código Carteira' name='codigoCarteira' value={this.props.codigoCarteira} onChange={this.props.setCodigoCarteira}/>
<Input type='text' label='Descrição Carteira' name='descricaoCarteira' value={this.props.descricaoCarteira} onChange={this.props.setDescricaoCarteira}/>
<Input type='number' label='Valor inicial da cota' name= 'cotaInicial' value={this.props.cotaInicial} onChange={this.props.setCotaInicial}/>
<Input type='number' pattern="^\d+(\.|\,)\d{2}$" label='Saldo Inicial' name= 'saldoInicial' value={this.props.saldoInicial} onChange={this.props.setSaldoInicial}/>
<DatePicker label='Data Inicial' name='DataInicial' locale='pt-br' value={this.props.dataInicial} onChange={this.props.setDataInicial}/>
<Button type="submit" icon='bookmark' label='Adicionar Carteira' raised primary />
</form>
</section>
);
}
}
|
examples/twisted/wamp/work/longpoll/jquery-1.10.2.min.js
|
wilblack/AutobahnPython
|
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery-1.10.2.min.map
*/
(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
|
ajax/libs/marker-animate-unobtrusive/0.2.7/vendor/markerwithlabel.terikon.js
|
wout/cdnjs
|
/**
* @name MarkerWithLabel for V3
* @version 1.1.10 [April 8, 2014]
* @author Gary Little (inspired by code from Marc Ridey of Google).
* @copyright Copyright 2012 Gary Little [gary at luxcentral.com]
* @fileoverview MarkerWithLabel extends the Google Maps JavaScript API V3
* <code>google.maps.Marker</code> class.
* <p>
* MarkerWithLabel allows you to define markers with associated labels. As you would expect,
* if the marker is draggable, so too will be the label. In addition, a marker with a label
* responds to all mouse events in the same manner as a regular marker. It also fires mouse
* events and "property changed" events just as a regular marker would. Version 1.1 adds
* support for the raiseOnDrag feature introduced in API V3.3.
* <p>
* If you drag a marker by its label, you can cancel the drag and return the marker to its
* original position by pressing the <code>Esc</code> key. This doesn't work if you drag the marker
* itself because this feature is not (yet) supported in the <code>google.maps.Marker</code> class.
*/
/*!
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*jslint browser:true */
/*global document,google */
/**
* @param {Function} childCtor Child class.
* @param {Function} parentCtor Parent class.
* @private
*/
function inherits(childCtor, parentCtor) {
/* @constructor */
function tempCtor() {}
tempCtor.prototype = parentCtor.prototype;
childCtor.superClass_ = parentCtor.prototype;
childCtor.prototype = new tempCtor();
/* @override */
childCtor.prototype.constructor = childCtor;
}
/**
* This constructor creates a label and associates it with a marker.
* It is for the private use of the MarkerWithLabel class.
* @constructor
* @param {Marker} marker The marker with which the label is to be associated.
* @param {string} crossURL The URL of the cross image =.
* @param {string} handCursor The URL of the hand cursor.
* @private
*/
function MarkerLabel_(marker, crossURL, handCursorURL) {
this.marker_ = marker;
this.handCursorURL_ = marker.handCursorURL;
this.labelDiv_ = document.createElement("div");
this.labelDiv_.style.cssText = "position: absolute; overflow: hidden;";
// Set up the DIV for handling mouse events in the label. This DIV forms a transparent veil
// in the "overlayMouseTarget" pane, a veil that covers just the label. This is done so that
// events can be captured even if the label is in the shadow of a google.maps.InfoWindow.
// Code is included here to ensure the veil is always exactly the same size as the label.
this.eventDiv_ = document.createElement("div");
this.eventDiv_.style.cssText = this.labelDiv_.style.cssText;
// This is needed for proper behavior on MSIE:
this.eventDiv_.setAttribute("onselectstart", "return false;");
this.eventDiv_.setAttribute("ondragstart", "return false;");
// Get the DIV for the "X" to be displayed when the marker is raised.
this.crossDiv_ = MarkerLabel_.getSharedCross(crossURL);
}
inherits(MarkerLabel_, google.maps.OverlayView);
/**
* Returns the DIV for the cross used when dragging a marker when the
* raiseOnDrag parameter set to true. One cross is shared with all markers.
* @param {string} crossURL The URL of the cross image =.
* @private
*/
MarkerLabel_.getSharedCross = function (crossURL) {
var div;
if (typeof MarkerLabel_.getSharedCross.crossDiv === "undefined") {
div = document.createElement("img");
div.style.cssText = "position: absolute; z-index: 1000002; display: none;";
// Hopefully Google never changes the standard "X" attributes:
div.style.marginLeft = "-8px";
div.style.marginTop = "-9px";
div.src = crossURL;
MarkerLabel_.getSharedCross.crossDiv = div;
}
return MarkerLabel_.getSharedCross.crossDiv;
};
/**
* Adds the DIV representing the label to the DOM. This method is called
* automatically when the marker's <code>setMap</code> method is called.
* @private
*/
MarkerLabel_.prototype.onAdd = function () {
var me = this;
var cMouseIsDown = false;
var cDraggingLabel = false;
var cSavedZIndex;
var cLatOffset, cLngOffset;
var cIgnoreClick;
var cRaiseEnabled;
var cStartPosition;
var cStartCenter;
// Constants:
var cRaiseOffset = 20;
var cDraggingCursor = "url(" + this.handCursorURL_ + ")";
// Stops all processing of an event.
//
var cAbortEvent = function (e) {
if (e.preventDefault) {
e.preventDefault();
}
e.cancelBubble = true;
if (e.stopPropagation) {
e.stopPropagation();
}
};
var cStopBounce = function () {
me.marker_.setAnimation(null);
};
this.getPanes().overlayImage.appendChild(this.labelDiv_);
this.getPanes().overlayMouseTarget.appendChild(this.eventDiv_);
// One cross is shared with all markers, so only add it once:
if (typeof MarkerLabel_.getSharedCross.processed === "undefined") {
this.getPanes().overlayImage.appendChild(this.crossDiv_);
MarkerLabel_.getSharedCross.processed = true;
}
var position_changed = this.marker_.ghostAnimationPosition !== undefined ? "ghostanimationposition_changed"
: this.marker_.animationPosition !== undefined ? "animationposition_changed"
: "position_changed";
this.listeners_ = [
google.maps.event.addDomListener(this.eventDiv_, "mouseover", function (e) {
if (me.marker_.getDraggable() || me.marker_.getClickable()) {
this.style.cursor = "pointer";
google.maps.event.trigger(me.marker_, "mouseover", e);
}
}),
google.maps.event.addDomListener(this.eventDiv_, "mouseout", function (e) {
if ((me.marker_.getDraggable() || me.marker_.getClickable()) && !cDraggingLabel) {
this.style.cursor = me.marker_.getCursor();
google.maps.event.trigger(me.marker_, "mouseout", e);
}
}),
google.maps.event.addDomListener(this.eventDiv_, "mousedown", function (e) {
cDraggingLabel = false;
if (me.marker_.getDraggable()) {
cMouseIsDown = true;
this.style.cursor = cDraggingCursor;
}
if (me.marker_.getDraggable() || me.marker_.getClickable()) {
google.maps.event.trigger(me.marker_, "mousedown", e);
cAbortEvent(e); // Prevent map pan when starting a drag on a label
}
}),
google.maps.event.addDomListener(document, "mouseup", function (mEvent) {
var position;
if (cMouseIsDown) {
cMouseIsDown = false;
me.eventDiv_.style.cursor = "pointer";
google.maps.event.trigger(me.marker_, "mouseup", mEvent);
}
if (cDraggingLabel) {
if (cRaiseEnabled) { // Lower the marker & label
position = me.getProjection().fromLatLngToDivPixel(me.marker_.getPosition());
position.y += cRaiseOffset;
me.marker_.setPosition(me.getProjection().fromDivPixelToLatLng(position));
// This is not the same bouncing style as when the marker portion is dragged,
// but it will have to do:
try { // Will fail if running Google Maps API earlier than V3.3
me.marker_.setAnimation(google.maps.Animation.BOUNCE);
setTimeout(cStopBounce, 1406);
} catch (e) {}
}
me.crossDiv_.style.display = "none";
me.marker_.setZIndex(cSavedZIndex);
cIgnoreClick = true; // Set flag to ignore the click event reported after a label drag
cDraggingLabel = false;
mEvent.latLng = me.marker_.getPosition();
google.maps.event.trigger(me.marker_, "dragend", mEvent);
}
}),
google.maps.event.addListener(me.marker_.getMap(), "mousemove", function (mEvent) {
var position;
if (cMouseIsDown) {
if (cDraggingLabel) {
// Change the reported location from the mouse position to the marker position:
mEvent.latLng = new google.maps.LatLng(mEvent.latLng.lat() - cLatOffset, mEvent.latLng.lng() - cLngOffset);
position = me.getProjection().fromLatLngToDivPixel(mEvent.latLng);
if (cRaiseEnabled) {
me.crossDiv_.style.left = position.x + "px";
me.crossDiv_.style.top = position.y + "px";
me.crossDiv_.style.display = "";
position.y -= cRaiseOffset;
}
me.marker_.setPosition(me.getProjection().fromDivPixelToLatLng(position));
if (cRaiseEnabled) { // Don't raise the veil; this hack needed to make MSIE act properly
me.eventDiv_.style.top = (position.y + cRaiseOffset) + "px";
}
google.maps.event.trigger(me.marker_, "drag", mEvent);
} else {
// Calculate offsets from the click point to the marker position:
cLatOffset = mEvent.latLng.lat() - me.marker_.getPosition().lat();
cLngOffset = mEvent.latLng.lng() - me.marker_.getPosition().lng();
cSavedZIndex = me.marker_.getZIndex();
cStartPosition = me.marker_.getPosition();
cStartCenter = me.marker_.getMap().getCenter();
cRaiseEnabled = me.marker_.get("raiseOnDrag");
cDraggingLabel = true;
me.marker_.setZIndex(1000000); // Moves the marker & label to the foreground during a drag
mEvent.latLng = me.marker_.getPosition();
google.maps.event.trigger(me.marker_, "dragstart", mEvent);
}
}
}),
google.maps.event.addDomListener(document, "keydown", function (e) {
if (cDraggingLabel) {
if (e.keyCode === 27) { // Esc key
cRaiseEnabled = false;
me.marker_.setPosition(cStartPosition);
me.marker_.getMap().setCenter(cStartCenter);
google.maps.event.trigger(document, "mouseup", e);
}
}
}),
google.maps.event.addDomListener(this.eventDiv_, "click", function (e) {
if (me.marker_.getDraggable() || me.marker_.getClickable()) {
if (cIgnoreClick) { // Ignore the click reported when a label drag ends
cIgnoreClick = false;
} else {
google.maps.event.trigger(me.marker_, "click", e);
cAbortEvent(e); // Prevent click from being passed on to map
}
}
}),
google.maps.event.addDomListener(this.eventDiv_, "dblclick", function (e) {
if (me.marker_.getDraggable() || me.marker_.getClickable()) {
google.maps.event.trigger(me.marker_, "dblclick", e);
cAbortEvent(e); // Prevent map zoom when double-clicking on a label
}
}),
google.maps.event.addListener(this.marker_, "dragstart", function (mEvent) {
if (!cDraggingLabel) {
cRaiseEnabled = this.get("raiseOnDrag");
}
}),
google.maps.event.addListener(this.marker_, "drag", function (mEvent) {
if (!cDraggingLabel) {
if (cRaiseEnabled) {
me.setPosition(cRaiseOffset);
// During a drag, the marker's z-index is temporarily set to 1000000 to
// ensure it appears above all other markers. Also set the label's z-index
// to 1000000 (plus or minus 1 depending on whether the label is supposed
// to be above or below the marker).
me.labelDiv_.style.zIndex = 1000000 + (this.get("labelInBackground") ? -1 : +1);
}
}
}),
google.maps.event.addListener(this.marker_, "dragend", function (mEvent) {
if (!cDraggingLabel) {
if (cRaiseEnabled) {
me.setPosition(0); // Also restores z-index of label
}
}
}),
google.maps.event.addListener(this.marker_, position_changed, function () {
me.setPosition();
}),
google.maps.event.addListener(this.marker_, "zindex_changed", function () {
me.setZIndex();
}),
google.maps.event.addListener(this.marker_, "visible_changed", function () {
me.setVisible();
}),
google.maps.event.addListener(this.marker_, "labelvisible_changed", function () {
me.setVisible();
}),
google.maps.event.addListener(this.marker_, "title_changed", function () {
me.setTitle();
}),
google.maps.event.addListener(this.marker_, "labelcontent_changed", function () {
me.setContent();
}),
google.maps.event.addListener(this.marker_, "labelanchor_changed", function () {
me.setAnchor();
}),
google.maps.event.addListener(this.marker_, "labelclass_changed", function () {
me.setStyles();
}),
google.maps.event.addListener(this.marker_, "labelstyle_changed", function () {
me.setStyles();
})
];
};
/**
* Removes the DIV for the label from the DOM. It also removes all event handlers.
* This method is called automatically when the marker's <code>setMap(null)</code>
* method is called.
* @private
*/
MarkerLabel_.prototype.onRemove = function () {
var i;
this.labelDiv_.parentNode.removeChild(this.labelDiv_);
this.eventDiv_.parentNode.removeChild(this.eventDiv_);
// Remove event listeners:
for (i = 0; i < this.listeners_.length; i++) {
google.maps.event.removeListener(this.listeners_[i]);
}
};
/**
* Draws the label on the map.
* @private
*/
MarkerLabel_.prototype.draw = function () {
this.setContent();
this.setTitle();
this.setStyles();
};
/**
* Sets the content of the label.
* The content can be plain text or an HTML DOM node.
* @private
*/
MarkerLabel_.prototype.setContent = function () {
var content = this.marker_.get("labelContent");
if (typeof content.nodeType === "undefined") {
this.labelDiv_.innerHTML = content;
this.eventDiv_.innerHTML = this.labelDiv_.innerHTML;
} else {
this.labelDiv_.innerHTML = ""; // Remove current content
this.labelDiv_.appendChild(content);
content = content.cloneNode(true);
this.eventDiv_.innerHTML = ""; // Remove current content
this.eventDiv_.appendChild(content);
}
};
/**
* Sets the content of the tool tip for the label. It is
* always set to be the same as for the marker itself.
* @private
*/
MarkerLabel_.prototype.setTitle = function () {
this.eventDiv_.title = this.marker_.getTitle() || "";
};
/**
* Sets the style of the label by setting the style sheet and applying
* other specific styles requested.
* @private
*/
MarkerLabel_.prototype.setStyles = function () {
var i, labelStyle;
// Apply style values from the style sheet defined in the labelClass parameter:
this.labelDiv_.className = this.marker_.get("labelClass");
this.eventDiv_.className = this.labelDiv_.className;
// Clear existing inline style values:
this.labelDiv_.style.cssText = "";
this.eventDiv_.style.cssText = "";
// Apply style values defined in the labelStyle parameter:
labelStyle = this.marker_.get("labelStyle");
for (i in labelStyle) {
if (labelStyle.hasOwnProperty(i)) {
this.labelDiv_.style[i] = labelStyle[i];
this.eventDiv_.style[i] = labelStyle[i];
}
}
this.setMandatoryStyles();
};
/**
* Sets the mandatory styles to the DIV representing the label as well as to the
* associated event DIV. This includes setting the DIV position, z-index, and visibility.
* @private
*/
MarkerLabel_.prototype.setMandatoryStyles = function () {
this.labelDiv_.style.position = "absolute";
this.labelDiv_.style.overflow = "hidden";
// Make sure the opacity setting causes the desired effect on MSIE:
if (typeof this.labelDiv_.style.opacity !== "undefined" && this.labelDiv_.style.opacity !== "") {
this.labelDiv_.style.MsFilter = "\"progid:DXImageTransform.Microsoft.Alpha(opacity=" + (this.labelDiv_.style.opacity * 100) + ")\"";
this.labelDiv_.style.filter = "alpha(opacity=" + (this.labelDiv_.style.opacity * 100) + ")";
}
this.eventDiv_.style.position = this.labelDiv_.style.position;
this.eventDiv_.style.overflow = this.labelDiv_.style.overflow;
this.eventDiv_.style.opacity = 0.01; // Don't use 0; DIV won't be clickable on MSIE
this.eventDiv_.style.MsFilter = "\"progid:DXImageTransform.Microsoft.Alpha(opacity=1)\"";
this.eventDiv_.style.filter = "alpha(opacity=1)"; // For MSIE
this.setAnchor();
this.setPosition(); // This also updates z-index, if necessary.
this.setVisible();
};
/**
* Sets the anchor point of the label.
* @private
*/
MarkerLabel_.prototype.setAnchor = function () {
var anchor = this.marker_.get("labelAnchor");
this.labelDiv_.style.marginLeft = -anchor.x + "px";
this.labelDiv_.style.marginTop = -anchor.y + "px";
this.eventDiv_.style.marginLeft = -anchor.x + "px";
this.eventDiv_.style.marginTop = -anchor.y + "px";
};
/**
* Sets the position of the label. The z-index is also updated, if necessary.
* @private
*/
MarkerLabel_.prototype.setPosition = function (yOffset) {
var getPosition = this.marker_.getGhostAnimationPosition || this.marker_.getAnimationPosition || this.marker_.getPosition;
var position = this.getProjection().fromLatLngToDivPixel(getPosition.call(this.marker_));
if (typeof yOffset === "undefined") {
yOffset = 0;
}
this.labelDiv_.style.left = Math.round(position.x) + "px";
this.labelDiv_.style.top = Math.round(position.y - yOffset) + "px";
this.eventDiv_.style.left = this.labelDiv_.style.left;
this.eventDiv_.style.top = this.labelDiv_.style.top;
this.setZIndex();
};
/**
* Sets the z-index of the label. If the marker's z-index property has not been defined, the z-index
* of the label is set to the vertical coordinate of the label. This is in keeping with the default
* stacking order for Google Maps: markers to the south are in front of markers to the north.
* @private
*/
MarkerLabel_.prototype.setZIndex = function () {
var zAdjust = (this.marker_.get("labelInBackground") ? -1 : +1);
if (typeof this.marker_.getZIndex() === "undefined") {
this.labelDiv_.style.zIndex = parseInt(this.labelDiv_.style.top, 10) + zAdjust;
this.eventDiv_.style.zIndex = this.labelDiv_.style.zIndex;
} else {
this.labelDiv_.style.zIndex = this.marker_.getZIndex() + zAdjust;
this.eventDiv_.style.zIndex = this.labelDiv_.style.zIndex;
}
};
/**
* Sets the visibility of the label. The label is visible only if the marker itself is
* visible (i.e., its visible property is true) and the labelVisible property is true.
* @private
*/
MarkerLabel_.prototype.setVisible = function () {
if (this.marker_.get("labelVisible")) {
this.labelDiv_.style.display = this.marker_.getVisible() ? "block" : "none";
} else {
this.labelDiv_.style.display = "none";
}
this.eventDiv_.style.display = this.labelDiv_.style.display;
};
/**
* @name MarkerWithLabelOptions
* @class This class represents the optional parameter passed to the {@link MarkerWithLabel} constructor.
* The properties available are the same as for <code>google.maps.Marker</code> with the addition
* of the properties listed below. To change any of these additional properties after the labeled
* marker has been created, call <code>google.maps.Marker.set(propertyName, propertyValue)</code>.
* <p>
* When any of these properties changes, a property changed event is fired. The names of these
* events are derived from the name of the property and are of the form <code>propertyname_changed</code>.
* For example, if the content of the label changes, a <code>labelcontent_changed</code> event
* is fired.
* <p>
* @property {string|Node} [labelContent] The content of the label (plain text or an HTML DOM node).
* @property {Point} [labelAnchor] By default, a label is drawn with its anchor point at (0,0) so
* that its top left corner is positioned at the anchor point of the associated marker. Use this
* property to change the anchor point of the label. For example, to center a 50px-wide label
* beneath a marker, specify a <code>labelAnchor</code> of <code>google.maps.Point(25, 0)</code>.
* (Note: x-values increase to the right and y-values increase to the top.)
* @property {string} [labelClass] The name of the CSS class defining the styles for the label.
* Note that style values for <code>position</code>, <code>overflow</code>, <code>top</code>,
* <code>left</code>, <code>zIndex</code>, <code>display</code>, <code>marginLeft</code>, and
* <code>marginTop</code> are ignored; these styles are for internal use only.
* @property {Object} [labelStyle] An object literal whose properties define specific CSS
* style values to be applied to the label. Style values defined here override those that may
* be defined in the <code>labelClass</code> style sheet. If this property is changed after the
* label has been created, all previously set styles (except those defined in the style sheet)
* are removed from the label before the new style values are applied.
* Note that style values for <code>position</code>, <code>overflow</code>, <code>top</code>,
* <code>left</code>, <code>zIndex</code>, <code>display</code>, <code>marginLeft</code>, and
* <code>marginTop</code> are ignored; these styles are for internal use only.
* @property {boolean} [labelInBackground] A flag indicating whether a label that overlaps its
* associated marker should appear in the background (i.e., in a plane below the marker).
* The default is <code>false</code>, which causes the label to appear in the foreground.
* @property {boolean} [labelVisible] A flag indicating whether the label is to be visible.
* The default is <code>true</code>. Note that even if <code>labelVisible</code> is
* <code>true</code>, the label will <i>not</i> be visible unless the associated marker is also
* visible (i.e., unless the marker's <code>visible</code> property is <code>true</code>).
* @property {boolean} [raiseOnDrag] A flag indicating whether the label and marker are to be
* raised when the marker is dragged. The default is <code>true</code>. If a draggable marker is
* being created and a version of Google Maps API earlier than V3.3 is being used, this property
* must be set to <code>false</code>.
* @property {boolean} [optimized] A flag indicating whether rendering is to be optimized for the
* marker. <b>Important: The optimized rendering technique is not supported by MarkerWithLabel,
* so the value of this parameter is always forced to <code>false</code>.
* @property {string} [crossImage="http://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png"]
* The URL of the cross image to be displayed while dragging a marker.
* @property {string} [handCursor="http://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur"]
* The URL of the cursor to be displayed while dragging a marker.
*/
/**
* Creates a MarkerWithLabel with the options specified in {@link MarkerWithLabelOptions}.
* @constructor
* @param {MarkerWithLabelOptions} [opt_options] The optional parameters.
*/
function MarkerWithLabel(opt_options) {
opt_options = opt_options || {};
opt_options.labelContent = opt_options.labelContent || "";
opt_options.labelAnchor = opt_options.labelAnchor || new google.maps.Point(0, 0);
opt_options.labelClass = opt_options.labelClass || "markerLabels";
opt_options.labelStyle = opt_options.labelStyle || {};
opt_options.labelInBackground = opt_options.labelInBackground || false;
if (typeof opt_options.labelVisible === "undefined") {
opt_options.labelVisible = true;
}
if (typeof opt_options.raiseOnDrag === "undefined") {
opt_options.raiseOnDrag = true;
}
if (typeof opt_options.clickable === "undefined") {
opt_options.clickable = true;
}
if (typeof opt_options.draggable === "undefined") {
opt_options.draggable = false;
}
if (typeof opt_options.optimized === "undefined") {
opt_options.optimized = false;
}
opt_options.crossImage = opt_options.crossImage || "http" + (document.location.protocol === "https:" ? "s" : "") + "://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png";
opt_options.handCursor = opt_options.handCursor || "http" + (document.location.protocol === "https:" ? "s" : "") + "://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur";
opt_options.optimized = false; // Optimized rendering is not supported
this.label = new MarkerLabel_(this, opt_options.crossImage, opt_options.handCursor); // Bind the label to the marker
// Call the parent constructor. It calls Marker.setValues to initialize, so all
// the new parameters are conveniently saved and can be accessed with get/set.
// Marker.set triggers a property changed event (called "propertyname_changed")
// that the marker label listens for in order to react to state changes.
google.maps.Marker.apply(this, arguments);
}
inherits(MarkerWithLabel, google.maps.Marker);
/**
* Overrides the standard Marker setMap function.
* @param {Map} theMap The map to which the marker is to be added.
* @private
*/
MarkerWithLabel.prototype.setMap = function (theMap) {
// Call the inherited function...
google.maps.Marker.prototype.setMap.apply(this, arguments);
// ... then deal with the label:
this.label.setMap(theMap);
};
|
dawn/renderer/components/Peripheral.js
|
pioneers/PieCentral
|
/**
* Outer Component for Individual Peripherals
*
* Sets common interface for type-specific components
* Wraps such components in ListGroupItem for PeripheralList.js
*/
import React from 'react';
import PropTypes from 'prop-types';
import { ListGroupItem } from 'react-bootstrap';
import { PeripheralTypes } from '../constants/Constants';
import BooleanSensor from './peripherals/BooleanSensor';
import GenericPeripheral from './peripherals/GenericPeripheral';
import GameValues from './peripherals/GameValues';
import Motor from './peripherals/Motor';
// Mapping between peripheral types and components
const typesToComponents = {};
typesToComponents[PeripheralTypes.MOTOR_SCALAR] = Motor;
typesToComponents[PeripheralTypes.SENSOR_BOOLEAN] = BooleanSensor;
typesToComponents[PeripheralTypes.LimitSwitch] = BooleanSensor;
typesToComponents[PeripheralTypes.GameValues] = GameValues;
const Peripheral = (props) => {
const ActualPeripheral = typesToComponents[props.device_type] || GenericPeripheral;
return (
<ListGroupItem style={{ padding: '0px 0px 15px 0px', border: 'none' }}>
<ActualPeripheral{...props} />
</ListGroupItem>
);
};
Peripheral.propTypes = {
device_type: PropTypes.string.isRequired,
};
export default Peripheral;
|
ajax/libs/yui/3.8.0/scrollview-base/scrollview-base-debug.js
|
iamso/cdnjs
|
YUI.add('scrollview-base', function (Y, NAME) {
/**
* The scrollview-base module provides a basic ScrollView Widget, without scrollbar indicators
*
* @module scrollview
* @submodule scrollview-base
*/
var getClassName = Y.ClassNameManager.getClassName,
DOCUMENT = Y.config.doc,
WINDOW = Y.config.win,
IE = Y.UA.ie,
NATIVE_TRANSITIONS = Y.Transition.useNative,
vendorPrefix = Y.Transition._VENDOR_PREFIX, // Todo: This is a private property, and alternative approaches should be investigated
SCROLLVIEW = 'scrollview',
CLASS_NAMES = {
vertical: getClassName(SCROLLVIEW, 'vert'),
horizontal: getClassName(SCROLLVIEW, 'horiz')
},
EV_SCROLL_END = 'scrollEnd',
FLICK = 'flick',
DRAG = 'drag',
MOUSEWHEEL = 'mousewheel',
UI = 'ui',
TOP = 'top',
RIGHT = 'right',
BOTTOM = 'bottom',
LEFT = 'left',
PX = 'px',
AXIS = 'axis',
SCROLL_Y = 'scrollY',
SCROLL_X = 'scrollX',
BOUNCE = 'bounce',
DISABLED = 'disabled',
DECELERATION = 'deceleration',
DIM_X = 'x',
DIM_Y = 'y',
BOUNDING_BOX = 'boundingBox',
CONTENT_BOX = 'contentBox',
GESTURE_MOVE = 'gesturemove',
START = 'start',
END = 'end',
EMPTY = '',
ZERO = '0s',
SNAP_DURATION = 'snapDuration',
SNAP_EASING = 'snapEasing',
EASING = 'easing',
FRAME_DURATION = 'frameDuration',
BOUNCE_RANGE = 'bounceRange',
_constrain = function (val, min, max) {
return Math.min(Math.max(val, min), max);
};
/**
* ScrollView provides a scrollable widget, supporting flick gestures,
* across both touch and mouse based devices.
*
* @class ScrollView
* @param config {Object} Object literal with initial attribute values
* @extends Widget
* @constructor
*/
function ScrollView() {
ScrollView.superclass.constructor.apply(this, arguments);
}
Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
// *** Y.ScrollView prototype
/**
* Flag driving whether or not we should try and force H/W acceleration when transforming. Currently enabled by default for Webkit.
* Used by the _transform method.
*
* @property _forceHWTransforms
* @type boolean
* @protected
*/
_forceHWTransforms: Y.UA.webkit ? true : false,
/**
* <p>Used to control whether or not ScrollView's internal
* gesturemovestart, gesturemove and gesturemoveend
* event listeners should preventDefault. The value is an
* object, with "start", "move" and "end" properties used to
* specify which events should preventDefault and which shouldn't:</p>
*
* <pre>
* {
* start: false,
* move: true,
* end: false
* }
* </pre>
*
* <p>The default values are set up in order to prevent panning,
* on touch devices, while allowing click listeners on elements inside
* the ScrollView to be notified as expected.</p>
*
* @property _prevent
* @type Object
* @protected
*/
_prevent: {
start: false,
move: true,
end: false
},
/**
* Contains the distance (postive or negative) in pixels by which
* the scrollview was last scrolled. This is useful when setting up
* click listeners on the scrollview content, which on mouse based
* devices are always fired, even after a drag/flick.
*
* <p>Touch based devices don't currently fire a click event,
* if the finger has been moved (beyond a threshold) so this
* check isn't required, if working in a purely touch based environment</p>
*
* @property lastScrolledAmt
* @type Number
* @public
* @default 0
*/
lastScrolledAmt: 0,
/**
* Designated initializer
*
* @method initializer
* @param {config} Configuration object for the plugin
*/
initializer: function (config) {
var sv = this;
// Cache these values, since they aren't going to change.
sv._bb = sv.get(BOUNDING_BOX);
sv._cb = sv.get(CONTENT_BOX);
// Cache some attributes
sv._cAxis = sv.get(AXIS);
sv._cBounce = sv.get(BOUNCE);
sv._cBounceRange = sv.get(BOUNCE_RANGE);
sv._cDeceleration = sv.get(DECELERATION);
sv._cFrameDuration = sv.get(FRAME_DURATION);
},
/**
* bindUI implementation
*
* Hooks up events for the widget
* @method bindUI
*/
bindUI: function () {
var sv = this;
// Bind interaction listers
sv._bindFlick(sv.get(FLICK));
sv._bindDrag(sv.get(DRAG));
sv._bindMousewheel(true);
// Bind change events
sv._bindAttrs();
// IE SELECT HACK. See if we can do this non-natively and in the gesture for a future release.
if (IE) {
sv._fixIESelect(sv._bb, sv._cb);
}
// Set any deprecated static properties
if (ScrollView.SNAP_DURATION) {
sv.set(SNAP_DURATION, ScrollView.SNAP_DURATION);
}
if (ScrollView.SNAP_EASING) {
sv.set(SNAP_EASING, ScrollView.SNAP_EASING);
}
if (ScrollView.EASING) {
sv.set(EASING, ScrollView.EASING);
}
if (ScrollView.FRAME_STEP) {
sv.set(FRAME_DURATION, ScrollView.FRAME_STEP);
}
if (ScrollView.BOUNCE_RANGE) {
sv.set(BOUNCE_RANGE, ScrollView.BOUNCE_RANGE);
}
// Recalculate dimension properties
// TODO: This should be throttled.
// Y.one(WINDOW).after('resize', sv._afterDimChange, sv);
},
/**
* Bind event listeners
*
* @method _bindAttrs
* @private
*/
_bindAttrs: function () {
var sv = this,
scrollChangeHandler = sv._afterScrollChange,
dimChangeHandler = sv._afterDimChange;
// Bind any change event listeners
sv.after({
'scrollEnd': sv._afterScrollEnd,
'disabledChange': sv._afterDisabledChange,
'flickChange': sv._afterFlickChange,
'dragChange': sv._afterDragChange,
'axisChange': sv._afterAxisChange,
'scrollYChange': scrollChangeHandler,
'scrollXChange': scrollChangeHandler,
'heightChange': dimChangeHandler,
'widthChange': dimChangeHandler
});
},
/**
* Bind (or unbind) gesture move listeners required for drag support
*
* @method _bindDrag
* @param drag {boolean} If true, the method binds listener to enable drag (gesturemovestart). If false, the method unbinds gesturemove listeners for drag support.
* @private
*/
_bindDrag: function (drag) {
var sv = this,
bb = sv._bb;
// Unbind any previous 'drag' listeners
bb.detach(DRAG + '|*');
if (drag) {
bb.on(DRAG + '|' + GESTURE_MOVE + START, Y.bind(sv._onGestureMoveStart, sv));
}
},
/**
* Bind (or unbind) flick listeners.
*
* @method _bindFlick
* @param flick {Object|boolean} If truthy, the method binds listeners for flick support. If false, the method unbinds flick listeners.
* @private
*/
_bindFlick: function (flick) {
var sv = this,
bb = sv._bb;
// Unbind any previous 'flick' listeners
bb.detach(FLICK + '|*');
if (flick) {
bb.on(FLICK + '|' + FLICK, Y.bind(sv._flick, sv), flick);
// Rebind Drag, becuase _onGestureMoveEnd always has to fire -after- _flick
sv._bindDrag(sv.get(DRAG));
}
},
/**
* Bind (or unbind) mousewheel listeners.
*
* @method _bindMousewheel
* @param mousewheel {Object|boolean} If truthy, the method binds listeners for mousewheel support. If false, the method unbinds mousewheel listeners.
* @private
*/
_bindMousewheel: function (mousewheel) {
var sv = this,
bb = sv._bb;
// Unbind any previous 'mousewheel' listeners
// TODO: This doesn't actually appear to work properly. Fix. #2532743
bb.detach(MOUSEWHEEL + '|*');
// Only enable for vertical scrollviews
if (mousewheel) {
// Bound to document, because that's where mousewheel events fire off of.
Y.one(DOCUMENT).on(MOUSEWHEEL, Y.bind(sv._mousewheel, sv));
}
},
/**
* syncUI implementation.
*
* Update the scroll position, based on the current value of scrollX/scrollY.
*
* @method syncUI
*/
syncUI: function () {
var sv = this,
scrollDims = sv._getScrollDims(),
width = scrollDims.offsetWidth,
height = scrollDims.offsetHeight,
scrollWidth = scrollDims.scrollWidth,
scrollHeight = scrollDims.scrollHeight;
// If the axis is undefined, auto-calculate it
if (sv._cAxis === undefined) {
// This should only ever be run once (for now).
// In the future SV might post-load axis changes
sv._cAxis = {
x: (scrollWidth > width),
y: (scrollHeight > height)
};
sv._set(AXIS, sv._cAxis);
}
// get text direction on or inherited by scrollview node
sv.rtl = (sv._cb.getComputedStyle('direction') === 'rtl');
// Cache the disabled value
sv._cDisabled = sv.get(DISABLED);
// Run this to set initial values
sv._uiDimensionsChange();
// If we're out-of-bounds, snap back.
if (sv._isOutOfBounds()) {
sv._snapBack();
}
},
/**
* Utility method to obtain widget dimensions
*
* @method _getScrollDims
* @returns {Object} The offsetWidth, offsetHeight, scrollWidth and scrollHeight as an array: [offsetWidth, offsetHeight, scrollWidth, scrollHeight]
* @private
*/
_getScrollDims: function () {
var sv = this,
cb = sv._cb,
bb = sv._bb,
TRANS = ScrollView._TRANSITION,
// Ideally using CSSMatrix - don't think we have it normalized yet though.
// origX = (new WebKitCSSMatrix(cb.getComputedStyle("transform"))).e,
// origY = (new WebKitCSSMatrix(cb.getComputedStyle("transform"))).f,
origX = sv.get(SCROLL_X),
origY = sv.get(SCROLL_Y),
origHWTransform,
dims;
// TODO: Is this OK? Just in case it's called 'during' a transition.
if (NATIVE_TRANSITIONS) {
cb.setStyle(TRANS.DURATION, ZERO);
cb.setStyle(TRANS.PROPERTY, EMPTY);
}
origHWTransform = sv._forceHWTransforms;
sv._forceHWTransforms = false; // the z translation was causing issues with picking up accurate scrollWidths in Chrome/Mac.
sv._moveTo(cb, 0, 0);
dims = {
'offsetWidth': bb.get('offsetWidth'),
'offsetHeight': bb.get('offsetHeight'),
'scrollWidth': bb.get('scrollWidth'),
'scrollHeight': bb.get('scrollHeight')
};
sv._moveTo(cb, -(origX), -(origY));
sv._forceHWTransforms = origHWTransform;
return dims;
},
/**
* This method gets invoked whenever the height or width attributes change,
* allowing us to determine which scrolling axes need to be enabled.
*
* @method _uiDimensionsChange
* @protected
*/
_uiDimensionsChange: function () {
var sv = this,
bb = sv._bb,
scrollDims = sv._getScrollDims(),
width = scrollDims.offsetWidth,
height = scrollDims.offsetHeight,
scrollWidth = scrollDims.scrollWidth,
scrollHeight = scrollDims.scrollHeight,
rtl = sv.rtl,
svAxis = sv._cAxis;
if (svAxis && svAxis.x) {
bb.addClass(CLASS_NAMES.horizontal);
}
if (svAxis && svAxis.y) {
bb.addClass(CLASS_NAMES.vertical);
}
/**
* Internal state, defines the minimum amount that the scrollview can be scrolled along the X axis
*
* @property _minScrollX
* @type number
* @protected
*/
sv._minScrollX = (rtl) ? Math.min(0, -(scrollWidth - width)) : 0;
/**
* Internal state, defines the maximum amount that the scrollview can be scrolled along the X axis
*
* @property _maxScrollX
* @type number
* @protected
*/
sv._maxScrollX = (rtl) ? 0 : Math.max(0, scrollWidth - width);
/**
* Internal state, defines the minimum amount that the scrollview can be scrolled along the Y axis
*
* @property _minScrollY
* @type number
* @protected
*/
sv._minScrollY = 0;
/**
* Internal state, defines the maximum amount that the scrollview can be scrolled along the Y axis
*
* @property _maxScrollY
* @type number
* @protected
*/
sv._maxScrollY = Math.max(0, scrollHeight - height);
},
/**
* Scroll the element to a given xy coordinate
*
* @method scrollTo
* @param x {Number} The x-position to scroll to. (null for no movement)
* @param y {Number} The y-position to scroll to. (null for no movement)
* @param {Number} [duration] ms of the scroll animation. (default is 0)
* @param {String} [easing] An easing equation if duration is set. (default is `easing` attribute)
* @param {String} [node] The node to transform. Setting this can be useful in dual-axis paginated instances. (default is the instance's contentBox)
*/
scrollTo: function (x, y, duration, easing, node) {
// Check to see if widget is disabled
if (this._cDisabled) {
return;
}
var sv = this,
cb = sv._cb,
TRANS = ScrollView._TRANSITION,
callback = Y.bind(sv._onTransEnd, sv), // @Todo : cache this
newX = 0,
newY = 0,
transition = {},
transform;
// default the optional arguments
duration = duration || 0;
easing = easing || sv.get(EASING); // @TODO: Cache this
node = node || cb;
if (x !== null) {
sv.set(SCROLL_X, x, {src:UI});
newX = -(x);
}
if (y !== null) {
sv.set(SCROLL_Y, y, {src:UI});
newY = -(y);
}
transform = sv._transform(newX, newY);
if (NATIVE_TRANSITIONS) {
// ANDROID WORKAROUND - try and stop existing transition, before kicking off new one.
node.setStyle(TRANS.DURATION, ZERO).setStyle(TRANS.PROPERTY, EMPTY);
}
// Move
if (duration === 0) {
if (NATIVE_TRANSITIONS) {
node.setStyle('transform', transform);
}
else {
// TODO: If both set, batch them in the same update
// Update: Nope, setStyles() just loops through each property and applies it.
if (x !== null) {
node.setStyle(LEFT, newX + PX);
}
if (y !== null) {
node.setStyle(TOP, newY + PX);
}
}
}
// Animate
else {
transition.easing = easing;
transition.duration = duration / 1000;
if (NATIVE_TRANSITIONS) {
transition.transform = transform;
}
else {
transition.left = newX + PX;
transition.top = newY + PX;
}
node.transition(transition, callback);
}
},
/**
* Utility method, to create the translate transform string with the
* x, y translation amounts provided.
*
* @method _transform
* @param {Number} x Number of pixels to translate along the x axis
* @param {Number} y Number of pixels to translate along the y axis
* @private
*/
_transform: function (x, y) {
// TODO: Would we be better off using a Matrix for this?
var prop = 'translate(' + x + 'px, ' + y + 'px)';
if (this._forceHWTransforms) {
prop += ' translateZ(0)';
}
return prop;
},
/**
* Utility method, to move the given element to the given xy position
*
* @method _moveTo
* @param node {Node} The node to move
* @param x {Number} The x-position to move to
* @param y {Number} The y-position to move to
* @private
*/
_moveTo : function(node, x, y) {
if (NATIVE_TRANSITIONS) {
node.setStyle('transform', this._transform(x, y));
} else {
node.setStyle(LEFT, x + PX);
node.setStyle(TOP, y + PX);
}
},
/**
* Content box transition callback
*
* @method _onTransEnd
* @param {Event.Facade} e The event facade
* @private
*/
_onTransEnd: function (e) {
var sv = this;
/**
* Notification event fired at the end of a scroll transition
*
* @event scrollEnd
* @param e {EventFacade} The default event facade.
*/
sv.fire(EV_SCROLL_END);
},
/**
* gesturemovestart event handler
*
* @method _onGestureMoveStart
* @param e {Event.Facade} The gesturemovestart event facade
* @private
*/
_onGestureMoveStart: function (e) {
if (this._cDisabled) {
return false;
}
var sv = this,
bb = sv._bb,
currentX = sv.get(SCROLL_X),
currentY = sv.get(SCROLL_Y),
clientX = e.clientX,
clientY = e.clientY;
if (sv._prevent.start) {
e.preventDefault();
}
// if a flick animation is in progress, cancel it
if (sv._flickAnim) {
// Cancel and delete sv._flickAnim
sv._flickAnim.cancel();
delete sv._flickAnim;
sv._onTransEnd();
}
// TODO: Review if neccesary (#2530129)
e.stopPropagation();
// Reset lastScrolledAmt
sv.lastScrolledAmt = 0;
// Stores data for this gesture cycle. Cleaned up later
sv._gesture = {
// Will hold the axis value
axis: null,
// The current attribute values
startX: currentX,
startY: currentY,
// The X/Y coordinates where the event began
startClientX: clientX,
startClientY: clientY,
// The X/Y coordinates where the event will end
endClientX: null,
endClientY: null,
// The current delta of the event
deltaX: null,
deltaY: null,
// Will be populated for flicks
flick: null,
// Create some listeners for the rest of the gesture cycle
onGestureMove: bb.on(DRAG + '|' + GESTURE_MOVE, Y.bind(sv._onGestureMove, sv)),
// @TODO: Don't bind gestureMoveEnd if it's a Flick?
onGestureMoveEnd: bb.on(DRAG + '|' + GESTURE_MOVE + END, Y.bind(sv._onGestureMoveEnd, sv))
};
},
/**
* gesturemove event handler
*
* @method _onGestureMove
* @param e {Event.Facade} The gesturemove event facade
* @private
*/
_onGestureMove: function (e) {
var sv = this,
gesture = sv._gesture,
svAxis = sv._cAxis,
svAxisX = svAxis.x,
svAxisY = svAxis.y,
startX = gesture.startX,
startY = gesture.startY,
startClientX = gesture.startClientX,
startClientY = gesture.startClientY,
clientX = e.clientX,
clientY = e.clientY;
if (sv._prevent.move) {
e.preventDefault();
}
gesture.deltaX = startClientX - clientX;
gesture.deltaY = startClientY - clientY;
// Determine if this is a vertical or horizontal movement
// @TODO: This is crude, but it works. Investigate more intelligent ways to detect intent
if (gesture.axis === null) {
gesture.axis = (Math.abs(gesture.deltaX) > Math.abs(gesture.deltaY)) ? DIM_X : DIM_Y;
}
// Move X or Y. @TODO: Move both if dualaxis.
if (gesture.axis === DIM_X && svAxisX) {
sv.set(SCROLL_X, startX + gesture.deltaX);
}
else if (gesture.axis === DIM_Y && svAxisY) {
sv.set(SCROLL_Y, startY + gesture.deltaY);
}
},
/**
* gesturemoveend event handler
*
* @method _onGestureMoveEnd
* @param e {Event.Facade} The gesturemoveend event facade
* @private
*/
_onGestureMoveEnd: function (e) {
var sv = this,
gesture = sv._gesture,
flick = gesture.flick,
clientX = e.clientX,
clientY = e.clientY;
if (sv._prevent.end) {
e.preventDefault();
}
// Store the end X/Y coordinates
gesture.endClientX = clientX;
gesture.endClientY = clientY;
// Cleanup the event handlers
gesture.onGestureMove.detach();
gesture.onGestureMoveEnd.detach();
// If this wasn't a flick, wrap up the gesture cycle
if (!flick) {
// @TODO: Be more intelligent about this. Look at the Flick attribute to see
// if it is safe to assume _flick did or didn't fire.
// Then, the order _flick and _onGestureMoveEnd fire doesn't matter?
// If there was movement (_onGestureMove fired)
if (gesture.deltaX !== null && gesture.deltaY !== null) {
// If we're out-out-bounds, then snapback
if (sv._isOutOfBounds()) {
sv._snapBack();
}
// Inbounds
else {
// Don't fire scrollEnd on the gesture axis is the same as paginator's
// Not totally confident this is ideal to access a plugin's properties from a host, @TODO revisit
if (sv.pages && !sv.pages.get(AXIS)[gesture.axis]) {
sv._onTransEnd();
}
}
}
}
},
/**
* Execute a flick at the end of a scroll action
*
* @method _flick
* @param e {Event.Facade} The Flick event facade
* @private
*/
_flick: function (e) {
if (this._cDisabled) {
return false;
}
var sv = this,
svAxis = sv._cAxis,
flick = e.flick,
flickAxis = flick.axis,
flickVelocity = flick.velocity,
axisAttr = flickAxis === DIM_X ? SCROLL_X : SCROLL_Y,
startPosition = sv.get(axisAttr);
// Sometimes flick is enabled, but drag is disabled
if (sv._gesture) {
sv._gesture.flick = flick;
}
// Prevent unneccesary firing of _flickFrame if we can't scroll on the flick axis
if (svAxis[flickAxis]) {
sv._flickFrame(flickVelocity, flickAxis, startPosition);
}
},
/**
* Execute a single frame in the flick animation
*
* @method _flickFrame
* @param velocity {Number} The velocity of this animated frame
* @param flickAxis {String} The axis on which to animate
* @param startPosition {Number} The starting X/Y point to flick from
* @protected
*/
_flickFrame: function (velocity, flickAxis, startPosition) {
var sv = this,
axisAttr = flickAxis === DIM_X ? SCROLL_X : SCROLL_Y,
// Localize cached values
bounce = sv._cBounce,
bounceRange = sv._cBounceRange,
deceleration = sv._cDeceleration,
frameDuration = sv._cFrameDuration,
// Calculate
newVelocity = velocity * deceleration,
newPosition = startPosition - (frameDuration * newVelocity),
// Some convinience conditions
min = flickAxis === DIM_X ? sv._minScrollX : sv._minScrollY,
max = flickAxis === DIM_X ? sv._maxScrollX : sv._maxScrollY,
belowMin = (newPosition < min),
belowMax = (newPosition < max),
aboveMin = (newPosition > min),
aboveMax = (newPosition > max),
belowMinRange = (newPosition < (min - bounceRange)),
belowMaxRange = (newPosition < (max + bounceRange)),
withinMinRange = (belowMin && (newPosition > (min - bounceRange))),
withinMaxRange = (aboveMax && (newPosition < (max + bounceRange))),
aboveMinRange = (newPosition > (min - bounceRange)),
aboveMaxRange = (newPosition > (max + bounceRange)),
tooSlow;
// If we're within the range but outside min/max, dampen the velocity
if (withinMinRange || withinMaxRange) {
newVelocity *= bounce;
}
// Is the velocity too slow to bother?
tooSlow = (Math.abs(newVelocity).toFixed(4) < 0.015);
// If the velocity is too slow or we're outside the range
if (tooSlow || belowMinRange || aboveMaxRange) {
// Cancel and delete sv._flickAnim
if (sv._flickAnim) {
sv._flickAnim.cancel();
delete sv._flickAnim;
}
// If we're inside the scroll area, just end
if (aboveMin && belowMax) {
sv._onTransEnd();
}
// We're outside the scroll area, so we need to snap back
else {
sv._snapBack();
}
}
// Otherwise, animate to the next frame
else {
// @TODO: maybe use requestAnimationFrame instead
sv._flickAnim = Y.later(frameDuration, sv, '_flickFrame', [newVelocity, flickAxis, newPosition]);
sv.set(axisAttr, newPosition);
}
},
/**
* Handle mousewheel events on the widget
*
* @method _mousewheel
* @param e {Event.Facade} The mousewheel event facade
* @private
*/
_mousewheel: function (e) {
var sv = this,
scrollY = sv.get(SCROLL_Y),
bb = sv._bb,
scrollOffset = 10, // 10px
isForward = (e.wheelDelta > 0),
scrollToY = scrollY - ((isForward ? 1 : -1) * scrollOffset);
scrollToY = _constrain(scrollToY, sv._minScrollY, sv._maxScrollY);
// Because Mousewheel events fire off 'document', every ScrollView widget will react
// to any mousewheel anywhere on the page. This check will ensure that the mouse is currently
// over this specific ScrollView. Also, only allow mousewheel scrolling on Y-axis,
// becuase otherwise the 'prevent' will block page scrolling.
if (bb.contains(e.target) && sv._cAxis[DIM_Y]) {
// Reset lastScrolledAmt
sv.lastScrolledAmt = 0;
// Jump to the new offset
sv.set(SCROLL_Y, scrollToY);
// if we have scrollbars plugin, update & set the flash timer on the scrollbar
// @TODO: This probably shouldn't be in this module
if (sv.scrollbars) {
// @TODO: The scrollbars should handle this themselves
sv.scrollbars._update();
sv.scrollbars.flash();
// or just this
// sv.scrollbars._hostDimensionsChange();
}
// Fire the 'scrollEnd' event
sv._onTransEnd();
// prevent browser default behavior on mouse scroll
e.preventDefault();
}
},
/**
* Checks to see the current scrollX/scrollY position beyond the min/max boundary
*
* @method _isOutOfBounds
* @param x {Number} [optional] The X position to check
* @param y {Number} [optional] The Y position to check
* @returns {boolen} Whether the current X/Y position is out of bounds (true) or not (false)
* @private
*/
_isOutOfBounds: function (x, y) {
var sv = this,
svAxis = sv._cAxis,
svAxisX = svAxis.x,
svAxisY = svAxis.y,
currentX = x || sv.get(SCROLL_X),
currentY = y || sv.get(SCROLL_Y),
minX = sv._minScrollX,
minY = sv._minScrollY,
maxX = sv._maxScrollX,
maxY = sv._maxScrollY;
return (svAxisX && (currentX < minX || currentX > maxX)) || (svAxisY && (currentY < minY || currentY > maxY));
},
/**
* Bounces back
* @TODO: Should be more generalized and support both X and Y detection
*
* @method _snapBack
* @private
*/
_snapBack: function () {
var sv = this,
currentX = sv.get(SCROLL_X),
currentY = sv.get(SCROLL_Y),
minX = sv._minScrollX,
minY = sv._minScrollY,
maxX = sv._maxScrollX,
maxY = sv._maxScrollY,
newY = _constrain(currentY, minY, maxY),
newX = _constrain(currentX, minX, maxX),
duration = sv.get(SNAP_DURATION),
easing = sv.get(SNAP_EASING);
if (newX !== currentX) {
sv.set(SCROLL_X, newX, {duration:duration, easing:easing});
}
else if (newY !== currentY) {
sv.set(SCROLL_Y, newY, {duration:duration, easing:easing});
}
else {
// It shouldn't ever get here, but in case it does, fire scrollEnd
sv._onTransEnd();
}
},
/**
* After listener for changes to the scrollX or scrollY attribute
*
* @method _afterScrollChange
* @param e {Event.Facade} The event facade
* @protected
*/
_afterScrollChange: function (e) {
if (e.src === ScrollView.UI_SRC) {
return false;
}
var sv = this,
duration = e.duration,
easing = e.easing,
val = e.newVal,
scrollToArgs = [];
// Set the scrolled value
sv.lastScrolledAmt = sv.lastScrolledAmt + (e.newVal - e.prevVal);
// Generate the array of args to pass to scrollTo()
if (e.attrName === SCROLL_X) {
scrollToArgs.push(val);
scrollToArgs.push(sv.get(SCROLL_Y));
}
else {
scrollToArgs.push(sv.get(SCROLL_X));
scrollToArgs.push(val);
}
scrollToArgs.push(duration);
scrollToArgs.push(easing);
sv.scrollTo.apply(sv, scrollToArgs);
},
/**
* After listener for changes to the flick attribute
*
* @method _afterFlickChange
* @param e {Event.Facade} The event facade
* @protected
*/
_afterFlickChange: function (e) {
this._bindFlick(e.newVal);
},
/**
* After listener for changes to the disabled attribute
*
* @method _afterDisabledChange
* @param e {Event.Facade} The event facade
* @protected
*/
_afterDisabledChange: function (e) {
// Cache for performance - we check during move
this._cDisabled = e.newVal;
},
/**
* After listener for the axis attribute
*
* @method _afterAxisChange
* @param e {Event.Facade} The event facade
* @protected
*/
_afterAxisChange: function (e) {
this._cAxis = e.newVal;
},
/**
* After listener for changes to the drag attribute
*
* @method _afterDragChange
* @param e {Event.Facade} The event facade
* @protected
*/
_afterDragChange: function (e) {
this._bindDrag(e.newVal);
},
/**
* After listener for the height or width attribute
*
* @method _afterDimChange
* @param e {Event.Facade} The event facade
* @protected
*/
_afterDimChange: function () {
this._uiDimensionsChange();
},
/**
* After listener for scrollEnd, for cleanup
*
* @method _afterScrollEnd
* @param e {Event.Facade} The event facade
* @protected
*/
_afterScrollEnd: function (e) {
var sv = this;
// @TODO: Move to sv._cancelFlick()
if (sv._flickAnim) {
// Cancel the flick (if it exists)
sv._flickAnim.cancel();
// Also delete it, otherwise _onGestureMoveStart will think we're still flicking
delete sv._flickAnim;
}
// If for some reason we're OOB, snapback
if (sv._isOutOfBounds()) {
sv._snapBack();
}
// Ideally this should be removed, but doing so causing some JS errors with fast swiping
// because _gesture is being deleted after the previous one has been overwritten
// delete sv._gesture; // TODO: Move to sv.prevGesture?
},
/**
* Setter for 'axis' attribute
*
* @method _axisSetter
* @param val {Mixed} A string ('x', 'y', 'xy') to specify which axis/axes to allow scrolling on
* @param name {String} The attribute name
* @return {Object} An object to specify scrollability on the x & y axes
*
* @protected
*/
_axisSetter: function (val, name) {
// Turn a string into an axis object
if (Y.Lang.isString(val)) {
return {
x: val.match(/x/i) ? true : false,
y: val.match(/y/i) ? true : false
};
}
},
/**
* The scrollX, scrollY setter implementation
*
* @method _setScroll
* @private
* @param {Number} val
* @param {String} dim
*
* @return {Number} The value
*/
_setScroll : function(val, dim) {
// Just ensure the widget is not disabled
if (this._cDisabled) {
val = Y.Attribute.INVALID_VALUE;
}
return val;
},
/**
* Setter for the scrollX attribute
*
* @method _setScrollX
* @param val {Number} The new scrollX value
* @return {Number} The normalized value
* @protected
*/
_setScrollX: function(val) {
return this._setScroll(val, DIM_X);
},
/**
* Setter for the scrollY ATTR
*
* @method _setScrollY
* @param val {Number} The new scrollY value
* @return {Number} The normalized value
* @protected
*/
_setScrollY: function(val) {
return this._setScroll(val, DIM_Y);
}
// End prototype properties
}, {
// Static properties
/**
* The identity of the widget.
*
* @property NAME
* @type String
* @default 'scrollview'
* @readOnly
* @protected
* @static
*/
NAME: 'scrollview',
/**
* Static property used to define the default attribute configuration of
* the Widget.
*
* @property ATTRS
* @type {Object}
* @protected
* @static
*/
ATTRS: {
/**
* Specifies ability to scroll on x, y, or x and y axis/axes.
*
* @attribute axis
* @type String
*/
axis: {
setter: '_axisSetter',
writeOnce: 'initOnly'
},
/**
* The current scroll position in the x-axis
*
* @attribute scrollX
* @type Number
* @default 0
*/
scrollX: {
value: 0,
setter: '_setScrollX'
},
/**
* The current scroll position in the y-axis
*
* @attribute scrollY
* @type Number
* @default 0
*/
scrollY: {
value: 0,
setter: '_setScrollY'
},
/**
* Drag coefficent for inertial scrolling. The closer to 1 this
* value is, the less friction during scrolling.
*
* @attribute deceleration
* @default 0.93
*/
deceleration: {
value: 0.93
},
/**
* Drag coefficient for intertial scrolling at the upper
* and lower boundaries of the scrollview. Set to 0 to
* disable "rubber-banding".
*
* @attribute bounce
* @type Number
* @default 0.1
*/
bounce: {
value: 0.1
},
/**
* The minimum distance and/or velocity which define a flick. Can be set to false,
* to disable flick support (note: drag support is enabled/disabled separately)
*
* @attribute flick
* @type Object
* @default Object with properties minDistance = 10, minVelocity = 0.3.
*/
flick: {
value: {
minDistance: 10,
minVelocity: 0.3
}
},
/**
* Enable/Disable dragging the ScrollView content (note: flick support is enabled/disabled separately)
* @attribute drag
* @type boolean
* @default true
*/
drag: {
value: true
},
/**
* The default duration to use when animating the bounce snap back.
*
* @attribute snapDuration
* @type Number
* @default 400
*/
snapDuration: {
value: 400
},
/**
* The default easing to use when animating the bounce snap back.
*
* @attribute snapEasing
* @type String
* @default 'ease-out'
*/
snapEasing: {
value: 'ease-out'
},
/**
* The default easing used when animating the flick
*
* @attribute easing
* @type String
* @default 'cubic-bezier(0, 0.1, 0, 1.0)'
*/
easing: {
value: 'cubic-bezier(0, 0.1, 0, 1.0)'
},
/**
* The interval (ms) used when animating the flick for JS-timer animations
*
* @attribute frameDuration
* @type Number
* @default 15
*/
frameDuration: {
value: 15
},
/**
* The default bounce distance in pixels
*
* @attribute bounceRange
* @type Number
* @default 150
*/
bounceRange: {
value: 150
}
},
/**
* List of class names used in the scrollview's DOM
*
* @property CLASS_NAMES
* @type Object
* @static
*/
CLASS_NAMES: CLASS_NAMES,
/**
* Flag used to source property changes initiated from the DOM
*
* @property UI_SRC
* @type String
* @static
* @default 'ui'
*/
UI_SRC: UI,
/**
* Object map of style property names used to set transition properties.
* Defaults to the vendor prefix established by the Transition module.
* The configured property names are `_TRANSITION.DURATION` (e.g. "WebkitTransitionDuration") and
* `_TRANSITION.PROPERTY (e.g. "WebkitTransitionProperty").
*
* @property _TRANSITION
* @private
*/
_TRANSITION: {
DURATION: (vendorPrefix ? vendorPrefix + 'TransitionDuration' : 'transitionDuration'),
PROPERTY: (vendorPrefix ? vendorPrefix + 'TransitionProperty' : 'transitionProperty')
},
/**
* The default bounce distance in pixels
*
* @property BOUNCE_RANGE
* @type Number
* @static
* @default false
* @deprecated (in 3.7.0)
*/
BOUNCE_RANGE: false,
/**
* The interval (ms) used when animating the flick
*
* @property FRAME_STEP
* @type Number
* @static
* @default false
* @deprecated (in 3.7.0)
*/
FRAME_STEP: false,
/**
* The default easing used when animating the flick
*
* @property EASING
* @type String
* @static
* @default false
* @deprecated (in 3.7.0)
*/
EASING: false,
/**
* The default easing to use when animating the bounce snap back.
*
* @property SNAP_EASING
* @type String
* @static
* @default false
* @deprecated (in 3.7.0)
*/
SNAP_EASING: false,
/**
* The default duration to use when animating the bounce snap back.
*
* @property SNAP_DURATION
* @type Number
* @static
* @default false
* @deprecated (in 3.7.0)
*/
SNAP_DURATION: false
// End static properties
});
}, '@VERSION@', {"requires": ["widget", "event-gestures", "event-mousewheel", "transition"], "skinnable": true});
|
examples/with-custom-webpack-config/src/server.js
|
jaredpalmer/react-production-starter
|
import App from './App';
import React from 'react';
import express from 'express';
import { renderToString } from 'react-dom/server';
const assets = require(process.env.RAZZLE_ASSETS_MANIFEST);
const server = express();
server
.disable('x-powered-by')
.use(express.static(process.env.RAZZLE_PUBLIC_DIR))
.get('/*', (req, res) => {
const markup = renderToString(<App />);
res.send(
`<!doctype html>
<html lang="">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charSet='utf-8' />
<title>Welcome to Razzle</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
${assets.client.css
? `<link rel="stylesheet" href="${assets.client.css}">`
: ''}
${process.env.NODE_ENV === 'production'
? `<script src="${assets.client.js}" defer></script>`
: `<script src="${assets.client.js}" defer crossorigin></script>`}
</head>
<body>
<div id="root">${markup}</div>
</body>
</html>`
);
});
export default server;
|
src/components/icons/MergeFieldIcon.js
|
InsideSalesOfficial/insidesales-components
|
import React from 'react';
const MergeFieldIcon = props => (
<svg {...props.size || { width: '24px', height: '24px' }} {...props} viewBox="0 0 24 24">
{props.title && <title>{props.title}</title>}
<path d="M17,20.41 L18.41,19 L15,15.59 L13.59,17 L17,20.41 Z M7.5,8 L11,8 L11,13.59 L5.59,19 L7,20.41 L13,14.41 L13,8 L16.5,8 L12,3.5 L7.5,8 Z" id="Shape" fillRule="nonzero" />
</svg>
);
export default MergeFieldIcon;
|
src/components/confluence/original/ConfluenceOriginal.js
|
fpoumian/react-devicon
|
import React from 'react'
import PropTypes from 'prop-types'
import SVGDeviconInline from '../../_base/SVGDeviconInline'
import iconSVG from './ConfluenceOriginal.svg'
/** ConfluenceOriginal */
function ConfluenceOriginal({ width, height, className }) {
return (
<SVGDeviconInline
className={'ConfluenceOriginal' + ' ' + className}
iconSVG={iconSVG}
width={width}
height={height}
/>
)
}
ConfluenceOriginal.propTypes = {
className: PropTypes.string,
width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
}
export default ConfluenceOriginal
|
app/components/DonutChart/__tests__/index-test.js
|
nelsonomuto/budgeting-sample-app-webpack2
|
import React from 'react';
import renderer from 'react-test-renderer';
import DonutChart from '../';
// mock nested components
jest.mock('components/DonutChart/Path');
jest.mock('components/Chart', () => 'div');
jest.mock('components/Legend', () => 'div');
it('renders correctly', () => {
const tree = renderer.create(<DonutChart dataLabel="test" dataKey="test" data={[]} />).toJSON();
expect(tree).toMatchSnapshot();
});
|
ajax/libs/babel-core/6.1.3/browser.min.js
|
x112358/cdnjs
|
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.babel=t()}}(function(){var t,e,n;return function r(t,e,n){function i(a,o){if(!e[a]){if(!t[a]){var u="function"==typeof require&&require;if(!o&&u)return u(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var p=e[a]={exports:{}};t[a][0].call(p.exports,function(e){var n=t[a][1][e];return i(n?n:e)},p,p.exports,r,t,e,n)}return e[a].exports}for(var s="function"==typeof require&&require,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(t,e,n){},{}],2:[function(t,e,n){(function(e){function r(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(n){return!1}}function i(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t){return this instanceof s?(this.length=0,this.parent=void 0,"number"==typeof t?a(this,t):"string"==typeof t?o(this,t,arguments.length>1?arguments[1]:"utf8"):u(this,t)):arguments.length>1?new s(t,arguments[1]):new s(t)}function a(t,e){if(t=m(t,0>e?0:0|y(e)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;e>n;n++)t[n]=0;return t}function o(t,e,n){("string"!=typeof n||""===n)&&(n="utf8");var r=0|v(e,n);return t=m(t,r),t.write(e,n),t}function u(t,e){if(s.isBuffer(e))return l(t,e);if(X(e))return p(t,e);if(null==e)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(e.buffer instanceof ArrayBuffer)return c(t,e);if(e instanceof ArrayBuffer)return f(t,e)}return e.length?h(t,e):d(t,e)}function l(t,e){var n=0|y(e.length);return t=m(t,n),e.copy(t,0,0,n),t}function p(t,e){var n=0|y(e.length);t=m(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function c(t,e){var n=0|y(e.length);t=m(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function f(t,e){return s.TYPED_ARRAY_SUPPORT?(e.byteLength,t=s._augment(new Uint8Array(e))):t=c(t,new Uint8Array(e)),t}function h(t,e){var n=0|y(e.length);t=m(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function d(t,e){var n,r=0;"Buffer"===e.type&&X(e.data)&&(n=e.data,r=0|y(n.length)),t=m(t,r);for(var i=0;r>i;i+=1)t[i]=255&n[i];return t}function m(t,e){s.TYPED_ARRAY_SUPPORT?(t=s._augment(new Uint8Array(e)),t.__proto__=s.prototype):(t.length=e,t._isBuffer=!0);var n=0!==e&&e<=s.poolSize>>>1;return n&&(t.parent=z),t}function y(t){if(t>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|t}function g(t,e){if(!(this instanceof g))return new g(t,e);var n=new s(t,e);return delete n.parent,n}function v(t,e){"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return W(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(t).length;default:if(r)return W(t).length;e=(""+e).toLowerCase(),r=!0}}function A(t,e,n){var r=!1;if(e=0|e,n=void 0===n||n===1/0?this.length:0|n,t||(t="utf8"),0>e&&(e=0),n>this.length&&(n=this.length),e>=n)return"";for(;;)switch(t){case"hex":return k(this,e,n);case"utf8":case"utf-8":return w(this,e,n);case"ascii":return T(this,e,n);case"binary":return _(this,e,n);case"base64":return S(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function E(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var s=e.length;if(s%2!==0)throw new Error("Invalid hex string");r>s/2&&(r=s/2);for(var a=0;r>a;a++){var o=parseInt(e.substr(2*a,2),16);if(isNaN(o))throw new Error("Invalid hex string");t[n+a]=o}return a}function b(t,e,n,r){return J(W(e,t.length-n),t,n,r)}function x(t,e,n,r){return J(q(e),t,n,r)}function D(t,e,n,r){return x(t,e,n,r)}function C(t,e,n,r){return J(Y(e),t,n,r)}function F(t,e,n,r){return J(H(e,t.length-n),t,n,r)}function S(t,e,n){return 0===e&&n===t.length?K.fromByteArray(t):K.fromByteArray(t.slice(e,n))}function w(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;n>i;){var s=t[i],a=null,o=s>239?4:s>223?3:s>191?2:1;if(n>=i+o){var u,l,p,c;switch(o){case 1:128>s&&(a=s);break;case 2:u=t[i+1],128===(192&u)&&(c=(31&s)<<6|63&u,c>127&&(a=c));break;case 3:u=t[i+1],l=t[i+2],128===(192&u)&&128===(192&l)&&(c=(15&s)<<12|(63&u)<<6|63&l,c>2047&&(55296>c||c>57343)&&(a=c));break;case 4:u=t[i+1],l=t[i+2],p=t[i+3],128===(192&u)&&128===(192&l)&&128===(192&p)&&(c=(15&s)<<18|(63&u)<<12|(63&l)<<6|63&p,c>65535&&1114112>c&&(a=c))}}null===a?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=o}return B(r)}function B(t){var e=t.length;if(Q>=e)return String.fromCharCode.apply(String,t);for(var n="",r=0;e>r;)n+=String.fromCharCode.apply(String,t.slice(r,r+=Q));return n}function T(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;n>i;i++)r+=String.fromCharCode(127&t[i]);return r}function _(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;n>i;i++)r+=String.fromCharCode(t[i]);return r}function k(t,e,n){var r=t.length;(!e||0>e)&&(e=0),(!n||0>n||n>r)&&(n=r);for(var i="",s=e;n>s;s++)i+=G(t[s]);return i}function P(t,e,n){for(var r=t.slice(e,n),i="",s=0;s<r.length;s+=2)i+=String.fromCharCode(r[s]+256*r[s+1]);return i}function N(t,e,n){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function I(t,e,n,r,i,a){if(!s.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(e>i||a>e)throw new RangeError("value is out of bounds");if(n+r>t.length)throw new RangeError("index out of range")}function L(t,e,n,r){0>e&&(e=65535+e+1);for(var i=0,s=Math.min(t.length-n,2);s>i;i++)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function O(t,e,n,r){0>e&&(e=4294967295+e+1);for(var i=0,s=Math.min(t.length-n,4);s>i;i++)t[n+i]=e>>>8*(r?i:3-i)&255}function M(t,e,n,r,i,s){if(e>i||s>e)throw new RangeError("value is out of bounds");if(n+r>t.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function R(t,e,n,r,i){return i||M(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),$.write(t,e,n,r,23,4),n+4}function j(t,e,n,r,i){return i||M(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),$.write(t,e,n,r,52,8),n+8}function V(t){if(t=U(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function U(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function G(t){return 16>t?"0"+t.toString(16):t.toString(16)}function W(t,e){e=e||1/0;for(var n,r=t.length,i=null,s=[],a=0;r>a;a++){if(n=t.charCodeAt(a),n>55295&&57344>n){if(!i){if(n>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(56320>n){(e-=3)>-1&&s.push(239,191,189),i=n;continue}n=i-55296<<10|n-56320|65536}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,128>n){if((e-=1)<0)break;s.push(n)}else if(2048>n){if((e-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(65536>n){if((e-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function q(t){for(var e=[],n=0;n<t.length;n++)e.push(255&t.charCodeAt(n));return e}function H(t,e){for(var n,r,i,s=[],a=0;a<t.length&&!((e-=2)<0);a++)n=t.charCodeAt(a),r=n>>8,i=n%256,s.push(i),s.push(r);return s}function Y(t){return K.toByteArray(V(t))}function J(t,e,n,r){for(var i=0;r>i&&!(i+n>=e.length||i>=t.length);i++)e[i+n]=t[i];return i}var K=t(3),$=t(4),X=t(5);n.Buffer=s,n.SlowBuffer=g,n.INSPECT_MAX_BYTES=50,s.poolSize=8192;var z={};s.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:r(),s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array),s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,e){if(!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,a=Math.min(n,r);a>i&&t[i]===e[i];)++i;return i!==a&&(n=t[i],r=e[i]),r>n?-1:n>r?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!X(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new s(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;n++)e+=t[n].length;var r=new s(e),i=0;for(n=0;n<t.length;n++){var a=t[n];a.copy(r,i),i+=a.length}return r},s.byteLength=v,s.prototype.length=void 0,s.prototype.parent=void 0,s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?w(this,0,t):A.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:0===s.compare(this,t)},s.prototype.inspect=function(){var t="",e=n.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},s.prototype.compare=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:s.compare(this,t)},s.prototype.indexOf=function(t,e){function n(t,e,n){for(var r=-1,i=0;n+i<t.length;i++)if(t[n+i]===e[-1===r?0:i-r]){if(-1===r&&(r=i),i-r+1===e.length)return n+r}else r=-1;return-1}if(e>2147483647?e=2147483647:-2147483648>e&&(e=-2147483648),e>>=0,0===this.length)return-1;if(e>=this.length)return-1;if(0>e&&(e=Math.max(this.length+e,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,e);if(s.isBuffer(t))return n(this,t,e);if("number"==typeof t)return s.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,e):n(this,[t],e);throw new TypeError("val must be string, number or Buffer")},s.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},s.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},s.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0);else{var i=r;r=e,e=0|n,n=i}var s=this.length-e;if((void 0===n||n>s)&&(n=s),t.length>0&&(0>n||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return E(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":return x(this,t,e,n);case"binary":return D(this,t,e,n);case"base64":return C(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;s.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),t>e&&(e=t);var r;if(s.TYPED_ARRAY_SUPPORT)r=s._augment(this.subarray(t,e));else{var i=e-t;r=new s(i,void 0);for(var a=0;i>a;a++)r[a]=this[a+t]}return r.length&&(r.parent=this.parent||this),r},s.prototype.readUIntLE=function(t,e,n){t=0|t,e=0|e,n||N(t,e,this.length);for(var r=this[t],i=1,s=0;++s<e&&(i*=256);)r+=this[t+s]*i;return r},s.prototype.readUIntBE=function(t,e,n){t=0|t,e=0|e,n||N(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},s.prototype.readUInt8=function(t,e){return e||N(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||N(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||N(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,n){t=0|t,e=0|e,n||N(t,e,this.length);for(var r=this[t],i=1,s=0;++s<e&&(i*=256);)r+=this[t+s]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t=0|t,e=0|e,n||N(t,e,this.length);for(var r=e,i=1,s=this[t+--r];r>0&&(i*=256);)s+=this[t+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*e)),s},s.prototype.readInt8=function(t,e){return e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){e||N(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){e||N(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||N(t,4,this.length),$.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||N(t,4,this.length),$.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||N(t,8,this.length),$.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||N(t,8,this.length),$.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,n,r){t=+t,e=0|e,n=0|n,r||I(this,t,e,n,Math.pow(2,8*n),0);var i=1,s=0;for(this[e]=255&t;++s<n&&(i*=256);)this[e+s]=t/i&255;return e+n},s.prototype.writeUIntBE=function(t,e,n,r){t=+t,e=0|e,n=0|n,r||I(this,t,e,n,Math.pow(2,8*n),0);var i=n-1,s=1;for(this[e+i]=255&t;--i>=0&&(s*=256);)this[e+i]=t/s&255;return e+n},s.prototype.writeUInt8=function(t,e,n){return t=+t,e=0|e,n||I(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=0|e,n||I(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):L(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=0|e,n||I(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):L(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=0|e,n||I(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):O(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=0|e,n||I(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):O(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e=0|e,!r){var i=Math.pow(2,8*n-1);I(this,t,e,n,i-1,-i)}var s=0,a=1,o=0>t?1:0;for(this[e]=255&t;++s<n&&(a*=256);)this[e+s]=(t/a>>0)-o&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e=0|e,!r){var i=Math.pow(2,8*n-1);I(this,t,e,n,i-1,-i)}var s=n-1,a=1,o=0>t?1:0;for(this[e+s]=255&t;--s>=0&&(a*=256);)this[e+s]=(t/a>>0)-o&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e=0|e,n||I(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e=0|e,n||I(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):L(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e=0|e,n||I(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):L(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e=0|e,n||I(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):O(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e=0|e,n||I(this,t,e,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):O(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,n){return R(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return R(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return j(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return j(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&n>r&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(0>e)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,a=r-n;if(this===t&&e>n&&r>e)for(i=a-1;i>=0;i--)t[i+e]=this[i+n];else if(1e3>a||!s.TYPED_ARRAY_SUPPORT)for(i=0;a>i;i++)t[i+e]=this[i+n];else t._set(this.subarray(n,n+a),e);return a},s.prototype.fill=function(t,e,n){if(t||(t=0),e||(e=0),n||(n=this.length),e>n)throw new RangeError("end < start");if(n!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof t)for(r=e;n>r;r++)this[r]=t;else{var i=W(t.toString()),s=i.length;for(r=e;n>r;r++)this[r]=i[r%s]}return this}},s.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(s.TYPED_ARRAY_SUPPORT)return new s(this).buffer;for(var t=new Uint8Array(this.length),e=0,n=t.length;n>e;e+=1)t[e]=this[e];return t.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var Z=s.prototype;s._augment=function(t){return t.constructor=s,t._isBuffer=!0,t._set=t.set,t.get=Z.get,t.set=Z.set,t.write=Z.write,t.toString=Z.toString,t.toLocaleString=Z.toString,t.toJSON=Z.toJSON,t.equals=Z.equals,t.compare=Z.compare,t.indexOf=Z.indexOf,t.copy=Z.copy,t.slice=Z.slice,t.readUIntLE=Z.readUIntLE,t.readUIntBE=Z.readUIntBE,t.readUInt8=Z.readUInt8,t.readUInt16LE=Z.readUInt16LE,t.readUInt16BE=Z.readUInt16BE,t.readUInt32LE=Z.readUInt32LE,t.readUInt32BE=Z.readUInt32BE,t.readIntLE=Z.readIntLE,t.readIntBE=Z.readIntBE,t.readInt8=Z.readInt8,t.readInt16LE=Z.readInt16LE,t.readInt16BE=Z.readInt16BE,t.readInt32LE=Z.readInt32LE,t.readInt32BE=Z.readInt32BE,t.readFloatLE=Z.readFloatLE,t.readFloatBE=Z.readFloatBE,t.readDoubleLE=Z.readDoubleLE,t.readDoubleBE=Z.readDoubleBE,t.writeUInt8=Z.writeUInt8,t.writeUIntLE=Z.writeUIntLE,t.writeUIntBE=Z.writeUIntBE,t.writeUInt16LE=Z.writeUInt16LE,t.writeUInt16BE=Z.writeUInt16BE,t.writeUInt32LE=Z.writeUInt32LE,t.writeUInt32BE=Z.writeUInt32BE,t.writeIntLE=Z.writeIntLE,t.writeIntBE=Z.writeIntBE,t.writeInt8=Z.writeInt8,t.writeInt16LE=Z.writeInt16LE,t.writeInt16BE=Z.writeInt16BE,t.writeInt32LE=Z.writeInt32LE,t.writeInt32BE=Z.writeInt32BE,t.writeFloatLE=Z.writeFloatLE,t.writeFloatBE=Z.writeFloatBE,t.writeDoubleLE=Z.writeDoubleLE,t.writeDoubleBE=Z.writeDoubleBE,t.fill=Z.fill,t.inspect=Z.inspect,t.toArrayBuffer=Z.toArrayBuffer,t};var tt=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{3:3,4:4,5:5}],3:[function(t,e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===a||e===c?62:e===o||e===f?63:u>e?-1:u+10>e?e-u+26+26:p+26>e?e-p:l+26>e?e-l+26:void 0}function n(t){function n(t){l[c++]=t}var r,i,a,o,u,l;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var p=t.length;u="="===t.charAt(p-2)?2:"="===t.charAt(p-1)?1:0,l=new s(3*t.length/4-u),a=u>0?t.length-4:t.length;var c=0;for(r=0,i=0;a>r;r+=4,i+=3)o=e(t.charAt(r))<<18|e(t.charAt(r+1))<<12|e(t.charAt(r+2))<<6|e(t.charAt(r+3)),n((16711680&o)>>16),n((65280&o)>>8),n(255&o);return 2===u?(o=e(t.charAt(r))<<2|e(t.charAt(r+1))>>4,n(255&o)):1===u&&(o=e(t.charAt(r))<<10|e(t.charAt(r+1))<<4|e(t.charAt(r+2))>>2,n(o>>8&255),n(255&o)),l}function i(t){function e(t){return r.charAt(t)}function n(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,s,a,o=t.length%3,u="";for(i=0,a=t.length-o;a>i;i+=3)s=(t[i]<<16)+(t[i+1]<<8)+t[i+2],u+=n(s);switch(o){case 1:s=t[t.length-1],u+=e(s>>2),u+=e(s<<4&63),u+="==";break;case 2:s=(t[t.length-2]<<8)+t[t.length-1],u+=e(s>>10),u+=e(s>>4&63),u+=e(s<<2&63),u+="="}return u}var s="undefined"!=typeof Uint8Array?Uint8Array:Array,a="+".charCodeAt(0),o="/".charCodeAt(0),u="0".charCodeAt(0),l="a".charCodeAt(0),p="A".charCodeAt(0),c="-".charCodeAt(0),f="_".charCodeAt(0);t.toByteArray=n,t.fromByteArray=i}("undefined"==typeof n?this.base64js={}:n)},{}],4:[function(t,e,n){n.read=function(t,e,n,r,i){var s,a,o=8*i-r-1,u=(1<<o)-1,l=u>>1,p=-7,c=n?i-1:0,f=n?-1:1,h=t[e+c];for(c+=f,s=h&(1<<-p)-1,h>>=-p,p+=o;p>0;s=256*s+t[e+c],c+=f,p-=8);for(a=s&(1<<-p)-1,s>>=-p,p+=r;p>0;a=256*a+t[e+c],c+=f,p-=8);if(0===s)s=1-l;else{if(s===u)return a?NaN:(h?-1:1)*(1/0);a+=Math.pow(2,r),s-=l}return(h?-1:1)*a*Math.pow(2,s-r)},n.write=function(t,e,n,r,i,s){var a,o,u,l=8*s-i-1,p=(1<<l)-1,c=p>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:s-1,d=r?1:-1,m=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,a=p):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),e+=a+c>=1?f/u:f*Math.pow(2,1-c),e*u>=2&&(a++,u/=2),a+c>=p?(o=0,a=p):a+c>=1?(o=(e*u-1)*Math.pow(2,i),a+=c):(o=e*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;t[n+h]=255&o,h+=d,o/=256,i-=8);for(a=a<<i|o,l+=i;l>0;t[n+h]=255&a,h+=d,a/=256,l-=8);t[n+h-d]|=128*m}},{}],5:[function(t,e,n){var r=Array.isArray,i=Object.prototype.toString;e.exports=r||function(t){return!!t&&"[object Array]"==i.call(t)}},{}],6:[function(t,e,n){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},{}],7:[function(t,e,n){(function(t){function e(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s=function(t){return i.exec(t).slice(1)};n.resolve=function(){for(var n="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var a=s>=0?arguments[s]:t.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(n=a+"/"+n,i="/"===a.charAt(0))}return n=e(r(n.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(t){var i=n.isAbsolute(t),s="/"===a(t,-1);return t=e(r(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&s&&(t+="/"),(i?"/":"")+t},n.isAbsolute=function(t){return"/"===t.charAt(0)},n.join=function(){var t=Array.prototype.slice.call(arguments,0);return n.normalize(r(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},n.relative=function(t,e){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=n.resolve(t).substr(1),e=n.resolve(e).substr(1);for(var i=r(t.split("/")),s=r(e.split("/")),a=Math.min(i.length,s.length),o=a,u=0;a>u;u++)if(i[u]!==s[u]){o=u;break}for(var l=[],u=o;u<i.length;u++)l.push("..");return l=l.concat(s.slice(o)),l.join("/")},n.sep="/",n.delimiter=":",n.dirname=function(t){var e=s(t),n=e[0],r=e[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(t,e){var n=s(t)[2];return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},n.extname=function(t){return s(t)[3]};var a="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return 0>e&&(e=t.length+e),t.substr(e,n)}}).call(this,t(8))},{8:8}],8:[function(t,e,n){function r(){p=!1,o.length?l=o.concat(l):c=-1,l.length&&i()}function i(){if(!p){var t=setTimeout(r);p=!0;for(var e=l.length;e;){for(o=l,l=[];++c<e;)o&&o[c].run();c=-1,e=l.length}o=null,p=!1,clearTimeout(t)}}function s(t,e){this.fun=t,this.array=e}function a(){}var o,u=e.exports={},l=[],p=!1,c=-1;u.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new s(t,e)),1!==l.length||p||setTimeout(i,0)},s.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=a,u.addListener=a,u.once=a,u.off=a,u.removeListener=a,u.removeAllListeners=a,u.emit=a,u.binding=function(t){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(t){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],9:[function(t,e,n){function r(){throw new Error("tty.ReadStream is not implemented")}function i(){throw new Error("tty.ReadStream is not implemented")}n.isatty=function(){return!1},n.ReadStream=r,n.WriteStream=i},{}],10:[function(t,e,n){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],11:[function(t,e,n){(function(e,r){function i(t,e){var r={seen:[],stylize:a};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(e)?r.showHidden=e:e&&n._extend(r,e),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),u(r,t,r.depth)}function s(t,e){var n=i.styles[e];return n?"["+i.colors[n][0]+"m"+t+"["+i.colors[n][1]+"m":t}function a(t,e){return t}function o(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}function u(t,e,r){if(t.customInspect&&e&&S(e.inspect)&&e.inspect!==n.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(r,t);return A(i)||(i=u(t,i,r)),i}var s=l(t,e);if(s)return s;var a=Object.keys(e),m=o(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(e)),F(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return p(e);if(0===a.length){if(S(e)){var y=e.name?": "+e.name:"";return t.stylize("[Function"+y+"]","special")}if(x(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(C(e))return t.stylize(Date.prototype.toString.call(e),"date");if(F(e))return p(e)}var g="",v=!1,E=["{","}"];if(d(e)&&(v=!0,E=["[","]"]),S(e)){var b=e.name?": "+e.name:"";g=" [Function"+b+"]"}if(x(e)&&(g=" "+RegExp.prototype.toString.call(e)),C(e)&&(g=" "+Date.prototype.toUTCString.call(e)),F(e)&&(g=" "+p(e)),0===a.length&&(!v||0==e.length))return E[0]+g+E[1];if(0>r)return x(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var D;return D=v?c(t,e,r,m,a):a.map(function(n){return f(t,e,r,m,n,v)}),t.seen.pop(),h(D,g,E)}function l(t,e){if(b(e))return t.stylize("undefined","undefined");if(A(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return v(e)?t.stylize(""+e,"number"):m(e)?t.stylize(""+e,"boolean"):y(e)?t.stylize("null","null"):void 0}function p(t){return"["+Error.prototype.toString.call(t)+"]"}function c(t,e,n,r,i){for(var s=[],a=0,o=e.length;o>a;++a)k(e,String(a))?s.push(f(t,e,n,r,String(a),!0)):s.push("");return i.forEach(function(i){i.match(/^\d+$/)||s.push(f(t,e,n,r,i,!0))}),s}function f(t,e,n,r,i,s){var a,o,l;if(l=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},l.get?o=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(o=t.stylize("[Setter]","special")),k(r,i)||(a="["+i+"]"),o||(t.seen.indexOf(l.value)<0?(o=y(n)?u(t,l.value,null):u(t,l.value,n-1),o.indexOf("\n")>-1&&(o=s?o.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+o.split("\n").map(function(t){return" "+t}).join("\n"))):o=t.stylize("[Circular]","special")),b(a)){if(s&&i.match(/^\d+$/))return o;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+o}function h(t,e,n){var r=0,i=t.reduce(function(t,e){return r++,e.indexOf("\n")>=0&&r++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function d(t){return Array.isArray(t)}function m(t){return"boolean"==typeof t}function y(t){return null===t}function g(t){return null==t}function v(t){return"number"==typeof t}function A(t){return"string"==typeof t}function E(t){return"symbol"==typeof t}function b(t){return void 0===t}function x(t){return D(t)&&"[object RegExp]"===B(t)}function D(t){return"object"==typeof t&&null!==t}function C(t){return D(t)&&"[object Date]"===B(t)}function F(t){return D(t)&&("[object Error]"===B(t)||t instanceof Error)}function S(t){return"function"==typeof t}function w(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function B(t){return Object.prototype.toString.call(t)}function T(t){return 10>t?"0"+t.toString(10):t.toString(10)}function _(){var t=new Date,e=[T(t.getHours()),T(t.getMinutes()),T(t.getSeconds())].join(":");return[t.getDate(),L[t.getMonth()],e].join(" ")}function k(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var P=/%[sdj%]/g;n.format=function(t){if(!A(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(i(arguments[n]));return e.join(" ")}for(var n=1,r=arguments,s=r.length,a=String(t).replace(P,function(t){if("%%"===t)return"%";if(n>=s)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return t}}),o=r[n];s>n;o=r[++n])a+=y(o)||!D(o)?" "+o:" "+i(o);return a},n.deprecate=function(t,i){function s(){if(!a){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),a=!0}return t.apply(this,arguments)}if(b(r.process))return function(){return n.deprecate(t,i).apply(this,arguments)};if(e.noDeprecation===!0)return t;var a=!1;return s};var N,I={};n.debuglog=function(t){if(b(N)&&(N=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!I[t])if(new RegExp("\\b"+t+"\\b","i").test(N)){var r=e.pid;I[t]=function(){var e=n.format.apply(n,arguments);console.error("%s %d: %s",t,r,e)}}else I[t]=function(){};return I[t]},n.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=d,n.isBoolean=m,n.isNull=y,n.isNullOrUndefined=g,n.isNumber=v,n.isString=A,n.isSymbol=E,n.isUndefined=b,n.isRegExp=x,n.isObject=D,n.isDate=C,n.isError=F,n.isFunction=S,n.isPrimitive=w,n.isBuffer=t(10);var L=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];n.log=function(){console.log("%s - %s",_(),n.format.apply(n,arguments))},n.inherits=t(6),n._extend=function(t,e){if(!e||!D(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}}).call(this,t(8),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,6:6,8:8}],12:[function(t,e,n){"use strict";function r(t){var e=c["default"].matchToToken(t);if("name"===e.type&&h["default"].keyword.isReservedWordES6(e.value))return"keyword";if("punctuator"===e.type)switch(e.value){case"{":case"}":return"curly";
case"(":case")":return"parens";case"[":case"]":return"square"}return e.type}function i(t){return t.replace(c["default"],function(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];var i=r(e),s=y[i];return s?e[0].split(g).map(function(t){return s(t)}).join("\n"):e[0]})}var s=t(277)["default"];n.__esModule=!0;var a=t(26),o=s(a),u=t(28),l=s(u),p=t(25),c=s(p),f=t(24),h=s(f),d=t(13),m=s(d),y={string:m["default"].red,punctuator:m["default"].bold,curly:m["default"].green,parens:m["default"].blue.bold,square:m["default"].yellow,keyword:m["default"].cyan,number:m["default"].magenta,regex:m["default"].magenta,comment:m["default"].grey,invalid:m["default"].inverse},g=/\r\n|[\n\r\u2028\u2029]/;n["default"]=function(t,e,n){var r=arguments.length<=3||void 0===arguments[3]?{}:arguments[3];n=Math.max(n,0);var s=r.highlightCode&&m["default"].supportsColor;s&&(t=i(t));var a=t.split(g),u=Math.max(e-3,0),p=Math.min(a.length,e+3);e||n||(u=0,p=a.length);var c=o["default"](a.slice(u,p),{start:u+1,before:" ",after:" | ",transform:function(t){t.number===e&&(n&&(t.line+="\n"+t.before+l["default"](" ",t.width)+t.after+l["default"](" ",n-1)+"^"),t.before=t.before.replace(/^./,">"))}}).join("\n");return s?m["default"].reset(c):c},e.exports=n["default"]},{13:13,24:24,25:25,26:26,277:277,28:28}],13:[function(t,e,n){(function(n){"use strict";function r(t){this.enabled=t&&void 0!==t.enabled?t.enabled:c}function i(t){var e=function(){return s.apply(e,arguments)};return e._styles=t,e.enabled=this.enabled,e.__proto__=m,e}function s(){var t=arguments,e=t.length,n=0!==e&&String(arguments[0]);if(e>1)for(var r=1;e>r;r++)n+=" "+t[r];if(!this.enabled||!n)return n;var i=this._styles,s=i.length,a=u.dim.open;for(!h||-1===i.indexOf("gray")&&-1===i.indexOf("grey")||(u.dim.open="");s--;){var o=u[i[s]];n=o.open+n.replace(o.closeRe,o.open)+o.close}return u.dim.open=a,n}function a(){var t={};return Object.keys(d).forEach(function(e){t[e]={get:function(){return i.call(this,[e])}}}),t}var o=t(15),u=t(14),l=t(18),p=t(16),c=t(20),f=Object.defineProperties,h="win32"===n.platform&&!/^xterm/i.test(n.env.TERM);h&&(u.blue.open="[94m");var d=function(){var t={};return Object.keys(u).forEach(function(e){u[e].closeRe=new RegExp(o(u[e].close),"g"),t[e]={get:function(){return i.call(this,this._styles.concat(e))}}}),t}(),m=f(function(){},d);f(r.prototype,a()),e.exports=new r,e.exports.styles=u,e.exports.hasColor=p,e.exports.stripColor=l,e.exports.supportsColor=c}).call(this,t(8))},{14:14,15:15,16:16,18:18,20:20,8:8}],14:[function(t,e,n){"use strict";function r(){var t={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};return t.colors.grey=t.colors.gray,Object.keys(t).forEach(function(e){var n=t[e];Object.keys(n).forEach(function(e){var r=n[e];t[e]=n[e]={open:"["+r[0]+"m",close:"["+r[1]+"m"}}),Object.defineProperty(t,e,{value:n,enumerable:!1})}),t}Object.defineProperty(e,"exports",{enumerable:!0,get:r})},{}],15:[function(t,e,n){"use strict";var r=/[|\\{}()[\]^$+*?.]/g;e.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(r,"\\$&")}},{}],16:[function(t,e,n){"use strict";var r=t(17),i=new RegExp(r().source);e.exports=i.test.bind(i)},{17:17}],17:[function(t,e,n){"use strict";e.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g}},{}],18:[function(t,e,n){"use strict";var r=t(19)();e.exports=function(t){return"string"==typeof t?t.replace(r,""):t}},{19:19}],19:[function(t,e,n){arguments[4][17][0].apply(n,arguments)},{17:17}],20:[function(t,e,n){(function(t){"use strict";var n=t.argv,r=n.indexOf("--"),i=function(t){t="--"+t;var e=n.indexOf(t);return-1!==e&&(-1!==r?r>e:!0)};e.exports=function(){return"FORCE_COLOR"in t.env?!0:i("no-color")||i("no-colors")||i("color=false")?!1:i("color")||i("colors")||i("color=true")||i("color=always")?!0:t.stdout&&!t.stdout.isTTY?!1:"win32"===t.platform?!0:"COLORTERM"in t.env?!0:"dumb"===t.env.TERM?!1:/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(t.env.TERM)?!0:!1}()}).call(this,t(8))},{8:8}],21:[function(t,e,n){!function(){"use strict";function t(t){if(null==t)return!1;switch(t.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function n(t){if(null==t)return!1;switch(t.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function r(t){if(null==t)return!1;switch(t.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function i(t){return r(t)||null!=t&&"FunctionDeclaration"===t.type}function s(t){switch(t.type){case"IfStatement":return null!=t.alternate?t.alternate:t.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return t.body}return null}function a(t){var e;if("IfStatement"!==t.type)return!1;if(null==t.alternate)return!1;e=t.consequent;do{if("IfStatement"===e.type&&null==e.alternate)return!0;e=s(e)}while(e);return!1}e.exports={isExpression:t,isStatement:r,isIterationStatement:n,isSourceElement:i,isProblematicIfStatement:a,trailingStatement:s}}()},{}],22:[function(t,e,n){!function(){"use strict";function t(t){return t>=48&&57>=t}function n(t){return t>=48&&57>=t||t>=97&&102>=t||t>=65&&70>=t}function r(t){return t>=48&&55>=t}function i(t){return 32===t||9===t||11===t||12===t||160===t||t>=5760&&h.indexOf(t)>=0}function s(t){return 10===t||13===t||8232===t||8233===t}function a(t){if(65535>=t)return String.fromCharCode(t);var e=String.fromCharCode(Math.floor((t-65536)/1024)+55296),n=String.fromCharCode((t-65536)%1024+56320);return e+n}function o(t){return 128>t?d[t]:f.NonAsciiIdentifierStart.test(a(t))}function u(t){return 128>t?m[t]:f.NonAsciiIdentifierPart.test(a(t))}function l(t){return 128>t?d[t]:c.NonAsciiIdentifierStart.test(a(t))}function p(t){return 128>t?m[t]:c.NonAsciiIdentifierPart.test(a(t))}var c,f,h,d,m,y;for(f={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},c={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},h=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],d=new Array(128),y=0;128>y;++y)d[y]=y>=97&&122>=y||y>=65&&90>=y||36===y||95===y;for(m=new Array(128),y=0;128>y;++y)m[y]=y>=97&&122>=y||y>=65&&90>=y||y>=48&&57>=y||36===y||95===y;e.exports={isDecimalDigit:t,isHexDigit:n,isOctalDigit:r,isWhiteSpace:i,isLineTerminator:s,isIdentifierStartES5:o,isIdentifierPartES5:u,isIdentifierStartES6:l,isIdentifierPartES6:p}}()},{}],23:[function(t,e,n){!function(){"use strict";function n(t){switch(t){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function r(t,e){return e||"yield"!==t?i(t,e):!1}function i(t,e){if(e&&n(t))return!0;switch(t.length){case 2:return"if"===t||"in"===t||"do"===t;case 3:return"var"===t||"for"===t||"new"===t||"try"===t;case 4:return"this"===t||"else"===t||"case"===t||"void"===t||"with"===t||"enum"===t;case 5:return"while"===t||"break"===t||"catch"===t||"throw"===t||"const"===t||"yield"===t||"class"===t||"super"===t;case 6:return"return"===t||"typeof"===t||"delete"===t||"switch"===t||"export"===t||"import"===t;case 7:return"default"===t||"finally"===t||"extends"===t;case 8:return"function"===t||"continue"===t||"debugger"===t;case 10:return"instanceof"===t;default:return!1}}function s(t,e){return"null"===t||"true"===t||"false"===t||r(t,e)}function a(t,e){return"null"===t||"true"===t||"false"===t||i(t,e)}function o(t){return"eval"===t||"arguments"===t}function u(t){var e,n,r;if(0===t.length)return!1;if(r=t.charCodeAt(0),!h.isIdentifierStartES5(r))return!1;for(e=1,n=t.length;n>e;++e)if(r=t.charCodeAt(e),
!h.isIdentifierPartES5(r))return!1;return!0}function l(t,e){return 1024*(t-55296)+(e-56320)+65536}function p(t){var e,n,r,i,s;if(0===t.length)return!1;for(s=h.isIdentifierStartES6,e=0,n=t.length;n>e;++e){if(r=t.charCodeAt(e),r>=55296&&56319>=r){if(++e,e>=n)return!1;if(i=t.charCodeAt(e),!(i>=56320&&57343>=i))return!1;r=l(r,i)}if(!s(r))return!1;s=h.isIdentifierPartES6}return!0}function c(t,e){return u(t)&&!s(t,e)}function f(t,e){return p(t)&&!a(t,e)}var h=t(22);e.exports={isKeywordES5:r,isKeywordES6:i,isReservedWordES5:s,isReservedWordES6:a,isRestrictedWord:o,isIdentifierNameES5:u,isIdentifierNameES6:p,isIdentifierES5:c,isIdentifierES6:f}}()},{22:22}],24:[function(t,e,n){!function(){"use strict";n.ast=t(21),n.code=t(22),n.keyword=t(23)}()},{21:21,22:22,23:23}],25:[function(t,e,n){e.exports=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|((?:0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?))|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-*\/%&|^]|<{1,2}|>{1,3}|!=?|={1,2})=?|[?:~]|[;,.[\](){}])|(\s+)|(^$|[\s\S])/g,e.exports.matchToToken=function(t){var e={type:"invalid",value:t[0]};return t[1]?(e.type="string",e.closed=!(!t[3]&&!t[4])):t[5]?e.type="comment":t[6]?(e.type="comment",e.closed=!!t[7]):t[8]?e.type="regex":t[9]?e.type="number":t[10]?e.type="name":t[11]?e.type="punctuator":t[12]&&(e.type="whitespace"),e}},{}],26:[function(t,e,n){function r(t,e,n){return e in t?t[e]:n}function i(t,e){var n=r.bind(null,e||{}),i=n("transform",Function.prototype),a=n("padding"," "),o=n("before"," "),u=n("after"," | "),l=n("start",1),p=Array.isArray(t),c=p?t:t.split("\n"),f=l+c.length-1,h=String(f).length,d=c.map(function(t,e){var n=l+e,r={before:o,number:n,width:h,after:u,line:t};return i(r),r.before+s(r.number,h,a)+r.after+r.line});return p?d:d.join("\n")}var s=t(27);e.exports=i},{27:27}],27:[function(t,e,n){function r(t,e,n){t=String(t);var r=-1;for(n||(n=" "),e-=t.length;++r<e;)t=n+t;return t}e.exports=r},{}],28:[function(t,e,n){"use strict";var r=t(29);e.exports=function(t,e){if("string"!=typeof t)throw new TypeError("Expected a string as the first argument");if(0>e||!r(e))throw new TypeError("Expected a finite positive number");var n="";do 1&e&&(n+=t),t+=t;while(e>>=1);return n}},{29:29}],29:[function(t,e,n){"use strict";var r=t(30);e.exports=Number.isFinite||function(t){return!("number"!=typeof t||r(t)||t===1/0||t===-(1/0))}},{30:30}],30:[function(t,e,n){"use strict";e.exports=Number.isNaN||function(t){return t!==t}},{}],31:[function(t,e,n){(function(e){"use strict";function r(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return new Function(u.transform(t,e).code)()}function i(t,n,i,s){void 0===i&&(i={}),i.filename=i.filename||t;var a=e.ActiveXObject?new e.ActiveXObject("Microsoft.XMLHTTP"):new e.XMLHttpRequest;a.open("GET",t,!0),"overrideMimeType"in a&&a.overrideMimeType("text/plain"),a.onreadystatechange=function(){if(4===a.readyState){var e=a.status;if(0!==e&&200!==e)throw new Error("Could not load "+t);var o=[a.responseText,i];s||r(o),n&&n(o)}},a.send(null)}function s(){function t(){var e=r[a];e instanceof Array&&(n(e,a),a++,t())}function n(e,n){var s={};e.src?i(e.src,function(e){r[n]=e,t()},s,!0):(s.filename="embedded",r[n]=[e.innerHTML,s])}for(var r=[],s=["text/ecmascript-6","text/6to5","text/babel","module"],a=0,o=e.document.getElementsByTagName("script"),u=0;u<o.length;++u){var l=o[u];s.indexOf(l.type)>=0&&r.push(l)}for(var u=0;u<r.length;u++)n(r[u],u);t()}var a=t(274)["default"],o=t(276)["default"];n.__esModule=!0,n.run=r,n.load=i;var u=t(32);a(n,o(u,a)),e.addEventListener?e.addEventListener("DOMContentLoaded",s,!1):e.attachEvent&&e.attachEvent("onload",s)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{274:274,276:276,32:32}],32:[function(t,e,n){"use strict";function r(t,e,n){l["default"](e)&&(n=e,e={}),e.filename=t,c["default"].readFile(t,function(t,r){var i=void 0;if(!t)try{i=B(r,e)}catch(s){t=s}t?n(t):n(null,i)})}function i(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.filename=t,B(c["default"].readFileSync(t,"utf8"),e)}var s=t(277)["default"],a=t(278)["default"],o=t(279)["default"];n.__esModule=!0,n.transformFile=r,n.transformFileSync=i;var u=t(127),l=s(u),p=t(1),c=s(p),f=t(50),h=a(f),d=t(265),m=a(d),y=t(539),g=a(y),v=t(403),A=s(v),E=t(47),b=s(E),x=t(38);n.File=o(x);var D=t(41);n.options=o(D);var C=t(37);n.buildExternalHelpers=o(C);var F=t(362);n.template=o(F);var S=t(166);n.version=S.version,n.util=h,n.messages=m,n.types=g,n.traverse=A["default"],n.Pipeline=b["default"];var w=new b["default"],B=w.transform.bind(w);n.transform=B;var T=w.transformFromAst.bind(w);n.transformFromAst=T},{1:1,127:127,166:166,265:265,277:277,278:278,279:279,362:362,37:37,38:38,403:403,41:41,47:47,50:50,539:539}],33:[function(t,e,n){"use strict";var r=t(266)["default"],i=t(277)["default"];n.__esModule=!0;var s=t(139),a=i(s);n["default"]=function(t,e){return t&&e?a["default"](t,e,function(t,e){if(e&&Array.isArray(t)){for(var n=e.slice(0),i=t,s=Array.isArray(i),a=0,i=s?i:r(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;n.indexOf(u)<0&&n.push(u)}return n}}):void 0},e.exports=n["default"]},{139:139,266:266,277:277}],34:[function(t,e,n){"use strict";var r=t(278)["default"];n.__esModule=!0;var i=t(539),s=r(i);n["default"]=function(t,e,n){if(t){if("Program"===t.type)return s.file(t,e||[],n||[]);if("File"===t.type)return t}throw new Error("Not a valid ast?")},e.exports=n["default"]},{278:278,539:539}],35:[function(t,e,n){(function(r){"use strict";var i=t(277)["default"];n.__esModule=!0;var s=t(1),a=i(s),o={};n["default"]=function(t){var e=arguments.length<=1||void 0===arguments[1]?r.cwd():arguments[1];if("object"==typeof a["default"])return null;var n=o[e];n||(n=new a["default"],n.paths=a["default"]._nodeModulePaths(e),o[e]=n);try{return a["default"]._resolveFilename(t,n)}catch(i){return null}},e.exports=n["default"]}).call(this,t(8))},{1:1,277:277,8:8}],36:[function(t,e,n){"use strict";var r=t(275)["default"],i=t(273)["default"],s=t(267)["default"];n.__esModule=!0;var a=function(t){function e(){i(this,e),t.call(this),this.dynamicData={}}return r(e,t),e.prototype.setDynamic=function(t,e){this.dynamicData[t]=e},e.prototype.get=function(e){if(this.has(e))return t.prototype.get.call(this,e);if(Object.prototype.hasOwnProperty.call(this.dynamicData,e)){var n=this.dynamicData[e]();return this.set(e,n),n}},e}(s);n["default"]=a,e.exports=n["default"]},{267:267,273:273,275:275}],37:[function(t,e,n){"use strict";function r(t,e){var n=[],r=E.functionExpression(null,[E.identifier("global")],E.blockStatement(n)),i=E.program([E.expressionStatement(E.callExpression(r,[p.get("selfGlobal")]))]);return n.push(E.variableDeclaration("var",[E.variableDeclarator(t,E.assignmentExpression("=",E.memberExpression(E.identifier("global"),t),E.objectExpression([])))])),e(n),i}function i(t,e){var n=[];return n.push(E.variableDeclaration("var",[E.variableDeclarator(t,E.identifier("global"))])),e(n),E.program([b({FACTORY_PARAMETERS:E.identifier("global"),BROWSER_ARGUMENTS:E.assignmentExpression("=",E.memberExpression(E.identifier("root"),t),E.objectExpression([])),COMMON_ARGUMENTS:E.identifier("exports"),AMD_ARGUMENTS:E.arrayExpression([E.stringLiteral("exports")]),FACTORY_BODY:n,UMD_ROOT:E.identifier("this")})])}function s(t,e){var n=[];return n.push(E.variableDeclaration("var",[E.variableDeclarator(t,E.objectExpression([]))])),e(n),E.program(n)}function a(t,e,n){v["default"](p.list,function(r){if(!n||-1!==n.indexOf(r)){var i=E.identifier(E.toIdentifier(r));t.push(E.expressionStatement(E.assignmentExpression("=",E.memberExpression(e,i),p.get(r))))}})}var o=t(278)["default"],u=t(277)["default"];n.__esModule=!0;var l=t(264),p=o(l),c=t(178),f=u(c),h=t(265),d=o(h),m=t(362),y=u(m),g=t(58),v=u(g),A=t(539),E=o(A),b=y["default"]('\n (function (root, factory) {\n if (typeof define === "function" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === "object") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n');n["default"]=function(t){var e=arguments.length<=1||void 0===arguments[1]?"global":arguments[1],n=E.identifier("babelHelpers"),o=function(e){return a(e,n,t)},u=void 0,l={global:r,umd:i,"var":s}[e];if(!l)throw new Error(d.get("unsupportedOutputType",e));return u=l(n,o),f["default"](u).code},e.exports=n["default"]},{178:178,264:264,265:265,277:277,278:278,362:362,539:539,58:58}],38:[function(t,e,n){(function(e){"use strict";var r=t(275)["default"],i=t(273)["default"],s=t(266)["default"],a=t(277)["default"],o=t(278)["default"];n.__esModule=!0;var u=t(264),l=a(u),p=t(40),c=o(p),f=t(51),h=a(f),d=t(43),m=a(d),y=t(48),g=a(y),v=t(152),A=a(v),E=t(403),b=t(154),x=a(b),D=t(178),C=a(D),F=t(12),S=a(F),w=t(136),B=a(w),T=a(E),_=t(39),k=a(_),P=t(36),N=a(P),I=t(622),L=t(50),O=o(L),M=t(7),R=a(M),j=t(539),V=o(j),U=t(45),G=a(U),W=t(46),q=a(W),H=[[G["default"]],[q["default"]]],Y={enter:function(t,e){var n=t.node.loc;n&&(e.loc=n,t.stop())}},J=function(t){function n(e,r){void 0===e&&(e={}),i(this,n),t.call(this),this.pipeline=r,this.log=new k["default"](this,e.filename||"unknown"),this.opts=this.initOptions(e),this.parserOpts={highlightCode:this.opts.highlightCode,nonStandard:this.opts.nonStandard,sourceType:this.opts.sourceType,filename:this.opts.filename,plugins:[]},this.pluginVisitors=[],this.pluginPasses=[],this.pluginStack=[],this.buildPlugins(),this.metadata={usedHelpers:[],marked:[],modules:{imports:[],exports:{exported:[],specifiers:[]}}},this.dynamicImportTypes={},this.dynamicImportIds={},this.dynamicImports=[],this.declarations={},this.usedHelpers={},this.path=null,this.ast={},this.code="",this.shebang="",this.hub=new E.Hub(this)}return r(n,t),n.prototype.getMetadata=function(){for(var t=!1,e=this.ast.program.body,n=Array.isArray(e),r=0,e=n?e:s(e);;){var i;if(n){if(r>=e.length)break;i=e[r++]}else{if(r=e.next(),r.done)break;i=r.value}var a=i;if(V.isModuleDeclaration(a)){t=!0;break}}t&&this.path.traverse(c,this)},n.prototype.initOptions=function(t){t=new m["default"](this.log,this.pipeline).init(t),t.inputSourceMap&&(t.sourceMaps=!0),t.moduleId&&(t.moduleIds=!0),t.basename=R["default"].basename(t.filename,R["default"].extname(t.filename)),t.ignore=O.arrayify(t.ignore,O.regexify),t.only&&(t.only=O.arrayify(t.only,O.regexify)),B["default"](t,{moduleRoot:t.sourceRoot}),B["default"](t,{sourceRoot:t.moduleRoot}),B["default"](t,{filenameRelative:t.filename});var e=R["default"].basename(t.filenameRelative);return B["default"](t,{sourceFileName:e,sourceMapTarget:e}),t},n.prototype.buildPlugins=function(){for(var t=this.opts.plugins.concat(H),e=t,n=Array.isArray(e),r=0,e=n?e:s(e);;){var i;if(n){if(r>=e.length)break;i=e[r++]}else{if(r=e.next(),r.done)break;i=r.value}var a=i,o=a[0],u=a[1];this.pluginStack.push(o),this.pluginVisitors.push(o.visitor),this.pluginPasses.push(new g["default"](this,o,u)),o.manipulateOptions&&o.manipulateOptions(this.opts,this.parserOpts,this)}},n.prototype.getModuleName=function(){var t=this.opts;if(!t.moduleIds)return null;if(null!=t.moduleId&&!t.getModuleId)return t.moduleId;var e=t.filenameRelative,n="";if(null!=t.moduleRoot&&(n=t.moduleRoot+"/"),!t.filenameRelative)return n+t.filename.replace(/^\//,"");if(null!=t.sourceRoot){var r=new RegExp("^"+t.sourceRoot+"/?");e=e.replace(r,"")}return e=e.replace(/\.(\w*?)$/,""),n+=e,n=n.replace(/\\/g,"/"),t.getModuleId?t.getModuleId(n)||n:n},n.prototype.resolveModuleSource=function a(t){var a=this.opts.resolveModuleSource;return a&&(t=a(t,this.opts.filename)),t},n.prototype.addImport=function(t,e){var n=arguments.length<=2||void 0===arguments[2]?e:arguments[2];return function(){var r=t+":"+e,i=this.dynamicImportIds[r];if(!i){t=this.resolveModuleSource(t),i=this.dynamicImportIds[r]=this.scope.generateUidIdentifier(n);var s=[];"*"===e?s.push(V.importNamespaceSpecifier(i)):"default"===e?s.push(V.importDefaultSpecifier(i)):s.push(V.importSpecifier(i,V.identifier(e)));var a=V.importDeclaration(s,V.stringLiteral(t));a._blockHoist=3,this.path.unshiftContainer("body",a)}return i}.apply(this,arguments)},n.prototype.addHelper=function(t){var e=this.declarations[t];if(e)return e;this.usedHelpers[t]||(this.metadata.usedHelpers.push(t),this.usedHelpers[t]=!0);var n=this.get("helperGenerator"),r=this.get("helpersNamespace");if(n){var i=n(t);if(i)return i}else if(r){var s=V.identifier(V.toIdentifier(t));return V.memberExpression(r,s)}var a=l["default"](t),o=this.declarations[t]=this.scope.generateUidIdentifier(t);return V.isFunctionExpression(a)&&!a.id?(a.body._compact=!0,a._generated=!0,a.id=o,a.type="FunctionDeclaration",this.path.unshiftContainer("body",a)):(a._compact=!0,this.scope.push({id:o,init:a,unique:!0})),o},n.prototype.addTemplateObject=function(t,e,n){var r=n.elements.map(function(t){return t.value}),i=t+"_"+n.elements.length+"_"+r.join(","),s=this.declarations[i];if(s)return s;var a=this.declarations[i]=this.scope.generateUidIdentifier("templateObject"),o=this.addHelper(t),u=V.callExpression(o,[e,n]);return u._compact=!0,this.scope.push({id:a,init:u,_blockHoist:1.9}),a},n.prototype.buildCodeFrameError=function(t,e){var n=arguments.length<=2||void 0===arguments[2]?SyntaxError:arguments[2],r=t&&(t.loc||t._loc),i=new n(e);return r?i.loc=r.start:(T["default"](t,Y,this.scope,i),i.message+=" (This is an error on an internal node. Probably an internal error",i.loc&&(i.message+=". Location has been estimated."),i.message+=")"),i},n.prototype.mergeSourceMap=function(t){var e=this.opts.inputSourceMap;if(!e)return t;var n=function(){var n=new x["default"].SourceMapConsumer(e),r=new x["default"].SourceMapConsumer(t),i=new x["default"].SourceMapGenerator({file:n.file,sourceRoot:n.sourceRoot});n.eachMapping(function(t){i.addMapping({source:n.file,original:{line:t.originalLine,column:t.originalColumn},generated:r.generatedPositionFor({line:t.generatedLine,column:t.generatedColumn,source:r.file})})});var s=i.toJSON();return e.mappings=s.mappings,{v:e}}();return"object"==typeof n?n.v:void 0},n.prototype.parse=function(t){this.log.debug("Parse start");var e=I.parse(t,this.parserOpts);return this.log.debug("Parse stop"),e},n.prototype._addAst=function(t){this.path=E.NodePath.get({hub:this.hub,parentPath:null,parent:t,container:t,key:"program"}).setContext(),this.scope=this.path.scope,this.ast=t,this.getMetadata()},n.prototype.addAst=function(t){this.log.debug("Start set AST"),this._addAst(t),this.log.debug("End set AST")},n.prototype.transform=function(){return this.call("pre"),this.log.debug("Start transform traverse"),T["default"](this.ast,T["default"].visitors.merge(this.pluginVisitors,this.pluginPasses),this.scope),this.log.debug("End transform traverse"),this.call("post"),this.generate()},n.prototype.wrap=function(t,n){t+="";try{return this.shouldIgnore()?this.makeResult({code:t,ignored:!0}):n()}catch(r){if(r._babel)throw r;r._babel=!0;var i=r.message=this.opts.filename+": "+r.message,s=r.loc;if(s&&(r.codeFrame=S["default"](t,s.line,s.column+1,this.opts),i+="\n"+r.codeFrame),e.browser&&(r.message=i),r.stack){var a=r.stack.replace(r.message,i);try{r.stack=a}catch(o){}}throw r}},n.prototype.addCode=function(t){t=(t||"")+"",t=this.parseInputSourceMap(t),this.code=t},n.prototype.parseCode=function(){this.parseShebang();var t=this.parse(this.code);this.addAst(t)},n.prototype.shouldIgnore=function(){var t=this.opts;return O.shouldIgnore(t.filename,t.ignore,t.only)},n.prototype.call=function(t){for(var e=this.pluginPasses,n=Array.isArray(e),r=0,e=n?e:s(e);;){var i;if(n){if(r>=e.length)break;i=e[r++]}else{if(r=e.next(),r.done)break;i=r.value}var a=i,o=a.plugin,u=o[t];u&&u.call(a,this)}},n.prototype.parseInputSourceMap=function(t){var e=this.opts;if(e.inputSourceMap!==!1){var n=h["default"].fromSource(t);n&&(e.inputSourceMap=n.toObject(),t=h["default"].removeComments(t))}return t},n.prototype.parseShebang=function(){var t=A["default"].exec(this.code);t&&(this.shebang=t[0],this.code=this.code.replace(A["default"],""))},n.prototype.makeResult=function(t){var e=t.code,n=t.map,r=t.ast,i=t.ignored,s={metadata:null,options:this.opts,ignored:!!i,code:null,ast:null,map:n||null};return this.opts.code&&(s.code=e),this.opts.ast&&(s.ast=r),this.opts.metadata&&(s.metadata=this.metadata),s},n.prototype.generate=function(){var t=this.opts,e=this.ast,n={ast:e};if(!t.code)return this.makeResult(n);this.log.debug("Generation start");var r=C["default"](e,t,this.code);return n.code=r.code,n.map=r.map,this.log.debug("Generation end"),this.shebang&&(n.code=this.shebang+"\n"+n.code),n.map&&(n.map=this.mergeSourceMap(n.map)),("inline"===t.sourceMaps||"both"===t.sourceMaps)&&(n.code+="\n"+h["default"].fromObject(n.map).toComment()),"inline"===t.sourceMaps&&(n.map=null),this.makeResult(n)},n}(N["default"]);n["default"]=J,n.File=J}).call(this,t(8))},{12:12,136:136,152:152,154:154,178:178,264:264,266:266,273:273,275:275,277:277,278:278,36:36,39:39,40:40,403:403,43:43,45:45,46:46,48:48,50:50,51:51,539:539,622:622,7:7,8:8}],39:[function(t,e,n){"use strict";var r=t(273)["default"],i=t(277)["default"];n.__esModule=!0;var s=t(53),a=i(s),o=a["default"]("babel:verbose"),u=a["default"]("babel"),l=[],p=function(){function t(e,n){r(this,t),this.filename=n,this.file=e}return t.prototype._buildMessage=function(t){var e="[BABEL] "+this.filename;return t&&(e+=": "+t),e},t.prototype.warn=function(t){console.warn(this._buildMessage(t))},t.prototype.error=function(t){var e=arguments.length<=1||void 0===arguments[1]?Error:arguments[1];throw new e(this._buildMessage(t))},t.prototype.deprecate=function(t){this.file.opts&&this.file.opts.suppressDeprecationMessages||(t=this._buildMessage(t),l.indexOf(t)>=0||(l.push(t),console.error(t)))},t.prototype.verbose=function(t){o.enabled&&o(this._buildMessage(t))},t.prototype.debug=function(t){u.enabled&&u(this._buildMessage(t))},t.prototype.deopt=function(t,e){this.debug(e)},t}();n["default"]=p,e.exports=n["default"]},{273:273,277:277,53:53}],40:[function(t,e,n){"use strict";function r(t,e){var n=t.node,r=n.source?n.source.value:null,i=e.metadata.modules.exports,a=t.get("declaration");if(a.isStatement()){var o=a.getBindingIdentifiers();for(var l in o)i.exported.push(l),i.specifiers.push({kind:"local",local:l,exported:t.isExportDefaultDeclaration()?"default":l})}if(t.isExportNamedDeclaration()&&n.specifiers)for(var p=n.specifiers,c=Array.isArray(p),f=0,p=c?p:s(p);;){var h;if(c){if(f>=p.length)break;h=p[f++]}else{if(f=p.next(),f.done)break;h=f.value}var d=h,m=d.exported.name;i.exported.push(m),u.isExportDefaultSpecifier(d)&&i.specifiers.push({kind:"external",local:m,exported:m,source:r}),u.isExportNamespaceSpecifier(d)&&i.specifiers.push({kind:"external-namespace",exported:m,source:r});var y=d.local;y&&(r&&i.specifiers.push({kind:"external",local:y.name,exported:m,source:r}),r||i.specifiers.push({kind:"local",local:y.name,exported:m}))}t.isExportAllDeclaration()&&i.specifiers.push({kind:"external-all",source:r})}function i(t){t.skip()}var s=t(266)["default"],a=t(278)["default"];n.__esModule=!0,n.ExportDeclaration=r,n.Scope=i;var o=t(539),u=a(o),l={enter:function(t,e){var n=t.node;n.source&&(n.source.value=e.resolveModuleSource(n.source.value))}};n.ModuleDeclaration=l;var p={exit:function(t,e){var n=t.node,r=[],i=[];e.metadata.modules.imports.push({source:n.source.value,imported:i,specifiers:r});for(var a=t.get("specifiers"),o=Array.isArray(a),u=0,a=o?a:s(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var p=l,c=p.node.local.name;if(p.isImportDefaultSpecifier()&&(i.push("default"),r.push({kind:"named",imported:"default",local:c})),p.isImportSpecifier()){var f=p.node.imported.name;i.push(f),r.push({kind:"named",imported:f,local:c})}p.isImportNamespaceSpecifier()&&(i.push("*"),r.push({kind:"namespace",local:c}))}}};n.ImportDeclaration=p},{266:266,278:278,539:539}],41:[function(t,e,n){"use strict";e.exports={filename:{type:"filename",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc","default":"unknown",shorthand:"f"},filenameRelative:{hidden:!0,type:"string"},inputSourceMap:{hidden:!0},env:{hidden:!0,"default":{}},mode:{description:"",hidden:!0},retainLines:{type:"boolean","default":!1,description:"retain line numbers - will result in really ugly code"},highlightCode:{description:"enable/disable ANSI syntax highlighting of code frames (on by default)",type:"boolean","default":!0},suppressDeprecationMessages:{type:"boolean","default":!1,hidden:!0},presets:{type:"list",description:"","default":[]},plugins:{type:"list","default":[],description:""},ignore:{type:"list",description:"list of glob paths to **not** compile","default":[]},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:!0,"default":!0,type:"boolean"},metadata:{hidden:!0,"default":!0,type:"boolean"},ast:{hidden:!0,"default":!0,type:"boolean"},comments:{type:"boolean","default":!0,description:"strip/output comments in generated output (on by default)"},shouldPrintComment:{hidden:!0,description:"optional callback to control whether a comment should be inserted, when this is used the comments option is ignored"},compact:{type:"booleanString","default":"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},sourceMap:{alias:"sourceMaps",hidden:!0},sourceMaps:{type:"booleanString",description:"[true|false|inline]","default":!1,shorthand:"s"},sourceMapTarget:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"filename",description:"the root from which all sources are relative"},babelrc:{description:"Whether or not to look up .babelrc and .babelignore files",type:"boolean","default":!0},sourceType:{description:"","default":"module"},auxiliaryCommentBefore:{type:"string",description:"print a comment before any injected non-user code"},auxiliaryCommentAfter:{type:"string",description:"print a comment after any injected non-user code"},resolveModuleSource:{hidden:!0},getModuleId:{hidden:!0},moduleRoot:{type:"filename",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},moduleIds:{type:"boolean","default":!1,shorthand:"M",description:"insert an explicit id for modules"},moduleId:{description:"specify a custom name for module ids",type:"string"}}},{}],42:[function(t,e,n){"use strict";function r(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];for(var e in t){var n=t[e];if(null!=n){var r=l["default"][e];if(r&&r.alias&&(r=l["default"][r.alias]),r){var i=o[r.type];i&&(n=i(n)),t[e]=n}}}return t}var i=t(278)["default"],s=t(277)["default"];n.__esModule=!0,n.normaliseOptions=r;var a=t(44),o=i(a),u=t(41),l=s(u);n.config=l["default"]},{277:277,278:278,41:41,44:44}],43:[function(t,e,n){(function(r){"use strict";function i(t){var e=O[t];return null==e?O[t]=D["default"].sync(t):e}var s=t(273)["default"],a=t(266)["default"],o=t(278)["default"],u=t(277)["default"];n.__esModule=!0;var l=t(32),p=o(l),c=t(49),f=u(c),h=t(265),d=o(h),m=t(42),y=t(35),g=u(y),v=t(55),A=u(v),E=t(151),b=u(E),x=t(150),D=u(x),C=t(123),F=u(C),S=t(122),w=u(S),B=t(33),T=u(B),_=t(41),k=u(_),P=t(7),N=u(P),I=t(1),L=u(I),O={},M={},R=".babelignore",j=".babelrc",V="package.json",U=function(){function e(t){s(this,e),this.resolvedConfigs=[],this.options=e.createBareOptions(),this.log=t}return e.memoisePluginContainer=function(t,n,r){for(var i=e.memoisedPlugins,s=Array.isArray(i),o=0,i=s?i:a(i);;){var u;if(s){if(o>=i.length)break;u=i[o++]}else{if(o=i.next(),o.done)break;u=o.value}var l=u;if(l.container===t)return l.plugin}var c=void 0;if(c="function"==typeof t?t(p):t,"object"==typeof c){var h=new f["default"](c);return e.memoisedPlugins.push({container:t,plugin:h}),h}throw new TypeError(d.get("pluginNotObject",n,r,typeof c)+n+r)},e.createBareOptions=function(){var t={};for(var e in k["default"]){var n=k["default"][e];t[e]=w["default"](n["default"])}return t},e.normalisePlugin=function(t,n,r){if(!(t instanceof f["default"])){if("function"!=typeof t&&"object"!=typeof t)throw new TypeError(d.get("pluginNotFunction",n,r,typeof t));t=e.memoisePluginContainer(t,n,r)}return t.init(n,r),t},e.normalisePlugins=function(n,r,i){return i.map(function(i,s){var a=void 0,o=void 0;if(Array.isArray(i)?(a=i[0],o=i[1]):a=i,"string"==typeof a){var u=g["default"]("babel-plugin-"+a,r)||g["default"](a,r);if(!u)throw new ReferenceError(d.get("pluginUnknown",a,n,s));a=t(u),a=a.__esModule?a["default"]:a}return a=e.normalisePlugin(a,n,s),[a,o]})},e.prototype.addConfig=function(t,e){var n=arguments.length<=2||void 0===arguments[2]?A["default"]:arguments[2];if(!(this.resolvedConfigs.indexOf(t)>=0)){var r=L["default"].readFileSync(t,"utf8"),i=void 0;try{i=M[r]=M[r]||n.parse(r),e&&(i=i[e])}catch(s){throw s.message=t+": Error while parsing JSON - "+s.message,s}this.mergeOptions(i,t),this.resolvedConfigs.push(t)}},e.prototype.mergeOptions=function(t,n,i,s){if(void 0===n&&(n="foreign"),t){("object"!=typeof t||Array.isArray(t))&&this.log.error("Invalid options type for "+n,TypeError);var a=F["default"](t,function(t){return t instanceof f["default"]?t:void 0});s=s||r.cwd(),i=i||n;for(var o in a){var u=k["default"][o];!u&&this.log&&this.log.error("Unknown option: "+n+"."+o,ReferenceError)}if(m.normaliseOptions(a),a.plugins&&(a.plugins=e.normalisePlugins(i,s,a.plugins)),a["extends"]){var l=g["default"](a["extends"],s);l?this.addConfig(l):this.log&&this.log.error("Couldn't resolve extends clause of "+a["extends"]+" in "+n),delete a["extends"]}a.presets&&(this.mergePresets(a.presets,s),delete a.presets);var p=void 0,c=r.env.BABEL_ENV||r.env.NODE_ENV||"development";a.env&&(p=a.env[c],delete a.env),T["default"](this.options,a),this.mergeOptions(p,n+".env."+c)}},e.prototype.mergePresets=function(e,n){for(var r=e,i=Array.isArray(r),s=0,r=i?r:a(r);;){var o;if(i){if(s>=r.length)break;o=r[s++]}else{if(s=r.next(),s.done)break;o=s.value}var u=o;if("string"==typeof u){var l=g["default"]("babel-preset-"+u,n)||g["default"](u,n);if(!l)throw new Error("Couldn't find preset "+JSON.stringify(u));var p=t(l);this.mergeOptions(p,l,l,N["default"].dirname(l))}else{if("object"!=typeof u)throw new Error("todo");this.mergeOptions(u)}}},e.prototype.addIgnoreConfig=function(t){var e=L["default"].readFileSync(t,"utf8"),n=e.split("\n");n=n.map(function(t){return t.replace(/#(.*?)$/,"").trim()}).filter(function(t){return!!t}),this.mergeOptions({ignore:n},t)},e.prototype.findConfigs=function(t){if(t){b["default"](t)||(t=N["default"].join(r.cwd(),t));for(var e=!1,n=!1;t!==(t=N["default"].dirname(t));){if(!e){var s=N["default"].join(t,j);i(s)&&(this.addConfig(s),e=!0);var a=N["default"].join(t,V);i(a)&&(this.addConfig(a,"babel",JSON),e=!0)}if(!n){var o=N["default"].join(t,R);i(o)&&(this.addIgnoreConfig(o),n=!0)}if(n&&e)return}}},e.prototype.normaliseOptions=function(){var t=this.options;for(var e in k["default"]){var n=k["default"][e],r=t[e];(r||!n.optional)&&(n.alias?t[n.alias]=t[n.alias]||r:t[e]=r)}},e.prototype.init=function(t){return t.babelrc!==!1&&this.findConfigs(t.filename),this.mergeOptions(t,"base"),this.normaliseOptions(t),this.options},e}();n["default"]=U,U.memoisedPlugins=[],e.exports=n["default"]}).call(this,t(8))},{1:1,122:122,123:123,150:150,151:151,265:265,266:266,273:273,277:277,278:278,32:32,33:33,35:35,41:41,42:42,49:49,55:55,7:7,8:8}],44:[function(t,e,n){"use strict";function r(t){return+t}function i(t){return!!t}function s(t){return f.booleanify(t)}function a(t){return f.list(t)}var o=t(277)["default"],u=t(278)["default"];n.__esModule=!0,n.number=r,n["boolean"]=i,n.booleanString=s,n.list=a;var l=t(153),p=o(l),c=t(50),f=u(c),h=p["default"];n.filename=h},{153:153,277:277,278:278,50:50}],45:[function(t,e,n){"use strict";var r=t(277)["default"];n.__esModule=!0;var i=t(49),s=r(i),a=t(61),o=r(a);n["default"]=new s["default"]({visitor:{Block:{exit:function(t){for(var e=t.node,n=!1,r=0;r<e.body.length;r++){var i=e.body[r];if(i&&null!=i._blockHoist){n=!0;break}}n&&(e.body=o["default"](e.body,function(t){var e=t&&t._blockHoist;return null==e&&(e=1),e===!0&&(e=2),-1*e}))}}}}),e.exports=n["default"]},{277:277,49:49,61:61}],46:[function(t,e,n){"use strict";function r(t,e){return t.is("_forceShadow")?!0:e&&!e.isArrowFunctionExpression()}function i(t,e,n){var i=t.inShadow(e);if(r(t,i)){var s=t.node._shadowedFunctionLiteral,a=void 0,o=t.findParent(function(t){return(t.isProgram()||t.isFunction())&&(a=a||t),t.isProgram()?!0:t.isFunction()?s?t===s||t.node===s.node:!t.is("shadow"):!1});if(o!==a){var u=o.getData(e);if(u)return t.replaceWith(u);var l=n(),p=t.scope.generateUidIdentifier(e);return o.setData(e,p),o.scope.push({id:p,init:l}),t.replaceWith(p)}}}var s=t(277)["default"],a=t(278)["default"];n.__esModule=!0;var o=t(49),u=s(o),l=t(539),p=a(l);n["default"]=new u["default"]({visitor:{ThisExpression:function(t){i(t,"this",function(){return p.thisExpression()})},ReferencedIdentifier:function(t){"arguments"===t.node.name&&i(t,"arguments",function(){return p.identifier("arguments")})}}}),e.exports=n["default"]},{277:277,278:278,49:49,539:539}],47:[function(t,e,n){"use strict";var r=t(273)["default"],i=t(277)["default"];n.__esModule=!0;var s=t(34),a=i(s),o=t(38),u=i(o),l=function(){function t(){r(this,t)}return t.prototype.lint=function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.code=!1,e.mode="lint",this.transform(t,e)},t.prototype.pretransform=function(t,e){var n=new u["default"](e,this);return n.wrap(t,function(){return n.addCode(t),n.parseCode(t),n})},t.prototype.transform=function(t,e){var n=new u["default"](e,this);return n.wrap(t,function(){return n.addCode(t),n.parseCode(t),n.transform()})},t.prototype.transformFromAst=function(t,e,n){t=a["default"](t);var r=new u["default"](n,this);return r.wrap(e,function(){return r.addCode(e),r.addAst(t),r.transform()})},t}();n["default"]=l,e.exports=n["default"]},{273:273,277:277,34:34,38:38}],48:[function(t,e,n){"use strict";var r=t(275)["default"],i=t(273)["default"],s=t(277)["default"];n.__esModule=!0;var a=t(36),o=s(a),u=t(403),l=s(u),p=t(38),c=(s(p),function(t){function e(n,r){var s=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];i(this,e),t.call(this),this.plugin=r,this.file=n,this.opts=s}return r(e,t),e.prototype.transform=function(){var t=this.file;t.log.debug("Start transformer "+this.key),l["default"](t.ast,this.plugin.visitor,t.scope,t),t.log.debug("Finish transformer "+this.key)},e.prototype.addHelper=function(){var t;return(t=this.file).addHelper.apply(t,arguments)},e.prototype.addImport=function(){var t;return(t=this.file).addImport.apply(t,arguments)},e.prototype.getModuleName=function(){var t;return(t=this.file).getModuleName.apply(t,arguments)},e.prototype.buildCodeFrameError=function(){var t;return(t=this.file).buildCodeFrameError.apply(t,arguments)},e}(o["default"]));n["default"]=c,e.exports=n["default"]},{273:273,275:275,277:277,36:36,38:38,403:403}],49:[function(t,e,n){"use strict";var r=t(275)["default"],i=t(273)["default"],s=t(266)["default"],a=t(277)["default"],o=t(278)["default"];n.__esModule=!0;var u=t(43),l=a(u),p=t(265),c=o(p),f=t(36),h=a(f),d=t(403),m=a(d),y=t(135),g=a(y),v=t(122),A=a(v),E=function(t){function e(n){i(this,e),t.call(this),this.initialized=!1,this.raw=g["default"]({},n),this.manipulateOptions=this.take("manipulateOptions"),this.post=this.take("post"),this.pre=this.take("pre"),this.visitor=this.normalize(A["default"](this.take("visitor"))||{});
}return r(e,t),e.prototype.take=function(t){var e=this.raw[t];return delete this.raw[t],e},e.prototype.chain=function(t,e){if(!t[e])return this[e];if(!this[e])return t[e];var n=[t[e],this[e]];return function(){for(var t=void 0,e=arguments.length,r=Array(e),i=0;e>i;i++)r[i]=arguments[i];for(var a=n,o=Array.isArray(a),u=0,a=o?a:s(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var p=l;if(p){var c=p.apply(this,r);null!=c&&(t=c)}}return t}},e.prototype.maybeInherit=function(t){var e=this.take("inherits");e&&(e=l["default"].normalisePlugin(e,t,"inherits"),this.manipulateOptions=this.chain(e,"manipulateOptions"),this.post=this.chain(e,"post"),this.pre=this.chain(e,"pre"),this.visitor=m["default"].visitors.merge([e.visitor,this.visitor]))},e.prototype.init=function(t,e){if(!this.initialized){this.initialized=!0,this.maybeInherit(t);for(var n in this.raw)throw new Error(c.get("pluginInvalidProperty",t,e,n))}},e.prototype.normalize=function(t){return m["default"].explode(t),t},e}(h["default"]);n["default"]=E,e.exports=n["default"]},{122:122,135:135,265:265,266:266,273:273,275:275,277:277,278:278,36:36,403:403,43:43}],50:[function(t,e,n){"use strict";function r(t,e){var n=e||r.EXTENSIONS,i=w["default"].extname(t);return b["default"](n,i)}function i(t){return t?Array.isArray(t)?t:"string"==typeof t?t.split(","):[t]:[]}function s(t){if(!t)return new RegExp(/.^/);if(Array.isArray(t)&&(t=new RegExp(t.map(h["default"]).join("|"),"i")),"string"==typeof t){t=T["default"](t),(m["default"](t,"./")||m["default"](t,"*/"))&&(t=t.slice(2)),m["default"](t,"**/")&&(t=t.slice(3));var e=A["default"].makeRe(t,{nocase:!0});return new RegExp(e.source.slice(1,-1),"i")}if(F["default"](t))return t;throw new TypeError("illegal type for regexify")}function a(t,e){return t?g["default"](t)?a([t],e):D["default"](t)?a(i(t),e):Array.isArray(t)?(e&&(t=t.map(e)),t):[t]:[]}function o(t){return"true"===t||1==t?!0:"false"!==t&&0!=t&&t?t:!1}function u(t,e,n){if(void 0===e&&(e=[]),t=T["default"](t),n){for(var r=n,i=Array.isArray(r),s=0,r=i?r:p(r);;){var a;if(i){if(s>=r.length)break;a=r[s++]}else{if(s=r.next(),s.done)break;a=s.value}var o=a;if(l(o,t))return!1}return!0}if(e.length)for(var u=e,c=Array.isArray(u),f=0,u=c?u:p(u);;){var h;if(c){if(f>=u.length)break;h=u[f++]}else{if(f=u.next(),f.done)break;h=f.value}var o=h;if(l(o,t))return!0}return!1}function l(t,e){return"function"==typeof t?t(e):t.test(e)}var p=t(266)["default"],c=t(277)["default"];n.__esModule=!0,n.canCompile=r,n.list=i,n.regexify=s,n.arrayify=a,n.booleanify=o,n.shouldIgnore=u;var f=t(142),h=c(f),d=t(143),m=c(d),y=t(126),g=c(y),v=t(146),A=c(v),E=t(57),b=c(E),x=t(132),D=c(x),C=t(131),F=c(C),S=t(7),w=c(S),B=t(153),T=c(B),_=t(11);n.inherits=_.inherits,n.inspect=_.inspect,r.EXTENSIONS=[".js",".jsx",".es6",".es"]},{11:11,126:126,131:131,132:132,142:142,143:143,146:146,153:153,266:266,277:277,57:57,7:7}],51:[function(t,e,n){(function(e){"use strict";function r(t){return new e(t,"base64").toString()}function i(t){return t.split(",").pop()}function s(t,e){var n=c.exec(t);c.lastIndex=0;var r=n[1]||n[2],i=l.join(e,r);try{return u.readFileSync(i,"utf8")}catch(s){throw new Error("An error occurred while trying to read the map file at "+i+"\n"+s)}}function a(t,e){e=e||{},e.isFileComment&&(t=s(t,e.commentFileDir)),e.hasComment&&(t=i(t)),e.isEncoded&&(t=r(t)),(e.isJSON||e.isEncoded)&&(t=JSON.parse(t)),this.sourcemap=t}function o(t){for(var e,r=t.split("\n"),i=r.length-1;i>0;i--)if(e=r[i],~e.indexOf("sourceMappingURL=data:"))return n.fromComment(e)}var u=t(1),l=t(7),p=/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+;)?base64,(.*)$/gm,c=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/gm;a.prototype.toJSON=function(t){return JSON.stringify(this.sourcemap,null,t)},a.prototype.toBase64=function(){var t=this.toJSON();return new e(t).toString("base64")},a.prototype.toComment=function(t){var e=this.toBase64(),n="sourceMappingURL=data:application/json;base64,"+e;return t&&t.multiline?"/*# "+n+" */":"//# "+n},a.prototype.toObject=function(){return JSON.parse(this.toJSON())},a.prototype.addProperty=function(t,e){if(this.sourcemap.hasOwnProperty(t))throw new Error("property %s already exists on the sourcemap, use set property instead");return this.setProperty(t,e)},a.prototype.setProperty=function(t,e){return this.sourcemap[t]=e,this},a.prototype.getProperty=function(t){return this.sourcemap[t]},n.fromObject=function(t){return new a(t)},n.fromJSON=function(t){return new a(t,{isJSON:!0})},n.fromBase64=function(t){return new a(t,{isEncoded:!0})},n.fromComment=function(t){return t=t.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),new a(t,{isEncoded:!0,hasComment:!0})},n.fromMapFileComment=function(t,e){return new a(t,{commentFileDir:e,isFileComment:!0,isJSON:!0})},n.fromSource=function(t,e){if(e)return o(t);var r=t.match(p);return p.lastIndex=0,r?n.fromComment(r.pop()):null},n.fromMapFileSource=function(t,e){var r=t.match(c);return c.lastIndex=0,r?n.fromMapFileComment(r.pop(),e):null},n.removeComments=function(t){return p.lastIndex=0,t.replace(p,"")},n.removeMapFileComments=function(t){return c.lastIndex=0,t.replace(c,"")},Object.defineProperty(n,"commentRegex",{get:function(){return p.lastIndex=0,p}}),Object.defineProperty(n,"mapFileCommentRegex",{get:function(){return c.lastIndex=0,c}})}).call(this,t(2).Buffer)},{1:1,2:2,7:7}],52:[function(t,e,n){function r(){return n.colors[p++%n.colors.length]}function i(t){function e(){}function i(){var t=i,e=+new Date,s=e-(l||e);t.diff=s,t.prev=l,t.curr=e,l=e,null==t.useColors&&(t.useColors=n.useColors()),null==t.color&&t.useColors&&(t.color=r());var a=Array.prototype.slice.call(arguments);a[0]=n.coerce(a[0]),"string"!=typeof a[0]&&(a=["%o"].concat(a));var o=0;a[0]=a[0].replace(/%([a-z%])/g,function(e,r){if("%%"===e)return e;o++;var i=n.formatters[r];if("function"==typeof i){var s=a[o];e=i.call(t,s),a.splice(o,1),o--}return e}),"function"==typeof n.formatArgs&&(a=n.formatArgs.apply(t,a));var u=i.log||n.log||console.log.bind(console);u.apply(t,a)}e.enabled=!1,i.enabled=!0;var s=n.enabled(t)?i:e;return s.namespace=t,s}function s(t){n.save(t);for(var e=(t||"").split(/[\s,]+/),r=e.length,i=0;r>i;i++)e[i]&&(t=e[i].replace(/\*/g,".*?"),"-"===t[0]?n.skips.push(new RegExp("^"+t.substr(1)+"$")):n.names.push(new RegExp("^"+t+"$")))}function a(){n.enable("")}function o(t){var e,r;for(e=0,r=n.skips.length;r>e;e++)if(n.skips[e].test(t))return!1;for(e=0,r=n.names.length;r>e;e++)if(n.names[e].test(t))return!0;return!1}function u(t){return t instanceof Error?t.stack||t.message:t}n=e.exports=i,n.coerce=u,n.disable=a,n.enable=s,n.enabled=o,n.humanize=t(54),n.names=[],n.skips=[],n.formatters={};var l,p=0},{54:54}],53:[function(t,e,n){(function(r){function i(){var t=(r.env.DEBUG_COLORS||"").trim().toLowerCase();return 0===t.length?p.isatty(f):"0"!==t&&"no"!==t&&"false"!==t&&"disabled"!==t}function s(){var t=arguments,e=this.useColors,r=this.namespace;if(e){var i=this.color;t[0]=" [3"+i+";1m"+r+" [0m"+t[0]+"[3"+i+"m +"+n.humanize(this.diff)+"[0m"}else t[0]=(new Date).toUTCString()+" "+r+" "+t[0];return t}function a(){return h.write(c.format.apply(this,arguments)+"\n")}function o(t){null==t?delete r.env.DEBUG:r.env.DEBUG=t}function u(){return r.env.DEBUG}function l(e){var n,i=r.binding("tty_wrap");switch(i.guessHandleType(e)){case"TTY":n=new p.WriteStream(e),n._type="tty",n._handle&&n._handle.unref&&n._handle.unref();break;case"FILE":var s=t(1);n=new s.SyncWriteStream(e,{autoClose:!1}),n._type="fs";break;case"PIPE":case"TCP":var a=t(1);n=new a.Socket({fd:e,readable:!1,writable:!0}),n.readable=!1,n.read=null,n._type="pipe",n._handle&&n._handle.unref&&n._handle.unref();break;default:throw new Error("Implement me. Unknown stream file type!")}return n.fd=e,n._isStdio=!0,n}var p=t(9),c=t(11);n=e.exports=t(52),n.log=a,n.formatArgs=s,n.save=o,n.load=u,n.useColors=i,n.colors=[6,2,3,4,5,1];var f=parseInt(r.env.DEBUG_FD,10)||2,h=1===f?r.stdout:2===f?r.stderr:l(f),d=4===c.inspect.length?function(t,e){return c.inspect(t,void 0,void 0,e)}:function(t,e){return c.inspect(t,{colors:e})};n.formatters.o=function(t){return d(t,this.useColors).replace(/\s*\n\s*/g," ")},n.enable(u())}).call(this,t(8))},{1:1,11:11,52:52,8:8,9:9}],54:[function(t,e,n){function r(t){if(t=""+t,!(t.length>1e4)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*c;case"days":case"day":case"d":return n*p;case"hours":case"hour":case"hrs":case"hr":case"h":return n*l;case"minutes":case"minute":case"mins":case"min":case"m":return n*u;case"seconds":case"second":case"secs":case"sec":case"s":return n*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}}function i(t){return t>=p?Math.round(t/p)+"d":t>=l?Math.round(t/l)+"h":t>=u?Math.round(t/u)+"m":t>=o?Math.round(t/o)+"s":t+"ms"}function s(t){return a(t,p,"day")||a(t,l,"hour")||a(t,u,"minute")||a(t,o,"second")||t+" ms"}function a(t,e,n){return e>t?void 0:1.5*e>t?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}var o=1e3,u=60*o,l=60*u,p=24*l,c=365.25*p;e.exports=function(t,e){return e=e||{},"string"==typeof t?r(t):e["long"]?s(t):i(t)}},{}],55:[function(t,e,n){var r="object"==typeof n?n:{};r.parse=function(){"use strict";var t,e,n,r,i={"'":"'",'"':'"',"\\":"\\","/":"/","\n":"",b:"\b",f:"\f",n:"\n",r:"\r",t:" "},s=[" "," ","\r","\n","","\f"," ","\ufeff"],a=function(e){var r=new SyntaxError;throw r.message=e,r.at=t,r.text=n,r},o=function(r){return r&&r!==e&&a("Expected '"+r+"' instead of '"+e+"'"),e=n.charAt(t),t+=1,e},u=function(){return n.charAt(t)},l=function(){var t=e;for("_"!==e&&"$"!==e&&("a">e||e>"z")&&("A">e||e>"Z")&&a("Bad identifier");o()&&("_"===e||"$"===e||e>="a"&&"z">=e||e>="A"&&"Z">=e||e>="0"&&"9">=e);)t+=e;return t},p=function(){var t,n="",r="",i=10;if(("-"===e||"+"===e)&&(n=e,o(e)),"I"===e)return t=y(),("number"!=typeof t||isNaN(t))&&a("Unexpected word for number"),"-"===n?-t:t;if("N"===e)return t=y(),isNaN(t)||a("expected word to be NaN"),t;switch("0"===e&&(r+=e,o(),"x"===e||"X"===e?(r+=e,o(),i=16):e>="0"&&"9">=e&&a("Octal literal")),i){case 10:for(;e>="0"&&"9">=e;)r+=e,o();if("."===e)for(r+=".";o()&&e>="0"&&"9">=e;)r+=e;if("e"===e||"E"===e)for(r+=e,o(),("-"===e||"+"===e)&&(r+=e,o());e>="0"&&"9">=e;)r+=e,o();break;case 16:for(;e>="0"&&"9">=e||e>="A"&&"F">=e||e>="a"&&"f">=e;)r+=e,o()}return t="-"===n?-r:+r,isFinite(t)?t:void a("Bad number")},c=function(){var t,n,r,s,l="";if('"'===e||"'"===e)for(r=e;o();){if(e===r)return o(),l;if("\\"===e)if(o(),"u"===e){for(s=0,n=0;4>n&&(t=parseInt(o(),16),isFinite(t));n+=1)s=16*s+t;l+=String.fromCharCode(s)}else if("\r"===e)"\n"===u()&&o();else{if("string"!=typeof i[e])break;l+=i[e]}else{if("\n"===e)break;l+=e}}a("Bad string")},f=function(){"/"!==e&&a("Not an inline comment");do if(o(),"\n"===e||"\r"===e)return void o();while(e)},h=function(){"*"!==e&&a("Not a block comment");do for(o();"*"===e;)if(o("*"),"/"===e)return void o("/");while(e);a("Unterminated block comment")},d=function(){"/"!==e&&a("Not a comment"),o("/"),"/"===e?f():"*"===e?h():a("Unrecognized comment")},m=function(){for(;e;)if("/"===e)d();else{if(!(s.indexOf(e)>=0))return;o()}},y=function(){switch(e){case"t":return o("t"),o("r"),o("u"),o("e"),!0;case"f":return o("f"),o("a"),o("l"),o("s"),o("e"),!1;case"n":return o("n"),o("u"),o("l"),o("l"),null;case"I":return o("I"),o("n"),o("f"),o("i"),o("n"),o("i"),o("t"),o("y"),1/0;case"N":return o("N"),o("a"),o("N"),NaN}a("Unexpected '"+e+"'")},g=function(){var t=[];if("["===e)for(o("["),m();e;){if("]"===e)return o("]"),t;if(","===e?a("Missing array element"):t.push(r()),m(),","!==e)return o("]"),t;o(","),m()}a("Bad array")},v=function(){var t,n={};if("{"===e)for(o("{"),m();e;){if("}"===e)return o("}"),n;if(t='"'===e||"'"===e?c():l(),m(),o(":"),n[t]=r(),m(),","!==e)return o("}"),n;o(","),m()}a("Bad object")};return r=function(){switch(m(),e){case"{":return v();case"[":return g();case'"':case"'":return c();case"-":case"+":case".":return p();default:return e>="0"&&"9">=e?p():y()}},function(i,s){var o;return n=String(i),t=0,e=" ",o=r(),m(),e&&a("Syntax error"),"function"==typeof s?function u(t,e){var n,r,i=t[e];if(i&&"object"==typeof i)for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r=u(i,n),void 0!==r?i[n]=r:delete i[n]);return s.call(t,e,i)}({"":o},""):o}}(),r.stringify=function(t,e,n){function i(t){return t>="a"&&"z">=t||t>="A"&&"Z">=t||t>="0"&&"9">=t||"_"===t||"$"===t}function s(t){return t>="a"&&"z">=t||t>="A"&&"Z">=t||"_"===t||"$"===t}function a(t){if("string"!=typeof t)return!1;if(!s(t[0]))return!1;for(var e=1,n=t.length;n>e;){if(!i(t[e]))return!1;e++}return!0}function o(t){return Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)}function u(t){return"[object Date]"===Object.prototype.toString.call(t)}function l(t){for(var e=0;e<m.length;e++)if(m[e]===t)throw new TypeError("Converting circular structure to JSON")}function p(t,e,n){if(!t)return"";t.length>10&&(t=t.substring(0,10));for(var r=n?"":"\n",i=0;e>i;i++)r+=t;return r}function c(t){return y.lastIndex=0,y.test(t)?'"'+t.replace(y,function(t){var e=g[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function f(t,e,n){var r,i,s=h(t,e,n);switch(s&&!u(s)&&(s=s.valueOf()),typeof s){case"boolean":return s.toString();case"number":return isNaN(s)||!isFinite(s)?"null":s.toString();case"string":return c(s.toString());case"object":if(null===s)return"null";if(o(s)){l(s),r="[",m.push(s);for(var y=0;y<s.length;y++)i=f(s,y,!1),r+=p(d,m.length),r+=null===i||"undefined"==typeof i?"null":i,y<s.length-1?r+=",":d&&(r+="\n");m.pop(),r+=p(d,m.length,!0)+"]"}else{l(s),r="{";var g=!1;m.push(s);for(var v in s)if(s.hasOwnProperty(v)){var A=f(s,v,!1);if(n=!1,"undefined"!=typeof A&&null!==A){r+=p(d,m.length),g=!0;var e=a(v)?v:c(v);r+=e+":"+(d?" ":"")+A+","}}m.pop(),r=g?r.substring(0,r.length-1)+p(d,m.length)+"}":"{}"}return r;default:return void 0}}if(e&&"function"!=typeof e&&!o(e))throw new Error("Replacer must be a function or an array");var h=function(t,n,r){var i=t[n];return i&&i.toJSON&&"function"==typeof i.toJSON&&(i=i.toJSON()),"function"==typeof e?e.call(t,n,i):e?r||o(t)||e.indexOf(n)>=0?i:void 0:i};r.isWord=a,isNaN=isNaN||function(t){return"number"==typeof t&&t!==t};var d,m=[];n&&("string"==typeof n?d=n:"number"==typeof n&&n>=0&&(d=p(" ",n,!0)));var y=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},v={"":t};return void 0===t?h(v,"",!0):f(v,"",!0)}},{}],56:[function(t,e,n){function r(t){var e=t?t.length:0;return e?t[e-1]:void 0}e.exports=r},{}],57:[function(t,e,n){e.exports=t(60)},{60:60}],58:[function(t,e,n){e.exports=t(59)},{59:59}],59:[function(t,e,n){var r=t(64),i=t(73),s=t(100),a=s(r,i);e.exports=a},{100:100,64:64,73:73}],60:[function(t,e,n){function r(t,e,n,r){var f=t?s(t):0;return u(f)||(t=p(t),f=t.length),n="number"!=typeof n||r&&o(e,n,r)?0:0>n?c(f+n,0):n||0,"string"==typeof t||!a(t)&&l(t)?f>=n&&t.indexOf(e,n)>-1:!!f&&i(t,e,n)>-1}var i=t(78),s=t(105),a=t(125),o=t(114),u=t(116),l=t(132),p=t(141),c=Math.max;e.exports=r},{105:105,114:114,116:116,125:125,132:132,141:141,78:78}],61:[function(t,e,n){function r(t,e,n){if(null==t)return[];n&&u(t,e,n)&&(e=void 0);var r=-1;e=i(e,n,3);var l=s(t,function(t,n,i){return{criteria:e(t,n,i),index:++r,value:t}});return a(l,o)}var i=t(69),s=t(82),a=t(90),o=t(95),u=t(114);e.exports=r},{114:114,69:69,82:82,90:90,95:95}],62:[function(t,e,n){function r(t,e){if("function"!=typeof t)throw new TypeError(i);return e=s(void 0===e?t.length-1:+e||0,0),function(){for(var n=arguments,r=-1,i=s(n.length-e,0),a=Array(i);++r<i;)a[r]=n[e+r];switch(e){case 0:return t.call(this,a);case 1:return t.call(this,n[0],a);case 2:return t.call(this,n[0],n[1],a)}var o=Array(e+1);for(r=-1;++r<e;)o[r]=n[r];return o[e]=a,t.apply(this,o)}}var i="Expected a function",s=Math.max;e.exports=r},{}],63:[function(t,e,n){function r(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}e.exports=r},{}],64:[function(t,e,n){function r(t,e){for(var n=-1,r=t.length;++n<r&&e(t[n],n,t)!==!1;);return t}e.exports=r},{}],65:[function(t,e,n){function r(t,e){for(var n=-1,r=t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}e.exports=r},{}],66:[function(t,e,n){function r(t,e){return void 0===t?e:t}e.exports=r},{}],67:[function(t,e,n){function r(t,e,n){for(var r=-1,s=i(e),a=s.length;++r<a;){var o=s[r],u=t[o],l=n(u,e[o],o,t,e);(l===l?l===u:u!==u)&&(void 0!==u||o in t)||(t[o]=l)}return t}var i=t(137);e.exports=r},{137:137}],68:[function(t,e,n){function r(t,e){return null==e?t:i(e,s(e),t)}var i=t(72),s=t(137);e.exports=r},{137:137,72:72}],69:[function(t,e,n){function r(t,e,n){var r=typeof t;return"function"==r?void 0===e?t:a(t,e,n):null==t?o:"object"==r?i(t):void 0===e?u(t):s(t,e)}var i=t(83),s=t(84),a=t(93),o=t(144),u=t(145);e.exports=r},{144:144,145:145,83:83,84:84,93:93}],70:[function(t,e,n){function r(t,e,n,d,m,y,g){var A;if(n&&(A=m?n(t,d,m):n(t)),void 0!==A)return A;if(!f(t))return t;var E=c(t);if(E){if(A=u(t),!e)return i(t,A)}else{var x=R.call(t),D=x==v;if(x!=b&&x!=h&&(!D||m))return O[x]?l(t,x,e):m?t:{};if(A=p(D?{}:t),!e)return a(A,t)}y||(y=[]),g||(g=[]);for(var C=y.length;C--;)if(y[C]==t)return g[C];return y.push(t),g.push(A),(E?s:o)(t,function(i,s){A[s]=r(i,e,n,s,t,y,g)}),A}var i=t(63),s=t(64),a=t(68),o=t(76),u=t(109),l=t(110),p=t(111),c=t(125),f=t(129),h="[object Arguments]",d="[object Array]",m="[object Boolean]",y="[object Date]",g="[object Error]",v="[object Function]",A="[object Map]",E="[object Number]",b="[object Object]",x="[object RegExp]",D="[object Set]",C="[object String]",F="[object WeakMap]",S="[object ArrayBuffer]",w="[object Float32Array]",B="[object Float64Array]",T="[object Int8Array]",_="[object Int16Array]",k="[object Int32Array]",P="[object Uint8Array]",N="[object Uint8ClampedArray]",I="[object Uint16Array]",L="[object Uint32Array]",O={};O[h]=O[d]=O[S]=O[m]=O[y]=O[w]=O[B]=O[T]=O[_]=O[k]=O[E]=O[b]=O[x]=O[C]=O[P]=O[N]=O[I]=O[L]=!0,O[g]=O[v]=O[A]=O[D]=O[F]=!1;var M=Object.prototype,R=M.toString;e.exports=r},{109:109,110:110,111:111,125:125,129:129,63:63,64:64,68:68,76:76}],71:[function(t,e,n){function r(t,e){if(t!==e){var n=null===t,r=void 0===t,i=t===t,s=null===e,a=void 0===e,o=e===e;if(t>e&&!s||!i||n&&!a&&o||r&&o)return 1;if(e>t&&!n||!o||s&&!r&&i||a&&i)return-1}return 0}e.exports=r},{}],72:[function(t,e,n){function r(t,e,n){n||(n={});for(var r=-1,i=e.length;++r<i;){var s=e[r];n[s]=t[s]}return n}e.exports=r},{}],73:[function(t,e,n){var r=t(76),i=t(97),s=i(r);e.exports=s},{76:76,97:97}],74:[function(t,e,n){var r=t(98),i=r();e.exports=i},{98:98}],75:[function(t,e,n){function r(t,e){return i(t,e,s)}var i=t(74),s=t(138);e.exports=r},{138:138,74:74}],76:[function(t,e,n){function r(t,e){return i(t,e,s)}var i=t(74),s=t(137);e.exports=r},{137:137,74:74}],77:[function(t,e,n){function r(t,e,n){if(null!=t){void 0!==n&&n in i(t)&&(e=[n]);for(var r=0,s=e.length;null!=t&&s>r;)t=t[e[r++]];return r&&r==s?t:void 0}}var i=t(120);e.exports=r},{120:120}],78:[function(t,e,n){function r(t,e,n){if(e!==e)return i(t,n);for(var r=n-1,s=t.length;++r<s;)if(t[r]===e)return r;return-1}var i=t(108);e.exports=r},{108:108}],79:[function(t,e,n){function r(t,e,n,o,u,l){return t===e?!0:null==t||null==e||!s(t)&&!a(e)?t!==t&&e!==e:i(t,e,r,n,o,u,l)}var i=t(80),s=t(129),a=t(117);e.exports=r},{117:117,129:129,80:80}],80:[function(t,e,n){function r(t,e,n,r,f,m,y){var g=o(t),v=o(e),A=p,E=p;g||(A=d.call(t),A==l?A=c:A!=c&&(g=u(t))),v||(E=d.call(e),E==l?E=c:E!=c&&(v=u(e)));var b=A==c,x=E==c,D=A==E;if(D&&!g&&!b)return s(t,e,A);if(!f){var C=b&&h.call(t,"__wrapped__"),F=x&&h.call(e,"__wrapped__");if(C||F)return n(C?t.value():t,F?e.value():e,r,f,m,y)}if(!D)return!1;m||(m=[]),y||(y=[]);for(var S=m.length;S--;)if(m[S]==t)return y[S]==e;m.push(t),y.push(e);var w=(g?i:a)(t,e,n,r,f,m,y);return m.pop(),y.pop(),w}var i=t(101),s=t(102),a=t(103),o=t(125),u=t(133),l="[object Arguments]",p="[object Array]",c="[object Object]",f=Object.prototype,h=f.hasOwnProperty,d=f.toString;e.exports=r},{101:101,102:102,103:103,125:125,133:133}],81:[function(t,e,n){function r(t,e,n){var r=e.length,a=r,o=!n;if(null==t)return!a;for(t=s(t);r--;){var u=e[r];if(o&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++r<a;){u=e[r];var l=u[0],p=t[l],c=u[1];if(o&&u[2]){if(void 0===p&&!(l in t))return!1}else{var f=n?n(p,c,l):void 0;if(!(void 0===f?i(c,p,n,!0):f))return!1}}return!0}var i=t(79),s=t(120);e.exports=r},{120:120,79:79}],82:[function(t,e,n){function r(t,e){var n=-1,r=s(t)?Array(t.length):[];return i(t,function(t,i,s){r[++n]=e(t,i,s)}),r}var i=t(73),s=t(112);e.exports=r},{112:112,73:73}],83:[function(t,e,n){function r(t){var e=s(t);if(1==e.length&&e[0][2]){var n=e[0][0],r=e[0][1];return function(t){return null==t?!1:t[n]===r&&(void 0!==r||n in a(t))}}return function(t){return i(t,e)}}var i=t(81),s=t(106),a=t(120);e.exports=r},{106:106,120:120,81:81}],84:[function(t,e,n){function r(t,e){var n=o(t),r=u(t)&&l(e),h=t+"";return t=f(t),function(o){if(null==o)return!1;var u=h;if(o=c(o),(n||!r)&&!(u in o)){if(o=1==t.length?o:i(o,a(t,0,-1)),null==o)return!1;u=p(t),o=c(o)}return o[u]===e?void 0!==e||u in o:s(e,o[u],void 0,!0)}}var i=t(77),s=t(79),a=t(89),o=t(125),u=t(115),l=t(118),p=t(56),c=t(120),f=t(121);e.exports=r},{115:115,118:118,120:120,121:121,125:125,56:56,77:77,79:79,89:89}],85:[function(t,e,n){function r(t,e,n,f,h){if(!u(t))return t;var d=o(e)&&(a(e)||p(e)),m=d?void 0:c(e);return i(m||e,function(i,a){if(m&&(a=i,i=e[a]),l(i))f||(f=[]),h||(h=[]),s(t,e,a,r,n,f,h);else{var o=t[a],u=n?n(o,i,a,t,e):void 0,p=void 0===u;p&&(u=i),void 0===u&&(!d||a in t)||!p&&(u===u?u===o:o!==o)||(t[a]=u)}}),t}var i=t(64),s=t(86),a=t(125),o=t(112),u=t(129),l=t(117),p=t(133),c=t(137);e.exports=r},{112:112,117:117,125:125,129:129,133:133,137:137,64:64,86:86}],86:[function(t,e,n){function r(t,e,n,r,c,f,h){for(var d=f.length,m=e[n];d--;)if(f[d]==m)return void(t[n]=h[d]);var y=t[n],g=c?c(y,m,n,t,e):void 0,v=void 0===g;v&&(g=m,o(m)&&(a(m)||l(m))?g=a(y)?y:o(y)?i(y):[]:u(m)||s(m)?g=s(y)?p(y):u(y)?y:{}:v=!1),f.push(m),h.push(g),v?t[n]=r(g,m,c,f,h):(g===g?g!==y:y===y)&&(t[n]=g)}var i=t(63),s=t(124),a=t(125),o=t(112),u=t(130),l=t(133),p=t(134);e.exports=r},{112:112,124:124,125:125,130:130,133:133,134:134,63:63}],87:[function(t,e,n){function r(t){return function(e){return null==e?void 0:e[t]}}e.exports=r},{}],88:[function(t,e,n){function r(t){var e=t+"";return t=s(t),function(n){return i(n,t,e)}}var i=t(77),s=t(121);e.exports=r},{121:121,77:77}],89:[function(t,e,n){function r(t,e,n){var r=-1,i=t.length;e=null==e?0:+e||0,0>e&&(e=-e>i?0:i+e),n=void 0===n||n>i?i:+n||0,0>n&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}e.exports=r},{}],90:[function(t,e,n){function r(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}e.exports=r},{}],91:[function(t,e,n){function r(t){return null==t?"":t+""}e.exports=r},{}],92:[function(t,e,n){function r(t,e){for(var n=-1,r=e.length,i=Array(r);++n<r;)i[n]=t[e[n]];return i}e.exports=r},{}],93:[function(t,e,n){function r(t,e,n){if("function"!=typeof t)return i;if(void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,s){return t.call(e,n,r,i,s)};case 5:return function(n,r,i,s,a){return t.call(e,n,r,i,s,a)}}return function(){return t.apply(e,arguments)}}var i=t(144);e.exports=r},{144:144}],94:[function(t,e,n){(function(t){function n(t){var e=new r(t.byteLength),n=new i(e);return n.set(new i(t)),e}var r=t.ArrayBuffer,i=t.Uint8Array;e.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],95:[function(t,e,n){function r(t,e){return i(t.criteria,e.criteria)||t.index-e.index}var i=t(71);e.exports=r},{71:71}],96:[function(t,e,n){function r(t){return a(function(e,n){var r=-1,a=null==e?0:n.length,o=a>2?n[a-2]:void 0,u=a>2?n[2]:void 0,l=a>1?n[a-1]:void 0;for("function"==typeof o?(o=i(o,l,5),a-=2):(o="function"==typeof l?l:void 0,a-=o?1:0),u&&s(n[0],n[1],u)&&(o=3>a?void 0:o,a=1);++r<a;){var p=n[r];p&&t(e,p,o)}return e})}var i=t(93),s=t(114),a=t(62);e.exports=r},{114:114,62:62,93:93}],97:[function(t,e,n){function r(t,e){return function(n,r){var o=n?i(n):0;if(!s(o))return t(n,r);for(var u=e?o:-1,l=a(n);(e?u--:++u<o)&&r(l[u],u,l)!==!1;);return n}}var i=t(105),s=t(116),a=t(120);e.exports=r},{105:105,116:116,120:120}],98:[function(t,e,n){function r(t){return function(e,n,r){for(var s=i(e),a=r(e),o=a.length,u=t?o:-1;t?u--:++u<o;){var l=a[u];if(n(s[l],l,s)===!1)break}return e}}var i=t(120);e.exports=r},{120:120}],99:[function(t,e,n){function r(t,e){return i(function(n){var r=n[0];return null==r?r:(n.push(e),t.apply(void 0,n))})}var i=t(62);e.exports=r},{62:62}],100:[function(t,e,n){function r(t,e){return function(n,r,a){return"function"==typeof r&&void 0===a&&s(n)?t(n,r):e(n,i(r,a,3))}}var i=t(93),s=t(125);e.exports=r},{125:125,93:93}],101:[function(t,e,n){function r(t,e,n,r,s,a,o){var u=-1,l=t.length,p=e.length;if(l!=p&&!(s&&p>l))return!1;for(;++u<l;){var c=t[u],f=e[u],h=r?r(s?f:c,s?c:f,u):void 0;if(void 0!==h){if(h)continue;return!1}if(s){if(!i(e,function(t){return c===t||n(c,t,r,s,a,o)}))return!1}else if(c!==f&&!n(c,f,r,s,a,o))return!1}return!0}var i=t(65);e.exports=r},{65:65}],102:[function(t,e,n){function r(t,e,n){switch(n){case i:case s:return+t==+e;case a:return t.name==e.name&&t.message==e.message;case o:return t!=+t?e!=+e:t==+e;case u:case l:return t==e+""}return!1}var i="[object Boolean]",s="[object Date]",a="[object Error]",o="[object Number]",u="[object RegExp]",l="[object String]";e.exports=r},{}],103:[function(t,e,n){function r(t,e,n,r,s,o,u){var l=i(t),p=l.length,c=i(e),f=c.length;if(p!=f&&!s)return!1;for(var h=p;h--;){var d=l[h];if(!(s?d in e:a.call(e,d)))return!1}for(var m=s;++h<p;){d=l[h];var y=t[d],g=e[d],v=r?r(s?g:y,s?y:g,d):void 0;if(!(void 0===v?n(y,g,r,s,o,u):v))return!1;m||(m="constructor"==d)}if(!m){var A=t.constructor,E=e.constructor;if(A!=E&&"constructor"in t&&"constructor"in e&&!("function"==typeof A&&A instanceof A&&"function"==typeof E&&E instanceof E))return!1}return!0}var i=t(137),s=Object.prototype,a=s.hasOwnProperty;e.exports=r},{137:137}],104:[function(t,e,n){function r(t,e,n){return e?t=i[t]:n&&(t=s[t]),"\\"+t}var i={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},s={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};e.exports=r},{}],105:[function(t,e,n){var r=t(87),i=r("length");e.exports=i},{87:87}],106:[function(t,e,n){function r(t){for(var e=s(t),n=e.length;n--;)e[n][2]=i(e[n][1]);return e}var i=t(118),s=t(140);e.exports=r},{118:118,140:140}],107:[function(t,e,n){function r(t,e){var n=null==t?void 0:t[e];return i(n)?n:void 0}var i=t(128);e.exports=r},{128:128}],108:[function(t,e,n){function r(t,e,n){for(var r=t.length,i=e+(n?0:-1);n?i--:++i<r;){var s=t[i];if(s!==s)return i}return-1}e.exports=r},{}],109:[function(t,e,n){function r(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&s.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var i=Object.prototype,s=i.hasOwnProperty;e.exports=r},{}],110:[function(t,e,n){function r(t,e,n){var r=t.constructor;switch(e){case p:return i(t);case s:case a:return new r(+t);case c:case f:case h:case d:case m:case y:case g:case v:case A:var b=t.buffer;return new r(n?i(b):b,t.byteOffset,t.length);case o:case l:return new r(t);case u:var x=new r(t.source,E.exec(t));x.lastIndex=t.lastIndex}return x}var i=t(94),s="[object Boolean]",a="[object Date]",o="[object Number]",u="[object RegExp]",l="[object String]",p="[object ArrayBuffer]",c="[object Float32Array]",f="[object Float64Array]",h="[object Int8Array]",d="[object Int16Array]",m="[object Int32Array]",y="[object Uint8Array]",g="[object Uint8ClampedArray]",v="[object Uint16Array]",A="[object Uint32Array]",E=/\w*$/;e.exports=r},{94:94}],111:[function(t,e,n){function r(t){var e=t.constructor;return"function"==typeof e&&e instanceof e||(e=Object),new e}e.exports=r},{}],112:[function(t,e,n){function r(t){return null!=t&&s(i(t))}var i=t(105),s=t(116);e.exports=r},{105:105,116:116}],113:[function(t,e,n){function r(t,e){return t="number"==typeof t||i.test(t)?+t:-1,e=null==e?s:e,t>-1&&t%1==0&&e>t}var i=/^\d+$/,s=9007199254740991;e.exports=r},{}],114:[function(t,e,n){function r(t,e,n){if(!a(n))return!1;var r=typeof e;if("number"==r?i(n)&&s(e,n.length):"string"==r&&e in n){var o=n[e];return t===t?t===o:o!==o}return!1}var i=t(112),s=t(113),a=t(129);e.exports=r},{112:112,113:113,129:129}],115:[function(t,e,n){function r(t,e){var n=typeof t;if("string"==n&&o.test(t)||"number"==n)return!0;if(i(t))return!1;var r=!a.test(t);return r||null!=e&&t in s(e)}var i=t(125),s=t(120),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=r},{120:120,125:125}],116:[function(t,e,n){function r(t){return"number"==typeof t&&t>-1&&t%1==0&&i>=t}var i=9007199254740991;e.exports=r},{}],117:[function(t,e,n){function r(t){return!!t&&"object"==typeof t}e.exports=r},{}],118:[function(t,e,n){function r(t){return t===t&&!i(t)}var i=t(129);e.exports=r},{129:129}],119:[function(t,e,n){function r(t){for(var e=u(t),n=e.length,r=n&&t.length,l=!!r&&o(r)&&(s(t)||i(t)),c=-1,f=[];++c<n;){var h=e[c];(l&&a(h,r)||p.call(t,h))&&f.push(h)}return f}var i=t(124),s=t(125),a=t(113),o=t(116),u=t(138),l=Object.prototype,p=l.hasOwnProperty;e.exports=r},{113:113,116:116,124:124,125:125,138:138}],120:[function(t,e,n){function r(t){return i(t)?t:Object(t)}var i=t(129);e.exports=r},{129:129}],121:[function(t,e,n){function r(t){if(s(t))return t;var e=[];return i(t).replace(a,function(t,n,r,i){e.push(r?i.replace(o,"$1"):n||t)}),e}var i=t(91),s=t(125),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,o=/\\(\\)?/g;e.exports=r},{125:125,91:91}],122:[function(t,e,n){function r(t,e,n,r){return e&&"boolean"!=typeof e&&a(t,e,n)?e=!1:"function"==typeof e&&(r=n,n=e,e=!1),"function"==typeof n?i(t,e,s(n,r,3)):i(t,e)}var i=t(70),s=t(93),a=t(114);e.exports=r},{114:114,70:70,93:93}],123:[function(t,e,n){function r(t,e,n){return"function"==typeof e?i(t,!0,s(e,n,3)):i(t,!0)}var i=t(70),s=t(93);e.exports=r},{70:70,93:93}],124:[function(t,e,n){function r(t){return s(t)&&i(t)&&o.call(t,"callee")&&!u.call(t,"callee")}var i=t(112),s=t(117),a=Object.prototype,o=a.hasOwnProperty,u=a.propertyIsEnumerable;e.exports=r},{112:112,117:117}],125:[function(t,e,n){var r=t(107),i=t(116),s=t(117),a="[object Array]",o=Object.prototype,u=o.toString,l=r(Array,"isArray"),p=l||function(t){return s(t)&&i(t.length)&&u.call(t)==a};e.exports=p},{107:107,116:116,117:117}],126:[function(t,e,n){function r(t){return t===!0||t===!1||i(t)&&o.call(t)==s}var i=t(117),s="[object Boolean]",a=Object.prototype,o=a.toString;e.exports=r},{117:117}],127:[function(t,e,n){function r(t){return i(t)&&o.call(t)==s}var i=t(129),s="[object Function]",a=Object.prototype,o=a.toString;e.exports=r},{129:129}],128:[function(t,e,n){function r(t){return null==t?!1:i(t)?p.test(u.call(t)):s(t)&&a.test(t)}var i=t(127),s=t(117),a=/^\[object .+?Constructor\]$/,o=Object.prototype,u=Function.prototype.toString,l=o.hasOwnProperty,p=RegExp("^"+u.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=r},{117:117,127:127}],129:[function(t,e,n){function r(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}e.exports=r},{}],130:[function(t,e,n){function r(t){var e;if(!a(t)||p.call(t)!=o||s(t)||!l.call(t,"constructor")&&(e=t.constructor,
"function"==typeof e&&!(e instanceof e)))return!1;var n;return i(t,function(t,e){n=e}),void 0===n||l.call(t,n)}var i=t(75),s=t(124),a=t(117),o="[object Object]",u=Object.prototype,l=u.hasOwnProperty,p=u.toString;e.exports=r},{117:117,124:124,75:75}],131:[function(t,e,n){function r(t){return i(t)&&o.call(t)==s}var i=t(129),s="[object RegExp]",a=Object.prototype,o=a.toString;e.exports=r},{129:129}],132:[function(t,e,n){function r(t){return"string"==typeof t||i(t)&&o.call(t)==s}var i=t(117),s="[object String]",a=Object.prototype,o=a.toString;e.exports=r},{117:117}],133:[function(t,e,n){function r(t){return s(t)&&i(t.length)&&!!T[k.call(t)]}var i=t(116),s=t(117),a="[object Arguments]",o="[object Array]",u="[object Boolean]",l="[object Date]",p="[object Error]",c="[object Function]",f="[object Map]",h="[object Number]",d="[object Object]",m="[object RegExp]",y="[object Set]",g="[object String]",v="[object WeakMap]",A="[object ArrayBuffer]",E="[object Float32Array]",b="[object Float64Array]",x="[object Int8Array]",D="[object Int16Array]",C="[object Int32Array]",F="[object Uint8Array]",S="[object Uint8ClampedArray]",w="[object Uint16Array]",B="[object Uint32Array]",T={};T[E]=T[b]=T[x]=T[D]=T[C]=T[F]=T[S]=T[w]=T[B]=!0,T[a]=T[o]=T[A]=T[u]=T[l]=T[p]=T[c]=T[f]=T[h]=T[d]=T[m]=T[y]=T[g]=T[v]=!1;var _=Object.prototype,k=_.toString;e.exports=r},{116:116,117:117}],134:[function(t,e,n){function r(t){return i(t,s(t))}var i=t(72),s=t(138);e.exports=r},{138:138,72:72}],135:[function(t,e,n){var r=t(67),i=t(68),s=t(96),a=s(function(t,e,n){return n?r(t,e,n):i(t,e)});e.exports=a},{67:67,68:68,96:96}],136:[function(t,e,n){var r=t(135),i=t(66),s=t(99),a=s(r,i);e.exports=a},{135:135,66:66,99:99}],137:[function(t,e,n){var r=t(107),i=t(112),s=t(129),a=t(119),o=r(Object,"keys"),u=o?function(t){var e=null==t?void 0:t.constructor;return"function"==typeof e&&e.prototype===t||"function"!=typeof t&&i(t)?a(t):s(t)?o(t):[]}:a;e.exports=u},{107:107,112:112,119:119,129:129}],138:[function(t,e,n){function r(t){if(null==t)return[];u(t)||(t=Object(t));var e=t.length;e=e&&o(e)&&(s(t)||i(t))&&e||0;for(var n=t.constructor,r=-1,l="function"==typeof n&&n.prototype===t,c=Array(e),f=e>0;++r<e;)c[r]=r+"";for(var h in t)f&&a(h,e)||"constructor"==h&&(l||!p.call(t,h))||c.push(h);return c}var i=t(124),s=t(125),a=t(113),o=t(116),u=t(129),l=Object.prototype,p=l.hasOwnProperty;e.exports=r},{113:113,116:116,124:124,125:125,129:129}],139:[function(t,e,n){var r=t(85),i=t(96),s=i(r);e.exports=s},{85:85,96:96}],140:[function(t,e,n){function r(t){t=s(t);for(var e=-1,n=i(t),r=n.length,a=Array(r);++e<r;){var o=n[e];a[e]=[o,t[o]]}return a}var i=t(137),s=t(120);e.exports=r},{120:120,137:137}],141:[function(t,e,n){function r(t){return i(t,s(t))}var i=t(92),s=t(137);e.exports=r},{137:137,92:92}],142:[function(t,e,n){function r(t){return t=i(t),t&&o.test(t)?t.replace(a,s):t||"(?:)"}var i=t(91),s=t(104),a=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,o=RegExp(a.source);e.exports=r},{104:104,91:91}],143:[function(t,e,n){function r(t,e,n){return t=i(t),n=null==n?0:s(0>n?0:+n||0,t.length),t.lastIndexOf(e,n)==n}var i=t(91),s=Math.min;e.exports=r},{91:91}],144:[function(t,e,n){function r(t){return t}e.exports=r},{}],145:[function(t,e,n){function r(t){return a(t)?i(t):s(t)}var i=t(87),s=t(88),a=t(115);e.exports=r},{115:115,87:87,88:88}],146:[function(t,e,n){function r(t){return t.split("").reduce(function(t,e){return t[e]=!0,t},{})}function i(t,e){return e=e||{},function(n,r,i){return a(n,t,e)}}function s(t,e){t=t||{},e=e||{};var n={};return Object.keys(e).forEach(function(t){n[t]=e[t]}),Object.keys(t).forEach(function(e){n[e]=t[e]}),n}function a(t,e,n){if("string"!=typeof e)throw new TypeError("glob pattern string required");return n||(n={}),n.nocomment||"#"!==e.charAt(0)?""===e.trim()?""===t:new o(e,n).match(t):!1}function o(t,e){if(!(this instanceof o))return new o(t,e);if("string"!=typeof t)throw new TypeError("glob pattern string required");e||(e={}),t=t.trim(),"/"!==y.sep&&(t=t.split(y.sep).join("/")),this.options=e,this.set=[],this.pattern=t,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function u(){if(!this._made){var t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate();var n=this.globSet=this.braceExpand();e.debug&&(this.debug=console.error),this.debug(this.pattern,n),n=this.globParts=n.map(function(t){return t.split(F)}),this.debug(this.pattern,n),n=n.map(function(t,e,n){return t.map(this.parse,this)},this),this.debug(this.pattern,n),n=n.filter(function(t){return-1===t.indexOf(!1)}),this.debug(this.pattern,n),this.set=n}}function l(){var t=this.pattern,e=!1,n=this.options,r=0;if(!n.nonegate){for(var i=0,s=t.length;s>i&&"!"===t.charAt(i);i++)e=!e,r++;r&&(this.pattern=t.substr(r)),this.negate=e}}function p(t,e){if(e||(e=this instanceof o?this.options:{}),t="undefined"==typeof t?this.pattern:t,"undefined"==typeof t)throw new Error("undefined pattern");return e.nobrace||!t.match(/\{.*\}/)?[t]:A(t)}function c(t,e){function n(){if(s){switch(s){case"*":o+=b,u=!0;break;case"?":o+=E,u=!0;break;default:o+="\\"+s}g.debug("clearStateChar %j %j",s,o),s=!1}}var r=this.options;if(!r.noglobstar&&"**"===t)return v;if(""===t)return"";for(var i,s,a,o="",u=!!r.nocase,l=!1,p=[],c=[],f=!1,h=-1,m=-1,y="."===t.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",g=this,A=0,x=t.length;x>A&&(a=t.charAt(A));A++)if(this.debug("%s %s %s %j",t,A,o,a),l&&C[a])o+="\\"+a,l=!1;else switch(a){case"/":return!1;case"\\":n(),l=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",t,A,o,a),f){this.debug(" in class"),"!"===a&&A===m+1&&(a="^"),o+=a;continue}g.debug("call clearStateChar %j",s),n(),s=a,r.noext&&n();continue;case"(":if(f){o+="(";continue}if(!s){o+="\\(";continue}i=s,p.push({type:i,start:A-1,reStart:o.length}),o+="!"===s?"(?:(?!(?:":"(?:",this.debug("plType %j %j",s,o),s=!1;continue;case")":if(f||!p.length){o+="\\)";continue}n(),u=!0,o+=")";var D=p.pop();switch(i=D.type){case"!":c.push(D),o+=")[^/]*?)",D.reEnd=o.length;break;case"?":case"+":case"*":o+=i;break;case"@":}continue;case"|":if(f||!p.length||l){o+="\\|",l=!1;continue}n(),o+="|";continue;case"[":if(n(),f){o+="\\"+a;continue}f=!0,m=A,h=o.length,o+=a;continue;case"]":if(A===m+1||!f){o+="\\"+a,l=!1;continue}if(f){var F=t.substring(m+1,A);try{RegExp("["+F+"]")}catch(w){var B=this.parse(F,S);o=o.substr(0,h)+"\\["+B[0]+"\\]",u=u||B[1],f=!1;continue}}u=!0,f=!1,o+=a;continue;default:n(),l?l=!1:!C[a]||"^"===a&&f||(o+="\\"),o+=a}for(f&&(F=t.substr(m+1),B=this.parse(F,S),o=o.substr(0,h)+"\\["+B[0],u=u||B[1]),D=p.pop();D;D=p.pop()){var T=o.slice(D.reStart+3);T=T.replace(/((?:\\{2})*)(\\?)\|/g,function(t,e,n){return n||(n="\\"),e+e+n+"|"}),this.debug("tail=%j\n %s",T,T);var _="*"===D.type?b:"?"===D.type?E:"\\"+D.type;u=!0,o=o.slice(0,D.reStart)+_+"\\("+T}n(),l&&(o+="\\\\");var k=!1;switch(o.charAt(0)){case".":case"[":case"(":k=!0}for(var P=c.length-1;P>-1;P--){var N=c[P],I=o.slice(0,N.reStart),L=o.slice(N.reStart,N.reEnd-8),O=o.slice(N.reEnd-8,N.reEnd),M=o.slice(N.reEnd);O+=M;var R=I.split("(").length-1,j=M;for(A=0;R>A;A++)j=j.replace(/\)[+*?]?/,"");M=j;var V="";""===M&&e!==S&&(V="$");var U=I+L+M+V+O;o=U}if(""!==o&&u&&(o="(?=.)"+o),k&&(o=y+o),e===S)return[o,u];if(!u)return d(t);var G=r.nocase?"i":"",W=new RegExp("^"+o+"$",G);return W._glob=t,W._src=o,W}function f(){if(this.regexp||this.regexp===!1)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,n=e.noglobstar?b:e.dot?x:D,r=e.nocase?"i":"",i=t.map(function(t){return t.map(function(t){return t===v?n:"string"==typeof t?m(t):t._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,r)}catch(s){this.regexp=!1}return this.regexp}function h(t,e){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;var n=this.options;"/"!==y.sep&&(t=t.split(y.sep).join("/")),t=t.split(F),this.debug(this.pattern,"split",t);var r=this.set;this.debug(this.pattern,"set",r);var i,s;for(s=t.length-1;s>=0&&!(i=t[s]);s--);for(s=0;s<r.length;s++){var a=r[s],o=t;n.matchBase&&1===a.length&&(o=[i]);var u=this.matchOne(o,a,e);if(u)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}function d(t){return t.replace(/\\(.)/g,"$1")}function m(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}e.exports=a,a.Minimatch=o;var y={sep:"/"};try{y=t(7)}catch(g){}var v=a.GLOBSTAR=o.GLOBSTAR={},A=t(147),E="[^/]",b=E+"*?",x="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",D="(?:(?!(?:\\/|^)\\.).)*?",C=r("().*{}+?[]^$\\!"),F=/\/+/;a.filter=i,a.defaults=function(t){if(!t||!Object.keys(t).length)return a;var e=a,n=function(n,r,i){return e.minimatch(n,r,s(t,i))};return n.Minimatch=function(n,r){return new e.Minimatch(n,s(t,r))},n},o.defaults=function(t){return t&&Object.keys(t).length?a.defaults(t).Minimatch:o},o.prototype.debug=function(){},o.prototype.make=u,o.prototype.parseNegate=l,a.braceExpand=function(t,e){return p(t,e)},o.prototype.braceExpand=p,o.prototype.parse=c;var S={};a.makeRe=function(t,e){return new o(t,e||{}).makeRe()},o.prototype.makeRe=f,a.match=function(t,e,n){n=n||{};var r=new o(e,n);return t=t.filter(function(t){return r.match(t)}),r.options.nonull&&!t.length&&t.push(e),t},o.prototype.match=h,o.prototype.matchOne=function(t,e,n){var r=this.options;this.debug("matchOne",{"this":this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var i=0,s=0,a=t.length,o=e.length;a>i&&o>s;i++,s++){this.debug("matchOne loop");var u=e[s],l=t[i];if(this.debug(e,u,l),u===!1)return!1;if(u===v){this.debug("GLOBSTAR",[e,u,l]);var p=i,c=s+1;if(c===o){for(this.debug("** at the end");a>i;i++)if("."===t[i]||".."===t[i]||!r.dot&&"."===t[i].charAt(0))return!1;return!0}for(;a>p;){var f=t[p];if(this.debug("\nglobstar while",t,p,e,c,f),this.matchOne(t.slice(p),e.slice(c),n))return this.debug("globstar found match!",p,a,f),!0;if("."===f||".."===f||!r.dot&&"."===f.charAt(0)){this.debug("dot detected!",t,p,e,c);break}this.debug("globstar swallow a segment, and continue"),p++}return n&&(this.debug("\n>>> no match, partial?",t,p,e,c),p===a)?!0:!1}var h;if("string"==typeof u?(h=r.nocase?l.toLowerCase()===u.toLowerCase():l===u,this.debug("string match",u,l,h)):(h=l.match(u),this.debug("pattern match",u,l,h)),!h)return!1}if(i===a&&s===o)return!0;if(i===a)return n;if(s===o){var d=i===a-1&&""===t[i];return d}throw new Error("wtf?")}},{147:147,7:7}],147:[function(t,e,n){function r(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function i(t){return t.split("\\\\").join(m).split("\\{").join(y).split("\\}").join(g).split("\\,").join(v).split("\\.").join(A)}function s(t){return t.split(m).join("\\").split(y).join("{").split(g).join("}").split(v).join(",").split(A).join(".")}function a(t){if(!t)return[""];var e=[],n=d("{","}",t);if(!n)return t.split(",");var r=n.pre,i=n.body,s=n.post,o=r.split(",");o[o.length-1]+="{"+i+"}";var u=a(s);return s.length&&(o[o.length-1]+=u.shift(),o.push.apply(o,u)),e.push.apply(e,o),e}function o(t){return t?f(i(t),!0).map(s):[]}function u(t){return"{"+t+"}"}function l(t){return/^-?0\d/.test(t)}function p(t,e){return e>=t}function c(t,e){return t>=e}function f(t,e){var n=[],i=d("{","}",t);if(!i||/\$$/.test(i.pre))return[t];var s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),m=s||o,y=/^(.*,)+(.+)?$/.test(i.body);if(!m&&!y)return i.post.match(/,.*}/)?(t=i.pre+"{"+i.body+g+i.post,f(t)):[t];var v;if(m)v=i.body.split(/\.\./);else if(v=a(i.body),1===v.length&&(v=f(v[0],!1).map(u),1===v.length)){var A=i.post.length?f(i.post,!1):[""];return A.map(function(t){return i.pre+v[0]+t})}var E,b=i.pre,A=i.post.length?f(i.post,!1):[""];if(m){var x=r(v[0]),D=r(v[1]),C=Math.max(v[0].length,v[1].length),F=3==v.length?Math.abs(r(v[2])):1,S=p,w=x>D;w&&(F*=-1,S=c);var B=v.some(l);E=[];for(var T=x;S(T,D);T+=F){var _;if(o)_=String.fromCharCode(T),"\\"===_&&(_="");else if(_=String(T),B){var k=C-_.length;if(k>0){var P=new Array(k+1).join("0");_=0>T?"-"+P+_.slice(1):P+_}}E.push(_)}}else E=h(v,function(t){return f(t,!1)});for(var N=0;N<E.length;N++)for(var I=0;I<A.length;I++){var L=b+E[N]+A[I];(!e||m||L)&&n.push(L)}return n}var h=t(149),d=t(148);e.exports=o;var m="\x00SLASH"+Math.random()+"\x00",y="\x00OPEN"+Math.random()+"\x00",g="\x00CLOSE"+Math.random()+"\x00",v="\x00COMMA"+Math.random()+"\x00",A="\x00PERIOD"+Math.random()+"\x00"},{148:148,149:149}],148:[function(t,e,n){function r(t,e,n){for(var i=0,s={},a=!1,o=0;o<n.length;o++)if(t==n.substr(o,t.length))"start"in s||(s.start=o),i++;else if(e==n.substr(o,e.length)&&"start"in s&&(a=!0,i--,!i))return s.end=o,s.pre=n.substr(0,s.start),s.body=s.end-s.start>1?n.substring(s.start+t.length,s.end):"",s.post=n.slice(s.end+e.length),s;if(i&&a){var u=s.start+t.length;return s=r(t,e,n.substr(u)),s&&(s.start+=u,s.end+=u,s.pre=n.slice(0,u)+s.pre),s}}e.exports=r},{}],149:[function(t,e,n){e.exports=function(t,e){for(var n=[],i=0;i<t.length;i++){var s=e(t[i],i);r(s)?n.push.apply(n,s):n.push(s)}return n};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],150:[function(t,e,n){"use strict";var r=t(1);e.exports=function(t,e){var n="function"==typeof r.access?r.access:r.stat;n(t,function(t){e(null,!t)})},e.exports.sync=function(t){var e="function"==typeof r.accessSync?r.accessSync:r.statSync;try{return e(t),!0}catch(n){return!1}}},{1:1}],151:[function(t,e,n){(function(t){"use strict";function n(t){return"/"===t.charAt(0)}function r(t){var e=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,n=e.exec(t),r=n[1]||"",i=!!r&&":"!==r.charAt(1);return!!n[2]||i}e.exports="win32"===t.platform?r:n,e.exports.posix=n,e.exports.win32=r}).call(this,t(8))},{8:8}],152:[function(t,e,n){"use strict";e.exports=/^#!.*/},{}],153:[function(t,e,n){"use strict";e.exports=function(t){var e=/^\\\\\?\\/.test(t),n=/[^\x00-\x80]+/.test(t);return e||n?t:t.replace(/\\/g,"/")}},{}],154:[function(t,e,n){n.SourceMapGenerator=t(162).SourceMapGenerator,n.SourceMapConsumer=t(161).SourceMapConsumer,n.SourceNode=t(163).SourceNode},{161:161,162:162,163:163}],155:[function(t,e,n){if("function"!=typeof r)var r=t(165)(e,t);r(function(t,e,n){function r(){this._array=[],this._set={}}var i=t(164);r.fromArray=function(t,e){for(var n=new r,i=0,s=t.length;s>i;i++)n.add(t[i],e);return n},r.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},r.prototype.add=function(t,e){var n=this.has(t),r=this._array.length;(!n||e)&&this._array.push(t),n||(this._set[i.toSetString(t)]=r)},r.prototype.has=function(t){return Object.prototype.hasOwnProperty.call(this._set,i.toSetString(t))},r.prototype.indexOf=function(t){if(this.has(t))return this._set[i.toSetString(t)];throw new Error('"'+t+'" is not in the set.')},r.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)},r.prototype.toArray=function(){return this._array.slice()},e.ArraySet=r})},{164:164,165:165}],156:[function(t,e,n){if("function"!=typeof r)var r=t(165)(e,t);r(function(t,e,n){function r(t){return 0>t?(-t<<1)+1:(t<<1)+0}function i(t){var e=1===(1&t),n=t>>1;return e?-n:n}var s=t(157),a=5,o=1<<a,u=o-1,l=o;e.encode=function(t){var e,n="",i=r(t);do e=i&u,i>>>=a,i>0&&(e|=l),n+=s.encode(e);while(i>0);return n},e.decode=function(t,e,n){var r,o,p=t.length,c=0,f=0;do{if(e>=p)throw new Error("Expected more digits in base 64 VLQ value.");if(o=s.decode(t.charCodeAt(e++)),-1===o)throw new Error("Invalid base64 digit: "+t.charAt(e-1));r=!!(o&l),o&=u,c+=o<<f,f+=a}while(r);n.value=i(c),n.rest=e}})},{157:157,165:165}],157:[function(t,e,n){if("function"!=typeof r)var r=t(165)(e,t);r(function(t,e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");e.encode=function(t){if(t>=0&&t<r.length)return r[t];throw new TypeError("Must be between 0 and 63: "+aNumber)},e.decode=function(t){var e=65,n=90,r=97,i=122,s=48,a=57,o=43,u=47,l=26,p=52;return t>=e&&n>=t?t-e:t>=r&&i>=t?t-r+l:t>=s&&a>=t?t-s+p:t==o?62:t==u?63:-1}})},{165:165}],158:[function(t,e,n){if("function"!=typeof r)var r=t(165)(e,t);r(function(t,e,n){function r(t,n,i,s,a,o){var u=Math.floor((n-t)/2)+t,l=a(i,s[u],!0);return 0===l?u:l>0?n-u>1?r(u,n,i,s,a,o):o==e.LEAST_UPPER_BOUND?n<s.length?n:-1:u:u-t>1?r(t,u,i,s,a,o):o==e.LEAST_UPPER_BOUND?u:0>t?-1:t}e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2,e.search=function(t,n,i,s){if(0===n.length)return-1;var a=r(-1,n.length,t,n,i,s||e.GREATEST_LOWER_BOUND);if(0>a)return-1;for(;a-1>=0&&0===i(n[a],n[a-1],!0);)--a;return a}})},{165:165}],159:[function(t,e,n){if("function"!=typeof r)var r=t(165)(e,t);r(function(t,e,n){function r(t,e){var n=t.generatedLine,r=e.generatedLine,i=t.generatedColumn,a=e.generatedColumn;return r>n||r==n&&a>=i||s.compareByGeneratedPositionsInflated(t,e)<=0}function i(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var s=t(164);i.prototype.unsortedForEach=function(t,e){this._array.forEach(t,e)},i.prototype.add=function(t){r(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(s.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=i})},{164:164,165:165}],160:[function(t,e,n){if("function"!=typeof r)var r=t(165)(e,t);r(function(t,e,n){function r(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function i(t,e){return Math.round(t+Math.random()*(e-t))}function s(t,e,n,a){if(a>n){var o=i(n,a),u=n-1;r(t,o,a);for(var l=t[a],p=n;a>p;p++)e(t[p],l)<=0&&(u+=1,r(t,u,p));r(t,u+1,p);var c=u+1;s(t,e,n,c-1),s(t,e,c+1,a)}}e.quickSort=function(t,e){s(t,e,0,t.length-1)}})},{165:165}],161:[function(t,e,n){if("function"!=typeof r)var r=t(165)(e,t);r(function(t,e,n){function r(t){var e=t;return"string"==typeof t&&(e=JSON.parse(t.replace(/^\)\]\}'/,""))),null!=e.sections?new a(e):new i(e)}function i(t){var e=t;"string"==typeof t&&(e=JSON.parse(t.replace(/^\)\]\}'/,"")));var n=o.getArg(e,"version"),r=o.getArg(e,"sources"),i=o.getArg(e,"names",[]),s=o.getArg(e,"sourceRoot",null),a=o.getArg(e,"sourcesContent",null),u=o.getArg(e,"mappings"),p=o.getArg(e,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);r=r.map(o.normalize),this._names=l.fromArray(i,!0),this._sources=l.fromArray(r,!0),this.sourceRoot=s,this.sourcesContent=a,this._mappings=u,this.file=p}function s(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function a(t){var e=t;"string"==typeof t&&(e=JSON.parse(t.replace(/^\)\]\}'/,"")));var n=o.getArg(e,"version"),i=o.getArg(e,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new l,this._names=new l;var s={line:-1,column:0};this._sections=i.map(function(t){if(t.url)throw new Error("Support for url field in sections not implemented.");var e=o.getArg(t,"offset"),n=o.getArg(e,"line"),i=o.getArg(e,"column");if(n<s.line||n===s.line&&i<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=e,{generatedOffset:{generatedLine:n+1,generatedColumn:i+1},consumer:new r(o.getArg(t,"map"))}})}var o=t(164),u=t(158),l=t(155).ArraySet,p=t(156),c=t(160).quickSort;r.fromSourceMap=function(t){return i.fromSourceMap(t)},r.prototype._version=3,r.prototype.__generatedMappings=null,Object.defineProperty(r.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),r.prototype.__originalMappings=null,Object.defineProperty(r.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),r.prototype._charIsMappingSeparator=function(t,e){var n=t.charAt(e);return";"===n||","===n},r.prototype._parseMappings=function(t,e){throw new Error("Subclasses must implement _parseMappings")},r.GENERATED_ORDER=1,r.ORIGINAL_ORDER=2,r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2,r.prototype.eachMapping=function(t,e,n){var i,s=e||null,a=n||r.GENERATED_ORDER;switch(a){case r.GENERATED_ORDER:i=this._generatedMappings;break;case r.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;i.map(function(t){var e=null===t.source?null:this._sources.at(t.source);return null!=e&&null!=u&&(e=o.join(u,e)),{source:e,generatedLine:t.generatedLine,generatedColumn:t.generatedColumn,originalLine:t.originalLine,originalColumn:t.originalColumn,name:null===t.name?null:this._names.at(t.name)}},this).forEach(t,s)},r.prototype.allGeneratedPositionsFor=function(t){var e=o.getArg(t,"line"),n={source:o.getArg(t,"source"),originalLine:e,originalColumn:o.getArg(t,"column",0)};if(null!=this.sourceRoot&&(n.source=o.relative(this.sourceRoot,n.source)),!this._sources.has(n.source))return[];n.source=this._sources.indexOf(n.source);var r=[],i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(i>=0){var s=this._originalMappings[i];if(void 0===t.column)for(var a=s.originalLine;s&&s.originalLine===a;)r.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var l=s.originalColumn;s&&s.originalLine===e&&s.originalColumn==l;)r.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return r},e.SourceMapConsumer=r,i.prototype=Object.create(r.prototype),i.prototype.consumer=r,i.fromSourceMap=function(t){var e=Object.create(i.prototype),n=e._names=l.fromArray(t._names.toArray(),!0),r=e._sources=l.fromArray(t._sources.toArray(),!0);e.sourceRoot=t._sourceRoot,e.sourcesContent=t._generateSourcesContent(e._sources.toArray(),e.sourceRoot),e.file=t._file;for(var a=t._mappings.toArray().slice(),u=e.__generatedMappings=[],p=e.__originalMappings=[],f=0,h=a.length;h>f;f++){var d=a[f],m=new s;m.generatedLine=d.generatedLine,m.generatedColumn=d.generatedColumn,d.source&&(m.source=r.indexOf(d.source),m.originalLine=d.originalLine,m.originalColumn=d.originalColumn,d.name&&(m.name=n.indexOf(d.name)),p.push(m)),u.push(m)}return c(e.__originalMappings,o.compareByOriginalPositions),e},i.prototype._version=3,Object.defineProperty(i.prototype,"sources",{get:function(){return this._sources.toArray().map(function(t){return null!=this.sourceRoot?o.join(this.sourceRoot,t):t},this)}}),i.prototype._parseMappings=function(t,e){for(var n,r,i,a,u,l=1,f=0,h=0,d=0,m=0,y=0,g=t.length,v=0,A={},E={},b=[],x=[];g>v;)if(";"===t.charAt(v))l++,v++,f=0;else if(","===t.charAt(v))v++;else{for(n=new s,n.generatedLine=l,a=v;g>a&&!this._charIsMappingSeparator(t,a);a++);if(r=t.slice(v,a),i=A[r])v+=r.length;else{for(i=[];a>v;)p.decode(t,v,E),u=E.value,v=E.rest,i.push(u);if(2===i.length)throw new Error("Found a source, but no line and column");if(3===i.length)throw new Error("Found a source and line, but no column");A[r]=i}n.generatedColumn=f+i[0],f=n.generatedColumn,i.length>1&&(n.source=m+i[1],m+=i[1],n.originalLine=h+i[2],h=n.originalLine,n.originalLine+=1,n.originalColumn=d+i[3],d=n.originalColumn,i.length>4&&(n.name=y+i[4],y+=i[4])),x.push(n),"number"==typeof n.originalLine&&b.push(n)}c(x,o.compareByGeneratedPositionsDeflated),this.__generatedMappings=x,c(b,o.compareByOriginalPositions),this.__originalMappings=b},i.prototype._findMapping=function(t,e,n,r,i,s){if(t[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[n]);if(t[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[r]);return u.search(t,e,i,s)},i.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var e=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var n=this._generatedMappings[t+1];if(e.generatedLine===n.generatedLine){e.lastGeneratedColumn=n.generatedColumn-1;continue}}e.lastGeneratedColumn=1/0}},i.prototype.originalPositionFor=function(t){var e={generatedLine:o.getArg(t,"line"),generatedColumn:o.getArg(t,"column")},n=this._findMapping(e,this._generatedMappings,"generatedLine","generatedColumn",o.compareByGeneratedPositionsDeflated,o.getArg(t,"bias",r.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===e.generatedLine){var s=o.getArg(i,"source",null);null!==s&&(s=this._sources.at(s),null!=this.sourceRoot&&(s=o.join(this.sourceRoot,s)));var a=o.getArg(i,"name",null);return null!==a&&(a=this._names.at(a)),{source:s,line:o.getArg(i,"originalLine",null),column:o.getArg(i,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},i.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return null==t}):!1},i.prototype.sourceContentFor=function(t,e){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(t=o.relative(this.sourceRoot,t)),this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];var n;if(null!=this.sourceRoot&&(n=o.urlParse(this.sourceRoot))){var r=t.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(r))return this.sourcesContent[this._sources.indexOf(r)];if((!n.path||"/"==n.path)&&this._sources.has("/"+t))return this.sourcesContent[this._sources.indexOf("/"+t)]}if(e)return null;throw new Error('"'+t+'" is not in the SourceMap.')},i.prototype.generatedPositionFor=function(t){var e=o.getArg(t,"source");if(null!=this.sourceRoot&&(e=o.relative(this.sourceRoot,e)),!this._sources.has(e))return{line:null,column:null,lastColumn:null};e=this._sources.indexOf(e);var n={source:e,originalLine:o.getArg(t,"line"),originalColumn:o.getArg(t,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,o.getArg(t,"bias",r.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},e.BasicSourceMapConsumer=i,a.prototype=Object.create(r.prototype),a.prototype.constructor=r,a.prototype._version=3,Object.defineProperty(a.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var n=0;n<this._sections[e].consumer.sources.length;n++)t.push(this._sections[e].consumer.sources[n]);return t}}),a.prototype.originalPositionFor=function(t){var e={generatedLine:o.getArg(t,"line"),generatedColumn:o.getArg(t,"column")},n=u.search(e,this._sections,function(t,e){var n=t.generatedLine-e.generatedOffset.generatedLine;return n?n:t.generatedColumn-e.generatedOffset.generatedColumn}),r=this._sections[n];return r?r.consumer.originalPositionFor({line:e.generatedLine-(r.generatedOffset.generatedLine-1),column:e.generatedColumn-(r.generatedOffset.generatedLine===e.generatedLine?r.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}},a.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})},a.prototype.sourceContentFor=function(t,e){for(var n=0;n<this._sections.length;n++){var r=this._sections[n],i=r.consumer.sourceContentFor(t,!0);if(i)return i}if(e)return null;throw new Error('"'+t+'" is not in the SourceMap.')},a.prototype.generatedPositionFor=function(t){for(var e=0;e<this._sections.length;e++){var n=this._sections[e];if(-1!==n.consumer.sources.indexOf(o.getArg(t,"source"))){var r=n.consumer.generatedPositionFor(t);if(r){var i={line:r.line+(n.generatedOffset.generatedLine-1),column:r.column+(n.generatedOffset.generatedLine===r.line?n.generatedOffset.generatedColumn-1:0)};return i}}}return{line:null,column:null}},a.prototype._parseMappings=function(t,e){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var r=this._sections[n],i=r.consumer._generatedMappings,s=0;s<i.length;s++){var a=i[n],u=r.consumer._sources.at(a.source);null!==r.consumer.sourceRoot&&(u=o.join(r.consumer.sourceRoot,u)),this._sources.add(u),u=this._sources.indexOf(u);var l=r.consumer._names.at(a.name);this._names.add(l),l=this._names.indexOf(l);var p={source:u,generatedLine:a.generatedLine+(r.generatedOffset.generatedLine-1),generatedColumn:a.column+(r.generatedOffset.generatedLine===a.generatedLine)?r.generatedOffset.generatedColumn-1:0,originalLine:a.originalLine,originalColumn:a.originalColumn,name:l};this.__generatedMappings.push(p),"number"==typeof p.originalLine&&this.__originalMappings.push(p)}c(this.__generatedMappings,o.compareByGeneratedPositionsDeflated),c(this.__originalMappings,o.compareByOriginalPositions)},e.IndexedSourceMapConsumer=a})},{155:155,156:156,158:158,160:160,164:164,165:165}],162:[function(t,e,n){if("function"!=typeof r)var r=t(165)(e,t);r(function(t,e,n){function r(t){t||(t={}),this._file=s.getArg(t,"file",null),this._sourceRoot=s.getArg(t,"sourceRoot",null),this._skipValidation=s.getArg(t,"skipValidation",!1),this._sources=new a,this._names=new a,this._mappings=new o,this._sourcesContents=null}var i=t(156),s=t(164),a=t(155).ArraySet,o=t(159).MappingList;r.prototype._version=3,r.fromSourceMap=function(t){var e=t.sourceRoot,n=new r({file:t.file,sourceRoot:e});return t.eachMapping(function(t){var r={generated:{line:t.generatedLine,column:t.generatedColumn}};null!=t.source&&(r.source=t.source,null!=e&&(r.source=s.relative(e,r.source)),r.original={line:t.originalLine,column:t.originalColumn},null!=t.name&&(r.name=t.name)),n.addMapping(r)}),t.sources.forEach(function(e){var r=t.sourceContentFor(e);null!=r&&n.setSourceContent(e,r)}),n},r.prototype.addMapping=function(t){var e=s.getArg(t,"generated"),n=s.getArg(t,"original",null),r=s.getArg(t,"source",null),i=s.getArg(t,"name",null);this._skipValidation||this._validateMapping(e,n,r,i),null==r||this._sources.has(r)||this._sources.add(r),null==i||this._names.has(i)||this._names.add(i),this._mappings.add({generatedLine:e.line,generatedColumn:e.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:i})},r.prototype.setSourceContent=function(t,e){var n=t;null!=this._sourceRoot&&(n=s.relative(this._sourceRoot,n)),null!=e?(this._sourcesContents||(this._sourcesContents={}),this._sourcesContents[s.toSetString(n)]=e):this._sourcesContents&&(delete this._sourcesContents[s.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},r.prototype.applySourceMap=function(t,e,n){var r=e;if(null==e){if(null==t.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=t.file}var i=this._sourceRoot;null!=i&&(r=s.relative(i,r));var o=new a,u=new a;this._mappings.unsortedForEach(function(e){if(e.source===r&&null!=e.originalLine){var a=t.originalPositionFor({line:e.originalLine,column:e.originalColumn});null!=a.source&&(e.source=a.source,null!=n&&(e.source=s.join(n,e.source)),null!=i&&(e.source=s.relative(i,e.source)),e.originalLine=a.line,e.originalColumn=a.column,null!=a.name&&(e.name=a.name))}var l=e.source;null==l||o.has(l)||o.add(l);var p=e.name;null==p||u.has(p)||u.add(p)},this),this._sources=o,this._names=u,t.sources.forEach(function(e){var r=t.sourceContentFor(e);null!=r&&(null!=n&&(e=s.join(n,e)),null!=i&&(e=s.relative(i,e)),this.setSourceContent(e,r))},this)},r.prototype._validateMapping=function(t,e,n,r){if((!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0)||e||n||r)&&!(t&&"line"in t&&"column"in t&&e&&"line"in e&&"column"in e&&t.line>0&&t.column>=0&&e.line>0&&e.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({
generated:t,source:n,original:e,name:r}))},r.prototype._serializeMappings=function(){for(var t,e=0,n=1,r=0,a=0,o=0,u=0,l="",p=this._mappings.toArray(),c=0,f=p.length;f>c;c++){if(t=p[c],t.generatedLine!==n)for(e=0;t.generatedLine!==n;)l+=";",n++;else if(c>0){if(!s.compareByGeneratedPositionsInflated(t,p[c-1]))continue;l+=","}l+=i.encode(t.generatedColumn-e),e=t.generatedColumn,null!=t.source&&(l+=i.encode(this._sources.indexOf(t.source)-u),u=this._sources.indexOf(t.source),l+=i.encode(t.originalLine-1-a),a=t.originalLine-1,l+=i.encode(t.originalColumn-r),r=t.originalColumn,null!=t.name&&(l+=i.encode(this._names.indexOf(t.name)-o),o=this._names.indexOf(t.name)))}return l},r.prototype._generateSourcesContent=function(t,e){return t.map(function(t){if(!this._sourcesContents)return null;null!=e&&(t=s.relative(e,t));var n=s.toSetString(t);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)},r.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(t.file=this._file),null!=this._sourceRoot&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t},r.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=r})},{155:155,156:156,159:159,164:164,165:165}],163:[function(t,e,n){if("function"!=typeof r)var r=t(165)(e,t);r(function(t,e,n){function r(t,e,n,r,i){this.children=[],this.sourceContents={},this.line=null==t?null:t,this.column=null==e?null:e,this.source=null==n?null:n,this.name=null==i?null:i,this[u]=!0,null!=r&&this.add(r)}var i=t(162).SourceMapGenerator,s=t(164),a=/(\r?\n)/,o=10,u="$$$isSourceNode$$$";r.fromStringWithSourceMap=function(t,e,n){function i(t,e){if(null===t||void 0===t.source)o.add(e);else{var i=n?s.join(n,t.source):t.source;o.add(new r(t.originalLine,t.originalColumn,i,e,t.name))}}var o=new r,u=t.split(a),l=function(){var t=u.shift(),e=u.shift()||"";return t+e},p=1,c=0,f=null;return e.eachMapping(function(t){if(null!==f){if(!(p<t.generatedLine)){var e=u[0],n=e.substr(0,t.generatedColumn-c);return u[0]=e.substr(t.generatedColumn-c),c=t.generatedColumn,i(f,n),void(f=t)}var n="";i(f,l()),p++,c=0}for(;p<t.generatedLine;)o.add(l()),p++;if(c<t.generatedColumn){var e=u[0];o.add(e.substr(0,t.generatedColumn)),u[0]=e.substr(t.generatedColumn),c=t.generatedColumn}f=t},this),u.length>0&&(f&&i(f,l()),o.add(u.join(""))),e.sources.forEach(function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=s.join(n,t)),o.setSourceContent(t,r))}),o},r.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(t){this.add(t)},this);else{if(!t[u]&&"string"!=typeof t)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);t&&this.children.push(t)}return this},r.prototype.prepend=function(t){if(Array.isArray(t))for(var e=t.length-1;e>=0;e--)this.prepend(t[e]);else{if(!t[u]&&"string"!=typeof t)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);this.children.unshift(t)}return this},r.prototype.walk=function(t){for(var e,n=0,r=this.children.length;r>n;n++)e=this.children[n],e[u]?e.walk(t):""!==e&&t(e,{source:this.source,line:this.line,column:this.column,name:this.name})},r.prototype.join=function(t){var e,n,r=this.children.length;if(r>0){for(e=[],n=0;r-1>n;n++)e.push(this.children[n]),e.push(t);e.push(this.children[n]),this.children=e}return this},r.prototype.replaceRight=function(t,e){var n=this.children[this.children.length-1];return n[u]?n.replaceRight(t,e):"string"==typeof n?this.children[this.children.length-1]=n.replace(t,e):this.children.push("".replace(t,e)),this},r.prototype.setSourceContent=function(t,e){this.sourceContents[s.toSetString(t)]=e},r.prototype.walkSourceContents=function(t){for(var e=0,n=this.children.length;n>e;e++)this.children[e][u]&&this.children[e].walkSourceContents(t);for(var r=Object.keys(this.sourceContents),e=0,n=r.length;n>e;e++)t(s.fromSetString(r[e]),this.sourceContents[r[e]])},r.prototype.toString=function(){var t="";return this.walk(function(e){t+=e}),t},r.prototype.toStringWithSourceMap=function(t){var e={code:"",line:1,column:0},n=new i(t),r=!1,s=null,a=null,u=null,l=null;return this.walk(function(t,i){e.code+=t,null!==i.source&&null!==i.line&&null!==i.column?((s!==i.source||a!==i.line||u!==i.column||l!==i.name)&&n.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:e.line,column:e.column},name:i.name}),s=i.source,a=i.line,u=i.column,l=i.name,r=!0):r&&(n.addMapping({generated:{line:e.line,column:e.column}}),s=null,r=!1);for(var p=0,c=t.length;c>p;p++)t.charCodeAt(p)===o?(e.line++,e.column=0,p+1===c?(s=null,r=!1):r&&n.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:e.line,column:e.column},name:i.name})):e.column++}),this.walkSourceContents(function(t,e){n.setSourceContent(t,e)}),{code:e.code,map:n}},e.SourceNode=r})},{162:162,164:164,165:165}],164:[function(t,e,n){if("function"!=typeof r)var r=t(165)(e,t);r(function(t,e,n){function r(t,e,n){if(e in t)return t[e];if(3===arguments.length)return n;throw new Error('"'+e+'" is a required argument.')}function i(t){var e=t.match(m);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}function s(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}function a(t){var e=t,n=i(t);if(n){if(!n.path)return t;e=n.path}for(var r,a="/"===e.charAt(0),o=e.split(/\/+/),u=0,l=o.length-1;l>=0;l--)r=o[l],"."===r?o.splice(l,1):".."===r?u++:u>0&&(""===r?(o.splice(l+1,u),u=0):(o.splice(l,2),u--));return e=o.join("/"),""===e&&(e=a?"/":"."),n?(n.path=e,s(n)):e}function o(t,e){""===t&&(t="."),""===e&&(e=".");var n=i(e),r=i(t);if(r&&(t=r.path||"/"),n&&!n.scheme)return r&&(n.scheme=r.scheme),s(n);if(n||e.match(y))return e;if(r&&!r.host&&!r.path)return r.host=e,s(r);var o="/"===e.charAt(0)?e:a(t.replace(/\/+$/,"")+"/"+e);return r?(r.path=o,s(r)):o}function u(t,e){""===t&&(t="."),t=t.replace(/\/$/,"");for(var n=0;0!==e.indexOf(t+"/");){var r=t.lastIndexOf("/");if(0>r)return e;if(t=t.slice(0,r),t.match(/^([^\/]+:\/)?\/*$/))return e;++n}return Array(n+1).join("../")+e.substr(t.length+1)}function l(t){return"$"+t}function p(t){return t.substr(1)}function c(t,e,n){var r=t.source-e.source;return 0!==r?r:(r=t.originalLine-e.originalLine,0!==r?r:(r=t.originalColumn-e.originalColumn,0!==r||n?r:(r=t.generatedColumn-e.generatedColumn,0!==r?r:(r=t.generatedLine-e.generatedLine,0!==r?r:t.name-e.name))))}function f(t,e,n){var r=t.generatedLine-e.generatedLine;return 0!==r?r:(r=t.generatedColumn-e.generatedColumn,0!==r||n?r:(r=t.source-e.source,0!==r?r:(r=t.originalLine-e.originalLine,0!==r?r:(r=t.originalColumn-e.originalColumn,0!==r?r:t.name-e.name))))}function h(t,e){return t===e?0:t>e?1:-1}function d(t,e){var n=t.generatedLine-e.generatedLine;return 0!==n?n:(n=t.generatedColumn-e.generatedColumn,0!==n?n:(n=h(t.source,e.source),0!==n?n:(n=t.originalLine-e.originalLine,0!==n?n:(n=t.originalColumn-e.originalColumn,0!==n?n:h(t.name,e.name)))))}e.getArg=r;var m=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,y=/^data:.+\,.+$/;e.urlParse=i,e.urlGenerate=s,e.normalize=a,e.join=o,e.relative=u,e.toSetString=l,e.fromSetString=p,e.compareByOriginalPositions=c,e.compareByGeneratedPositionsDeflated=f,e.compareByGeneratedPositionsInflated=d})},{165:165}],165:[function(t,e,n){(function(n,r){"use strict";function i(e,i){function s(t){var e,n;for(e=0;t[e];e+=1)if(n=t[e],"."===n)t.splice(e,1),e-=1;else if(".."===n){if(1===e&&(".."===t[2]||".."===t[0]))break;e>0&&(t.splice(e-1,2),e-=2)}}function a(t,e){var n;return t&&"."===t.charAt(0)&&e&&(n=e.split("/"),n=n.slice(0,n.length-1),n=n.concat(t.split("/")),s(n),t=n.join("/")),t}function o(t){return function(e){return a(e,t)}}function u(t){function e(e){d[t]=e}return e.fromText=function(t,e){throw new Error("amdefine does not implement load.fromText")},e}function l(t,n,s){var a,o,u,l;if(t)o=d[t]={},u={id:t,uri:r,exports:o},a=c(i,o,u,t);else{if(m)throw new Error("amdefine with no module ID cannot be called more than once per file.");m=!0,o=e.exports,u=e,a=c(i,o,u,e.id)}n&&(n=n.map(function(t){return a(t)})),l="function"==typeof s?s.apply(u.exports,n):s,void 0!==l&&(u.exports=l,t&&(d[t]=u.exports))}function p(t,e,n){Array.isArray(t)?(n=e,e=t,t=void 0):"string"!=typeof t&&(n=t,t=e=void 0),e&&!Array.isArray(e)&&(n=e,e=void 0),e||(e=["require","exports","module"]),t?h[t]=[t,e,n]:l(t,e,n)}var c,f,h={},d={},m=!1,y=t(7);return c=function(t,e,r,i){function s(s,a){return"string"==typeof s?f(t,e,r,s,i):(s=s.map(function(n){return f(t,e,r,n,i)}),void(a&&n.nextTick(function(){a.apply(null,s)})))}return s.toUrl=function(t){return 0===t.indexOf(".")?a(t,y.dirname(r.filename)):t},s},i=i||function(){return e.require.apply(e,arguments)},f=function(t,e,n,r,i){var s,p,m=r.indexOf("!"),y=r;if(-1===m){if(r=a(r,i),"require"===r)return c(t,e,n,i);if("exports"===r)return e;if("module"===r)return n;if(d.hasOwnProperty(r))return d[r];if(h[r])return l.apply(null,h[r]),d[r];if(t)return t(y);throw new Error("No module with ID: "+r)}return s=r.substring(0,m),r=r.substring(m+1,r.length),p=f(t,e,n,s,i),r=p.normalize?p.normalize(r,o(i)):a(r,i),d[r]?d[r]:(p.load(r,c(t,e,n,i),u(r),{}),d[r])},p.require=function(t){return d[t]?d[t]:h[t]?(l.apply(null,h[t]),d[t]):void 0},p.amd={},p}e.exports=i}).call(this,t(8),"/../babel-core/node_modules/source-map/node_modules/amdefine/amdefine.js")},{7:7,8:8}],166:[function(t,e,n){e.exports={name:"babel-core",version:"6.1.2",description:"Babel compiler core.",author:"Sebastian McKenzie <sebmck@gmail.com>",homepage:"https://babeljs.io/",license:"MIT",repository:"https://github.com/babel/babel/tree/master/packages/babel-core",browser:{"./lib/api/register/node.js":"./lib/api/register/browser.js","esprima-fb":!1},keywords:["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var"],scripts:{bench:"make bench",test:"make test"},dependencies:{"babel-code-frame":"^6.0.15","babel-generator":"^6.1.2","babel-helpers":"^6.1.2","babel-messages":"^6.0.15","babel-template":"^6.0.16","babel-runtime":"^5.0.0","babel-traverse":"^6.1.2","babel-types":"^6.1.2",babylon:"^6.1.2","convert-source-map":"^1.1.0",debug:"^2.1.1",esutils:"^2.0.0","home-or-tmp":"^1.0.0",json5:"^0.4.0",lodash:"^3.10.0",minimatch:"^2.0.3","path-exists":"^1.0.0","path-is-absolute":"^1.0.0","private":"^0.1.6",regenerator:"0.8.35","shebang-regex":"^1.0.0",slash:"^1.0.0","source-map":"^0.4.0","source-map-support":"^0.2.10"},devDependencies:{"babel-polyfill":"^6.0.16"}}},{}],167:[function(t,e,n){"use strict";var r=t(273)["default"],i=t(277)["default"];n.__esModule=!0;var s=t(247),a=i(s),o=t(262),u=i(o),l=function(){function t(e,n){r(this,t),this.printedCommentStarts={},this.parenPushNewlineState=null,this.position=e,this._indent=n.indent.base,this.format=n,this.buf=""}return t.prototype.catchUp=function(t){if(t.loc&&this.format.retainLines&&this.buf)for(;this.position.line<t.loc.start.line;)this._push("\n")},t.prototype.get=function(){return u["default"](this.buf)},t.prototype.getIndent=function(){return this.format.compact||this.format.concise?"":a["default"](this.format.indent.style,this._indent)},t.prototype.indentSize=function(){return this.getIndent().length},t.prototype.indent=function(){this._indent++},t.prototype.dedent=function(){this._indent--},t.prototype.semicolon=function(){this.push(";")},t.prototype.ensureSemicolon=function(){this.isLast(";")||this.semicolon()},t.prototype.rightBrace=function(){this.newline(!0),this.push("}")},t.prototype.keyword=function(t){this.push(t),this.space()},t.prototype.space=function(t){(t||!this.format.compact)&&(t||this.buf&&!this.isLast(" ")&&!this.isLast("\n"))&&this.push(" ")},t.prototype.removeLast=function(t){return this.format.compact?void 0:this._removeLast(t)},t.prototype._removeLast=function(t){this._isLast(t)&&(this.buf=this.buf.substr(0,this.buf.length-1),this.position.unshift(t))},t.prototype.startTerminatorless=function(){return this.parenPushNewlineState={printed:!1}},t.prototype.endTerminatorless=function(t){t.printed&&(this.dedent(),this.newline(),this.push(")"))},t.prototype.newline=function(t,e){if(!this.format.retainLines&&!this.format.compact){if(this.format.concise)return void this.space();if(e=e||!1,"number"!=typeof t)"boolean"==typeof t&&(e=t),this._newline(e);else{if(t=Math.min(2,t),(this.endsWith("{\n")||this.endsWith(":\n"))&&t--,0>=t)return;for(;t>0;)this._newline(e),t--}}},t.prototype._newline=function(t){this.endsWith("\n\n")||(t&&this.isLast("\n")&&this.removeLast("\n"),this.removeLast(" "),this._removeSpacesAfterLastNewline(),this._push("\n"))},t.prototype._removeSpacesAfterLastNewline=function(){var t=this.buf.lastIndexOf("\n");if(-1!==t){for(var e=this.buf.length-1;e>t&&" "===this.buf[e];)e--;e===t&&(this.buf=this.buf.substring(0,e+1))}},t.prototype.push=function(t,e){if(!this.format.compact&&this._indent&&!e&&"\n"!==t){var n=this.getIndent();t=t.replace(/\n/g,"\n"+n),this.isLast("\n")&&this._push(n)}this._push(t)},t.prototype._push=function(t){var e=this.parenPushNewlineState;if(e)for(var n=0;n<t.length;n++){var r=t[n];if(" "!==r){this.parenPushNewlineState=null,("\n"===r||"/"===r)&&(this._push("("),this.indent(),e.printed=!0);break}}this.position.push(t),this.buf+=t},t.prototype.endsWith=function(t){var e=arguments.length<=1||void 0===arguments[1]?this.buf:arguments[1];return 1===t.length?e[e.length-1]===t:e.slice(-t.length)===t},t.prototype.isLast=function(t){return this.format.compact?!1:this._isLast(t)},t.prototype._isLast=function(t){var e=this.buf,n=e[e.length-1];return Array.isArray(t)?t.indexOf(n)>=0:t===n},t}();n["default"]=l,e.exports=n["default"]},{247:247,262:262,273:273,277:277}],168:[function(t,e,n){"use strict";function r(t){this.print(t.program,t)}function i(t){this.printInnerComments(t,!1),this.printSequence(t.directives,t),t.directives&&t.directives.length&&this.newline(),this.printSequence(t.body,t)}function s(t){this.push("{"),this.printInnerComments(t),t.body.length?(this.newline(),this.printSequence(t.directives,t,{indent:!0}),t.directives&&t.directives.length&&this.newline(),this.printSequence(t.body,t,{indent:!0}),this.format.retainLines||this.removeLast("\n"),this.rightBrace()):this.push("}")}function a(){}function o(t){this.print(t.value,t),this.semicolon()}function u(t){this.push(this._stringLiteral(t.value))}n.__esModule=!0,n.File=r,n.Program=i,n.BlockStatement=s,n.Noop=a,n.Directive=o,n.DirectiveLiteral=u},{}],169:[function(t,e,n){"use strict";function r(t){this.printJoin(t.decorators,t,{separator:""}),this.push("class"),t.id&&(this.push(" "),this.print(t.id,t)),this.print(t.typeParameters,t),t.superClass&&(this.push(" extends "),this.print(t.superClass,t),this.print(t.superTypeParameters,t)),t["implements"]&&(this.push(" implements "),this.printJoin(t["implements"],t,{separator:", "})),this.space(),this.print(t.body,t)}function i(t){this.push("{"),this.printInnerComments(t),0===t.body.length?this.push("}"):(this.newline(),this.indent(),this.printSequence(t.body,t),this.dedent(),this.rightBrace())}function s(t){this.printJoin(t.decorators,t,{separator:""}),t["static"]&&this.push("static "),this.print(t.key,t),this.print(t.typeAnnotation,t),t.value&&(this.space(),this.push("="),this.space(),this.print(t.value,t)),this.semicolon()}function a(t){this.printJoin(t.decorators,t,{separator:""}),t["static"]&&this.push("static "),"constructorCall"===t.kind&&this.push("call "),this._method(t)}n.__esModule=!0,n.ClassDeclaration=r,n.ClassBody=i,n.ClassProperty=s,n.ClassMethod=a,n.ClassExpression=r},{}],170:[function(t,e,n){"use strict";function r(t){var e=/[a-z]$/.test(t.operator),n=t.argument;(T.isUpdateExpression(n)||T.isUnaryExpression(n))&&(e=!0),T.isUnaryExpression(n)&&"!"===n.operator&&(e=!1),this.push(t.operator),e&&this.push(" "),this.print(t.argument,t)}function i(t){this.push("do"),this.space(),this.print(t.body,t)}function s(t){this.push("("),this.print(t.expression,t),this.push(")")}function a(t){t.prefix?(this.push(t.operator),this.print(t.argument,t)):(this.print(t.argument,t),this.push(t.operator))}function o(t){this.print(t.test,t),this.space(),this.push("?"),this.space(),this.print(t.consequent,t),this.space(),this.push(":"),this.space(),this.print(t.alternate,t)}function u(t){this.push("new "),this.print(t.callee,t),this.push("("),this.printList(t.arguments,t),this.push(")")}function l(t){this.printList(t.expressions,t)}function p(){this.push("this")}function c(){this.push("super")}function f(t){this.push("@"),this.print(t.expression,t),this.newline()}function h(t){this.print(t.callee,t),this.push("(");var e=t._prettyCall&&!this.format.retainLines&&!this.format.compact,n=void 0;e&&(n=",\n",this.newline(),this.indent()),this.printList(t.arguments,t,{separator:n}),e&&(this.newline(),this.dedent()),this.push(")")}function d(t){return function(e){if(this.push(t),(e.delegate||e.all)&&this.push("*"),e.argument){this.push(" ");var n=this.startTerminatorless();this.print(e.argument,e),this.endTerminatorless(n)}}}function m(){this.semicolon()}function y(t){this.print(t.expression,t),this.semicolon()}function g(t){this.print(t.left,t),this.push(" = "),this.print(t.right,t)}function v(t,e){var n=this._inForStatementInit&&"in"===t.operator&&!k["default"].needsParens(t,e);n&&this.push("("),this.print(t.left,t);var r=!this.format.compact||"in"===t.operator||"instanceof"===t.operator;r=!0,r&&this.push(" "),this.push(t.operator),r||(r="<"===t.operator&&T.isUnaryExpression(t.right,{prefix:!0,operator:"!"})&&T.isUnaryExpression(t.right.argument,{prefix:!0,operator:"--"})),r&&this.push(" "),this.print(t.right,t),n&&this.push(")")}function A(t){this.print(t.object,t),this.push("::"),this.print(t.callee,t)}function E(t){if(this.print(t.object,t),!t.computed&&T.isMemberExpression(t.property))throw new TypeError("Got a MemberExpression for MemberExpression property");var e=t.computed;if(T.isLiteral(t.property)&&w["default"](t.property.value)&&(e=!0),e)this.push("["),this.print(t.property,t),this.push("]");else{if(T.isLiteral(t.object)){var n=this.getPossibleRaw(t.object)||this._stringLiteral(t.object);!F["default"](+n)||P.test(n)||this.endsWith(".")||this.push(".")}this.push("."),this.print(t.property,t)}}function b(t){this.print(t.meta,t),this.push("."),this.print(t.property,t)}var x=t(277)["default"],D=t(278)["default"];n.__esModule=!0,n.UnaryExpression=r,n.DoExpression=i,n.ParenthesizedExpression=s,n.UpdateExpression=a,n.ConditionalExpression=o,n.NewExpression=u,n.SequenceExpression=l,n.ThisExpression=p,n.Super=c,n.Decorator=f,n.CallExpression=h,n.EmptyStatement=m,n.ExpressionStatement=y,n.AssignmentPattern=g,n.AssignmentExpression=v,n.BindExpression=A,n.MemberExpression=E,n.MetaProperty=b;var C=t(187),F=x(C),S=t(239),w=x(S),B=t(539),T=D(B),_=t(179),k=x(_),P=/e/i,N=d("yield");n.YieldExpression=N;var I=d("await");n.AwaitExpression=I,n.BinaryExpression=v,n.LogicalExpression=v},{179:179,187:187,239:239,277:277,278:278,539:539}],171:[function(t,e,n){"use strict";function r(){this.push("any")}function i(t){this.print(t.elementType,t),this.push("["),this.push("]")}function s(){this.push("bool")}function a(t){this.push(t.value?"true":"false")}function o(t){this.push("declare class "),this._interfaceish(t)}function u(t){this.push("declare function "),this.print(t.id,t),this.print(t.id.typeAnnotation.typeAnnotation,t),this.semicolon()}function l(t){this.push("declare module "),this.print(t.id,t),this.space(),this.print(t.body,t)}function p(t){this.push("declare var "),this.print(t.id,t),this.print(t.id.typeAnnotation,t),this.semicolon()}function c(){this.push("*")}function f(t,e){this.print(t.typeParameters,t),this.push("("),this.printList(t.params,t),t.rest&&(t.params.length&&(this.push(","),this.space()),this.push("..."),this.print(t.rest,t)),this.push(")"),"ObjectTypeProperty"===e.type||"ObjectTypeCallProperty"===e.type||"DeclareFunction"===e.type?this.push(":"):(this.space(),this.push("=>")),this.space(),this.print(t.returnType,t)}function h(t){this.print(t.name,t),t.optional&&this.push("?"),this.push(":"),this.space(),this.print(t.typeAnnotation,t)}function d(t){this.print(t.id,t),this.print(t.typeParameters,t)}function m(t){this.print(t.id,t),this.print(t.typeParameters,t),t["extends"].length&&(this.push(" extends "),this.printJoin(t["extends"],t,{separator:", "})),this.space(),this.print(t.body,t)}function y(t){this.push("interface "),this._interfaceish(t)}function g(t){this.printJoin(t.types,t,{separator:" & "})}function v(){this.push("mixed")}function A(t){this.push("?"),this.print(t.typeAnnotation,t)}function E(){this.push("number")}function b(t){this.push(this._stringLiteral(t.value))}function x(){this.push("string")}function D(t){this.push("["),this.printJoin(t.types,t,{separator:", "}),this.push("]")}function C(t){this.push("typeof "),this.print(t.argument,t)}function F(t){this.push("type "),this.print(t.id,t),this.print(t.typeParameters,t),this.space(),this.push("="),this.space(),this.print(t.right,t),this.semicolon()}function S(t){this.push(":"),this.space(),t.optional&&this.push("?"),this.print(t.typeAnnotation,t)}function w(t){var e=this;this.push("<"),this.printJoin(t.params,t,{separator:", ",iterator:function(t){e.print(t.typeAnnotation,t)}}),this.push(">")}function B(t){var e=this;this.push("{");var n=t.properties.concat(t.callProperties,t.indexers);n.length&&(this.space(),this.printJoin(n,t,{separator:!1,indent:!0,iterator:function(){1!==n.length&&(e.semicolon(),e.space())}}),this.space()),this.push("}")}function T(t){t["static"]&&this.push("static "),this.print(t.value,t)}function _(t){t["static"]&&this.push("static "),this.push("["),this.print(t.id,t),this.push(":"),this.space(),this.print(t.key,t),this.push("]"),this.push(":"),this.space(),this.print(t.value,t)}function k(t){t["static"]&&this.push("static "),this.print(t.key,t),t.optional&&this.push("?"),R.isFunctionTypeAnnotation(t.value)||(this.push(":"),this.space()),this.print(t.value,t)}function P(t){this.print(t.qualification,t),this.push("."),this.print(t.id,t)}function N(t){this.printJoin(t.types,t,{separator:" | "})}function I(t){this.push("("),this.print(t.expression,t),this.print(t.typeAnnotation,t),this.push(")")}function L(){this.push("void")}var O=t(278)["default"];n.__esModule=!0,n.AnyTypeAnnotation=r,n.ArrayTypeAnnotation=i,n.BooleanTypeAnnotation=s,n.BooleanLiteralTypeAnnotation=a,n.DeclareClass=o,n.DeclareFunction=u,n.DeclareModule=l,n.DeclareVariable=p,n.ExistentialTypeParam=c,n.FunctionTypeAnnotation=f,n.FunctionTypeParam=h,n.InterfaceExtends=d,n._interfaceish=m,n.InterfaceDeclaration=y,n.IntersectionTypeAnnotation=g,n.MixedTypeAnnotation=v,n.NullableTypeAnnotation=A,n.NumberTypeAnnotation=E,n.StringLiteralTypeAnnotation=b,n.StringTypeAnnotation=x,n.TupleTypeAnnotation=D,n.TypeofTypeAnnotation=C,n.TypeAlias=F,n.TypeAnnotation=S,n.TypeParameterInstantiation=w,n.ObjectTypeAnnotation=B,n.ObjectTypeCallProperty=T,n.ObjectTypeIndexer=_,n.ObjectTypeProperty=k,n.QualifiedTypeIdentifier=P,n.UnionTypeAnnotation=N,n.TypeCastExpression=I,n.VoidTypeAnnotation=L;var M=t(539),R=O(M);n.ClassImplements=d,n.GenericTypeAnnotation=d;var j=t(177);n.NumericLiteralTypeAnnotation=j.NumericLiteral,n.TypeParameterDeclaration=w},{177:177,278:278,539:539}],172:[function(t,e,n){"use strict";function r(t){this.print(t.name,t),t.value&&(this.push("="),this.print(t.value,t))}function i(t){this.push(t.name)}function s(t){this.print(t.namespace,t),this.push(":"),this.print(t.name,t)}function a(t){this.print(t.object,t),this.push("."),this.print(t.property,t)}function o(t){this.push("{..."),this.print(t.argument,t),this.push("}")}function u(t){this.push("{"),this.print(t.expression,t),this.push("}")}function l(t){this.push(t.value,!0)}function p(t){var e=t.openingElement;if(this.print(e,t),!e.selfClosing){this.indent();for(var n=t.children,r=Array.isArray(n),i=0,n=r?n:d(n);;){var s;if(r){if(i>=n.length)break;s=n[i++]}else{if(i=n.next(),i.done)break;s=i.value}var a=s;this.print(a,t)}this.dedent(),this.print(t.closingElement,t)}}function c(t){this.push("<"),this.print(t.name,t),t.attributes.length>0&&(this.push(" "),this.printJoin(t.attributes,t,{separator:" "})),this.push(t.selfClosing?" />":">")}function f(t){this.push("</"),this.print(t.name,t),this.push(">")}function h(){}var d=t(266)["default"];n.__esModule=!0,n.JSXAttribute=r,n.JSXIdentifier=i,n.JSXNamespacedName=s,n.JSXMemberExpression=a,n.JSXSpreadAttribute=o,n.JSXExpressionContainer=u,n.JSXText=l,n.JSXElement=p,n.JSXOpeningElement=c,n.JSXClosingElement=f,n.JSXEmptyExpression=h},{266:266}],173:[function(t,e,n){"use strict";function r(t){var e=this;this.print(t.typeParameters,t),this.push("("),this.printList(t.params,t,{iterator:function(t){t.optional&&e.push("?"),e.print(t.typeAnnotation,t)}}),this.push(")"),t.returnType&&this.print(t.returnType,t)}function i(t){var e=t.kind,n=t.key;("method"===e||"init"===e)&&t.generator&&this.push("*"),("get"===e||"set"===e)&&this.push(e+" "),t.async&&this.push("async "),t.computed?(this.push("["),this.print(n,t),this.push("]")):this.print(n,t),this._params(t),this.space(),this.print(t.body,t)}function s(t){t.async&&this.push("async "),this.push("function"),t.generator&&this.push("*"),t.id?(this.push(" "),this.print(t.id,t)):this.space(),this._params(t),this.space(),this.print(t.body,t)}function a(t){t.async&&this.push("async "),1===t.params.length&&l.isIdentifier(t.params[0])?this.print(t.params[0],t):this._params(t),this.push(" => ");var e=l.isObjectExpression(t.body);e&&this.push("("),this.print(t.body,t),e&&this.push(")")}var o=t(278)["default"];n.__esModule=!0,n._params=r,n._method=i,n.FunctionExpression=s,n.ArrowFunctionExpression=a;var u=t(539),l=o(u);n.FunctionDeclaration=s},{278:278,539:539}],174:[function(t,e,n){"use strict";function r(t){this.print(t.imported,t),t.local&&t.local.name!==t.imported.name&&(this.push(" as "),this.print(t.local,t))}function i(t){this.print(t.local,t)}function s(t){this.print(t.exported,t)}function a(t){this.print(t.local,t),t.exported&&t.local.name!==t.exported.name&&(this.push(" as "),this.print(t.exported,t))}function o(t){this.push("* as "),this.print(t.exported,t)}function u(t){this.push("export *"),t.exported&&(this.push(" as "),this.print(t.exported,t)),this.push(" from "),this.print(t.source,t),this.semicolon()}function l(){this.push("export "),c.apply(this,arguments)}function p(){this.push("export default "),c.apply(this,arguments)}function c(t){if(t.declaration){var e=t.declaration;if(this.print(e,t),y.isStatement(e)||y.isFunction(e)||y.isClass(e))return}else{"type"===t.exportKind&&this.push("type ");for(var n=t.specifiers.slice(0),r=!1;;){var i=n[0];if(!y.isExportDefaultSpecifier(i)&&!y.isExportNamespaceSpecifier(i))break;r=!0,this.print(n.shift(),t),n.length&&this.push(", ")}(n.length||!n.length&&!r)&&(this.push("{"),n.length&&(this.space(),this.printJoin(n,t,{separator:", "}),this.space()),this.push("}")),t.source&&(this.push(" from "),this.print(t.source,t))}this.ensureSemicolon()}function f(t){this.push("import "),("type"===t.importKind||"typeof"===t.importKind)&&this.push(t.importKind+" ");var e=t.specifiers.slice(0);if(e&&e.length){for(;;){var n=e[0];if(!y.isImportDefaultSpecifier(n)&&!y.isImportNamespaceSpecifier(n))break;this.print(e.shift(),t),e.length&&this.push(", ")}e.length&&(this.push("{"),this.space(),this.printJoin(e,t,{separator:", "}),this.space(),this.push("}")),this.push(" from ")}this.print(t.source,t),this.semicolon()}function h(t){this.push("* as "),this.print(t.local,t)}var d=t(278)["default"];n.__esModule=!0,n.ImportSpecifier=r,n.ImportDefaultSpecifier=i,n.ExportDefaultSpecifier=s,n.ExportSpecifier=a,n.ExportNamespaceSpecifier=o,n.ExportAllDeclaration=u,n.ExportNamedDeclaration=l,n.ExportDefaultDeclaration=p,n.ImportDeclaration=f,n.ImportNamespaceSpecifier=h;var m=t(539),y=d(m)},{278:278,539:539}],175:[function(t,e,n){"use strict";function r(t){this.keyword("with"),this.push("("),this.print(t.object,t),this.push(")"),this.printBlock(t)}function i(t){this.keyword("if"),this.push("("),this.print(t.test,t),this.push(")"),this.space(),this.printAndIndentOnComments(t.consequent,t),t.alternate&&(this.isLast("}")&&this.space(),this.push("else "),this.printAndIndentOnComments(t.alternate,t))}function s(t){this.keyword("for"),this.push("("),this._inForStatementInit=!0,this.print(t.init,t),this._inForStatementInit=!1,this.push(";"),t.test&&(this.space(),this.print(t.test,t)),this.push(";"),t.update&&(this.space(),this.print(t.update,t)),this.push(")"),this.printBlock(t)}function a(t){this.keyword("while"),this.push("("),this.print(t.test,t),this.push(")"),this.printBlock(t)}function o(t){this.push("do "),this.print(t.body,t),this.space(),this.keyword("while"),this.push("("),this.print(t.test,t),this.push(");")}function u(t){var e=arguments.length<=1||void 0===arguments[1]?"label":arguments[1];return function(n){this.push(t);var r=n[e];if(r){this.push(" ");var i=this.startTerminatorless();this.print(r,n),this.endTerminatorless(i)}this.semicolon()}}function l(t){this.print(t.label,t),this.push(": "),this.print(t.body,t)}function p(t){this.keyword("try"),this.print(t.block,t),this.space(),t.handlers?this.print(t.handlers[0],t):this.print(t.handler,t),t.finalizer&&(this.space(),this.push("finally "),this.print(t.finalizer,t))}function c(t){this.keyword("catch"),this.push("("),this.print(t.param,t),this.push(") "),this.print(t.body,t)}function f(t){this.keyword("switch"),this.push("("),this.print(t.discriminant,t),this.push(")"),this.space(),this.push("{"),this.printSequence(t.cases,t,{indent:!0,addNewlines:function(e,n){return e||t.cases[t.cases.length-1]!==n?void 0:-1}}),this.push("}")}function h(t){t.test?(this.push("case "),this.print(t.test,t),this.push(":")):this.push("default:"),t.consequent.length&&(this.newline(),this.printSequence(t.consequent,t,{indent:!0}))}function d(){this.push("debugger;")}function m(t,e){this.push(t.kind+" ");var n=!1;if(!D.isFor(e))for(var r=t.declarations,i=Array.isArray(r),s=0,r=i?r:g(r);;){var a;if(i){if(s>=r.length)break;a=r[s++]}else{if(s=r.next(),s.done)break;a=s.value}var o=a;o.init&&(n=!0)}var u=void 0;this.format.compact||this.format.concise||!n||this.format.retainLines||(u=",\n"+b["default"](" ",t.kind.length+1)),this.printList(t.declarations,t,{separator:u}),(!D.isFor(e)||e.left!==t&&e.init!==t)&&this.semicolon()}function y(t){this.print(t.id,t),this.print(t.id.typeAnnotation,t),t.init&&(this.space(),this.push("="),this.space(),this.print(t.init,t))}var g=t(266)["default"],v=t(277)["default"],A=t(278)["default"];n.__esModule=!0,n.WithStatement=r,n.IfStatement=i,n.ForStatement=s,n.WhileStatement=a,n.DoWhileStatement=o,n.LabeledStatement=l,n.TryStatement=p,n.CatchClause=c,n.SwitchStatement=f,n.SwitchCase=h,n.DebuggerStatement=d,n.VariableDeclaration=m,n.VariableDeclarator=y;var E=t(247),b=v(E),x=t(539),D=A(x),C=function(t){return function(e){this.keyword("for"),this.push("("),this.print(e.left,e),this.push(" "+t+" "),this.print(e.right,e),this.push(")"),this.printBlock(e)}},F=C("in");n.ForInStatement=F;var S=C("of");n.ForOfStatement=S;var w=u("continue");n.ContinueStatement=w;var B=u("return","argument");n.ReturnStatement=B;var T=u("break");n.BreakStatement=T;var _=u("throw","argument");n.ThrowStatement=_},{247:247,266:266,277:277,278:278,539:539}],176:[function(t,e,n){"use strict";function r(t){this.print(t.tag,t),this.print(t.quasi,t)}function i(t){this._push(t.value.raw)}function s(t){this.push("`");for(var e=t.quasis,n=0;n<e.length;n++)this.print(e[n],t),n+1<e.length&&(this._push("${ "),this.print(t.expressions[n],t),this.push(" }"));this._push("`")}n.__esModule=!0,n.TaggedTemplateExpression=r,n.TemplateElement=i,n.TemplateLiteral=s},{}],177:[function(t,e,n){"use strict";function r(t){this.push(t.name)}function i(t){this.push("..."),this.print(t.argument,t);
}function s(t){var e=t.properties;this.push("{"),this.printInnerComments(t),e.length&&(this.space(),this.printList(e,t,{indent:!0}),this.space()),this.push("}")}function a(t){this.printJoin(t.decorators,t,{separator:""}),this._method(t)}function o(t){if(this.printJoin(t.decorators,t,{separator:""}),t.computed)this.push("["),this.print(t.key,t),this.push("]");else{if(g.isAssignmentPattern(t.value)&&g.isIdentifier(t.key)&&t.key.name===t.value.left.name)return void this.print(t.value,t);if(this.print(t.key,t),t.shorthand&&g.isIdentifier(t.key)&&g.isIdentifier(t.value)&&t.key.name===t.value.name)return}this.push(":"),this.space(),this.print(t.value,t)}function u(t){var e=t.elements,n=e.length;this.push("["),this.printInnerComments(t);for(var r=0;r<e.length;r++){var i=e[r];i?(r>0&&this.space(),this.print(i,t),n-1>r&&this.push(",")):this.push(",")}this.push("]")}function l(t){this.push("/"+t.pattern+"/"+t.flags)}function p(t){this.push(t.value?"true":"false")}function c(){this.push("null")}function f(t){this.push(t.value+"")}function h(t){this.push(this._stringLiteral(t.value))}function d(t){return t=JSON.stringify(t),t=t.replace(/[\u000A\u000D\u2028\u2029]/g,function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}),"single"===this.format.quotes&&(t=t.slice(1,-1),t=t.replace(/\\"/g,'"'),t=t.replace(/'/g,"\\'"),t="'"+t+"'"),t}var m=t(278)["default"];n.__esModule=!0,n.Identifier=r,n.RestElement=i,n.ObjectExpression=s,n.ObjectMethod=a,n.ObjectProperty=o,n.ArrayExpression=u,n.RegExpLiteral=l,n.BooleanLiteral=p,n.NullLiteral=c,n.NumericLiteral=f,n.StringLiteral=h,n._stringLiteral=d;var y=t(539),g=m(y);n.SpreadElement=i,n.SpreadProperty=i,n.RestProperty=i,n.ObjectPattern=s,n.ArrayPattern=u},{278:278,539:539}],178:[function(t,e,n){"use strict";var r=t(275)["default"],i=t(273)["default"],s=t(277)["default"],a=t(278)["default"];n.__esModule=!0;var o=t(186),u=s(o),l=t(185),p=s(l),c=t(184),f=s(c),h=t(182),d=s(h),m=t(265),y=a(m),g=t(183),v=s(g),A=function(t){function e(n,r,s){i(this,e),r=r||{};var a=n.comments||[],o=n.tokens||[],u=e.normalizeOptions(s,r,o),l=new d["default"];t.call(this,l,u),this.comments=a,this.position=l,this.tokens=o,this.format=u,this.opts=r,this.ast=n,this.whitespace=new p["default"](o),this.map=new f["default"](l,r,s)}return r(e,t),e.normalizeOptions=function(t,n,r){var i=" ";if(t){var s=u["default"](t).indent;s&&" "!==s&&(i=s)}var a={auxiliaryCommentBefore:n.auxiliaryCommentBefore,auxiliaryCommentAfter:n.auxiliaryCommentAfter,shouldPrintComment:n.shouldPrintComment,retainLines:n.retainLines,comments:null==n.comments||n.comments,compact:n.compact,concise:n.concise,quotes:e.findCommonStringDelimiter(t,r),indent:{adjustMultilineComment:!0,style:i,base:0}};return"auto"===a.compact&&(a.compact=t.length>1e5,a.compact&&console.error("[BABEL] "+y.get("codeGeneratorDeopt",n.filename,"100KB"))),a.compact&&(a.indent.adjustMultilineComment=!1),a},e.findCommonStringDelimiter=function(t,e){for(var n={single:0,"double":0},r=0,i=0;i<e.length;i++){var s=e[i];if("string"===s.type.label){var a=t.slice(s.start,s.end);if("'"===a[0]?n.single++:n["double"]++,r++,r>=3)break}}return n.single>n["double"]?"single":"double"},e.prototype.generate=function(){return this.print(this.ast),this.printAuxAfterComment(),{map:this.map.get(),code:this.get()}},e}(v["default"]);n.CodeGenerator=A,n["default"]=function(t,e,n){var r=new A(t,e,n);return r.generate()}},{182:182,183:183,184:184,185:185,186:186,265:265,273:273,275:275,277:277,278:278}],179:[function(t,e,n){"use strict";function r(t,e,n){if(t){for(var r=void 0,i=s(t),a=0;a<i.length;a++){var o=i[a];if(g.is(o,e)){var u=t[o];if(r=u(e,n),null!=r)break}}return r}}var i=t(273)["default"],s=t(271)["default"],a=t(277)["default"],o=t(278)["default"];n.__esModule=!0;var u=t(181),l=a(u),p=t(180),c=o(p),f=t(191),h=a(f),d=t(194),m=a(d),y=t(539),g=o(y),v=function(){function t(e,n){i(this,t),this.parent=n,this.node=e}return t.isUserWhitespacable=function(t){return g.isUserWhitespacable(t)},t.needsWhitespace=function(e,n,i){if(!e)return 0;g.isExpressionStatement(e)&&(e=e.expression);var s=r(l["default"].nodes,e,n);if(!s){var a=r(l["default"].list,e,n);if(a)for(var o=0;o<a.length&&!(s=t.needsWhitespace(a[o],e,i));o++);}return s&&s[i]||0},t.needsWhitespaceBefore=function(e,n){return t.needsWhitespace(e,n,"before")},t.needsWhitespaceAfter=function(e,n){return t.needsWhitespace(e,n,"after")},t.needsParens=function(t,e){if(!e)return!1;if(g.isNewExpression(e)&&e.callee===t){if(g.isCallExpression(t))return!0;var n=m["default"](t,function(t){return g.isCallExpression(t)});if(n)return!0}return r(c,t,e)},t}();n["default"]=v,h["default"](v,function(t,e){v.prototype[e]=function(){var t=new Array(arguments.length+2);t[0]=this.node,t[1]=this.parent;for(var n=0;n<t.length;n++)t[n+2]=arguments[n];return v[e].apply(null,t)}}),e.exports=n["default"]},{180:180,181:181,191:191,194:194,271:271,273:273,277:277,278:278,539:539}],180:[function(t,e,n){"use strict";function r(t,e){return v.isArrayTypeAnnotation(e)}function i(t,e){return v.isMemberExpression(e)&&e.object===t?!0:!1}function s(t,e){return v.isExpressionStatement(e)?!0:v.isMemberExpression(e)&&e.object===t?!0:!1}function a(t,e){if((v.isCallExpression(e)||v.isNewExpression(e))&&e.callee===t)return!0;if(v.isUnaryLike(e))return!0;if(v.isMemberExpression(e)&&e.object===t)return!0;if(v.isBinary(e)){var n=e.operator,r=A[n],i=t.operator,s=A[i];if(r>s)return!0;if(r===s&&e.right===t&&!v.isLogicalExpression(e))return!0}return!1}function o(t,e){if("in"===t.operator){if(v.isVariableDeclarator(e))return!0;if(v.isFor(e))return!0}return!1}function u(t,e){return v.isForStatement(e)?!1:v.isExpressionStatement(e)&&e.expression===t?!1:v.isReturnStatement(e)?!1:!0}function l(t,e){return v.isBinary(e)||v.isUnaryLike(e)||v.isCallExpression(e)||v.isMemberExpression(e)||v.isNewExpression(e)||v.isConditionalExpression(e)||v.isYieldExpression(e)}function p(t,e){return v.isExpressionStatement(e)?!0:v.isExportDeclaration(e)?!0:!1}function c(t,e){return v.isMemberExpression(e,{object:t})?!0:v.isCallExpression(e,{callee:t})||v.isNewExpression(e,{callee:t})?!0:!1}function f(t,e){return v.isExpressionStatement(e)?!0:h(t,e)}function h(t,e){return v.isExportDeclaration(e)?!0:c(t,e)}function d(t,e){return v.isUnaryLike(e)?!0:v.isBinary(e)?!0:v.isConditionalExpression(e,{test:t})?!0:c(t,e)}function m(t){return v.isObjectPattern(t.left)?!0:d.apply(void 0,arguments)}var y=t(278)["default"];n.__esModule=!0,n.NullableTypeAnnotation=r,n.UpdateExpression=i,n.ObjectExpression=s,n.Binary=a,n.BinaryExpression=o,n.SequenceExpression=u,n.YieldExpression=l,n.ClassExpression=p,n.UnaryLike=c,n.FunctionExpression=f,n.ArrowFunctionExpression=h,n.ConditionalExpression=d,n.AssignmentExpression=m;var g=t(539),v=y(g),A={"||":0,"&&":1,"|":2,"^":3,"&":4,"==":5,"===":5,"!=":5,"!==":5,"<":6,">":6,"<=":6,">=":6,"in":6,"instanceof":6,">>":7,"<<":7,">>>":7,"+":8,"-":8,"*":9,"/":9,"%":9,"**":10};n.FunctionTypeAnnotation=r},{278:278,539:539}],181:[function(t,e,n){"use strict";function r(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return m.isMemberExpression(t)?(r(t.object,e),t.computed&&r(t.property,e)):m.isBinary(t)||m.isAssignmentExpression(t)?(r(t.left,e),r(t.right,e)):m.isCallExpression(t)?(e.hasCall=!0,r(t.callee,e)):m.isFunction(t)?e.hasFunction=!0:m.isIdentifier(t)&&(e.hasHelper=e.hasHelper||i(t.callee)),e}function i(t){return m.isMemberExpression(t)?i(t.object)||i(t.property):m.isIdentifier(t)?"require"===t.name||"_"===t.name[0]:m.isCallExpression(t)?i(t.callee):m.isBinary(t)||m.isAssignmentExpression(t)?m.isIdentifier(t.left)&&i(t.left)||i(t.right):!1}function s(t){return m.isLiteral(t)||m.isObjectExpression(t)||m.isArrayExpression(t)||m.isIdentifier(t)||m.isMemberExpression(t)}var a=t(277)["default"],o=t(278)["default"],u=t(236),l=a(u),p=t(191),c=a(p),f=t(193),h=a(f),d=t(539),m=o(d);n.nodes={AssignmentExpression:function(t){var e=r(t.right);return e.hasCall&&e.hasHelper||e.hasFunction?{before:e.hasFunction,after:!0}:void 0},SwitchCase:function(t,e){return{before:t.consequent.length||e.cases[0]===t}},LogicalExpression:function(t){return m.isFunction(t.left)||m.isFunction(t.right)?{after:!0}:void 0},Literal:function(t){return"use strict"===t.value?{after:!0}:void 0},CallExpression:function(t){return m.isFunction(t.callee)||i(t)?{before:!0,after:!0}:void 0},VariableDeclaration:function(t){for(var e=0;e<t.declarations.length;e++){var n=t.declarations[e],a=i(n.id)&&!s(n.init);if(!a){var o=r(n.init);a=i(n.init)&&o.hasCall||o.hasFunction}if(a)return{before:!0,after:!0}}},IfStatement:function(t){return m.isBlockStatement(t.consequent)?{before:!0,after:!0}:void 0}},n.nodes.ObjectProperty=n.nodes.ObjectMethod=n.nodes.SpreadProperty=function(t,e){return e.properties[0]===t?{before:!0}:void 0},n.list={VariableDeclaration:function(t){return h["default"](t.declarations,"init")},ArrayExpression:function(t){return t.elements},ObjectExpression:function(t){return t.properties}},c["default"]({Function:!0,Class:!0,Loop:!0,LabeledStatement:!0,SwitchStatement:!0,TryStatement:!0},function(t,e){l["default"](t)&&(t={after:t,before:t}),c["default"]([e].concat(m.FLIPPED_ALIAS_KEYS[e]||[]),function(e){n.nodes[e]=function(){return t}})})},{191:191,193:193,236:236,277:277,278:278,539:539}],182:[function(t,e,n){"use strict";var r=t(273)["default"];n.__esModule=!0;var i=function(){function t(){r(this,t),this.line=1,this.column=0}return t.prototype.push=function(t){for(var e=0;e<t.length;e++)"\n"===t[e]?(this.line++,this.column=0):this.column++},t.prototype.unshift=function(t){for(var e=0;e<t.length;e++)"\n"===t[e]?this.line--:this.column--},t}();n["default"]=i,e.exports=n["default"]},{273:273}],183:[function(t,e,n){"use strict";var r=t(275)["default"],i=t(273)["default"],s=t(266)["default"],a=t(269)["default"],o=t(277)["default"],u=t(278)["default"];n.__esModule=!0;var l=t(247),p=o(l),c=t(167),f=o(c),h=t(179),d=o(h),m=t(539),y=u(m),g=function(t){function e(){i(this,e);for(var n=arguments.length,r=Array(n),s=0;n>s;s++)r[s]=arguments[s];t.call.apply(t,[this].concat(r)),this.insideAux=!1,this.printAuxAfterOnNextUserNode=!1}return r(e,t),e.prototype.print=function(t,e){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];if(t){e&&e._compact&&(t._compact=!0);var r=this.insideAux;this.insideAux=!t.loc;var i=this.format.concise;t._compact&&(this.format.concise=!0);var s=this[t.type];if(!s)throw new ReferenceError("unknown node of type "+JSON.stringify(t.type)+" with constructor "+JSON.stringify(t&&t.constructor.name));t.loc&&this.printAuxAfterComment(),this.printAuxBeforeComment(r);var a=d["default"].needsParens(t,e);a&&this.push("("),this.printLeadingComments(t,e),this.catchUp(t),this._printNewline(!0,t,e,n),n.before&&n.before(),this.map.mark(t,"start"),this._print(t,e),this.printTrailingComments(t,e),a&&this.push(")"),this.map.mark(t,"end"),n.after&&n.after(),this.format.concise=i,this.insideAux=r,this._printNewline(!1,t,e,n)}},e.prototype.printAuxBeforeComment=function(t){var e=this.format.auxiliaryCommentBefore;!t&&this.insideAux&&(this.printAuxAfterOnNextUserNode=!0,e&&this.printComment({type:"CommentBlock",value:e}))},e.prototype.printAuxAfterComment=function(){if(this.printAuxAfterOnNextUserNode){this.printAuxAfterOnNextUserNode=!1;var t=this.format.auxiliaryCommentAfter;t&&this.printComment({type:"CommentBlock",value:t})}},e.prototype.getPossibleRaw=function(t){var e=t.extra;return e&&null!=e.raw&&null!=e.rawValue&&t.value===e.rawValue?e.raw:void 0},e.prototype._print=function(t,e){var n=this.getPossibleRaw(t);if(n)this.push(""),this._push(n);else{var r=this[t.type];r.call(this,t,e)}},e.prototype.printJoin=function(t,e){var n=this,r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];if(t&&t.length){var i=t.length,s=void 0,a=void 0;r.indent&&this.indent();var o={statement:r.statement,addNewlines:r.addNewlines,after:function(){r.iterator&&r.iterator(s,a),r.separator&&i-1>a&&n.push(r.separator)}};for(a=0;a<t.length;a++)s=t[a],this.print(s,e,o);r.indent&&this.dedent()}},e.prototype.printAndIndentOnComments=function(t,e){var n=!!t.leadingComments;n&&this.indent(),this.print(t,e),n&&this.dedent()},e.prototype.printBlock=function(t){var e=t.body;y.isEmptyStatement(e)?this.semicolon():(this.push(" "),this.print(e,t))},e.prototype.generateComment=function(t){var e=t.value;return e="CommentLine"===t.type?"//"+e:"/*"+e+"*/"},e.prototype.printTrailingComments=function(t,e){this.printComments(this.getComments("trailingComments",t,e))},e.prototype.printLeadingComments=function(t,e){this.printComments(this.getComments("leadingComments",t,e))},e.prototype.printInnerComments=function(t){var e=arguments.length<=1||void 0===arguments[1]?!0:arguments[1];t.innerComments&&(e&&this.indent(),this.printComments(t.innerComments),e&&this.dedent())},e.prototype.printSequence=function(t,e){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return n.statement=!0,this.printJoin(t,e,n)},e.prototype.printList=function(t,e){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return null==n.separator&&(n.separator=",",this.format.compact||(n.separator+=" ")),this.printJoin(t,e,n)},e.prototype._printNewline=function(t,e,n,r){if(r.statement||d["default"].isUserWhitespacable(e,n)){var i=0;if(null==e.start||e._ignoreUserWhitespace){t||i++,r.addNewlines&&(i+=r.addNewlines(t,e)||0);var s=d["default"].needsWhitespaceAfter;t&&(s=d["default"].needsWhitespaceBefore),s(e,n)&&i++,this.buf||(i=0)}else i=t?this.whitespace.getNewlinesBefore(e):this.whitespace.getNewlinesAfter(e);this.newline(i)}},e.prototype.getComments=function(t,e){return e&&e[t]||[]},e.prototype.shouldPrintComment=function(t){return this.format.shouldPrintComment?this.format.shouldPrintComment(t.value):t.value.indexOf("@license")>=0||t.value.indexOf("@preserve")>=0?!0:this.format.comments},e.prototype.printComment=function(t){if(this.shouldPrintComment(t)&&!t.ignore){if(t.ignore=!0,null!=t.start){if(this.printedCommentStarts[t.start])return;this.printedCommentStarts[t.start]=!0}this.catchUp(t),this.newline(this.whitespace.getNewlinesBefore(t));var e=this.position.column,n=this.generateComment(t);if(e&&!this.isLast(["\n"," ","[","{"])&&(this._push(" "),e++),"CommentBlock"===t.type&&this.format.indent.adjustMultilineComment){var r=t.loc&&t.loc.start.column;if(r){var i=new RegExp("\\n\\s{1,"+r+"}","g");n=n.replace(i,"\n")}var s=Math.max(this.indentSize(),e);n=n.replace(/\n/g,"\n"+p["default"](" ",s))}0===e&&(n=this.getIndent()+n),(this.format.compact||this.format.retainLines)&&"CommentLine"===t.type&&(n+="\n"),this._push(n),this.newline(this.whitespace.getNewlinesAfter(t))}},e.prototype.printComments=function(t){if(t&&t.length)for(var e=t,n=Array.isArray(e),r=0,e=n?e:s(e);;){var i;if(n){if(r>=e.length)break;i=e[r++]}else{if(r=e.next(),r.done)break;i=r.value}var a=i;this.printComment(a)}},e}(f["default"]);n["default"]=g;for(var v=[t(176),t(170),t(175),t(169),t(173),t(174),t(177),t(171),t(168),t(172)],A=0;A<v.length;A++){var E=v[A];a(g.prototype,E)}e.exports=n["default"]},{167:167,168:168,169:169,170:170,171:171,172:172,173:173,174:174,175:175,176:176,177:177,179:179,247:247,266:266,269:269,273:273,275:275,277:277,278:278,539:539}],184:[function(t,e,n){"use strict";var r=t(273)["default"],i=t(277)["default"],s=t(278)["default"];n.__esModule=!0;var a=t(250),o=i(a),u=t(539),l=s(u),p=function(){function t(e,n,i){r(this,t),this.position=e,this.opts=n,n.sourceMaps?(this.map=new o["default"].SourceMapGenerator({file:n.sourceMapTarget,sourceRoot:n.sourceRoot}),this.map.setSourceContent(n.sourceFileName,i)):this.map=null}return t.prototype.get=function(){var t=this.map;return t?t.toJSON():t},t.prototype.mark=function(t,e){var n=t.loc;if(n){var r=this.map;if(r&&!l.isProgram(t)&&!l.isFile(t)){var i=this.position,s={line:i.line,column:i.column},a=n[e];r.addMapping({source:this.opts.sourceFileName,generated:s,original:a})}}},t}();n["default"]=p,e.exports=n["default"]},{250:250,273:273,277:277,278:278,539:539}],185:[function(t,e,n){"use strict";function r(t,e,n){return t+=e,t>=n&&(t-=n),t}var i=t(273)["default"];n.__esModule=!0;var s=function(){function t(e){i(this,t),this.tokens=e,this.used={},this._lastFoundIndex=0}return t.prototype.getNewlinesBefore=function(t){for(var e=void 0,n=void 0,i=this.tokens,s=0;s<i.length;s++){var a=r(s,this._lastFoundIndex,this.tokens.length),o=i[a];if(t.start===o.start){e=i[a-1],n=o,this._lastFoundIndex=a;break}}return this.getNewlinesBetween(e,n)},t.prototype.getNewlinesAfter=function(t){for(var e=void 0,n=void 0,i=this.tokens,s=0;s<i.length;s++){var a=r(s,this._lastFoundIndex,this.tokens.length),o=i[a];if(t.end===o.end){e=o,n=i[a+1],","===n.type.label&&(n=i[a+2]),this._lastFoundIndex=a;break}}if(n&&"eof"===n.type.label)return 1;var u=this.getNewlinesBetween(e,n);return"CommentLine"!==t.type||u?u:1},t.prototype.getNewlinesBetween=function(t,e){if(!e||!e.loc)return 0;for(var n=t?t.loc.end.line:1,r=e.loc.start.line,i=0,s=n;r>s;s++)"undefined"==typeof this.used[s]&&(this.used[s]=!0,i++);return i},t}();n["default"]=s,e.exports=n["default"]},{273:273}],186:[function(t,e,n){"use strict";function r(t){var e=0,n=0,r=0;for(var i in t){var s=t[i],a=s[0],o=s[1];(a>n||a===n&&o>r)&&(n=a,r=o,e=+i)}return e}var i=t(247),s=/^(?:( )+|\t+)/;e.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");var e,n,a=0,o=0,u=0,l={};t.split(/\n/g).forEach(function(t){if(t){var r,i=t.match(s);i?(r=i[0].length,i[1]?o++:a++):r=0;var p=r-u;u=r,p?(n=p>0,e=l[n?p:-p],e?e[0]++:e=l[p]=[1,0]):e&&(e[1]+=+n)}});var p,c,f=r(l);return f?o>=a?(p="space",c=i(" ",f)):(p="tab",c=i(" ",f)):(p=null,c=""),{amount:f,type:p,indent:c}}},{247:247}],187:[function(t,e,n){var r=t(188);e.exports=Number.isInteger||function(t){return"number"==typeof t&&r(t)&&Math.floor(t)===t}},{188:188}],188:[function(t,e,n){arguments[4][29][0].apply(n,arguments)},{189:189,29:29}],189:[function(t,e,n){arguments[4][30][0].apply(n,arguments)},{30:30}],190:[function(t,e,n){arguments[4][56][0].apply(n,arguments)},{56:56}],191:[function(t,e,n){arguments[4][58][0].apply(n,arguments)},{192:192,58:58}],192:[function(t,e,n){arguments[4][59][0].apply(n,arguments)},{195:195,199:199,217:217,59:59}],193:[function(t,e,n){function r(t,e,n){var r=o(t)?i:a;return e=s(e,n,3),r(t,e)}var i=t(196),s=t(198),a=t(206),o=t(235);e.exports=r},{196:196,198:198,206:206,235:235}],194:[function(t,e,n){function r(t,e,n){var r=o(t)?i:a;return n&&u(t,e,n)&&(e=void 0),("function"!=typeof e||void 0!==n)&&(e=s(e,n,3)),r(t,e)}var i=t(197),s=t(198),a=t(212),o=t(235),u=t(226);e.exports=r},{197:197,198:198,212:212,226:226,235:235}],195:[function(t,e,n){arguments[4][64][0].apply(n,arguments)},{64:64}],196:[function(t,e,n){function r(t,e){for(var n=-1,r=t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}e.exports=r},{}],197:[function(t,e,n){arguments[4][65][0].apply(n,arguments)},{65:65}],198:[function(t,e,n){arguments[4][69][0].apply(n,arguments)},{207:207,208:208,214:214,245:245,246:246,69:69}],199:[function(t,e,n){arguments[4][73][0].apply(n,arguments)},{201:201,215:215,73:73}],200:[function(t,e,n){arguments[4][74][0].apply(n,arguments)},{216:216,74:74}],201:[function(t,e,n){arguments[4][76][0].apply(n,arguments)},{200:200,242:242,76:76}],202:[function(t,e,n){arguments[4][77][0].apply(n,arguments)},{232:232,77:77}],203:[function(t,e,n){arguments[4][79][0].apply(n,arguments)},{204:204,229:229,240:240,79:79}],204:[function(t,e,n){arguments[4][80][0].apply(n,arguments)},{218:218,219:219,220:220,235:235,241:241,80:80}],205:[function(t,e,n){arguments[4][81][0].apply(n,arguments)},{203:203,232:232,81:81}],206:[function(t,e,n){arguments[4][82][0].apply(n,arguments)},{199:199,224:224,82:82}],207:[function(t,e,n){arguments[4][83][0].apply(n,arguments)},{205:205,222:222,232:232,83:83}],208:[function(t,e,n){arguments[4][84][0].apply(n,arguments)},{190:190,202:202,203:203,211:211,227:227,230:230,232:232,233:233,235:235,84:84}],209:[function(t,e,n){arguments[4][87][0].apply(n,arguments)},{87:87}],210:[function(t,e,n){arguments[4][88][0].apply(n,arguments)},{202:202,233:233,88:88}],211:[function(t,e,n){arguments[4][89][0].apply(n,arguments)},{89:89}],212:[function(t,e,n){function r(t,e){var n;return i(t,function(t,r,i){return n=e(t,r,i),!n}),!!n}var i=t(199);e.exports=r},{199:199}],213:[function(t,e,n){arguments[4][91][0].apply(n,arguments)},{91:91}],214:[function(t,e,n){arguments[4][93][0].apply(n,arguments)},{245:245,93:93}],215:[function(t,e,n){arguments[4][97][0].apply(n,arguments)},{221:221,228:228,232:232,97:97}],216:[function(t,e,n){arguments[4][98][0].apply(n,arguments)},{232:232,98:98}],217:[function(t,e,n){arguments[4][100][0].apply(n,arguments)},{100:100,214:214,235:235}],218:[function(t,e,n){arguments[4][101][0].apply(n,arguments)},{101:101,197:197}],219:[function(t,e,n){arguments[4][102][0].apply(n,arguments)},{102:102}],220:[function(t,e,n){arguments[4][103][0].apply(n,arguments)},{103:103,242:242}],221:[function(t,e,n){arguments[4][105][0].apply(n,arguments)},{105:105,209:209}],222:[function(t,e,n){arguments[4][106][0].apply(n,arguments)},{106:106,230:230,244:244}],223:[function(t,e,n){arguments[4][107][0].apply(n,arguments)},{107:107,238:238}],224:[function(t,e,n){arguments[4][112][0].apply(n,arguments)},{112:112,221:221,228:228}],225:[function(t,e,n){arguments[4][113][0].apply(n,arguments)},{113:113}],226:[function(t,e,n){arguments[4][114][0].apply(n,arguments)},{114:114,224:224,225:225,240:240}],227:[function(t,e,n){arguments[4][115][0].apply(n,arguments)},{115:115,232:232,235:235}],228:[function(t,e,n){arguments[4][116][0].apply(n,arguments)},{116:116}],229:[function(t,e,n){arguments[4][117][0].apply(n,arguments)},{117:117}],230:[function(t,e,n){arguments[4][118][0].apply(n,arguments)},{118:118,240:240}],231:[function(t,e,n){arguments[4][119][0].apply(n,arguments)},{119:119,225:225,228:228,234:234,235:235,243:243}],232:[function(t,e,n){arguments[4][120][0].apply(n,arguments)},{120:120,240:240}],233:[function(t,e,n){arguments[4][121][0].apply(n,arguments)},{121:121,213:213,235:235}],234:[function(t,e,n){arguments[4][124][0].apply(n,arguments)},{124:124,224:224,229:229}],235:[function(t,e,n){arguments[4][125][0].apply(n,arguments)},{125:125,223:223,228:228,229:229}],236:[function(t,e,n){arguments[4][126][0].apply(n,arguments)},{126:126,229:229}],237:[function(t,e,n){arguments[4][127][0].apply(n,arguments)},{127:127,240:240}],238:[function(t,e,n){arguments[4][128][0].apply(n,arguments)},{128:128,229:229,237:237}],239:[function(t,e,n){function r(t){return"number"==typeof t||i(t)&&o.call(t)==s}var i=t(229),s="[object Number]",a=Object.prototype,o=a.toString;e.exports=r},{229:229}],240:[function(t,e,n){arguments[4][129][0].apply(n,arguments)},{129:129}],241:[function(t,e,n){arguments[4][133][0].apply(n,arguments)},{133:133,228:228,229:229}],242:[function(t,e,n){arguments[4][137][0].apply(n,arguments)},{137:137,223:223,224:224,231:231,240:240}],243:[function(t,e,n){arguments[4][138][0].apply(n,arguments)},{138:138,225:225,228:228,234:234,235:235,240:240}],244:[function(t,e,n){arguments[4][140][0].apply(n,arguments)},{140:140,232:232,242:242}],245:[function(t,e,n){arguments[4][144][0].apply(n,arguments)},{144:144}],246:[function(t,e,n){arguments[4][145][0].apply(n,arguments)},{145:145,209:209,210:210,227:227}],247:[function(t,e,n){arguments[4][28][0].apply(n,arguments)},{248:248,28:28}],248:[function(t,e,n){arguments[4][29][0].apply(n,arguments)},{249:249,29:29}],249:[function(t,e,n){arguments[4][30][0].apply(n,arguments)},{30:30}],250:[function(t,e,n){arguments[4][154][0].apply(n,arguments)},{154:154,257:257,258:258,259:259}],251:[function(t,e,n){arguments[4][155][0].apply(n,arguments)},{155:155,260:260,261:261}],252:[function(t,e,n){arguments[4][156][0].apply(n,arguments)},{156:156,253:253,261:261}],253:[function(t,e,n){arguments[4][157][0].apply(n,arguments)},{157:157,261:261}],254:[function(t,e,n){arguments[4][158][0].apply(n,arguments)},{158:158,261:261}],255:[function(t,e,n){arguments[4][159][0].apply(n,arguments)},{159:159,260:260,261:261}],256:[function(t,e,n){arguments[4][160][0].apply(n,arguments)},{160:160,261:261}],257:[function(t,e,n){arguments[4][161][0].apply(n,arguments)},{161:161,251:251,252:252,254:254,256:256,260:260,261:261}],258:[function(t,e,n){arguments[4][162][0].apply(n,arguments)},{162:162,251:251,252:252,255:255,260:260,261:261}],259:[function(t,e,n){arguments[4][163][0].apply(n,arguments)},{163:163,258:258,260:260,261:261}],260:[function(t,e,n){arguments[4][164][0].apply(n,arguments)},{164:164,261:261}],261:[function(t,e,n){(function(n,r){"use strict";function i(e,i){function s(t){var e,n;for(e=0;t[e];e+=1)if(n=t[e],"."===n)t.splice(e,1),e-=1;else if(".."===n){if(1===e&&(".."===t[2]||".."===t[0]))break;e>0&&(t.splice(e-1,2),e-=2)}}function a(t,e){var n;return t&&"."===t.charAt(0)&&e&&(n=e.split("/"),n=n.slice(0,n.length-1),n=n.concat(t.split("/")),s(n),t=n.join("/")),t}function o(t){return function(e){return a(e,t)}}function u(t){function e(e){d[t]=e}return e.fromText=function(t,e){throw new Error("amdefine does not implement load.fromText")},e}function l(t,n,s){var a,o,u,l;if(t)o=d[t]={},u={id:t,uri:r,exports:o},a=c(i,o,u,t);else{if(m)throw new Error("amdefine with no module ID cannot be called more than once per file.");m=!0,o=e.exports,u=e,a=c(i,o,u,e.id)}n&&(n=n.map(function(t){return a(t)})),l="function"==typeof s?s.apply(u.exports,n):s,void 0!==l&&(u.exports=l,t&&(d[t]=u.exports))}function p(t,e,n){Array.isArray(t)?(n=e,e=t,t=void 0):"string"!=typeof t&&(n=t,t=e=void 0),e&&!Array.isArray(e)&&(n=e,e=void 0),e||(e=["require","exports","module"]),t?h[t]=[t,e,n]:l(t,e,n)}var c,f,h={},d={},m=!1,y=t(7);return c=function(t,e,r,i){function s(s,a){return"string"==typeof s?f(t,e,r,s,i):(s=s.map(function(n){return f(t,e,r,n,i)}),void(a&&n.nextTick(function(){a.apply(null,s)})))}return s.toUrl=function(t){return 0===t.indexOf(".")?a(t,y.dirname(r.filename)):t},s},i=i||function(){return e.require.apply(e,arguments)},f=function(t,e,n,r,i){var s,p,m=r.indexOf("!"),y=r;if(-1===m){if(r=a(r,i),"require"===r)return c(t,e,n,i);if("exports"===r)return e;if("module"===r)return n;if(d.hasOwnProperty(r))return d[r];if(h[r])return l.apply(null,h[r]),d[r];if(t)return t(y);throw new Error("No module with ID: "+r)}return s=r.substring(0,m),r=r.substring(m+1,r.length),p=f(t,e,n,s,i),r=p.normalize?p.normalize(r,o(i)):a(r,i),d[r]?d[r]:(p.load(r,c(t,e,n,i),u(r),{}),d[r])},p.require=function(t){return d[t]?d[t]:h[t]?(l.apply(null,h[t]),d[t]):void 0},p.amd={},p}e.exports=i}).call(this,t(8),"/../babel-generator/node_modules/source-map/node_modules/amdefine/amdefine.js")},{7:7,8:8}],262:[function(t,e,n){"use strict";e.exports=function(t){for(var e=t.length;/[\s\uFEFF\u00A0]/.test(t[e-1]);)e--;return t.slice(0,e)}},{}],263:[function(t,e,n){"use strict";var r=t(277)["default"];n.__esModule=!0;var i=t(362),s=r(i),a=s["default"]('\n (function (obj) {\n return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;\n });\n');n._typeof=a;var o=s["default"]('\n (typeof Symbol === "function" && Symbol.for && Symbol.for("react.element")) || 0xeac7;\n');n.typeofReactElement=o;var u=s["default"]('\n (function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n\n return new Promise(function (resolve, reject) {\n var callNext = step.bind(null, "next");\n var callThrow = step.bind(null, "throw");\n\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(callNext, callThrow);\n }\n }\n\n callNext();\n });\n };\n })\n');n.asyncToGenerator=u;var l=s["default"]('\n (function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError("Cannot call a class as a function");\n }\n });\n');n.classCallCheck=l;var p=s["default"]('\n (function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i ++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ("value" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n })()\n');n.createClass=p;var c=s["default"]('\n (function (defaultProps, props) {\n if (defaultProps) {\n for (var propName in defaultProps) {\n if (typeof props[propName] === "undefined") {\n props[propName] = defaultProps[propName];\n }\n }\n }\n return props;\n })\n');n.defaultProps=c;var f=s["default"]("\n (function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n return obj;\n })\n");n.defaults=f;var h=s["default"]("\n (function (obj, key, value) {\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n });\n");n.defineProperty=h;var d=s["default"]("\n Object.assign || (function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n })\n");n._extends=d;var m=s["default"]('\n (function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if ("value" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n });\n');n.get=m;var y=s["default"]('\n (function (subClass, superClass) {\n if (typeof superClass !== "function" && superClass !== null) {\n throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n })\n');n.inherits=y;var g=s["default"]('\n (function (left, right) {\n if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n });\n');
n._instanceof=g;var v=s["default"]("\n (function (obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n })\n");n.interopRequireDefault=v;var A=s["default"]("\n (function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n newObj.default = obj;\n return newObj;\n }\n })\n");n.interopRequireWildcard=A;var E=s["default"]('\n (function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError("Cannot instantiate an arrow function");\n }\n });\n');n.newArrowCheck=E;var b=s["default"]('\n (function (obj) {\n if (obj == null) throw new TypeError("Cannot destructure undefined");\n });\n');n.objectDestructuringEmpty=b;var x=s["default"]("\n (function (obj, keys) {\n var target = {};\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n return target;\n })\n");n.objectWithoutProperties=x;var D=s["default"]('\n (function (self, call) {\n if (!self) {\n throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n }\n return call && (typeof call === "object" || typeof call === "function") ? call : self;\n });\n');n.possibleConstructorReturn=D;var C=s["default"]('\n typeof global === "undefined" ? self : global\n');n.selfGlobal=C;var F=s["default"]('\n (function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if ("value" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n });\n');n.set=F;var S=s["default"]('\n (function () {\n // Broken out into a separate function to avoid deoptimizations due to the try/catch for the\n // array iterator case.\n function sliceIterator(arr, i) {\n // this is an expanded form of `for...of` that properly supports abrupt completions of\n // iterators etc. variable names have been minimised to reduce the size of this massive\n // helper. sometimes spec compliancy is annoying :(\n //\n // _n = _iteratorNormalCompletion\n // _d = _didIteratorError\n // _e = _iteratorError\n // _i = _iterator\n // _s = _step\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i["return"]) _i["return"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n };\n })();\n');n.slicedToArray=S;var w=s["default"]('\n (function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n if (i && _arr.length === i) break;\n }\n return _arr;\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n });\n');n.slicedToArrayLoose=w;var B=s["default"]("\n (function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: { value: Object.freeze(raw) }\n }));\n });\n");n.taggedTemplateLiteral=B;var T=s["default"]("\n (function (strings, raw) {\n strings.raw = raw;\n return strings;\n });\n");n.taggedTemplateLiteralLoose=T;var _=s["default"]('\n (function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + " is not defined - temporal dead zone");\n } else {\n return val;\n }\n })\n');n.temporalRef=_;var k=s["default"]("\n ({})\n");n.temporalUndefined=k;var P=s["default"]("\n (function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n });\n");n.toArray=P;var N=s["default"]("\n (function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n return arr2;\n } else {\n return Array.from(arr);\n }\n });\n");n.toConsumableArray=N},{277:277,362:362}],264:[function(t,e,n){"use strict";function r(t){var e=o[t]||o["_"+t];if(!e)throw ReferenceError;return e().expression}var i=t(271)["default"],s=t(278)["default"];n.__esModule=!0,n.get=r;var a=t(263),o=s(a),u=i(o).filter(function(t){return"__esModule"!==t});n.list=u,n["default"]=r},{263:263,271:271,278:278}],265:[function(t,e,n){"use strict";function r(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;e>r;r++)n[r-1]=arguments[r];var s=u[t];if(!s)throw new ReferenceError("Unknown message "+JSON.stringify(t));return n=i(n),s.replace(/\$(\d+)/g,function(t,e){return n[--e]})}function i(t){return t.map(function(t){if(null!=t&&t.inspect)return t.inspect();try{return JSON.stringify(t)||t+""}catch(e){return o.inspect(t)}})}var s=t(278)["default"];n.__esModule=!0,n.get=r,n.parseArgs=i;var a=t(11),o=s(a),u={tailCallReassignmentDeopt:"Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",scopeDuplicateDeclaration:"Duplicate declaration $1",settersNoRest:"Setters aren't allowed to have a rest",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",missingTemplatesDirectory:"no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",unsupportedOutputType:"Unsupported output type $1",illegalMethodName:"Illegal method name $1",lostTrackNodePath:"We lost track of this node's position, likely because the AST was directly manipulated",modulesIllegalExportName:"Illegal export $1",modulesDuplicateDeclarations:"Duplicate module declarations with the same source but in different scopes",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableType:"Referencing a type alias outside of a type annotation",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",traverseNeedsParent:"You must pass a scope and parentPath unless traversing a Program/File got a $1 node",traverseVerifyRootFunction:"You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?",traverseVerifyVisitorProperty:"You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",traverseVerifyNodeType:"You gave us a visitor for the node type $1 but it's not a valid type",pluginNotObject:"Plugin $2 specified in $1 was expected to return an object when invoked but returned $3",pluginNotFunction:"Plugin $2 specified in $1 was expected to return a function but returned $3",pluginUnknown:"Unknown plugin $1 specified in $2 at $3",pluginInvalidProperty:"Plugin $2 specified in $1 provided an invalid property of $3"};n.MESSAGES=u},{11:11,278:278}],266:[function(t,e,n){e.exports={"default":t(287),__esModule:!0}},{287:287}],267:[function(t,e,n){e.exports={"default":t(288),__esModule:!0}},{288:288}],268:[function(t,e,n){e.exports={"default":t(289),__esModule:!0}},{289:289}],269:[function(t,e,n){e.exports={"default":t(290),__esModule:!0}},{290:290}],270:[function(t,e,n){e.exports={"default":t(291),__esModule:!0}},{291:291}],271:[function(t,e,n){e.exports={"default":t(295),__esModule:!0}},{295:295}],272:[function(t,e,n){e.exports={"default":t(297),__esModule:!0}},{297:297}],273:[function(t,e,n){"use strict";n["default"]=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},n.__esModule=!0},{}],274:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var i=t(281),s=r(i),a=t(282),o=r(a),u=t(283),l=r(u);n["default"]=function(t,e){for(var n=(0,l["default"])(e),r=0;r<n.length;r++){var i=n[r],a=(0,o["default"])(e,i);a&&a.configurable&&void 0===t[i]&&(0,s["default"])(t,i,a)}return t},n.__esModule=!0},{281:281,282:282,283:283}],275:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var i=t(284),s=r(i),a=t(280),o=r(a),u=t(286),l=r(u);n["default"]=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":(0,l["default"])(e)));t.prototype=(0,o["default"])(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(s["default"]?(0,s["default"])(t,e):t.__proto__=e)},n.__esModule=!0},{280:280,284:284,286:286}],276:[function(t,e,n){"use strict";n["default"]=function(t,e){var n=e({},t);return delete n["default"],n},n.__esModule=!0},{}],277:[function(t,e,n){"use strict";n["default"]=function(t){return t&&t.__esModule?t:{"default":t}},n.__esModule=!0},{}],278:[function(t,e,n){"use strict";n["default"]=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e},n.__esModule=!0},{}],279:[function(t,e,n){"use strict";n["default"]=function(t){return t&&t.__esModule?t["default"]:t},n.__esModule=!0},{}],280:[function(t,e,n){arguments[4][270][0].apply(n,arguments)},{270:270,291:291}],281:[function(t,e,n){e.exports={"default":t(292),__esModule:!0}},{292:292}],282:[function(t,e,n){e.exports={"default":t(293),__esModule:!0}},{293:293}],283:[function(t,e,n){e.exports={"default":t(294),__esModule:!0}},{294:294}],284:[function(t,e,n){e.exports={"default":t(296),__esModule:!0}},{296:296}],285:[function(t,e,n){arguments[4][272][0].apply(n,arguments)},{272:272,297:297}],286:[function(t,e,n){"use strict";var r=t(285)["default"];n["default"]=function(t){return t&&t.constructor===r?"symbol":typeof t},n.__esModule=!0},{285:285}],287:[function(t,e,n){t(361),t(358),e.exports=t(348)},{348:348,358:358,361:361}],288:[function(t,e,n){t(357),t(358),t(361),t(350),t(360),e.exports=t(306).Map},{306:306,350:350,357:357,358:358,360:360,361:361}],289:[function(t,e,n){t(351),e.exports=9007199254740991},{351:351}],290:[function(t,e,n){t(352),e.exports=t(306).Object.assign},{306:306,352:352}],291:[function(t,e,n){var r=t(326);e.exports=function(t,e){return r.create(t,e)}},{326:326}],292:[function(t,e,n){var r=t(326);e.exports=function(t,e,n){return r.setDesc(t,e,n)}},{326:326}],293:[function(t,e,n){var r=t(326);t(353),e.exports=function(t,e){return r.getDesc(t,e)}},{326:326,353:353}],294:[function(t,e,n){var r=t(326);t(354),e.exports=function(t){return r.getNames(t)}},{326:326,354:354}],295:[function(t,e,n){t(355),e.exports=t(306).Object.keys},{306:306,355:355}],296:[function(t,e,n){t(356),e.exports=t(306).Object.setPrototypeOf},{306:306,356:356}],297:[function(t,e,n){t(359),e.exports=t(306).Symbol},{306:306,359:359}],298:[function(t,e,n){e.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},{}],299:[function(t,e,n){var r=t(320);e.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},{320:320}],300:[function(t,e,n){var r=t(326),i=t(343),s=t(317);e.exports=t(311)(function(){var t=Object.assign,e={},n={},r=Symbol(),i="abcdefghijklmnopqrst";return e[r]=7,i.split("").forEach(function(t){n[t]=t}),7!=t({},e)[r]||Object.keys(t({},n)).join("")!=i})?function(t,e){for(var n=i(t),a=arguments,o=a.length,u=1,l=r.getKeys,p=r.getSymbols,c=r.isEnum;o>u;)for(var f,h=s(a[u++]),d=p?l(h).concat(p(h)):l(h),m=d.length,y=0;m>y;)c.call(h,f=d[y++])&&(n[f]=h[f]);return n}:Object.assign},{311:311,317:317,326:326,343:343}],301:[function(t,e,n){var r=t(302),i=t(346)("toStringTag"),s="Arguments"==r(function(){return arguments}());e.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=(e=Object(t))[i])?n:s?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},{302:302,346:346}],302:[function(t,e,n){var r={}.toString;e.exports=function(t){return r.call(t).slice(8,-1)}},{}],303:[function(t,e,n){"use strict";var r=t(326),i=t(316),s=t(307),a=t(335),o=t(336),u=t(309),l=t(312),p=t(324),c=t(344)("id"),f=t(315),h=t(320),d=Object.isExtensible||h,m=t(338),y=m?"_s":"size",g=0,v=function(t,e){if(!h(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!f(t,c)){if(!d(t))return"F";if(!e)return"E";i(t,c,++g)}return"O"+t[c]},A=function(t,e){var n,r=v(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};e.exports={getConstructor:function(e,n,i,a){var p=e(function(t,e){o(t,p,n),t._i=r.create(null),t._f=void 0,t._l=void 0,t[y]=0,void 0!=e&&l(e,i,t[a],t)});return t(329)(p.prototype,{clear:function(){for(var t=this,e=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete e[n.i];t._f=t._l=void 0,t[y]=0},"delete":function(t){var e=this,n=A(e,t);if(n){var r=n.n,i=n.p;delete e._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),e._f==n&&(e._f=r),e._l==n&&(e._l=i),e[y]--}return!!n},forEach:function(t){for(var e,n=s(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(n(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!A(this,t)}}),m&&r.setDesc(p.prototype,"size",{get:function(){return u(this[y])}}),p},def:function(t,e,n){var r,i,s=A(t,e);return s?s.v=n:(t._l=s={i:i=v(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=s),r&&(r.n=s),t[y]++,"F"!==i&&(t._i[i]=s)),t},getEntry:A,setStrong:function(e,n,r){t(323)(e,n,function(t,e){this._t=t,this._k=e,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?p(0,n.k):"values"==e?p(0,n.v):p(0,[n.k,n.v]):(t._t=void 0,p(1))},r?"entries":"values",!r,!0),a(e),a(t(306)[n])}}},{306:306,307:307,309:309,312:312,315:315,316:316,320:320,323:323,324:324,326:326,329:329,335:335,336:336,338:338,344:344}],304:[function(t,e,n){var r=t(312),i=t(301);e.exports=function(t){return function(){if(i(this)!=t)throw TypeError(t+"#toJSON isn't generic");var e=[];return r(this,!1,e.push,e),e}}},{301:301,312:312}],305:[function(t,e,n){"use strict";var r=t(326),i=t(308),s=t(316),a=t(312),o=t(336);e.exports=function(e,n,u,l,p,c){var f=t(314)[e],h=f,d=p?"set":"add",m=h&&h.prototype,y={};return t(338)&&"function"==typeof h&&(c||m.forEach&&!t(311)(function(){(new h).entries().next()}))?(h=n(function(t,n){o(t,h,e),t._c=new f,void 0!=n&&a(n,p,t[d],t)}),r.each.call("add,clear,delete,forEach,get,has,set,keys,values,entries".split(","),function(t){var e="add"==t||"set"==t;t in m&&(!c||"clear"!=t)&&s(h.prototype,t,function(n,r){var i=this._c[t](0===n?0:n,r);return e?this:i})}),"size"in m&&r.setDesc(h.prototype,"size",{get:function(){return this._c.size}})):(h=l.getConstructor(n,e,p,d),t(329)(h.prototype,u)),t(339)(h,e),y[e]=h,i(i.G+i.W+i.F,y),c||l.setStrong(h,e,p),h}},{308:308,311:311,312:312,314:314,316:316,326:326,329:329,336:336,338:338,339:339}],306:[function(t,e,n){var r=e.exports={version:"1.2.3"};"number"==typeof __e&&(__e=r)},{}],307:[function(t,e,n){var r=t(298);e.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},{298:298}],308:[function(t,e,n){var r=t(314),i=t(306),s="prototype",a=function(t,e){return function(){return t.apply(e,arguments)}},o=function(t,e,n){var u,l,p,c,f=t&o.G,h=t&o.P,d=f?r:t&o.S?r[e]:(r[e]||{})[s],m=f?i:i[e]||(i[e]={});f&&(n=e);for(u in n)l=!(t&o.F)&&d&&u in d,l&&u in m||(p=l?d[u]:n[u],f&&"function"!=typeof d[u]?c=n[u]:t&o.B&&l?c=a(p,r):t&o.W&&d[u]==p?!function(t){c=function(e){return this instanceof t?new t(e):t(e)},c[s]=t[s]}(p):c=h&&"function"==typeof p?a(Function.call,p):p,m[u]=c,h&&((m[s]||(m[s]={}))[u]=p))};o.F=1,o.G=2,o.S=4,o.P=8,o.B=16,o.W=32,e.exports=o},{306:306,314:314}],309:[function(t,e,n){e.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},{}],310:[function(t,e,n){var r=t(326);e.exports=function(t){var e=r.getKeys(t),n=r.getSymbols;if(n)for(var i,s=n(t),a=r.isEnum,o=0;s.length>o;)a.call(t,i=s[o++])&&e.push(i);return e}},{326:326}],311:[function(t,e,n){e.exports=function(t){try{return!!t()}catch(e){return!0}}},{}],312:[function(t,e,n){var r=t(307),i=t(321),s=t(318),a=t(299),o=t(342),u=t(347);e.exports=function(t,e,n,l){var p,c,f,h=u(t),d=r(n,l,e?2:1),m=0;if("function"!=typeof h)throw TypeError(t+" is not iterable!");if(s(h))for(p=o(t.length);p>m;m++)e?d(a(c=t[m])[0],c[1]):d(t[m]);else for(f=h.call(t);!(c=f.next()).done;)i(f,d,c.value,e)}},{299:299,307:307,318:318,321:321,342:342,347:347}],313:[function(t,e,n){var r={}.toString,i=t(341),s=t(326).getNames,a="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(t){try{return s(t)}catch(e){return a.slice()}};e.exports.get=function(t){return a&&"[object Window]"==r.call(t)?o(t):s(i(t))}},{326:326,341:341}],314:[function(t,e,n){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},{}],315:[function(t,e,n){var r={}.hasOwnProperty;e.exports=function(t,e){return r.call(t,e)}},{}],316:[function(t,e,n){var r=t(326),i=t(331);e.exports=t(338)?function(t,e,n){return r.setDesc(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},{326:326,331:331,338:338}],317:[function(t,e,n){var r=t(302);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},{302:302}],318:[function(t,e,n){var r=t(325),i=t(346)("iterator");e.exports=function(t){return(r.Array||Array.prototype[i])===t}},{325:325,346:346}],319:[function(t,e,n){var r=t(302);e.exports=Array.isArray||function(t){return"Array"==r(t)}},{302:302}],320:[function(t,e,n){e.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},{}],321:[function(t,e,n){var r=t(299);e.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(s){var a=t["return"];throw void 0!==a&&r(a.call(t)),s}}},{299:299}],322:[function(t,e,n){"use strict";var r=t(326),i={};t(316)(i,t(346)("iterator"),function(){return this}),e.exports=function(e,n,s){e.prototype=r.create(i,{next:t(331)(1,s)}),t(339)(e,n+" Iterator")}},{316:316,326:326,331:331,339:339,346:346}],323:[function(t,e,n){"use strict";var r=t(328),i=t(308),s=t(332),a=t(316),o=t(315),u=t(346)("iterator"),l=t(325),p=!([].keys&&"next"in[].keys()),c="@@iterator",f="keys",h="values",d=function(){return this};e.exports=function(e,n,m,y,g,v,A){t(322)(m,n,y);var E,b,x=function(t){switch(t){case f:return function(){return new m(this,t)};case h:return function(){return new m(this,t)}}return function(){return new m(this,t)}},D=n+" Iterator",C=e.prototype,F=C[u]||C[c]||g&&C[g],S=F||x(g);if(F){var w=t(326).getProto(S.call(new e));t(339)(w,D,!0),!r&&o(C,c)&&a(w,u,d)}if((!r||A)&&a(C,u,S),l[n]=S,l[D]=d,g)if(E={values:g==h?S:x(h),keys:v?S:x(f),entries:g!=h?S:x("entries")},A)for(b in E)b in C||s(C,b,E[b]);else i(i.P+i.F*p,n,E)}},{308:308,315:315,316:316,322:322,325:325,326:326,328:328,332:332,339:339,346:346}],324:[function(t,e,n){e.exports=function(t,e){return{value:e,done:!!t}}},{}],325:[function(t,e,n){e.exports={}},{}],326:[function(t,e,n){var r=Object;e.exports={create:r.create,getProto:r.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:r.getOwnPropertyDescriptor,setDesc:r.defineProperty,setDescs:r.defineProperties,getKeys:r.keys,getNames:r.getOwnPropertyNames,getSymbols:r.getOwnPropertySymbols,each:[].forEach}},{}],327:[function(t,e,n){var r=t(326),i=t(341);e.exports=function(t,e){for(var n,s=i(t),a=r.getKeys(s),o=a.length,u=0;o>u;)if(s[n=a[u++]]===e)return n}},{326:326,341:341}],328:[function(t,e,n){e.exports=!0},{}],329:[function(t,e,n){var r=t(332);e.exports=function(t,e){for(var n in e)r(t,n,e[n]);return t}},{332:332}],330:[function(t,e,n){e.exports=function(e,n){var r=t(308),i=(t(306).Object||{})[e]||Object[e],s={};s[e]=n(i),r(r.S+r.F*t(311)(function(){i(1)}),"Object",s)}},{306:306,308:308,311:311}],331:[function(t,e,n){e.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},{}],332:[function(t,e,n){e.exports=t(316)},{316:316}],333:[function(t,e,n){var r=t(326).getDesc,i=t(320),s=t(299),a=function(t,e){if(s(t),!i(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,n,i){try{i=t(307)(Function.call,r(Object.prototype,"__proto__").set,2),i(e,[]),n=!(e instanceof Array)}catch(s){n=!0}return function(t,e){return a(t,e),n?t.__proto__=e:i(t,e),t}}({},!1):void 0),check:a}},{299:299,307:307,320:320,326:326}],334:[function(t,e,n){var r=t(314),i="__core-js_shared__",s=r[i]||(r[i]={});e.exports=function(t){return s[t]||(s[t]={})}},{314:314}],335:[function(t,e,n){"use strict";var r=t(326),i=t(346)("species");e.exports=function(e){!t(338)||i in e||r.setDesc(e,i,{configurable:!0,get:function(){return this}})}},{326:326,338:338,346:346}],336:[function(t,e,n){e.exports=function(t,e,n){if(!(t instanceof e))throw TypeError(n+": use the 'new' operator!");return t}},{}],337:[function(t,e,n){var r=t(340),i=t(309);e.exports=function(t){return function(e,n){var s,a,o=String(i(e)),u=r(n),l=o.length;return 0>u||u>=l?t?"":void 0:(s=o.charCodeAt(u),55296>s||s>56319||u+1===l||(a=o.charCodeAt(u+1))<56320||a>57343?t?o.charAt(u):s:t?o.slice(u,u+2):(s-55296<<10)+(a-56320)+65536)}}},{309:309,340:340}],338:[function(t,e,n){e.exports=!t(311)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{311:311}],339:[function(t,e,n){var r=t(326).setDesc,i=t(315),s=t(346)("toStringTag");e.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,s)&&r(t,s,{configurable:!0,value:e})}},{315:315,326:326,346:346}],340:[function(t,e,n){var r=Math.ceil,i=Math.floor;e.exports=function(t){return isNaN(t=+t)?0:(t>0?i:r)(t)}},{}],341:[function(t,e,n){var r=t(317),i=t(309);e.exports=function(t){return r(i(t))}},{309:309,317:317}],342:[function(t,e,n){var r=t(340),i=Math.min;e.exports=function(t){return t>0?i(r(t),9007199254740991):0}},{340:340}],343:[function(t,e,n){var r=t(309);e.exports=function(t){return Object(r(t))}},{309:309}],344:[function(t,e,n){var r=0,i=Math.random();e.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+i).toString(36))}},{}],345:[function(t,e,n){e.exports=function(){}},{}],346:[function(t,e,n){var r=t(334)("wks"),i=t(314).Symbol;e.exports=function(e){return r[e]||(r[e]=i&&i[e]||(i||t(344))("Symbol."+e))}},{314:314,334:334,344:344}],347:[function(t,e,n){var r=t(301),i=t(346)("iterator"),s=t(325);e.exports=t(306).getIteratorMethod=function(t){return void 0!=t?t[i]||t["@@iterator"]||s[r(t)]:void 0}},{301:301,306:306,325:325,346:346}],348:[function(t,e,n){var r=t(299),i=t(347);e.exports=t(306).getIterator=function(t){var e=i(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return r(e.call(t))}},{299:299,306:306,347:347}],349:[function(t,e,n){"use strict";var r=t(345),i=t(324),s=t(325),a=t(341);t(323)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):"keys"==e?i(0,n):"values"==e?i(0,t[n]):i(0,[n,t[n]])},"values"),s.Arguments=s.Array,r("keys"),r("values"),r("entries")},{323:323,324:324,325:325,341:341,345:345}],350:[function(t,e,n){"use strict";var r=t(303);t(305)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(this,t);return e&&e.v},set:function(t,e){return r.def(this,0===t?0:t,e)}},r,!0)},{303:303,305:305}],351:[function(t,e,n){var r=t(308);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},{308:308}],352:[function(t,e,n){var r=t(308);r(r.S+r.F,"Object",{assign:t(300)})},{300:300,308:308}],353:[function(t,e,n){var r=t(341);t(330)("getOwnPropertyDescriptor",function(t){return function(e,n){return t(r(e),n)}})},{330:330,341:341}],354:[function(t,e,n){t(330)("getOwnPropertyNames",function(){return t(313).get})},{313:313,330:330}],355:[function(t,e,n){var r=t(343);t(330)("keys",function(t){return function(e){return t(r(e))}})},{330:330,343:343}],356:[function(t,e,n){var r=t(308);r(r.S,"Object",{setPrototypeOf:t(333).set})},{308:308,333:333}],357:[function(t,e,n){arguments[4][1][0].apply(n,arguments)},{1:1}],358:[function(t,e,n){"use strict";var r=t(337)(!0);t(323)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},{323:323,337:337}],359:[function(t,e,n){"use strict";var r=t(326),i=t(314),s=t(315),a=t(338),o=t(308),u=t(332),l=t(311),p=t(334),c=t(339),f=t(344),h=t(346),d=t(327),m=t(313),y=t(310),g=t(319),v=t(299),A=t(341),E=t(331),b=r.getDesc,x=r.setDesc,D=r.create,C=m.get,F=i.Symbol,S=i.JSON,w=S&&S.stringify,B=!1,T=h("_hidden"),_=r.isEnum,k=p("symbol-registry"),P=p("symbols"),N="function"==typeof F,I=Object.prototype,L=a&&l(function(){return 7!=D(x({},"a",{get:function(){return x(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=b(I,e);r&&delete I[e],x(t,e,n),r&&t!==I&&x(I,e,r)}:x,O=function(t){var e=P[t]=D(F.prototype);return e._k=t,a&&B&&L(I,t,{configurable:!0,set:function(e){s(this,T)&&s(this[T],t)&&(this[T][t]=!1),L(this,t,E(1,e))}}),e},M=function(t){return"symbol"==typeof t},R=function(t,e,n){return n&&s(P,e)?(n.enumerable?(s(t,T)&&t[T][e]&&(t[T][e]=!1),n=D(n,{enumerable:E(0,!1)})):(s(t,T)||x(t,T,E(1,{})),t[T][e]=!0),L(t,e,n)):x(t,e,n)},j=function(t,e){v(t);for(var n,r=y(e=A(e)),i=0,s=r.length;s>i;)R(t,n=r[i++],e[n]);return t},V=function(t,e){return void 0===e?D(t):j(D(t),e)},U=function(t){var e=_.call(this,t);return e||!s(this,t)||!s(P,t)||s(this,T)&&this[T][t]?e:!0},G=function(t,e){var n=b(t=A(t),e);return!n||!s(P,e)||s(t,T)&&t[T][e]||(n.enumerable=!0),n},W=function(t){for(var e,n=C(A(t)),r=[],i=0;n.length>i;)s(P,e=n[i++])||e==T||r.push(e);return r},q=function(t){for(var e,n=C(A(t)),r=[],i=0;n.length>i;)s(P,e=n[i++])&&r.push(P[e]);return r},H=function(t){for(var e,n,r=[t],i=1,s=arguments;s.length>i;)r.push(s[i++]);return e=r[1],"function"==typeof e&&(n=e),(n||!g(e))&&(e=function(t,e){return n&&(e=n.call(this,t,e)),M(e)?void 0:e}),r[1]=e,w.apply(S,r)},Y=l(function(){var t=F();return"[null]"!=w([t])||"{}"!=w({a:t})||"{}"!=w(Object(t))});N||(F=function(){if(M(this))throw TypeError("Symbol is not a constructor");return O(f(arguments.length>0?arguments[0]:void 0))},u(F.prototype,"toString",function(){return this._k}),M=function(t){return t instanceof F},r.create=V,r.isEnum=U,r.getDesc=G,r.setDesc=R,r.setDescs=j,r.getNames=m.get=W,r.getSymbols=q,a&&!t(328)&&u(I,"propertyIsEnumerable",U,!0));var J={"for":function(t){return s(k,t+="")?k[t]:k[t]=F(t)},keyFor:function(t){return d(k,t)},useSetter:function(){B=!0},useSimple:function(){B=!1}};r.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(t){var e=h(t);J[t]=N?e:O(e)}),B=!0,o(o.G+o.W,{Symbol:F}),o(o.S,"Symbol",J),o(o.S+o.F*!N,"Object",{create:V,defineProperty:R,defineProperties:j,getOwnPropertyDescriptor:G,getOwnPropertyNames:W,getOwnPropertySymbols:q}),S&&o(o.S+o.F*(!N||Y),"JSON",{stringify:H}),c(F,"Symbol"),c(Math,"Math",!0),c(i.JSON,"JSON",!0)},{299:299,308:308,310:310,311:311,313:313,314:314,315:315,319:319,326:326,327:327,328:328,331:331,332:332,334:334,338:338,339:339,341:341,344:344,346:346}],360:[function(t,e,n){var r=t(308);r(r.P,"Map",{toJSON:t(304)("Map")})},{304:304,308:308}],361:[function(t,e,n){t(349);var r=t(325);r.NodeList=r.HTMLCollection=r.Array},{325:325,349:349}],362:[function(t,e,n){"use strict";function r(t,e){t=u["default"](t);var n=t,r=n.program;return e.length&&f["default"](t,A,null,e),r.body.length>1?r.body:r.body[0]}var i=t(272)["default"],s=t(277)["default"],a=t(278)["default"];n.__esModule=!0;var o=t(391),u=s(o),l=t(397),p=s(l),c=t(403),f=s(c),h=t(622),d=a(h),m=t(539),y=a(m),g="_fromTemplate",v=i();n["default"]=function(t){var e=(new Error).stack.split("\n").slice(1).join("\n"),n=function(){var r=void 0;try{r=d.parse(t,{allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0}),r=f["default"].removeProperties(r),f["default"].cheap(r,function(t){t[g]=!0})}catch(i){throw i.stack=i.stack+"from\n"+e,i}return n=function(){return r},r};return function(){for(var t=arguments.length,e=Array(t),i=0;t>i;i++)e[i]=arguments[i];return r(n(),e)}};var A={noScope:!0,enter:function(t,e){var n=t.node;if(n[v])return t.skip();y.isExpressionStatement(n)&&(n=n.expression);var r=void 0;if(y.isIdentifier(n)&&n[g])if(p["default"](e[0],n.name))r=e[0][n.name];else if("$"===n.name[0]){var i=+n.name.slice(1);e[i]&&(r=e[i])}null===r&&t.remove(),r&&(r[v]=!0,t.replaceInline(r))},exit:function(t){var e=t.node;f["default"].clearNode(e)}};e.exports=n["default"]},{272:272,277:277,278:278,391:391,397:397,403:403,539:539,622:622}],363:[function(t,e,n){arguments[4][56][0].apply(n,arguments)},{56:56}],364:[function(t,e,n){arguments[4][63][0].apply(n,arguments)},{63:63}],365:[function(t,e,n){arguments[4][64][0].apply(n,arguments)},{64:64}],366:[function(t,e,n){arguments[4][68][0].apply(n,arguments)},{368:368,398:398,68:68}],367:[function(t,e,n){arguments[4][70][0].apply(n,arguments)},{364:364,365:365,366:366,370:370,380:380,381:381,382:382,393:393,396:396,70:70}],368:[function(t,e,n){arguments[4][72][0].apply(n,arguments)},{72:72}],369:[function(t,e,n){arguments[4][74][0].apply(n,arguments)},{377:377,74:74}],370:[function(t,e,n){arguments[4][76][0].apply(n,arguments)},{369:369,398:398,76:76}],371:[function(t,e,n){arguments[4][77][0].apply(n,arguments)},{389:389,77:77}],372:[function(t,e,n){arguments[4][87][0].apply(n,arguments)},{87:87}],373:[function(t,e,n){arguments[4][89][0].apply(n,arguments)},{89:89}],374:[function(t,e,n){arguments[4][91][0].apply(n,arguments)},{91:91}],375:[function(t,e,n){arguments[4][93][0].apply(n,arguments)},{400:400,93:93}],376:[function(t,e,n){arguments[4][94][0].apply(n,arguments)},{94:94}],377:[function(t,e,n){arguments[4][98][0].apply(n,arguments)},{389:389,98:98}],378:[function(t,e,n){arguments[4][105][0].apply(n,arguments)},{105:105,372:372}],379:[function(t,e,n){arguments[4][107][0].apply(n,arguments)},{107:107,395:395}],380:[function(t,e,n){arguments[4][109][0].apply(n,arguments)},{109:109}],381:[function(t,e,n){arguments[4][110][0].apply(n,arguments)},{110:110,376:376}],382:[function(t,e,n){arguments[4][111][0].apply(n,arguments)},{111:111}],383:[function(t,e,n){arguments[4][112][0].apply(n,arguments)},{112:112,378:378,386:386}],384:[function(t,e,n){arguments[4][113][0].apply(n,arguments);
},{113:113}],385:[function(t,e,n){arguments[4][115][0].apply(n,arguments)},{115:115,389:389,393:393}],386:[function(t,e,n){arguments[4][116][0].apply(n,arguments)},{116:116}],387:[function(t,e,n){arguments[4][117][0].apply(n,arguments)},{117:117}],388:[function(t,e,n){arguments[4][119][0].apply(n,arguments)},{119:119,384:384,386:386,392:392,393:393,399:399}],389:[function(t,e,n){arguments[4][120][0].apply(n,arguments)},{120:120,396:396}],390:[function(t,e,n){arguments[4][121][0].apply(n,arguments)},{121:121,374:374,393:393}],391:[function(t,e,n){arguments[4][123][0].apply(n,arguments)},{123:123,367:367,375:375}],392:[function(t,e,n){arguments[4][124][0].apply(n,arguments)},{124:124,383:383,387:387}],393:[function(t,e,n){arguments[4][125][0].apply(n,arguments)},{125:125,379:379,386:386,387:387}],394:[function(t,e,n){arguments[4][127][0].apply(n,arguments)},{127:127,396:396}],395:[function(t,e,n){arguments[4][128][0].apply(n,arguments)},{128:128,387:387,394:394}],396:[function(t,e,n){arguments[4][129][0].apply(n,arguments)},{129:129}],397:[function(t,e,n){function r(t,e){if(null==t)return!1;var n=d.call(t,e);if(!n&&!l(e)){if(e=f(e),t=1==e.length?t:i(t,s(e,0,-1)),null==t)return!1;e=c(e),n=d.call(t,e)}return n||p(t.length)&&u(e,t.length)&&(o(t)||a(t))}var i=t(371),s=t(373),a=t(392),o=t(393),u=t(384),l=t(385),p=t(386),c=t(363),f=t(390),h=Object.prototype,d=h.hasOwnProperty;e.exports=r},{363:363,371:371,373:373,384:384,385:385,386:386,390:390,392:392,393:393}],398:[function(t,e,n){arguments[4][137][0].apply(n,arguments)},{137:137,379:379,383:383,388:388,396:396}],399:[function(t,e,n){arguments[4][138][0].apply(n,arguments)},{138:138,384:384,386:386,392:392,393:393,396:396}],400:[function(t,e,n){arguments[4][144][0].apply(n,arguments)},{144:144}],401:[function(t,e,n){(function(r){"use strict";var i=t(430)["default"],s=t(426)["default"],a=t(431)["default"],o=t(432)["default"];n.__esModule=!0;var u=t(411),l=a(u),p=t(539),c=o(p),f="test"===r.env.NODE_ENV,h=function(){function t(e,n,r,s){i(this,t),this.parentPath=s,this.scope=e,this.state=r,this.opts=n}return t.prototype.shouldVisit=function(t){var e=this.opts;if(e.enter||e.exit)return!0;if(e[t.type])return!0;var n=c.VISITOR_KEYS[t.type];if(!n||!n.length)return!1;for(var r=n,i=Array.isArray(r),a=0,r=i?r:s(r);;){var o;if(i){if(a>=r.length)break;o=r[a++]}else{if(a=r.next(),a.done)break;o=a.value}var u=o;if(t[u])return!0}return!1},t.prototype.create=function(t,e,n,r){return l["default"].get({parentPath:this.parentPath,parent:t,container:e,key:n,listKey:r})},t.prototype.maybeQueue=function(t){if(this.trap)throw new Error("Infinite cycle detected");this.queue&&this.priorityQueue.push(t)},t.prototype.visitMultiple=function(t,e,n){if(0===t.length)return!1;for(var r=[],i=0;i<t.length;i++){var s=t[i];s&&this.shouldVisit(s)&&r.push(this.create(e,t,i,n))}return this.visitQueue(r)},t.prototype.visitSingle=function(t,e){return this.shouldVisit(t[e])?this.visitQueue([this.create(t,t,e)]):!1},t.prototype.visitQueue=function(t){this.queue=t,this.priorityQueue=[];for(var e=[],n=!1,r=t,i=Array.isArray(r),a=0,r=i?r:s(r);;){var o;if(i){if(a>=r.length)break;o=r[a++]}else{if(a=r.next(),a.done)break;o=a.value}var u=o;if(u.resync(),u.pushContext(this),f&&t.length>=1e3&&(this.trap=!0),!(e.indexOf(u.node)>=0)){if(e.push(u.node),u.visit()){n=!0;break}if(this.priorityQueue.length&&(n=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=t,n))break}}for(var l=t,p=Array.isArray(l),c=0,l=p?l:s(l);;){var h;if(p){if(c>=l.length)break;h=l[c++]}else{if(c=l.next(),c.done)break;h=c.value}var u=h;u.popContext()}return this.queue=null,n},t.prototype.visit=function(t,e){var n=t[e];return n?Array.isArray(n)?this.visitMultiple(n,t,e):this.visitSingle(t,e):!1},t}();n["default"]=h,e.exports=n["default"]}).call(this,t(8))},{411:411,426:426,430:430,431:431,432:432,539:539,8:8}],402:[function(t,e,n){"use strict";var r=t(430)["default"];n.__esModule=!0;var i=function s(t,e){r(this,s),this.file=t,this.options=e};n["default"]=i,e.exports=n["default"]},{430:430}],403:[function(t,e,n){"use strict";function r(t,e,n,i,s){if(t){if(e||(e={}),!e.noScope&&!n&&"Program"!==t.type&&"File"!==t.type)throw new Error(d.get("traverseNeedsParent",t.type));f.explode(e),r.node(t,e,n,i,s)}}function i(t,e){t.node.type===e.type&&(e.has=!0,t.skip())}var s=t(426)["default"],a=t(431)["default"],o=t(432)["default"],u=t(433)["default"];n.__esModule=!0,n["default"]=r;var l=t(401),p=a(l),c=t(425),f=o(c),h=t(265),d=o(h),m=t(480),y=a(m),g=t(539),v=o(g),A=t(411);n.NodePath=u(A);var E=t(423);n.Scope=u(E);var b=t(402);n.Hub=u(b),n.visitors=f,r.visitors=f,r.verify=f.verify,r.explode=f.explode,r.NodePath=t(411),r.Scope=t(423),r.Hub=t(402),r.cheap=function(t,e){if(t){var n=v.VISITOR_KEYS[t.type];if(n){e(t);for(var i=n,a=Array.isArray(i),o=0,i=a?i:s(i);;){var u;if(a){if(o>=i.length)break;u=i[o++]}else{if(o=i.next(),o.done)break;u=o.value}var l=u,p=t[l];if(Array.isArray(p))for(var c=p,f=Array.isArray(c),h=0,c=f?c:s(c);;){var d;if(f){if(h>=c.length)break;d=c[h++]}else{if(h=c.next(),h.done)break;d=h.value}var m=d;r.cheap(m,e)}else r.cheap(p,e)}}}},r.node=function(t,e,n,r,i,a){var o=v.VISITOR_KEYS[t.type];if(o)for(var u=new p["default"](n,e,r,i),l=o,c=Array.isArray(l),f=0,l=c?l:s(l);;){var h;if(c){if(f>=l.length)break;h=l[f++]}else{if(f=l.next(),f.done)break;h=f.value}var d=h;if((!a||!a[d])&&u.visit(t,d))return}};var x=v.COMMENT_KEYS.concat(["_scopeInfo","_paths","tokens","comments","start","end","loc","raw","rawValue"]);r.clearNode=function(t){for(var e=x,n=Array.isArray(e),r=0,e=n?e:s(e);;){var i;if(n){if(r>=e.length)break;i=e[r++]}else{if(r=e.next(),r.done)break;i=r.value}var a=i;null!=t[a]&&(t[a]=void 0)}},r.removeProperties=function(t){return r.cheap(t,r.clearNode),t},r.hasType=function(t,e,n,s){if(y["default"](s,t.type))return!1;if(t.type===n)return!0;var a={has:!1,type:n};return r(t,{blacklist:s,enter:i},e,a),a.has}},{265:265,401:401,402:402,411:411,423:423,425:425,426:426,431:431,432:432,433:433,480:480,539:539}],404:[function(t,e,n){"use strict";function r(t){for(var e=this;e=e.parentPath;)if(t(e))return e;return null}function i(t){var e=this;do if(t(e))return e;while(e=e.parentPath);return null}function s(){return this.findParent(function(t){return t.isFunction()||t.isProgram()})}function a(){var t=this;do if(Array.isArray(t.container))return t;while(t=t.parentPath)}function o(t){return this.getDeepestCommonAncestorFrom(t,function(t,e,n){for(var r=void 0,i=y.VISITOR_KEYS[t.type],s=n,a=Array.isArray(s),o=0,s=a?s:f(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u,p=l[e+1];if(r)if(p.listKey&&r.listKey===p.listKey&&p.key<r.key)r=p;else{var c=i.indexOf(r.parentKey),h=i.indexOf(p.parentKey);c>h&&(r=p)}else r=p}return r})}function u(t,e){var n=this;if(!t.length)return this;if(1===t.length)return t[0];var r=1/0,i=void 0,s=void 0,a=t.map(function(t){var e=[];do e.unshift(t);while((t=t.parentPath)&&t!==n);return e.length<r&&(r=e.length),e}),o=a[0];t:for(var u=0;r>u;u++){for(var l=o[u],p=a,c=Array.isArray(p),h=0,p=c?p:f(p);;){var d;if(c){if(h>=p.length)break;d=p[h++]}else{if(h=p.next(),h.done)break;d=h.value}var m=d;if(m[u]!==l)break t}i=u,s=l}if(s)return e?e(s,i,a):s;throw new Error("Couldn't find intersection")}function l(){var t=this,e=[];do e.push(t);while(t=t.parentPath);return e}function p(){for(var t=this;t;){for(var e=arguments,n=Array.isArray(e),r=0,e=n?e:f(e);;){var i;if(n){if(r>=e.length)break;i=e[r++]}else{if(r=e.next(),r.done)break;i=r.value}var s=i;if(t.node.type===s)return!0}t=t.parentPath}return!1}function c(t){var e=this;do if(e.isFunction()){var n=e.node.shadow;if(n){if(!t||n[t]!==!1)return e}else if(e.isArrowFunctionExpression())return e;return null}while(e=e.parentPath);return null}var f=t(426)["default"],h=t(432)["default"],d=t(431)["default"];n.__esModule=!0,n.findParent=r,n.find=i,n.getFunctionParent=s,n.getStatementParent=a,n.getEarliestCommonAncestorFrom=o,n.getDeepestCommonAncestorFrom=u,n.getAncestry=l,n.inType=p,n.inShadow=c;var m=t(539),y=h(m),g=t(411);d(g)},{411:411,426:426,431:431,432:432,539:539}],405:[function(t,e,n){"use strict";function r(){var t=this.node;if(t){var e=t.trailingComments,n=t.leadingComments;if(e||n){var r=this.getSibling(this.key-1),i=this.getSibling(this.key+1);r.node||(r=i),i.node||(i=r),r.addComments("trailing",n),i.addComments("leading",e)}}}function i(t,e,n){this.addComments(t,[{type:n?"CommentLine":"CommentBlock",value:e}])}function s(t,e){if(e){var n=this.node;if(n){var r=t+"Comments";n[r]?n[r]=n[r].concat(e):n[r]=e}}}n.__esModule=!0,n.shareCommentsWithSiblings=r,n.addComment=i,n.addComments=s},{}],406:[function(t,e,n){"use strict";n.__esModule=!0;var r="_paths";n.PATH_CACHE_KEY=r},{}],407:[function(t,e,n){"use strict";function r(t){var e=this.opts;return this.node&&this._call(e[t])?!0:this.node?this._call(e[this.node.type]&&e[this.node.type][t]):!1}function i(t){if(!t)return!1;for(var e=t,n=Array.isArray(e),r=0,e=n?e:x(e);;){var i;if(n){if(r>=e.length)break;i=e[r++]}else{if(r=e.next(),r.done)break;i=r.value}var s=i;if(s){var a=this.node;if(!a)return!0;var o=s.call(this.state,this,this.state);if(o)throw new Error("Unexpected return value from visitor method "+s);if(this.node!==a)return!0;if(this.shouldStop||this.shouldSkip||this.removed)return!0}}return!1}function s(){var t=this.opts.blacklist;return t&&t.indexOf(this.node.type)>-1}function a(){return this.node?this.isBlacklisted()?!1:this.opts.shouldSkip&&this.opts.shouldSkip(this)?!1:this.call("enter")||this.shouldSkip?this.shouldStop:(F["default"].node(this.node,this.opts,this.scope,this.state,this,this.skipKeys),this.call("exit"),this.shouldStop):!1}function o(){this.shouldSkip=!0}function u(t){this.skipKeys[t]=!0}function l(){this.shouldStop=!0,this.shouldSkip=!0}function p(){if(!this.opts||!this.opts.noScope){var t=this.context&&this.context.scope;if(!t)for(var e=this.parentPath;e&&!t;){if(e.opts&&e.opts.noScope)return;t=e.scope,e=e.parentPath}this.scope=this.getScope(t),this.scope&&this.scope.init()}}function c(t){return this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.skipKeys={},t&&(this.context=t,this.state=t.state,this.opts=t.opts),this.setScope(),this}function f(){this.removed||(this._resyncParent(),this._resyncList(),this._resyncKey())}function h(){this.parentPath&&(this.parent=this.parentPath.node)}function d(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(var t=0;t<this.container.length;t++)if(this.container[t]===this.node)return this.setKey(t)}else for(var e in this.container)if(this.container[e]===this.node)return this.setKey(e);this.key=null}}function m(){if(this.parent&&this.inList){var t=this.parent[this.listKey];this.container!==t&&(this.container=t||null)}}function y(){null!=this.key&&this.container&&this.container[this.key]===this.node||this._markRemoved()}function g(){this.contexts.pop(),this.setContext(this.contexts[this.contexts.length-1])}function v(t){this.contexts.push(t),this.setContext(t)}function A(t,e,n,r){this.inList=!!n,this.listKey=n,this.parentKey=n||r,this.container=e,this.parentPath=t||this.parentPath,this.setKey(r)}function E(t){this.key=t,this.node=this.container[this.key],this.type=this.node&&this.node.type}function b(){var t=arguments.length<=0||void 0===arguments[0]?this:arguments[0];if(!t.removed)for(var e=this.contexts,n=Array.isArray(e),r=0,e=n?e:x(e);;){var i;if(n){if(r>=e.length)break;i=e[r++]}else{if(r=e.next(),r.done)break;i=r.value}var s=i;s.maybeQueue(t)}}var x=t(426)["default"],D=t(431)["default"];n.__esModule=!0,n.call=r,n._call=i,n.isBlacklisted=s,n.visit=a,n.skip=o,n.skipKey=u,n.stop=l,n.setScope=p,n.setContext=c,n.resync=f,n._resyncParent=h,n._resyncKey=d,n._resyncList=m,n._resyncRemoved=y,n.popContext=g,n.pushContext=v,n.setup=A,n.setKey=E,n.requeue=b;var C=t(403),F=D(C)},{403:403,426:426,431:431}],408:[function(t,e,n){"use strict";function r(){var t=this.node,e=void 0;if(this.isMemberExpression())e=t.property;else{if(!this.isProperty()&&!this.isMethod())throw new ReferenceError("todo");e=t.key}return t.computed||u.isIdentifier(e)&&(e=u.stringLiteral(e.name)),e}function i(){return u.ensureBlock(this.node)}function s(){if(this.isArrowFunctionExpression()){this.ensureBlock();var t=this.node;t.expression=!1,t.type="FunctionExpression",t.shadow=t.shadow||!0}}var a=t(432)["default"];n.__esModule=!0,n.toComputedKey=r,n.ensureBlock=i,n.arrowFunctionToShadowed=s;var o=t(539),u=a(o)},{432:432,539:539}],409:[function(t,e,n){(function(e){"use strict";function r(){var t=this.evaluate();return t.confident?!!t.value:void 0}function i(){function t(t){r&&(i=t,r=!1)}function n(i){if(r){var u=i.node;if(i.isSequenceExpression()){var l=i.get("expressions");return n(l[l.length-1])}if(i.isStringLiteral()||i.isNumericLiteral()||i.isBooleanLiteral())return u.value;if(i.isNullLiteral())return null;if(i.isTemplateLiteral()){for(var p="",c=0,l=i.get("expressions"),f=u.quasis,h=Array.isArray(f),d=0,f=h?f:s(f);;){var m;if(h){if(d>=f.length)break;m=f[d++]}else{if(d=f.next(),d.done)break;m=d.value}var y=m;if(!r)break;p+=y.value.cooked;var g=l[c++];g&&(p+=String(n(g)))}if(r)return p}if(i.isConditionalExpression())return n(n(i.get("test"))?i.get("consequent"):i.get("alternate"));if(i.isExpressionWrapper())return n(i.get("expression"));if(i.isMemberExpression()&&!i.parentPath.isCallExpression({callee:u})){var v=i.get("property"),A=i.get("object");if(A.isLiteral()&&v.isIdentifier()){var E=A.node.value,b=typeof E;if("number"===b||"string"===b)return E[v.node.name]}}if(i.isReferencedIdentifier()){var x=i.scope.getBinding(u.name);if(x&&x.hasValue)return x.value;if("undefined"===u.name)return void 0;if("Infinity"===u.name)return 1/0;if("NaN"===u.name)return NaN;var D=i.resolve();return D===i?t(i):n(D)}if(i.isUnaryExpression({prefix:!0})){if("void"===u.operator)return void 0;var C=i.get("argument");if("typeof"===u.operator&&(C.isFunction()||C.isClass()))return"function";var F=n(C);switch(u.operator){case"!":return!F;case"+":return+F;case"-":return-F;case"~":return~F;case"typeof":return typeof F}}if(i.isArrayExpression()){for(var S=[],w=i.get("elements"),B=w,T=Array.isArray(B),_=0,B=T?B:s(B);;){var k;if(T){if(_>=B.length)break;k=B[_++]}else{if(_=B.next(),_.done)break;k=_.value}var y=k;if(y=y.evaluate(),!y.confident)return t(y);S.push(y.value)}return S}if(i.isObjectExpression(),i.isLogicalExpression()){var P=r,N=n(i.get("left")),I=r;r=P;var L=n(i.get("right")),O=r,M=I!==O;switch(r=I&&O,u.operator){case"||":return(N||L)&&M&&(r=!0),N||L;case"&&":return(!N&&I||!L&&O)&&(r=!0),N&&L}}if(i.isBinaryExpression()){var N=n(i.get("left")),L=n(i.get("right"));switch(u.operator){case"-":return N-L;case"+":return N+L;case"/":return N/L;case"*":return N*L;case"%":return N%L;case"**":return Math.pow(N,L);case"<":return L>N;case">":return N>L;case"<=":return L>=N;case">=":return N>=L;case"==":return N==L;case"!=":return N!=L;case"===":return N===L;case"!==":return N!==L;case"|":return N|L;case"&":return N&L;case"^":return N^L;case"<<":return N<<L;case">>":return N>>L;case">>>":return N>>>L}}if(i.isCallExpression()){var R=i.get("callee"),j=void 0,V=void 0;if(R.isIdentifier()&&!i.scope.getBinding(R.node.name,!0)&&a.indexOf(R.node.name)>=0&&(V=e[u.callee.name]),R.isMemberExpression()){var A=R.get("object"),v=R.get("property");if(A.isIdentifier()&&v.isIdentifier()&&a.indexOf(A.node.name)>=0&&o.indexOf(v.node.name)<0&&(j=e[A.node.name],V=j[v.node.name]),A.isLiteral()&&v.isIdentifier()){var b=typeof A.node.value;("string"===b||"number"===b)&&(j=A.node.value,V=j[v.node.name])}}if(V){var U=i.get("arguments").map(n);if(!r)return;return V.apply(j,U)}}t(i)}}var r=!0,i=void 0,u=n(this);return r||(u=void 0),{confident:r,deopt:i,value:u}}var s=t(426)["default"];n.__esModule=!0,n.evaluateTruthy=r,n.evaluate=i;var a=["String","Number","Math"],o=["random"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{426:426}],410:[function(t,e,n){"use strict";function r(){var t=this;do{if(!t.parentPath||Array.isArray(t.container)&&t.isStatement())break;t=t.parentPath}while(t);if(t&&(t.isProgram()||t.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return t}function i(){return"left"===this.key?this.getSibling("right"):"right"===this.key?this.getSibling("left"):void 0}function s(){var t=[],e=function(e){e&&(t=t.concat(e.getCompletionRecords()))};if(this.isIfStatement())e(this.get("consequent")),e(this.get("alternate"));else if(this.isDoExpression()||this.isFor()||this.isWhile())e(this.get("body"));else if(this.isProgram()||this.isBlockStatement())e(this.get("body").pop());else{if(this.isFunction())return this.get("body").getCompletionRecords();this.isTryStatement()?(e(this.get("block")),e(this.get("handler")),e(this.get("finalizer"))):t.push(this)}return t}function a(t){return y["default"].get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:t})}function o(t,e){e===!0&&(e=this.context);var n=t.split(".");return 1===n.length?this._getKey(t,e):this._getPattern(n,e)}function u(t,e){var n=this,r=this.node,i=r[t];return Array.isArray(i)?i.map(function(s,a){return y["default"].get({listKey:t,parentPath:n,parent:r,container:i,key:a}).setContext(e)}):y["default"].get({parentPath:this,parent:r,container:r,key:t}).setContext(e)}function l(t,e){for(var n=this,r=t,i=Array.isArray(r),s=0,r=i?r:f(r);;){var a;if(i){if(s>=r.length)break;a=r[s++]}else{if(s=r.next(),s.done)break;a=s.value}var o=a;n="."===o?n.parentPath:Array.isArray(n)?n[o]:n.get(o,e)}return n}function p(t){return v.getBindingIdentifiers(this.node,t)}function c(t){return v.getOuterBindingIdentifiers(this.node,t)}var f=t(426)["default"],h=t(431)["default"],d=t(432)["default"];n.__esModule=!0,n.getStatementParent=r,n.getOpposite=i,n.getCompletionRecords=s,n.getSibling=a,n.get=o,n._getKey=u,n._getPattern=l,n.getBindingIdentifiers=p,n.getOuterBindingIdentifiers=c;var m=t(411),y=h(m),g=t(539),v=d(g)},{411:411,426:426,431:431,432:432,539:539}],411:[function(t,e,n){"use strict";var r=t(430)["default"],i=t(426)["default"],s=t(432)["default"],a=t(431)["default"];n.__esModule=!0;var o=t(418),u=s(o),l=t(406),p=t(479),c=a(p),f=t(403),h=a(f),d=t(519),m=a(d),y=t(423),g=a(y),v=t(539),A=s(v),E=function(){function t(e,n){r(this,t),this.parent=n,this.hub=e,this.contexts=[],this.data={},this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.state=null,this.opts=null,this.skipKeys=null,this.parentPath=null,this.context=null,this.container=null,this.listKey=null,this.inList=!1,this.parentKey=null,this.key=null,this.node=null,this.scope=null,this.type=null,this.typeAnnotation=null}return t.get=function(e){var n=e.hub,r=e.parentPath,i=e.parent,s=e.container,a=e.listKey,o=e.key;!n&&r&&(n=r.hub),c["default"](i,"To get a node path the parent needs to exist");for(var u=s[o],p=i[l.PATH_CACHE_KEY]=i[l.PATH_CACHE_KEY]||[],f=void 0,h=0;h<p.length;h++){var d=p[h];if(d.node===u){f=d;break}}if(f&&!(f instanceof t)){if("NodePath"!==f.constructor.name)throw new Error("We found a path that isn't a NodePath instance. Possiblly due to bad serialisation.");f=null}return f||(f=new t(n,i),p.push(f)),f.setup(r,s,a,o),f},t.prototype.getScope=function(t){var e=t;return this.isScope()&&(e=new g["default"](this,t)),e},t.prototype.setData=function(t,e){return this.data[t]=e},t.prototype.getData=function(t,e){var n=this.data[t];return!n&&e&&(n=this.data[t]=e),n},t.prototype.buildCodeFrameError=function(t){var e=arguments.length<=1||void 0===arguments[1]?SyntaxError:arguments[1];return this.hub.file.buildCodeFrameError(this.node,t,e)},t.prototype.traverse=function(t,e){h["default"](this.node,t,this.scope,e,this)},t.prototype.mark=function(t,e){this.hub.file.metadata.marked.push({type:t,message:e,loc:this.node.loc})},t.prototype.set=function(t,e){A.validate(this.node,t,e),this.node[t]=e},t.prototype.dump=function(){var t=[],e=this;do{var n=e.key;e.inList&&(n=e.listKey+"["+n+"]"),t.unshift(n)}while(e=e.parentPath);console.log(t.join("."))},t}();n["default"]=E,m["default"](E.prototype,t(404)),m["default"](E.prototype,t(412)),m["default"](E.prototype,t(421)),m["default"](E.prototype,t(409)),m["default"](E.prototype,t(408)),m["default"](E.prototype,t(415)),m["default"](E.prototype,t(407)),m["default"](E.prototype,t(420)),m["default"](E.prototype,t(419)),m["default"](E.prototype,t(410)),m["default"](E.prototype,t(405));for(var b=function(){if(D){if(C>=x.length)return"break";F=x[C++]}else{if(C=x.next(),C.done)return"break";F=C.value}var t=F,e="is"+t;E.prototype[e]=function(t){return A[e](this.node,t)},E.prototype["assert"+t]=function(n){if(!this[e](n))throw new TypeError("Expected node path of type "+t)}},x=A.TYPES,D=Array.isArray(x),C=0,x=D?x:i(x);;){var F,S=b();if("break"===S)break}var w=function(t){if("_"===t[0])return"continue";A.TYPES.indexOf(t)<0&&A.TYPES.push(t);var e=u[t];E.prototype["is"+t]=function(t){return e.checkPath(this,t)}};for(var B in u){w(B)}e.exports=n["default"]},{403:403,404:404,405:405,406:406,407:407,408:408,409:409,410:410,412:412,415:415,418:418,419:419,420:420,421:421,423:423,426:426,430:430,431:431,432:432,479:479,519:519,539:539}],412:[function(t,e,n){"use strict";function r(){if(this.typeAnnotation)return this.typeAnnotation;var t=this._getTypeAnnotation()||m.anyTypeAnnotation();return m.isTypeAnnotation(t)&&(t=t.typeAnnotation),this.typeAnnotation=t}function i(){var t=this.node;{if(t){if(t.typeAnnotation)return t.typeAnnotation;var e=h[t.type];return e?e.call(this,t):(e=h[this.parentPath.type],e&&e.validParent?this.parentPath.getTypeAnnotation():void 0)}if("init"===this.key&&this.parentPath.isVariableDeclarator()){var n=this.parentPath.parentPath,r=n.parentPath;return"left"===n.key&&r.isForInStatement()?m.stringTypeAnnotation():"left"===n.key&&r.isForOfStatement()?m.anyTypeAnnotation():m.voidTypeAnnotation()}}}function s(t,e){return a(t,this.getTypeAnnotation(),e)}function a(t,e,n){if("string"===t)return m.isStringTypeAnnotation(e);if("number"===t)return m.isNumberTypeAnnotation(e);if("boolean"===t)return m.isBooleanTypeAnnotation(e);if("any"===t)return m.isAnyTypeAnnotation(e);if("mixed"===t)return m.isMixedTypeAnnotation(e);if("void"===t)return m.isVoidTypeAnnotation(e);if(n)return!1;throw new Error("Unknown base type "+t)}function o(t){var e=this.getTypeAnnotation();if(m.isAnyTypeAnnotation(e))return!0;if(m.isUnionTypeAnnotation(e)){for(var n=e.types,r=Array.isArray(n),i=0,n=r?n:p(n);;){var s;if(r){if(i>=n.length)break;s=n[i++]}else{if(i=n.next(),i.done)break;s=i.value}var o=s;if(m.isAnyTypeAnnotation(o)||a(t,o,!0))return!0}return!1}return a(t,e,!0)}function u(t){var e=this.getTypeAnnotation();return t=t.getTypeAnnotation(),!m.isAnyTypeAnnotation(e)&&m.isFlowBaseAnnotation(e)?t.type===e.type:void 0}function l(t){var e=this.getTypeAnnotation();return m.isGenericTypeAnnotation(e)&&m.isIdentifier(e.id,{name:t})}var p=t(426)["default"],c=t(432)["default"];n.__esModule=!0,n.getTypeAnnotation=r,n._getTypeAnnotation=i,n.isBaseType=s,n.couldBeBaseType=o,n.baseTypeStrictlyMatches=u,n.isGenericType=l;var f=t(414),h=c(f),d=t(539),m=c(d)},{414:414,426:426,432:432,539:539}],413:[function(t,e,n){"use strict";function r(t,e){var n=t.scope.getBinding(e),r=[];t.typeAnnotation=c.unionTypeAnnotation(r);var s=[],a=i(n,t,s),l=o(t,e);if(l&&!function(){var t=i(n,l.ifStatement);a=a.filter(function(e){return t.indexOf(e)<0}),r.push(l.typeAnnotation)}(),a.length){var p=a.reverse(),f=[];a=[];for(var h=p,d=Array.isArray(h),m=0,h=d?h:u(h);;){var y;if(d){if(m>=h.length)break;y=h[m++]}else{if(m=h.next(),m.done)break;y=m.value}var g=y,v=g.scope;if(!(f.indexOf(v)>=0)&&(f.push(v),a.push(g),v===t.scope)){a=[g];break}}a=a.concat(s);for(var A=a,E=Array.isArray(A),b=0,A=E?A:u(A);;){var x;if(E){if(b>=A.length)break;x=A[b++]}else{if(b=A.next(),b.done)break;x=b.value}var g=x;r.push(g.getTypeAnnotation())}}return r.length?c.createUnionTypeAnnotation(r):void 0}function i(t,e,n){var r=t.constantViolations.slice();return r.unshift(t.path),r.filter(function(t){t=t.resolve();var r=t._guessExecutionStatusRelativeTo(e);return n&&"function"===r&&n.push(t),"before"===r})}function s(t,e){var n=e.node.operator,r=e.get("right").resolve(),i=e.get("left").resolve(),s=void 0;if(i.isIdentifier({name:t})?s=r:r.isIdentifier({name:t})&&(s=i),s)return"==="===n?s.getTypeAnnotation():c.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(n)>=0?c.numberTypeAnnotation():void 0;if("==="===n){var a=void 0,o=void 0;if(i.isUnaryExpression({operator:"typeof"})?(a=i,o=r):r.isUnaryExpression({operator:"typeof"})&&(a=r,o=i),(o||a)&&(o=o.resolve(),o.isLiteral())){var u=o.node.value;if("string"==typeof u&&a.get("argument").isIdentifier({name:t}))return c.createTypeAnnotationBasedOnTypeof(o.node.value)}}}function a(t){for(var e=void 0;e=t.parentPath;){if(e.isIfStatement()||e.isConditionalExpression())return"test"===t.key?void 0:e;t=e}}function o(t,e){var n=a(t);if(n){var r=n.get("test"),i=[r],u=[];do{var l=i.shift().resolve();if(l.isLogicalExpression()&&(i.push(l.get("left")),i.push(l.get("right"))),l.isBinaryExpression()){var p=s(e,l);p&&u.push(p)}}while(i.length);return u.length?{typeAnnotation:c.createUnionTypeAnnotation(u),ifStatement:n}:o(n,e)}}var u=t(426)["default"],l=t(432)["default"];n.__esModule=!0;var p=t(539),c=l(p);n["default"]=function(t){if(this.isReferenced()){var e=this.scope.getBinding(t.name);return e?e.identifier.typeAnnotation?e.identifier.typeAnnotation:r(this,t.name):"undefined"===t.name?c.voidTypeAnnotation():"NaN"===t.name||"Infinity"===t.name?c.numberTypeAnnotation():void("arguments"===t.name)}},e.exports=n["default"]},{426:426,432:432,539:539}],414:[function(t,e,n){"use strict";function r(){var t=this.get("id");return t.isIdentifier()?this.get("init").getTypeAnnotation():void 0}function i(t){return t.typeAnnotation}function s(t){return this.get("callee").isIdentifier()?T.genericTypeAnnotation(t.callee):void 0}function a(){return T.stringTypeAnnotation()}function o(t){var e=t.operator;return"void"===e?T.voidTypeAnnotation():T.NUMBER_UNARY_OPERATORS.indexOf(e)>=0?T.numberTypeAnnotation():T.STRING_UNARY_OPERATORS.indexOf(e)>=0?T.stringTypeAnnotation():T.BOOLEAN_UNARY_OPERATORS.indexOf(e)>=0?T.booleanTypeAnnotation():void 0}function u(t){var e=t.operator;if(T.NUMBER_BINARY_OPERATORS.indexOf(e)>=0)return T.numberTypeAnnotation();if(T.BOOLEAN_BINARY_OPERATORS.indexOf(e)>=0)return T.booleanTypeAnnotation();if("+"===e){var n=this.get("right"),r=this.get("left");return r.isBaseType("number")&&n.isBaseType("number")?T.numberTypeAnnotation():r.isBaseType("string")||n.isBaseType("string")?T.stringTypeAnnotation():T.unionTypeAnnotation([T.stringTypeAnnotation(),T.numberTypeAnnotation()])}}function l(){return T.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])}function p(){return T.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])}function c(){return this.get("expressions").pop().getTypeAnnotation()}function f(){return this.get("right").getTypeAnnotation()}function h(t){var e=t.operator;return"++"===e||"--"===e?T.numberTypeAnnotation():void 0}function d(){return T.stringTypeAnnotation()}function m(){return T.numberTypeAnnotation()}function y(){return T.booleanTypeAnnotation()}function g(){return T.voidTypeAnnotation()}function v(){return T.genericTypeAnnotation(T.identifier("RegExp"))}function A(){return T.genericTypeAnnotation(T.identifier("Object"))}function E(){return T.genericTypeAnnotation(T.identifier("Array"))}function b(){return E()}function x(){return T.genericTypeAnnotation(T.identifier("Function"))}function D(){return F(this.get("callee"))}function C(){return F(this.get("tag"))}function F(t){if(t=t.resolve(),t.isFunction()){if(t.is("async"))return t.is("generator")?T.genericTypeAnnotation(T.identifier("AsyncIterator")):T.genericTypeAnnotation(T.identifier("Promise"));if(t.node.returnType)return t.node.returnType}}var S=t(432)["default"],w=t(433)["default"];n.__esModule=!0,n.VariableDeclarator=r,n.TypeCastExpression=i,n.NewExpression=s,n.TemplateLiteral=a,n.UnaryExpression=o,n.BinaryExpression=u,n.LogicalExpression=l,n.ConditionalExpression=p,n.SequenceExpression=c,n.AssignmentExpression=f,n.UpdateExpression=h,n.StringLiteral=d,n.NumericLiteral=m,n.BooleanLiteral=y,n.NullLiteral=g,n.RegExpLiteral=v,n.ObjectExpression=A,n.ArrayExpression=E,n.RestElement=b,n.CallExpression=D,n.TaggedTemplateExpression=C;var B=t(539),T=S(B),_=t(413);n.Identifier=w(_),i.validParent=!0,b.validParent=!0,n.Function=x,n.Class=x},{413:413,432:432,433:433,539:539}],415:[function(t,e,n){"use strict";function r(t,e){function n(t){var e=r[s];return"*"===e||t===e}if(!this.isMemberExpression())return!1;for(var r=t.split("."),i=[this.node],s=0;i.length;){var a=i.shift();if(e&&s===r.length)return!0;if(F.isIdentifier(a)){if(!n(a.name))return!1}else if(F.isLiteral(a)){if(!n(a.value))return!1}else{if(F.isMemberExpression(a)){if(a.computed&&!F.isLiteral(a.property))return!1;i.unshift(a.property),i.unshift(a.object);continue}if(!F.isThisExpression(a))return!1;if(!n("this"))return!1}if(++s>r.length)return!1}return s===r.length}function i(t){var e=this.node&&this.node[t];return e&&Array.isArray(e)?!!e.length:!!e}function s(){return this.scope.isStatic(this.node)}function a(t){return!this.has(t)}function o(t,e){return this.node[t]===e}function u(t){return F.isType(this.type,t)}function l(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()}function p(t){var e=this,n=!0;do{var r=e.container;if(e.isFunction()&&!n)return!!t;if(n=!1,Array.isArray(r)&&e.key!==r.length-1)return!1}while((e=e.parentPath)&&!e.isProgram());return!0}function c(){return this.parentPath.isLabeledStatement()||F.isBlockStatement(this.container)?!1:D["default"](F.STATEMENT_OR_BLOCK_KEYS,this.key)}function f(t,e){if(!this.isReferencedIdentifier())return!1;var n=this.scope.getBinding(this.node.name);if(!n||"module"!==n.kind)return!1;var r=n.path,i=r.parentPath;return i.isImportDeclaration()?i.node.source.value!==t?!1:e?r.isImportDefaultSpecifier()&&"default"===e?!0:r.isImportNamespaceSpecifier()&&"*"===e?!0:r.isImportSpecifier()&&r.node.imported.name===e?!0:!1:!0:!1}function h(){var t=this.node;return t.end?this.hub.file.code.slice(t.start,t.end):""}function d(t){return"after"!==this._guessExecutionStatusRelativeTo(t)}function m(t){var e=t.scope.getFunctionParent(),n=this.scope.getFunctionParent();if(e!==n){var r=this._guessExecutionStatusRelativeToDifferentFunctions(e);if(r)return r;t=e.path}var i=t.getAncestry();if(i.indexOf(this)>=0)return"after";var s=this.getAncestry(),a=void 0,o=void 0,u=void 0;for(u=0;u<s.length;u++){var l=s[u];if(o=i.indexOf(l),o>=0){a=l;break}}if(!a)return"before";var p=i[o-1],c=s[u-1];if(!p||!c)return"before";if(p.listKey&&p.container===c.container)return p.key>c.key?"before":"after";var f=F.VISITOR_KEYS[p.type].indexOf(p.key),h=F.VISITOR_KEYS[c.type].indexOf(c.key);return f>h?"before":"after"}function y(t){var e=t.path;if(e.isFunctionDeclaration()){var n=e.scope.getBinding(e.node.id.name);if(!n.references)return"before";for(var r=n.referencePaths,i=r,s=Array.isArray(i),a=0,i=s?i:A(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;if("callee"!==u.key||!u.parentPath.isCallExpression())return}for(var l=void 0,p=r,c=Array.isArray(p),f=0,p=c?p:A(p);;){var h;if(c){if(f>=p.length)break;h=p[f++]}else{if(f=p.next(),f.done)break;h=f.value}var u=h,d=!!u.find(function(t){return t===e});if(!d){var m=this._guessExecutionStatusRelativeTo(u);if(l){if(l!==m)return}else l=m}}return l}}function g(t,e){return this._resolve(t,e)||this}function v(t,e){if(!(e&&e.indexOf(this)>=0))if(e=e||[],e.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(t,e)}else if(this.isReferencedIdentifier()){var n=this.scope.getBinding(this.node.name);if(!n)return;if(!n.constant)return;if("module"===n.kind)return;if(n.path!==this)return n.path.resolve(t,e)}else{if(this.isTypeCastExpression())return this.get("expression").resolve(t,e);
if(t&&this.isMemberExpression()){var r=this.toComputedKey();if(!F.isLiteral(r))return;var i=r.value,s=this.get("object").resolve(t,e);if(s.isObjectExpression())for(var a=s.get("properties"),o=a,u=Array.isArray(o),l=0,o=u?o:A(o);;){var p;if(u){if(l>=o.length)break;p=o[l++]}else{if(l=o.next(),l.done)break;p=l.value}var c=p;if(c.isProperty()){var f=c.get("key"),h=c.isnt("computed")&&f.isIdentifier({name:i});if(h=h||f.isLiteral({value:i}))return c.get("value").resolve(t,e)}}else if(s.isArrayExpression()&&!isNaN(+i)){var d=s.get("elements"),m=d[i];if(m)return m.resolve(t,e)}}}}var A=t(426)["default"],E=t(431)["default"],b=t(432)["default"];n.__esModule=!0,n.matchesPattern=r,n.has=i,n.isStatic=s,n.isnt=a,n.equals=o,n.isNodeType=u,n.canHaveVariableDeclarationOrExpression=l,n.isCompletionRecord=p,n.isStatementOrBlock=c,n.referencesImport=f,n.getSource=h,n.willIMaybeExecuteBefore=d,n._guessExecutionStatusRelativeTo=m,n._guessExecutionStatusRelativeToDifferentFunctions=y,n.resolve=g,n._resolve=v;var x=t(480),D=E(x),C=t(539),F=b(C),S=i;n.is=S},{426:426,431:431,432:432,480:480,539:539}],416:[function(t,e,n){"use strict";var r=t(430)["default"],i=t(426)["default"],s=t(432)["default"];n.__esModule=!0;var a=t(539),o=s(a),u={ReferencedIdentifier:function(t,e){if(!t.isJSXIdentifier()||!a.react.isCompatTag(t.node.name)){var n=t.scope.getBinding(t.node.name);if(n&&n===e.scope.getBinding(t.node.name))if(n.constant)e.bindings[t.node.name]=n;else for(var r=n.constantViolations,s=Array.isArray(r),o=0,r=s?r:i(r);;){var u;if(s){if(o>=r.length)break;u=r[o++]}else{if(o=r.next(),o.done)break;u=o.value}var l=u;e.breakOnScopePaths=e.breakOnScopePaths.concat(l.getAncestry())}}}},l=function(){function t(e,n){r(this,t),this.breakOnScopePaths=[],this.bindings={},this.scopes=[],this.scope=n,this.path=e}return t.prototype.isCompatibleScope=function(t){for(var e in this.bindings){var n=this.bindings[e];if(!t.bindingIdentifierEquals(e,n.identifier))return!1}return!0},t.prototype.getCompatibleScopes=function(){var t=this.path.scope;do{if(!this.isCompatibleScope(t))break;if(this.scopes.push(t),this.breakOnScopePaths.indexOf(t.path)>=0)break}while(t=t.parent)},t.prototype.getAttachmentPath=function(){var t=this.scopes,e=t.pop();if(e){if(e.path.isFunction()){if(this.hasOwnParamBindings(e)){if(this.scope===e)return;return e.path.get("body").get("body")[0]}return this.getNextScopeStatementParent()}return e.path.isProgram()?this.getNextScopeStatementParent():void 0}},t.prototype.getNextScopeStatementParent=function(){var t=this.scopes.pop();return t?t.path.getStatementParent():void 0},t.prototype.hasOwnParamBindings=function(t){for(var e in this.bindings)if(t.hasOwnBinding(e)){var n=this.bindings[e];if("param"===n.kind)return!0}return!1},t.prototype.run=function(){var t=this.path.node;if(!t._hoisted){t._hoisted=!0,this.path.traverse(u,this),this.getCompatibleScopes();var e=this.getAttachmentPath();if(e&&e.getFunctionParent()!==this.path.getFunctionParent()){var n=e.scope.generateUidIdentifier("ref");e.insertBefore([o.variableDeclaration("var",[o.variableDeclarator(n,this.path.node)])]);var r=this.path.parentPath;r.isJSXElement()&&this.path.container===r.node.children&&(n=o.JSXExpressionContainer(n)),this.path.replaceWith(n)}}},t}();n["default"]=l,e.exports=n["default"]},{426:426,430:430,432:432,539:539}],417:[function(t,e,n){"use strict";n.__esModule=!0;var r=[function(t,e){return"body"===t.key&&e.isArrowFunctionExpression()?(t.replaceWith(t.scope.buildUndefinedNode()),!0):void 0},function(t,e){var n=!1;return n=n||"test"===t.key&&(e.isWhile()||e.isSwitchCase()),n=n||"declaration"===t.key&&e.isExportDeclaration(),n=n||"body"===t.key&&e.isLabeledStatement(),n=n||"declarations"===t.listKey&&e.isVariableDeclaration()&&1===e.node.declarations.length,n=n||"expression"===t.key&&e.isExpressionStatement(),n?(e.remove(),!0):void 0},function(t,e){return e.isSequenceExpression()&&1===e.node.expressions.length?(e.replaceWith(e.node.expressions[0]),!0):void 0},function(t,e){return e.isBinary()?("left"===t.key?e.replaceWith(e.node.right):e.replaceWith(e.node.left),!0):void 0}];n.hooks=r},{}],418:[function(t,e,n){"use strict";var r=t(432)["default"];n.__esModule=!0;var i=t(539),s=r(i),a={types:["Identifier","JSXIdentifier"],checkPath:function(t,e){var n=t.node,r=t.parent;if(!s.isIdentifier(n,e)){if(!s.isJSXIdentifier(n,e))return!1;if(i.react.isCompatTag(n.name))return!1}return s.isReferenced(n,r)}};n.ReferencedIdentifier=a;var o={types:["MemberExpression"],checkPath:function(t){var e=t.node,n=t.parent;return s.isMemberExpression(e)&&s.isReferenced(e,n)}};n.ReferencedMemberExpression=o;var u={types:["Identifier"],checkPath:function(t){var e=t.node,n=t.parent;return s.isIdentifier(e)&&s.isBinding(e,n)}};n.BindingIdentifier=u;var l={types:["Statement"],checkPath:function(t){var e=t.node,n=t.parent;if(s.isStatement(e)){if(s.isVariableDeclaration(e)){if(s.isForXStatement(n,{left:e}))return!1;if(s.isForStatement(n,{init:e}))return!1}return!0}return!1}};n.Statement=l;var p={types:["Expression"],checkPath:function(t){return t.isIdentifier()?t.isReferencedIdentifier():s.isExpression(t.node)}};n.Expression=p;var c={types:["Scopable"],checkPath:function(t){return s.isScope(t.node,t.parent)}};n.Scope=c;var f={checkPath:function(t){return s.isReferenced(t.node,t.parent)}};n.Referenced=f;var h={checkPath:function(t){return s.isBlockScoped(t.node)}};n.BlockScoped=h;var d={types:["VariableDeclaration"],checkPath:function(t){return s.isVar(t.node)}};n.Var=d;var m={checkPath:function(t){return t.node&&!!t.node.loc}};n.User=m;var y={checkPath:function(t){return!t.isUser()}};n.Generated=y;var g={checkPath:function(t,e){return t.scope.isPure(t.node,e)}};n.Pure=g;var v={types:["Flow","ImportDeclaration","ExportDeclaration"],checkPath:function(t){var e=t.node;return s.isFlow(e)?!0:s.isImportDeclaration(e)?"type"===e.importKind||"typeof"===e.importKind:s.isExportDeclaration(e)?"type"===e.exportKind:!1}};n.Flow=v},{432:432,539:539}],419:[function(t,e,n){"use strict";function r(t){if(this._assertUnremoved(),t=this._verifyNodeList(t),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertBefore(t);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key)this.node&&t.push(this.node),this.replaceExpressionWithStatements(t);else{if(this._maybePopFromStatements(t),Array.isArray(this.container))return this._containerInsertBefore(t);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&t.push(this.node),this._replaceWith(D.blockStatement(t))}return[this]}function i(t,e){this.updateSiblingKeys(t,e.length);for(var n=[],r=0;r<e.length;r++){var i=t+r,s=e[r];if(this.container.splice(i,0,s),this.context){var a=this.context.create(this.parent,this.container,i,this.listKey);n.push(a)}else n.push(b["default"].get({parentPath:this,parent:s,container:this.container,listKey:this.listKey,key:i}))}for(var o=this.contexts,u=this;!o.length;)u=u.parentPath,o=u.contexts;for(var l=n,p=Array.isArray(l),c=0,l=p?l:d(l);;){var f;if(p){if(c>=l.length)break;f=l[c++]}else{if(c=l.next(),c.done)break;f=c.value}var h=f;h.setScope();for(var m=o,y=Array.isArray(m),g=0,m=y?m:d(m);;){var v;if(y){if(g>=m.length)break;v=m[g++]}else{if(g=m.next(),g.done)break;v=g.value}var A=v;A.maybeQueue(h)}}return n}function s(t){return this._containerInsert(this.key,t)}function a(t){return this._containerInsert(this.key+1,t)}function o(t){var e=t[t.length-1],n=D.isIdentifier(e)||D.isExpressionStatement(e)&&D.isIdentifier(e.expression);n&&!this.isCompletionRecord()&&t.pop()}function u(t){if(this._assertUnremoved(),t=this._verifyNodeList(t),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertAfter(t);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key){if(this.node){var e=this.scope.generateDeclaredUidIdentifier();t.unshift(D.expressionStatement(D.assignmentExpression("=",e,this.node))),t.push(D.expressionStatement(e))}this.replaceExpressionWithStatements(t)}else{if(this._maybePopFromStatements(t),Array.isArray(this.container))return this._containerInsertAfter(t);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&t.unshift(this.node),this._replaceWith(D.blockStatement(t))}return[this]}function l(t,e){if(this.parent)for(var n=this.parent[g.PATH_CACHE_KEY],r=0;r<n.length;r++){var i=n[r];i.key>=t&&(i.key+=e)}}function p(t){if(!t)return[];t.constructor!==Array&&(t=[t]);for(var e=0;e<t.length;e++){var n=t[e];if(!n)throw new Error("Node list has falsy node with the index of "+e);if("object"!=typeof n)throw new Error("Node list contains a non-object node with the index of "+e);if(!n.type)throw new Error("Node list contains a node without a type with the index of "+e);n instanceof b["default"]&&(t[e]=n.node)}return t}function c(t,e){this._assertUnremoved(),e=this._verifyNodeList(e);var n=b["default"].get({parentPath:this,parent:this.node,container:this.node[t],listKey:t,key:0});return n.insertBefore(e)}function f(t,e){this._assertUnremoved(),e=this._verifyNodeList(e);var n=this.node[t],r=b["default"].get({parentPath:this,parent:this.node,container:n,listKey:t,key:n.length});return r.replaceWithMultiple(e)}function h(){var t=arguments.length<=0||void 0===arguments[0]?this.scope:arguments[0],e=new A["default"](this,t);return e.run()}var d=t(426)["default"],m=t(431)["default"],y=t(432)["default"];n.__esModule=!0,n.insertBefore=r,n._containerInsert=i,n._containerInsertBefore=s,n._containerInsertAfter=a,n._maybePopFromStatements=o,n.insertAfter=u,n.updateSiblingKeys=l,n._verifyNodeList=p,n.unshiftContainer=c,n.pushContainer=f,n.hoist=h;var g=t(406),v=t(416),A=m(v),E=t(411),b=m(E),x=t(539),D=y(x)},{406:406,411:411,416:416,426:426,431:431,432:432,539:539}],420:[function(t,e,n){"use strict";function r(){return this._assertUnremoved(),this.resync(),this._callRemovalHooks()?void this._markRemoved():(this.shareCommentsWithSiblings(),this._remove(),void this._markRemoved())}function i(){for(var t=l.hooks,e=Array.isArray(t),n=0,t=e?t:u(t);;){var r;if(e){if(n>=t.length)break;r=t[n++]}else{if(n=t.next(),n.done)break;r=n.value}var i=r;if(i(this,this.parentPath))return!0}}function s(){Array.isArray(this.container)?(this.container.splice(this.key,1),this.updateSiblingKeys(this.key,-1)):this._replaceWith(null)}function a(){this.shouldSkip=!0,this.removed=!0,this.node=null}function o(){if(this.removed)throw this.buildCodeFrameError("NodePath has been removed so is read-only.")}var u=t(426)["default"];n.__esModule=!0,n.remove=r,n._callRemovalHooks=i,n._remove=s,n._markRemoved=a,n._assertUnremoved=o;var l=t(417)},{417:417,426:426}],421:[function(t,e,n){"use strict";function r(t){this.resync(),t=this._verifyNodeList(t),E.inheritLeadingComments(t[0],this.node),E.inheritTrailingComments(t[t.length-1],this.node),this.node=this.container[this.key]=null,this.insertAfter(t),this.node?this.requeue():this.remove()}function i(t){this.resync();try{t="("+t+")",t=v.parse(t)}catch(e){var n=e.loc;throw n&&(e.message+=" - make sure this is an expression.",e.message+="\n"+h["default"](t,n.line,n.column+1)),e}return t=t.program.body[0].expression,m["default"].removeProperties(t),this.replaceWith(t)}function s(t){if(this.resync(),this.removed)throw new Error("You can't replace this node, we've already removed it");if(t instanceof g["default"]&&(t=t.node),!t)throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");if(this.node!==t){if(this.isProgram()&&!E.isProgram(t))throw new Error("You can only replace a Program root node with another Program node");if(Array.isArray(t))throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");if("string"==typeof t)throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");if(this.isNodeType("Statement")&&E.isExpression(t)&&!this.canHaveVariableDeclarationOrExpression()&&(t=E.expressionStatement(t)),this.isNodeType("Expression")&&E.isStatement(t))return this.replaceExpressionWithStatements([t]);var e=this.node;e&&(E.inheritsComments(t,e),E.removeComments(e)),this._replaceWith(t),this.type=t.type,this.setScope(),this.requeue()}}function a(t){if(!this.container)throw new ReferenceError("Container is falsy");this.inList?E.validate(this.parent,this.key,[t]):E.validate(this.parent,this.key,t),this.node=this.container[this.key]=t}function o(t){this.resync();var e=E.toSequenceExpression(t,this.scope);if(E.isSequenceExpression(e)){var n=e.expressions;n.length>=2&&this.parentPath.isExpressionStatement()&&this._maybePopFromStatements(n),1===n.length?this.replaceWith(n[0]):this.replaceWith(e)}else{if(!e){var r=E.functionExpression(null,[],E.blockStatement(t));r.shadow=!0,this.replaceWith(E.callExpression(r,[])),this.traverse(b);for(var i=this.get("callee").getCompletionRecords(),s=i,a=Array.isArray(s),o=0,s=a?s:l(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var p=u;if(p.isExpressionStatement()){var c=p.findParent(function(t){return t.isLoop()});if(c){var f=this.get("callee"),h=f.scope.generateDeclaredUidIdentifier("ret");f.get("body").pushContainer("body",E.returnStatement(h)),p.get("expression").replaceWith(E.assignmentExpression("=",h,p.node.expression))}else p.replaceWith(E.returnStatement(p.node.expression))}}return this.node}this.replaceWith(e)}}function u(t){return this.resync(),Array.isArray(t)?Array.isArray(this.container)?(t=this._verifyNodeList(t),this._containerInsertAfter(t),this.remove()):this.replaceWithMultiple(t):this.replaceWith(t)}var l=t(426)["default"],p=t(431)["default"],c=t(432)["default"];n.__esModule=!0,n.replaceWithMultiple=r,n.replaceWithSourceString=i,n.replaceWith=s,n._replaceWith=a,n.replaceExpressionWithStatements=o,n.replaceInline=u;var f=t(12),h=p(f),d=t(403),m=p(d),y=t(411),g=p(y),v=t(622),A=t(539),E=c(A),b={Function:function(t){t.skip()},VariableDeclaration:function(t){if("var"===t.node.kind){var e=t.getBindingIdentifiers();for(var n in e)t.scope.push({id:e[n]});for(var r=[],i=t.node.declarations,s=Array.isArray(i),a=0,i=s?i:l(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;u.init&&r.push(E.expressionStatement(E.assignmentExpression("=",u.id,u.init)))}t.replaceWithMultiple(r)}}}},{12:12,403:403,411:411,426:426,431:431,432:432,539:539,622:622}],422:[function(t,e,n){"use strict";var r=t(430)["default"];n.__esModule=!0;var i=function(){function t(e){var n=e.existing,i=e.identifier,s=e.scope,a=e.path,o=e.kind;r(this,t),this.identifier=i,this.scope=s,this.path=a,this.kind=o,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.clearValue(),n&&(this.constantViolations=[].concat(n.path,n.constantViolations,this.constantViolations))}return t.prototype.deoptValue=function(){this.clearValue(),this.hasDeoptedValue=!0},t.prototype.setValue=function(t){this.hasDeoptedValue||(this.hasValue=!0,this.value=t)},t.prototype.clearValue=function(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null},t.prototype.reassign=function(t){this.constant=!1,this.constantViolations.push(t)},t.prototype.reference=function(t){this.referenced=!0,this.references++,this.referencePaths.push(t)},t.prototype.dereference=function(){this.references--,this.referenced=!!this.references},t}();n["default"]=i,e.exports=n["default"]},{430:430}],423:[function(t,e,n){"use strict";var r=t(430)["default"],i=t(426)["default"],s=t(428)["default"],a=t(427)["default"],o=t(431)["default"],u=t(432)["default"];n.__esModule=!0;var l=t(480),p=o(l),c=t(526),f=o(c),h=t(424),d=o(h),m=t(403),y=o(m),g=t(520),v=o(g),A=t(265),E=u(A),b=t(422),x=o(b),D=t(478),C=(o(D),t(521)),F=o(C),S=t(539),w=u(S),B="_scopeInfo",T={For:function(t){for(var e=w.FOR_INIT_KEYS,n=Array.isArray(e),r=0,e=n?e:i(e);;){var s;if(n){if(r>=e.length)break;s=e[r++]}else{if(r=e.next(),r.done)break;s=r.value}var a=s,o=t.get(a);o.isVar()&&t.scope.getFunctionParent().registerBinding("var",o)}},Declaration:function(t){t.isBlockScoped()||t.isExportDeclaration()&&t.get("declaration").isDeclaration()||t.scope.getFunctionParent().registerDeclaration(t)},ReferencedIdentifier:function(t,e){e.references.push(t)},ForXStatement:function(t,e){var n=t.get("left");(n.isPattern()||n.isIdentifier())&&e.constantViolations.push(n)},ExportDeclaration:{exit:function(t){var e=t.node,n=t.scope,r=e.declaration;if(w.isClassDeclaration(r)||w.isFunctionDeclaration(r)){var s=r.id;if(!s)return;var a=n.getBinding(s.name);a&&a.reference()}else if(w.isVariableDeclaration(r))for(var o=r.declarations,u=Array.isArray(o),l=0,o=u?o:i(o);;){var p;if(u){if(l>=o.length)break;p=o[l++]}else{if(l=o.next(),l.done)break;p=l.value}var c=p,f=w.getBindingIdentifiers(c);for(var h in f){var a=n.getBinding(h);a&&a.reference()}}}},LabeledStatement:function(t){t.scope.getProgramParent().addGlobal(t.node),t.scope.getBlockParent().registerDeclaration(t)},AssignmentExpression:function(t,e){e.assignments.push(t)},UpdateExpression:function(t,e){e.constantViolations.push(t.get("argument"))},UnaryExpression:function(t,e){"delete"===t.node.operator&&e.constantViolations.push(t.get("argument"))},BlockScoped:function(t){var e=t.scope;e.path===t&&(e=e.parent),e.getBlockParent().registerDeclaration(t)},ClassDeclaration:function(t){var e=t.node.id;if(e){var n=e.name;t.scope.bindings[n]=t.scope.getBinding(n)}},Block:function(t){for(var e=t.get("body"),n=e,r=Array.isArray(n),s=0,n=r?n:i(n);;){var a;if(r){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;o.isFunctionDeclaration()&&t.scope.getBlockParent().registerDeclaration(o)}}},_=function(){function t(e,n){if(r(this,t),n&&n.block===e.node)return n;var i=e.getData("scope");return i&&i.parent===n&&i.block===e.node?i:(e.setData("scope",this),this.parent=n,this.hub=e.hub,this.parentBlock=e.parent,this.block=e.node,void(this.path=e))}return t.prototype.traverse=function(t,e,n){y["default"](t,e,this,n,this.path)},t.prototype.generateDeclaredUidIdentifier=function(){var t=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0],e=this.generateUidIdentifier(t);return this.push({id:e}),e},t.prototype.generateUidIdentifier=function(t){return w.identifier(this.generateUid(t))},t.prototype.generateUid=function(t){t=w.toIdentifier(t).replace(/^_+/,"").replace(/[0-9]+$/g,"");var e=void 0,n=0;do e=this._generateUid(t,n),n++;while(this.hasBinding(e)||this.hasGlobal(e)||this.hasReference(e));var r=this.getProgramParent();return r.references[e]=!0,r.uids[e]=!0,e},t.prototype._generateUid=function(t,e){var n=t;return e>1&&(n+=e),"_"+n},t.prototype.generateUidIdentifierBasedOnNode=function(t,e){var n=t;w.isAssignmentExpression(t)?n=t.left:w.isVariableDeclarator(t)?n=t.id:(w.isObjectProperty(n)||w.isObjectMethod(n))&&(n=n.key);var r=[],s=function o(t){if(w.isModuleDeclaration(t))if(t.source)o(t.source);else if(t.specifiers&&t.specifiers.length)for(var e=t.specifiers,n=Array.isArray(e),s=0,e=n?e:i(e);;){var a;if(n){if(s>=e.length)break;a=e[s++]}else{if(s=e.next(),s.done)break;a=s.value}var u=a;o(u)}else t.declaration&&o(t.declaration);else if(w.isModuleSpecifier(t))o(t.local);else if(w.isMemberExpression(t))o(t.object),o(t.property);else if(w.isIdentifier(t))r.push(t.name);else if(w.isLiteral(t))r.push(t.value);else if(w.isCallExpression(t))o(t.callee);else if(w.isObjectExpression(t)||w.isObjectPattern(t))for(var l=t.properties,p=Array.isArray(l),c=0,l=p?l:i(l);;){var f;if(p){if(c>=l.length)break;f=l[c++]}else{if(c=l.next(),c.done)break;f=c.value}var h=f;o(h.key||h.argument)}};s(n);var a=r.join("$");return a=a.replace(/^_/,"")||e||"ref",this.generateUidIdentifier(a.slice(0,20))},t.prototype.isStatic=function(t){if(w.isThisExpression(t)||w.isSuper(t))return!0;if(w.isIdentifier(t)){var e=this.getBinding(t.name);return e?e.constant:this.hasBinding(t.name)}return!1},t.prototype.maybeGenerateMemoised=function(t,e){if(this.isStatic(t))return null;var n=this.generateUidIdentifierBasedOnNode(t);return e||this.push({id:n}),n},t.prototype.checkBlockScopedCollisions=function(t,e,n,r){if("param"!==e&&("hoisted"!==e||"let"!==t.kind)){var i=!1;if(i||(i="let"===e||"let"===t.kind||"const"===t.kind||"module"===t.kind),i||(i="param"===t.kind&&("let"===e||"const"===e)),i)throw this.hub.file.buildCodeFrameError(r,E.get("scopeDuplicateDeclaration",n),TypeError)}},t.prototype.rename=function(t,e,n){var r=this.getBinding(t);return r?(e=e||this.generateUidIdentifier(t).name,new d["default"](r,t,e).rename(n)):void 0},t.prototype._renameFromMap=function(t,e,n,r){t[e]&&(t[n]=r,t[e]=null)},t.prototype.dump=function(){var t=f["default"]("-",60);console.log(t);var e=this;do{console.log("#",e.block.type);for(var n in e.bindings){var r=e.bindings[n];console.log(" -",n,{constant:r.constant,references:r.references,violations:r.constantViolations.length,kind:r.kind})}}while(e=e.parent);console.log(t)},t.prototype.toArray=function(t,e){var n=this.hub.file;if(w.isIdentifier(t)){var r=this.getBinding(t.name);if(r&&r.constant&&r.path.isGenericType("Array"))return t}if(w.isArrayExpression(t))return t;if(w.isIdentifier(t,{name:"arguments"}))return w.callExpression(w.memberExpression(w.memberExpression(w.memberExpression(w.identifier("Array"),w.identifier("prototype")),w.identifier("slice")),w.identifier("call")),[t]);var i="toArray",s=[t];return e===!0?i="toConsumableArray":e&&(s.push(w.numericLiteral(e)),i="slicedToArray"),w.callExpression(n.addHelper(i),s)},t.prototype.registerDeclaration=function(t){if(t.isLabeledStatement())this.registerBinding("label",t);else if(t.isFunctionDeclaration())this.registerBinding("hoisted",t.get("id"),t);else if(t.isVariableDeclaration())for(var e=t.get("declarations"),n=e,r=Array.isArray(n),s=0,n=r?n:i(n);;){var a;if(r){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;this.registerBinding(t.node.kind,o)}else if(t.isClassDeclaration())this.registerBinding("let",t);else if(t.isImportDeclaration())for(var u=t.get("specifiers"),l=u,p=Array.isArray(l),c=0,l=p?l:i(l);;){var f;if(p){if(c>=l.length)break;f=l[c++]}else{if(c=l.next(),c.done)break;f=c.value}var h=f;this.registerBinding("module",h)}else if(t.isExportDeclaration()){var o=t.get("declaration");(o.isClassDeclaration()||o.isFunctionDeclaration()||o.isVariableDeclaration())&&this.registerDeclaration(o)}else this.registerBinding("unknown",t)},t.prototype.buildUndefinedNode=function(){return this.hasBinding("undefined")?w.unaryExpression("void",w.numericLiteral(0),!0):w.identifier("undefined")},t.prototype.registerConstantViolation=function(t){var e=t.getBindingIdentifiers();for(var n in e){var r=this.getBinding(n);r&&r.reassign(t)}},t.prototype.registerBinding=function(t,e){var n=arguments.length<=2||void 0===arguments[2]?e:arguments[2];return function(){if(!t)throw new ReferenceError("no `kind`");if(e.isVariableDeclaration())for(var r=e.get("declarations"),s=r,a=Array.isArray(s),o=0,s=a?s:i(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;this.registerBinding(t,l)}else{var p=this.getProgramParent(),c=e.getBindingIdentifiers(!0);for(var f in c)for(var h=c[f],d=Array.isArray(h),m=0,h=d?h:i(h);;){var y;if(d){if(m>=h.length)break;y=h[m++]}else{if(m=h.next(),m.done)break;y=m.value}var g=y,v=this.getOwnBinding(f);if(v){if(v.identifier===g)continue;this.checkBlockScopedCollisions(v,t,f,g)}p.references[f]=!0,this.bindings[f]=new x["default"]({identifier:g,existing:v,scope:this,path:n,kind:t})}}}.apply(this,arguments)},t.prototype.addGlobal=function(t){this.globals[t.name]=t},t.prototype.hasUid=function(t){var e=this;do if(e.uids[t])return!0;while(e=e.parent);return!1},t.prototype.hasGlobal=function(t){var e=this;do if(e.globals[t])return!0;while(e=e.parent);return!1},t.prototype.hasReference=function(t){var e=this;do if(e.references[t])return!0;while(e=e.parent);return!1},t.prototype.isPure=function(t,e){if(w.isIdentifier(t)){var n=this.getBinding(t.name);return n?e?n.constant:!0:!1}if(w.isClass(t))return t.superClass&&!this.isPure(t.superClass,e)?!1:this.isPure(t.body,e);if(w.isClassBody(t)){for(var r=t.body,s=Array.isArray(r),a=0,r=s?r:i(r);;){var o;if(s){if(a>=r.length)break;o=r[a++]}else{if(a=r.next(),a.done)break;o=a.value}var u=o;if(!this.isPure(u,e))return!1}return!0}if(w.isBinary(t))return this.isPure(t.left,e)&&this.isPure(t.right,e);if(w.isArrayExpression(t)){for(var l=t.elements,p=Array.isArray(l),c=0,l=p?l:i(l);;){var f;if(p){if(c>=l.length)break;f=l[c++]}else{if(c=l.next(),c.done)break;f=c.value}var h=f;if(!this.isPure(h,e))return!1}return!0}if(w.isObjectExpression(t)){for(var d=t.properties,m=Array.isArray(d),y=0,d=m?d:i(d);;){var g;if(m){if(y>=d.length)break;g=d[y++]}else{if(y=d.next(),y.done)break;g=y.value}var v=g;if(!this.isPure(v,e))return!1}return!0}return w.isClassMethod(t)?t.computed&&!this.isPure(t.key,e)?!1:"get"===t.kind||"set"===t.kind?!1:!0:w.isClassProperty(t)?t.computed&&!this.isPure(t.key,e)?!1:this.isPure(t.value,e):w.isPureish(t)},t.prototype.setData=function(t,e){return this.data[t]=e},t.prototype.getData=function(t){var e=this;do{var n=e.data[t];if(null!=n)return n}while(e=e.parent)},t.prototype.removeData=function(t){var e=this;do{var n=e.data[t];null!=n&&(e.data[t]=null)}while(e=e.parent)},t.prototype.init=function(){this.references||this.crawl()},t.prototype.crawl=function(){var t=this.path,e=this.block[B];if(e)return F["default"](this,e);if(e=this.block[B]={references:s(null),bindings:s(null),globals:s(null),uids:s(null),data:s(null)},a(this,e),t.isLoop())for(var n=w.FOR_INIT_KEYS,r=Array.isArray(n),o=0,n=r?n:i(n);;){var u;if(r){if(o>=n.length)break;u=n[o++]}else{if(o=n.next(),o.done)break;u=o.value}var l=u,p=t.get(l);p.isBlockScoped()&&this.registerBinding(p.node.kind,p)}if(t.isFunctionExpression()&&t.has("id")&&this.registerBinding("local",t.get("id"),t),t.isClassExpression()&&t.has("id")&&this.registerBinding("local",t),t.isFunction())for(var c=t.get("params"),f=c,h=Array.isArray(f),d=0,f=h?f:i(f);;){var m;if(h){if(d>=f.length)break;m=f[d++]}else{if(d=f.next(),d.done)break;m=d.value}var y=m;this.registerBinding("param",y)}t.isCatchClause()&&this.registerBinding("let",t);var g=this.getProgramParent();if(!g.crawling){var v={references:[],constantViolations:[],assignments:[]};this.crawling=!0,t.traverse(T,v),this.crawling=!1;for(var A=v.assignments,E=Array.isArray(A),b=0,A=E?A:i(A);;){var x;if(E){if(b>=A.length)break;x=A[b++]}else{if(b=A.next(),b.done)break;x=b.value}var D=x,C=D.getBindingIdentifiers(),S=void 0;for(var _ in C)D.scope.getBinding(_)||(S=S||D.scope.getProgramParent(),S.addGlobal(C[_]));D.scope.registerConstantViolation(D)}for(var k=v.references,P=Array.isArray(k),N=0,k=P?k:i(k);;){var I;if(P){if(N>=k.length)break;I=k[N++]}else{if(N=k.next(),N.done)break;I=N.value}var L=I,O=L.scope.getBinding(L.node.name);O?O.reference(L):L.scope.getProgramParent().addGlobal(L.node)}for(var M=v.constantViolations,R=Array.isArray(M),j=0,M=R?M:i(M);;){var V;if(R){if(j>=M.length)break;V=M[j++]}else{if(j=M.next(),j.done)break;V=j.value}var U=V;U.scope.registerConstantViolation(U)}}},t.prototype.push=function(t){var e=this.path;e.isSwitchStatement()&&(e=this.getFunctionParent().path),(e.isLoop()||e.isCatchClause()||e.isFunction())&&(w.ensureBlock(e.node),e=e.get("body")),e.isBlockStatement()||e.isProgram()||(e=this.getBlockParent().path);var n=t.unique,r=t.kind||"var",i=null==t._blockHoist?2:t._blockHoist,s="declaration:"+r+":"+i,a=!n&&e.getData(s);if(!a){var o=w.variableDeclaration(r,[]);o._generated=!0,o._blockHoist=i;var u=e.unshiftContainer("body",[o]);a=u[0],n||e.setData(s,a)}var l=w.variableDeclarator(t.id,t.init);a.node.declarations.push(l),this.registerBinding(r,a.get("declarations").pop())},t.prototype.getProgramParent=function(){var t=this;do if(t.path.isProgram())return t;while(t=t.parent);throw new Error("We couldn't find a Function or Program...")},t.prototype.getFunctionParent=function(){var t=this;do if(t.path.isFunctionParent())return t;while(t=t.parent);throw new Error("We couldn't find a Function or Program...")},t.prototype.getBlockParent=function(){var t=this;do if(t.path.isBlockParent())return t;while(t=t.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")},t.prototype.getAllBindings=function(){var t=s(null),e=this;do v["default"](t,e.bindings),e=e.parent;while(e);return t},t.prototype.getAllBindingsOfKind=function(){for(var t=s(null),e=arguments,n=Array.isArray(e),r=0,e=n?e:i(e);;){var a;if(n){if(r>=e.length)break;a=e[r++]}else{if(r=e.next(),r.done)break;a=r.value}var o=a,u=this;do{for(var l in u.bindings){var p=u.bindings[l];p.kind===o&&(t[l]=p)}u=u.parent}while(u)}return t},t.prototype.bindingIdentifierEquals=function(t,e){return this.getBindingIdentifier(t)===e},t.prototype.getBinding=function(t){var e=this;do{var n=e.getOwnBinding(t);if(n)return n}while(e=e.parent)},t.prototype.getOwnBinding=function(t){return this.bindings[t]},t.prototype.getBindingIdentifier=function(t){var e=this.getBinding(t);return e&&e.identifier},t.prototype.getOwnBindingIdentifier=function(t){var e=this.bindings[t];return e&&e.identifier},t.prototype.hasOwnBinding=function(t){return!!this.getOwnBinding(t)},t.prototype.hasBinding=function(e,n){return e?this.hasOwnBinding(e)?!0:this.parentHasBinding(e,n)?!0:this.hasUid(e)?!0:!n&&p["default"](t.globals,e)?!0:!n&&p["default"](t.contextVariables,e)?!0:!1:!1},t.prototype.parentHasBinding=function(t,e){return this.parent&&this.parent.hasBinding(t,e)},t.prototype.moveBindingTo=function(t,e){var n=this.getBinding(t);n&&(n.scope.removeOwnBinding(t),n.scope=e,e.bindings[t]=n)},t.prototype.removeOwnBinding=function(t){delete this.bindings[t]},t.prototype.removeBinding=function(t){var e=this.getBinding(t);e&&e.scope.removeOwnBinding(t);var n=this;do n.uids[t]&&(n.uids[t]=!1);while(n=n.parent)},t}();n["default"]=_,e.exports=n["default"]},{265:265,403:403,422:422,424:424,426:426,427:427,428:428,430:430,431:431,432:432,478:478,480:480,520:520,521:521,526:526,539:539}],424:[function(t,e,n){"use strict";var r=t(430)["default"],i=t(431)["default"],s=t(432)["default"];n.__esModule=!0;var a=t(422),o=(i(a),t(539)),u=s(o),l={ReferencedIdentifier:function(t,e){var n=t.node;n.name===e.oldName&&(n.name=e.newName)},Scope:function(t,e){t.scope.bindingIdentifierEquals(e.oldName,e.binding.identifier)||t.skip()},"AssignmentExpression|Declaration":function(t,e){var n=t.getBindingIdentifiers();for(var r in n)r===e.oldName&&(n[r].name=e.newName)}},p=function(){function t(e,n,i){r(this,t),this.newName=i,this.oldName=n,this.binding=e}return t.prototype.maybeConvertFromExportDeclaration=function(t){var e=t.parentPath.isExportDeclaration()&&t.parentPath;if(e){var n=e.isExportDefaultDeclaration(),r=t.getOuterBindingIdentifiers(),i=[];for(var s in r){var a=s===this.oldName?this.newName:s,o=n?"default":s;i.push(u.exportSpecifier(u.identifier(a),u.identifier(o)))}var l=u.exportNamedDeclaration(null,i);t.isFunctionDeclaration()&&(l._blockHoist=3),e.insertAfter(l),e.replaceWith(t.node)}},t.prototype.maybeConvertFromClassFunctionDeclaration=function(t){},t.prototype.maybeConvertFromClassFunctionExpression=function(t){},t.prototype.rename=function(t){var e=this.binding,n=this.oldName,r=this.newName,i=e.scope,s=e.path,a=s.find(function(t){return t.isDeclaration()||t.isFunctionExpression()});a&&this.maybeConvertFromExportDeclaration(a),i.traverse(t||i.block,l,this),t||(i.removeOwnBinding(n),i.bindings[r]=e,this.binding.identifier.name=r),"hoisted"===e.type,a&&(this.maybeConvertFromClassFunctionDeclaration(a),this.maybeConvertFromClassFunctionExpression(a))},t}();n["default"]=p,e.exports=n["default"]},{422:422,430:430,431:431,432:432,539:539}],425:[function(t,e,n){"use strict";function r(t){if(t._exploded)return t;t._exploded=!0;for(var e in t)if(!p(e)){
var n=e.split("|");if(1!==n.length){var r=t[e];delete t[e];for(var s=n,a=Array.isArray(s),d=0,s=a?s:f(s);;){var m;if(a){if(d>=s.length)break;m=s[d++]}else{if(d=s.next(),d.done)break;m=d.value}var y=m;t[y]=r}}}i(t),delete t.__esModule,o(t),u(t);for(var v=h(t),A=Array.isArray(v),E=0,v=A?v:f(v);;){var x;if(A){if(E>=v.length)break;x=v[E++]}else{if(E=v.next(),E.done)break;x=E.value}var e=x;if(!p(e)){var C=g[e];if(C){var r=t[e];for(var F in r)r[F]=l(C,r[F]);if(delete t[e],C.types)for(var S=C.types,w=Array.isArray(S),B=0,S=w?S:f(S);;){var T;if(w){if(B>=S.length)break;T=S[B++]}else{if(B=S.next(),B.done)break;T=B.value}var F=T;t[F]?c(t[F],r):t[F]=r}else c(t,r)}}}for(var e in t)if(!p(e)){var r=t[e],_=b.FLIPPED_ALIAS_KEYS[e],k=b.DEPRECATED_KEYS[e];if(k&&(console.trace("Visitor defined for "+e+" but it has been renamed to "+k),_=[k]),_){delete t[e];for(var P=_,N=Array.isArray(P),I=0,P=N?P:f(P);;){var L;if(N){if(I>=P.length)break;L=P[I++]}else{if(I=P.next(),I.done)break;L=I.value}var O=L,M=t[O];M?c(M,r):t[O]=D["default"](r)}}}for(var e in t)p(e)||u(t[e]);return t}function i(t){if(!t._verified){if("function"==typeof t)throw new Error(A.get("traverseVerifyRootFunction"));for(var e in t)if(!p(e)){if(b.TYPES.indexOf(e)<0)throw new Error(A.get("traverseVerifyNodeType",e));var n=t[e];if("object"==typeof n)for(var r in n){if("enter"!==r&&"exit"!==r)throw new Error(A.get("traverseVerifyVisitorProperty",e,r));for(var i=n[r],s=[].concat(i),a=s,o=Array.isArray(a),u=0,a=o?a:f(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;if("function"!=typeof c)throw new TypeError("Non-function found defined in "+e+"."+r+" with type "+typeof c)}}}t._verified=!0}}function s(t){for(var e=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],n={},i=0;i<t.length;i++){var s=t[i],o=e[i];r(s);for(var u in s){var l=s[u];o&&(l=a(l,o));var p=n[u]=n[u]||{};c(p,l)}}return n}function a(t,e){var n={};for(var r in t){var i=t[r];Array.isArray(i)&&(i=i.map(function(t){return function(n){return t.call(e,n,e)}}),n[r]=i)}return n}function o(t){for(var e in t)if(!p(e)){var n=t[e];"function"==typeof n&&(t[e]={enter:n})}}function u(t){t.enter&&!Array.isArray(t.enter)&&(t.enter=[t.enter]),t.exit&&!Array.isArray(t.exit)&&(t.exit=[t.exit])}function l(t,e){var n=function(n){return t.checkPath(n)?e.apply(this,arguments):void 0};return n.toString=function(){return e.toString()},n}function p(t){return"_"===t[0]?!0:"enter"===t||"exit"===t||"shouldSkip"===t?!0:"blacklist"===t||"noScope"===t||"skipKeys"===t?!0:!1}function c(t,e){for(var n in e)t[n]=[].concat(t[n]||[],e[n])}var f=t(426)["default"],h=t(429)["default"],d=t(432)["default"],m=t(431)["default"];n.__esModule=!0,n.explode=r,n.verify=i,n.merge=s;var y=t(418),g=d(y),v=t(265),A=d(v),E=t(539),b=d(E),x=t(512),D=m(x)},{265:265,418:418,426:426,429:429,431:431,432:432,512:512,539:539}],426:[function(t,e,n){arguments[4][266][0].apply(n,arguments)},{266:266,434:434}],427:[function(t,e,n){arguments[4][269][0].apply(n,arguments)},{269:269,435:435}],428:[function(t,e,n){arguments[4][270][0].apply(n,arguments)},{270:270,436:436}],429:[function(t,e,n){arguments[4][271][0].apply(n,arguments)},{271:271,437:437}],430:[function(t,e,n){arguments[4][273][0].apply(n,arguments)},{273:273}],431:[function(t,e,n){arguments[4][277][0].apply(n,arguments)},{277:277}],432:[function(t,e,n){arguments[4][278][0].apply(n,arguments)},{278:278}],433:[function(t,e,n){arguments[4][279][0].apply(n,arguments)},{279:279}],434:[function(t,e,n){arguments[4][287][0].apply(n,arguments)},{287:287,471:471,475:475,476:476}],435:[function(t,e,n){arguments[4][290][0].apply(n,arguments)},{290:290,442:442,473:473}],436:[function(t,e,n){arguments[4][291][0].apply(n,arguments)},{291:291,455:455}],437:[function(t,e,n){arguments[4][295][0].apply(n,arguments)},{295:295,442:442,474:474}],438:[function(t,e,n){arguments[4][299][0].apply(n,arguments)},{299:299,450:450}],439:[function(t,e,n){arguments[4][300][0].apply(n,arguments)},{300:300,445:445,449:449,455:455,466:466}],440:[function(t,e,n){arguments[4][301][0].apply(n,arguments)},{301:301,441:441,469:469}],441:[function(t,e,n){arguments[4][302][0].apply(n,arguments)},{302:302}],442:[function(t,e,n){arguments[4][306][0].apply(n,arguments)},{306:306}],443:[function(t,e,n){arguments[4][308][0].apply(n,arguments)},{308:308,442:442,446:446}],444:[function(t,e,n){arguments[4][309][0].apply(n,arguments)},{309:309}],445:[function(t,e,n){arguments[4][311][0].apply(n,arguments)},{311:311}],446:[function(t,e,n){arguments[4][314][0].apply(n,arguments)},{314:314}],447:[function(t,e,n){arguments[4][315][0].apply(n,arguments)},{315:315}],448:[function(t,e,n){arguments[4][316][0].apply(n,arguments)},{316:316,455:455,458:458,462:462}],449:[function(t,e,n){arguments[4][317][0].apply(n,arguments)},{317:317,441:441}],450:[function(t,e,n){arguments[4][320][0].apply(n,arguments)},{320:320}],451:[function(t,e,n){arguments[4][322][0].apply(n,arguments)},{322:322,448:448,455:455,458:458,463:463,469:469}],452:[function(t,e,n){arguments[4][323][0].apply(n,arguments)},{323:323,443:443,447:447,448:448,451:451,454:454,455:455,456:456,459:459,463:463,469:469}],453:[function(t,e,n){arguments[4][324][0].apply(n,arguments)},{324:324}],454:[function(t,e,n){arguments[4][325][0].apply(n,arguments)},{325:325}],455:[function(t,e,n){arguments[4][326][0].apply(n,arguments)},{326:326}],456:[function(t,e,n){arguments[4][328][0].apply(n,arguments)},{328:328}],457:[function(t,e,n){arguments[4][330][0].apply(n,arguments)},{330:330,442:442,443:443,445:445}],458:[function(t,e,n){arguments[4][331][0].apply(n,arguments)},{331:331}],459:[function(t,e,n){arguments[4][332][0].apply(n,arguments)},{332:332,448:448}],460:[function(t,e,n){arguments[4][334][0].apply(n,arguments)},{334:334,446:446}],461:[function(t,e,n){arguments[4][337][0].apply(n,arguments)},{337:337,444:444,464:464}],462:[function(t,e,n){arguments[4][338][0].apply(n,arguments)},{338:338,445:445}],463:[function(t,e,n){arguments[4][339][0].apply(n,arguments)},{339:339,447:447,455:455,469:469}],464:[function(t,e,n){arguments[4][340][0].apply(n,arguments)},{340:340}],465:[function(t,e,n){arguments[4][341][0].apply(n,arguments)},{341:341,444:444,449:449}],466:[function(t,e,n){arguments[4][343][0].apply(n,arguments)},{343:343,444:444}],467:[function(t,e,n){arguments[4][344][0].apply(n,arguments)},{344:344}],468:[function(t,e,n){arguments[4][345][0].apply(n,arguments)},{345:345}],469:[function(t,e,n){arguments[4][346][0].apply(n,arguments)},{346:346,446:446,460:460,467:467}],470:[function(t,e,n){arguments[4][347][0].apply(n,arguments)},{347:347,440:440,442:442,454:454,469:469}],471:[function(t,e,n){arguments[4][348][0].apply(n,arguments)},{348:348,438:438,442:442,470:470}],472:[function(t,e,n){arguments[4][349][0].apply(n,arguments)},{349:349,452:452,453:453,454:454,465:465,468:468}],473:[function(t,e,n){arguments[4][352][0].apply(n,arguments)},{352:352,439:439,443:443}],474:[function(t,e,n){arguments[4][355][0].apply(n,arguments)},{355:355,457:457,466:466}],475:[function(t,e,n){arguments[4][358][0].apply(n,arguments)},{358:358,452:452,461:461}],476:[function(t,e,n){arguments[4][361][0].apply(n,arguments)},{361:361,454:454,472:472}],477:[function(t,e,n){e.exports={builtin:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},browser:{addEventListener:!1,alert:!1,AnalyserNode:!1,AnimationEvent:!1,applicationCache:!1,ApplicationCache:!1,ApplicationCacheErrorEvent:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioDestinationNode:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioProcessingEvent:!1,AutocompleteErrorEvent:!1,BarProp:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,blur:!1,btoa:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CDATASection:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,ClientRect:!1,ClientRectList:!1,ClipboardEvent:!1,close:!1,closed:!1,CloseEvent:!1,Comment:!1,CompositionEvent:!1,confirm:!1,console:!1,ConvolverNode:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSFontFaceRule:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSMediaRule:!1,CSSPageRule:!1,CSSRule:!1,CSSRuleList:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSSupportsRule:!1,CSSUnknownRule:!1,CSSViewportRule:!1,CustomEvent:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,Debug:!1,defaultStatus:!1,defaultstatus:!1,DelayNode:!1,DeviceMotionEvent:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMParser:!1,DOMSettableTokenList:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,Element:!1,ElementTimeControl:!1,ErrorEvent:!1,event:!1,Event:!1,EventSource:!1,EventTarget:!1,external:!1,fetch:!1,File:!1,FileError:!1,FileList:!1,FileReader:!1,find:!1,focus:!1,FocusEvent:!1,FontFace:!1,FormData:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadButton:!1,GamepadEvent:!1,getComputedStyle:!1,getSelection:!1,HashChangeEvent:!1,Headers:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAppletElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLContentElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLKeygenElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLShadowElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBEnvironment:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,Image:!1,ImageBitmap:!1,ImageData:!1,indexedDB:!1,innerHeight:!1,innerWidth:!1,InputEvent:!1,InputMethodContext:!1,Intl:!1,KeyboardEvent:!1,length:!1,localStorage:!1,location:!1,Location:!1,locationbar:!1,matchMedia:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyError:!1,MediaKeyEvent:!1,MediaKeyMessageEvent:!1,MediaKeys:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaSource:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,navigator:!1,Navigator:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,opera:!1,Option:!1,OscillatorNode:!1,outerHeight:!1,outerWidth:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,parent:!1,Path2D:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,personalbar:!1,Plugin:!1,PluginArray:!1,PopStateEvent:!1,postMessage:!1,print:!1,ProcessingInstruction:!1,ProgressEvent:!1,prompt:!1,PushManager:!1,PushSubscription:!1,RadioNodeList:!1,Range:!1,ReadableByteStream:!1,ReadableStream:!1,removeEventListener:!1,Request:!1,requestAnimationFrame:!1,resizeBy:!1,resizeTo:!1,Response:!1,RTCIceCandidate:!1,RTCSessionDescription:!1,screen:!1,Screen:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,SharedWorker:!1,showModalDialog:!1,speechSynthesis:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,status:!1,statusbar:!1,stop:!1,Storage:!1,StorageEvent:!1,styleMedia:!1,StyleSheet:!1,StyleSheetList:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCSSRule:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDiscardElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGEvent:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGLocatable:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformable:!1,SVGTransformList:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGURIReference:!1,SVGUseElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGVKernElement:!1,SVGZoomAndPan:!1,SVGZoomEvent:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TextEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TimeEvent:!1,TimeRanges:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransitionEvent:!1,TreeWalker:!1,UIEvent:!1,URL:!1,ValidityState:!1,VTTCue:!1,WaveShaperNode:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,WheelEvent:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestProgressEvent:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1,XSLTProcessor:!1},worker:{applicationCache:!1,atob:!1,BroadcastChannel:!1,btoa:!1,Cache:!1,caches:!1,clearInterval:!1,clearTimeout:!1,close:!0,console:!1,fetch:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!0,indexedDB:!1,location:!1,MessageChannel:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onlanguagechange:!0,onmessage:!0,onoffline:!0,ononline:!0,onrejectionhandled:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,Promise:!1,Request:!1,Response:!1,self:!0,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,WebSocket:!1,Worker:!1,XMLHttpRequest:!1},node:{__dirname:!1,__filename:!1,arguments:!1,Buffer:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,console:!1,exports:!0,GLOBAL:!1,global:!1,module:!1,process:!1,require:!1,root:!1,setImmediate:!1,setInterval:!1,setTimeout:!1},commonjs:{exports:!0,module:!1,require:!1},amd:{define:!1,require:!1},mocha:{after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},jasmine:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},jest:{afterEach:!1,beforeEach:!1,describe:!1,expect:!1,it:!1,jest:!1,pit:!1,require:!1,xdescribe:!1,xit:!1},qunit:{asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,"throws":!1},phantomjs:{console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},couch:{emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},rhino:{defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},nashorn:{__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,Java:!1,java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},wsh:{ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WScript:!0,WSH:!0,XDomainRequest:!0},jquery:{$:!1,jQuery:!1},yui:{Y:!1,YUI:!1,YUI_config:!1},shelljs:{cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,ls:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,target:!1,tempdir:!1,test:!1,which:!1},prototypejs:{$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},meteor:{$:!1,_:!1,Accounts:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPServer:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},mongo:{_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,ObjectId:!1,PlanCache:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},applescript:{$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},serviceworker:{caches:!1,Cache:!1,CacheStorage:!1,Client:!1,clients:!1,Clients:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,FetchEvent:!1,importScripts:!1,registration:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,skipWaiting:!1,WindowClient:!1},embertest:{andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentUrl:!1,fillIn:!1,find:!1,keyEvent:!1,triggerEvent:!1,visit:!1},protractor:{$:!1,$$:!1,browser:!1,By:!1,by:!1,DartObject:!1,element:!1,protractor:!1},"shared-node-browser":{clearInterval:!1,clearTimeout:!1,console:!1,setInterval:!1,setTimeout:!1},webextensions:{browser:!1,chrome:!1,opr:!1}}},{}],478:[function(t,e,n){e.exports=t(477)},{477:477}],479:[function(t,e,n){"use strict";var r=function(t,e,n,r,i,s,a,o){if(void 0===e)throw new Error("invariant requires an error message argument");if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,s,a,o],p=0;u=new Error("Invariant Violation: "+e.replace(/%s/g,function(){return l[p++]}))}throw u.framesToPop=1,u}};e.exports=r},{}],480:[function(t,e,n){arguments[4][60][0].apply(n,arguments)},{491:491,499:499,507:507,508:508,514:514,518:518,524:524,60:60}],481:[function(t,e,n){arguments[4][62][0].apply(n,arguments)},{62:62}],482:[function(t,e,n){arguments[4][63][0].apply(n,arguments)},{63:63}],483:[function(t,e,n){arguments[4][64][0].apply(n,arguments)},{64:64}],484:[function(t,e,n){arguments[4][66][0].apply(n,arguments)},{66:66}],485:[function(t,e,n){arguments[4][67][0].apply(n,arguments)},{522:522,67:67}],486:[function(t,e,n){arguments[4][68][0].apply(n,arguments)},{488:488,522:522,68:68}],487:[function(t,e,n){arguments[4][70][0].apply(n,arguments)},{482:482,483:483,486:486,490:490,502:502,503:503,504:504,514:514,517:517,70:70}],488:[function(t,e,n){arguments[4][72][0].apply(n,arguments)},{72:72}],489:[function(t,e,n){arguments[4][74][0].apply(n,arguments)},{497:497,74:74}],490:[function(t,e,n){arguments[4][76][0].apply(n,arguments)},{489:489,522:522,76:76}],491:[function(t,e,n){arguments[4][78][0].apply(n,arguments)},{501:501,78:78}],492:[function(t,e,n){arguments[4][87][0].apply(n,arguments)},{87:87}],493:[function(t,e,n){arguments[4][92][0].apply(n,arguments)},{92:92}],494:[function(t,e,n){arguments[4][93][0].apply(n,arguments)},{525:525,93:93}],495:[function(t,e,n){arguments[4][94][0].apply(n,arguments)},{94:94}],496:[function(t,e,n){arguments[4][96][0].apply(n,arguments)},{481:481,494:494,507:507,96:96}],497:[function(t,e,n){arguments[4][98][0].apply(n,arguments)},{511:511,98:98}],498:[function(t,e,n){arguments[4][99][0].apply(n,arguments)},{481:481,99:99}],499:[function(t,e,n){arguments[4][105][0].apply(n,arguments)},{105:105,492:492}],500:[function(t,e,n){arguments[4][107][0].apply(n,arguments)},{107:107,516:516}],501:[function(t,e,n){arguments[4][108][0].apply(n,arguments)},{108:108}],502:[function(t,e,n){arguments[4][109][0].apply(n,arguments)},{109:109}],503:[function(t,e,n){arguments[4][110][0].apply(n,arguments)},{110:110,495:495}],504:[function(t,e,n){arguments[4][111][0].apply(n,arguments)},{111:111}],505:[function(t,e,n){arguments[4][112][0].apply(n,arguments)},{112:112,499:499,508:508}],506:[function(t,e,n){arguments[4][113][0].apply(n,arguments)},{113:113}],507:[function(t,e,n){arguments[4][114][0].apply(n,arguments)},{114:114,505:505,506:506,517:517}],508:[function(t,e,n){arguments[4][116][0].apply(n,arguments)},{116:116}],509:[function(t,e,n){arguments[4][117][0].apply(n,arguments)},{117:117}],510:[function(t,e,n){arguments[4][119][0].apply(n,arguments)},{119:119,506:506,508:508,513:513,514:514,523:523}],511:[function(t,e,n){arguments[4][120][0].apply(n,arguments)},{120:120,517:517}],512:[function(t,e,n){arguments[4][122][0].apply(n,arguments)},{122:122,487:487,494:494,507:507}],513:[function(t,e,n){arguments[4][124][0].apply(n,arguments)},{124:124,505:505,509:509}],514:[function(t,e,n){arguments[4][125][0].apply(n,arguments)},{125:125,500:500,508:508,509:509}],515:[function(t,e,n){arguments[4][127][0].apply(n,arguments)},{127:127,517:517}],516:[function(t,e,n){arguments[4][128][0].apply(n,arguments)},{128:128,509:509,515:515}],517:[function(t,e,n){arguments[4][129][0].apply(n,arguments)},{129:129}],518:[function(t,e,n){arguments[4][132][0].apply(n,arguments)},{132:132,509:509}],519:[function(t,e,n){arguments[4][135][0].apply(n,arguments)},{135:135,485:485,486:486,496:496}],520:[function(t,e,n){arguments[4][136][0].apply(n,arguments)},{136:136,484:484,498:498,519:519}],521:[function(t,e,n){e.exports=t(519)},{519:519}],522:[function(t,e,n){arguments[4][137][0].apply(n,arguments)},{137:137,500:500,505:505,510:510,517:517}],523:[function(t,e,n){arguments[4][138][0].apply(n,arguments)},{138:138,506:506,508:508,513:513,514:514,517:517}],524:[function(t,e,n){arguments[4][141][0].apply(n,arguments)},{141:141,493:493,522:522}],525:[function(t,e,n){arguments[4][144][0].apply(n,arguments)},{144:144}],526:[function(t,e,n){arguments[4][28][0].apply(n,arguments)},{28:28,527:527}],527:[function(t,e,n){arguments[4][29][0].apply(n,arguments)},{29:29,528:528}],528:[function(t,e,n){arguments[4][30][0].apply(n,arguments)},{30:30}],529:[function(t,e,n){"use strict";function r(t){var e=arguments.length<=1||void 0===arguments[1]?t.key||t.property:arguments[1];return function(){return t.computed||w.isIdentifier(e)&&(e=w.stringLiteral(e.name)),e}()}function i(t,e){function n(t){for(var s=!1,a=[],o=t,u=Array.isArray(o),l=0,o=u?o:f(o);;){var p;if(u){if(l>=o.length)break;p=o[l++]}else{if(l=o.next(),l.done)break;p=l.value}var c=p;if(w.isExpression(c))a.push(c);else if(w.isExpressionStatement(c))a.push(c.expression);else{if(w.isVariableDeclaration(c)){if("var"!==c.kind)return i=!0;for(var h=c.declarations,d=Array.isArray(h),m=0,h=d?h:f(h);;){var y;if(d){if(m>=h.length)break;y=h[m++]}else{if(m=h.next(),m.done)break;y=m.value}var g=y,v=w.getBindingIdentifiers(g);for(var A in v)r.push({kind:c.kind,id:v[A]});g.init&&a.push(w.assignmentExpression("=",g.id,g.init))}s=!0;continue}if(w.isIfStatement(c)){var E=c.consequent?n([c.consequent]):e.buildUndefinedNode(),b=c.alternate?n([c.alternate]):e.buildUndefinedNode();if(!E||!b)return i=!0;a.push(w.conditionalExpression(c.test,E,b))}else{if(!w.isBlockStatement(c)){if(w.isEmptyStatement(c)){s=!0;continue}return i=!0}a.push(n(c.body))}}s=!1}return(s||0===a.length)&&a.push(e.buildUndefinedNode()),1===a.length?a[0]:w.sequenceExpression(a)}if(t&&t.length){var r=[],i=!1,s=n(t);if(!i){for(var a=0;a<r.length;a++)e.push(r[a]);return s}}}function s(t){var e=arguments.length<=1||void 0===arguments[1]?t.key:arguments[1];return function(){var n=void 0;return"method"===t.kind?s.increment()+"":(n=w.isIdentifier(e)?e.name:w.isStringLiteral(e)?JSON.stringify(e.value):JSON.stringify(F["default"].removeProperties(w.cloneDeep(e))),t.computed&&(n="["+n+"]"),t["static"]&&(n="static:"+n),n)}()}function a(t){return t+="",t=t.replace(/[^a-zA-Z0-9$_]/g,"-"),t=t.replace(/^[-0-9]+/,""),t=t.replace(/[-\s]+(.)?/g,function(t,e){return e?e.toUpperCase():""}),w.isValidIdentifier(t)||(t="_"+t),t||"_"}function o(t){return t=a(t),("eval"===t||"arguments"===t)&&(t="_"+t),t}function u(t,e){if(w.isStatement(t))return t;var n=!1,r=void 0;if(w.isClass(t))n=!0,r="ClassDeclaration";else if(w.isFunction(t))n=!0,r="FunctionDeclaration";else if(w.isAssignmentExpression(t))return w.expressionStatement(t);if(n&&!t.id&&(r=!1),!r){if(e)return!1;throw new Error("cannot turn "+t.type+" to a statement")}return t.type=r,t}function l(t){if(w.isExpressionStatement(t)&&(t=t.expression),w.isClass(t)?t.type="ClassExpression":w.isFunction(t)&&(t.type="FunctionExpression"),w.isExpression(t))return t;throw new Error("cannot turn "+t.type+" to an expression")}function p(t,e){return w.isBlockStatement(t)?t:(w.isEmptyStatement(t)&&(t=[]),Array.isArray(t)||(w.isStatement(t)||(t=w.isFunction(e)?w.returnStatement(t):w.expressionStatement(t)),t=[t]),w.blockStatement(t))}function c(t){if(void 0===t)return w.identifier("undefined");if(t===!0||t===!1)return w.booleanLiteral(t);if(null===t)return w.nullLiteral();if(D["default"](t))return w.stringLiteral(t);if(A["default"](t))return w.numericLiteral(t);if(b["default"](t)){var e=t.source,n=t.toString().match(/\/([a-z]+|)$/)[1];return w.regExpLiteral(e,n)}if(Array.isArray(t))return w.arrayExpression(t.map(w.valueToNode));if(g["default"](t)){var r=[];for(var i in t){var s=void 0;s=w.isValidIdentifier(i)?w.identifier(i):w.literal(i),r.push(w.objectProperty(s,w.valueToNode(t[i])))}return w.objectExpression(r)}throw new Error("don't know how to turn this value into a node")}var f=t(266)["default"],h=t(268)["default"],d=t(277)["default"],m=t(278)["default"];n.__esModule=!0,n.toComputedKey=r,n.toSequenceExpression=i,
n.toKeyAlias=s,n.toIdentifier=a,n.toBindingIdentifierName=o,n.toStatement=u,n.toExpression=l,n.toBlock=p,n.valueToNode=c;var y=t(612),g=d(y),v=t(610),A=d(v),E=t(613),b=d(E),x=t(614),D=d(x),C=t(403),F=d(C),S=t(539),w=m(S);s.uid=0,s.increment=function(){return s.uid>=h?s.uid=0:s.uid++}},{266:266,268:268,277:277,278:278,403:403,539:539,610:610,612:612,613:613,614:614}],530:[function(t,e,n){"use strict";var r=t(278)["default"],i=t(277)["default"],s=t(539),a=r(s),o=t(534),u=i(o);u["default"]("ArrayExpression",{fields:{elements:{validate:o.assertValueType("array")}},visitor:["elements"],aliases:["Expression"]}),u["default"]("AssignmentExpression",{fields:{operator:{validate:o.assertValueType("string")},left:{validate:o.assertNodeType("LVal")},right:{validate:o.assertNodeType("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]}),u["default"]("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:o.assertValueType("string")},left:{validate:o.assertNodeType("Expression")},right:{validate:o.assertNodeType("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]}),u["default"]("Directive",{visitor:["value"],fields:{value:{validate:o.assertNodeType("DirectiveLiteral")}}}),u["default"]("DirectiveLiteral",{builder:["value"],fields:{value:{validate:o.assertValueType("string")}}}),u["default"]("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:o.chain(o.assertValueType("array"),o.assertEach(o.assertNodeType("Directive"))),"default":[]},body:{validate:o.chain(o.assertValueType("array"),o.assertEach(o.assertNodeType("Statement")))}},aliases:["Scopable","BlockParent","Block","Statement"]}),u["default"]("BreakStatement",{visitor:["label"],fields:{label:{validate:o.assertNodeType("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),u["default"]("CallExpression",{visitor:["callee","arguments"],fields:{callee:{validate:o.assertNodeType("Expression")},arguments:{validate:o.assertValueType("array")}},aliases:["Expression"]}),u["default"]("CatchClause",{visitor:["param","body"],fields:{param:{validate:o.assertNodeType("Identifier")},body:{validate:o.assertNodeType("BlockStatement")}},aliases:["Scopable"]}),u["default"]("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:o.assertNodeType("Expression")},consequent:{validate:o.assertNodeType("Expression")},alternate:{validate:o.assertNodeType("Expression")}},aliases:["Expression","Conditional"]}),u["default"]("ContinueStatement",{visitor:["label"],fields:{label:{validate:o.assertNodeType("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),u["default"]("DebuggerStatement",{aliases:["Statement"]}),u["default"]("DoWhileStatement",{visitor:["test","body"],fields:{test:{validate:o.assertNodeType("Expression")},body:{validate:o.assertNodeType("BlockStatement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]}),u["default"]("EmptyStatement",{aliases:["Statement"]}),u["default"]("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:o.assertNodeType("Expression")}},aliases:["Statement","ExpressionWrapper"]}),u["default"]("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:o.assertNodeType("Program")}}}),u["default"]("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:o.assertNodeType("VariableDeclaration","LVal")},right:{validate:o.assertNodeType("Expression")},body:{validate:o.assertNodeType("Statement")}}}),u["default"]("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:o.assertNodeType("VariableDeclaration","Expression"),optional:!0},test:{validate:o.assertNodeType("Expression"),optional:!0},update:{validate:o.assertNodeType("Expression"),optional:!0},body:{validate:o.assertNodeType("Statement")}}}),u["default"]("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","params","body","returnType","typeParameters"],fields:{id:{validate:o.assertNodeType("Identifier")},params:{validate:o.chain(o.assertValueType("array"),o.assertEach(o.assertNodeType("LVal")))},body:{validate:o.assertNodeType("BlockStatement")},generator:{"default":!1,validate:o.assertValueType("boolean")},async:{"default":!1,validate:o.assertValueType("boolean")}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"]}),u["default"]("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{id:{validate:o.assertNodeType("Identifier"),optional:!0},params:{validate:o.chain(o.assertValueType("array"),o.assertEach(o.assertNodeType("LVal")))},body:{validate:o.assertNodeType("BlockStatement")},generator:{"default":!1,validate:o.assertValueType("boolean")},async:{"default":!1,validate:o.assertValueType("boolean")}}}),u["default"]("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression","LVal"],fields:{name:{validate:function(t,e,n){!a.isValidIdentifier(n)}}}}),u["default"]("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:o.assertNodeType("Expression")},consequent:{optional:!0,validate:o.assertNodeType("Statement")},alternate:{optional:!0,validate:o.assertNodeType("Statement")}}}),u["default"]("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:o.assertNodeType("Identifier")},body:{validate:o.assertNodeType("Statement")}}}),u["default"]("StringLiteral",{builder:["value"],fields:{value:{validate:o.assertValueType("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),u["default"]("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:o.assertValueType("number")}},aliases:["Expression","Pureish","Literal","Immutable"]}),u["default"]("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),u["default"]("BooleanLiteral",{builder:["value"],fields:{value:{validate:o.assertValueType("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),u["default"]("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Literal"],fields:{pattern:{validate:o.assertValueType("string")},flags:{validate:o.assertValueType("string"),"default":""}}}),u["default"]("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{},left:{validate:o.assertNodeType("Expression")},right:{validate:o.assertNodeType("Expression")}}}),u["default"]("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal"],fields:{object:{validate:o.assertNodeType("Expression")},property:{validate:function(t,e,n){var r=t.computed?"Expression":"Identifier";o.assertNodeType(r)(t,e,n)}},computed:{"default":!1}}}),u["default"]("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:o.assertNodeType("Expression")},arguments:{validate:o.chain(o.assertValueType("array"),o.assertEach(o.assertNodeType("Expression")))}}}),u["default"]("Program",{visitor:["directives","body"],builder:["body","directives"],fields:{directives:{validate:o.chain(o.assertValueType("array"),o.assertEach(o.assertNodeType("Directive"))),"default":[]},body:{validate:o.chain(o.assertValueType("array"),o.assertEach(o.assertNodeType("Statement")))}},aliases:["Scopable","BlockParent","Block","FunctionParent"]}),u["default"]("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:o.chain(o.assertValueType("array"),o.assertEach(o.assertNodeType("ObjectMethod","ObjectProperty","SpreadProperty")))}}}),u["default"]("ObjectMethod",{builder:["kind","key","params","body","computed"],fields:{kind:{validate:o.chain(o.assertValueType("string"),o.assertOneOf("method","get","set")),"default":"method"},computed:{validate:o.assertValueType("boolean"),"default":!1},key:{validate:function(t,e,n){var r=t.computed?["Expression"]:["Identifier","Literal"];o.assertNodeType.apply(void 0,r)(t,e,n)}},decorators:{validate:o.chain(o.assertValueType("array"),o.assertEach(o.assertNodeType("Decorator")))},body:{validate:o.assertNodeType("BlockStatement")},generator:{"default":!1,validate:o.assertValueType("boolean")},async:{"default":!1,validate:o.assertValueType("boolean")}},visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method"]}),u["default"]("ObjectProperty",{builder:["key","value","computed","shorthand","decorators"],fields:{computed:{validate:o.assertValueType("boolean"),"default":!1},key:{validate:function(t,e,n){var r=t.computed?["Expression"]:["Identifier","Literal"];o.assertNodeType.apply(void 0,r)(t,e,n)}},value:{validate:o.assertNodeType("Expression")},shorthand:{validate:o.assertValueType("boolean"),"default":!1},decorators:{validate:o.chain(o.assertValueType("array"),o.assertEach(o.assertNodeType("Decorator"))),optional:!0}},visitor:["key","value","decorators"],aliases:["UserWhitespacable","Property"]}),u["default"]("RestElement",{visitor:["argument","typeAnnotation"],aliases:["LVal"],fields:{argument:{validate:o.assertNodeType("LVal")}}}),u["default"]("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:o.assertNodeType("Expression"),optional:!0}}}),u["default"]("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:o.assertValueType("array")}},aliases:["Expression"]}),u["default"]("SwitchCase",{visitor:["test","consequent"],fields:{}}),u["default"]("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{}}),u["default"]("ThisExpression",{aliases:["Expression"]}),u["default"]("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:o.assertNodeType("Expression")}}}),u["default"]("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{body:{validate:o.assertNodeType("BlockStatement")},handler:{optional:!0,handler:o.assertNodeType("BlockStatement")},finalizer:{optional:!0,validate:o.assertNodeType("BlockStatement")}}}),u["default"]("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{"default":!1},argument:{validate:o.assertNodeType("Expression")},operator:{}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),u["default"]("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{"default":!1},argument:{validate:o.assertNodeType("Expression")},operator:{}},visitor:["argument"],aliases:["Expression"]}),u["default"]("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{kind:{validate:o.chain(o.assertValueType("string"),o.assertOneOf("var","let","const"))},declarations:{validate:o.chain(o.assertValueType("array"),o.assertEach(o.assertNodeType("VariableDeclarator")))}}}),u["default"]("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:o.assertNodeType("LVal")},init:{optional:!0,validate:o.assertNodeType("Expression")}}}),u["default"]("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:o.assertNodeType("Expression")},body:{validate:o.assertNodeType("BlockStatement","Statement")}}}),u["default"]("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{object:o.assertNodeType("Expression")},body:{validate:o.assertNodeType("BlockStatement")}}})},{277:277,278:278,534:534,539:539}],531:[function(t,e,n){"use strict";var r=t(277)["default"],i=t(534),s=r(i);s["default"]("AssignmentPattern",{visitor:["left","right"],aliases:["Pattern","LVal"],fields:{left:{validate:i.assertNodeType("Identifier")},right:{validate:i.assertNodeType("Expression")}}}),s["default"]("ArrayPattern",{visitor:["elements","typeAnnotation"],aliases:["Pattern","LVal"],fields:{elements:{validate:i.chain(i.assertValueType("array"),i.assertEach(i.assertValueType("Expression")))}}}),s["default"]("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{params:{validate:i.chain(i.assertValueType("array"),i.assertEach(i.assertNodeType("LVal")))},body:{validate:i.assertNodeType("BlockStatement","Expression")},async:{validate:i.assertValueType("boolean"),"default":!1}}}),s["default"]("ClassBody",{visitor:["body"],fields:{body:{validate:i.chain(i.assertValueType("array"),i.assertEach(i.assertValueType("ClassMethod","ClassProperty")))}}}),s["default"]("ClassDeclaration",{builder:["id","superClass","body","decorators"],visitor:["id","body","superClass","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Statement","Declaration","Pureish"],fields:{id:{validate:i.assertNodeType("Identifier")},body:{validate:i.assertNodeType("ClassBody")},superClass:{optional:!0,validate:i.assertNodeType("Expression")},decorators:{validate:i.chain(i.assertValueType("array"),i.assertEach(i.assertValueType("Decorator")))}}}),s["default"]("ClassExpression",{inherits:"ClassDeclaration",aliases:["Scopable","Class","Expression","Pureish"],fields:{id:{optional:!0,validate:i.assertNodeType("Identifier")},body:{validate:i.assertNodeType("ClassBody")},superClass:{optional:!0,validate:i.assertNodeType("Expression")},decorators:{validate:i.chain(i.assertValueType("array"),i.assertEach(i.assertValueType("Decorator")))}}}),s["default"]("ExportAllDeclaration",{visitor:["source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{}}),s["default"]("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{}}),s["default"]("ExportNamedDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{}}),s["default"]("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:i.assertNodeType("Identifier")},imported:{validate:i.assertNodeType("Identifier")}}}),s["default"]("ForOfStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:i.assertNodeType("VariableDeclaration","LVal")},right:{validate:i.assertNodeType("Expression")},body:{validate:i.assertNodeType("Statement")}}}),s["default"]("ImportDeclaration",{visitor:["specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration"],fields:{specifiers:{validate:i.chain(i.assertValueType("array"),i.assertEach(i.assertNodeType("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:i.assertNodeType("StringLiteral")}}}),s["default"]("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:i.assertNodeType("Identifier")}}}),s["default"]("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:i.assertNodeType("Identifier")}}}),s["default"]("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:i.assertNodeType("Identifier")},imported:{validate:i.assertNodeType("Identifier")}}}),s["default"]("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:i.assertValueType("string")},property:{validate:i.assertValueType("string")}}}),s["default"]("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:{kind:{validate:i.chain(i.assertValueType("string"),i.assertOneOf("get","set","method","constructor")),"default":"method"},computed:{"default":!1,validate:i.assertValueType("boolean")},"static":{"default":!1,validate:i.assertValueType("boolean")},key:{validate:function(t,e,n){var r=t.computed?["Expression"]:["Identifier","Literal"];i.assertNodeType.apply(void 0,r)(t,e,n)}},params:{validate:i.chain(i.assertValueType("array"),i.assertEach(i.assertNodeType("LVal")))},body:{validate:i.assertNodeType("BlockStatement")},generator:{"default":!1,validate:i.assertValueType("boolean")},async:{"default":!1,validate:i.assertValueType("boolean")}}}),s["default"]("ObjectPattern",{visitor:["properties","typeAnnotation"],aliases:["Pattern","LVal"],fields:{properties:{validate:i.chain(i.assertValueType("array"),i.assertEach(i.assertValueType("RestProperty","Property")))}}}),s["default"]("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:i.assertNodeType("Expression")}}}),s["default"]("Super",{aliases:["Expression"]}),s["default"]("TaggedTemplateExpression",{visitor:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:i.assertNodeType("Expression")},quasi:{validate:i.assertNodeType("TemplateLiteral")}}}),s["default"]("TemplateElement",{builder:["value","tail"],fields:{value:{},tail:{validate:i.assertValueType("boolean"),"default":!1}}}),s["default"]("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{}}),s["default"]("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:i.assertValueType("boolean"),"default":!1},argument:{optional:!0,validate:i.assertNodeType("Expression")}}})},{277:277,534:534}],532:[function(t,e,n){"use strict";var r=t(277)["default"],i=t(534),s=r(i);s["default"]("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:i.assertNodeType("Expression")}}}),s["default"]("BindExpression",{visitor:["object","callee"],fields:{}}),s["default"]("Decorator",{visitor:["expression"],fields:{expression:{validate:i.assertNodeType("Expression")}}}),s["default"]("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:i.assertNodeType("BlockStatement")}}}),s["default"]("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:i.assertNodeType("Identifier")}}}),s["default"]("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:i.assertNodeType("Identifier")}}}),s["default"]("RestProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:i.assertNodeType("LVal")}}}),s["default"]("SpreadProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:i.assertNodeType("Expression")}}})},{277:277,534:534}],533:[function(t,e,n){"use strict";var r=t(277)["default"],i=t(534),s=r(i);s["default"]("AnyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),s["default"]("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow"],fields:{}}),s["default"]("BooleanTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),s["default"]("BooleanLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),s["default"]("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),s["default"]("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],aliases:["Flow","Property"],fields:{}}),s["default"]("DeclareClass",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),s["default"]("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),s["default"]("DeclareModule",{visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),s["default"]("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),s["default"]("ExistentialTypeParam",{aliases:["Flow"]}),s["default"]("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow"],fields:{}}),s["default"]("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{}}),s["default"]("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),s["default"]("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),s["default"]("InterfaceDeclaration",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),s["default"]("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),s["default"]("MixedTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),s["default"]("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),s["default"]("NumericLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),s["default"]("NumberTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),s["default"]("StringLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),s["default"]("StringTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),s["default"]("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),s["default"]("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow"],fields:{}}),s["default"]("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),s["default"]("TypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),s["default"]("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper"],fields:{}}),s["default"]("TypeParameterDeclaration",{visitor:["params"],aliases:["Flow"],fields:{}}),s["default"]("TypeParameterInstantiation",{visitor:["params"],aliases:["Flow"],fields:{}}),s["default"]("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties"],aliases:["Flow"],fields:{}}),s["default"]("ObjectTypeCallProperty",{visitor:["value"],aliases:["Flow","UserWhitespacable"],fields:{}}),s["default"]("ObjectTypeIndexer",{visitor:["id","key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),s["default"]("ObjectTypeProperty",{visitor:["key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),s["default"]("QualifiedTypeIdentifier",{visitor:["id","qualification"],aliases:["Flow"],fields:{}}),s["default"]("UnionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),s["default"]("VoidTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}})},{277:277,534:534}],534:[function(t,e,n){"use strict";function r(t){return Array.isArray(t)?"array":null===t?"null":void 0===t?"undefined":typeof t}function i(t){return function(e,n,r){if(Array.isArray(r))for(var i=0;i<r.length;i++)t(e,n+"["+i+"]",r[i])}}function s(){function t(t,e,r){if(n.indexOf(r)<0)throw new TypeError("Property "+e+" expected value to be one of "+JSON.stringify(n)+" but got "+JSON.stringify(r))}for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];return t.oneOf=n,t}function a(){function t(t,e,r){for(var i=!1,s=n,a=Array.isArray(s),o=0,s=a?s:p(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;if(h.is(l,r)){i=!0;break}}if(!i)throw new TypeError("Property "+e+" of "+t.type+" expected node to be of a type "+JSON.stringify(n)+" but instead got "+JSON.stringify(r&&r.type))}for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];return t.oneOfNodeTypes=n,t}function o(t){function e(e,n,i){var s=r(i)===t;if(!s)throw new TypeError("Property "+n+" expected type of "+t+" but got "+r(i))}return e.type=t,e}function u(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];return function(){for(var t=e,n=Array.isArray(t),r=0,t=n?t:p(t);;){var i;if(n){if(r>=t.length)break;i=t[r++]}else{if(r=t.next(),r.done)break;i=r.value}var s=i;s.apply(void 0,arguments)}}}function l(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=e.inherits&&A[e.inherits]||{};e.fields=e.fields||n.fields||{},e.visitor=e.visitor||n.visitor||[],e.aliases=e.aliases||n.aliases||[],e.builder=e.builder||n.builder||e.visitor||[],e.deprecatedAlias&&(v[e.deprecatedAlias]=t);for(var i=e.visitor.concat(e.builder),s=Array.isArray(i),a=0,i=s?i:p(i);;){var u;if(s){if(a>=i.length)break;u=i[a++]}else{if(a=i.next(),a.done)break;u=a.value}var l=u;e.fields[l]=e.fields[l]||{}}for(var l in e.fields){var c=e.fields[l];void 0===c["default"]?c["default"]=null:c.validate||(c.validate=o(r(c["default"])))}d[t]=e.visitor,g[t]=e.builder,y[t]=e.fields,m[t]=e.aliases,A[t]=e}var p=t(266)["default"],c=t(278)["default"];n.__esModule=!0,n.assertEach=i,n.assertOneOf=s,n.assertNodeType=a,n.assertValueType=o,n.chain=u,n["default"]=l;var f=t(539),h=c(f),d={};n.VISITOR_KEYS=d;var m={};n.ALIAS_KEYS=m;var y={};n.NODE_FIELDS=y;var g={};n.BUILDER_KEYS=g;var v={};n.DEPRECATED_KEYS=v;var A={}},{266:266,278:278,539:539}],535:[function(t,e,n){"use strict";t(534),t(530),t(531),t(533),t(536),t(537),t(532)},{530:530,531:531,532:532,533:533,534:534,536:536,537:537}],536:[function(t,e,n){"use strict";var r=t(277)["default"],i=t(534),s=r(i);s["default"]("JSXAttribute",{visitor:["name","value"],aliases:["JSX","Immutable"],fields:{name:{validate:i.assertNodeType("JSXIdentifier","JSXMemberExpression")},value:{optional:!0,validate:i.assertNodeType("JSXElement","StringLiteral","JSXExpressionContainer")}}}),s["default"]("JSXClosingElement",{visitor:["name"],aliases:["JSX","Immutable"],fields:{name:{validate:i.assertNodeType("JSXIdentifier","JSXMemberExpression")}}}),s["default"]("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["JSX","Immutable","Expression"],fields:{openingElement:{validate:i.assertNodeType("JSXOpeningElement")},closingElement:{optional:!0,validate:i.assertNodeType("JSXClosingElement")},children:{}}}),s["default"]("JSXEmptyExpression",{aliases:["JSX","Expression"]}),s["default"]("JSXExpressionContainer",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:i.assertNodeType("Expression")}}}),s["default"]("JSXIdentifier",{builder:["name"],aliases:["JSX","Expression"],fields:{name:{validate:i.assertValueType("string")}}}),s["default"]("JSXMemberExpression",{visitor:["object","property"],aliases:["JSX","Expression"],fields:{object:{validate:i.assertNodeType("JSXIdentifier")},property:{validate:i.assertNodeType("JSXIdentifier")}}}),s["default"]("JSXNamespacedName",{visitor:["namespace","name"],aliases:["JSX"],fields:{namespace:{validate:i.assertNodeType("JSXIdentifier")},name:{validate:i.assertNodeType("JSXIdentifier")}}}),s["default"]("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["JSX","Immutable"],fields:{name:{validate:i.assertNodeType("JSXIdentifier","JSXMemberExpression")},selfClosing:{"default":!1,validate:i.assertValueType("boolean")},attributes:{validate:i.chain(i.assertValueType("array"),i.assertEach(i.assertNodeType("JSXAttribute","JSXSpreadAttribute")))}}}),s["default"]("JSXSpreadAttribute",{visitor:["argument"],aliases:["JSX"],fields:{argument:{validate:i.assertNodeType("Expression")}}}),s["default"]("JSXText",{aliases:["JSX"],builder:["value"],fields:{value:{validate:i.assertValueType("string")}}})},{277:277,534:534}],537:[function(t,e,n){"use strict";var r=t(277)["default"],i=t(534),s=r(i);s["default"]("Noop",{visitor:[]}),s["default"]("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:i.assertNodeType("Expression")}}})},{277:277,534:534}],538:[function(t,e,n){"use strict";function r(t){var e=i(t);return 1===e.length?e[0]:u.unionTypeAnnotation(e)}function i(t){for(var e={},n={},r=[],s=[],a=0;a<t.length;a++){var o=t[a];if(o&&!(s.indexOf(o)>=0)){if(u.isAnyTypeAnnotation(o))return[o];if(u.isFlowBaseAnnotation(o))n[o.type]=o;else if(u.isUnionTypeAnnotation(o))r.indexOf(o.types)<0&&(t=t.concat(o.types),r.push(o.types));else if(u.isGenericTypeAnnotation(o)){var l=o.id.name;if(e[l]){var p=e[l];p.typeParameters?o.typeParameters&&(p.typeParameters.params=i(p.typeParameters.params.concat(o.typeParameters.params))):p=o.typeParameters}else e[l]=o}else s.push(o)}}for(var c in n)s.push(n[c]);for(var f in e)s.push(e[f]);return s}function s(t){if("string"===t)return u.stringTypeAnnotation();if("number"===t)return u.numberTypeAnnotation();if("undefined"===t)return u.voidTypeAnnotation();if("boolean"===t)return u.booleanTypeAnnotation();if("function"===t)return u.genericTypeAnnotation(u.identifier("Function"));if("object"===t)return u.genericTypeAnnotation(u.identifier("Object"));if("symbol"===t)return u.genericTypeAnnotation(u.identifier("Symbol"));throw new Error("Invalid typeof value")}var a=t(278)["default"];n.__esModule=!0,n.createUnionTypeAnnotation=r,n.removeTypeDuplicates=i,n.createTypeAnnotationBasedOnTypeof=s;var o=t(539),u=a(o)},{278:278,539:539}],539:[function(t,e,n){"use strict";function r(t){var e=G["is"+t]=function(e,n){return G.is(t,e,n)};G["assert"+t]=function(n,r){if(r=r||{},!e(n,r))throw new Error("Expected type "+JSON.stringify(t)+" with option "+JSON.stringify(r))}}function i(t,e,n){if(!e)return!1;var r=s(e.type,t);return r?"undefined"==typeof n?!0:G.shallowEqual(e,n):!1}function s(t,e){if(t===e)return!0;var n=G.FLIPPED_ALIAS_KEYS[e];if(n){if(n[0]===t)return!0;for(var r=n,i=Array.isArray(r),s=0,r=i?r:C(r);;){var a;if(i){if(s>=r.length)break;a=r[s++]}else{if(s=r.next(),s.done)break;a=s.value}var o=a;if(t===o)return!0}}return!1}function a(t,e,n){if(t){var r=G.NODE_FIELDS[t.type];if(r){var i=r[e];i&&i.validate&&(i.optional&&null==n||i.validate(t,e,n))}}}function o(t,e){for(var n=D(e),r=n,i=Array.isArray(r),s=0,r=i?r:C(r);;){var a;if(i){if(s>=r.length)break;a=r[s++]}else{if(s=r.next(),s.done)break;a=s.value}var o=a;if(t[o]!==e[o])return!1}return!0}function u(t,e,n){return t.object=G.memberExpression(t.object,t.property,t.computed),t.property=e,t.computed=!!n,t}function l(t,e){return t.object=G.memberExpression(e,t.object),t}function p(t){var e=arguments.length<=1||void 0===arguments[1]?"body":arguments[1];return t[e]=G.toBlock(t[e],t)}function c(t){var e={};for(var n in t)"_"!==n[0]&&(e[n]=t[n]);return e}function f(t){var e={};for(var n in t)if("_"!==n[0]){var r=t[n];r&&(r.type?r=G.cloneDeep(r):Array.isArray(r)&&(r=r.map(G.cloneDeep))),e[n]=r}return e}function h(t,e){var n=t.split(".");return function(t){if(!G.isMemberExpression(t))return!1;for(var r=[t],i=0;r.length;){var s=r.shift();if(e&&i===n.length)return!0;if(G.isIdentifier(s)){if(n[i]!==s.name)return!1}else{if(!G.isStringLiteral(s)){if(G.isMemberExpression(s)){if(s.computed&&!G.isStringLiteral(s.property))return!1;r.push(s.object),r.push(s.property);continue}return!1}if(n[i]!==s.value)return!1}if(++i>n.length)return!1}return!0}}function d(t){for(var e=Y,n=Array.isArray(e),r=0,e=n?e:C(e);;){var i;if(n){if(r>=e.length)break;i=e[r++]}else{if(r=e.next(),r.done)break;i=r.value}var s=i;delete t[s]}return t}function m(t,e){return y(t,e),g(t,e),v(t,e),t}function y(t,e){A("trailingComments",t,e)}function g(t,e){A("leadingComments",t,e)}function v(t,e){A("innerComments",t,e)}function A(t,e,n){e&&n&&(e[t]=R["default"](P["default"]([].concat(e[t],n[t]))))}function E(t,e){if(!t||!e)return t;for(var n=G.INHERIT_KEYS.optional,r=Array.isArray(n),i=0,n=r?n:C(n);;){var s;if(r){if(i>=n.length)break;s=n[i++]}else{if(i=n.next(),i.done)break;s=i.value}var a=s;null==t[a]&&(t[a]=e[a])}for(var o=G.INHERIT_KEYS.force,u=Array.isArray(o),l=0,o=u?o:C(o);;){
var p;if(u){if(l>=o.length)break;p=o[l++]}else{if(l=o.next(),l.done)break;p=l.value}var a=p;t[a]=e[a]}return G.inheritsComments(t,e),t}function b(t){if(!x(t))throw new TypeError("Not a valid node "+(t&&t.type))}function x(t){return!(!t||!j.VISITOR_KEYS[t.type])}var D=t(271)["default"],C=t(266)["default"],F=t(277)["default"],S=t(278)["default"],w=t(274)["default"],B=t(276)["default"];n.__esModule=!0,n.is=i,n.isType=s,n.validate=a,n.shallowEqual=o,n.appendToMemberExpression=u,n.prependToMemberExpression=l,n.ensureBlock=p,n.clone=c,n.cloneDeep=f,n.buildMatchMemberExpression=h,n.removeComments=d,n.inheritsComments=m,n.inheritTrailingComments=y,n.inheritLeadingComments=g,n.inheritInnerComments=v,n.inherits=E,n.assertNode=b,n.isNode=x;var T=t(621),_=F(T),k=t(547),P=F(k),N=t(605),I=F(N),L=t(550),O=F(L),M=t(549),R=F(M);t(535);var j=t(534),V=t(540),U=S(V),G=n,W=["consequent","body","alternate"];n.STATEMENT_OR_BLOCK_KEYS=W;var q=["body","expressions"];n.FLATTENABLE_KEYS=q;var H=["left","init"];n.FOR_INIT_KEYS=H;var Y=["leadingComments","trailingComments","innerComments"];n.COMMENT_KEYS=Y;var J={optional:["typeAnnotation","typeParameters","returnType"],force:["_scopeInfo","_paths","start","loc","end"]};n.INHERIT_KEYS=J;var K=[">","<",">=","<="];n.BOOLEAN_NUMBER_BINARY_OPERATORS=K;var $=["==","===","!=","!=="];n.EQUALITY_BINARY_OPERATORS=$;var X=$.concat(["in","instanceof"]);n.COMPARISON_BINARY_OPERATORS=X;var z=[].concat(X,K);n.BOOLEAN_BINARY_OPERATORS=z;var Q=["-","/","*","**","&","|",">>",">>>","<<","^"];n.NUMBER_BINARY_OPERATORS=Q;var Z=["delete","!"];n.BOOLEAN_UNARY_OPERATORS=Z;var tt=["+","-","++","--","~"];n.NUMBER_UNARY_OPERATORS=tt;var et=["typeof"];n.STRING_UNARY_OPERATORS=et,n.VISITOR_KEYS=j.VISITOR_KEYS,n.ALIAS_KEYS=j.ALIAS_KEYS,n.NODE_FIELDS=j.NODE_FIELDS,n.BUILDER_KEYS=j.BUILDER_KEYS,n.DEPRECATED_KEYS=j.DEPRECATED_KEYS,n.react=U;for(var nt in G.VISITOR_KEYS)r(nt);G.FLIPPED_ALIAS_KEYS={},O["default"](G.ALIAS_KEYS,function(t,e){O["default"](t,function(t){var n=G.FLIPPED_ALIAS_KEYS[t]=G.FLIPPED_ALIAS_KEYS[t]||[];n.push(e)})}),O["default"](G.FLIPPED_ALIAS_KEYS,function(t,e){G[e.toUpperCase()+"_TYPES"]=t,r(e)});var rt=D(G.VISITOR_KEYS).concat(D(G.FLIPPED_ALIAS_KEYS)).concat(D(G.DEPRECATED_KEYS));n.TYPES=rt,O["default"](G.BUILDER_KEYS,function(t,e){function n(){if(arguments.length>t.length)throw new Error("t."+e+": Too many arguments passed. Received "+arguments.length+" but can receive no more than "+t.length);var n={};n.type=e;for(var r=0,i=t,s=Array.isArray(i),o=0,i=s?i:C(i);;){var u;if(s){if(o>=i.length)break;u=i[o++]}else{if(o=i.next(),o.done)break;u=o.value}var l=u,p=G.NODE_FIELDS[e][l],c=arguments[r++];void 0===c&&(c=I["default"](p["default"])),n[l]=c}for(var l in n)a(n,l,n[l]);return n}G[e]=n,G[e[0].toLowerCase()+e.slice(1)]=n});var it=function(t){var e=function(e){return function(){return console.trace("The node type "+t+" has been renamed to "+n),e.apply(this,arguments)}},n=G.DEPRECATED_KEYS[t];G[t]=G[t[0].toLowerCase()+t.slice(1)]=e(G[n]),G["is"+t]=e(G["is"+n]),G["assert"+t]=e(G["assert"+n])};for(var nt in G.DEPRECATED_KEYS)it(nt);_["default"](G),_["default"](G.VISITOR_KEYS);var st=t(541);w(n,B(st,w));var at=t(542);w(n,B(at,w));var ot=t(529);w(n,B(ot,w));var ut=t(538);w(n,B(ut,w))},{266:266,271:271,274:274,276:276,277:277,278:278,529:529,534:534,535:535,538:538,540:540,541:541,542:542,547:547,549:549,550:550,605:605,621:621}],540:[function(t,e,n){"use strict";function r(t){return!!t&&/^[a-z]|\-/.test(t)}function i(t,e){for(var n=t.value.split(/\r\n|\n|\r/),r=0,i=0;i<n.length;i++)n[i].match(/[^ \t]/)&&(r=i);for(var s="",i=0;i<n.length;i++){var a=n[i],o=0===i,l=i===n.length-1,p=i===r,c=a.replace(/\t/g," ");o||(c=c.replace(/^[ ]+/,"")),l||(c=c.replace(/[ ]+$/,"")),c&&(p||(c+=" "),s+=c)}s&&e.push(u.stringLiteral(s))}function s(t){for(var e=[],n=0;n<t.children.length;n++){var r=t.children[n];u.isJSXText(r)?i(r,e):(u.isJSXExpressionContainer(r)&&(r=r.expression),u.isJSXEmptyExpression(r)||e.push(r))}return e}var a=t(278)["default"];n.__esModule=!0,n.isCompatTag=r,n.buildChildren=s;var o=t(539),u=a(o),l=u.buildMatchMemberExpression("React.Component");n.isReactComponent=l},{278:278,539:539}],541:[function(t,e,n){"use strict";function r(t,e,n){for(var r=[].concat(t),i=s(null);r.length;){var a=r.shift();if(a){var o=u.getBindingIdentifiers.keys[a.type];if(u.isIdentifier(a))if(e){var l=i[a.name]=i[a.name]||[];l.push(a)}else i[a.name]=a;else if(u.isExportDeclaration(a))u.isDeclaration(t.declaration)&&r.push(t.declaration);else{if(n){if(u.isFunctionDeclaration(a)){r.push(a.id);continue}if(u.isFunctionExpression(a))continue}if(o)for(var p=0;p<o.length;p++){var c=o[p];a[c]&&(r=r.concat(a[c]))}}}}return i}function i(t,e){return r(t,e,!0)}var s=t(270)["default"],a=t(278)["default"];n.__esModule=!0,n.getBindingIdentifiers=r,n.getOuterBindingIdentifiers=i;var o=t(539),u=a(o);r.keys={DeclareClass:["id"],DeclareFunction:["id"],DeclareModule:["id"],DeclareVariable:["id"],InterfaceDeclaration:["id"],TypeAlias:["id"],CatchClause:["param"],LabeledStatement:["label"],UnaryExpression:["argument"],AssignmentExpression:["left"],ImportSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDefaultSpecifier:["local"],ImportDeclaration:["specifiers"],ExportSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportDefaultSpecifier:["exported"],FunctionDeclaration:["id","params"],FunctionExpression:["id","params"],ClassDeclaration:["id"],ClassExpression:["id"],RestElement:["argument"],UpdateExpression:["argument"],SpreadProperty:["argument"],ObjectProperty:["value"],AssignmentPattern:["left"],ArrayPattern:["elements"],ObjectPattern:["properties"],VariableDeclaration:["declarations"],VariableDeclarator:["id"]}},{270:270,278:278,539:539}],542:[function(t,e,n){"use strict";function r(t,e){var n=m.getBindingIdentifiers.keys[e.type];if(n)for(var r=0;r<n.length;r++){var i=n[r],s=e[i];if(Array.isArray(s)){if(s.indexOf(t)>=0)return!0}else if(s===t)return!0}return!1}function i(t,e){switch(e.type){case"MemberExpression":case"JSXMemberExpression":case"BindExpression":return e.property===t&&e.computed?!0:e.object===t?!0:!1;case"MetaProperty":return!1;case"ObjectProperty":if(e.key===t)return e.computed;case"VariableDeclarator":return e.id!==t;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":for(var n=e.params,r=Array.isArray(n),i=0,n=r?n:f(n);;){var s;if(r){if(i>=n.length)break;s=n[i++]}else{if(i=n.next(),i.done)break;s=i.value}var a=s;if(a===t)return!1}return e.id!==t;case"ExportSpecifier":return e.source?!1:e.local===t;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return!1;case"JSXAttribute":return e.name!==t;case"ClassProperty":return e.value===t;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return!1;case"ClassDeclaration":case"ClassExpression":return e.id!==t;case"ClassMethod":case"ObjectMethod":return e.key===t&&e.computed;case"LabeledStatement":return!1;case"CatchClause":return e.param!==t;case"RestElement":return!1;case"AssignmentExpression":return e.right===t;case"AssignmentPattern":return e.right===t;case"ObjectPattern":case"ArrayPattern":return!1}return!0}function s(t){return"string"!=typeof t||g["default"].keyword.isReservedWordES6(t,!0)?!1:g["default"].keyword.isIdentifierNameES6(t)}function a(t){return A.isVariableDeclaration(t)&&("var"!==t.kind||t._let)}function o(t){return A.isFunctionDeclaration(t)||A.isClassDeclaration(t)||A.isLet(t)}function u(t){return A.isVariableDeclaration(t,{kind:"var"})&&!t._let}function l(t){return A.isImportDefaultSpecifier(t)||A.isIdentifier(t.imported||t.exported,{name:"default"})}function p(t,e){return A.isBlockStatement(t)&&A.isFunction(e,{body:t})?!1:A.isScopable(t)}function c(t){return A.isType(t.type,"Immutable")?!0:A.isIdentifier(t)&&"undefined"===t.name?!0:!1}var f=t(266)["default"],h=t(277)["default"],d=t(278)["default"];n.__esModule=!0,n.isBinding=r,n.isReferenced=i,n.isValidIdentifier=s,n.isLet=a,n.isBlockScoped=o,n.isVar=u,n.isSpecifierDefault=l,n.isScope=p,n.isImmutable=c;var m=t(541),y=t(546),g=h(y),v=t(539),A=d(v)},{266:266,277:277,278:278,539:539,541:541,546:546}],543:[function(t,e,n){arguments[4][21][0].apply(n,arguments)},{21:21}],544:[function(t,e,n){arguments[4][22][0].apply(n,arguments)},{22:22}],545:[function(t,e,n){arguments[4][23][0].apply(n,arguments)},{23:23,544:544}],546:[function(t,e,n){arguments[4][24][0].apply(n,arguments)},{24:24,543:543,544:544,545:545}],547:[function(t,e,n){function r(t){for(var e=-1,n=t?t.length:0,r=-1,i=[];++e<n;){var s=t[e];s&&(i[++r]=s)}return i}e.exports=r},{}],548:[function(t,e,n){arguments[4][56][0].apply(n,arguments)},{56:56}],549:[function(t,e,n){function r(t,e,n,r){var u=t?t.length:0;return u?(null!=e&&"boolean"!=typeof e&&(r=n,n=a(t,e,r)?void 0:e,e=!1),n=null==n?n:i(n,r,3),e?o(t,n):s(t,n)):[]}var i=t(557),s=t(575),a=t(596),o=t(602);e.exports=r},{557:557,575:575,596:596,602:602}],550:[function(t,e,n){arguments[4][58][0].apply(n,arguments)},{551:551,58:58}],551:[function(t,e,n){arguments[4][59][0].apply(n,arguments)},{554:554,560:560,583:583,59:59}],552:[function(t,e,n){(function(n){function r(t){var e=t?t.length:0;for(this.data={hash:o(null),set:new a};e--;)this.push(t[e])}var i=t(579),s=t(589),a=s(n,"Set"),o=s(Object,"create");r.prototype.push=i,e.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{579:579,589:589}],553:[function(t,e,n){arguments[4][63][0].apply(n,arguments)},{63:63}],554:[function(t,e,n){arguments[4][64][0].apply(n,arguments)},{64:64}],555:[function(t,e,n){arguments[4][65][0].apply(n,arguments)},{65:65}],556:[function(t,e,n){arguments[4][68][0].apply(n,arguments)},{559:559,616:616,68:68}],557:[function(t,e,n){arguments[4][69][0].apply(n,arguments)},{569:569,570:570,576:576,619:619,620:620,69:69}],558:[function(t,e,n){arguments[4][70][0].apply(n,arguments)},{553:553,554:554,556:556,563:563,591:591,592:592,593:593,607:607,611:611,70:70}],559:[function(t,e,n){arguments[4][72][0].apply(n,arguments)},{72:72}],560:[function(t,e,n){arguments[4][73][0].apply(n,arguments)},{563:563,580:580,73:73}],561:[function(t,e,n){arguments[4][74][0].apply(n,arguments)},{581:581,74:74}],562:[function(t,e,n){arguments[4][75][0].apply(n,arguments)},{561:561,617:617,75:75}],563:[function(t,e,n){arguments[4][76][0].apply(n,arguments)},{561:561,616:616,76:76}],564:[function(t,e,n){arguments[4][77][0].apply(n,arguments)},{603:603,77:77}],565:[function(t,e,n){arguments[4][78][0].apply(n,arguments)},{590:590,78:78}],566:[function(t,e,n){arguments[4][79][0].apply(n,arguments)},{567:567,599:599,611:611,79:79}],567:[function(t,e,n){arguments[4][80][0].apply(n,arguments)},{584:584,585:585,586:586,607:607,615:615,80:80}],568:[function(t,e,n){arguments[4][81][0].apply(n,arguments)},{566:566,603:603,81:81}],569:[function(t,e,n){arguments[4][83][0].apply(n,arguments)},{568:568,588:588,603:603,83:83}],570:[function(t,e,n){arguments[4][84][0].apply(n,arguments)},{548:548,564:564,566:566,573:573,597:597,600:600,603:603,604:604,607:607,84:84}],571:[function(t,e,n){arguments[4][87][0].apply(n,arguments)},{87:87}],572:[function(t,e,n){arguments[4][88][0].apply(n,arguments)},{564:564,604:604,88:88}],573:[function(t,e,n){arguments[4][89][0].apply(n,arguments)},{89:89}],574:[function(t,e,n){arguments[4][91][0].apply(n,arguments)},{91:91}],575:[function(t,e,n){function r(t,e){var n=-1,r=i,u=t.length,l=!0,p=l&&u>=o,c=p?a():null,f=[];c?(r=s,l=!1):(p=!1,c=e?[]:f);t:for(;++n<u;){var h=t[n],d=e?e(h,n,t):h;if(l&&h===h){for(var m=c.length;m--;)if(c[m]===d)continue t;e&&c.push(d),f.push(h)}else r(c,d,0)<0&&((e||p)&&c.push(d),f.push(h))}return f}var i=t(565),s=t(578),a=t(582),o=200;e.exports=r},{565:565,578:578,582:582}],576:[function(t,e,n){arguments[4][93][0].apply(n,arguments)},{619:619,93:93}],577:[function(t,e,n){arguments[4][94][0].apply(n,arguments)},{94:94}],578:[function(t,e,n){function r(t,e){var n=t.data,r="string"==typeof e||i(e)?n.set.has(e):n.hash[e];return r?0:-1}var i=t(611);e.exports=r},{611:611}],579:[function(t,e,n){function r(t){var e=this.data;"string"==typeof t||i(t)?e.set.add(t):e.hash[t]=!0}var i=t(611);e.exports=r},{611:611}],580:[function(t,e,n){arguments[4][97][0].apply(n,arguments)},{587:587,598:598,603:603,97:97}],581:[function(t,e,n){arguments[4][98][0].apply(n,arguments)},{603:603,98:98}],582:[function(t,e,n){(function(n){function r(t){return o&&a?new i(t):null}var i=t(552),s=t(589),a=s(n,"Set"),o=s(Object,"create");e.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{552:552,589:589}],583:[function(t,e,n){arguments[4][100][0].apply(n,arguments)},{100:100,576:576,607:607}],584:[function(t,e,n){arguments[4][101][0].apply(n,arguments)},{101:101,555:555}],585:[function(t,e,n){arguments[4][102][0].apply(n,arguments)},{102:102}],586:[function(t,e,n){arguments[4][103][0].apply(n,arguments)},{103:103,616:616}],587:[function(t,e,n){arguments[4][105][0].apply(n,arguments)},{105:105,571:571}],588:[function(t,e,n){arguments[4][106][0].apply(n,arguments)},{106:106,600:600,618:618}],589:[function(t,e,n){arguments[4][107][0].apply(n,arguments)},{107:107,609:609}],590:[function(t,e,n){arguments[4][108][0].apply(n,arguments)},{108:108}],591:[function(t,e,n){arguments[4][109][0].apply(n,arguments)},{109:109}],592:[function(t,e,n){arguments[4][110][0].apply(n,arguments)},{110:110,577:577}],593:[function(t,e,n){arguments[4][111][0].apply(n,arguments)},{111:111}],594:[function(t,e,n){arguments[4][112][0].apply(n,arguments)},{112:112,587:587,598:598}],595:[function(t,e,n){arguments[4][113][0].apply(n,arguments)},{113:113}],596:[function(t,e,n){arguments[4][114][0].apply(n,arguments)},{114:114,594:594,595:595,611:611}],597:[function(t,e,n){arguments[4][115][0].apply(n,arguments)},{115:115,603:603,607:607}],598:[function(t,e,n){arguments[4][116][0].apply(n,arguments)},{116:116}],599:[function(t,e,n){arguments[4][117][0].apply(n,arguments)},{117:117}],600:[function(t,e,n){arguments[4][118][0].apply(n,arguments)},{118:118,611:611}],601:[function(t,e,n){arguments[4][119][0].apply(n,arguments)},{119:119,595:595,598:598,606:606,607:607,617:617}],602:[function(t,e,n){function r(t,e){for(var n,r=-1,i=t.length,s=-1,a=[];++r<i;){var o=t[r],u=e?e(o,r,t):o;r&&n===u||(n=u,a[++s]=o)}return a}e.exports=r},{}],603:[function(t,e,n){arguments[4][120][0].apply(n,arguments)},{120:120,611:611}],604:[function(t,e,n){arguments[4][121][0].apply(n,arguments)},{121:121,574:574,607:607}],605:[function(t,e,n){arguments[4][122][0].apply(n,arguments)},{122:122,558:558,576:576,596:596}],606:[function(t,e,n){arguments[4][124][0].apply(n,arguments)},{124:124,594:594,599:599}],607:[function(t,e,n){arguments[4][125][0].apply(n,arguments)},{125:125,589:589,598:598,599:599}],608:[function(t,e,n){arguments[4][127][0].apply(n,arguments)},{127:127,611:611}],609:[function(t,e,n){arguments[4][128][0].apply(n,arguments)},{128:128,599:599,608:608}],610:[function(t,e,n){arguments[4][239][0].apply(n,arguments)},{239:239,599:599}],611:[function(t,e,n){arguments[4][129][0].apply(n,arguments)},{129:129}],612:[function(t,e,n){arguments[4][130][0].apply(n,arguments)},{130:130,562:562,599:599,606:606}],613:[function(t,e,n){arguments[4][131][0].apply(n,arguments)},{131:131,611:611}],614:[function(t,e,n){arguments[4][132][0].apply(n,arguments)},{132:132,599:599}],615:[function(t,e,n){arguments[4][133][0].apply(n,arguments)},{133:133,598:598,599:599}],616:[function(t,e,n){arguments[4][137][0].apply(n,arguments)},{137:137,589:589,594:594,601:601,611:611}],617:[function(t,e,n){arguments[4][138][0].apply(n,arguments)},{138:138,595:595,598:598,606:606,607:607,611:611}],618:[function(t,e,n){arguments[4][140][0].apply(n,arguments)},{140:140,603:603,616:616}],619:[function(t,e,n){arguments[4][144][0].apply(n,arguments)},{144:144}],620:[function(t,e,n){arguments[4][145][0].apply(n,arguments)},{145:145,571:571,572:572,597:597}],621:[function(t,e,n){"use strict";e.exports=function r(t){function e(){}e.prototype=t,new e}},{}],622:[function(t,e,n){"use strict";function r(t,e){return new a["default"](e,t).parse()}var i=t(647)["default"];n.__esModule=!0,n.parse=r;var s=t(626),a=i(s);t(631),t(630),t(628),t(625),t(629),t(627),t(624);var o=t(638);t(636),t(635);var u=t(632),l=i(u),p=t(633),c=i(p);s.plugins.flow=l["default"],s.plugins.jsx=c["default"],n.tokTypes=o.types},{624:624,625:625,626:626,627:627,628:628,629:629,630:630,631:631,632:632,633:633,635:635,636:636,638:638,647:647}],623:[function(t,e,n){"use strict";function r(t){var e={};for(var n in i)e[n]=t&&n in t?t[n]:i[n];return e}n.__esModule=!0,n.getOptions=r;var i={sourceType:"script",allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,plugins:[],strictMode:null};n.defaultOptions=i},{}],624:[function(t,e,n){"use strict";function r(t){return t[t.length-1]}var i=t(647)["default"],s=t(626),a=i(s),o=a["default"].prototype;o.addComment=function(t){this.state.trailingComments.push(t),this.state.leadingComments.push(t)},o.processComment=function(t){if(!("Program"===t.type&&t.body.length>0)){var e=this.state.commentStack,n=void 0,i=void 0,s=void 0;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=t.end?(i=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else{var a=r(e);e.length>0&&a.trailingComments&&a.trailingComments[0].start>=t.end&&(i=a.trailingComments,a.trailingComments=null)}for(;e.length>0&&r(e).start>=t.start;)n=e.pop();if(n){if(n.leadingComments)if(n!==t&&r(n.leadingComments).end<=t.start)t.leadingComments=n.leadingComments,n.leadingComments=null;else for(s=n.leadingComments.length-2;s>=0;--s)if(n.leadingComments[s].end<=t.start){t.leadingComments=n.leadingComments.splice(0,s+1);break}}else if(this.state.leadingComments.length>0)if(r(this.state.leadingComments).end<=t.start)t.leadingComments=this.state.leadingComments,this.state.leadingComments=[];else{for(s=0;s<this.state.leadingComments.length&&!(this.state.leadingComments[s].end>t.start);s++);t.leadingComments=this.state.leadingComments.slice(0,s),0===t.leadingComments.length&&(t.leadingComments=null),i=this.state.leadingComments.slice(s),0===i.length&&(i=null)}i&&(i.length&&i[0].start>=t.start&&r(i).end<=t.end?t.innerComments=i:t.trailingComments=i),e.push(t)}}},{626:626,647:647}],625:[function(t,e,n){"use strict";var r=t(643)["default"],i=t(642)["default"],s=t(647)["default"],a=t(638),o=t(626),u=s(o),l=t(639),p=u["default"].prototype;p.checkPropClash=function(t,e){if(!t.computed&&!t.method){var n=t.key,r=void 0;switch(n.type){case"Identifier":r=n.name;break;case"StringLiteral":case"NumericLiteral":r=String(n.value);break;default:return}"__proto__"===r&&"init"===t.kind&&(e.proto&&this.raise(n.start,"Redefinition of __proto__ property"),e.proto=!0)}},p.parseExpression=function(t,e){var n=this.state.start,r=this.state.startLoc,i=this.parseMaybeAssign(t,e);if(this.match(a.types.comma)){var s=this.startNodeAt(n,r);for(s.expressions=[i];this.eat(a.types.comma);)s.expressions.push(this.parseMaybeAssign(t,e));return this.toReferencedList(s.expressions),this.finishNode(s,"SequenceExpression")}return i},p.parseMaybeAssign=function(t,e,n){if(this.match(a.types._yield)&&this.state.inGenerator)return this.parseYield();var r=void 0;e?r=!1:(e={start:0},r=!0);var i=this.state.start,s=this.state.startLoc;(this.match(a.types.parenL)||this.match(a.types.name))&&(this.state.potentialArrowAt=this.state.start);var o=this.parseMaybeConditional(t,e);if(n&&(o=n.call(this,o,i,s)),this.state.type.isAssign){var u=this.startNodeAt(i,s);if(u.operator=this.state.value,u.left=this.match(a.types.eq)?this.toAssignable(o):o,e.start=0,this.checkLVal(o),o.extra&&o.extra.parenthesized){var l=void 0;"ObjectPattern"===o.type?l="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===o.type&&(l="`([a]) = 0` use `([a] = 0)`"),l&&this.raise(o.start,"You're trying to assign to a parenthesized expression, eg. instead of "+l)}return this.next(),u.right=this.parseMaybeAssign(t),this.finishNode(u,"AssignmentExpression")}return r&&e.start&&this.unexpected(e.start),o},p.parseMaybeConditional=function(t,e){var n=this.state.start,r=this.state.startLoc,i=this.parseExprOps(t,e);if(e&&e.start)return i;if(this.eat(a.types.question)){var s=this.startNodeAt(n,r);return s.test=i,s.consequent=this.parseMaybeAssign(),this.expect(a.types.colon),s.alternate=this.parseMaybeAssign(t),this.finishNode(s,"ConditionalExpression")}return i},p.parseExprOps=function(t,e){var n=this.state.start,r=this.state.startLoc,i=this.parseMaybeUnary(e);return e&&e.start?i:this.parseExprOp(i,n,r,-1,t)},p.parseExprOp=function(t,e,n,r,i){var s=this.state.type.binop;if(!(null==s||i&&this.match(a.types._in))&&s>r){var o=this.startNodeAt(e,n);o.left=t,o.operator=this.state.value,"**"===o.operator&&"UnaryExpression"===t.type&&t.extra&&!t.extra.parenthesizedArgument&&this.raise(t.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");var u=this.state.type;this.next();var l=this.state.start,p=this.state.startLoc;return o.right=this.parseExprOp(this.parseMaybeUnary(),l,p,u.rightAssociative?s-1:s,i),this.finishNode(o,u===a.types.logicalOR||u===a.types.logicalAND?"LogicalExpression":"BinaryExpression"),this.parseExprOp(o,e,n,r,i)}return t},p.parseMaybeUnary=function(t){if(this.state.type.prefix){var e=this.startNode(),n=this.match(a.types.incDec);e.operator=this.state.value,e.prefix=!0,this.next();var r=this.state.type;return this.addExtra(e,"parenthesizedArgument",r===a.types.parenL),e.argument=this.parseMaybeUnary(),t&&t.start&&this.unexpected(t.start),n?this.checkLVal(e.argument):this.state.strict&&"delete"===e.operator&&"Identifier"===e.argument.type&&this.raise(e.start,"Deleting local variable in strict mode"),this.finishNode(e,n?"UpdateExpression":"UnaryExpression")}var i=this.state.start,s=this.state.startLoc,o=this.parseExprSubscripts(t);if(t&&t.start)return o;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var e=this.startNodeAt(i,s);e.operator=this.state.value,e.prefix=!1,e.argument=o,this.checkLVal(o),this.next(),o=this.finishNode(e,"UpdateExpression")}return o},p.parseExprSubscripts=function(t){var e=this.state.start,n=this.state.startLoc,r=this.state.potentialArrowAt,i=this.parseExprAtom(t);return"ArrowFunctionExpression"===i.type&&i.start===r?i:t&&t.start?i:this.parseSubscripts(i,e,n)},p.parseSubscripts=function(t,e,n,r){for(;;){if(!r&&this.eat(a.types.doubleColon)){var i=this.startNodeAt(e,n);return i.object=t,i.callee=this.parseNoCallExpr(),this.parseSubscripts(this.finishNode(i,"BindExpression"),e,n,r)}if(this.eat(a.types.dot)){var i=this.startNodeAt(e,n);i.object=t,i.property=this.parseIdentifier(!0),i.computed=!1,t=this.finishNode(i,"MemberExpression")}else if(this.eat(a.types.bracketL)){var i=this.startNodeAt(e,n);i.object=t,i.property=this.parseExpression(),i.computed=!0,this.expect(a.types.bracketR),t=this.finishNode(i,"MemberExpression")}else if(!r&&this.match(a.types.parenL)){var s=this.state.potentialArrowAt===t.start&&"Identifier"===t.type&&"async"===t.name&&!this.canInsertSemicolon();this.next();var i=this.startNodeAt(e,n);if(i.callee=t,i.arguments=this.parseCallExpressionArguments(a.types.parenR,this.hasPlugin("trailingFunctionCommas"),s),t=this.finishNode(i,"CallExpression"),s&&this.shouldParseAsyncArrow())return this.parseAsyncArrowFromCallExpression(this.startNodeAt(e,n),i);this.toReferencedList(i.arguments)}else{if(!this.match(a.types.backQuote))return t;var i=this.startNodeAt(e,n);i.tag=t,i.quasi=this.parseTemplate(),t=this.finishNode(i,"TaggedTemplateExpression")}}},p.parseCallExpressionArguments=function(t,e,n){for(var r=void 0,i=[],s=!0;!this.eat(t);){if(s)s=!1;else if(this.expect(a.types.comma),e&&this.eat(t))break;this.match(a.types.parenL)&&!r&&(r=this.state.start),i.push(this.parseExprListItem())}return n&&r&&this.shouldParseAsyncArrow()&&this.unexpected(),i},p.shouldParseAsyncArrow=function(){return this.match(a.types.arrow)},p.parseAsyncArrowFromCallExpression=function(t,e){return this.hasPlugin("asyncFunctions")||this.unexpected(),this.expect(a.types.arrow),this.parseArrowExpression(t,e.arguments,!0)},p.parseNoCallExpr=function(){var t=this.state.start,e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,e,!0)},p.parseExprAtom=function(t){var e=void 0,n=this.state.potentialArrowAt===this.state.start;switch(this.state.type){case a.types._super:return this.state.inMethod||this.options.allowSuperOutsideMethod||this.raise(this.state.start,"'super' outside of function or class"),e=this.startNode(),this.next(),this.match(a.types.parenL)||this.match(a.types.bracketL)||this.match(a.types.dot)||this.unexpected(),this.match(a.types.parenL)&&"constructor"!==this.state.inMethod&&!this.options.allowSuperOutsideMethod&&this.raise(e.start,"super() outside of class constructor"),this.finishNode(e,"Super");case a.types._this:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case a.types._yield:this.state.inGenerator&&this.unexpected();case a.types.name:e=this.startNode();var r=this.hasPlugin("asyncFunctions")&&"await"===this.state.value&&this.state.inAsync,i=this.shouldAllowYieldIdentifier(),s=this.parseIdentifier(r||i);if(this.hasPlugin("asyncFunctions"))if("await"===s.name){if(this.state.inAsync||this.inModule)return this.parseAwait(e)}else{if("async"===s.name&&this.match(a.types._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(e,!1,!1,!0);if(n&&"async"===s.name&&this.match(a.types.name)){var o=[this.parseIdentifier()];return this.expect(a.types.arrow),this.parseArrowExpression(e,o,!0)}}return n&&!this.canInsertSemicolon()&&this.eat(a.types.arrow)?this.parseArrowExpression(e,[s]):s;case a.types._do:if(this.hasPlugin("doExpressions")){var u=this.startNode();this.next();var l=this.state.inFunction,p=this.state.labels;return this.state.labels=[],this.state.inFunction=!1,u.body=this.parseBlock(!1,!0),this.state.inFunction=l,this.state.labels=p,this.finishNode(u,"DoExpression")}case a.types.regexp:var c=this.state.value;return e=this.parseLiteral(c.value,"RegExpLiteral"),e.pattern=c.pattern,e.flags=c.flags,e;case a.types.num:return this.parseLiteral(this.state.value,"NumericLiteral");case a.types.string:return this.parseLiteral(this.state.value,"StringLiteral");case a.types._null:return e=this.startNode(),this.next(),this.finishNode(e,"NullLiteral");case a.types._true:case a.types._false:return e=this.startNode(),e.value=this.match(a.types._true),this.next(),this.finishNode(e,"BooleanLiteral");case a.types.parenL:return this.parseParenAndDistinguishExpression(null,null,n);case a.types.bracketL:return e=this.startNode(),this.next(),e.elements=this.parseExprList(a.types.bracketR,!0,!0,t),this.toReferencedList(e.elements),this.finishNode(e,"ArrayExpression");case a.types.braceL:return this.parseObj(!1,t);case a.types._function:return e=this.startNode(),this.next(),this.parseFunction(e,!1);case a.types.at:this.parseDecorators();case a.types._class:return e=this.startNode(),this.takeDecorators(e),this.parseClass(e,!1);case a.types._new:return this.parseNew();case a.types.backQuote:return this.parseTemplate();case a.types.doubleColon:e=this.startNode(),this.next(),e.object=null;var f=e.callee=this.parseNoCallExpr();if("MemberExpression"===f.type)return this.finishNode(e,"BindExpression");this.raise(f.start,"Binding should be performed on object property.");default:this.unexpected()}},p.parseLiteral=function(t,e){var n=this.startNode();return this.addExtra(n,"rawValue",t),this.addExtra(n,"raw",this.input.slice(this.state.start,this.state.end)),n.value=t,this.next(),this.finishNode(n,e)},p.parseParenExpression=function(){this.expect(a.types.parenL);var t=this.parseExpression();return this.expect(a.types.parenR),t},p.parseParenAndDistinguishExpression=function(t,e,n,r){t=t||this.state.start,e=e||this.state.startLoc;var i=void 0;this.next();for(var s=this.state.start,o=this.state.startLoc,u=[],l=!0,p={start:0},c=void 0,f=void 0;!this.match(a.types.parenR);){if(l)l=!1;else if(this.expect(a.types.comma),this.match(a.types.parenR)&&this.hasPlugin("trailingFunctionCommas")){f=this.state.start;break}if(this.match(a.types.ellipsis)){var h=this.state.start,d=this.state.startLoc;c=this.state.start,u.push(this.parseParenItem(this.parseRest(),d,h));break}u.push(this.parseMaybeAssign(!1,p,this.parseParenItem))}var m=this.state.start,y=this.state.startLoc;if(this.expect(a.types.parenR),n&&!this.canInsertSemicolon()&&this.eat(a.types.arrow)){for(var g=0;g<u.length;g++){var v=u[g];v.extra&&v.extra.parenthesized&&this.unexpected(v.extra.parenStart)}return this.parseArrowExpression(this.startNodeAt(t,e),u,r)}if(!u.length){if(r)return;this.unexpected(this.state.lastTokStart)}return f&&this.unexpected(f),c&&this.unexpected(c),p.start&&this.unexpected(p.start),u.length>1?(i=this.startNodeAt(s,o),i.expressions=u,this.toReferencedList(i.expressions),this.finishNodeAt(i,"SequenceExpression",m,y)):i=u[0],this.addExtra(i,"parenthesized",!0),this.addExtra(i,"parenStart",t),i},p.parseParenItem=function(t){return t},p.parseNew=function(){var t=this.startNode(),e=this.parseIdentifier(!0);return this.eat(a.types.dot)?(t.meta=e,t.property=this.parseIdentifier(!0),"target"!==t.property.name&&this.raise(t.property.start,"The only valid meta property for new is new.target"),this.finishNode(t,"MetaProperty")):(t.callee=this.parseNoCallExpr(),this.eat(a.types.parenL)?(t.arguments=this.parseExprList(a.types.parenR,this.hasPlugin("trailingFunctionCommas")),this.toReferencedList(t.arguments)):t.arguments=[],this.finishNode(t,"NewExpression"))},p.parseTemplateElement=function(){var t=this.startNode();return t.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),t.tail=this.match(a.types.backQuote),this.finishNode(t,"TemplateElement")},p.parseTemplate=function(){var t=this.startNode();this.next(),t.expressions=[];var e=this.parseTemplateElement();for(t.quasis=[e];!e.tail;)this.expect(a.types.dollarBraceL),t.expressions.push(this.parseExpression()),this.expect(a.types.braceR),t.quasis.push(e=this.parseTemplateElement());return this.next(),this.finishNode(t,"TemplateLiteral")},p.parseObj=function(t,e){var n=[],i=r(null),s=!0,o=this.startNode();for(o.properties=[],this.next();!this.eat(a.types.braceR);){if(s)s=!1;else if(this.expect(a.types.comma),this.eat(a.types.braceR))break;for(;this.match(a.types.at);)n.push(this.parseDecorator());var u=this.startNode(),l=!1,p=!1,c=void 0,f=void 0;if(n.length&&(u.decorators=n,n=[]),this.hasPlugin("objectRestSpread")&&this.match(a.types.ellipsis))u=this.parseSpread(),u.type=t?"RestProperty":"SpreadProperty",o.properties.push(u);else{if(u.method=!1,u.shorthand=!1,(t||e)&&(c=this.state.start,f=this.state.startLoc),t||(l=this.eat(a.types.star)),!t&&this.hasPlugin("asyncFunctions")&&this.isContextual("async")){l&&this.unexpected();var h=this.parseIdentifier();this.match(a.types.colon)||this.match(a.types.parenL)||this.match(a.types.braceR)?u.key=h:(p=!0,this.hasPlugin("asyncGenerators")&&(l=this.eat(a.types.star)),this.parsePropertyName(u))}else this.parsePropertyName(u);this.parseObjPropValue(u,c,f,l,p,t,e),this.checkPropClash(u,i),u.shorthand&&this.addExtra(u,"shorthand",!0),o.properties.push(u)}}return n.length&&this.raise(this.state.start,"You have trailing decorators with no property"),this.finishNode(o,t?"ObjectPattern":"ObjectExpression")},p.parseObjPropValue=function(t,e,n,r,i,s,o){if(i||r||this.match(a.types.parenL))return s&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,r,i),this.finishNode(t,"ObjectMethod");if(this.eat(a.types.colon))return t.value=s?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,o),this.finishNode(t,"ObjectProperty");if(!(t.computed||"Identifier"!==t.key.type||"get"!==t.key.name&&"set"!==t.key.name||this.match(a.types.comma)||this.match(a.types.braceR))){(r||i||s)&&this.unexpected(),
t.kind=t.key.name,this.parsePropertyName(t),this.parseMethod(t,!1);var u="get"===t.kind?0:1;if(t.params.length!==u){var p=t.start;"get"===t.kind?this.raise(p,"getter should have no params"):this.raise(p,"setter should have exactly one param")}return this.finishNode(t,"ObjectMethod")}if(!t.computed&&"Identifier"===t.key.type){if(s){var c=this.isKeyword(t.key.name);!c&&this.state.strict&&(c=l.reservedWords.strictBind(t.key.name)||l.reservedWords.strict(t.key.name)),c&&this.raise(t.key.start,"Binding "+t.key.name),t.value=this.parseMaybeDefault(e,n,t.key.__clone())}else this.match(a.types.eq)&&o?(o.start||(o.start=this.state.start),t.value=this.parseMaybeDefault(e,n,t.key.__clone())):t.value=t.key.__clone();return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}this.unexpected()},p.parsePropertyName=function(t){return this.eat(a.types.bracketL)?(t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(a.types.bracketR),t.key):(t.computed=!1,t.key=this.match(a.types.num)||this.match(a.types.string)?this.parseExprAtom():this.parseIdentifier(!0))},p.initFunction=function(t,e){t.id=null,t.generator=!1,t.expression=!1,this.hasPlugin("asyncFunctions")&&(t.async=!!e)},p.parseMethod=function(t,e,n){var r=this.state.inMethod;return this.state.inMethod=t.kind||!0,this.initFunction(t,n),this.expect(a.types.parenL),t.params=this.parseBindingList(a.types.parenR,!1,this.hasPlugin("trailingFunctionCommas")),t.generator=e,this.parseFunctionBody(t),this.state.inMethod=r,t},p.parseArrowExpression=function(t,e,n){return this.initFunction(t,n),t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0),this.finishNode(t,"ArrowFunctionExpression")},p.parseFunctionBody=function(t,e){var n=e&&!this.match(a.types.braceL),s=this.state.inAsync;if(this.state.inAsync=t.async,n)t.body=this.parseMaybeAssign(),t.expression=!0;else{var o=this.state.inFunction,u=this.state.inGenerator,l=this.state.labels;this.state.inFunction=!0,this.state.inGenerator=t.generator,this.state.labels=[],t.body=this.parseBlock(!0),t.expression=!1,this.state.inFunction=o,this.state.inGenerator=u,this.state.labels=l}this.state.inAsync=s;var p=this.state.strict,c=!1,f=!1;if(e&&(p=!0),!n&&t.body.directives.length)for(var h=t.body.directives,d=Array.isArray(h),m=0,h=d?h:i(h);;){var y;if(d){if(m>=h.length)break;y=h[m++]}else{if(m=h.next(),m.done)break;y=m.value}var g=y;if("use strict"===g.value.value){f=!0,p=!0,c=!0;break}}if(f&&t.id&&"Identifier"===t.id.type&&"yield"===t.id.name&&this.raise(t.id.start,"Binding yield in strict mode"),p){var v=r(null),A=this.state.strict;c&&(this.state.strict=!0),t.id&&this.checkLVal(t.id,!0);for(var E=t.params,b=Array.isArray(E),x=0,E=b?E:i(E);;){var D;if(b){if(x>=E.length)break;D=E[x++]}else{if(x=E.next(),x.done)break;D=x.value}var C=D;this.checkLVal(C,!0,v)}this.state.strict=A}},p.parseExprList=function(t,e,n,r){for(var i=[],s=!0;!this.eat(t);){if(s)s=!1;else if(this.expect(a.types.comma),e&&this.eat(t))break;i.push(this.parseExprListItem(n,r))}return i},p.parseExprListItem=function(t,e){var n=void 0;return n=t&&this.match(a.types.comma)?null:this.match(a.types.ellipsis)?this.parseSpread(e):this.parseMaybeAssign(!1,e)},p.parseIdentifier=function(t){var e=this.startNode();return this.match(a.types.name)?(!t&&this.state.strict&&l.reservedWords.strict(this.state.value)&&this.raise(this.state.start,"The keyword '"+this.state.value+"' is reserved"),e.name=this.state.value):t&&this.state.type.keyword?e.name=this.state.type.keyword:this.unexpected(),!t&&"await"===e.name&&this.state.inAsync&&this.raise(e.start,"invalid use of await inside of an async function"),this.next(),this.finishNode(e,"Identifier")},p.parseAwait=function(t){return this.state.inAsync||this.unexpected(),this.isLineTerminator()&&this.unexpected(),t.all=this.eat(a.types.star),t.argument=this.parseMaybeUnary(),this.finishNode(t,"AwaitExpression")},p.parseYield=function(){var t=this.startNode();return this.next(),this.match(a.types.semi)||this.canInsertSemicolon()||!this.match(a.types.star)&&!this.state.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(a.types.star),t.argument=this.parseMaybeAssign()),this.finishNode(t,"YieldExpression")}},{626:626,638:638,639:639,642:642,643:643,647:647}],626:[function(t,e,n){"use strict";var r=t(646)["default"],i=t(645)["default"],s=t(642)["default"],a=t(647)["default"];n.__esModule=!0;var o=t(639),u=t(623),l=t(636),p=a(l),c={};n.plugins=c;var f=function(t){function e(n,r){i(this,e),n=u.getOptions(n),t.call(this,n,r),this.options=n,this.inModule="module"===this.options.sourceType,this.isReservedWord=o.reservedWords[6],this.input=r,this.plugins=this.loadPlugins(this.options.plugins),0===this.state.pos&&"#"===this.input[0]&&"!"===this.input[1]&&this.skipLineComment(2)}return r(e,t),e.prototype.hasPlugin=function(t){return!(!this.plugins["*"]&&!this.plugins[t])},e.prototype.extend=function(t,e){this[t]=e(this[t])},e.prototype.loadPlugins=function(t){var e={};t.indexOf("flow")>=0&&(t.splice(t.indexOf("flow"),1),t.push("flow"));for(var r=t,i=Array.isArray(r),a=0,r=i?r:s(r);;){var o;if(i){if(a>=r.length)break;o=r[a++]}else{if(a=r.next(),a.done)break;o=a.value}var u=o;e[u]=!0;var l=n.plugins[u];l&&l(this)}return e},e.prototype.parse=function(){var t=this.startNode(),e=this.startNode();return this.nextToken(),this.parseTopLevel(t,e)},e}(p["default"]);n["default"]=f},{623:623,636:636,639:639,642:642,645:645,646:646,647:647}],627:[function(t,e,n){"use strict";var r=t(647)["default"],i=t(640),s=t(626),a=r(s),o=a["default"].prototype;o.raise=function(t,e){var n=i.getLineInfo(this.input,t);e+=" ("+n.line+":"+n.column+")";var r=new SyntaxError(e);throw r.pos=t,r.loc=n,r}},{626:626,640:640,647:647}],628:[function(t,e,n){"use strict";var r=t(642)["default"],i=t(647)["default"],s=t(638),a=t(626),o=i(a),u=t(639),l=o["default"].prototype;l.toAssignable=function(t,e){if(t)switch(t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":t.type="ObjectPattern";for(var n=t.properties,i=Array.isArray(n),s=0,n=i?n:r(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;"ObjectMethod"===o.type?"get"===o.kind||"set"===o.kind?this.raise(o.key.start,"Object pattern can't contain getter or setter"):this.raise(o.key.start,"Object pattern can't contain methods"):this.toAssignable(o,e)}break;case"ObjectProperty":this.toAssignable(t.value,e);break;case"SpreadProperty":t.type="RestProperty";break;case"ArrayExpression":t.type="ArrayPattern",this.toAssignableList(t.elements,e);break;case"AssignmentExpression":"="===t.operator?(t.type="AssignmentPattern",delete t.operator):this.raise(t.left.end,"Only '=' operator can be used for specifying default value.");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}return t},l.toAssignableList=function(t,e){var n=t.length;if(n){var r=t[n-1];if(r&&"RestElement"===r.type)--n;else if(r&&"SpreadElement"===r.type){r.type="RestElement";var i=r.argument;this.toAssignable(i,e),"Identifier"!==i.type&&"MemberExpression"!==i.type&&"ArrayPattern"!==i.type&&this.unexpected(i.start),--n}}for(var s=0;n>s;s++){var a=t[s];a&&this.toAssignable(a,e)}return t},l.toReferencedList=function(t){return t},l.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(t),this.finishNode(e,"SpreadElement")},l.parseRest=function(){var t=this.startNode();return this.next(),t.argument=this.parseBindingIdentifier(),this.finishNode(t,"RestElement")},l.shouldAllowYieldIdentifier=function(){return this.match(s.types._yield)&&!this.state.strict&&!this.state.inGenerator},l.parseBindingIdentifier=function(){return this.parseIdentifier(this.shouldAllowYieldIdentifier())},l.parseBindingAtom=function(){switch(this.state.type){case s.types._yield:(this.state.strict||this.state.inGenerator)&&this.unexpected();case s.types.name:return this.parseIdentifier(!0);case s.types.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(s.types.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case s.types.braceL:return this.parseObj(!0);default:this.unexpected()}},l.parseBindingList=function(t,e,n){for(var r=[],i=!0;!this.eat(t);)if(i?i=!1:this.expect(s.types.comma),e&&this.match(s.types.comma))r.push(null);else{if(n&&this.eat(t))break;if(this.match(s.types.ellipsis)){r.push(this.parseAssignableListItemTypes(this.parseRest())),this.expect(t);break}var a=this.parseMaybeDefault();this.parseAssignableListItemTypes(a),r.push(this.parseMaybeDefault(null,null,a))}return r},l.parseAssignableListItemTypes=function(t){return t},l.parseMaybeDefault=function(t,e,n){if(e=e||this.state.startLoc,t=t||this.state.start,n=n||this.parseBindingAtom(),!this.eat(s.types.eq))return n;var r=this.startNodeAt(t,e);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},l.checkLVal=function(t,e,n){switch(t.type){case"Identifier":this.state.strict&&(u.reservedWords.strictBind(t.name)||u.reservedWords.strict(t.name))&&this.raise(t.start,(e?"Binding ":"Assigning to ")+t.name+" in strict mode"),n&&(n[t.name]?this.raise(t.start,"Argument name clash in strict mode"):n[t.name]=!0);break;case"MemberExpression":e&&this.raise(t.start,(e?"Binding":"Assigning to")+" member expression");break;case"ObjectPattern":for(var i=t.properties,s=Array.isArray(i),a=0,i=s?i:r(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var l=o;"ObjectProperty"===l.type&&(l=l.value),this.checkLVal(l,e,n)}break;case"ArrayPattern":for(var p=t.elements,c=Array.isArray(p),f=0,p=c?p:r(p);;){var h;if(c){if(f>=p.length)break;h=p[f++]}else{if(f=p.next(),f.done)break;h=f.value}var d=h;d&&this.checkLVal(d,e,n)}break;case"AssignmentPattern":this.checkLVal(t.left,e,n);break;case"RestProperty":case"RestElement":this.checkLVal(t.argument,e,n);break;default:this.raise(t.start,(e?"Binding":"Assigning to")+" rvalue")}}},{626:626,638:638,639:639,642:642,647:647}],629:[function(t,e,n){"use strict";function r(t,e,n,r){return t.type=e,t.end=n,t.loc.end=r,this.processComment(t),t}var i=t(645)["default"],s=t(647)["default"],a=t(626),o=s(a),u=t(640),l=o["default"].prototype,p=function(){function t(e,n){i(this,t),this.type="",this.start=e,this.end=0,this.loc=new u.SourceLocation(n)}return t.prototype.__clone=function(){var e=new t;for(var n in this)e[n]=this[n];return e},t}();l.startNode=function(){return new p(this.state.start,this.state.startLoc)},l.startNodeAt=function(t,e){return new p(t,e)},l.finishNode=function(t,e){return r.call(this,t,e,this.state.lastTokEnd,this.state.lastTokEndLoc)},l.finishNodeAt=function(t,e,n,i){return r.call(this,t,e,n,i)}},{626:626,640:640,645:645,647:647}],630:[function(t,e,n){"use strict";var r=t(643)["default"],i=t(642)["default"],s=t(647)["default"],a=t(638),o=t(626),u=s(o),l=t(641),p=u["default"].prototype;p.parseTopLevel=function(t,e){return e.sourceType=this.options.sourceType,this.parseBlockBody(e,!0,!0,a.types.eof),t.program=this.finishNode(e,"Program"),t.comments=this.state.comments,t.tokens=this.state.tokens,this.finishNode(t,"File")};var c={kind:"loop"},f={kind:"switch"};p.parseDirective=function(){var t=this.startNode(),e=this.startNode(),n=this.input.slice(this.state.start,this.state.end),r=t.value=n.slice(1,-1);return this.addExtra(t,"raw",n),this.addExtra(t,"rawValue",r),this.next(),e.value=this.finishNode(t,"DirectiveLiteral"),this.semicolon(),this.finishNode(e,"Directive")},p.parseStatement=function(t,e){this.match(a.types.at)&&this.parseDecorators(!0);var n=this.state.type,r=this.startNode();switch(n){case a.types._break:case a.types._continue:return this.parseBreakContinueStatement(r,n.keyword);case a.types._debugger:return this.parseDebuggerStatement(r);case a.types._do:return this.parseDoStatement(r);case a.types._for:return this.parseForStatement(r);case a.types._function:return t||this.unexpected(),this.parseFunctionStatement(r);case a.types._class:return t||this.unexpected(),this.takeDecorators(r),this.parseClass(r,!0);case a.types._if:return this.parseIfStatement(r);case a.types._return:return this.parseReturnStatement(r);case a.types._switch:return this.parseSwitchStatement(r);case a.types._throw:return this.parseThrowStatement(r);case a.types._try:return this.parseTryStatement(r);case a.types._let:case a.types._const:t||this.unexpected();case a.types._var:return this.parseVarStatement(r,n);case a.types._while:return this.parseWhileStatement(r);case a.types._with:return this.parseWithStatement(r);case a.types.braceL:return this.parseBlock();case a.types.semi:return this.parseEmptyStatement(r);case a.types._export:case a.types._import:return this.options.allowImportExportEverywhere||(e||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: module'")),n===a.types._import?this.parseImport(r):this.parseExport(r);case a.types.name:if(this.hasPlugin("asyncFunctions")&&"async"===this.state.value){var i=this.state.clone();if(this.next(),this.match(a.types._function)&&!this.canInsertSemicolon())return this.expect(a.types._function),this.parseFunction(r,!0,!1,!0);this.state=i}}var s=this.state.value,o=this.parseExpression();return n===a.types.name&&"Identifier"===o.type&&this.eat(a.types.colon)?this.parseLabeledStatement(r,s,o):this.parseExpressionStatement(r,o)},p.takeDecorators=function(t){this.state.decorators.length&&(t.decorators=this.state.decorators,this.state.decorators=[])},p.parseDecorators=function(t){for(;this.match(a.types.at);)this.state.decorators.push(this.parseDecorator());t&&this.match(a.types._export)||this.match(a.types._class)||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")},p.parseDecorator=function(){this.hasPlugin("decorators")||this.unexpected();var t=this.startNode();return this.next(),t.expression=this.parseMaybeAssign(),this.finishNode(t,"Decorator")},p.parseBreakContinueStatement=function(t,e){var n="break"===e;this.next(),this.isLineTerminator()?t.label=null:this.match(a.types.name)?(t.label=this.parseIdentifier(),this.semicolon()):this.unexpected();var r=void 0;for(r=0;r<this.state.labels.length;++r){var i=this.state.labels[r];if(null==t.label||i.name===t.label.name){if(null!=i.kind&&(n||"loop"===i.kind))break;if(t.label&&n)break}}return r===this.state.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,n?"BreakStatement":"ContinueStatement")},p.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")},p.parseDoStatement=function(t){return this.next(),this.state.labels.push(c),t.body=this.parseStatement(!1),this.state.labels.pop(),this.expect(a.types._while),t.test=this.parseParenExpression(),this.eat(a.types.semi),this.finishNode(t,"DoWhileStatement")},p.parseForStatement=function(t){if(this.next(),this.state.labels.push(c),this.expect(a.types.parenL),this.match(a.types.semi))return this.parseFor(t,null);if(this.match(a.types._var)||this.match(a.types._let)||this.match(a.types._const)){var e=this.startNode(),n=this.state.type;return this.next(),this.parseVar(e,!0,n),this.finishNode(e,"VariableDeclaration"),!this.match(a.types._in)&&!this.isContextual("of")||1!==e.declarations.length||e.declarations[0].init?this.parseFor(t,e):this.parseForIn(t,e)}var r={start:0},i=this.parseExpression(!0,r);return this.match(a.types._in)||this.isContextual("of")?(this.toAssignable(i),this.checkLVal(i),this.parseForIn(t,i)):(r.start&&this.unexpected(r.start),this.parseFor(t,i))},p.parseFunctionStatement=function(t){return this.next(),this.parseFunction(t,!0)},p.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement(!1),t.alternate=this.eat(a.types._else)?this.parseStatement(!1):null,this.finishNode(t,"IfStatement")},p.parseReturnStatement=function(t){return this.state.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.state.start,"'return' outside of function"),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},p.parseSwitchStatement=function(t){this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(a.types.braceL),this.state.labels.push(f);for(var e=void 0,n=void 0;!this.match(a.types.braceR);)if(this.match(a.types._case)||this.match(a.types._default)){var r=this.match(a.types._case);e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),r?e.test=this.parseExpression():(n&&this.raise(this.state.lastTokStart,"Multiple default clauses"),n=!0,e.test=null),this.expect(a.types.colon)}else e?e.consequent.push(this.parseStatement(!0)):this.unexpected();return e&&this.finishNode(e,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")},p.parseThrowStatement=function(t){return this.next(),l.lineBreak.test(this.input.slice(this.state.lastTokEnd,this.state.start))&&this.raise(this.state.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var h=[];p.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(a.types._catch)){var e=this.startNode();this.next(),this.expect(a.types.parenL),e.param=this.parseBindingAtom(),this.checkLVal(e.param,!0,r(null)),this.expect(a.types.parenR),e.body=this.parseBlock(),t.handler=this.finishNode(e,"CatchClause")}return t.guardedHandlers=h,t.finalizer=this.eat(a.types._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},p.parseVarStatement=function(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")},p.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.state.labels.push(c),t.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(t,"WhileStatement")},p.parseWithStatement=function(t){return this.state.strict&&this.raise(this.state.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement(!1),this.finishNode(t,"WithStatement")},p.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},p.parseLabeledStatement=function(t,e,n){for(var r=this.state.labels,s=Array.isArray(r),o=0,r=s?r:i(r);;){var u;if(s){if(o>=r.length)break;u=r[o++]}else{if(o=r.next(),o.done)break;u=o.value}var l=u;l.name===e&&this.raise(n.start,"Label '"+e+"' is already declared")}for(var p=this.state.type.isLoop?"loop":this.match(a.types._switch)?"switch":null,c=this.state.labels.length-1;c>=0;c--){var l=this.state.labels[c];if(l.statementStart!==t.start)break;l.statementStart=this.state.start,l.kind=p}return this.state.labels.push({name:e,kind:p,statementStart:this.state.start}),t.body=this.parseStatement(!0),this.state.labels.pop(),t.label=n,this.finishNode(t,"LabeledStatement")},p.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},p.parseBlock=function(t){var e=this.startNode();return this.expect(a.types.braceL),this.parseBlockBody(e,t,!1,a.types.braceR),this.finishNode(e,"BlockStatement")},p.parseBlockBody=function(t,e,n,r){t.body=[],t.directives=[];for(var i=!1,s=void 0,o=void 0;!this.eat(r);){if(e&&!i&&this.match(a.types.string)){var u=this.state,l=this.lookahead();this.state=l;var p=this.isLineTerminator();if(this.state=u,p){this.state.containsOctal&&!o&&(o=this.state.octalPosition);var c=this.parseDirective();t.directives.push(c),e&&"use strict"===c.value.value&&(s=this.state.strict,this.state.strict=!0,this.setStrict(!0),o&&this.raise(o,"Octal literal in strict mode"));continue}}i=!0,t.body.push(this.parseStatement(!0,n))}s===!1&&this.setStrict(!1)},p.parseFor=function(t,e){return t.init=e,this.expect(a.types.semi),t.test=this.match(a.types.semi)?null:this.parseExpression(),this.expect(a.types.semi),t.update=this.match(a.types.parenR)?null:this.parseExpression(),this.expect(a.types.parenR),t.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(t,"ForStatement")},p.parseForIn=function(t,e){var n=this.match(a.types._in)?"ForInStatement":"ForOfStatement";return this.next(),t.left=e,t.right=this.parseExpression(),this.expect(a.types.parenR),t.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(t,n)},p.parseVar=function(t,e,n){for(t.declarations=[],t.kind=n.keyword;;){var r=this.startNode();if(this.parseVarHead(r),this.eat(a.types.eq)?r.init=this.parseMaybeAssign(e):n!==a.types._const||this.match(a.types._in)||this.isContextual("of")?"Identifier"===r.id.type||e&&(this.match(a.types._in)||this.isContextual("of"))?r.init=null:this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),t.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(a.types.comma))break}return t},p.parseVarHead=function(t){t.id=this.parseBindingAtom(),this.checkLVal(t.id,!0)},p.parseFunction=function(t,e,n,r,i){var s=this.state.inMethod;return this.state.inMethod=!1,this.initFunction(t,r),this.match(a.types.star)&&(t.async&&!this.hasPlugin("asyncGenerators")?this.unexpected():(t.generator=!0,this.next())),!e||i||this.match(a.types.name)||this.match(a.types._yield)||this.unexpected(),(this.match(a.types.name)||this.match(a.types._yield))&&(t.id=this.parseBindingIdentifier()),this.parseFunctionParams(t),this.parseFunctionBody(t,n),this.state.inMethod=s,this.finishNode(t,e?"FunctionDeclaration":"FunctionExpression")},p.parseFunctionParams=function(t){this.expect(a.types.parenL),t.params=this.parseBindingList(a.types.parenR,!1,this.hasPlugin("trailingFunctionCommas"))},p.parseClass=function(t,e,n){return this.next(),this.parseClassId(t,e,n),this.parseClassSuper(t),this.parseClassBody(t),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},p.isClassProperty=function(){return this.match(a.types.eq)||this.isLineTerminator()},p.parseClassBody=function(t){var e=this.state.strict;this.state.strict=!0;var n=!1,r=!1,i=[],s=this.startNode();for(s.body=[],this.expect(a.types.braceL);!this.eat(a.types.braceR);)if(!this.eat(a.types.semi))if(this.match(a.types.at))i.push(this.parseDecorator());else{var o=this.startNode();i.length&&(o.decorators=i,i=[]);var u=!1,l=this.match(a.types.name)&&"static"===this.state.value,p=this.eat(a.types.star),c=!1,f=!1;if(this.parsePropertyName(o),o["static"]=l&&!this.match(a.types.parenL),o["static"]&&(p&&this.unexpected(),p=this.eat(a.types.star),this.parsePropertyName(o)),!p&&"Identifier"===o.key.type&&!o.computed){if(this.isClassProperty()){s.body.push(this.parseClassProperty(o));continue}this.hasPlugin("classConstructorCall")&&"call"===o.key.name&&this.match(a.types.name)&&"constructor"===this.state.value&&(u=!0,this.parsePropertyName(o))}var h=this.hasPlugin("asyncFunctions")&&!this.match(a.types.parenL)&&!o.computed&&"Identifier"===o.key.type&&"async"===o.key.name;if(h&&(this.hasPlugin("asyncGenerators")&&this.eat(a.types.star)&&(p=!0),f=!0,this.parsePropertyName(o)),o.kind="method",!o.computed){var d=o.key;f||p||"Identifier"!==d.type||this.match(a.types.parenL)||"get"!==d.name&&"set"!==d.name||(c=!0,o.kind=d.name,d=this.parsePropertyName(o));var m=!u&&!o["static"]&&("Identifier"===d.type&&"constructor"===d.name||"StringLiteral"===d.type&&"constructor"===d.value);m&&(r&&this.raise(d.start,"Duplicate constructor in the same class"),c&&this.raise(d.start,"Constructor can't have get/set modifier"),p&&this.raise(d.start,"Constructor can't be a generator"),f&&this.raise(d.start,"Constructor can't be an async function"),o.kind="constructor",r=!0);var y=o["static"]&&("Identifier"===d.type&&"prototype"===d.name||"StringLiteral"===d.type&&"prototype"===d.value);y&&this.raise(d.start,"Classes may not have static property named prototype")}if(u&&(n&&this.raise(o.start,"Duplicate constructor call in the same class"),o.kind="constructorCall",n=!0),"constructor"!==o.kind&&"constructorCall"!==o.kind||!o.decorators||this.raise(o.start,"You can't attach decorators to a class constructor"),this.parseClassMethod(s,o,p,f),c){var g="get"===o.kind?0:1;if(o.params.length!==g){var v=o.start;"get"===o.kind?this.raise(v,"getter should have no params"):this.raise(v,"setter should have exactly one param")}}}i.length&&this.raise(this.state.start,"You have trailing decorators with no method"),t.body=this.finishNode(s,"ClassBody"),this.state.strict=e},p.parseClassProperty=function(t){return this.match(a.types.eq)?(this.hasPlugin("classProperties")||this.unexpected(),this.next(),t.value=this.parseMaybeAssign()):t.value=null,this.semicolon(),this.finishNode(t,"ClassProperty")},p.parseClassMethod=function(t,e,n,r){this.parseMethod(e,n,r),t.body.push(this.finishNode(e,"ClassMethod"))},p.parseClassId=function(t,e,n){this.match(a.types.name)?t.id=this.parseIdentifier():n||!e?t.id=null:this.unexpected()},p.parseClassSuper=function(t){t.superClass=this.eat(a.types._extends)?this.parseExprSubscripts():null},p.parseExport=function(t){if(this.next(),this.match(a.types.star)){var e=this.startNode();if(this.next(),!this.hasPlugin("exportExtensions")||!this.eatContextual("as"))return this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration");e.exported=this.parseIdentifier(),t.specifiers=[this.finishNode(e,"ExportNamespaceSpecifier")],this.parseExportSpecifiersMaybe(t),this.parseExportFrom(t,!0)}else if(this.hasPlugin("exportExtensions")&&this.isExportDefaultSpecifier()){var e=this.startNode();if(e.exported=this.parseIdentifier(!0),t.specifiers=[this.finishNode(e,"ExportDefaultSpecifier")],this.match(a.types.comma)&&this.lookahead().type===a.types.star){this.expect(a.types.comma);var n=this.startNode();this.expect(a.types.star),this.expectContextual("as"),n.exported=this.parseIdentifier(),t.specifiers.push(this.finishNode(n,"ExportNamespaceSpecifier"))}else this.parseExportSpecifiersMaybe(t);this.parseExportFrom(t,!0)}else{if(this.eat(a.types._default)){var r=this.startNode(),i=!1;return this.eat(a.types._function)?r=this.parseFunction(r,!0,!1,!1,!0):this.match(a.types._class)?r=this.parseClass(r,!0,!0):(i=!0,r=this.parseMaybeAssign()),t.declaration=r,i&&this.semicolon(),this.checkExport(t),this.finishNode(t,"ExportDefaultDeclaration")}this.state.type.keyword||this.shouldParseExportDeclaration()?(t.specifiers=[],t.source=null,t.declaration=this.parseExportDeclaration(t)):(t.declaration=null,t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t))}return this.checkExport(t),this.finishNode(t,"ExportNamedDeclaration")},p.parseExportDeclaration=function(){return this.parseStatement(!0)},p.isExportDefaultSpecifier=function(){if(this.match(a.types.name))return"type"!==this.state.value&&"async"!==this.state.value;if(!this.match(a.types._default))return!1;var t=this.lookahead();return t.type===a.types.comma||t.type===a.types.name&&"from"===t.value},p.parseExportSpecifiersMaybe=function(t){this.eat(a.types.comma)&&(t.specifiers=t.specifiers.concat(this.parseExportSpecifiers()))},p.parseExportFrom=function(t,e){this.eatContextual("from")?(t.source=this.match(a.types.string)?this.parseExprAtom():this.unexpected(),this.checkExport(t)):e?this.unexpected():t.source=null,this.semicolon()},p.shouldParseExportDeclaration=function(){return this.hasPlugin("asyncFunctions")&&this.isContextual("async")},p.checkExport=function(t){if(this.state.decorators.length){var e=t.declaration&&("ClassDeclaration"===t.declaration.type||"ClassExpression"===t.declaration.type);t.declaration&&e||this.raise(t.start,"You can only use decorators on an export when exporting a class"),this.takeDecorators(t.declaration)}},p.parseExportSpecifiers=function(){var t=[],e=!0,n=void 0;for(this.expect(a.types.braceL);!this.eat(a.types.braceR);){if(e)e=!1;else if(this.expect(a.types.comma),this.eat(a.types.braceR))break;var r=this.match(a.types._default);r&&!n&&(n=!0);var i=this.startNode();i.local=this.parseIdentifier(r),i.exported=this.eatContextual("as")?this.parseIdentifier(!0):i.local.__clone(),t.push(this.finishNode(i,"ExportSpecifier"))}return n&&!this.isContextual("from")&&this.unexpected(),t},p.parseImport=function(t){return this.next(),this.match(a.types.string)?(t.specifiers=[],t.source=this.parseExprAtom()):(t.specifiers=[],this.parseImportSpecifiers(t),this.expectContextual("from"),t.source=this.match(a.types.string)?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(t,"ImportDeclaration")},p.parseImportSpecifiers=function(t){var e=!0;if(this.match(a.types.name)){var n=this.state.start,r=this.state.startLoc;if(t.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(),n,r)),!this.eat(a.types.comma))return}if(this.match(a.types.star)){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdentifier(),this.checkLVal(i.local,!0),void t.specifiers.push(this.finishNode(i,"ImportNamespaceSpecifier"))}for(this.expect(a.types.braceL);!this.eat(a.types.braceR);){if(e)e=!1;else if(this.expect(a.types.comma),this.eat(a.types.braceR))break;var i=this.startNode();i.imported=this.parseIdentifier(!0),i.local=this.eatContextual("as")?this.parseIdentifier():i.imported.__clone(),this.checkLVal(i.local,!0),t.specifiers.push(this.finishNode(i,"ImportSpecifier"))}},p.parseImportSpecifierDefault=function(t,e,n){var r=this.startNodeAt(e,n);return r.local=t,this.checkLVal(r.local,!0),this.finishNode(r,"ImportDefaultSpecifier")}},{626:626,638:638,641:641,642:642,643:643,647:647}],631:[function(t,e,n){"use strict";var r=t(647)["default"],i=t(638),s=t(626),a=r(s),o=t(641),u=a["default"].prototype;u.addExtra=function(t,e,n){if(t){var r=t.extra=t.extra||{};r[e]=n}},u.isRelational=function(t){return this.match(i.types.relational)&&this.state.value===t},u.expectRelational=function(t){this.isRelational(t)?this.next():this.unexpected()},u.isContextual=function(t){return this.match(i.types.name)&&this.state.value===t},u.eatContextual=function(t){return this.state.value===t&&this.eat(i.types.name)},u.expectContextual=function(t){this.eatContextual(t)||this.unexpected()},u.canInsertSemicolon=function(){return this.match(i.types.eof)||this.match(i.types.braceR)||o.lineBreak.test(this.input.slice(this.state.lastTokEnd,this.state.start))},u.isLineTerminator=function(){return this.eat(i.types.semi)||this.canInsertSemicolon()},u.semicolon=function(){this.isLineTerminator()||this.unexpected()},u.expect=function(t){return this.eat(t)||this.unexpected()},u.unexpected=function(t){this.raise(null!=t?t:this.state.start,"Unexpected token")}},{626:626,638:638,641:641,647:647}],632:[function(t,e,n){"use strict";var r=t(647)["default"];n.__esModule=!0;var i=t(638),s=t(626),a=r(s),o=a["default"].prototype;o.flowParseTypeInitialiser=function(t){var e=this.state.inType;this.state.inType=!0,this.expect(t||i.types.colon);var n=this.flowParseType();return this.state.inType=e,n},o.flowParseDeclareClass=function(t){return this.next(),this.flowParseInterfaceish(t,!0),this.finishNode(t,"DeclareClass")},o.flowParseDeclareFunction=function(t){this.next();var e=t.id=this.parseIdentifier(),n=this.startNode(),r=this.startNode();this.isRelational("<")?n.typeParameters=this.flowParseTypeParameterDeclaration():n.typeParameters=null,this.expect(i.types.parenL);var s=this.flowParseFunctionTypeParams();return n.params=s.params,n.rest=s.rest,this.expect(i.types.parenR),n.returnType=this.flowParseTypeInitialiser(),r.typeAnnotation=this.finishNode(n,"FunctionTypeAnnotation"),e.typeAnnotation=this.finishNode(r,"TypeAnnotation"),this.finishNode(e,e.type),this.semicolon(),this.finishNode(t,"DeclareFunction")},o.flowParseDeclare=function(t){return this.match(i.types._class)?this.flowParseDeclareClass(t):this.match(i.types._function)?this.flowParseDeclareFunction(t):this.match(i.types._var)?this.flowParseDeclareVariable(t):this.isContextual("module")?this.flowParseDeclareModule(t):void this.unexpected();
},o.flowParseDeclareVariable=function(t){return this.next(),t.id=this.flowParseTypeAnnotatableIdentifier(),this.semicolon(),this.finishNode(t,"DeclareVariable")},o.flowParseDeclareModule=function(t){this.next(),this.match(i.types.string)?t.id=this.parseExprAtom():t.id=this.parseIdentifier();var e=t.body=this.startNode(),n=e.body=[];for(this.expect(i.types.braceL);!this.match(i.types.braceR);){var r=this.startNode();this.next(),n.push(this.flowParseDeclare(r))}return this.expect(i.types.braceR),this.finishNode(e,"BlockStatement"),this.finishNode(t,"DeclareModule")},o.flowParseInterfaceish=function(t,e){if(t.id=this.parseIdentifier(),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t["extends"]=[],this.eat(i.types._extends))do t["extends"].push(this.flowParseInterfaceExtends());while(this.eat(i.types.comma));t.body=this.flowParseObjectType(e)},o.flowParseInterfaceExtends=function(){var t=this.startNode();return t.id=this.parseIdentifier(),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"InterfaceExtends")},o.flowParseInterface=function(t){return this.flowParseInterfaceish(t,!1),this.finishNode(t,"InterfaceDeclaration")},o.flowParseTypeAlias=function(t){return t.id=this.parseIdentifier(),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.right=this.flowParseTypeInitialiser(i.types.eq),this.semicolon(),this.finishNode(t,"TypeAlias")},o.flowParseTypeParameterDeclaration=function(){var t=this.startNode();for(t.params=[],this.expectRelational("<");!this.isRelational(">");)t.params.push(this.flowParseExistentialTypeParam()||this.flowParseTypeAnnotatableIdentifier()),this.isRelational(">")||this.expect(i.types.comma);return this.expectRelational(">"),this.finishNode(t,"TypeParameterDeclaration")},o.flowParseExistentialTypeParam=function(){if(this.match(i.types.star)){var t=this.startNode();return this.next(),this.finishNode(t,"ExistentialTypeParam")}},o.flowParseTypeParameterInstantiation=function(){var t=this.startNode(),e=this.state.inType;for(t.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)t.params.push(this.flowParseExistentialTypeParam()||this.flowParseType()),this.isRelational(">")||this.expect(i.types.comma);return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")},o.flowParseObjectPropertyKey=function(){return this.match(i.types.num)||this.match(i.types.string)?this.parseExprAtom():this.parseIdentifier(!0)},o.flowParseObjectTypeIndexer=function(t,e){return t["static"]=e,this.expect(i.types.bracketL),t.id=this.flowParseObjectPropertyKey(),t.key=this.flowParseTypeInitialiser(),this.expect(i.types.bracketR),t.value=this.flowParseTypeInitialiser(),this.flowObjectTypeSemicolon(),this.finishNode(t,"ObjectTypeIndexer")},o.flowParseObjectTypeMethodish=function(t){for(t.params=[],t.rest=null,t.typeParameters=null,this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(i.types.parenL);this.match(i.types.name);)t.params.push(this.flowParseFunctionTypeParam()),this.match(i.types.parenR)||this.expect(i.types.comma);return this.eat(i.types.ellipsis)&&(t.rest=this.flowParseFunctionTypeParam()),this.expect(i.types.parenR),t.returnType=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeAnnotation")},o.flowParseObjectTypeMethod=function(t,e,n,r){var i=this.startNodeAt(t,e);return i.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t,e)),i["static"]=n,i.key=r,i.optional=!1,this.flowObjectTypeSemicolon(),this.finishNode(i,"ObjectTypeProperty")},o.flowParseObjectTypeCallProperty=function(t,e){var n=this.startNode();return t["static"]=e,t.value=this.flowParseObjectTypeMethodish(n),this.flowObjectTypeSemicolon(),this.finishNode(t,"ObjectTypeCallProperty")},o.flowParseObjectType=function(t){var e=this.startNode(),n=void 0,r=void 0,s=void 0;for(e.callProperties=[],e.properties=[],e.indexers=[],this.expect(i.types.braceL);!this.match(i.types.braceR);){var a=!1,o=this.state.start,u=this.state.startLoc;n=this.startNode(),t&&this.isContextual("static")&&(this.next(),s=!0),this.match(i.types.bracketL)?e.indexers.push(this.flowParseObjectTypeIndexer(n,s)):this.match(i.types.parenL)||this.isRelational("<")?e.callProperties.push(this.flowParseObjectTypeCallProperty(n,t)):(r=s&&this.match(i.types.colon)?this.parseIdentifier():this.flowParseObjectPropertyKey(),this.isRelational("<")||this.match(i.types.parenL)?e.properties.push(this.flowParseObjectTypeMethod(o,u,s,r)):(this.eat(i.types.question)&&(a=!0),n.key=r,n.value=this.flowParseTypeInitialiser(),n.optional=a,n["static"]=s,this.flowObjectTypeSemicolon(),e.properties.push(this.finishNode(n,"ObjectTypeProperty"))))}return this.expect(i.types.braceR),this.finishNode(e,"ObjectTypeAnnotation")},o.flowObjectTypeSemicolon=function(){this.eat(i.types.semi)||this.eat(i.types.comma)||this.match(i.types.braceR)||this.unexpected()},o.flowParseGenericType=function(t,e,n){var r=this.startNodeAt(t,e);for(r.typeParameters=null,r.id=n;this.eat(i.types.dot);){var s=this.startNodeAt(t,e);s.qualification=r.id,s.id=this.parseIdentifier(),r.id=this.finishNode(s,"QualifiedTypeIdentifier")}return this.isRelational("<")&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")},o.flowParseTypeofType=function(){var t=this.startNode();return this.expect(i.types._typeof),t.argument=this.flowParsePrimaryType(),this.finishNode(t,"TypeofTypeAnnotation")},o.flowParseTupleType=function(){var t=this.startNode();for(t.types=[],this.expect(i.types.bracketL);this.state.pos<this.input.length&&!this.match(i.types.bracketR)&&(t.types.push(this.flowParseType()),!this.match(i.types.bracketR));)this.expect(i.types.comma);return this.expect(i.types.bracketR),this.finishNode(t,"TupleTypeAnnotation")},o.flowParseFunctionTypeParam=function(){var t=!1,e=this.startNode();return e.name=this.parseIdentifier(),this.eat(i.types.question)&&(t=!0),e.optional=t,e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeParam")},o.flowParseFunctionTypeParams=function(){for(var t={params:[],rest:null};this.match(i.types.name);)t.params.push(this.flowParseFunctionTypeParam()),this.match(i.types.parenR)||this.expect(i.types.comma);return this.eat(i.types.ellipsis)&&(t.rest=this.flowParseFunctionTypeParam()),t},o.flowIdentToTypeAnnotation=function(t,e,n,r){switch(r.name){case"any":return this.finishNode(n,"AnyTypeAnnotation");case"void":return this.finishNode(n,"VoidTypeAnnotation");case"bool":case"boolean":return this.finishNode(n,"BooleanTypeAnnotation");case"mixed":return this.finishNode(n,"MixedTypeAnnotation");case"number":return this.finishNode(n,"NumberTypeAnnotation");case"string":return this.finishNode(n,"StringTypeAnnotation");default:return this.flowParseGenericType(t,e,r)}},o.flowParsePrimaryType=function(){var t=this.state.start,e=this.state.startLoc,n=this.startNode(),r=void 0,s=void 0,a=!1;switch(this.state.type){case i.types.name:return this.flowIdentToTypeAnnotation(t,e,n,this.parseIdentifier());case i.types.braceL:return this.flowParseObjectType();case i.types.bracketL:return this.flowParseTupleType();case i.types.relational:if("<"===this.state.value)return n.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(i.types.parenL),r=this.flowParseFunctionTypeParams(),n.params=r.params,n.rest=r.rest,this.expect(i.types.parenR),this.expect(i.types.arrow),n.returnType=this.flowParseType(),this.finishNode(n,"FunctionTypeAnnotation");case i.types.parenL:if(this.next(),!this.match(i.types.parenR)&&!this.match(i.types.ellipsis))if(this.match(i.types.name)){var o=this.lookahead().type;a=o!==i.types.question&&o!==i.types.colon}else a=!0;return a?(s=this.flowParseType(),this.expect(i.types.parenR),this.eat(i.types.arrow)&&this.raise(n,"Unexpected token =>. It looks like you are trying to write a function type, but you ended up writing a grouped type followed by an =>, which is a syntax error. Remember, function type parameters are named so function types look like (name1: type1, name2: type2) => returnType. You probably wrote (type1) => returnType"),s):(r=this.flowParseFunctionTypeParams(),n.params=r.params,n.rest=r.rest,this.expect(i.types.parenR),this.expect(i.types.arrow),n.returnType=this.flowParseType(),n.typeParameters=null,this.finishNode(n,"FunctionTypeAnnotation"));case i.types.string:return n.value=this.state.value,this.addExtra(n,"rawValue",n.value),this.addExtra(n,"raw",this.input.slice(this.state.start,this.state.end)),this.next(),this.finishNode(n,"StringLiteralTypeAnnotation");case i.types._true:case i.types._false:return n.value=this.match(i.types._true),this.next(),this.finishNode(n,"BooleanLiteralTypeAnnotation");case i.types.num:return n.value=this.state.value,this.addExtra(n,"rawValue",n.value),this.addExtra(n,"raw",this.input.slice(this.state.start,this.state.end)),this.next(),this.finishNode(n,"NumericLiteralTypeAnnotation");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType()}this.unexpected()},o.flowParsePostfixType=function(){var t=this.startNode(),e=t.elementType=this.flowParsePrimaryType();return this.match(i.types.bracketL)?(this.expect(i.types.bracketL),this.expect(i.types.bracketR),this.finishNode(t,"ArrayTypeAnnotation")):e},o.flowParsePrefixType=function(){var t=this.startNode();return this.eat(i.types.question)?(t.typeAnnotation=this.flowParsePrefixType(),this.finishNode(t,"NullableTypeAnnotation")):this.flowParsePostfixType()},o.flowParseIntersectionType=function(){var t=this.startNode(),e=this.flowParsePrefixType();for(t.types=[e];this.eat(i.types.bitwiseAND);)t.types.push(this.flowParsePrefixType());return 1===t.types.length?e:this.finishNode(t,"IntersectionTypeAnnotation")},o.flowParseUnionType=function(){var t=this.startNode(),e=this.flowParseIntersectionType();for(t.types=[e];this.eat(i.types.bitwiseOR);)t.types.push(this.flowParseIntersectionType());return 1===t.types.length?e:this.finishNode(t,"UnionTypeAnnotation")},o.flowParseType=function(){var t=this.state.inType;this.state.inType=!0;var e=this.flowParseUnionType();return this.state.inType=t,e},o.flowParseTypeAnnotation=function(){var t=this.startNode();return t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"TypeAnnotation")},o.flowParseTypeAnnotatableIdentifier=function(t,e){var n=this.parseIdentifier(),r=!1;return e&&this.eat(i.types.question)&&(this.expect(i.types.question),r=!0),(t||this.match(i.types.colon))&&(n.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(n,n.type)),r&&(n.optional=!0,this.finishNode(n,n.type)),n},n["default"]=function(t){function e(t){return t.expression.typeAnnotation=t.typeAnnotation,t.expression}t.extend("parseFunctionBody",function(t){return function(e,n){return this.match(i.types.colon)&&!n&&(e.returnType=this.flowParseTypeAnnotation()),t.call(this,e,n)}}),t.extend("parseStatement",function(t){return function(e,n){if(this.state.strict&&this.match(i.types.name)&&"interface"===this.state.value){var r=this.startNode();return this.next(),this.flowParseInterface(r)}return t.call(this,e,n)}}),t.extend("parseExpressionStatement",function(t){return function(e,n){if("Identifier"===n.type)if("declare"===n.name){if(this.match(i.types._class)||this.match(i.types.name)||this.match(i.types._function)||this.match(i.types._var))return this.flowParseDeclare(e)}else if(this.match(i.types.name)){if("interface"===n.name)return this.flowParseInterface(e);if("type"===n.name)return this.flowParseTypeAlias(e)}return t.call(this,e,n)}}),t.extend("shouldParseExportDeclaration",function(t){return function(){return this.isContextual("type")||t.call(this)}}),t.extend("parseParenItem",function(){return function(t,e,n,r){var s=this.state.potentialArrowAt=n;if(this.match(i.types.colon)){var a=this.startNodeAt(e,n);if(a.expression=t,a.typeAnnotation=this.flowParseTypeAnnotation(),r&&!this.match(i.types.arrow)&&this.unexpected(),s&&this.eat(i.types.arrow)){var o=this.parseArrowExpression(this.startNodeAt(e,n),[t]);return o.returnType=a.typeAnnotation,o}return this.finishNode(a,"TypeCastExpression")}return t}}),t.extend("parseExport",function(t){return function(e){return e=t.call(this,e),"ExportNamedDeclaration"===e.type&&(e.exportKind=e.exportKind||"value"),e}}),t.extend("parseExportDeclaration",function(t){return function(e){if(this.isContextual("type")){e.exportKind="type";var n=this.startNode();return this.next(),this.match(i.types.braceL)?(e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e),null):this.flowParseTypeAlias(n)}return t.call(this,e)}}),t.extend("parseClassId",function(t){return function(e){t.apply(this,arguments),this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}}),t.extend("isKeyword",function(t){return function(e){return this.state.inType&&"void"===e?!1:t.call(this,e)}}),t.extend("readToken",function(t){return function(e){return!this.state.inType||62!==e&&60!==e?t.call(this,e):this.finishOp(i.types.relational,1)}}),t.extend("jsx_readToken",function(t){return function(){return this.state.inType?void 0:t.call(this)}}),t.extend("toAssignable",function(t){return function(n){return"TypeCastExpression"===n.type?e(n):t.apply(this,arguments)}}),t.extend("toAssignableList",function(t){return function(n,r){for(var i=0;i<n.length;i++){var s=n[i];s&&"TypeCastExpression"===s.type&&(n[i]=e(s))}return t.call(this,n,r)}}),t.extend("toReferencedList",function(){return function(t){for(var e=0;e<t.length;e++){var n=t[e];n&&n._exprListItem&&"TypeCastExpression"===n.type&&this.raise(n.start,"Unexpected type cast")}return t}}),t.extend("parseExprListItem",function(t){return function(e,n){var r=this.startNode(),s=t.call(this,e,n);return this.match(i.types.colon)?(r._exprListItem=!0,r.expression=s,r.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(r,"TypeCastExpression")):s}}),t.extend("checkLVal",function(t){return function(e){return"TypeCastExpression"!==e.type?t.apply(this,arguments):void 0}}),t.extend("parseClassProperty",function(t){return function(e){return this.match(i.types.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),t.call(this,e)}}),t.extend("isClassProperty",function(t){return function(){return this.match(i.types.colon)||t.call(this)}}),t.extend("parseClassMethod",function(){return function(t,e,n,r){this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.parseMethod(e,n,r),t.body.push(this.finishNode(e,"ClassMethod"))}}),t.extend("parseClassSuper",function(t){return function(e,n){if(t.call(this,e,n),e.superClass&&this.isRelational("<")&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();var r=e["implements"]=[];do{var s=this.startNode();s.id=this.parseIdentifier(),this.isRelational("<")?s.typeParameters=this.flowParseTypeParameterInstantiation():s.typeParameters=null,r.push(this.finishNode(s,"ClassImplements"))}while(this.eat(i.types.comma))}}}),t.extend("parseObjPropValue",function(t){return function(e){var n=void 0;this.isRelational("<")&&(n=this.flowParseTypeParameterDeclaration(),this.match(i.types.parenL)||this.unexpected()),t.apply(this,arguments),n&&((e.value||e).typeParameters=n)}}),t.extend("parseAssignableListItemTypes",function(){return function(t){return this.eat(i.types.question)&&(t.optional=!0),this.match(i.types.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),this.finishNode(t,t.type),t}}),t.extend("parseImportSpecifiers",function(t){return function(e){e.importKind="value";var n=null;if(this.match(i.types._typeof)?n="typeof":this.isContextual("type")&&(n="type"),n){var r=this.lookahead();(r.type===i.types.name&&"from"!==r.value||r.type===i.types.braceL||r.type===i.types.star)&&(this.next(),e.importKind=n)}t.call(this,e)}}),t.extend("parseFunctionParams",function(t){return function(e){this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),t.call(this,e)}}),t.extend("parseVarHead",function(t){return function(e){t.call(this,e),this.match(i.types.colon)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e.id,e.id.type))}}),t.extend("parseAsyncArrowFromCallExpression",function(t){return function(e,n){return this.match(i.types.colon)&&(e.returnType=this.flowParseTypeAnnotation()),t.call(this,e,n)}}),t.extend("shouldParseAsyncArrow",function(t){return function(){return this.match(i.types.colon)||t.call(this)}}),t.extend("parseParenAndDistinguishExpression",function(t){return function(e,n,r,s){if(e=e||this.state.start,n=n||this.state.startLoc,r&&this.lookahead().type===i.types.parenR){this.expect(i.types.parenL),this.expect(i.types.parenR);var a=this.startNodeAt(e,n);return this.match(i.types.colon)&&(a.returnType=this.flowParseTypeAnnotation()),this.expect(i.types.arrow),this.parseArrowExpression(a,[],s)}var a=t.call(this,e,n,r,s);if(!this.match(i.types.colon))return a;var o=this.state.clone();try{return this.parseParenItem(a,e,n,!0)}catch(u){if(u instanceof SyntaxError)return this.state=o,a;throw u}}})},e.exports=n["default"]},{626:626,638:638,647:647}],633:[function(t,e,n){"use strict";function r(t){return"JSXIdentifier"===t.type?t.name:"JSXNamespacedName"===t.type?t.namespace.name+":"+t.name.name:"JSXMemberExpression"===t.type?r(t.object)+"."+r(t.property):void 0}var i=t(647)["default"];n.__esModule=!0;var s=t(634),a=i(s),o=t(638),u=t(635),l=t(626),p=i(l),c=t(639),f=t(641),h=/^[\da-fA-F]+$/,d=/^\d+$/;u.types.j_oTag=new u.TokContext("<tag",!1),u.types.j_cTag=new u.TokContext("</tag",!1),u.types.j_expr=new u.TokContext("<tag>...</tag>",!0,!0),o.types.jsxName=new o.TokenType("jsxName"),o.types.jsxText=new o.TokenType("jsxText",{beforeExpr:!0}),o.types.jsxTagStart=new o.TokenType("jsxTagStart"),o.types.jsxTagEnd=new o.TokenType("jsxTagEnd"),o.types.jsxTagStart.updateContext=function(){this.state.context.push(u.types.j_expr),this.state.context.push(u.types.j_oTag),this.state.exprAllowed=!1},o.types.jsxTagEnd.updateContext=function(t){var e=this.state.context.pop();e===u.types.j_oTag&&t===o.types.slash||e===u.types.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===u.types.j_expr):this.state.exprAllowed=!0};var m=p["default"].prototype;m.jsxReadToken=function(){for(var t="",e=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated JSX contents");var n=this.input.charCodeAt(this.state.pos);switch(n){case 60:case 123:return this.state.pos===this.state.start?60===n&&this.state.exprAllowed?(++this.state.pos,this.finishToken(o.types.jsxTagStart)):this.getTokenFromCode(n):(t+=this.input.slice(e,this.state.pos),this.finishToken(o.types.jsxText,t));case 38:t+=this.input.slice(e,this.state.pos),t+=this.jsxReadEntity(),e=this.state.pos;break;default:f.isNewLine(n)?(t+=this.input.slice(e,this.state.pos),t+=this.jsxReadNewLine(!0),e=this.state.pos):++this.state.pos}}},m.jsxReadNewLine=function(t){var e=this.input.charCodeAt(this.state.pos),n=void 0;return++this.state.pos,13===e&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,n=t?"\n":"\r\n"):n=String.fromCharCode(e),++this.state.curLine,this.state.lineStart=this.state.pos,n},m.jsxReadString=function(t){for(var e="",n=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var r=this.input.charCodeAt(this.state.pos);if(r===t)break;38===r?(e+=this.input.slice(n,this.state.pos),e+=this.jsxReadEntity(),n=this.state.pos):f.isNewLine(r)?(e+=this.input.slice(n,this.state.pos),e+=this.jsxReadNewLine(!1),n=this.state.pos):++this.state.pos}return e+=this.input.slice(n,this.state.pos++),this.finishToken(o.types.string,e)},m.jsxReadEntity=function(){for(var t="",e=0,n=void 0,r=this.input[this.state.pos],i=++this.state.pos;this.state.pos<this.input.length&&e++<10;){if(r=this.input[this.state.pos++],";"===r){"#"===t[0]?"x"===t[1]?(t=t.substr(2),h.test(t)&&(n=String.fromCharCode(parseInt(t,16)))):(t=t.substr(1),d.test(t)&&(n=String.fromCharCode(parseInt(t,10)))):n=a["default"][t];break}t+=r}return n?n:(this.state.pos=i,"&")},m.jsxReadWord=function(){var t=void 0,e=this.state.pos;do t=this.input.charCodeAt(++this.state.pos);while(c.isIdentifierChar(t)||45===t);return this.finishToken(o.types.jsxName,this.input.slice(e,this.state.pos))},m.jsxParseIdentifier=function(){var t=this.startNode();return this.match(o.types.jsxName)?t.name=this.state.value:this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")},m.jsxParseNamespacedName=function(){var t=this.state.start,e=this.state.startLoc,n=this.jsxParseIdentifier();if(!this.eat(o.types.colon))return n;var r=this.startNodeAt(t,e);return r.namespace=n,r.name=this.jsxParseIdentifier(),this.finishNode(r,"JSXNamespacedName")},m.jsxParseElementName=function(){for(var t=this.state.start,e=this.state.startLoc,n=this.jsxParseNamespacedName();this.eat(o.types.dot);){var r=this.startNodeAt(t,e);r.object=n,r.property=this.jsxParseIdentifier(),n=this.finishNode(r,"JSXMemberExpression")}return n},m.jsxParseAttributeValue=function(){var t=void 0;switch(this.state.type){case o.types.braceL:if(t=this.jsxParseExpressionContainer(),"JSXEmptyExpression"!==t.expression.type)return t;this.raise(t.start,"JSX attributes must only be assigned a non-empty expression");case o.types.jsxTagStart:case o.types.string:return t=this.parseExprAtom(),t.extra=null,t;default:this.raise(this.state.start,"JSX value should be either an expression or a quoted JSX text")}},m.jsxParseEmptyExpression=function(){var t=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.start,this.startLoc)},m.jsxParseExpressionContainer=function(){var t=this.startNode();return this.next(),this.match(o.types.braceR)?t.expression=this.jsxParseEmptyExpression():t.expression=this.parseExpression(),this.expect(o.types.braceR),this.finishNode(t,"JSXExpressionContainer")},m.jsxParseAttribute=function(){var t=this.startNode();return this.eat(o.types.braceL)?(this.expect(o.types.ellipsis),t.argument=this.parseMaybeAssign(),this.expect(o.types.braceR),this.finishNode(t,"JSXSpreadAttribute")):(t.name=this.jsxParseNamespacedName(),t.value=this.eat(o.types.eq)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute"))},m.jsxParseOpeningElementAt=function(t,e){var n=this.startNodeAt(t,e);for(n.attributes=[],n.name=this.jsxParseElementName();!this.match(o.types.slash)&&!this.match(o.types.jsxTagEnd);)n.attributes.push(this.jsxParseAttribute());return n.selfClosing=this.eat(o.types.slash),this.expect(o.types.jsxTagEnd),this.finishNode(n,"JSXOpeningElement")},m.jsxParseClosingElementAt=function(t,e){var n=this.startNodeAt(t,e);return n.name=this.jsxParseElementName(),this.expect(o.types.jsxTagEnd),this.finishNode(n,"JSXClosingElement")},m.jsxParseElementAt=function(t,e){var n=this.startNodeAt(t,e),i=[],s=this.jsxParseOpeningElementAt(t,e),a=null;if(!s.selfClosing){t:for(;;)switch(this.state.type){case o.types.jsxTagStart:if(t=this.state.start,e=this.state.startLoc,this.next(),this.eat(o.types.slash)){a=this.jsxParseClosingElementAt(t,e);break t}i.push(this.jsxParseElementAt(t,e));break;case o.types.jsxText:i.push(this.parseExprAtom());break;case o.types.braceL:i.push(this.jsxParseExpressionContainer());break;default:this.unexpected()}r(a.name)!==r(s.name)&&this.raise(a.start,"Expected corresponding JSX closing tag for <"+r(s.name)+">")}return n.openingElement=s,n.closingElement=a,n.children=i,this.match(o.types.relational)&&"<"===this.state.value&&this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(n,"JSXElement")},m.jsxParseElement=function(){var t=this.state.start,e=this.state.startLoc;return this.next(),this.jsxParseElementAt(t,e)},n["default"]=function(t){t.extend("parseExprAtom",function(t){return function(e){if(this.match(o.types.jsxText)){var n=this.parseLiteral(this.state.value,"JSXText");return n.extra=null,n}return this.match(o.types.jsxTagStart)?this.jsxParseElement():t.call(this,e)}}),t.extend("readToken",function(t){return function(e){var n=this.curContext();if(n===u.types.j_expr)return this.jsxReadToken();if(n===u.types.j_oTag||n===u.types.j_cTag){if(c.isIdentifierStart(e))return this.jsxReadWord();if(62===e)return++this.state.pos,this.finishToken(o.types.jsxTagEnd);if((34===e||39===e)&&n===u.types.j_oTag)return this.jsxReadString(e)}return 60===e&&this.state.exprAllowed?(++this.state.pos,this.finishToken(o.types.jsxTagStart)):t.call(this,e)}}),t.extend("updateContext",function(t){return function(e){if(this.match(o.types.braceL)){var n=this.curContext();n===u.types.j_oTag?this.state.context.push(u.types.b_expr):n===u.types.j_expr?this.state.context.push(u.types.b_tmpl):t.call(this,e),this.state.exprAllowed=!0}else{if(!this.match(o.types.slash)||e!==o.types.jsxTagStart)return t.call(this,e);this.state.context.length-=2,this.state.context.push(u.types.j_cTag),this.state.exprAllowed=!1}}})},e.exports=n["default"]},{626:626,634:634,635:635,638:638,639:639,641:641,647:647}],634:[function(t,e,n){"use strict";n.__esModule=!0,n["default"]={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪","int":"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},e.exports=n["default"]},{}],635:[function(t,e,n){"use strict";var r=t(645)["default"];n.__esModule=!0;var i=t(638),s=t(641),a=function u(t,e,n,i){r(this,u),this.token=t,this.isExpr=!!e,this.preserveSpace=!!n,this.override=i};n.TokContext=a;var o={b_stat:new a("{",!1),b_expr:new a("{",!0),b_tmpl:new a("${",!0),p_stat:new a("(",!1),p_expr:new a("(",!0),q_tmpl:new a("`",!0,!0,function(t){return t.readTmplToken()}),f_expr:new a("function",!0)};n.types=o,i.types.parenR.updateContext=i.types.braceR.updateContext=function(){if(1===this.state.context.length)return void(this.state.exprAllowed=!0);var t=this.state.context.pop();t===o.b_stat&&this.curContext()===o.f_expr?(this.state.context.pop(),this.state.exprAllowed=!1):t===o.b_tmpl?this.state.exprAllowed=!0:this.state.exprAllowed=!t.isExpr},i.types.name.updateContext=function(t){this.state.exprAllowed=!1,(t===i.types._let||t===i.types._const||t===i.types._var)&&s.lineBreak.test(this.input.slice(this.state.end))&&(this.state.exprAllowed=!0)},i.types.braceL.updateContext=function(t){this.state.context.push(this.braceIsBlock(t)?o.b_stat:o.b_expr),this.state.exprAllowed=!0},i.types.dollarBraceL.updateContext=function(){this.state.context.push(o.b_tmpl),this.state.exprAllowed=!0},i.types.parenL.updateContext=function(t){var e=t===i.types._if||t===i.types._for||t===i.types._with||t===i.types._while;this.state.context.push(e?o.p_stat:o.p_expr),this.state.exprAllowed=!0},i.types.incDec.updateContext=function(){},i.types._function.updateContext=function(){this.curContext()!==o.b_stat&&this.state.context.push(o.f_expr),this.state.exprAllowed=!1},i.types.backQuote.updateContext=function(){this.curContext()===o.q_tmpl?this.state.context.pop():this.state.context.push(o.q_tmpl),this.state.exprAllowed=!1}},{638:638,641:641,645:645}],636:[function(t,e,n){"use strict";function r(t){return 65535>=t?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var i=t(645)["default"],s=t(647)["default"];n.__esModule=!0;var a=t(639),o=t(638),u=t(635),l=t(640),p=t(641),c=t(637),f=s(c),h=function m(t){i(this,m),this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new l.SourceLocation(t.startLoc,t.endLoc)};n.Token=h;var d=function(){function t(e,n){i(this,t),this.state=new f["default"],this.state.init(e,n)}return t.prototype.next=function(){this.isLookahead||this.state.tokens.push(new h(this.state)),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()},t.prototype.eat=function(t){return this.match(t)?(this.next(),!0):!1},t.prototype.match=function(t){return this.state.type===t},t.prototype.isKeyword=function(t){return a.isKeyword(t)},t.prototype.lookahead=function(){var t=this.state;this.state=t.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var e=this.state.clone(!0);return this.state=t,e},t.prototype.setStrict=function(t){if(this.state.strict=t,this.match(o.types.num)||this.match(o.types.string)){for(this.state.pos=this.state.start;this.state.pos<this.state.lineStart;)this.state.lineStart=this.input.lastIndexOf("\n",this.state.lineStart-2)+1,--this.state.curLine;this.nextToken()}},t.prototype.curContext=function(){return this.state.context[this.state.context.length-1]},t.prototype.nextToken=function(){var t=this.curContext();return t&&t.preserveSpace||this.skipSpace(),this.state.containsOctal=!1,this.state.octalPosition=null,this.state.start=this.state.pos,this.state.startLoc=this.state.curPosition(),this.state.pos>=this.input.length?this.finishToken(o.types.eof):t.override?t.override(this):this.readToken(this.fullCharCodeAtPos())},t.prototype.readToken=function(t){return a.isIdentifierStart(t,!0)||92===t?this.readWord():this.getTokenFromCode(t)},t.prototype.fullCharCodeAtPos=function(){var t=this.input.charCodeAt(this.state.pos);if(55295>=t||t>=57344)return t;var e=this.input.charCodeAt(this.state.pos+1);return(t<<10)+e-56613888},t.prototype.pushComment=function(t,e,n,r,i,s){var a={type:t?"CommentBlock":"CommentLine",value:e,start:n,end:r,loc:new l.SourceLocation(i,s)};this.isLookahead||(this.state.tokens.push(a),this.state.comments.push(a)),this.addComment(a)},t.prototype.skipBlockComment=function(){
var t=this.state.curPosition(),e=this.state.pos,n=this.input.indexOf("*/",this.state.pos+=2);-1===n&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=n+2,p.lineBreakG.lastIndex=e;for(var r=void 0;(r=p.lineBreakG.exec(this.input))&&r.index<this.state.pos;)++this.state.curLine,this.state.lineStart=r.index+r[0].length;this.pushComment(!0,this.input.slice(e+2,n),e,this.state.pos,t,this.state.curPosition())},t.prototype.skipLineComment=function(t){for(var e=this.state.pos,n=this.state.curPosition(),r=this.input.charCodeAt(this.state.pos+=t);this.state.pos<this.input.length&&10!==r&&13!==r&&8232!==r&&8233!==r;)++this.state.pos,r=this.input.charCodeAt(this.state.pos);this.pushComment(!1,this.input.slice(e+t,this.state.pos),e,this.state.pos,n,this.state.curPosition())},t.prototype.skipSpace=function(){t:for(;this.state.pos<this.input.length;){var t=this.input.charCodeAt(this.state.pos);switch(t){case 32:case 160:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!(t>8&&14>t||t>=5760&&p.nonASCIIwhitespace.test(String.fromCharCode(t))))break t;++this.state.pos}}},t.prototype.finishToken=function(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var n=this.state.type;this.state.type=t,this.state.value=e,this.updateContext(n)},t.prototype.readToken_dot=function(){var t=this.input.charCodeAt(this.state.pos+1);if(t>=48&&57>=t)return this.readNumber(!0);var e=this.input.charCodeAt(this.state.pos+2);return 46===t&&46===e?(this.state.pos+=3,this.finishToken(o.types.ellipsis)):(++this.state.pos,this.finishToken(o.types.dot))},t.prototype.readToken_slash=function(){if(this.state.exprAllowed)return++this.state.pos,this.readRegexp();var t=this.input.charCodeAt(this.state.pos+1);return 61===t?this.finishOp(o.types.assign,2):this.finishOp(o.types.slash,1)},t.prototype.readToken_mult_modulo=function(t){var e=42===t?o.types.star:o.types.modulo,n=1,r=this.input.charCodeAt(this.state.pos+1);return 42===r&&this.hasPlugin("exponentiationOperator")&&(n++,r=this.input.charCodeAt(this.state.pos+2),e=o.types.exponent),61===r&&(n++,e=o.types.assign),this.finishOp(e,n)},t.prototype.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.state.pos+1);return e===t?this.finishOp(124===t?o.types.logicalOR:o.types.logicalAND,2):61===e?this.finishOp(o.types.assign,2):this.finishOp(124===t?o.types.bitwiseOR:o.types.bitwiseAND,1)},t.prototype.readToken_caret=function(){var t=this.input.charCodeAt(this.state.pos+1);return 61===t?this.finishOp(o.types.assign,2):this.finishOp(o.types.bitwiseXOR,1)},t.prototype.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.state.pos+1);return e===t?45===e&&62===this.input.charCodeAt(this.state.pos+2)&&p.lineBreak.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(o.types.incDec,2):61===e?this.finishOp(o.types.assign,2):this.finishOp(o.types.plusMin,1)},t.prototype.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.state.pos+1),n=1;return e===t?(n=62===t&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+n)?this.finishOp(o.types.assign,n+1):this.finishOp(o.types.bitShift,n)):33===e&&60===t&&45===this.input.charCodeAt(this.state.pos+2)&&45===this.input.charCodeAt(this.state.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===e&&(n=61===this.input.charCodeAt(this.state.pos+2)?3:2),this.finishOp(o.types.relational,n))},t.prototype.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.state.pos+1);return 61===e?this.finishOp(o.types.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2):61===t&&62===e?(this.state.pos+=2,this.finishToken(o.types.arrow)):this.finishOp(61===t?o.types.eq:o.types.prefix,1)},t.prototype.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.state.pos,this.finishToken(o.types.parenL);case 41:return++this.state.pos,this.finishToken(o.types.parenR);case 59:return++this.state.pos,this.finishToken(o.types.semi);case 44:return++this.state.pos,this.finishToken(o.types.comma);case 91:return++this.state.pos,this.finishToken(o.types.bracketL);case 93:return++this.state.pos,this.finishToken(o.types.bracketR);case 123:return++this.state.pos,this.finishToken(o.types.braceL);case 125:return++this.state.pos,this.finishToken(o.types.braceR);case 58:return this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(o.types.doubleColon,2):(++this.state.pos,this.finishToken(o.types.colon));case 63:return++this.state.pos,this.finishToken(o.types.question);case 64:return++this.state.pos,this.finishToken(o.types.at);case 96:return++this.state.pos,this.finishToken(o.types.backQuote);case 48:var e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return this.readRadixNumber(16);if(111===e||79===e)return this.readRadixNumber(8);if(98===e||66===e)return this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 126:return this.finishOp(o.types.prefix,1)}this.raise(this.state.pos,"Unexpected character '"+r(t)+"'")},t.prototype.finishOp=function(t,e){var n=this.input.slice(this.state.pos,this.state.pos+e);return this.state.pos+=e,this.finishToken(t,n)},t.prototype.readRegexp=function(){for(var t=void 0,e=void 0,n=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.state.pos);if(p.lineBreak.test(r)&&this.raise(n,"Unterminated regular expression"),t)t=!1;else{if("["===r)e=!0;else if("]"===r&&e)e=!1;else if("/"===r&&!e)break;t="\\"===r}++this.state.pos}var i=this.input.slice(n,this.state.pos);++this.state.pos;var s=this.readWord1();if(s){var a=/^[gmsiyu]*$/;a.test(s)||this.raise(n,"Invalid regular expression flag")}return this.finishToken(o.types.regexp,{pattern:i,flags:s})},t.prototype.readInt=function(t,e){for(var n=this.state.pos,r=0,i=0,s=null==e?1/0:e;s>i;++i){var a=this.input.charCodeAt(this.state.pos),o=void 0;if(o=a>=97?a-97+10:a>=65?a-65+10:a>=48&&57>=a?a-48:1/0,o>=t)break;++this.state.pos,r=r*t+o}return this.state.pos===n||null!=e&&this.state.pos-n!==e?null:r},t.prototype.readRadixNumber=function(t){this.state.pos+=2;var e=this.readInt(t);return null==e&&this.raise(this.state.start+2,"Expected number in radix "+t),a.isIdentifierStart(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number"),this.finishToken(o.types.num,e)},t.prototype.readNumber=function(t){var e=this.state.pos,n=!1,r=48===this.input.charCodeAt(this.state.pos);t||null!==this.readInt(10)||this.raise(e,"Invalid number");var i=this.input.charCodeAt(this.state.pos);46===i&&(++this.state.pos,this.readInt(10),n=!0,i=this.input.charCodeAt(this.state.pos)),(69===i||101===i)&&(i=this.input.charCodeAt(++this.state.pos),(43===i||45===i)&&++this.state.pos,null===this.readInt(10)&&this.raise(e,"Invalid number"),n=!0),a.isIdentifierStart(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number");var s=this.input.slice(e,this.state.pos),u=void 0;return n?u=parseFloat(s):r&&1!==s.length?/[89]/.test(s)||this.state.strict?this.raise(e,"Invalid number"):u=parseInt(s,8):u=parseInt(s,10),this.finishToken(o.types.num,u)},t.prototype.readCodePoint=function(){var t=this.input.charCodeAt(this.state.pos),e=void 0;if(123===t){var n=++this.state.pos;e=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos),++this.state.pos,e>1114111&&this.raise(n,"Code point out of bounds")}else e=this.readHexChar(4);return e},t.prototype.readString=function(t){for(var e="",n=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var r=this.input.charCodeAt(this.state.pos);if(r===t)break;92===r?(e+=this.input.slice(n,this.state.pos),e+=this.readEscapedChar(!1),n=this.state.pos):(p.isNewLine(r)&&this.raise(this.state.start,"Unterminated string constant"),++this.state.pos)}return e+=this.input.slice(n,this.state.pos++),this.finishToken(o.types.string,e)},t.prototype.readTmplToken=function(){for(var t="",e=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var n=this.input.charCodeAt(this.state.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(o.types.template)?36===n?(this.state.pos+=2,this.finishToken(o.types.dollarBraceL)):(++this.state.pos,this.finishToken(o.types.backQuote)):(t+=this.input.slice(e,this.state.pos),this.finishToken(o.types.template,t));if(92===n)t+=this.input.slice(e,this.state.pos),t+=this.readEscapedChar(!0),e=this.state.pos;else if(p.isNewLine(n)){switch(t+=this.input.slice(e,this.state.pos),++this.state.pos,n){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(n)}++this.state.curLine,this.state.lineStart=this.state.pos,e=this.state.pos}else++this.state.pos}},t.prototype.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,e){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return r(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(e>=48&&55>=e){var n=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(n,8);return i>255&&(n=n.slice(0,-1),i=parseInt(n,8)),i>0&&(this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=this.state.pos-2),(this.state.strict||t)&&this.raise(this.state.pos-2,"Octal literal in strict mode")),this.state.pos+=n.length-1,String.fromCharCode(i)}return String.fromCharCode(e)}},t.prototype.readHexChar=function(t){var e=this.state.pos,n=this.readInt(16,t);return null===n&&this.raise(e,"Bad character escape sequence"),n},t.prototype.readWord1=function(){this.state.containsEsc=!1;for(var t="",e=!0,n=this.state.pos;this.state.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(a.isIdentifierChar(i,!0))this.state.pos+=65535>=i?1:2;else{if(92!==i)break;this.state.containsEsc=!0,t+=this.input.slice(n,this.state.pos);var s=this.state.pos;117!==this.input.charCodeAt(++this.state.pos)&&this.raise(this.state.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.state.pos;var o=this.readCodePoint();(e?a.isIdentifierStart:a.isIdentifierChar)(o,!0)||this.raise(s,"Invalid Unicode escape"),t+=r(o),n=this.state.pos}e=!1}return t+this.input.slice(n,this.state.pos)},t.prototype.readWord=function(){var t=this.readWord1(),e=o.types.name;return!this.state.containsEsc&&this.isKeyword(t)&&(e=o.keywords[t]),this.finishToken(e,t)},t.prototype.braceIsBlock=function(t){if(t===o.types.colon){var e=this.curContext();if(e===u.types.b_stat||e===u.types.b_expr)return!e.isExpr}return t===o.types._return?p.lineBreak.test(this.input.slice(this.state.lastTokEnd,this.state.start)):t===o.types._else||t===o.types.semi||t===o.types.eof||t===o.types.parenR?!0:t===o.types.braceL?this.curContext()===u.types.b_stat:!this.state.exprAllowed},t.prototype.updateContext=function(t){var e=void 0,n=this.state.type;n.keyword&&t===o.types.dot?this.state.exprAllowed=!1:(e=n.updateContext)?e.call(this,t):this.state.exprAllowed=n.beforeExpr},t}();n["default"]=d},{635:635,637:637,638:638,639:639,640:640,641:641,645:645,647:647}],637:[function(t,e,n){"use strict";var r=t(645)["default"];n.__esModule=!0;var i=t(640),s=t(635),a=t(638),o=function(){function t(){r(this,t)}return t.prototype.init=function(t,e){return this.strict=t.strictMode===!1?!1:"module"===t.sourceType,this.input=e,this.potentialArrowAt=-1,this.inMethod=this.inFunction=this.inGenerator=this.inAsync=!1,this.labels=[],this.decorators=[],this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.pos=this.lineStart=0,this.curLine=1,this.type=a.types.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=[s.types.b_stat],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this},t.prototype.curPosition=function(){return new i.Position(this.curLine,this.pos-this.lineStart)},t.prototype.clone=function(e){var n=new t;for(var r in this){var i=this[r];e&&"context"!==r||!Array.isArray(i)||(i=i.slice()),n[r]=i}return n},t}();n["default"]=o,e.exports=n["default"]},{635:635,638:638,640:640,645:645}],638:[function(t,e,n){"use strict";function r(t,e){return new a(t,{beforeExpr:!0,binop:e})}function i(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];e.keyword=t,p[t]=l["_"+t]=new a(t,e)}var s=t(645)["default"];n.__esModule=!0;var a=function c(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];s(this,c),this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop||null,this.updateContext=null};n.TokenType=a;var o={beforeExpr:!0},u={startsExpr:!0},l={num:new a("num",u),regexp:new a("regexp",u),string:new a("string",u),name:new a("name",u),eof:new a("eof"),bracketL:new a("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new a("]"),braceL:new a("{",{beforeExpr:!0,startsExpr:!0}),braceR:new a("}"),parenL:new a("(",{beforeExpr:!0,startsExpr:!0}),parenR:new a(")"),comma:new a(",",o),semi:new a(";",o),colon:new a(":",o),doubleColon:new a("::",o),dot:new a("."),question:new a("?",o),arrow:new a("=>",o),template:new a("template"),ellipsis:new a("...",o),backQuote:new a("`",u),dollarBraceL:new a("${",{beforeExpr:!0,startsExpr:!0}),at:new a("@"),eq:new a("=",{beforeExpr:!0,isAssign:!0}),assign:new a("_=",{beforeExpr:!0,isAssign:!0}),incDec:new a("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new a("prefix",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:r("||",1),logicalAND:r("&&",2),bitwiseOR:r("|",3),bitwiseXOR:r("^",4),bitwiseAND:r("&",5),equality:r("==/!=",6),relational:r("</>",7),bitShift:r("<</>>",8),plusMin:new a("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:r("%",10),star:r("*",10),slash:r("/",10),exponent:new a("**",{beforeExpr:!0,binop:11,rightAssociative:!0})};n.types=l;var p={};n.keywords=p,i("break"),i("case",o),i("catch"),i("continue"),i("debugger"),i("default",o),i("do",{isLoop:!0,beforeExpr:!0}),i("else",o),i("finally"),i("for",{isLoop:!0}),i("function",u),i("if"),i("return",o),i("switch"),i("throw",o),i("try"),i("var"),i("let"),i("const"),i("while",{isLoop:!0}),i("with"),i("new",{beforeExpr:!0,startsExpr:!0}),i("this",u),i("super",u),i("class"),i("extends",o),i("export"),i("import"),i("yield",{beforeExpr:!0,startsExpr:!0}),i("null",u),i("true",u),i("false",u),i("in",{beforeExpr:!0,binop:7}),i("instanceof",{beforeExpr:!0,binop:7}),i("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),i("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),i("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},{645:645}],639:[function(t,e,n){"use strict";function r(t){return t=t.split(" "),function(e){return t.indexOf(e)>=0}}function i(t,e){for(var n=65536,r=0;r<e.length;r+=2){if(n+=e[r],n>t)return!1;if(n+=e[r+1],n>=t)return!0}}function s(t){return 65>t?36===t:91>t?!0:97>t?95===t:123>t?!0:65535>=t?t>=170&&c.test(String.fromCharCode(t)):i(t,h)}function a(t){return 48>t?36===t:58>t?!0:65>t?!1:91>t?!0:97>t?95===t:123>t?!0:65535>=t?t>=170&&f.test(String.fromCharCode(t)):i(t,h)||i(t,d)}n.__esModule=!0,n.isIdentifierStart=s,n.isIdentifierChar=a;var o={6:r("enum await"),strict:r("implements interface let package private protected public static yield"),strictBind:r("eval arguments")};n.reservedWords=o;var u=r("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super");n.isKeyword=u;var l="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",p="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_",c=new RegExp("["+l+"]"),f=new RegExp("["+l+p+"]");l=p=null;var h=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,99,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,98,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,955,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,38,17,2,24,133,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,32,4,287,47,21,1,2,0,185,46,82,47,21,0,60,42,502,63,32,0,449,56,1288,920,104,110,2962,1070,13266,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,16481,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,1340,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,16355,541],d=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,16,9,83,11,168,11,6,9,8,2,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,316,19,13,9,214,6,3,8,112,16,16,9,82,12,9,9,535,9,20855,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,4305,6,792618,239]},{}],640:[function(t,e,n){"use strict";function r(t,e){for(var n=1,r=0;;){s.lineBreakG.lastIndex=r;var i=s.lineBreakG.exec(t);if(!(i&&i.index<e))return new a(n,e-r);++n,r=i.index+i[0].length}}var i=t(645)["default"];n.__esModule=!0,n.getLineInfo=r;var s=t(641),a=function u(t,e){i(this,u),this.line=t,this.column=e};n.Position=a;var o=function l(t,e){i(this,l),this.start=t,this.end=e};n.SourceLocation=o},{641:641,645:645}],641:[function(t,e,n){"use strict";function r(t){return 10===t||13===t||8232===t||8233===t}n.__esModule=!0,n.isNewLine=r;var i=/\r\n?|\n|\u2028|\u2029/;n.lineBreak=i;var s=new RegExp(i.source,"g");n.lineBreakG=s;var a=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;n.nonASCIIwhitespace=a},{}],642:[function(t,e,n){arguments[4][266][0].apply(n,arguments)},{266:266,648:648}],643:[function(t,e,n){arguments[4][270][0].apply(n,arguments)},{270:270,649:649}],644:[function(t,e,n){arguments[4][284][0].apply(n,arguments)},{284:284,650:650}],645:[function(t,e,n){arguments[4][273][0].apply(n,arguments)},{273:273}],646:[function(t,e,n){"use strict";var r=t(643)["default"],i=t(644)["default"];n["default"]=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=r(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(i?i(t,e):t.__proto__=e)},n.__esModule=!0},{643:643,644:644}],647:[function(t,e,n){arguments[4][277][0].apply(n,arguments)},{277:277}],648:[function(t,e,n){arguments[4][287][0].apply(n,arguments)},{287:287,684:684,687:687,688:688}],649:[function(t,e,n){arguments[4][291][0].apply(n,arguments)},{291:291,669:669}],650:[function(t,e,n){arguments[4][296][0].apply(n,arguments)},{296:296,655:655,686:686}],651:[function(t,e,n){arguments[4][298][0].apply(n,arguments)},{298:298}],652:[function(t,e,n){arguments[4][299][0].apply(n,arguments)},{299:299,664:664}],653:[function(t,e,n){arguments[4][301][0].apply(n,arguments)},{301:301,654:654,682:682}],654:[function(t,e,n){arguments[4][302][0].apply(n,arguments)},{302:302}],655:[function(t,e,n){arguments[4][306][0].apply(n,arguments)},{306:306}],656:[function(t,e,n){arguments[4][307][0].apply(n,arguments)},{307:307,651:651}],657:[function(t,e,n){arguments[4][308][0].apply(n,arguments)},{308:308,655:655,660:660}],658:[function(t,e,n){arguments[4][309][0].apply(n,arguments)},{309:309}],659:[function(t,e,n){arguments[4][311][0].apply(n,arguments)},{311:311}],660:[function(t,e,n){arguments[4][314][0].apply(n,arguments)},{314:314}],661:[function(t,e,n){arguments[4][315][0].apply(n,arguments)},{315:315}],662:[function(t,e,n){arguments[4][316][0].apply(n,arguments)},{316:316,669:669,671:671,676:676}],663:[function(t,e,n){arguments[4][317][0].apply(n,arguments)},{317:317,654:654}],664:[function(t,e,n){arguments[4][320][0].apply(n,arguments)},{320:320}],665:[function(t,e,n){arguments[4][322][0].apply(n,arguments)},{322:322,662:662,669:669,671:671,677:677,682:682}],666:[function(t,e,n){arguments[4][323][0].apply(n,arguments)},{323:323,657:657,661:661,662:662,665:665,668:668,669:669,670:670,672:672,677:677,682:682}],667:[function(t,e,n){arguments[4][324][0].apply(n,arguments)},{324:324}],668:[function(t,e,n){arguments[4][325][0].apply(n,arguments)},{325:325}],669:[function(t,e,n){arguments[4][326][0].apply(n,arguments)},{326:326}],670:[function(t,e,n){arguments[4][328][0].apply(n,arguments)},{328:328}],671:[function(t,e,n){arguments[4][331][0].apply(n,arguments)},{331:331}],672:[function(t,e,n){arguments[4][332][0].apply(n,arguments)},{332:332,662:662}],673:[function(t,e,n){arguments[4][333][0].apply(n,arguments)},{333:333,652:652,656:656,664:664,669:669}],674:[function(t,e,n){arguments[4][334][0].apply(n,arguments)},{334:334,660:660}],675:[function(t,e,n){arguments[4][337][0].apply(n,arguments)},{337:337,658:658,678:678}],676:[function(t,e,n){arguments[4][338][0].apply(n,arguments)},{338:338,659:659}],677:[function(t,e,n){arguments[4][339][0].apply(n,arguments)},{339:339,661:661,669:669,682:682}],678:[function(t,e,n){arguments[4][340][0].apply(n,arguments)},{340:340}],679:[function(t,e,n){arguments[4][341][0].apply(n,arguments)},{341:341,658:658,663:663}],680:[function(t,e,n){arguments[4][344][0].apply(n,arguments)},{344:344}],681:[function(t,e,n){arguments[4][345][0].apply(n,arguments)},{345:345}],682:[function(t,e,n){arguments[4][346][0].apply(n,arguments)},{346:346,660:660,674:674,680:680}],683:[function(t,e,n){arguments[4][347][0].apply(n,arguments)},{347:347,653:653,655:655,668:668,682:682}],684:[function(t,e,n){arguments[4][348][0].apply(n,arguments)},{348:348,652:652,655:655,683:683}],685:[function(t,e,n){arguments[4][349][0].apply(n,arguments)},{349:349,666:666,667:667,668:668,679:679,681:681}],686:[function(t,e,n){arguments[4][356][0].apply(n,arguments)},{356:356,657:657,673:673}],687:[function(t,e,n){arguments[4][358][0].apply(n,arguments)},{358:358,666:666,675:675}],688:[function(t,e,n){arguments[4][361][0].apply(n,arguments)},{361:361,668:668,685:685}]},{},[31])(31)});
|
test/electron-renderer/ui/WindowContainer_spec.js
|
MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-
|
/* eslint-disable no-unused-expressions */
import { remote } from 'electron';
import React from 'react';
import chai from 'chai';
import { mount } from 'enzyme';
import sinon from 'sinon';
import WindowContainer from '../../../build/renderer/ui/components/generic/WindowContainer';
import mockSettings, { fakeSettings, getVars, mockEvent } from './_mockSettings';
chai.should();
describe('<WindowContainer />', () => {
let fired;
let hooks;
let unhooks;
beforeEach(() => {
mockSettings();
fired = getVars().fired;
hooks = getVars().hooks;
unhooks = getVars().unhooks;
});
it('should not render a title when being the main window', () => {
fakeSettings('theme', false);
const component = mount(<WindowContainer isMainWindow title="Test Title" />);
component.find('.window-title').length.should.be.equal(0);
});
it('should render a title when not the main window', () => {
const component = mount(<WindowContainer title="Test Title" />);
component.find('.window-title').length.should.be.equal(1);
});
it('should hook into theme settings change events on mount', () => {
mount(<WindowContainer isMainWindow title="Test Title" />);
hooks['settings:change:theme'].should.be.ok;
hooks['settings:change:themeColor'].should.be.ok;
hooks['settings:change:themeType'].should.be.ok;
});
it('should unhook from theme settings change events on unmount', () => {
mount(<WindowContainer isMainWindow title="Test Title" />).unmount();
unhooks['settings:change:theme'].should.be.ok;
unhooks['settings:change:themeColor'].should.be.ok;
unhooks['settings:change:themeType'].should.be.ok;
});
it('should update the theme state when theme event is fired', () => {
const component = mount(<WindowContainer isMainWindow title="Test Title" />);
component.state().theme.should.be.equal('theme');
mockEvent('settings:change:theme', true);
component.state().theme.should.be.equal(true);
});
it('should update the themeType state when themeType event is fired', () => {
const component = mount(<WindowContainer isMainWindow title="Test Title" />);
component.state().themeType.should.be.equal('FULL');
mockEvent('settings:change:themeType', 'FULL');
component.state().themeType.should.be.equal('FULL');
});
it('should update the themeColor state when themeColor event is fired', () => {
const component = mount(<WindowContainer isMainWindow title="Test Title" />);
component.state().themeColor.should.be.equal('themeColor');
mockEvent('settings:change:themeColor', 'red');
component.state().themeColor.should.be.equal('red');
});
it('should render the window controls', () => {
const component = mount(<WindowContainer isMainWindow title="Test Title" />);
component.find('.control').length.should.be.equal(3);
fired.should.not.have.property('window:minimize');
component.find('.control').at(0).props()
.onClick();
fired.should.have.property('window:minimize');
});
it('should fire the window control events when the controls are used', () => {
const component = mount(<WindowContainer title="Test Title" />);
fired.should.not.have.property('window:minimize');
component.find('.control').at(0).props()
.onClick();
fired.should.have.property('window:minimize');
fired.should.not.have.property('window:maximize');
component.find('.control').at(1).props()
.onClick();
fired.should.have.property('window:maximize');
fired.should.not.have.property('window:close');
component.find('.control').at(2).props()
.onClick();
fired.should.have.property('window:close');
});
it('should confirm close when on the main page and a function is provided', () => {
const spy = sinon.spy();
const component = mount(<WindowContainer isMainWindow title="Test Title" confirmClose={spy} />);
spy.callCount.should.be.equal(0);
component.find('.control').at(2).props()
.onClick();
spy.callCount.should.be.equal(1);
});
it('should attempt to minimize on darwin when double clicking the titlebar and the user config is minimize', () => {
const _orig = remote.systemPreferences.getUserDefault;
remote.systemPreferences.getUserDefault = () => 'Minimize';
const component = mount(<WindowContainer isMainWindow title="Test Title" />);
component.instance()._darwinExpand();
fired.should.have.property('window:minimize');
remote.systemPreferences.getUserDefault = _orig;
});
it('should attempt to maximize on darwin when double clicking the titlebar and the user config is maximize', () => {
const _orig = remote.systemPreferences.getUserDefault;
remote.systemPreferences.getUserDefault = () => 'Maximize';
const component = mount(<WindowContainer isMainWindow title="Test Title" />);
component.instance()._darwinExpand();
fired.should.have.property('window:maximize');
remote.systemPreferences.getUserDefault = _orig;
});
it('should not attempt to perform a window actions on darwin when double clicking the titlebar and the user config is unknown', () => {
const _orig = remote.systemPreferences.getUserDefault;
remote.systemPreferences.getUserDefault = () => 'RandomString';
const component = mount(<WindowContainer isMainWindow title="Test Title" />);
component.instance()._darwinExpand();
fired.should.be.deep.equal({});
remote.systemPreferences.getUserDefault = _orig;
});
});
|
src/isomorphic/classic/element/ReactElementValidator.js
|
jmacman007/react
|
/**
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule ReactElementValidator
*/
/**
* ReactElementValidator provides a wrapper around a element factory
* which validates the props passed to the element. This is intended to be
* used only in DEV and could be replaced by a static type checker for languages
* that support it.
*/
'use strict';
var ReactElement = require('ReactElement');
var ReactFragment = require('ReactFragment');
var ReactPropTypeLocations = require('ReactPropTypeLocations');
var ReactPropTypeLocationNames = require('ReactPropTypeLocationNames');
var ReactCurrentOwner = require('ReactCurrentOwner');
var ReactNativeComponent = require('ReactNativeComponent');
var getIteratorFn = require('getIteratorFn');
var invariant = require('invariant');
var warning = require('warning');
function getDeclarationErrorAddendum() {
if (ReactCurrentOwner.current) {
var name = ReactCurrentOwner.current.getName();
if (name) {
return ' Check the render method of `' + name + '`.';
}
}
return '';
}
/**
* Warn if there's no key explicitly set on dynamic arrays of children or
* object keys are not valid. This allows us to keep track of children between
* updates.
*/
var ownerHasKeyUseWarning = {};
var loggedTypeFailures = {};
var NUMERIC_PROPERTY_REGEX = /^\d+$/;
/**
* Gets the instance's name for use in warnings.
*
* @internal
* @return {?string} Display name or undefined
*/
function getName(instance) {
var publicInstance = instance && instance.getPublicInstance();
if (!publicInstance) {
return undefined;
}
var constructor = publicInstance.constructor;
if (!constructor) {
return undefined;
}
return constructor.displayName || constructor.name || undefined;
}
/**
* Gets the current owner's displayName for use in warnings.
*
* @internal
* @return {?string} Display name or undefined
*/
function getCurrentOwnerDisplayName() {
var current = ReactCurrentOwner.current;
return (
current && getName(current) || undefined
);
}
/**
* Warn if the element doesn't have an explicit key assigned to it.
* This element is in an array. The array could grow and shrink or be
* reordered. All children that haven't already been validated are required to
* have a "key" property assigned to it.
*
* @internal
* @param {ReactElement} element Element that requires a key.
* @param {*} parentType element's parent's type.
*/
function validateExplicitKey(element, parentType) {
if (element._store.validated || element.key != null) {
return;
}
element._store.validated = true;
var addenda = getAddendaForKeyUse('uniqueKey', element, parentType);
if (addenda === null) {
// we already showed the warning
return;
}
warning(
false,
'Each child in an array or iterator should have a unique "key" prop.' +
'%s%s%s',
addenda.parentOrOwner || '',
addenda.childOwner || '',
addenda.url || ''
);
}
/**
* Warn if the key is being defined as an object property but has an incorrect
* value.
*
* @internal
* @param {string} name Property name of the key.
* @param {ReactElement} element Component that requires a key.
* @param {*} parentType element's parent's type.
*/
function validatePropertyKey(name, element, parentType) {
if (!NUMERIC_PROPERTY_REGEX.test(name)) {
return;
}
var addenda = getAddendaForKeyUse('numericKeys', element, parentType);
if (addenda === null) {
// we already showed the warning
return;
}
warning(
false,
'Child objects should have non-numeric keys so ordering is preserved.' +
'%s%s%s',
addenda.parentOrOwner || '',
addenda.childOwner || '',
addenda.url || ''
);
}
/**
* Shared warning and monitoring code for the key warnings.
*
* @internal
* @param {string} messageType A key used for de-duping warnings.
* @param {ReactElement} element Component that requires a key.
* @param {*} parentType element's parent's type.
* @returns {?object} A set of addenda to use in the warning message, or null
* if the warning has already been shown before (and shouldn't be shown again).
*/
function getAddendaForKeyUse(messageType, element, parentType) {
var ownerName = getCurrentOwnerDisplayName();
var parentName = typeof parentType === 'string' ?
parentType : parentType.displayName || parentType.name;
var useName = ownerName || parentName;
var memoizer = ownerHasKeyUseWarning[messageType] || (
ownerHasKeyUseWarning[messageType] = {}
);
if (memoizer[useName]) {
return null;
}
memoizer[useName] = true;
var addenda = {
parentOrOwner:
ownerName ? ` Check the render method of ${ownerName}.` :
parentName ? ` Check the React.render call using <${parentName}>.` :
null,
url: ' See https://fb.me/react-warning-keys for more information.',
childOwner: null,
};
// Usually the current owner is the offender, but if it accepts children as a
// property, it may be the creator of the child that's responsible for
// assigning it a key.
if (element &&
element._owner &&
element._owner !== ReactCurrentOwner.current) {
// Give the component that originally created this child.
addenda.childOwner =
` It was passed a child from ${getName(element._owner)}.`;
}
return addenda;
}
/**
* Ensure that every element either is passed in a static location, in an
* array with an explicit keys property defined, or in an object literal
* with valid key property.
*
* @internal
* @param {ReactNode} node Statically passed child of any type.
* @param {*} parentType node's parent's type.
*/
function validateChildKeys(node, parentType) {
if (Array.isArray(node)) {
for (var i = 0; i < node.length; i++) {
var child = node[i];
if (ReactElement.isValidElement(child)) {
validateExplicitKey(child, parentType);
}
}
} else if (ReactElement.isValidElement(node)) {
// This element was passed in a valid location.
node._store.validated = true;
} else if (node) {
var iteratorFn = getIteratorFn(node);
// Entry iterators provide implicit keys.
if (iteratorFn) {
if (iteratorFn !== node.entries) {
var iterator = iteratorFn.call(node);
var step;
while (!(step = iterator.next()).done) {
if (ReactElement.isValidElement(step.value)) {
validateExplicitKey(step.value, parentType);
}
}
}
} else if (typeof node === 'object') {
var fragment = ReactFragment.extractIfFragment(node);
for (var key in fragment) {
if (fragment.hasOwnProperty(key)) {
validatePropertyKey(key, fragment[key], parentType);
}
}
}
}
}
/**
* Assert that the props are valid
*
* @param {string} componentName Name of the component for error messages.
* @param {object} propTypes Map of prop name to a ReactPropType
* @param {object} props
* @param {string} location e.g. "prop", "context", "child context"
* @private
*/
function checkPropTypes(componentName, propTypes, props, location) {
for (var propName in propTypes) {
if (propTypes.hasOwnProperty(propName)) {
var error;
// Prop type validation may throw. In case they do, we don't want to
// fail the render phase where it didn't fail before. So we log it.
// After these have been cleaned up, we'll let them throw.
try {
// This is intentionally an invariant that gets caught. It's the same
// behavior as without this statement except with a better message.
invariant(
typeof propTypes[propName] === 'function',
'%s: %s type `%s` is invalid; it must be a function, usually from ' +
'React.PropTypes.',
componentName || 'React class',
ReactPropTypeLocationNames[location],
propName
);
error = propTypes[propName](props, propName, componentName, location);
} catch (ex) {
error = ex;
}
warning(
!error || error instanceof Error,
'%s: type specification of %s `%s` is invalid; the type checker ' +
'function must return `null` or an `Error` but returned a %s. ' +
'You may have forgotten to pass an argument to the type checker ' +
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
'shape all require an argument).',
componentName || 'React class',
ReactPropTypeLocationNames[location],
propName,
typeof error
);
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
// Only monitor this failure once because there tends to be a lot of the
// same error.
loggedTypeFailures[error.message] = true;
var addendum = getDeclarationErrorAddendum();
warning(false, 'Failed propType: %s%s', error.message, addendum);
}
}
}
}
var warnedPropsMutations = {};
/**
* Warn about mutating props when setting `propName` on `element`.
*
* @param {string} propName The string key within props that was set
* @param {ReactElement} element
*/
function warnForPropsMutation(propName, element) {
var type = element.type;
var elementName = typeof type === 'string' ? type : type.displayName;
var ownerName = element._owner ?
element._owner.getPublicInstance().constructor.displayName : null;
var warningKey = propName + '|' + elementName + '|' + ownerName;
if (warnedPropsMutations.hasOwnProperty(warningKey)) {
return;
}
warnedPropsMutations[warningKey] = true;
var elementInfo = '';
if (elementName) {
elementInfo = ' <' + elementName + ' />';
}
var ownerInfo = '';
if (ownerName) {
ownerInfo = ' The element was created by ' + ownerName + '.';
}
warning(
false,
'Don\'t set .props.%s of the React component%s. Instead, specify the ' +
'correct value when initially creating the element or use ' +
'React.cloneElement to make a new element with updated props.%s',
propName,
elementInfo,
ownerInfo
);
}
// Inline Object.is polyfill
function is(a, b) {
if (a !== a) {
// NaN
return b !== b;
}
if (a === 0 && b === 0) {
// +-0
return 1 / a === 1 / b;
}
return a === b;
}
/**
* Given an element, check if its props have been mutated since element
* creation (or the last call to this function). In particular, check if any
* new props have been added, which we can't directly catch by defining warning
* properties on the props object.
*
* @param {ReactElement} element
*/
function checkAndWarnForMutatedProps(element) {
if (!element._store) {
// Element was created using `new ReactElement` directly or with
// `ReactElement.createElement`; skip mutation checking
return;
}
var originalProps = element._store.originalProps;
var props = element.props;
for (var propName in props) {
if (props.hasOwnProperty(propName)) {
if (!originalProps.hasOwnProperty(propName) ||
!is(originalProps[propName], props[propName])) {
warnForPropsMutation(propName, element);
// Copy over the new value so that the two props objects match again
originalProps[propName] = props[propName];
}
}
}
}
/**
* Given an element, validate that its props follow the propTypes definition,
* provided by the type.
*
* @param {ReactElement} element
*/
function validatePropTypes(element) {
if (!(typeof element.type === 'string' ||
typeof element.type === 'function')) {
// This has already warned. Don't throw.
return;
}
// Extract the component class from the element. Converts string types
// to a composite class which may have propTypes.
// TODO: Validating a string's propTypes is not decoupled from the
// rendering target which is problematic.
var componentClass = ReactNativeComponent.getComponentClassForElement(
element
);
var name = componentClass.displayName || componentClass.name;
if (componentClass.propTypes) {
checkPropTypes(
name,
componentClass.propTypes,
element.props,
ReactPropTypeLocations.prop
);
}
if (typeof componentClass.getDefaultProps === 'function') {
warning(
componentClass.getDefaultProps.isReactClassApproved,
'getDefaultProps is only used on classic React.createClass ' +
'definitions. Use a static property named `defaultProps` instead.'
);
}
}
var ReactElementValidator = {
checkAndWarnForMutatedProps: checkAndWarnForMutatedProps,
createElement: function(type, props, children) {
// We warn in this case but don't throw. We expect the element creation to
// succeed and there will likely be errors in render.
warning(typeof type === 'string' || typeof type === 'function',
'React.createElement: type should not be null, undefined, boolean, or ' +
'number. It should be a string (for DOM elements) or a ReactClass ' +
'(for composite components).%s',
getDeclarationErrorAddendum()
);
var element = ReactElement.createElement.apply(this, arguments);
// The result can be nullish if a mock or a custom function is used.
// TODO: Drop this when these are no longer allowed as the type argument.
if (element == null) {
return element;
}
for (var i = 2; i < arguments.length; i++) {
validateChildKeys(arguments[i], type);
}
validatePropTypes(element);
return element;
},
createFactory: function(type) {
var validatedFactory = ReactElementValidator.createElement.bind(
null,
type
);
// Legacy hook TODO: Warn if this is accessed
validatedFactory.type = type;
if (__DEV__) {
try {
Object.defineProperty(
validatedFactory,
'type',
{
enumerable: false,
get: function() {
warning(
false,
'Factory.type is deprecated. Access the class directly ' +
'before passing it to createFactory.'
);
Object.defineProperty(this, 'type', {
value: type,
});
return type;
},
}
);
} catch (x) {
// IE will fail on defineProperty (es5-shim/sham too)
}
}
return validatedFactory;
},
cloneElement: function(element, props, children) {
var newElement = ReactElement.cloneElement.apply(this, arguments);
for (var i = 2; i < arguments.length; i++) {
validateChildKeys(arguments[i], newElement.type);
}
validatePropTypes(newElement);
return newElement;
},
};
module.exports = ReactElementValidator;
|
src/views/App/navigation.js
|
r1cebank/EventCore
|
/*
* Navigation is where when the app first starts it reads from the configuration
* and determine which navigator to use
*/
import React from 'react';
import { connect } from 'react-redux';
import { Views, Defaults } from '../../global/globalIncludes';
class NavigationShell extends React.Component {
static propTypes = {
loading: React.PropTypes.bool,
navigation: React.PropTypes.object
};
render() {
return (
(() => {
const NavigationView = Views[this.props.navigation.config.type];
// If the component is missing, fallback to default with message
if (!NavigationView) {
const warningText = `View ${this.props.navigation.config.type} not found`;
return <Defaults.WarningView warningText={warningText} />;
}
return <NavigationView />;
})()
);
}
}
module.exports = connect((store) => ({
navigation: store.data.navigation.data
}))(NavigationShell);
|
react-flux-mui/js/material-ui/src/svg-icons/action/receipt.js
|
pbogdan/react-flux-mui
|
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionReceipt = (props) => (
<SvgIcon {...props}>
<path d="M18 17H6v-2h12v2zm0-4H6v-2h12v2zm0-4H6V7h12v2zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2v20z"/>
</SvgIcon>
);
ActionReceipt = pure(ActionReceipt);
ActionReceipt.displayName = 'ActionReceipt';
ActionReceipt.muiName = 'SvgIcon';
export default ActionReceipt;
|
src/list/action-bar/index.js
|
KleeGroup/focus-components
|
// Dependencies
import PropTypes from 'prop-types';
import React from 'react';
import builder from 'focus-core/component/builder';
import reduce from 'lodash/collection/reduce';
// Components
import Dropdown from '../../components/dropdown';
import { component as ActionContextual } from '../action-contextual';
import TopicDisplayer from '../../components/topic-displayer';
import Button from '../../components/button';
// Mixins
import translationMixin from '../../common/i18n/mixin';
const ActionBar = {
/**
* Display name.
*/
displayName: 'ListActionBar',
mixins: [translationMixin],
propTypes: {
facetClickAction: PropTypes.func,
facetList: PropTypes.object,
groupAction: PropTypes.func,
groupLabelPrefix: PropTypes.string,
groupSelectedKey: PropTypes.string,
groupableColumnList: PropTypes.object,
hasGrouping: PropTypes.bool.isRequired,
isSelection: PropTypes.bool.isRequired,
operationList: PropTypes.array,
orderAction: PropTypes.func,
orderSelected: PropTypes.object,
orderableColumnList: PropTypes.array, // [{key:'columnKey', label:'columnLabel'}]
selectionAction: PropTypes.func,
selectionStatus: PropTypes.string // none, selected, partial
},
/**
* INit default props
* @returns {object} Defautkl props.
*/
getDefaultProps() {
return {
isSelection: true,
hasGrouping: true,
selectionStatus: 'none', // none, selected, partial
selectionAction(selectionStatus) {
console.warn(selectionStatus);
}, // Action on selection click
orderableColumnList: undefined, // [{key:'columnKey', label:'columnLabel'}]
orderAction(key, order) {
console.warn(key + '-' + order);
}, // Action on click on order function
orderSelected: {},
facetClickAction(key) {
console.warn(key);
}, // Action when click on facet
facetList: {}, // {facet1: 'Label of facet one', facet2:'Label of facet 2'} List of facets
groupableColumnList: {}, // {col1: 'Label1', col2: 'Label2'}
groupAction(key) {
console.warn(key);
}, // Action on group function
operationList: [], // List of contextual operations
groupLabelPrefix: ''
};
},
/**
* @returns {JSX} Selection component.
* @private
*/
_getSelectionObject() {
const onIconClick = () => {
const newSelectionStatus = this.props.selectionStatus === 'none' ? 'selected' : 'none';
this.props.selectionAction(newSelectionStatus);
};
return (
<Button shape='icon' icon={this._getSelectionObjectIcon()} handleOnClick={onIconClick} />
);
},
/**
* @returns {JSX} Order component.
* @private
*/
_getOrderObject() {
if (this.props.orderableColumnList) {
const orderSelectedParsedKey = this.props.orderSelected.key + this.props.orderSelected.order;
const orderOperationList = []; // [{key:'columnKey', order:'asc', label:'columnLabel'}]
for (const key in this.props.orderableColumnList) {
const description = this.props.orderableColumnList[key];
orderOperationList.push({
action: this._orderFunction(description.key, description.order),
label: description.label,
style: this._getSelectedStyle(description.key + description.order, orderSelectedParsedKey)
});
}
const orderIcon = 'sort_by_alpha';
return (
<Dropdown iconProps={{ name: orderIcon }} key='down' operationList={orderOperationList} />
);
}
return null;
},
/**
* @returns {JSX} Grouping component.
* @private
*/
_getGroupObject() {
const { hasGrouping } = this.props;
if (hasGrouping) {
const { groupLabelPrefix, groupSelectedKey, groupableColumnList, style } = this.props;
const groupOperationList = reduce(groupableColumnList, (operationList, label, key) => {
operationList.push({
action: this._groupFunction(key),
label: this.i18n(groupLabelPrefix + label),
style: this._getSelectedStyle(key, groupSelectedKey)
});
return operationList;
}, []).concat([{
label: this.i18n('list.actionBar.ungroup'),
action: this._groupFunction()
}]);
const groupIcon = 'folder_open';
return (
<Dropdown iconProps={{ name: groupIcon }} operationList={groupOperationList} />
);
}
return null;
},
/**
* @param {string} currentKey Current selected key.
* @param {string} selectedKey Key corresponding to the selected one.
* @returns {string} Class selected if currentKey corresponds to the selectedKey.
* @private
*/
_getSelectedStyle(currentKey, selectedKey) {
if (currentKey === selectedKey) {
return ' selected ';
}
return undefined;
},
/**
* @return {string} Class of the selection component icon.
* @private
*/
_getSelectionObjectIcon() {
if ('none' === this.props.selectionStatus) {
return 'check_box_outline_blank';
} else if ('selected' === this.props.selectionStatus) {
return 'check_box';
}
return 'indeterminate_check_box';
},
_orderFunction(key, order) {
return () => {
this.props.orderAction(key, order);
};
},
_groupFunction(key) {
return () => {
this.props.groupAction(key);
};
},
/**
* Render the html
* @returns {JSX} Htm content.
*/
render() {
return (
<div className='mdl-grid' data-focus='list-action-bar'>
<div className='mdl-cell' data-focus='global-list-content'>
{this.props.isSelection && this._getSelectionObject()}
{this._getOrderObject()}
{this._getGroupObject()}
</div>
<div className='mdl-cell mdl-cell--hide-tablet mdl-cell--hide-phone' data-focus='selected-facet-content'>
<TopicDisplayer
displayLabels
topicClickAction={this.props.facetClickAction}
topicList={this.props.facetList}
/>
</div>
<div className='mdl-cell' data-focus='contextual-action-content'>
<ActionContextual operationList={this.props.operationList} />
</div>
</div>
);
}
};
const { component, mixin } = builder(ActionBar);
export { component, mixin };
export default { component, mixin };
|
src/components/StatementsContainer/StatementsContainer.js
|
nambawan/g-old
|
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Box from '../Box';
import Statement from '../Statement';
import ConfirmLayer from '../ConfirmLayer';
import {
deleteStatement,
flag,
solveFlag,
createStatement,
updateStatement,
} from '../../actions/statement';
import { createLike, deleteLike } from '../../actions/statement_like';
import { updateUser } from '../../actions/user';
import {
getStatementUpdates,
getVisibibleStatementsByPoll,
} from '../../reducers';
import history from '../../history';
import Label from '../Label';
const handleProfileClick = ({ id }) => {
history.push(`/accounts/${id}`);
};
class StatementsContainer extends React.Component {
static propTypes = {
statements: PropTypes.arrayOf(
PropTypes.shape({
id: PropTypes.string,
text: PropTypes.string,
pollId: PropTypes.string,
}),
),
poll: PropTypes.shape({
likedStatements: PropTypes.arrayOf(
PropTypes.shape({
id: PropTypes.string,
statementId: PropTypes.string,
}),
),
ownStatement: PropTypes.shape({ id: PropTypes.string }),
ownVote: PropTypes.shape({
id: PropTypes.string,
}),
closedAt: PropTypes.string,
}).isRequired,
user: PropTypes.shape({ id: PropTypes.string }).isRequired,
followees: PropTypes.arrayOf(
PropTypes.shape({
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
}),
).isRequired,
updates: PropTypes.shape({}).isRequired,
hideOwnStatement: PropTypes.bool,
updateStatement: PropTypes.func.isRequired,
createStatement: PropTypes.func.isRequired,
deleteStatement: PropTypes.func.isRequired,
solveFlag: PropTypes.func.isRequired,
flag: PropTypes.func.isRequired,
createLike: PropTypes.func.isRequired,
deleteLike: PropTypes.func.isRequired,
updateUser: PropTypes.func.isRequired,
};
static defaultProps = {
statements: [],
hideOwnStatement: false,
};
constructor(props) {
super(props);
this.state = {};
this.handleStatementSubmission = this.handleStatementSubmission.bind(this);
this.toggleConfirmationLayer = this.toggleConfirmationLayer.bind(this);
this.handleStatementDeletion = this.handleStatementDeletion.bind(this);
}
handleStatementSubmission({ id, text }, makeUpdate) {
const { updateStatement: update } = this.props;
if (makeUpdate) {
update({ id, text });
}
}
toggleConfirmationLayer(val) {
this.setState(prevState => ({
showLayer: !prevState.showLayer,
toDelete: val,
}));
}
handleStatementDeletion(e) {
if (e) {
e.preventDefault();
e.stopPropagation();
}
const { toDelete } = this.state;
const { deleteStatement: deleteStmt } = this.props;
deleteStmt(toDelete).then(() => this.toggleConfirmationLayer());
}
render() {
const {
poll: {
ownStatement,
ownVote,
id,
likedStatements,
mode,
extended,
closedAt,
},
user,
hideOwnStatement,
followees,
updates,
statements,
children,
createStatement: create,
updateStatement: update,
deleteStatement: deleteStmt,
createLike: makeLike,
deleteLike: delLike,
updateUser: follow,
flag: createFlag,
solveFlag: mutateFlag,
filter,
} = this.props;
const { showLayer } = this.state;
let ownStatementsNode = null;
let statementsList = [];
if (mode.withStatements) {
if (!ownStatement && ownVote && !closedAt) {
const data = {
vote: ownVote,
author: user,
pollId: id,
likes: 0,
text: '',
};
ownStatementsNode = (
<Statement
neutral={extended}
user={user}
pollClosed={closedAt}
key="0000"
updates={updates['0000']}
{...data}
onCreate={create}
asInput={!closedAt}
followees={followees}
/>
);
}
if (ownStatement && !hideOwnStatement) {
ownStatementsNode = (
<Statement
neutral={extended}
pollClosed={closedAt}
user={user}
onSubmit={this.handleStatementSubmission}
key={ownStatement.id}
{...ownStatement}
updates={updates[ownStatement.id]}
ownStatement
followees={followees}
onUpdate={update}
onCreate={create}
onDelete={this.toggleConfirmationLayer}
/>
);
}
// eslint-disable-next-line eqeqeq
statementsList = statements.filter(s => s.author.id != user.id);
}
const outDated = {};
const toRender = statementsList.reduce((agg, curr) => {
if (curr.author.id in outDated) {
return agg;
}
outDated[curr.author.id] = curr.id;
agg.push(curr);
return agg;
}, []);
toRender.sort((a, b) => b.likes - a.likes);
return (
<Box column>
<Box align>
<Label>{`${statements.length} Statements`}</Label> {children}
</Box>
{filter === 'all' && ownStatementsNode}
{toRender.map(s => (
<Statement
{...s}
neutral={extended}
user={user}
key={s.id}
ownLike={
likedStatements &&
likedStatements.find(data => data.statementId === s.id)
}
onLike={makeLike}
onDeleteLike={delLike}
onFollow={follow}
onDelete={deleteStmt}
onModeration={mutateFlag}
onProfileClick={handleProfileClick}
onFlagging={createFlag}
followees={followees}
isFollowee={followees.some(f => f.id === s.author.id)}
/>
))}
{showLayer && (
<ConfirmLayer
onSubmit={this.handleStatementDeletion}
onClose={this.toggleConfirmationLayer}
/>
)}
</Box>
);
}
}
const mapStateToProps = (state, { poll: { id }, filter }) => {
const statements = getVisibibleStatementsByPoll(state, id, filter);
return {
statements,
updates: getStatementUpdates(state),
};
};
const mapDispatch = {
deleteStatement,
flag,
solveFlag,
createStatement,
updateStatement,
createLike,
deleteLike,
updateUser,
};
export default connect(
mapStateToProps,
mapDispatch,
)(StatementsContainer);
|
src/svg-icons/places/smoke-free.js
|
hwo411/material-ui
|
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let PlacesSmokeFree = (props) => (
<SvgIcon {...props}>
<path d="M2 6l6.99 7H2v3h9.99l7 7 1.26-1.25-17-17zm18.5 7H22v3h-1.5zM18 13h1.5v3H18zm.85-8.12c.62-.61 1-1.45 1-2.38h-1.5c0 1.02-.83 1.85-1.85 1.85v1.5c2.24 0 4 1.83 4 4.07V12H22V9.92c0-2.23-1.28-4.15-3.15-5.04zM14.5 8.7h1.53c1.05 0 1.97.74 1.97 2.05V12h1.5v-1.59c0-1.8-1.6-3.16-3.47-3.16H14.5c-1.02 0-1.85-.98-1.85-2s.83-1.75 1.85-1.75V2c-1.85 0-3.35 1.5-3.35 3.35s1.5 3.35 3.35 3.35zm2.5 7.23V13h-2.93z"/>
</SvgIcon>
);
PlacesSmokeFree = pure(PlacesSmokeFree);
PlacesSmokeFree.displayName = 'PlacesSmokeFree';
PlacesSmokeFree.muiName = 'SvgIcon';
export default PlacesSmokeFree;
|
spec/coffeescripts/jsx/shared/modal-contentSpec.js
|
djbender/canvas-lms
|
/*
* Copyright (C) 2015 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, version 3 of the License.
*
* Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import $ from 'jquery'
import React from 'react'
import ReactDOM from 'react-dom'
import TestUtils from 'react-dom/test-utils'
import ModalContent from 'jsx/shared/modal-content'
QUnit.module('ModalContent')
test('applies className to parent node', () => {
const ModalContentElement = <ModalContent className="cat" />
const component = TestUtils.renderIntoDocument(ModalContentElement)
ok($(ReactDOM.findDOMNode(component)).hasClass('cat'), 'applies class name')
ReactDOM.unmountComponentAtNode(ReactDOM.findDOMNode(component).parentNode)
})
test('renders children components', () => {
const mC = (
<ModalContent>
<div className="my_fun_div" />
</ModalContent>
)
const component = TestUtils.renderIntoDocument(mC)
ok($(ReactDOM.findDOMNode(component)).find('.my_fun_div'), 'inserts child component elements')
ReactDOM.unmountComponentAtNode(ReactDOM.findDOMNode(component).parentNode)
})
|
src/components/Forms/ProfileForm.js
|
Franco84/pubstomp
|
import React, { Component } from 'react';
import {Field, reduxForm} from 'redux-form'
import {Button} from 'react-bootstrap'
import { connect } from 'react-redux'
import { createProfile } from '../../actions'
class ProfileForm extends Component {
renderField(field) {
const { meta: {touched, error} } = field
const className = `form-group ${touched && error ? 'has-danger' : ''}`
return (
<div className={className}>
<input
className="form-control"
placeholder={field.placeholder}
type={field.type}
{...field.input}
/>
<div className="text-help">
{touched ? error : ''}
</div>
</div>
)
}
onSubmit(values) {
this.props.createProfile(values)
}
render() {
const {handleSubmit, pristine, reset, submitting} = this.props
return (
<form>
<Field
placeholder=" GamerTag/Preferred Name"
name="display_name"
type="text"
component={this.renderField}
/>
<Field
placeholder=" First Name"
name="first_name"
type="text"
component={this.renderField}
/>
<Field
placeholder=" Last Name"
name="last_name"
type="text"
component={this.renderField}
/>
<div className="flex-div">
<Button className="margin-button" onClick={handleSubmit(this.onSubmit.bind(this))} disabled={pristine || submitting} type="submit" bsStyle="primary" bsSize="small">Submit</Button>
<Button className="margin-button" type="button" disabled={pristine || submitting} bsSize="small" onClick={reset}>Clear</Button>
</div>
</form>
);
}
}
function validate(values) {
const errors = {}
if (!values.display_name) {
errors.display_name = "Enter Display Name"
}
if (!values.first_name) {
errors.first_name = "Enter First Name"
}
if (!values.last_name) {
errors.last_name = "Enter Last Name"
}
return errors
}
export default reduxForm({
validate,
form: 'ProfileForm',
enableReinitialize : true
})(
connect(null,{createProfile})(ProfileForm)
);
|
node_modules/babel-traverse/lib/path/lib/hoister.js
|
Sweetgrassbuffalo/ReactionSweeGrass-v2
|
"use strict";
exports.__esModule = true;
var _getIterator2 = require("babel-runtime/core-js/get-iterator");
var _getIterator3 = _interopRequireDefault(_getIterator2);
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _babelTypes = require("babel-types");
var t = _interopRequireWildcard(_babelTypes);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var referenceVisitor = {
ReferencedIdentifier: function ReferencedIdentifier(path, state) {
if (path.isJSXIdentifier() && _babelTypes.react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) {
return;
}
if (path.node.name === "this") {
var scope = path.scope;
do {
if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) break;
} while (scope = scope.parent);
if (scope) state.breakOnScopePaths.push(scope.path);
}
var binding = path.scope.getBinding(path.node.name);
if (!binding) return;
if (binding !== state.scope.getBinding(path.node.name)) return;
state.bindings[path.node.name] = binding;
}
};
var PathHoister = function () {
function PathHoister(path, scope) {
(0, _classCallCheck3.default)(this, PathHoister);
this.breakOnScopePaths = [];
this.bindings = {};
this.scopes = [];
this.scope = scope;
this.path = path;
this.attachAfter = false;
}
PathHoister.prototype.isCompatibleScope = function isCompatibleScope(scope) {
for (var key in this.bindings) {
var binding = this.bindings[key];
if (!scope.bindingIdentifierEquals(key, binding.identifier)) {
return false;
}
}
return true;
};
PathHoister.prototype.getCompatibleScopes = function getCompatibleScopes() {
var scope = this.path.scope;
do {
if (this.isCompatibleScope(scope)) {
this.scopes.push(scope);
} else {
break;
}
if (this.breakOnScopePaths.indexOf(scope.path) >= 0) {
break;
}
} while (scope = scope.parent);
};
PathHoister.prototype.getAttachmentPath = function getAttachmentPath() {
var path = this._getAttachmentPath();
if (!path) return;
var targetScope = path.scope;
if (targetScope.path === path) {
targetScope = path.scope.parent;
}
if (targetScope.path.isProgram() || targetScope.path.isFunction()) {
for (var name in this.bindings) {
if (!targetScope.hasOwnBinding(name)) continue;
var binding = this.bindings[name];
if (binding.kind === "param") continue;
if (this.getAttachmentParentForPath(binding.path).key > path.key) {
this.attachAfter = true;
path = binding.path;
for (var _iterator = binding.constantViolations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var violationPath = _ref;
if (this.getAttachmentParentForPath(violationPath).key > path.key) {
path = violationPath;
}
}
}
}
}
return path;
};
PathHoister.prototype._getAttachmentPath = function _getAttachmentPath() {
var scopes = this.scopes;
var scope = scopes.pop();
if (!scope) return;
if (scope.path.isFunction()) {
if (this.hasOwnParamBindings(scope)) {
if (this.scope === scope) return;
return scope.path.get("body").get("body")[0];
} else {
return this.getNextScopeAttachmentParent();
}
} else if (scope.path.isProgram()) {
return this.getNextScopeAttachmentParent();
}
};
PathHoister.prototype.getNextScopeAttachmentParent = function getNextScopeAttachmentParent() {
var scope = this.scopes.pop();
if (scope) return this.getAttachmentParentForPath(scope.path);
};
PathHoister.prototype.getAttachmentParentForPath = function getAttachmentParentForPath(path) {
do {
if (!path.parentPath || Array.isArray(path.container) && path.isStatement() || path.isVariableDeclarator() && path.parentPath.node !== null && path.parentPath.node.declarations.length > 1) return path;
} while (path = path.parentPath);
};
PathHoister.prototype.hasOwnParamBindings = function hasOwnParamBindings(scope) {
for (var name in this.bindings) {
if (!scope.hasOwnBinding(name)) continue;
var binding = this.bindings[name];
if (binding.kind === "param" && binding.constant) return true;
}
return false;
};
PathHoister.prototype.run = function run() {
var node = this.path.node;
if (node._hoisted) return;
node._hoisted = true;
this.path.traverse(referenceVisitor, this);
this.getCompatibleScopes();
var attachTo = this.getAttachmentPath();
if (!attachTo) return;
if (attachTo.getFunctionParent() === this.path.getFunctionParent()) return;
var uid = attachTo.scope.generateUidIdentifier("ref");
var declarator = t.variableDeclarator(uid, this.path.node);
var insertFn = this.attachAfter ? "insertAfter" : "insertBefore";
attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : t.variableDeclaration("var", [declarator])]);
var parent = this.path.parentPath;
if (parent.isJSXElement() && this.path.container === parent.node.children) {
uid = t.JSXExpressionContainer(uid);
}
this.path.replaceWith(uid);
};
return PathHoister;
}();
exports.default = PathHoister;
module.exports = exports["default"];
|
src/utils/CustomPropTypes.js
|
dongtong/react-bootstrap
|
import React from 'react';
import warning from 'react/lib/warning';
import childrenToArray from './childrenToArray';
const ANONYMOUS = '<<anonymous>>';
/**
* Create chain-able isRequired validator
*
* Largely copied directly from:
* https://github.com/facebook/react/blob/0.11-stable/src/core/ReactPropTypes.js#L94
*/
function createChainableTypeChecker(validate) {
function checkType(isRequired, props, propName, componentName) {
componentName = componentName || ANONYMOUS;
if (props[propName] == null) {
if (isRequired) {
return new Error(
`Required prop '${propName}' was not specified in '${componentName}'.`
);
}
} else {
return validate(props, propName, componentName);
}
}
let chainedCheckType = checkType.bind(null, false);
chainedCheckType.isRequired = checkType.bind(null, true);
return chainedCheckType;
}
function errMsg(props, propName, componentName, msgContinuation) {
return `Invalid prop '${propName}' of value '${props[propName]}'` +
` supplied to '${componentName}'${msgContinuation}`;
}
function createMountableChecker() {
function validate(props, propName, componentName) {
if (typeof props[propName] !== 'object' ||
typeof props[propName].render !== 'function' && props[propName].nodeType !== 1) {
return new Error(
errMsg(props, propName, componentName,
', expected a DOM element or an object that has a `render` method')
);
}
}
return createChainableTypeChecker(validate);
}
function createKeyOfChecker(obj) {
function validate(props, propName, componentName) {
let propValue = props[propName];
if (!obj.hasOwnProperty(propValue)) {
let valuesString = JSON.stringify(Object.keys(obj));
return new Error(
errMsg(props, propName, componentName, `, expected one of ${valuesString}.`)
);
}
}
return createChainableTypeChecker(validate);
}
function createSinglePropFromChecker(arrOfProps) {
function validate(props, propName) {
const usedPropCount = arrOfProps
.map(listedProp => props[listedProp])
.reduce((acc, curr) => acc + (curr !== undefined ? 1 : 0), 0);
if (usedPropCount > 1) {
const [first, ...others] = arrOfProps;
const message = `${others.join(', ')} and ${first}`;
return new Error(
`Invalid prop '${propName}', only one of the following ` +
`may be provided: ${message}`
);
}
}
return validate;
}
function all(propTypes) {
if (propTypes === undefined) {
throw new Error('No validations provided');
}
if (!(propTypes instanceof Array)) {
throw new Error('Invalid argument must be an array');
}
if (propTypes.length === 0) {
throw new Error('No validations provided');
}
return function validate(props, propName, componentName) {
for (let i = 0; i < propTypes.length; i++) {
let result = propTypes[i](props, propName, componentName);
if (result !== undefined && result !== null) {
return result;
}
}
};
}
function createElementTypeChecker() {
function validate(props, propName, componentName) {
let errBeginning = errMsg(props, propName, componentName,
'. Expected an Element `type`');
if (typeof props[propName] !== 'function') {
if (React.isValidElement(props[propName])) {
return new Error(errBeginning + ', not an actual Element');
}
if (typeof props[propName] !== 'string') {
return new Error(errBeginning +
' such as a tag name or return value of React.createClass(...)');
}
}
}
return createChainableTypeChecker(validate);
}
export default {
deprecated(propType, explanation) {
return function validate(props, propName, componentName) {
if (props[propName] != null) {
warning(false, `"${propName}" property of "${componentName}" has been deprecated.\n${explanation}`);
}
return propType(props, propName, componentName);
};
},
isRequiredForA11y(propType) {
return function validate(props, propName, componentName) {
if (props[propName] == null) {
return new Error(
'The prop `' + propName + '` is required to make ' + componentName + ' accessible ' +
'for users using assistive technologies such as screen readers `'
);
}
return propType(props, propName, componentName);
};
},
requiredRoles(...roles) {
return createChainableTypeChecker(
function requiredRolesValidator(props, propName, component) {
let missing;
let children = childrenToArray(props.children);
let inRole = (role, child) => role === child.props.bsRole;
roles.every(role => {
if (!children.some(child => inRole(role, child))) {
missing = role;
return false;
}
return true;
});
if (missing) {
return new Error(`(children) ${component} - Missing a required child with bsRole: ${missing}. ` +
`${component} must have at least one child of each of the following bsRoles: ${roles.join(', ')}`);
}
});
},
exclusiveRoles(...roles) {
return createChainableTypeChecker(
function exclusiveRolesValidator(props, propName, component) {
let children = childrenToArray(props.children);
let duplicate;
roles.every(role => {
let childrenWithRole = children.filter(child => child.props.bsRole === role);
if (childrenWithRole.length > 1) {
duplicate = role;
return false;
}
return true;
});
if (duplicate) {
return new Error(
`(children) ${component} - Duplicate children detected of bsRole: ${duplicate}. ` +
`Only one child each allowed with the following bsRoles: ${roles.join(', ')}`);
}
});
},
/**
* Checks whether a prop provides a DOM element
*
* The element can be provided in two forms:
* - Directly passed
* - Or passed an object that has a `render` method
*
* @param props
* @param propName
* @param componentName
* @returns {Error|undefined}
*/
mountable: createMountableChecker(),
/**
* Checks whether a prop provides a type of element.
*
* The type of element can be provided in two forms:
* - tag name (string)
* - a return value of React.createClass(...)
*
* @param props
* @param propName
* @param componentName
* @returns {Error|undefined}
*/
elementType: createElementTypeChecker(),
/**
* Checks whether a prop matches a key of an associated object
*
* @param props
* @param propName
* @param componentName
* @returns {Error|undefined}
*/
keyOf: createKeyOfChecker,
/**
* Checks if only one of the listed properties is in use. An error is given
* if multiple have a value
*
* @param props
* @param propName
* @param componentName
* @returns {Error|undefined}
*/
singlePropFrom: createSinglePropFromChecker,
all
};
|
tests/GeoDistanceDropdown/GeoDistanceDropdown.js
|
appbaseio/reactive-maps
|
import React from 'react';
import { ReactiveBase, GeoDistanceDropdown, ReactiveMap } from '../../app/app.js';
import {config} from './config';
import { mount } from 'enzyme';
var GoogleMapsLoader = require('google-maps');
GoogleMapsLoader.KEY = 'AIzaSyC-v0oz7Pay_ltypZbKasABXGiY9NlpCIY';
GoogleMapsLoader.VERSION = 3.14;
GoogleMapsLoader.LIBRARIES = ['geometry', 'places'];
var google;
function testComponent(cb) {
const onData = function(res, err) {
cb(res, err);
}
const component = mount(
<ReactiveBase
app={config.ReactiveBase.app}
username={config.ReactiveBase.username}
password={config.ReactiveBase.password}
type={config.ReactiveBase.type}
>
<div className="row">
<div className="col s6 col-xs-6">
<GeoDistanceDropdown
componentId="CitySensor"
appbaseField={config.mapping.location}
title="GeoDistanceDropdown"
defaultSelected={config.GeoDistanceDropdown.defaultSelected}
unit={config.GeoDistanceDropdown.unit}
data={config.GeoDistanceDropdown.data}
/>
</div>
<div className="col s6 col-xs-6">
<ReactiveMap
componentId="SearchResult"
appbaseField={config.mapping.location}
onData={onData}
size={config.ReactiveMap.size}
react={{
'and': ["CitySensor"]
}}
/>
</div>
</div>
</ReactiveBase>
);
}
export var GeoDistanceDropdownTest = function() {
return new Promise((resolve, reject) => {
GoogleMapsLoader.load(function(googleLoad) {
google = googleLoad;
window.google = googleLoad;
start();
});
function start() {
testComponent(function(res,err) {
if (err) {
reject(err);
} else if (res) {
resolve(res);
}
});
}
});
}
|
Maven-Extjs-001/Maven-Extjs-001/src/main/webapp/resource/js/ext-4.2.1/docs/output/Ext.ux.statusbar.StatusBar.js
|
zyz963272311/testGitHub
|
Ext.data.JsonP.Ext_ux_statusbar_StatusBar({"alternateClassNames":["Ext.ux.StatusBar"],"aliases":{"widget":["statusbar"]},"enum":null,"parentMixins":["Ext.Queryable","Ext.state.Stateful","Ext.util.Animate","Ext.util.ElementContainer","Ext.util.Floating","Ext.util.Observable","Ext.util.Positionable","Ext.util.Renderable"],"tagname":"class","subclasses":[],"extends":"Ext.toolbar.Toolbar","uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Alternate names</h4><div class='alternate-class-name'>Ext.ux.StatusBar</div><h4>Hierarchy</h4><div class='subclass first-child'><a href='#!/api/Ext.Base' rel='Ext.Base' class='docClass'>Ext.Base</a><div class='subclass '><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='docClass'>Ext.AbstractComponent</a><div class='subclass '><a href='#!/api/Ext.Component' rel='Ext.Component' class='docClass'>Ext.Component</a><div class='subclass '><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='docClass'>Ext.container.AbstractContainer</a><div class='subclass '><a href='#!/api/Ext.container.Container' rel='Ext.container.Container' class='docClass'>Ext.container.Container</a><div class='subclass '><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='docClass'>Ext.toolbar.Toolbar</a><div class='subclass '><strong>Ext.ux.statusbar.StatusBar</strong></div></div></div></div></div></div></div><h4>Inherited mixins</h4><div class='dependency'><a href='#!/api/Ext.Queryable' rel='Ext.Queryable' class='docClass'>Ext.Queryable</a></div><div class='dependency'><a href='#!/api/Ext.state.Stateful' rel='Ext.state.Stateful' class='docClass'>Ext.state.Stateful</a></div><div class='dependency'><a href='#!/api/Ext.util.Animate' rel='Ext.util.Animate' class='docClass'>Ext.util.Animate</a></div><div class='dependency'><a href='#!/api/Ext.util.ElementContainer' rel='Ext.util.ElementContainer' class='docClass'>Ext.util.ElementContainer</a></div><div class='dependency'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='docClass'>Ext.util.Floating</a></div><div class='dependency'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='docClass'>Ext.util.Observable</a></div><div class='dependency'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='docClass'>Ext.util.Positionable</a></div><div class='dependency'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='docClass'>Ext.util.Renderable</a></div><h4>Requires</h4><div class='dependency'><a href='#!/api/Ext.toolbar.TextItem' rel='Ext.toolbar.TextItem' class='docClass'>Ext.toolbar.TextItem</a></div><h4>Files</h4><div class='dependency'><a href='source/StatusBar.html#Ext-ux-statusbar-StatusBar' target='_blank'>StatusBar.js</a></div></pre><div class='doc-contents'><p>Basic status bar component that can be used as the bottom toolbar of any <a href=\"#!/api/Ext.panel.Panel\" rel=\"Ext.panel.Panel\" class=\"docClass\">Ext.Panel</a>. In addition to\nsupporting the standard <a href=\"#!/api/Ext.toolbar.Toolbar\" rel=\"Ext.toolbar.Toolbar\" class=\"docClass\">Ext.toolbar.Toolbar</a> interface for adding buttons, menus and other items, the StatusBar\nprovides a greedy status element that can be aligned to either side and has convenient methods for setting the\nstatus text and icon. You can also indicate that something is processing using the <a href=\"#!/api/Ext.ux.statusbar.StatusBar-method-showBusy\" rel=\"Ext.ux.statusbar.StatusBar-method-showBusy\" class=\"docClass\">showBusy</a> method.</p>\n\n<pre><code><a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('<a href=\"#!/api/Ext.panel.Panel\" rel=\"Ext.panel.Panel\" class=\"docClass\">Ext.Panel</a>', {\n title: 'StatusBar',\n // etc.\n bbar: <a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('<a href=\"#!/api/Ext.ux.statusbar.StatusBar\" rel=\"Ext.ux.statusbar.StatusBar\" class=\"docClass\">Ext.ux.StatusBar</a>', {\n id: 'my-status',\n\n // defaults to use when the status is cleared:\n defaultText: 'Default status text',\n defaultIconCls: 'default-icon',\n\n // values to set initially:\n text: 'Ready',\n iconCls: 'ready-icon',\n\n // any standard Toolbar items:\n items: [{\n text: 'A Button'\n }, '-', 'Plain Text']\n })\n});\n\n// Update the status bar later in code:\nvar sb = <a href=\"#!/api/Ext-method-getCmp\" rel=\"Ext-method-getCmp\" class=\"docClass\">Ext.getCmp</a>('my-status');\nsb.setStatus({\n text: 'OK',\n iconCls: 'ok-icon',\n clear: true // auto-clear after a set interval\n});\n\n// Set the status bar to show that something is processing:\nsb.showBusy();\n\n// processing....\n\nsb.clearStatus(); // once completeed\n</code></pre>\n</div><div class='members'><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-cfg'>Config options</h3><div class='subsection'><div id='cfg-activeItem' class='member first-child inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-cfg-activeItem' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-cfg-activeItem' class='name expandable'>activeItem</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span></div><div class='description'><div class='short'>A string component id or the numeric index of the component that should be\ninitially activated within the container's...</div><div class='long'><p>A string component id or the numeric index of the component that should be\ninitially activated within the container's layout on render. For example,\nactiveItem: 'item-1' or activeItem: 0 (index 0 = the first item in the\ncontainer's collection). activeItem only applies to layout styles that can\ndisplay items one at a time (like <a href=\"#!/api/Ext.layout.container.Card\" rel=\"Ext.layout.container.Card\" class=\"docClass\">Ext.layout.container.Card</a> and\n<a href=\"#!/api/Ext.layout.container.Fit\" rel=\"Ext.layout.container.Fit\" class=\"docClass\">Ext.layout.container.Fit</a>).</p>\n <p>Available since: <b>2.3.0</b></p>\n</div></div></div><div id='cfg-anchorSize' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.Container' rel='Ext.container.Container' class='defined-in docClass'>Ext.container.Container</a><br/><a href='source/Anchor.html#Ext-container-Container-cfg-anchorSize' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.Container-cfg-anchorSize' class='name expandable'>anchorSize</a><span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span></div><div class='description'><div class='short'>Defines the anchoring size of container. ...</div><div class='long'><p>Defines the anchoring size of container.\nEither a number to define the width of the container or an object with <code>width</code> and <code>height</code> fields.</p>\n</div></div></div><div id='cfg-autoClear' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.statusbar.StatusBar'>Ext.ux.statusbar.StatusBar</span><br/><a href='source/StatusBar.html#Ext-ux-statusbar-StatusBar-cfg-autoClear' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.statusbar.StatusBar-cfg-autoClear' class='name expandable'>autoClear</a><span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span></div><div class='description'><div class='short'>The number of milliseconds to wait after setting the status via\nsetStatus before automatically clearing the status te...</div><div class='long'><p>The number of milliseconds to wait after setting the status via\n<a href=\"#!/api/Ext.ux.statusbar.StatusBar-method-setStatus\" rel=\"Ext.ux.statusbar.StatusBar-method-setStatus\" class=\"docClass\">setStatus</a> before automatically clearing the status text and icon.\nNote that this only applies when passing the <code>clear</code> argument to <a href=\"#!/api/Ext.ux.statusbar.StatusBar-method-setStatus\" rel=\"Ext.ux.statusbar.StatusBar-method-setStatus\" class=\"docClass\">setStatus</a>\nsince that is the only way to defer clearing the status. This can\nbe overridden by specifying a different <code>wait</code> value in <a href=\"#!/api/Ext.ux.statusbar.StatusBar-method-setStatus\" rel=\"Ext.ux.statusbar.StatusBar-method-setStatus\" class=\"docClass\">setStatus</a>.\nCalls to <a href=\"#!/api/Ext.ux.statusbar.StatusBar-method-clearStatus\" rel=\"Ext.ux.statusbar.StatusBar-method-clearStatus\" class=\"docClass\">clearStatus</a> always clear the status bar immediately and ignore this value.</p>\n<p>Defaults to: <code>5000</code></p></div></div></div><div id='cfg-autoDestroy' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-cfg-autoDestroy' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-cfg-autoDestroy' class='name expandable'>autoDestroy</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>If true the container will automatically destroy any contained component that is removed\nfrom it, else destruction mu...</div><div class='long'><p>If true the container will automatically destroy any contained component that is removed\nfrom it, else destruction must be handled manually.</p>\n<p>Defaults to: <code>true</code></p> <p>Available since: <b>2.3.0</b></p>\n</div></div></div><div id='cfg-autoEl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-autoEl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-autoEl' class='name expandable'>autoEl</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span></div><div class='description'><div class='short'>A tag name or DomHelper spec used to create the Element which will\nencapsulate this Component. ...</div><div class='long'><p>A tag name or <a href=\"#!/api/Ext.DomHelper\" rel=\"Ext.DomHelper\" class=\"docClass\">DomHelper</a> spec used to create the <a href=\"#!/api/Ext.AbstractComponent-method-getEl\" rel=\"Ext.AbstractComponent-method-getEl\" class=\"docClass\">Element</a> which will\nencapsulate this Component.</p>\n\n<p>You do not normally need to specify this. For the base classes <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> and\n<a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a>, this defaults to <strong>'div'</strong>. The more complex Sencha classes use a more\ncomplex DOM structure specified by their own <a href=\"#!/api/Ext.AbstractComponent-cfg-renderTpl\" rel=\"Ext.AbstractComponent-cfg-renderTpl\" class=\"docClass\">renderTpl</a>s.</p>\n\n<p>This is intended to allow the developer to create application-specific utility Components encapsulated by\ndifferent DOM elements. Example usage:</p>\n\n<pre><code>{\n xtype: 'component',\n autoEl: {\n tag: 'img',\n src: 'http://www.example.com/example.jpg'\n }\n}, {\n xtype: 'component',\n autoEl: {\n tag: 'blockquote',\n html: 'autoEl is cool!'\n }\n}, {\n xtype: 'container',\n autoEl: 'ul',\n cls: 'ux-unordered-list',\n items: {\n xtype: 'component',\n autoEl: 'li',\n html: 'First list item'\n }\n}\n</code></pre>\n <p>Available since: <b>2.3.0</b></p>\n</div></div></div><div id='cfg-autoLoad' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-autoLoad' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-autoLoad' class='name expandable'>autoLoad</a><span> : <a href=\"#!/api/Ext.ComponentLoader\" rel=\"Ext.ComponentLoader\" class=\"docClass\">Ext.ComponentLoader</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><strong class='deprecated signature' >deprecated</strong></div><div class='description'><div class='short'>An alias for loader config which also allows to specify just a string which will be\nused as the url that's automatica...</div><div class='long'><p>An alias for <a href=\"#!/api/Ext.AbstractComponent-cfg-loader\" rel=\"Ext.AbstractComponent-cfg-loader\" class=\"docClass\">loader</a> config which also allows to specify just a string which will be\nused as the url that's automatically loaded:</p>\n\n<pre><code><a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('<a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>', {\n autoLoad: 'content.html',\n renderTo: <a href=\"#!/api/Ext-method-getBody\" rel=\"Ext-method-getBody\" class=\"docClass\">Ext.getBody</a>()\n});\n</code></pre>\n\n<p>The above is the same as:</p>\n\n<pre><code><a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('<a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>', {\n loader: {\n url: 'content.html',\n autoLoad: true\n },\n renderTo: <a href=\"#!/api/Ext-method-getBody\" rel=\"Ext-method-getBody\" class=\"docClass\">Ext.getBody</a>()\n});\n</code></pre>\n\n<p>Don't use it together with <a href=\"#!/api/Ext.AbstractComponent-cfg-loader\" rel=\"Ext.AbstractComponent-cfg-loader\" class=\"docClass\">loader</a> config.</p>\n <div class='signature-box deprecated'>\n <p>This cfg has been <strong>deprecated</strong> since 4.1.1</p>\n <p>Use <a href=\"#!/api/Ext.AbstractComponent-cfg-loader\" rel=\"Ext.AbstractComponent-cfg-loader\" class=\"docClass\">loader</a> config instead.</p>\n\n </div>\n</div></div></div><div id='cfg-autoRender' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-autoRender' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-autoRender' class='name expandable'>autoRender</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/HTMLElement/<a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a></span></div><div class='description'><div class='short'>This config is intended mainly for non-floating Components which may or may not be shown. ...</div><div class='long'><p>This config is intended mainly for non-<a href=\"#!/api/Ext.AbstractComponent-cfg-floating\" rel=\"Ext.AbstractComponent-cfg-floating\" class=\"docClass\">floating</a> Components which may or may not be shown. Instead of using\n<a href=\"#!/api/Ext.AbstractComponent-cfg-renderTo\" rel=\"Ext.AbstractComponent-cfg-renderTo\" class=\"docClass\">renderTo</a> in the configuration, and rendering upon construction, this allows a Component to render itself\nupon first <em><a href=\"#!/api/Ext.Component-method-show\" rel=\"Ext.Component-method-show\" class=\"docClass\">show</a></em>. If <a href=\"#!/api/Ext.AbstractComponent-cfg-floating\" rel=\"Ext.AbstractComponent-cfg-floating\" class=\"docClass\">floating</a> is <code>true</code>, the value of this config is omitted as if it is <code>true</code>.</p>\n\n<p>Specify as <code>true</code> to have this Component render to the document body upon first show.</p>\n\n<p>Specify as an element, or the ID of an element to have this Component render to a specific element upon first\nshow.</p>\n<p>Defaults to: <code>false</code></p></div></div></div><div id='cfg-autoScroll' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-cfg-autoScroll' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-cfg-autoScroll' class='name expandable'>autoScroll</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>true to use overflow:'auto' on the components layout element and show scroll bars automatically when necessary,\nfalse...</div><div class='long'><p><code>true</code> to use overflow:'auto' on the components layout element and show scroll bars automatically when necessary,\n<code>false</code> to clip any overflowing content.\nThis should not be combined with <a href=\"#!/api/Ext.Component-cfg-overflowX\" rel=\"Ext.Component-cfg-overflowX\" class=\"docClass\">overflowX</a> or <a href=\"#!/api/Ext.Component-cfg-overflowY\" rel=\"Ext.Component-cfg-overflowY\" class=\"docClass\">overflowY</a>.</p>\n<p>Defaults to: <code>false</code></p></div></div></div><div id='cfg-autoShow' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-autoShow' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-autoShow' class='name expandable'>autoShow</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>true to automatically show the component upon creation. ...</div><div class='long'><p><code>true</code> to automatically show the component upon creation. This config option may only be used for\n<a href=\"#!/api/Ext.AbstractComponent-cfg-floating\" rel=\"Ext.AbstractComponent-cfg-floating\" class=\"docClass\">floating</a> components or components that use <a href=\"#!/api/Ext.AbstractComponent-cfg-autoRender\" rel=\"Ext.AbstractComponent-cfg-autoRender\" class=\"docClass\">autoRender</a>.</p>\n<p>Defaults to: <code>false</code></p> <p>Available since: <b>2.3.0</b></p>\n</div></div></div><div id='cfg-baseCls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-cfg-baseCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-cfg-baseCls' class='name expandable'>baseCls</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>The base CSS class to apply to this component's element. ...</div><div class='long'><p>The base CSS class to apply to this component's element. This will also be prepended to elements within this\ncomponent like Panel's body will get a class <code>x-panel-body</code>. This means that if you create a subclass of Panel, and\nyou want it to get all the Panels styling for the element and the body, you leave the <code>baseCls</code> <code>x-panel</code> and use\n<code>componentCls</code> to add specific styling for this component.</p>\n<p>Defaults to: <code>Ext.baseCSSPrefix + 'toolbar'</code></p><p>Overrides: <a href='#!/api/Ext.container.AbstractContainer-cfg-baseCls' rel='Ext.container.AbstractContainer-cfg-baseCls' class='docClass'>Ext.container.AbstractContainer.baseCls</a></p></div></div></div><div id='cfg-border' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-border' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-border' class='name expandable'>border</a><span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>Specifies the border size for this component. ...</div><div class='long'><p>Specifies the border size for this component. The border can be a single numeric value to apply to all sides or it can\nbe a CSS style specification for each style, for example: '10 5 3 10' (top, right, bottom, left).</p>\n\n<p>For components that have no border by default, setting this won't make the border appear by itself.\nYou also need to specify border color and style:</p>\n\n<pre><code>border: 5,\nstyle: {\n borderColor: 'red',\n borderStyle: 'solid'\n}\n</code></pre>\n\n<p>To turn off the border, use <code>border: false</code>.</p>\n</div></div></div><div id='cfg-bubbleEvents' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-cfg-bubbleEvents' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-cfg-bubbleEvents' class='name expandable'>bubbleEvents</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>[]</span></div><div class='description'><div class='short'>An array of events that, when fired, should be bubbled to any parent container. ...</div><div class='long'><p>An array of events that, when fired, should be bubbled to any parent container.\nSee <a href=\"#!/api/Ext.util.Observable-method-enableBubble\" rel=\"Ext.util.Observable-method-enableBubble\" class=\"docClass\">Ext.util.Observable.enableBubble</a>.</p>\n <p>Available since: <b>3.4.0</b></p>\n</div></div></div><div id='cfg-busyIconCls' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.statusbar.StatusBar'>Ext.ux.statusbar.StatusBar</span><br/><a href='source/StatusBar.html#Ext-ux-statusbar-StatusBar-cfg-busyIconCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.statusbar.StatusBar-cfg-busyIconCls' class='name expandable'>busyIconCls</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>The default iconCls applied when calling showBusy. ...</div><div class='long'><p>The default <a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-iconCls\" rel=\"Ext.ux.statusbar.StatusBar-cfg-iconCls\" class=\"docClass\">iconCls</a> applied when calling <a href=\"#!/api/Ext.ux.statusbar.StatusBar-method-showBusy\" rel=\"Ext.ux.statusbar.StatusBar-method-showBusy\" class=\"docClass\">showBusy</a>.\nIt can be overridden at any time by passing the <code>iconCls</code> argument into <a href=\"#!/api/Ext.ux.statusbar.StatusBar-method-showBusy\" rel=\"Ext.ux.statusbar.StatusBar-method-showBusy\" class=\"docClass\">showBusy</a>.</p>\n<p>Defaults to: <code>'x-status-busy'</code></p></div></div></div><div id='cfg-busyText' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.statusbar.StatusBar'>Ext.ux.statusbar.StatusBar</span><br/><a href='source/StatusBar.html#Ext-ux-statusbar-StatusBar-cfg-busyText' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.statusbar.StatusBar-cfg-busyText' class='name expandable'>busyText</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>The default text applied when calling showBusy. ...</div><div class='long'><p>The default <a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-text\" rel=\"Ext.ux.statusbar.StatusBar-cfg-text\" class=\"docClass\">text</a> applied when calling <a href=\"#!/api/Ext.ux.statusbar.StatusBar-method-showBusy\" rel=\"Ext.ux.statusbar.StatusBar-method-showBusy\" class=\"docClass\">showBusy</a>.\nIt can be overridden at any time by passing the <code>text</code> argument into <a href=\"#!/api/Ext.ux.statusbar.StatusBar-method-showBusy\" rel=\"Ext.ux.statusbar.StatusBar-method-showBusy\" class=\"docClass\">showBusy</a>.</p>\n<p>Defaults to: <code>'Loading...'</code></p></div></div></div><div id='cfg-childEls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-childEls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-childEls' class='name expandable'>childEls</a><span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>[]</span></div><div class='description'><div class='short'>An array describing the child elements of the Component. ...</div><div class='long'><p>An array describing the child elements of the Component. Each member of the array\nis an object with these properties:</p>\n\n<ul>\n<li><code>name</code> - The property name on the Component for the child element.</li>\n<li><code>itemId</code> - The id to combine with the Component's id that is the id of the child element.</li>\n<li><code>id</code> - The id of the child element.</li>\n</ul>\n\n\n<p>If the array member is a string, it is equivalent to <code>{ name: m, itemId: m }</code>.</p>\n\n<p>For example, a Component which renders a title and body text:</p>\n\n<pre class='inline-example '><code><a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('<a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>', {\n renderTo: <a href=\"#!/api/Ext-method-getBody\" rel=\"Ext-method-getBody\" class=\"docClass\">Ext.getBody</a>(),\n renderTpl: [\n '<h1 id=\"{id}-title\">{title}</h1>',\n '<p>{msg}</p>',\n ],\n renderData: {\n title: \"Error\",\n msg: \"Something went wrong\"\n },\n childEls: [\"title\"],\n listeners: {\n afterrender: function(cmp){\n // After rendering the component will have a title property\n cmp.title.setStyle({color: \"red\"});\n }\n }\n});\n</code></pre>\n\n<p>A more flexible, but somewhat slower, approach is <a href=\"#!/api/Ext.AbstractComponent-cfg-renderSelectors\" rel=\"Ext.AbstractComponent-cfg-renderSelectors\" class=\"docClass\">renderSelectors</a>.</p>\n</div></div></div><div id='cfg-cls' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.statusbar.StatusBar'>Ext.ux.statusbar.StatusBar</span><br/><a href='source/StatusBar.html#Ext-ux-statusbar-StatusBar-cfg-cls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.statusbar.StatusBar-cfg-cls' class='name expandable'>cls</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>The base class applied to the containing element for this component on render. ...</div><div class='long'><p>The base class applied to the containing element for this component on render.</p>\n<p>Defaults to: <code>'x-statusbar'</code></p><p>Overrides: <a href='#!/api/Ext.AbstractComponent-cfg-cls' rel='Ext.AbstractComponent-cfg-cls' class='docClass'>Ext.AbstractComponent.cls</a></p></div></div></div><div id='cfg-columnWidth' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-cfg-columnWidth' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-cfg-columnWidth' class='name expandable'>columnWidth</a><span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>Defines the column width inside column layout. ...</div><div class='long'><p>Defines the column width inside <a href=\"#!/api/Ext.layout.container.Column\" rel=\"Ext.layout.container.Column\" class=\"docClass\">column layout</a>.</p>\n\n<p>Can be specified as a number or as a percentage.</p>\n</div></div></div><div id='cfg-componentCls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-componentCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-componentCls' class='name not-expandable'>componentCls</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'><p>CSS Class to be added to a components root level element to give distinction to it via styling.</p>\n</div><div class='long'><p>CSS Class to be added to a components root level element to give distinction to it via styling.</p>\n</div></div></div><div id='cfg-componentLayout' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-componentLayout' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-componentLayout' class='name expandable'>componentLayout</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span></div><div class='description'><div class='short'>The sizing and positioning of a Component's internal Elements is the responsibility of the Component's layout\nmanager...</div><div class='long'><p>The sizing and positioning of a Component's internal Elements is the responsibility of the Component's layout\nmanager which sizes a Component's internal structure in response to the Component being sized.</p>\n\n<p>Generally, developers will not use this configuration as all provided Components which need their internal\nelements sizing (Such as <a href=\"#!/api/Ext.form.field.Base\" rel=\"Ext.form.field.Base\" class=\"docClass\">input fields</a>) come with their own componentLayout managers.</p>\n\n<p>The <a href=\"#!/api/Ext.layout.container.Auto\" rel=\"Ext.layout.container.Auto\" class=\"docClass\">default layout manager</a> will be used on instances of the base <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>\nclass which simply sizes the Component's encapsulating element to the height and width specified in the\n<a href=\"#!/api/Ext.AbstractComponent-method-setSize\" rel=\"Ext.AbstractComponent-method-setSize\" class=\"docClass\">setSize</a> method.</p>\n</div></div></div><div id='cfg-constrain' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-cfg-constrain' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-cfg-constrain' class='name expandable'>constrain</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>True to constrain this Components within its containing element, false to allow it to fall outside of its containing\n...</div><div class='long'><p>True to constrain this Components within its containing element, false to allow it to fall outside of its containing\nelement. By default this Component will be rendered to <code>document.body</code>. To render and constrain this Component within\nanother element specify <a href=\"#!/api/Ext.AbstractComponent-cfg-renderTo\" rel=\"Ext.AbstractComponent-cfg-renderTo\" class=\"docClass\">renderTo</a>.</p>\n<p>Defaults to: <code>false</code></p></div></div></div><div id='cfg-constrainTo' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-cfg-constrainTo' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-cfg-constrainTo' class='name expandable'>constrainTo</a><span> : <a href=\"#!/api/Ext.util.Region\" rel=\"Ext.util.Region\" class=\"docClass\">Ext.util.Region</a>/<a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a></span></div><div class='description'><div class='short'>A Region (or an element from which a Region measurement will be read) which is used\nto constrain the component. ...</div><div class='long'><p>A <a href=\"#!/api/Ext.util.Region\" rel=\"Ext.util.Region\" class=\"docClass\">Region</a> (or an element from which a Region measurement will be read) which is used\nto constrain the component. Only applies when the component is floating.</p>\n</div></div></div><div id='cfg-constraintInsets' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-cfg-constraintInsets' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-cfg-constraintInsets' class='name expandable'>constraintInsets</a><span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>An object or a string (in TRBL order) specifying insets from the configured constrain region\nwithin which this compon...</div><div class='long'><p>An object or a string (in TRBL order) specifying insets from the configured <a href=\"#!/api/Ext.Component-cfg-constrainTo\" rel=\"Ext.Component-cfg-constrainTo\" class=\"docClass\">constrain region</a>\nwithin which this component must be constrained when positioning or sizing.\nexample:</p>\n\n<p> constraintInsets: '10 10 10 10' // Constrain with 10px insets from parent</p>\n</div></div></div><div id='cfg-contentEl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-contentEl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-contentEl' class='name expandable'>contentEl</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>Specify an existing HTML element, or the id of an existing HTML element to use as the content for this component. ...</div><div class='long'><p>Specify an existing HTML element, or the <code>id</code> of an existing HTML element to use as the content for this component.</p>\n\n<p>This config option is used to take an existing HTML element and place it in the layout element of a new component\n(it simply moves the specified DOM element <em>after the Component is rendered</em> to use as the content.</p>\n\n<p><strong>Notes:</strong></p>\n\n<p>The specified HTML element is appended to the layout element of the component <em>after any configured\n<a href=\"#!/api/Ext.AbstractComponent-cfg-html\" rel=\"Ext.AbstractComponent-cfg-html\" class=\"docClass\">HTML</a> has been inserted</em>, and so the document will not contain this element at the time\nthe <a href=\"#!/api/Ext.AbstractComponent-event-render\" rel=\"Ext.AbstractComponent-event-render\" class=\"docClass\">render</a> event is fired.</p>\n\n<p>The specified HTML element used will not participate in any <strong><code><a href=\"#!/api/Ext.container.Container-cfg-layout\" rel=\"Ext.container.Container-cfg-layout\" class=\"docClass\">layout</a></code></strong>\nscheme that the Component may use. It is just HTML. Layouts operate on child\n<strong><code><a href=\"#!/api/Ext.container.Container-cfg-items\" rel=\"Ext.container.Container-cfg-items\" class=\"docClass\">items</a></code></strong>.</p>\n\n<p>Add either the <code>x-hidden</code> or the <code>x-hide-display</code> CSS class to prevent a brief flicker of the content before it\nis rendered to the panel.</p>\n <p>Available since: <b>3.4.0</b></p>\n</div></div></div><div id='cfg-data' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-data' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-data' class='name not-expandable'>data</a><span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span></div><div class='description'><div class='short'><p>The initial set of data to apply to the <code><a href=\"#!/api/Ext.AbstractComponent-cfg-tpl\" rel=\"Ext.AbstractComponent-cfg-tpl\" class=\"docClass\">tpl</a></code> to update the content area of the Component.</p>\n</div><div class='long'><p>The initial set of data to apply to the <code><a href=\"#!/api/Ext.AbstractComponent-cfg-tpl\" rel=\"Ext.AbstractComponent-cfg-tpl\" class=\"docClass\">tpl</a></code> to update the content area of the Component.</p>\n <p>Available since: <b>3.4.0</b></p>\n</div></div></div><div id='cfg-defaultAlign' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-cfg-defaultAlign' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-cfg-defaultAlign' class='name expandable'>defaultAlign</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>The default Ext.Element#getAlignToXY anchor position value for this menu\nrelative to its element of origin. ...</div><div class='long'><p>The default <a href=\"#!/api/Ext.util.Positionable-method-getAlignToXY\" rel=\"Ext.util.Positionable-method-getAlignToXY\" class=\"docClass\">Ext.Element#getAlignToXY</a> anchor position value for this menu\nrelative to its element of origin. Used in conjunction with <a href=\"#!/api/Ext.Component-method-showBy\" rel=\"Ext.Component-method-showBy\" class=\"docClass\">showBy</a>.</p>\n<p>Defaults to: <code>"tl-bl?"</code></p></div></div></div><div id='cfg-defaultButtonUI' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-cfg-defaultButtonUI' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-cfg-defaultButtonUI' class='name not-expandable'>defaultButtonUI</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'><p>A default <a href=\"#!/api/Ext.Component-cfg-ui\" rel=\"Ext.Component-cfg-ui\" class=\"docClass\">ui</a> to use for <a href=\"#!/api/Ext.button.Button\" rel=\"Ext.button.Button\" class=\"docClass\">Button</a> items</p>\n</div><div class='long'><p>A default <a href=\"#!/api/Ext.Component-cfg-ui\" rel=\"Ext.Component-cfg-ui\" class=\"docClass\">ui</a> to use for <a href=\"#!/api/Ext.button.Button\" rel=\"Ext.button.Button\" class=\"docClass\">Button</a> items</p>\n</div></div></div><div id='cfg-defaultIconCls' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.statusbar.StatusBar'>Ext.ux.statusbar.StatusBar</span><br/><a href='source/StatusBar.html#Ext-ux-statusbar-StatusBar-cfg-defaultIconCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.statusbar.StatusBar-cfg-defaultIconCls' class='name expandable'>defaultIconCls</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>The default iconCls value (see the iconCls docs for additional details about customizing the icon). ...</div><div class='long'><p>The default <a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-iconCls\" rel=\"Ext.ux.statusbar.StatusBar-cfg-iconCls\" class=\"docClass\">iconCls</a> value (see the iconCls docs for additional details about customizing the icon).\nThis will be used anytime the status bar is cleared with the <code>useDefaults:true</code> option.</p>\n<p>Defaults to: <code>''</code></p></div></div></div><div id='cfg-defaultText' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.statusbar.StatusBar'>Ext.ux.statusbar.StatusBar</span><br/><a href='source/StatusBar.html#Ext-ux-statusbar-StatusBar-cfg-defaultText' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.statusbar.StatusBar-cfg-defaultText' class='name expandable'>defaultText</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>The default text value. ...</div><div class='long'><p>The default <a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-text\" rel=\"Ext.ux.statusbar.StatusBar-cfg-text\" class=\"docClass\">text</a> value. This will be used anytime the status bar is cleared with the\n<code>useDefaults:true</code> option.</p>\n<p>Defaults to: <code>''</code></p></div></div></div><div id='cfg-defaultType' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-cfg-defaultType' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-cfg-defaultType' class='name expandable'>defaultType</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>The default xtype of child Components to create in this Container when\na child item is specified as a raw configurati...</div><div class='long'><p>The default <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">xtype</a> of child Components to create in this Container when\na child item is specified as a raw configuration object, rather than as an instantiated Component.</p>\n<p>Defaults to: <code>'button'</code></p> <p>Available since: <b>2.3.0</b></p>\n<p>Overrides: <a href='#!/api/Ext.container.AbstractContainer-cfg-defaultType' rel='Ext.container.AbstractContainer-cfg-defaultType' class='docClass'>Ext.container.AbstractContainer.defaultType</a></p></div></div></div><div id='cfg-defaults' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-cfg-defaults' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-cfg-defaults' class='name expandable'>defaults</a><span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>/<a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a></span></div><div class='description'><div class='short'>This option is a means of applying default settings to all added items whether added\nthrough the items config or via ...</div><div class='long'><p>This option is a means of applying default settings to all added items whether added\nthrough the <a href=\"#!/api/Ext.container.AbstractContainer-cfg-items\" rel=\"Ext.container.AbstractContainer-cfg-items\" class=\"docClass\">items</a> config or via the <a href=\"#!/api/Ext.container.AbstractContainer-method-add\" rel=\"Ext.container.AbstractContainer-method-add\" class=\"docClass\">add</a> or <a href=\"#!/api/Ext.container.AbstractContainer-method-insert\" rel=\"Ext.container.AbstractContainer-method-insert\" class=\"docClass\">insert</a> methods.</p>\n\n<p>Defaults are applied to both config objects and instantiated components conditionally\nso as not to override existing properties in the item (see <a href=\"#!/api/Ext-method-applyIf\" rel=\"Ext-method-applyIf\" class=\"docClass\">Ext.applyIf</a>).</p>\n\n<p>If the defaults option is specified as a function, then the function will be called\nusing this Container as the scope (<code>this</code> reference) and passing the added item as\nthe first parameter. Any resulting object from that call is then applied to the item\nas default properties.</p>\n\n<p>For example, to automatically apply padding to the body of each of a set of\ncontained <a href=\"#!/api/Ext.panel.Panel\" rel=\"Ext.panel.Panel\" class=\"docClass\">Ext.panel.Panel</a> items, you could pass:\n<code>defaults: {bodyStyle:'padding:15px'}</code>.</p>\n\n<p>Usage:</p>\n\n<pre><code>defaults: { // defaults are applied to items, not the container\n autoScroll: true\n},\nitems: [\n // default will not be applied here, panel1 will be autoScroll: false\n {\n xtype: 'panel',\n id: 'panel1',\n autoScroll: false\n },\n // this component will have autoScroll: true\n new <a href=\"#!/api/Ext.panel.Panel\" rel=\"Ext.panel.Panel\" class=\"docClass\">Ext.panel.Panel</a>({\n id: 'panel2'\n })\n]\n</code></pre>\n <p>Available since: <b>2.3.0</b></p>\n</div></div></div><div id='cfg-detachOnRemove' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-cfg-detachOnRemove' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-cfg-detachOnRemove' class='name expandable'>detachOnRemove</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>True to move any component to the detachedBody when the component is\nremoved from this container. ...</div><div class='long'><p>True to move any component to the <a href=\"#!/api/Ext-method-getDetachedBody\" rel=\"Ext-method-getDetachedBody\" class=\"docClass\">detachedBody</a> when the component is\nremoved from this container. This option is only applicable when the component is not destroyed while\nbeing removed, see <a href=\"#!/api/Ext.container.AbstractContainer-cfg-autoDestroy\" rel=\"Ext.container.AbstractContainer-cfg-autoDestroy\" class=\"docClass\">autoDestroy</a> and <a href=\"#!/api/Ext.container.AbstractContainer-method-remove\" rel=\"Ext.container.AbstractContainer-method-remove\" class=\"docClass\">remove</a>. If this option is set to false, the DOM\nof the component will remain in the current place until it is explicitly moved.</p>\n<p>Defaults to: <code>true</code></p></div></div></div><div id='cfg-disabled' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-disabled' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-disabled' class='name expandable'>disabled</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>true to disable the component. ...</div><div class='long'><p><code>true</code> to disable the component.</p>\n<p>Defaults to: <code>false</code></p> <p>Available since: <b>2.3.0</b></p>\n</div></div></div><div id='cfg-disabledCls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-disabledCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-disabledCls' class='name expandable'>disabledCls</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>CSS class to add when the Component is disabled. ...</div><div class='long'><p>CSS class to add when the Component is disabled.</p>\n<p>Defaults to: <code>'x-item-disabled'</code></p></div></div></div><div id='cfg-draggable' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-cfg-draggable' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-cfg-draggable' class='name expandable'>draggable</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span></div><div class='description'><div class='short'>Specify as true to make a floating Component draggable using the Component's encapsulating element as\nthe drag handle. ...</div><div class='long'><p>Specify as true to make a <a href=\"#!/api/Ext.Component-cfg-floating\" rel=\"Ext.Component-cfg-floating\" class=\"docClass\">floating</a> Component draggable using the Component's encapsulating element as\nthe drag handle.</p>\n\n<p>This may also be specified as a config object for the <a href=\"#!/api/Ext.util.ComponentDragger\" rel=\"Ext.util.ComponentDragger\" class=\"docClass\">ComponentDragger</a> which is\ninstantiated to perform dragging.</p>\n\n<p>For example to create a Component which may only be dragged around using a certain internal element as the drag\nhandle, use the delegate option:</p>\n\n<pre><code>new <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>({\n constrain: true,\n floating: true,\n style: {\n backgroundColor: '#fff',\n border: '1px solid black'\n },\n html: '<h1 style=\"cursor:move\">The title</h1><p>The content</p>',\n draggable: {\n delegate: 'h1'\n }\n}).show();\n</code></pre>\n<p>Defaults to: <code>false</code></p><p>Overrides: <a href='#!/api/Ext.AbstractComponent-cfg-draggable' rel='Ext.AbstractComponent-cfg-draggable' class='docClass'>Ext.AbstractComponent.draggable</a></p></div></div></div><div id='cfg-emptyText' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.statusbar.StatusBar'>Ext.ux.statusbar.StatusBar</span><br/><a href='source/StatusBar.html#Ext-ux-statusbar-StatusBar-cfg-emptyText' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.statusbar.StatusBar-cfg-emptyText' class='name expandable'>emptyText</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>The text string to use if no text has been set. ...</div><div class='long'><p>The text string to use if no text has been set. If there are no other items in\nthe toolbar using an empty string (<code>''</code>) for this value would end up in the toolbar\nheight collapsing since the empty string will not maintain the toolbar height.\nUse <code>''</code> if the toolbar should collapse in height vertically when no text is\nspecified and there are no other items in the toolbar.</p>\n<p>Defaults to: <code>'&#160;'</code></p></div></div></div><div id='cfg-enableOverflow' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-cfg-enableOverflow' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-cfg-enableOverflow' class='name expandable'>enableOverflow</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>Configure true to make the toolbar provide a button which activates a dropdown Menu to show\nitems which overflow the ...</div><div class='long'><p>Configure true to make the toolbar provide a button which activates a dropdown Menu to show\nitems which overflow the Toolbar's width.</p>\n<p>Defaults to: <code>false</code></p></div></div></div><div id='cfg-fixed' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-cfg-fixed' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-cfg-fixed' class='name expandable'>fixed</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>Configure as true to have this Component fixed at its X, Y coordinates in the browser viewport, immune\nto scrolling t...</div><div class='long'><p>Configure as <code>true</code> to have this Component fixed at its <code>X, Y</code> coordinates in the browser viewport, immune\nto scrolling the document.</p>\n\n<p><em>Only in browsers that support <code>position:fixed</code></em></p>\n\n<p><em>IE6 and IE7, 8 and 9 quirks do not support <code>position: fixed</code></em></p>\n<p>Defaults to: <code>false</code></p></div></div></div><div id='cfg-floating' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-cfg-floating' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-cfg-floating' class='name expandable'>floating</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>Specify as true to float the Component outside of the document flow using CSS absolute positioning. ...</div><div class='long'><p>Specify as true to float the Component outside of the document flow using CSS absolute positioning.</p>\n\n<p>Components such as <a href=\"#!/api/Ext.window.Window\" rel=\"Ext.window.Window\" class=\"docClass\">Window</a>s and <a href=\"#!/api/Ext.menu.Menu\" rel=\"Ext.menu.Menu\" class=\"docClass\">Menu</a>s are floating by default.</p>\n\n<p>Floating Components that are programatically <a href=\"#!/api/Ext.Component-method-render\" rel=\"Ext.Component-method-render\" class=\"docClass\">rendered</a> will register\nthemselves with the global <a href=\"#!/api/Ext.WindowManager\" rel=\"Ext.WindowManager\" class=\"docClass\">ZIndexManager</a></p>\n\n<h3>Floating Components as child items of a Container</h3>\n\n<p>A floating Component may be used as a child item of a Container. This just allows the floating Component to seek\na ZIndexManager by examining the ownerCt chain.</p>\n\n<p>When configured as floating, Components acquire, at render time, a <a href=\"#!/api/Ext.ZIndexManager\" rel=\"Ext.ZIndexManager\" class=\"docClass\">ZIndexManager</a> which\nmanages a stack of related floating Components. The ZIndexManager brings a single floating Component to the top\nof its stack when the Component's <a href=\"#!/api/Ext.Component-method-toFront\" rel=\"Ext.Component-method-toFront\" class=\"docClass\">toFront</a> method is called.</p>\n\n<p>The ZIndexManager is found by traversing up the <a href=\"#!/api/Ext.Component-property-ownerCt\" rel=\"Ext.Component-property-ownerCt\" class=\"docClass\">ownerCt</a> chain to find an ancestor which itself is\nfloating. This is so that descendant floating Components of floating <em>Containers</em> (Such as a ComboBox dropdown\nwithin a Window) can have its zIndex managed relative to any siblings, but always <strong>above</strong> that floating\nancestor Container.</p>\n\n<p>If no floating ancestor is found, a floating Component registers itself with the default <a href=\"#!/api/Ext.WindowManager\" rel=\"Ext.WindowManager\" class=\"docClass\">ZIndexManager</a>.</p>\n\n<p>Floating components <em>do not participate in the Container's layout</em>. Because of this, they are not rendered until\nyou explicitly <a href=\"#!/api/Ext.Component-method-show\" rel=\"Ext.Component-method-show\" class=\"docClass\">show</a> them.</p>\n\n<p>After rendering, the ownerCt reference is deleted, and the <a href=\"#!/api/Ext.Component-property-floatParent\" rel=\"Ext.Component-property-floatParent\" class=\"docClass\">floatParent</a> property is set to the found\nfloating ancestor Container. If no floating ancestor Container was found the <a href=\"#!/api/Ext.Component-property-floatParent\" rel=\"Ext.Component-property-floatParent\" class=\"docClass\">floatParent</a> property will\nnot be set.</p>\n<p>Defaults to: <code>false</code></p><p>Overrides: <a href='#!/api/Ext.AbstractComponent-cfg-floating' rel='Ext.AbstractComponent-cfg-floating' class='docClass'>Ext.AbstractComponent.floating</a></p></div></div></div><div id='cfg-focusOnToFront' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-cfg-focusOnToFront' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-cfg-focusOnToFront' class='name expandable'>focusOnToFront</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>Specifies whether the floated component should be automatically focused when\nit is brought to the front. ...</div><div class='long'><p>Specifies whether the floated component should be automatically <a href=\"#!/api/Ext.Component-method-focus\" rel=\"Ext.Component-method-focus\" class=\"docClass\">focused</a> when\nit is <a href=\"#!/api/Ext.util.Floating-method-toFront\" rel=\"Ext.util.Floating-method-toFront\" class=\"docClass\">brought to the front</a>.</p>\n<p>Defaults to: <code>true</code></p></div></div></div><div id='cfg-formBind' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-cfg-formBind' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-cfg-formBind' class='name expandable'>formBind</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>When inside FormPanel, any component configured with formBind: true will\nbe enabled/disabled depending on the validit...</div><div class='long'><p>When inside FormPanel, any component configured with <code>formBind: true</code> will\nbe enabled/disabled depending on the validity state of the form.\nSee <a href=\"#!/api/Ext.form.Panel\" rel=\"Ext.form.Panel\" class=\"docClass\">Ext.form.Panel</a> for more information and example.</p>\n<p>Defaults to: <code>false</code></p></div></div></div><div id='cfg-frame' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-frame' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-frame' class='name expandable'>frame</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>Specify as true to have the Component inject framing elements within the Component at render time to provide a\ngraphi...</div><div class='long'><p>Specify as <code>true</code> to have the Component inject framing elements within the Component at render time to provide a\ngraphical rounded frame around the Component content.</p>\n\n<p>This is only necessary when running on outdated, or non standard-compliant browsers such as Microsoft's Internet\nExplorer prior to version 9 which do not support rounded corners natively.</p>\n\n<p>The extra space taken up by this framing is available from the read only property <a href=\"#!/api/Ext.AbstractComponent-property-frameSize\" rel=\"Ext.AbstractComponent-property-frameSize\" class=\"docClass\">frameSize</a>.</p>\n</div></div></div><div id='cfg-height' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-height' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-height' class='name not-expandable'>height</a><span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span></div><div class='description'><div class='short'><p>The height of this component in pixels.</p>\n</div><div class='long'><p>The height of this component in pixels.</p>\n</div></div></div><div id='cfg-hidden' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-hidden' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-hidden' class='name expandable'>hidden</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>true to hide the component. ...</div><div class='long'><p><code>true</code> to hide the component.</p>\n<p>Defaults to: <code>false</code></p> <p>Available since: <b>2.3.0</b></p>\n</div></div></div><div id='cfg-hideMode' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-hideMode' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-hideMode' class='name expandable'>hideMode</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>A String which specifies how this Component's encapsulating DOM element will be hidden. ...</div><div class='long'><p>A String which specifies how this Component's encapsulating DOM element will be hidden. Values may be:</p>\n\n<ul>\n<li><code>'display'</code> : The Component will be hidden using the <code>display: none</code> style.</li>\n<li><code>'visibility'</code> : The Component will be hidden using the <code>visibility: hidden</code> style.</li>\n<li><code>'offsets'</code> : The Component will be hidden by absolutely positioning it out of the visible area of the document.\nThis is useful when a hidden Component must maintain measurable dimensions. Hiding using <code>display</code> results in a\nComponent having zero dimensions.</li>\n</ul>\n\n<p>Defaults to: <code>'display'</code></p> <p>Available since: <b>1.1.0</b></p>\n</div></div></div><div id='cfg-html' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-html' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-html' class='name expandable'>html</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span></div><div class='description'><div class='short'>An HTML fragment, or a DomHelper specification to use as the layout element content. ...</div><div class='long'><p>An HTML fragment, or a <a href=\"#!/api/Ext.DomHelper\" rel=\"Ext.DomHelper\" class=\"docClass\">DomHelper</a> specification to use as the layout element content.\nThe HTML content is added after the component is rendered, so the document will not contain this HTML at the time\nthe <a href=\"#!/api/Ext.AbstractComponent-event-render\" rel=\"Ext.AbstractComponent-event-render\" class=\"docClass\">render</a> event is fired. This content is inserted into the body <em>before</em> any configured <a href=\"#!/api/Ext.AbstractComponent-cfg-contentEl\" rel=\"Ext.AbstractComponent-cfg-contentEl\" class=\"docClass\">contentEl</a>\nis appended.</p>\n<p>Defaults to: <code>''</code></p> <p>Available since: <b>3.4.0</b></p>\n</div></div></div><div id='cfg-iconCls' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.statusbar.StatusBar'>Ext.ux.statusbar.StatusBar</span><br/><a href='source/StatusBar.html#Ext-ux-statusbar-StatusBar-cfg-iconCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.statusbar.StatusBar-cfg-iconCls' class='name expandable'>iconCls</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>A CSS class that will be initially set as the status bar icon and is\nexpected to provide a background image. ...</div><div class='long'><p>A CSS class that will be <strong>initially</strong> set as the status bar icon and is\nexpected to provide a background image.</p>\n\n<p>Example usage:</p>\n\n<pre><code>// Example CSS rule:\n.x-statusbar .x-status-custom {\n padding-left: 25px;\n background: transparent url(images/custom-icon.gif) no-repeat 3px 2px;\n}\n\n// Setting a default icon:\nvar sb = <a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('<a href=\"#!/api/Ext.ux.statusbar.StatusBar\" rel=\"Ext.ux.statusbar.StatusBar\" class=\"docClass\">Ext.ux.statusbar.StatusBar</a>', {\n defaultIconCls: 'x-status-custom'\n});\n\n// Changing the icon:\nsb.setStatus({\n text: 'New status',\n iconCls: 'x-status-custom'\n});\n</code></pre>\n<p>Defaults to: <code>''</code></p></div></div></div><div id='cfg-id' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-id' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-id' class='name expandable'>id</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>The unique id of this component instance. ...</div><div class='long'><p>The <strong>unique id of this component instance.</strong></p>\n\n<p>It should not be necessary to use this configuration except for singleton objects in your application. Components\ncreated with an <code>id</code> may be accessed globally using <a href=\"#!/api/Ext-method-getCmp\" rel=\"Ext-method-getCmp\" class=\"docClass\">Ext.getCmp</a>.</p>\n\n<p>Instead of using assigned ids, use the <a href=\"#!/api/Ext.AbstractComponent-cfg-itemId\" rel=\"Ext.AbstractComponent-cfg-itemId\" class=\"docClass\">itemId</a> config, and <a href=\"#!/api/Ext.ComponentQuery\" rel=\"Ext.ComponentQuery\" class=\"docClass\">ComponentQuery</a>\nwhich provides selector-based searching for Sencha Components analogous to DOM querying. The <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Container</a> class contains <a href=\"#!/api/Ext.container.Container-method-down\" rel=\"Ext.container.Container-method-down\" class=\"docClass\">shortcut methods</a> to query\nits descendant Components by selector.</p>\n\n<p>Note that this <code>id</code> will also be used as the element id for the containing HTML element that is rendered to the\npage for this component. This allows you to write id-based CSS rules to style the specific instance of this\ncomponent uniquely, and also to select sub-elements using this component's <code>id</code> as the parent.</p>\n\n<p><strong>Note:</strong> To avoid complications imposed by a unique <code>id</code> also see <code><a href=\"#!/api/Ext.AbstractComponent-cfg-itemId\" rel=\"Ext.AbstractComponent-cfg-itemId\" class=\"docClass\">itemId</a></code>.</p>\n\n<p><strong>Note:</strong> To access the container of a Component see <code><a href=\"#!/api/Ext.AbstractComponent-property-ownerCt\" rel=\"Ext.AbstractComponent-property-ownerCt\" class=\"docClass\">ownerCt</a></code>.</p>\n\n<p>Defaults to an <a href=\"#!/api/Ext.AbstractComponent-method-getId\" rel=\"Ext.AbstractComponent-method-getId\" class=\"docClass\">auto-assigned id</a>.</p>\n <p>Available since: <b>1.1.0</b></p>\n</div></div></div><div id='cfg-itemId' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-itemId' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-itemId' class='name expandable'>itemId</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>An itemId can be used as an alternative way to get a reference to a component when no object reference is\navailable. ...</div><div class='long'><p>An <code>itemId</code> can be used as an alternative way to get a reference to a component when no object reference is\navailable. Instead of using an <code><a href=\"#!/api/Ext.AbstractComponent-cfg-id\" rel=\"Ext.AbstractComponent-cfg-id\" class=\"docClass\">id</a></code> with <a href=\"#!/api/Ext\" rel=\"Ext\" class=\"docClass\">Ext</a>.<a href=\"#!/api/Ext-method-getCmp\" rel=\"Ext-method-getCmp\" class=\"docClass\">getCmp</a>, use <code>itemId</code> with\n<a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a>.<a href=\"#!/api/Ext.container.Container-method-getComponent\" rel=\"Ext.container.Container-method-getComponent\" class=\"docClass\">getComponent</a> which will retrieve\n<code>itemId</code>'s or <a href=\"#!/api/Ext.AbstractComponent-cfg-id\" rel=\"Ext.AbstractComponent-cfg-id\" class=\"docClass\">id</a>'s. Since <code>itemId</code>'s are an index to the container's internal MixedCollection, the\n<code>itemId</code> is scoped locally to the container -- avoiding potential conflicts with <a href=\"#!/api/Ext.ComponentManager\" rel=\"Ext.ComponentManager\" class=\"docClass\">Ext.ComponentManager</a>\nwhich requires a <strong>unique</strong> <code><a href=\"#!/api/Ext.AbstractComponent-cfg-id\" rel=\"Ext.AbstractComponent-cfg-id\" class=\"docClass\">id</a></code>.</p>\n\n<pre><code>var c = new <a href=\"#!/api/Ext.panel.Panel\" rel=\"Ext.panel.Panel\" class=\"docClass\">Ext.panel.Panel</a>({ //\n <a href=\"#!/api/Ext.Component-cfg-height\" rel=\"Ext.Component-cfg-height\" class=\"docClass\">height</a>: 300,\n <a href=\"#!/api/Ext.AbstractComponent-cfg-renderTo\" rel=\"Ext.AbstractComponent-cfg-renderTo\" class=\"docClass\">renderTo</a>: document.body,\n <a href=\"#!/api/Ext.container.Container-cfg-layout\" rel=\"Ext.container.Container-cfg-layout\" class=\"docClass\">layout</a>: 'auto',\n <a href=\"#!/api/Ext.container.Container-cfg-items\" rel=\"Ext.container.Container-cfg-items\" class=\"docClass\">items</a>: [\n {\n itemId: 'p1',\n <a href=\"#!/api/Ext.panel.Panel-cfg-title\" rel=\"Ext.panel.Panel-cfg-title\" class=\"docClass\">title</a>: 'Panel 1',\n <a href=\"#!/api/Ext.Component-cfg-height\" rel=\"Ext.Component-cfg-height\" class=\"docClass\">height</a>: 150\n },\n {\n itemId: 'p2',\n <a href=\"#!/api/Ext.panel.Panel-cfg-title\" rel=\"Ext.panel.Panel-cfg-title\" class=\"docClass\">title</a>: 'Panel 2',\n <a href=\"#!/api/Ext.Component-cfg-height\" rel=\"Ext.Component-cfg-height\" class=\"docClass\">height</a>: 150\n }\n ]\n})\np1 = c.<a href=\"#!/api/Ext.container.Container-method-getComponent\" rel=\"Ext.container.Container-method-getComponent\" class=\"docClass\">getComponent</a>('p1'); // not the same as <a href=\"#!/api/Ext-method-getCmp\" rel=\"Ext-method-getCmp\" class=\"docClass\">Ext.getCmp()</a>\np2 = p1.<a href=\"#!/api/Ext.AbstractComponent-property-ownerCt\" rel=\"Ext.AbstractComponent-property-ownerCt\" class=\"docClass\">ownerCt</a>.<a href=\"#!/api/Ext.container.Container-method-getComponent\" rel=\"Ext.container.Container-method-getComponent\" class=\"docClass\">getComponent</a>('p2'); // reference via a sibling\n</code></pre>\n\n<p>Also see <a href=\"#!/api/Ext.AbstractComponent-cfg-id\" rel=\"Ext.AbstractComponent-cfg-id\" class=\"docClass\">id</a>, <code><a href=\"#!/api/Ext.container.Container-method-query\" rel=\"Ext.container.Container-method-query\" class=\"docClass\">Ext.container.Container.query</a></code>, <code><a href=\"#!/api/Ext.container.Container-method-down\" rel=\"Ext.container.Container-method-down\" class=\"docClass\">Ext.container.Container.down</a></code> and\n<code><a href=\"#!/api/Ext.container.Container-method-child\" rel=\"Ext.container.Container-method-child\" class=\"docClass\">Ext.container.Container.child</a></code>.</p>\n\n<p><strong>Note</strong>: to access the container of an item see <a href=\"#!/api/Ext.AbstractComponent-property-ownerCt\" rel=\"Ext.AbstractComponent-property-ownerCt\" class=\"docClass\">ownerCt</a>.</p>\n <p>Available since: <b>3.4.0</b></p>\n</div></div></div><div id='cfg-items' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-cfg-items' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-cfg-items' class='name expandable'>items</a><span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>[]</span></div><div class='description'><div class='short'>A single item, or an array of child Components to be added to this container\n\nUnless configured with a layout, a Cont...</div><div class='long'><p>A single item, or an array of child Components to be added to this container</p>\n\n<p><strong>Unless configured with a <a href=\"#!/api/Ext.container.AbstractContainer-cfg-layout\" rel=\"Ext.container.AbstractContainer-cfg-layout\" class=\"docClass\">layout</a>, a Container simply renders child\nComponents serially into its encapsulating element and performs no sizing or\npositioning upon them.</strong></p>\n\n<p>Example:</p>\n\n<pre><code>// specifying a single item\nitems: {...},\nlayout: 'fit', // The single items is sized to fit\n\n// specifying multiple items\nitems: [{...}, {...}],\nlayout: 'hbox', // The items are arranged horizontally\n</code></pre>\n\n<p>Each item may be:</p>\n\n<ul>\n<li>A <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Component</a></li>\n<li>A Component configuration object</li>\n</ul>\n\n\n<p>If a configuration object is specified, the actual type of Component to be\ninstantiated my be indicated by using the <a href=\"#!/api/Ext.Component-cfg-xtype\" rel=\"Ext.Component-cfg-xtype\" class=\"docClass\">xtype</a> option.</p>\n\n<p>Every Component class has its own <a href=\"#!/api/Ext.Component-cfg-xtype\" rel=\"Ext.Component-cfg-xtype\" class=\"docClass\">xtype</a>.</p>\n\n<p>If an <a href=\"#!/api/Ext.Component-cfg-xtype\" rel=\"Ext.Component-cfg-xtype\" class=\"docClass\">xtype</a> is not explicitly specified, the\n<a href=\"#!/api/Ext.container.AbstractContainer-cfg-defaultType\" rel=\"Ext.container.AbstractContainer-cfg-defaultType\" class=\"docClass\">defaultType</a> for the Container is used, which by default is usually <code>panel</code>.</p>\n\n<h1>Notes:</h1>\n\n<p>Ext uses lazy rendering. Child Components will only be rendered\nshould it become necessary. Items are automatically laid out when they are first\nshown (no sizing is done while hidden), or in response to a <a href=\"#!/api/Ext.container.AbstractContainer-method-doLayout\" rel=\"Ext.container.AbstractContainer-method-doLayout\" class=\"docClass\">doLayout</a> call.</p>\n\n<p>Do not specify <a href=\"#!/api/Ext.panel.Panel-cfg-contentEl\" rel=\"Ext.panel.Panel-cfg-contentEl\" class=\"docClass\">contentEl</a> or\n<a href=\"#!/api/Ext.panel.Panel-cfg-html\" rel=\"Ext.panel.Panel-cfg-html\" class=\"docClass\">html</a> with <code>items</code>.</p>\n <p>Available since: <b>2.3.0</b></p>\n</div></div></div><div id='cfg-layout' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-cfg-layout' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-cfg-layout' class='name expandable'>layout</a><span> : <a href=\"#!/api/Ext.enums.Layout\" rel=\"Ext.enums.Layout\" class=\"docClass\">Ext.enums.Layout</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span></div><div class='description'><div class='short'>This class assigns a default layout (layout: 'hbox'). ...</div><div class='long'><p>This class assigns a default layout (<code>layout: 'hbox'</code>).\nDevelopers <em>may</em> override this configuration option if another layout\nis required (the constructor must be passed a configuration object in this\ncase instead of an array).\nSee <a href=\"#!/api/Ext.container.Container-cfg-layout\" rel=\"Ext.container.Container-cfg-layout\" class=\"docClass\">Ext.container.Container.layout</a> for additional information.</p>\n<p>Overrides: <a href='#!/api/Ext.container.AbstractContainer-cfg-layout' rel='Ext.container.AbstractContainer-cfg-layout' class='docClass'>Ext.container.AbstractContainer.layout</a></p></div></div></div><div id='cfg-listeners' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-cfg-listeners' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-cfg-listeners' class='name expandable'>listeners</a><span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span></div><div class='description'><div class='short'>A config object containing one or more event handlers to be added to this object during initialization. ...</div><div class='long'><p>A config object containing one or more event handlers to be added to this object during initialization. This\nshould be a valid listeners config object as specified in the <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">addListener</a> example for attaching multiple\nhandlers at once.</p>\n\n<p><strong>DOM events from Ext JS <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Components</a></strong></p>\n\n<p>While <em>some</em> Ext JS Component classes export selected DOM events (e.g. \"click\", \"mouseover\" etc), this is usually\nonly done when extra value can be added. For example the <a href=\"#!/api/Ext.view.View\" rel=\"Ext.view.View\" class=\"docClass\">DataView</a>'s <strong><code><a href=\"#!/api/Ext.view.View-event-itemclick\" rel=\"Ext.view.View-event-itemclick\" class=\"docClass\">itemclick</a></code></strong> event passing the node clicked on. To access DOM events directly from a\nchild element of a Component, we need to specify the <code>element</code> option to identify the Component property to add a\nDOM listener to:</p>\n\n<pre><code>new <a href=\"#!/api/Ext.panel.Panel\" rel=\"Ext.panel.Panel\" class=\"docClass\">Ext.panel.Panel</a>({\n width: 400,\n height: 200,\n dockedItems: [{\n xtype: 'toolbar'\n }],\n listeners: {\n click: {\n element: 'el', //bind to the underlying el property on the panel\n fn: function(){ console.log('click el'); }\n },\n dblclick: {\n element: 'body', //bind to the underlying body property on the panel\n fn: function(){ console.log('dblclick body'); }\n }\n }\n});\n</code></pre>\n</div></div></div><div id='cfg-loader' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-loader' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-loader' class='name expandable'>loader</a><span> : <a href=\"#!/api/Ext.ComponentLoader\" rel=\"Ext.ComponentLoader\" class=\"docClass\">Ext.ComponentLoader</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span></div><div class='description'><div class='short'>A configuration object or an instance of a Ext.ComponentLoader to load remote content\nfor this Component. ...</div><div class='long'><p>A configuration object or an instance of a <a href=\"#!/api/Ext.ComponentLoader\" rel=\"Ext.ComponentLoader\" class=\"docClass\">Ext.ComponentLoader</a> to load remote content\nfor this Component.</p>\n\n<pre><code><a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('<a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>', {\n loader: {\n url: 'content.html',\n autoLoad: true\n },\n renderTo: <a href=\"#!/api/Ext-method-getBody\" rel=\"Ext-method-getBody\" class=\"docClass\">Ext.getBody</a>()\n});\n</code></pre>\n</div></div></div><div id='cfg-margin' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-margin' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-margin' class='name expandable'>margin</a><span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>Specifies the margin for this component. ...</div><div class='long'><p>Specifies the margin for this component. The margin can be a single numeric value to apply to all sides or it can\nbe a CSS style specification for each style, for example: '10 5 3 10' (top, right, bottom, left).</p>\n</div></div></div><div id='cfg-maxHeight' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-maxHeight' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-maxHeight' class='name expandable'>maxHeight</a><span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span></div><div class='description'><div class='short'>The maximum value in pixels which this Component will set its height to. ...</div><div class='long'><p>The maximum value in pixels which this Component will set its height to.</p>\n\n<p><strong>Warning:</strong> This will override any size management applied by layout managers.</p>\n</div></div></div><div id='cfg-maxWidth' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-maxWidth' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-maxWidth' class='name expandable'>maxWidth</a><span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span></div><div class='description'><div class='short'>The maximum value in pixels which this Component will set its width to. ...</div><div class='long'><p>The maximum value in pixels which this Component will set its width to.</p>\n\n<p><strong>Warning:</strong> This will override any size management applied by layout managers.</p>\n</div></div></div><div id='cfg-menuTriggerCls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-cfg-menuTriggerCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-cfg-menuTriggerCls' class='name expandable'>menuTriggerCls</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>Configure the icon class of the overflow button. ...</div><div class='long'><p>Configure the icon class of the overflow button.</p>\n<p>Defaults to: <code>Ext.baseCSSPrefix + 'toolbar-more-icon'</code></p></div></div></div><div id='cfg-minHeight' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-minHeight' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-minHeight' class='name expandable'>minHeight</a><span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span></div><div class='description'><div class='short'>The minimum value in pixels which this Component will set its height to. ...</div><div class='long'><p>The minimum value in pixels which this Component will set its height to.</p>\n\n<p><strong>Warning:</strong> This will override any size management applied by layout managers.</p>\n</div></div></div><div id='cfg-minWidth' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-minWidth' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-minWidth' class='name expandable'>minWidth</a><span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span></div><div class='description'><div class='short'>The minimum value in pixels which this Component will set its width to. ...</div><div class='long'><p>The minimum value in pixels which this Component will set its width to.</p>\n\n<p><strong>Warning:</strong> This will override any size management applied by layout managers.</p>\n</div></div></div><div id='cfg-overCls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-overCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-overCls' class='name expandable'>overCls</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>An optional extra CSS class that will be added to this component's Element when the mouse moves over the Element,\nand...</div><div class='long'><p>An optional extra CSS class that will be added to this component's Element when the mouse moves over the Element,\nand removed when the mouse moves out. This can be useful for adding customized 'active' or 'hover' styles to the\ncomponent or any of its children using standard CSS rules.</p>\n<p>Defaults to: <code>''</code></p> <p>Available since: <b>2.3.0</b></p>\n</div></div></div><div id='cfg-overflowX' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-cfg-overflowX' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-cfg-overflowX' class='name expandable'>overflowX</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>Possible values are:\n * 'auto' to enable automatic horizontal scrollbar (overflow-x: 'auto'). ...</div><div class='long'><p>Possible values are:\n * <code>'auto'</code> to enable automatic horizontal scrollbar (overflow-x: 'auto').\n * <code>'scroll'</code> to always enable horizontal scrollbar (overflow-x: 'scroll').\nThe default is overflow-x: 'hidden'. This should not be combined with <a href=\"#!/api/Ext.Component-cfg-autoScroll\" rel=\"Ext.Component-cfg-autoScroll\" class=\"docClass\">autoScroll</a>.</p>\n</div></div></div><div id='cfg-overflowY' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-cfg-overflowY' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-cfg-overflowY' class='name expandable'>overflowY</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>Possible values are:\n * 'auto' to enable automatic vertical scrollbar (overflow-y: 'auto'). ...</div><div class='long'><p>Possible values are:\n * <code>'auto'</code> to enable automatic vertical scrollbar (overflow-y: 'auto').\n * <code>'scroll'</code> to always enable vertical scrollbar (overflow-y: 'scroll').\nThe default is overflow-y: 'hidden'. This should not be combined with <a href=\"#!/api/Ext.Component-cfg-autoScroll\" rel=\"Ext.Component-cfg-autoScroll\" class=\"docClass\">autoScroll</a>.</p>\n</div></div></div><div id='cfg-padding' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-padding' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-padding' class='name expandable'>padding</a><span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>Specifies the padding for this component. ...</div><div class='long'><p>Specifies the padding for this component. The padding can be a single numeric value to apply to all sides or it\ncan be a CSS style specification for each style, for example: '10 5 3 10' (top, right, bottom, left).</p>\n</div></div></div><div id='cfg-plugins' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-plugins' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-plugins' class='name expandable'>plugins</a><span> : <a href=\"#!/api/Ext.AbstractPlugin\" rel=\"Ext.AbstractPlugin\" class=\"docClass\">Ext.AbstractPlugin</a>[]/<a href=\"#!/api/Ext.AbstractPlugin\" rel=\"Ext.AbstractPlugin\" class=\"docClass\">Ext.AbstractPlugin</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>[]/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>/<a href=\"#!/api/Ext.enums.Plugin\" rel=\"Ext.enums.Plugin\" class=\"docClass\">Ext.enums.Plugin</a>[]/<a href=\"#!/api/Ext.enums.Plugin\" rel=\"Ext.enums.Plugin\" class=\"docClass\">Ext.enums.Plugin</a></span></div><div class='description'><div class='short'>An array of plugins to be added to this component. ...</div><div class='long'><p>An array of plugins to be added to this component. Can also be just a single plugin instead of array.</p>\n\n<p>Plugins provide custom functionality for a component. The only requirement for\na valid plugin is that it contain an <code>init</code> method that accepts a reference of type <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>. When a component\nis created, if any plugins are available, the component will call the init method on each plugin, passing a\nreference to itself. Each plugin can then call methods or respond to events on the component as needed to provide\nits functionality.</p>\n\n<p>Plugins can be added to component by either directly referencing the plugin instance:</p>\n\n<pre><code>plugins: [<a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('<a href=\"#!/api/Ext.grid.plugin.CellEditing\" rel=\"Ext.grid.plugin.CellEditing\" class=\"docClass\">Ext.grid.plugin.CellEditing</a>', {clicksToEdit: 1})],\n</code></pre>\n\n<p>By using config object with ptype:</p>\n\n<pre><code>plugins: [{ptype: 'cellediting', clicksToEdit: 1}],\n</code></pre>\n\n<p>Or with just a ptype:</p>\n\n<pre><code>plugins: ['cellediting', 'gridviewdragdrop'],\n</code></pre>\n\n<p>See <a href=\"#!/api/Ext.enums.Plugin\" rel=\"Ext.enums.Plugin\" class=\"docClass\">Ext.enums.Plugin</a> for list of all ptypes.</p>\n <p>Available since: <b>2.3.0</b></p>\n</div></div></div><div id='cfg-region' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-cfg-region' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-cfg-region' class='name expandable'>region</a><span> : \"north\"/\"south\"/\"east\"/\"west\"/\"center\"</span></div><div class='description'><div class='short'>Defines the region inside border layout. ...</div><div class='long'><p>Defines the region inside <a href=\"#!/api/Ext.layout.container.Border\" rel=\"Ext.layout.container.Border\" class=\"docClass\">border layout</a>.</p>\n\n<p>Possible values:</p>\n\n<ul>\n<li>north - Positions component at top.</li>\n<li>south - Positions component at bottom.</li>\n<li>east - Positions component at right.</li>\n<li>west - Positions component at left.</li>\n<li>center - Positions component at the remaining space.\nThere <strong>must</strong> be a component with <code>region: \"center\"</code> in every border layout.</li>\n</ul>\n\n</div></div></div><div id='cfg-renderData' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-renderData' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-renderData' class='name expandable'>renderData</a><span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span></div><div class='description'><div class='short'>The data used by renderTpl in addition to the following property values of the component:\n\n\nid\nui\nuiCls\nbaseCls\ncompo...</div><div class='long'><p>The data used by <a href=\"#!/api/Ext.AbstractComponent-cfg-renderTpl\" rel=\"Ext.AbstractComponent-cfg-renderTpl\" class=\"docClass\">renderTpl</a> in addition to the following property values of the component:</p>\n\n<ul>\n<li>id</li>\n<li>ui</li>\n<li>uiCls</li>\n<li>baseCls</li>\n<li>componentCls</li>\n<li>frame</li>\n</ul>\n\n\n<p>See <a href=\"#!/api/Ext.AbstractComponent-cfg-renderSelectors\" rel=\"Ext.AbstractComponent-cfg-renderSelectors\" class=\"docClass\">renderSelectors</a> and <a href=\"#!/api/Ext.AbstractComponent-cfg-childEls\" rel=\"Ext.AbstractComponent-cfg-childEls\" class=\"docClass\">childEls</a> for usage examples.</p>\n</div></div></div><div id='cfg-renderSelectors' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-renderSelectors' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-renderSelectors' class='name expandable'>renderSelectors</a><span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span></div><div class='description'><div class='short'>An object containing properties specifying DomQuery selectors which identify child elements\ncreated by the render pro...</div><div class='long'><p>An object containing properties specifying <a href=\"#!/api/Ext.dom.Query\" rel=\"Ext.dom.Query\" class=\"docClass\">DomQuery</a> selectors which identify child elements\ncreated by the render process.</p>\n\n<p>After the Component's internal structure is rendered according to the <a href=\"#!/api/Ext.AbstractComponent-cfg-renderTpl\" rel=\"Ext.AbstractComponent-cfg-renderTpl\" class=\"docClass\">renderTpl</a>, this object is iterated through,\nand the found Elements are added as properties to the Component using the <code>renderSelector</code> property name.</p>\n\n<p>For example, a Component which renders a title and description into its element:</p>\n\n<pre><code><a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('<a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>', {\n renderTo: <a href=\"#!/api/Ext-method-getBody\" rel=\"Ext-method-getBody\" class=\"docClass\">Ext.getBody</a>(),\n renderTpl: [\n '<h1 class=\"title\">{title}</h1>',\n '<p>{desc}</p>'\n ],\n renderData: {\n title: \"Error\",\n desc: \"Something went wrong\"\n },\n renderSelectors: {\n titleEl: 'h1.title',\n descEl: 'p'\n },\n listeners: {\n afterrender: function(cmp){\n // After rendering the component will have a titleEl and descEl properties\n cmp.titleEl.setStyle({color: \"red\"});\n }\n }\n});\n</code></pre>\n\n<p>For a faster, but less flexible, alternative that achieves the same end result (properties for child elements on the\nComponent after render), see <a href=\"#!/api/Ext.AbstractComponent-cfg-childEls\" rel=\"Ext.AbstractComponent-cfg-childEls\" class=\"docClass\">childEls</a> and <a href=\"#!/api/Ext.AbstractComponent-method-addChildEls\" rel=\"Ext.AbstractComponent-method-addChildEls\" class=\"docClass\">addChildEls</a>.</p>\n</div></div></div><div id='cfg-renderTo' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-renderTo' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-renderTo' class='name expandable'>renderTo</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/HTMLElement/<a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a></span></div><div class='description'><div class='short'>Specify the id of the element, a DOM element or an existing Element that this component will be rendered into. ...</div><div class='long'><p>Specify the <code>id</code> of the element, a DOM element or an existing Element that this component will be rendered into.</p>\n\n<p><strong>Notes:</strong></p>\n\n<p>Do <em>not</em> use this option if the Component is to be a child item of a <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Container</a>.\nIt is the responsibility of the <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Container</a>'s\n<a href=\"#!/api/Ext.container.Container-cfg-layout\" rel=\"Ext.container.Container-cfg-layout\" class=\"docClass\">layout manager</a> to render and manage its child items.</p>\n\n<p>When using this config, a call to <code>render()</code> is not required.</p>\n\n<p>See also: <a href=\"#!/api/Ext.AbstractComponent-method-render\" rel=\"Ext.AbstractComponent-method-render\" class=\"docClass\">render</a>.</p>\n <p>Available since: <b>2.3.0</b></p>\n</div></div></div><div id='cfg-renderTpl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-cfg-renderTpl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-cfg-renderTpl' class='name expandable'>renderTpl</a><span> : <a href=\"#!/api/Ext.XTemplate\" rel=\"Ext.XTemplate\" class=\"docClass\">Ext.XTemplate</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>[]</span><strong class='protected signature' >protected</strong></div><div class='description'><div class='short'>End Definitions\n\nAn XTemplate used to create the internal structure inside this Component's encapsulating\nElement. ...</div><div class='long'><p>End Definitions</p>\n\n<p>An <a href=\"#!/api/Ext.XTemplate\" rel=\"Ext.XTemplate\" class=\"docClass\">XTemplate</a> used to create the internal structure inside this Component's encapsulating\n<a href=\"#!/api/Ext.container.AbstractContainer-method-getEl\" rel=\"Ext.container.AbstractContainer-method-getEl\" class=\"docClass\">Element</a>.</p>\n\n<p>You do not normally need to specify this. For the base classes <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> and\n<a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a>, this defaults to <strong><code>null</code></strong> which means that they will be initially rendered\nwith no internal structure; they render their <a href=\"#!/api/Ext.container.AbstractContainer-method-getEl\" rel=\"Ext.container.AbstractContainer-method-getEl\" class=\"docClass\">Element</a> empty. The more specialized Ext JS and Sencha Touch\nclasses which use a more complex DOM structure, provide their own template definitions.</p>\n\n<p>This is intended to allow the developer to create application-specific utility Components with customized\ninternal structure.</p>\n\n<p>Upon rendering, any created child elements may be automatically imported into object properties using the\n<a href=\"#!/api/Ext.container.AbstractContainer-cfg-renderSelectors\" rel=\"Ext.container.AbstractContainer-cfg-renderSelectors\" class=\"docClass\">renderSelectors</a> and <a href=\"#!/api/Ext.container.AbstractContainer-cfg-childEls\" rel=\"Ext.container.AbstractContainer-cfg-childEls\" class=\"docClass\">childEls</a> options.</p>\n<p>Defaults to: <code>'{%this.renderContainer(out,values)%}'</code></p><p>Overrides: <a href='#!/api/Ext.AbstractComponent-cfg-renderTpl' rel='Ext.AbstractComponent-cfg-renderTpl' class='docClass'>Ext.AbstractComponent.renderTpl</a></p></div></div></div><div id='cfg-resizable' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-cfg-resizable' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-cfg-resizable' class='name expandable'>resizable</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span></div><div class='description'><div class='short'>Specify as true to apply a Resizer to this Component after rendering. ...</div><div class='long'><p>Specify as <code>true</code> to apply a <a href=\"#!/api/Ext.resizer.Resizer\" rel=\"Ext.resizer.Resizer\" class=\"docClass\">Resizer</a> to this Component after rendering.</p>\n\n<p>May also be specified as a config object to be passed to the constructor of <a href=\"#!/api/Ext.resizer.Resizer\" rel=\"Ext.resizer.Resizer\" class=\"docClass\">Resizer</a>\nto override any defaults. By default the Component passes its minimum and maximum size, and uses\n<code><a href=\"#!/api/Ext.resizer.Resizer-cfg-dynamic\" rel=\"Ext.resizer.Resizer-cfg-dynamic\" class=\"docClass\">Ext.resizer.Resizer.dynamic</a>: false</code></p>\n</div></div></div><div id='cfg-resizeHandles' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-cfg-resizeHandles' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-cfg-resizeHandles' class='name expandable'>resizeHandles</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>A valid Ext.resizer.Resizer handles config string. ...</div><div class='long'><p>A valid <a href=\"#!/api/Ext.resizer.Resizer\" rel=\"Ext.resizer.Resizer\" class=\"docClass\">Ext.resizer.Resizer</a> handles config string. Only applies when resizable = true.</p>\n<p>Defaults to: <code>'all'</code></p></div></div></div><div id='cfg-rtl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent2.html#Ext-AbstractComponent-cfg-rtl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-rtl' class='name expandable'>rtl</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>True to layout this component and its descendants in \"rtl\" (right-to-left) mode. ...</div><div class='long'><p>True to layout this component and its descendants in \"rtl\" (right-to-left) mode.\nCan be explicitly set to false to override a true value inherited from an ancestor.</p>\n\n<p><strong>Defined in override Ext.rtl.AbstractComponent.</strong></p>\n</div></div></div><div id='cfg-saveDelay' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.state.Stateful' rel='Ext.state.Stateful' class='defined-in docClass'>Ext.state.Stateful</a><br/><a href='source/Stateful.html#Ext-state-Stateful-cfg-saveDelay' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.state.Stateful-cfg-saveDelay' class='name expandable'>saveDelay</a><span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span></div><div class='description'><div class='short'>A buffer to be applied if many state events are fired within a short period. ...</div><div class='long'><p>A buffer to be applied if many state events are fired within a short period.</p>\n<p>Defaults to: <code>100</code></p></div></div></div><div id='cfg-shadow' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-cfg-shadow' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-cfg-shadow' class='name expandable'>shadow</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>Specifies whether the floating component should be given a shadow. ...</div><div class='long'><p>Specifies whether the floating component should be given a shadow. Set to true to automatically create an\n<a href=\"#!/api/Ext.Shadow\" rel=\"Ext.Shadow\" class=\"docClass\">Ext.Shadow</a>, or a string indicating the shadow's display <a href=\"#!/api/Ext.Shadow-cfg-mode\" rel=\"Ext.Shadow-cfg-mode\" class=\"docClass\">Ext.Shadow.mode</a>. Set to false to\ndisable the shadow.</p>\n<p>Defaults to: <code>'sides'</code></p></div></div></div><div id='cfg-shadowOffset' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-cfg-shadowOffset' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-cfg-shadowOffset' class='name not-expandable'>shadowOffset</a><span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span></div><div class='description'><div class='short'><p>Number of pixels to offset the shadow.</p>\n</div><div class='long'><p>Number of pixels to offset the shadow.</p>\n</div></div></div><div id='cfg-shrinkWrap' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-shrinkWrap' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-shrinkWrap' class='name expandable'>shrinkWrap</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a>/<a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span></div><div class='description'><div class='short'>If this property is a number, it is interpreted as follows:\n\n\n0: Neither width nor height depend on content. ...</div><div class='long'><p>If this property is a number, it is interpreted as follows:</p>\n\n<ul>\n<li>0: Neither width nor height depend on content. This is equivalent to <code>false</code>.</li>\n<li>1: Width depends on content (shrink wraps), but height does not.</li>\n<li>2: Height depends on content (shrink wraps), but width does not. The default.</li>\n<li>3: Both width and height depend on content (shrink wrap). This is equivalent to <code>true</code>.</li>\n</ul>\n\n\n<p>In CSS terms, shrink-wrap width is analogous to an inline-block element as opposed\nto a block-level element. Some container layouts always shrink-wrap their children,\neffectively ignoring this property (e.g., <a href=\"#!/api/Ext.layout.container.HBox\" rel=\"Ext.layout.container.HBox\" class=\"docClass\">Ext.layout.container.HBox</a>,\n<a href=\"#!/api/Ext.layout.container.VBox\" rel=\"Ext.layout.container.VBox\" class=\"docClass\">Ext.layout.container.VBox</a>, <a href=\"#!/api/Ext.layout.component.Dock\" rel=\"Ext.layout.component.Dock\" class=\"docClass\">Ext.layout.component.Dock</a>).</p>\n<p>Defaults to: <code>2</code></p></div></div></div><div id='cfg-stateEvents' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.state.Stateful' rel='Ext.state.Stateful' class='defined-in docClass'>Ext.state.Stateful</a><br/><a href='source/Stateful.html#Ext-state-Stateful-cfg-stateEvents' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.state.Stateful-cfg-stateEvents' class='name expandable'>stateEvents</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>[]</span></div><div class='description'><div class='short'>An array of events that, when fired, should trigger this object to\nsave its state. ...</div><div class='long'><p>An array of events that, when fired, should trigger this object to\nsave its state. Defaults to none. <code>stateEvents</code> may be any type\nof event supported by this object, including browser or custom events\n(e.g., <tt>['click', 'customerchange']</tt>).</p>\n\n\n<p>See <code><a href=\"#!/api/Ext.state.Stateful-cfg-stateful\" rel=\"Ext.state.Stateful-cfg-stateful\" class=\"docClass\">stateful</a></code> for an explanation of saving and\nrestoring object state.</p>\n\n</div></div></div><div id='cfg-stateId' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.state.Stateful' rel='Ext.state.Stateful' class='defined-in docClass'>Ext.state.Stateful</a><br/><a href='source/Stateful.html#Ext-state-Stateful-cfg-stateId' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.state.Stateful-cfg-stateId' class='name expandable'>stateId</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>The unique id for this object to use for state management purposes. ...</div><div class='long'><p>The unique id for this object to use for state management purposes.</p>\n\n<p>See <a href=\"#!/api/Ext.state.Stateful-cfg-stateful\" rel=\"Ext.state.Stateful-cfg-stateful\" class=\"docClass\">stateful</a> for an explanation of saving and restoring state.</p>\n\n</div></div></div><div id='cfg-stateful' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.state.Stateful' rel='Ext.state.Stateful' class='defined-in docClass'>Ext.state.Stateful</a><br/><a href='source/Stateful.html#Ext-state-Stateful-cfg-stateful' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.state.Stateful-cfg-stateful' class='name expandable'>stateful</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>A flag which causes the object to attempt to restore the state of\ninternal properties from a saved state on startup. ...</div><div class='long'><p>A flag which causes the object to attempt to restore the state of\ninternal properties from a saved state on startup. The object must have\na <a href=\"#!/api/Ext.state.Stateful-cfg-stateId\" rel=\"Ext.state.Stateful-cfg-stateId\" class=\"docClass\">stateId</a> for state to be managed.</p>\n\n<p>Auto-generated ids are not guaranteed to be stable across page loads and\ncannot be relied upon to save and restore the same state for a object.</p>\n\n<p>For state saving to work, the state manager's provider must have been\nset to an implementation of <a href=\"#!/api/Ext.state.Provider\" rel=\"Ext.state.Provider\" class=\"docClass\">Ext.state.Provider</a> which overrides the\n<a href=\"#!/api/Ext.state.Provider-method-set\" rel=\"Ext.state.Provider-method-set\" class=\"docClass\">set</a> and <a href=\"#!/api/Ext.state.Provider-method-get\" rel=\"Ext.state.Provider-method-get\" class=\"docClass\">get</a>\nmethods to save and recall name/value pairs. A built-in implementation,\n<a href=\"#!/api/Ext.state.CookieProvider\" rel=\"Ext.state.CookieProvider\" class=\"docClass\">Ext.state.CookieProvider</a> is available.</p>\n\n<p>To set the state provider for the current page:</p>\n\n<p> <a href=\"#!/api/Ext.state.Manager-method-setProvider\" rel=\"Ext.state.Manager-method-setProvider\" class=\"docClass\">Ext.state.Manager.setProvider</a>(new <a href=\"#!/api/Ext.state.CookieProvider\" rel=\"Ext.state.CookieProvider\" class=\"docClass\">Ext.state.CookieProvider</a>({</p>\n\n<pre><code> expires: new Date(new Date().getTime()+(1000*60*60*24*7)), //7 days from now\n</code></pre>\n\n<p> }));</p>\n\n<p>A stateful object attempts to save state when one of the events\nlisted in the <a href=\"#!/api/Ext.state.Stateful-cfg-stateEvents\" rel=\"Ext.state.Stateful-cfg-stateEvents\" class=\"docClass\">stateEvents</a> configuration fires.</p>\n\n<p>To save state, a stateful object first serializes its state by\ncalling <em><a href=\"#!/api/Ext.state.Stateful-method-getState\" rel=\"Ext.state.Stateful-method-getState\" class=\"docClass\">getState</a></em>.</p>\n\n<p>The Component base class implements <a href=\"#!/api/Ext.state.Stateful-method-getState\" rel=\"Ext.state.Stateful-method-getState\" class=\"docClass\">getState</a> to save its width and height within the state\nonly if they were initially configured, and have changed from the configured value.</p>\n\n<p>The Panel class saves its collapsed state in addition to that.</p>\n\n<p>The Grid class saves its column state in addition to its superclass state.</p>\n\n<p>If there is more application state to be save, the developer must provide an implementation which\nfirst calls the superclass method to inherit the above behaviour, and then injects new properties\ninto the returned object.</p>\n\n<p>The value yielded by getState is passed to <a href=\"#!/api/Ext.state.Manager-method-set\" rel=\"Ext.state.Manager-method-set\" class=\"docClass\">Ext.state.Manager.set</a>\nwhich uses the configured <a href=\"#!/api/Ext.state.Provider\" rel=\"Ext.state.Provider\" class=\"docClass\">Ext.state.Provider</a> to save the object\nkeyed by the <a href=\"#!/api/Ext.state.Stateful-cfg-stateId\" rel=\"Ext.state.Stateful-cfg-stateId\" class=\"docClass\">stateId</a>.</p>\n\n<p>During construction, a stateful object attempts to <em>restore</em> its state by calling\n<a href=\"#!/api/Ext.state.Manager-method-get\" rel=\"Ext.state.Manager-method-get\" class=\"docClass\">Ext.state.Manager.get</a> passing the <a href=\"#!/api/Ext.state.Stateful-cfg-stateId\" rel=\"Ext.state.Stateful-cfg-stateId\" class=\"docClass\">stateId</a></p>\n\n<p>The resulting object is passed to <a href=\"#!/api/Ext.state.Stateful-method-applyState\" rel=\"Ext.state.Stateful-method-applyState\" class=\"docClass\">applyState</a>*. The default implementation of\n<a href=\"#!/api/Ext.state.Stateful-method-applyState\" rel=\"Ext.state.Stateful-method-applyState\" class=\"docClass\">applyState</a> simply copies properties into the object, but a developer may\noverride this to support restoration of more complex application state.</p>\n\n<p>You can perform extra processing on state save and restore by attaching\nhandlers to the <a href=\"#!/api/Ext.state.Stateful-event-beforestaterestore\" rel=\"Ext.state.Stateful-event-beforestaterestore\" class=\"docClass\">beforestaterestore</a>, <a href=\"#!/api/Ext.state.Stateful-event-staterestore\" rel=\"Ext.state.Stateful-event-staterestore\" class=\"docClass\">staterestore</a>,\n<a href=\"#!/api/Ext.state.Stateful-event-beforestatesave\" rel=\"Ext.state.Stateful-event-beforestatesave\" class=\"docClass\">beforestatesave</a> and <a href=\"#!/api/Ext.state.Stateful-event-statesave\" rel=\"Ext.state.Stateful-event-statesave\" class=\"docClass\">statesave</a> events.</p>\n<p>Defaults to: <code>false</code></p></div></div></div><div id='cfg-statusAlign' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.statusbar.StatusBar'>Ext.ux.statusbar.StatusBar</span><br/><a href='source/StatusBar.html#Ext-ux-statusbar-StatusBar-cfg-statusAlign' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.statusbar.StatusBar-cfg-statusAlign' class='name expandable'>statusAlign</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>The alignment of the status element within the overall StatusBar layout. ...</div><div class='long'><p>The alignment of the status element within the overall StatusBar layout. When the StatusBar is rendered,\nit creates an internal div containing the status text and icon. Any additional Toolbar items added in the\nStatusBar's <a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-items\" rel=\"Ext.ux.statusbar.StatusBar-cfg-items\" class=\"docClass\">items</a> config, or added via <a href=\"#!/api/Ext.ux.statusbar.StatusBar-method-add\" rel=\"Ext.ux.statusbar.StatusBar-method-add\" class=\"docClass\">add</a> or any of the supported add* methods, will be\nrendered, in added order, to the opposite side. The status element is greedy, so it will automatically\nexpand to take up all sapce left over by any other items. Example usage:</p>\n\n<pre><code>// Create a left-aligned status bar containing a button,\n// separator and text item that will be right-aligned (default):\n<a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('<a href=\"#!/api/Ext.panel.Panel\" rel=\"Ext.panel.Panel\" class=\"docClass\">Ext.Panel</a>', {\n title: 'StatusBar',\n // etc.\n bbar: <a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('<a href=\"#!/api/Ext.ux.statusbar.StatusBar\" rel=\"Ext.ux.statusbar.StatusBar\" class=\"docClass\">Ext.ux.statusbar.StatusBar</a>', {\n defaultText: 'Default status text',\n id: 'status-id',\n items: [{\n text: 'A Button'\n }, '-', 'Plain Text']\n })\n});\n\n// By adding the statusAlign config, this will create the\n// exact same toolbar, except the status and toolbar item\n// layout will be reversed from the previous example:\n<a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('<a href=\"#!/api/Ext.panel.Panel\" rel=\"Ext.panel.Panel\" class=\"docClass\">Ext.Panel</a>', {\n title: 'StatusBar',\n // etc.\n bbar: <a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('<a href=\"#!/api/Ext.ux.statusbar.StatusBar\" rel=\"Ext.ux.statusbar.StatusBar\" class=\"docClass\">Ext.ux.statusbar.StatusBar</a>', {\n defaultText: 'Default status text',\n id: 'status-id',\n statusAlign: 'right',\n items: [{\n text: 'A Button'\n }, '-', 'Plain Text']\n })\n});\n</code></pre>\n</div></div></div><div id='cfg-style' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-style' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-style' class='name expandable'>style</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span></div><div class='description'><div class='short'>A custom style specification to be applied to this component's Element. ...</div><div class='long'><p>A custom style specification to be applied to this component's Element. Should be a valid argument to\n<a href=\"#!/api/Ext.dom.Element-method-applyStyles\" rel=\"Ext.dom.Element-method-applyStyles\" class=\"docClass\">Ext.Element.applyStyles</a>.</p>\n\n<pre><code>new <a href=\"#!/api/Ext.panel.Panel\" rel=\"Ext.panel.Panel\" class=\"docClass\">Ext.panel.Panel</a>({\n title: 'Some Title',\n renderTo: <a href=\"#!/api/Ext-method-getBody\" rel=\"Ext-method-getBody\" class=\"docClass\">Ext.getBody</a>(),\n width: 400, height: 300,\n layout: 'form',\n items: [{\n xtype: 'textarea',\n style: {\n width: '95%',\n marginBottom: '10px'\n }\n },\n new <a href=\"#!/api/Ext.button.Button\" rel=\"Ext.button.Button\" class=\"docClass\">Ext.button.Button</a>({\n text: 'Send',\n minWidth: '100',\n style: {\n marginBottom: '10px'\n }\n })\n ]\n});\n</code></pre>\n <p>Available since: <b>1.1.0</b></p>\n</div></div></div><div id='cfg-suspendLayout' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-cfg-suspendLayout' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-cfg-suspendLayout' class='name expandable'>suspendLayout</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>If true, suspend calls to doLayout. ...</div><div class='long'><p>If true, suspend calls to doLayout. Useful when batching multiple adds to a container\nand not passing them as multiple arguments or an array.</p>\n<p>Defaults to: <code>false</code></p></div></div></div><div id='cfg-text' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.statusbar.StatusBar'>Ext.ux.statusbar.StatusBar</span><br/><a href='source/StatusBar.html#Ext-ux-statusbar-StatusBar-cfg-text' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.statusbar.StatusBar-cfg-text' class='name expandable'>text</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>A string that will be initially set as the status message. ...</div><div class='long'><p>A string that will be <b>initially</b> set as the status message. This string\nwill be set as innerHTML (html tags are accepted) for the toolbar item.\nIf not specified, the value set for <a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-defaultText\" rel=\"Ext.ux.statusbar.StatusBar-cfg-defaultText\" class=\"docClass\">defaultText</a> will be used.</p>\n</div></div></div><div id='cfg-toFrontOnShow' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-cfg-toFrontOnShow' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-cfg-toFrontOnShow' class='name expandable'>toFrontOnShow</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>True to automatically call toFront when the show method is called on an already visible,\nfloating component. ...</div><div class='long'><p>True to automatically call <a href=\"#!/api/Ext.Component-method-toFront\" rel=\"Ext.Component-method-toFront\" class=\"docClass\">toFront</a> when the <a href=\"#!/api/Ext.Component-method-show\" rel=\"Ext.Component-method-show\" class=\"docClass\">show</a> method is called on an already visible,\nfloating component.</p>\n<p>Defaults to: <code>true</code></p></div></div></div><div id='cfg-tpl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-tpl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-tpl' class='name expandable'>tpl</a><span> : <a href=\"#!/api/Ext.XTemplate\" rel=\"Ext.XTemplate\" class=\"docClass\">Ext.XTemplate</a>/<a href=\"#!/api/Ext.Template\" rel=\"Ext.Template\" class=\"docClass\">Ext.Template</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>[]</span></div><div class='description'><div class='short'>An Ext.Template, Ext.XTemplate or an array of strings to form an Ext.XTemplate. ...</div><div class='long'><p>An <a href=\"#!/api/Ext.Template\" rel=\"Ext.Template\" class=\"docClass\">Ext.Template</a>, <a href=\"#!/api/Ext.XTemplate\" rel=\"Ext.XTemplate\" class=\"docClass\">Ext.XTemplate</a> or an array of strings to form an <a href=\"#!/api/Ext.XTemplate\" rel=\"Ext.XTemplate\" class=\"docClass\">Ext.XTemplate</a>. Used in\nconjunction with the <code><a href=\"#!/api/Ext.AbstractComponent-cfg-data\" rel=\"Ext.AbstractComponent-cfg-data\" class=\"docClass\">data</a></code> and <code><a href=\"#!/api/Ext.AbstractComponent-cfg-tplWriteMode\" rel=\"Ext.AbstractComponent-cfg-tplWriteMode\" class=\"docClass\">tplWriteMode</a></code> configurations.</p>\n <p>Available since: <b>3.4.0</b></p>\n</div></div></div><div id='cfg-tplWriteMode' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-tplWriteMode' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-tplWriteMode' class='name expandable'>tplWriteMode</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>The Ext.(X)Template method to use when updating the content area of the Component. ...</div><div class='long'><p>The Ext.(X)Template method to use when updating the content area of the Component.\nSee <code><a href=\"#!/api/Ext.XTemplate-method-overwrite\" rel=\"Ext.XTemplate-method-overwrite\" class=\"docClass\">Ext.XTemplate.overwrite</a></code> for information on default mode.</p>\n<p>Defaults to: <code>'overwrite'</code></p> <p>Available since: <b>3.4.0</b></p>\n</div></div></div><div id='cfg-ui' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-ui' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-ui' class='name expandable'>ui</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>A UI style for a component. ...</div><div class='long'><p>A UI style for a component.</p>\n<p>Defaults to: <code>'default'</code></p></div></div></div><div id='cfg-uiCls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-uiCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-uiCls' class='name expandable'>uiCls</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>[]</span><strong class='private signature' >private</strong></div><div class='description'><div class='short'>An array of of classNames which are currently applied to this component. ...</div><div class='long'><p>An array of of <code>classNames</code> which are currently applied to this component.</p>\n<p>Defaults to: <code>[]</code></p></div></div></div><div id='cfg-vertical' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-cfg-vertical' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-cfg-vertical' class='name expandable'>vertical</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>Set to true to make the toolbar vertical. ...</div><div class='long'><p>Set to <code>true</code> to make the toolbar vertical. The layout will become a <code>vbox</code>.</p>\n<p>Defaults to: <code>false</code></p></div></div></div><div id='cfg-width' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-width' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-width' class='name not-expandable'>width</a><span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span></div><div class='description'><div class='short'><p>The width of this component in pixels.</p>\n</div><div class='long'><p>The width of this component in pixels.</p>\n</div></div></div><div id='cfg-xtype' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-cfg-xtype' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-cfg-xtype' class='name expandable'>xtype</a><span> : <a href=\"#!/api/Ext.enums.Widget\" rel=\"Ext.enums.Widget\" class=\"docClass\">Ext.enums.Widget</a></span></div><div class='description'><div class='short'>This property provides a shorter alternative to creating objects than using a full\nclass name. ...</div><div class='long'><p>This property provides a shorter alternative to creating objects than using a full\nclass name. Using <code>xtype</code> is the most common way to define component instances,\nespecially in a container. For example, the items in a form containing text fields\ncould be created explicitly like so:</p>\n\n<pre><code> items: [\n <a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('<a href=\"#!/api/Ext.form.field.Text\" rel=\"Ext.form.field.Text\" class=\"docClass\">Ext.form.field.Text</a>', {\n fieldLabel: 'Foo'\n }),\n <a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('<a href=\"#!/api/Ext.form.field.Text\" rel=\"Ext.form.field.Text\" class=\"docClass\">Ext.form.field.Text</a>', {\n fieldLabel: 'Bar'\n }),\n <a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('<a href=\"#!/api/Ext.form.field.Number\" rel=\"Ext.form.field.Number\" class=\"docClass\">Ext.form.field.Number</a>', {\n fieldLabel: 'Num'\n })\n ]\n</code></pre>\n\n<p>But by using <code>xtype</code>, the above becomes:</p>\n\n<pre><code> items: [\n {\n xtype: 'textfield',\n fieldLabel: 'Foo'\n },\n {\n xtype: 'textfield',\n fieldLabel: 'Bar'\n },\n {\n xtype: 'numberfield',\n fieldLabel: 'Num'\n }\n ]\n</code></pre>\n\n<p>When the <code>xtype</code> is common to many items, <a href=\"#!/api/Ext.container.AbstractContainer-cfg-defaultType\" rel=\"Ext.container.AbstractContainer-cfg-defaultType\" class=\"docClass\">Ext.container.AbstractContainer.defaultType</a>\nis another way to specify the <code>xtype</code> for all items that don't have an explicit <code>xtype</code>:</p>\n\n<pre><code> defaultType: 'textfield',\n items: [\n { fieldLabel: 'Foo' },\n { fieldLabel: 'Bar' },\n { fieldLabel: 'Num', xtype: 'numberfield' }\n ]\n</code></pre>\n\n<p>Each member of the <code>items</code> array is now just a \"configuration object\". These objects\nare used to create and configure component instances. A configuration object can be\nmanually used to instantiate a component using <a href=\"#!/api/Ext-method-widget\" rel=\"Ext-method-widget\" class=\"docClass\">Ext.widget</a>:</p>\n\n<pre><code> var text1 = <a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('<a href=\"#!/api/Ext.form.field.Text\" rel=\"Ext.form.field.Text\" class=\"docClass\">Ext.form.field.Text</a>', {\n fieldLabel: 'Foo'\n });\n\n // or alternatively:\n\n var text1 = <a href=\"#!/api/Ext-method-widget\" rel=\"Ext-method-widget\" class=\"docClass\">Ext.widget</a>({\n xtype: 'textfield',\n fieldLabel: 'Foo'\n });\n</code></pre>\n\n<p>This conversion of configuration objects into instantiated components is done when\na container is created as part of its {<a href=\"#!/api/Ext.container.AbstractContainer-method-initComponent\" rel=\"Ext.container.AbstractContainer-method-initComponent\" class=\"docClass\">Ext.container.AbstractContainer.initComponent</a>}\nprocess. As part of the same process, the <code>items</code> array is converted from its raw\narray form into a <a href=\"#!/api/Ext.util.MixedCollection\" rel=\"Ext.util.MixedCollection\" class=\"docClass\">Ext.util.MixedCollection</a> instance.</p>\n\n<p>You can define your own <code>xtype</code> on a custom <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">component</a> by specifying\nthe <code>xtype</code> property in <a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>. For example:</p>\n\n<pre><code><a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('MyApp.PressMeButton', {\n extend: '<a href=\"#!/api/Ext.button.Button\" rel=\"Ext.button.Button\" class=\"docClass\">Ext.button.Button</a>',\n xtype: 'pressmebutton',\n text: 'Press Me'\n});\n</code></pre>\n\n<p>Care should be taken when naming an <code>xtype</code> in a custom component because there is\na single, shared scope for all xtypes. Third part components should consider using\na prefix to avoid collisions.</p>\n\n<pre><code><a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('Foo.form.CoolButton', {\n extend: '<a href=\"#!/api/Ext.button.Button\" rel=\"Ext.button.Button\" class=\"docClass\">Ext.button.Button</a>',\n xtype: 'ux-coolbutton',\n text: 'Cool!'\n});\n</code></pre>\n\n<p>See <a href=\"#!/api/Ext.enums.Widget\" rel=\"Ext.enums.Widget\" class=\"docClass\">Ext.enums.Widget</a> for list of all available xtypes.</p>\n <p>Available since: <b>2.3.0</b></p>\n</div></div></div></div></div><div class='members-section'><h3 class='members-title icon-property'>Properties</h3><div class='subsection'><div class='definedBy'>Defined By</div><h4 class='members-subtitle'>Instance Properties</h3><div id='property-S-className' class='member first-child inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-property-S-className' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-property-S-className' class='name expandable'>$className</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>'Ext.Base'</code></p></div></div></div><div id='property-_alignRe' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='defined-in docClass'>Ext.util.Positionable</a><br/><a href='source/Positionable.html#Ext-util-Positionable-property-_alignRe' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Positionable-property-_alignRe' class='name expandable'>_alignRe</a><span> : <a href=\"#!/api/RegExp\" rel=\"RegExp\" class=\"docClass\">RegExp</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>/^([a-z]+)-([a-z]+)(\\?)?$/</code></p></div></div></div><div id='property-_isLayoutRoot' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-property-_isLayoutRoot' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-property-_isLayoutRoot' class='name expandable'>_isLayoutRoot</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><strong class='protected signature' >protected</strong></div><div class='description'><div class='short'>Setting this property to true causes the isLayoutRoot method to return\ntrue and stop the search for the top-most comp...</div><div class='long'><p>Setting this property to <code>true</code> causes the <a href=\"#!/api/Ext.AbstractComponent-method-isLayoutRoot\" rel=\"Ext.AbstractComponent-method-isLayoutRoot\" class=\"docClass\">isLayoutRoot</a> method to return\n<code>true</code> and stop the search for the top-most component for a layout.</p>\n<p>Defaults to: <code>false</code></p></div></div></div><div id='property-_positionTopLeft' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='defined-in docClass'>Ext.util.Positionable</a><br/><a href='source/Positionable.html#Ext-util-Positionable-property-_positionTopLeft' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Positionable-property-_positionTopLeft' class='name expandable'>_positionTopLeft</a><span> : <a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>['position', 'top', 'left']</code></p></div></div></div><div id='property-activeThreadId' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.statusbar.StatusBar'>Ext.ux.statusbar.StatusBar</span><br/><a href='source/StatusBar.html#Ext-ux-statusbar-StatusBar-property-activeThreadId' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.statusbar.StatusBar-property-activeThreadId' class='name expandable'>activeThreadId</a><span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'>private ...</div><div class='long'><p>private</p>\n<p>Defaults to: <code>0</code></p></div></div></div><div id='property-allowDomMove' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-property-allowDomMove' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-property-allowDomMove' class='name expandable'>allowDomMove</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>true</code></p></div></div></div><div id='property-ariaRole' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-property-ariaRole' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-property-ariaRole' class='name expandable'>ariaRole</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>'toolbar'</code></p></div></div></div><div id='property-autoGenId' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-property-autoGenId' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-property-autoGenId' class='name expandable'>autoGenId</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'>true indicates an id was auto-generated rather than provided by configuration. ...</div><div class='long'><p><code>true</code> indicates an <code>id</code> was auto-generated rather than provided by configuration.</p>\n<p>Defaults to: <code>false</code></p></div></div></div><div id='property-borderBoxCls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-property-borderBoxCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-property-borderBoxCls' class='name expandable'>borderBoxCls</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'>private ...</div><div class='long'><p>private</p>\n<p>Defaults to: <code>Ext.baseCSSPrefix + 'border-box'</code></p></div></div></div><div id='property-bubbleEvents' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-property-bubbleEvents' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-property-bubbleEvents' class='name expandable'>bubbleEvents</a><span> : <a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>[]</code></p></div></div></div><div id='property-childEls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.ElementContainer' rel='Ext.util.ElementContainer' class='defined-in docClass'>Ext.util.ElementContainer</a><br/><a href='source/ElementContainer.html#Ext-util-ElementContainer-property-childEls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.ElementContainer-property-childEls' class='name expandable'>childEls</a><span> : <a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>[]</code></p></div></div></div><div id='property-componentLayoutCounter' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-property-componentLayoutCounter' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-property-componentLayoutCounter' class='name expandable'>componentLayoutCounter</a><span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'>The number of component layout calls made on this object. ...</div><div class='long'><p>The number of component layout calls made on this object.</p>\n<p>Defaults to: <code>0</code></p></div></div></div><div id='property-configMap' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-property-configMap' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-property-configMap' class='name expandable'>configMap</a><span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>{}</code></p></div></div></div><div id='property-contentPaddingProperty' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-property-contentPaddingProperty' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-property-contentPaddingProperty' class='name expandable'>contentPaddingProperty</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>The name of the padding property that is used by the layout to manage\npadding. ...</div><div class='long'><p>The name of the padding property that is used by the layout to manage\npadding. See <a href=\"#!/api/Ext.layout.container.Auto-property-managePadding\" rel=\"Ext.layout.container.Auto-property-managePadding\" class=\"docClass\">managePadding</a></p>\n<p>Defaults to: <code>'padding'</code></p></div></div></div><div id='property-convertPositionSpec' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='defined-in docClass'>Ext.util.Positionable</a><br/><a href='source/Positionable.html#Ext-util-Positionable-property-convertPositionSpec' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Positionable-property-convertPositionSpec' class='name expandable'>convertPositionSpec</a><span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'>By default this method does nothing but return the position spec passed to it. ...</div><div class='long'><p>By default this method does nothing but return the position spec passed to it. In\nrtl mode it is overridden to convert \"l\" to \"r\" and vice versa when required.</p>\n</div></div></div><div id='property-defaultComponentLayoutType' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-property-defaultComponentLayoutType' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-property-defaultComponentLayoutType' class='name expandable'>defaultComponentLayoutType</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>'autocomponent'</code></p></div></div></div><div id='property-deferLayouts' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-property-deferLayouts' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-property-deferLayouts' class='name expandable'>deferLayouts</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>false</code></p></div></div></div><div id='property-draggable' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-property-draggable' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-property-draggable' class='name expandable'>draggable</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><strong class='readonly signature' >readonly</strong></div><div class='description'><div class='short'>Indicates whether or not the component can be dragged. ...</div><div class='long'><p>Indicates whether or not the component can be dragged.</p>\n<p>Defaults to: <code>false</code></p></div></div></div><div id='property-eventsSuspended' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-property-eventsSuspended' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-property-eventsSuspended' class='name expandable'>eventsSuspended</a><span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'>Initial suspended call count. ...</div><div class='long'><p>Initial suspended call count. Incremented when <a href=\"#!/api/Ext.util.Observable-method-suspendEvents\" rel=\"Ext.util.Observable-method-suspendEvents\" class=\"docClass\">suspendEvents</a> is called, decremented when <a href=\"#!/api/Ext.util.Observable-method-resumeEvents\" rel=\"Ext.util.Observable-method-resumeEvents\" class=\"docClass\">resumeEvents</a> is called.</p>\n<p>Defaults to: <code>0</code></p></div></div></div><div id='property-floatParent' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-property-floatParent' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-property-floatParent' class='name expandable'>floatParent</a><span> : <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.Container</a></span><strong class='readonly signature' >readonly</strong></div><div class='description'><div class='short'>Only present for floating Components which were inserted as child items of Containers. ...</div><div class='long'><p><strong>Only present for <a href=\"#!/api/Ext.Component-cfg-floating\" rel=\"Ext.Component-cfg-floating\" class=\"docClass\">floating</a> Components which were inserted as child items of Containers.</strong></p>\n\n<p>There are other similar relationships such as the <a href=\"#!/api/Ext.button.Button\" rel=\"Ext.button.Button\" class=\"docClass\">button</a> which activates a <a href=\"#!/api/Ext.button.Button-cfg-menu\" rel=\"Ext.button.Button-cfg-menu\" class=\"docClass\">menu</a>, or the\n<a href=\"#!/api/Ext.menu.Item\" rel=\"Ext.menu.Item\" class=\"docClass\">menu item</a> which activated a <a href=\"#!/api/Ext.menu.Item-cfg-menu\" rel=\"Ext.menu.Item-cfg-menu\" class=\"docClass\">submenu</a>, or the\n<a href=\"#!/api/Ext.grid.column.Column\" rel=\"Ext.grid.column.Column\" class=\"docClass\">column header</a> which activated the column menu.</p>\n\n<p>These differences are abstracted away by the <a href=\"#!/api/Ext.Component-method-up\" rel=\"Ext.Component-method-up\" class=\"docClass\">up</a> method.</p>\n\n<p>Floating Components that are programatically <a href=\"#!/api/Ext.Component-method-render\" rel=\"Ext.Component-method-render\" class=\"docClass\">rendered</a> will not have a <code>floatParent</code>\nproperty.</p>\n\n<p>See <a href=\"#!/api/Ext.Component-cfg-floating\" rel=\"Ext.Component-cfg-floating\" class=\"docClass\">floating</a> and <a href=\"#!/api/Ext.Component-property-zIndexManager\" rel=\"Ext.Component-property-zIndexManager\" class=\"docClass\">zIndexManager</a></p>\n</div></div></div><div id='property-frameCls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-property-frameCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-property-frameCls' class='name expandable'>frameCls</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>Ext.baseCSSPrefix + 'frame'</code></p></div></div></div><div id='property-frameElNames' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-property-frameElNames' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-property-frameElNames' class='name expandable'>frameElNames</a><span> : <a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>['TL', 'TC', 'TR', 'ML', 'MC', 'MR', 'BL', 'BC', 'BR']</code></p></div></div></div><div id='property-frameElementsArray' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-property-frameElementsArray' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-property-frameElementsArray' class='name expandable'>frameElementsArray</a><span> : <a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>['tl', 'tc', 'tr', 'ml', 'mc', 'mr', 'bl', 'bc', 'br']</code></p></div></div></div><div id='property-frameIdRegex' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-property-frameIdRegex' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-property-frameIdRegex' class='name expandable'>frameIdRegex</a><span> : <a href=\"#!/api/RegExp\" rel=\"RegExp\" class=\"docClass\">RegExp</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>/[\\-]frame\\d+[TMB][LCR]$/</code></p></div></div></div><div id='property-frameInfoCache' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-property-frameInfoCache' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-property-frameInfoCache' class='name expandable'>frameInfoCache</a><span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'>Cache the frame information object so as not to cause style recalculations ...</div><div class='long'><p>Cache the frame information object so as not to cause style recalculations</p>\n<p>Defaults to: <code>{}</code></p></div></div></div><div id='property-frameSize' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-property-frameSize' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-property-frameSize' class='name expandable'>frameSize</a><span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><strong class='readonly signature' >readonly</strong></div><div class='description'><div class='short'>Indicates the width of any framing elements which were added within the encapsulating\nelement to provide graphical, r...</div><div class='long'><p>Indicates the width of any framing elements which were added within the encapsulating\nelement to provide graphical, rounded borders. See the <a href=\"#!/api/Ext.AbstractComponent-cfg-frame\" rel=\"Ext.AbstractComponent-cfg-frame\" class=\"docClass\">frame</a> config. This\nproperty is <code>null</code> if the component is not framed.</p>\n\n<p>This is an object containing the frame width in pixels for all four sides of the\nComponent containing the following properties:</p>\n<ul><li><span class='pre'>top</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a> (optional)<div class='sub-desc'><p>The width of the top framing element in pixels.</p>\n<p>Defaults to: <code>0</code></p></div></li><li><span class='pre'>right</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a> (optional)<div class='sub-desc'><p>The width of the right framing element in pixels.</p>\n<p>Defaults to: <code>0</code></p></div></li><li><span class='pre'>bottom</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a> (optional)<div class='sub-desc'><p>The width of the bottom framing element in pixels.</p>\n<p>Defaults to: <code>0</code></p></div></li><li><span class='pre'>left</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a> (optional)<div class='sub-desc'><p>The width of the left framing element in pixels.</p>\n<p>Defaults to: <code>0</code></p></div></li><li><span class='pre'>width</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a> (optional)<div class='sub-desc'><p>The total width of the left and right framing elements in pixels.</p>\n<p>Defaults to: <code>0</code></p></div></li><li><span class='pre'>height</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a> (optional)<div class='sub-desc'><p>The total height of the top and right bottom elements in pixels.</p>\n<p>Defaults to: <code>0</code></p></div></li></ul></div></div></div><div id='property-frameTableTpl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-property-frameTableTpl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-property-frameTableTpl' class='name not-expandable'>frameTableTpl</a><span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'>\n</div><div class='long'>\n</div></div></div><div id='property-frameTpl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-property-frameTpl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-property-frameTpl' class='name expandable'>frameTpl</a><span> : <a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>['{%this.renderDockedItems(out,values,0);%}', '<tpl if="top">', '<tpl if="left"><div id="{fgid}TL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl>{frameElCls}" role="presentation"></tpl>', '<tpl if="right"><div id="{fgid}TR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl>{frameElCls}" role="presentation"></tpl>', '<div id="{fgid}TC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl>{frameElCls}" role="presentation"></div>', '<tpl if="right"></div></tpl>', '<tpl if="left"></div></tpl>', '</tpl>', '<tpl if="left"><div id="{fgid}ML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl>{frameElCls}" role="presentation"></tpl>', '<tpl if="right"><div id="{fgid}MR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl>{frameElCls}" role="presentation"></tpl>', '<div id="{fgid}MC" class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl>{frameElCls}" role="presentation">', '{%this.applyRenderTpl(out, values)%}', '</div>', '<tpl if="right"></div></tpl>', '<tpl if="left"></div></tpl>', '<tpl if="bottom">', '<tpl if="left"><div id="{fgid}BL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl>{frameElCls}" role="presentation"></tpl>', '<tpl if="right"><div id="{fgid}BR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl>{frameElCls}" role="presentation"></tpl>', '<div id="{fgid}BC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl>{frameElCls}" role="presentation"></div>', '<tpl if="right"></div></tpl>', '<tpl if="left"></div></tpl>', '</tpl>', '{%this.renderDockedItems(out,values,1);%}']</code></p></div></div></div><div id='property-hasListeners' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-property-hasListeners' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-property-hasListeners' class='name expandable'>hasListeners</a><span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><strong class='readonly signature' >readonly</strong></div><div class='description'><div class='short'>This object holds a key for any event that has a listener. ...</div><div class='long'><p>This object holds a key for any event that has a listener. The listener may be set\ndirectly on the instance, or on its class or a super class (via <a href=\"#!/api/Ext.util.Observable-static-method-observe\" rel=\"Ext.util.Observable-static-method-observe\" class=\"docClass\">observe</a>) or\non the <a href=\"#!/api/Ext.app.EventBus\" rel=\"Ext.app.EventBus\" class=\"docClass\">MVC EventBus</a>. The values of this object are truthy\n(a non-zero number) and falsy (0 or undefined). They do not represent an exact count\nof listeners. The value for an event is truthy if the event must be fired and is\nfalsy if there is no need to fire the event.</p>\n\n<p>The intended use of this property is to avoid the expense of fireEvent calls when\nthere are no listeners. This can be particularly helpful when one would otherwise\nhave to call fireEvent hundreds or thousands of times. It is used like this:</p>\n\n<pre><code> if (this.hasListeners.foo) {\n this.fireEvent('foo', this, arg1);\n }\n</code></pre>\n</div></div></div><div id='property-horizontalPosProp' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-property-horizontalPosProp' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-property-horizontalPosProp' class='name expandable'>horizontalPosProp</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>'left'</code></p></div></div></div><div id='property-initConfigList' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-property-initConfigList' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-property-initConfigList' class='name expandable'>initConfigList</a><span> : <a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>[]</code></p></div></div></div><div id='property-initConfigMap' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-property-initConfigMap' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-property-initConfigMap' class='name expandable'>initConfigMap</a><span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>{}</code></p></div></div></div><div id='property-isAnimate' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Animate' rel='Ext.util.Animate' class='defined-in docClass'>Ext.util.Animate</a><br/><a href='source/Animate.html#Ext-util-Animate-property-isAnimate' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Animate-property-isAnimate' class='name expandable'>isAnimate</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>true</code></p></div></div></div><div id='property-isComponent' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-property-isComponent' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-property-isComponent' class='name expandable'>isComponent</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>true in this class to identify an object as an instantiated Component, or subclass thereof. ...</div><div class='long'><p><code>true</code> in this class to identify an object as an instantiated Component, or subclass thereof.</p>\n<p>Defaults to: <code>true</code></p></div></div></div><div id='property-isContainer' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-property-isContainer' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-property-isContainer' class='name expandable'>isContainer</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'>true in this class to identify an object as an instantiated Container, or subclass thereof. ...</div><div class='long'><p><code>true</code> in this class to identify an object as an instantiated Container, or subclass thereof.</p>\n<p>Defaults to: <code>true</code></p></div></div></div><div id='property-isInstance' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-property-isInstance' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-property-isInstance' class='name expandable'>isInstance</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>true</code></p></div></div></div><div id='property-isObservable' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-property-isObservable' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-property-isObservable' class='name expandable'>isObservable</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>true in this class to identify an object as an instantiated Observable, or subclass thereof. ...</div><div class='long'><p><code>true</code> in this class to identify an object as an instantiated Observable, or subclass thereof.</p>\n<p>Defaults to: <code>true</code></p></div></div></div><div id='property-isQueryable' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Queryable' rel='Ext.Queryable' class='defined-in docClass'>Ext.Queryable</a><br/><a href='source/Queryable.html#Ext-Queryable-property-isQueryable' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Queryable-property-isQueryable' class='name expandable'>isQueryable</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>true</code></p></div></div></div><div id='property-isToolbar' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-property-isToolbar' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-property-isToolbar' class='name expandable'>isToolbar</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>true in this class to identify an object as an instantiated Toolbar, or subclass thereof. ...</div><div class='long'><p><code>true</code> in this class to identify an object as an instantiated Toolbar, or subclass thereof.</p>\n<p>Defaults to: <code>true</code></p></div></div></div><div id='property-itemCls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-property-itemCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-property-itemCls' class='name expandable'>itemCls</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>Ext.baseCSSPrefix + 'toolbar-item'</code></p></div></div></div><div id='property-items' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-property-items' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-property-items' class='name not-expandable'>items</a><span> : <a href=\"#!/api/Ext.util.AbstractMixedCollection\" rel=\"Ext.util.AbstractMixedCollection\" class=\"docClass\">Ext.util.AbstractMixedCollection</a></span></div><div class='description'><div class='short'><p>The MixedCollection containing all the child items of this container.</p>\n</div><div class='long'><p>The MixedCollection containing all the child items of this container.</p>\n <p>Available since: <b>2.3.0</b></p>\n</div></div></div><div id='property-layoutCounter' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-property-layoutCounter' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-property-layoutCounter' class='name expandable'>layoutCounter</a><span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'>The number of container layout calls made on this object. ...</div><div class='long'><p>The number of container layout calls made on this object.</p>\n<p>Defaults to: <code>0</code></p></div></div></div><div id='property-layoutSuspendCount' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-property-layoutSuspendCount' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-property-layoutSuspendCount' class='name expandable'>layoutSuspendCount</a><span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>0</code></p></div></div></div><div id='property-maskOnDisable' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-property-maskOnDisable' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-property-maskOnDisable' class='name expandable'>maskOnDisable</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span></div><div class='description'><div class='short'>This is an internal flag that you use when creating custom components. ...</div><div class='long'><p>This is an internal flag that you use when creating custom components. By default this is set to <code>true</code> which means\nthat every component gets a mask when it's disabled. Components like FieldContainer, FieldSet, Field, Button, Tab\noverride this property to <code>false</code> since they want to implement custom disable logic.</p>\n<p>Defaults to: <code>true</code></p></div></div></div><div id='property-offsetsCls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-property-offsetsCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-property-offsetsCls' class='name expandable'>offsetsCls</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>Ext.baseCSSPrefix + 'hide-offsets'</code></p></div></div></div><div id='property-ownerCt' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-property-ownerCt' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-property-ownerCt' class='name expandable'>ownerCt</a><span> : <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.Container</a></span><strong class='readonly signature' >readonly</strong></div><div class='description'><div class='short'>This Component's owner Container (is set automatically\nwhen this Component is added to a Container). ...</div><div class='long'><p>This Component's owner <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Container</a> (is set automatically\nwhen this Component is added to a Container).</p>\n\n<p><em>Important.</em> This is not a universal upwards navigation pointer. It indicates the Container which owns and manages\nthis Component if any. There are other similar relationships such as the <a href=\"#!/api/Ext.button.Button\" rel=\"Ext.button.Button\" class=\"docClass\">button</a> which activates a <a href=\"#!/api/Ext.button.Button-cfg-menu\" rel=\"Ext.button.Button-cfg-menu\" class=\"docClass\">menu</a>, or the\n<a href=\"#!/api/Ext.menu.Item\" rel=\"Ext.menu.Item\" class=\"docClass\">menu item</a> which activated a <a href=\"#!/api/Ext.menu.Item-cfg-menu\" rel=\"Ext.menu.Item-cfg-menu\" class=\"docClass\">submenu</a>, or the\n<a href=\"#!/api/Ext.grid.column.Column\" rel=\"Ext.grid.column.Column\" class=\"docClass\">column header</a> which activated the column menu.</p>\n\n<p>These differences are abstracted away by the <a href=\"#!/api/Ext.AbstractComponent-method-up\" rel=\"Ext.AbstractComponent-method-up\" class=\"docClass\">up</a> method.</p>\n\n<p><strong>Note</strong>: to access items within the Container see <a href=\"#!/api/Ext.AbstractComponent-cfg-itemId\" rel=\"Ext.AbstractComponent-cfg-itemId\" class=\"docClass\">itemId</a>.</p>\n <p>Available since: <b>2.3.0</b></p>\n</div></div></div><div id='property-rendered' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-property-rendered' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-property-rendered' class='name expandable'>rendered</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><strong class='readonly signature' >readonly</strong></div><div class='description'><div class='short'>Indicates whether or not the component has been rendered. ...</div><div class='long'><p>Indicates whether or not the component has been rendered.</p>\n<p>Defaults to: <code>false</code></p> <p>Available since: <b>1.1.0</b></p>\n</div></div></div><div id='property-scrollFlags' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/AbstractComponent.html#Ext-Component-property-scrollFlags' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-property-scrollFlags' class='name expandable'>scrollFlags</a><span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><strong class='readonly signature' >readonly</strong></div><div class='description'><div class='short'>An object property which provides unified information as to which dimensions are scrollable based upon\nthe autoScroll...</div><div class='long'><p>An object property which provides unified information as to which dimensions are scrollable based upon\nthe <a href=\"#!/api/Ext.Component-cfg-autoScroll\" rel=\"Ext.Component-cfg-autoScroll\" class=\"docClass\">autoScroll</a>, <a href=\"#!/api/Ext.Component-cfg-overflowX\" rel=\"Ext.Component-cfg-overflowX\" class=\"docClass\">overflowX</a> and <a href=\"#!/api/Ext.Component-cfg-overflowY\" rel=\"Ext.Component-cfg-overflowY\" class=\"docClass\">overflowY</a> settings (And for <em>views</em> of trees and grids, the owning panel's <a href=\"#!/api/Ext.panel.Table-cfg-scroll\" rel=\"Ext.panel.Table-cfg-scroll\" class=\"docClass\">scroll</a> setting).</p>\n\n<p>Note that if you set overflow styles using the <a href=\"#!/api/Ext.Component-cfg-style\" rel=\"Ext.Component-cfg-style\" class=\"docClass\">style</a> config or <a href=\"#!/api/Ext.panel.Panel-cfg-bodyStyle\" rel=\"Ext.panel.Panel-cfg-bodyStyle\" class=\"docClass\">bodyStyle</a> config, this object does not include that information;\nit is best to use <a href=\"#!/api/Ext.Component-cfg-autoScroll\" rel=\"Ext.Component-cfg-autoScroll\" class=\"docClass\">autoScroll</a>, <a href=\"#!/api/Ext.Component-cfg-overflowX\" rel=\"Ext.Component-cfg-overflowX\" class=\"docClass\">overflowX</a> and <a href=\"#!/api/Ext.Component-cfg-overflowY\" rel=\"Ext.Component-cfg-overflowY\" class=\"docClass\">overflowY</a> if you need to access these flags.</p>\n\n<p>This object has the following properties:</p>\n<ul><li><span class='pre'>x</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><div class='sub-desc'><p><code>true</code> if this Component is scrollable horizontally - style setting may be <code>'auto'</code> or <code>'scroll'</code>.</p>\n</div></li><li><span class='pre'>y</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><div class='sub-desc'><p><code>true</code> if this Component is scrollable vertically - style setting may be <code>'auto'</code> or <code>'scroll'</code>.</p>\n</div></li><li><span class='pre'>both</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><div class='sub-desc'><p><code>true</code> if this Component is scrollable both horizontally and vertically.</p>\n</div></li><li><span class='pre'>overflowX</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The <code>overflow-x</code> style setting, <code>'auto'</code> or <code>'scroll'</code> or <code>''</code>.</p>\n</div></li><li><span class='pre'>overflowY</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The <code>overflow-y</code> style setting, <code>'auto'</code> or <code>'scroll'</code> or <code>''</code>.</p>\n</div></li></ul></div></div></div><div id='property-self' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-property-self' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-property-self' class='name expandable'>self</a><span> : <a href=\"#!/api/Ext.Class\" rel=\"Ext.Class\" class=\"docClass\">Ext.Class</a></span><strong class='protected signature' >protected</strong></div><div class='description'><div class='short'>Get the reference to the current class from which this object was instantiated. ...</div><div class='long'><p>Get the reference to the current class from which this object was instantiated. Unlike <a href=\"#!/api/Ext.Base-method-statics\" rel=\"Ext.Base-method-statics\" class=\"docClass\">statics</a>,\n<code>this.self</code> is scope-dependent and it's meant to be used for dynamic inheritance. See <a href=\"#!/api/Ext.Base-method-statics\" rel=\"Ext.Base-method-statics\" class=\"docClass\">statics</a>\nfor a detailed comparison</p>\n\n<pre><code><a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('My.Cat', {\n statics: {\n speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n },\n\n constructor: function() {\n alert(this.self.speciesName); // dependent on 'this'\n },\n\n clone: function() {\n return new this.self();\n }\n});\n\n\n<a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('My.SnowLeopard', {\n extend: 'My.Cat',\n statics: {\n speciesName: 'Snow Leopard' // My.SnowLeopard.speciesName = 'Snow Leopard'\n }\n});\n\nvar cat = new My.Cat(); // alerts 'Cat'\nvar snowLeopard = new My.SnowLeopard(); // alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(<a href=\"#!/api/Ext-method-getClassName\" rel=\"Ext-method-getClassName\" class=\"docClass\">Ext.getClassName</a>(clone)); // alerts 'My.SnowLeopard'\n</code></pre>\n</div></div></div><div id='property-trackMenus' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-property-trackMenus' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-property-trackMenus' class='name expandable'>trackMenus</a><span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>true</code></p></div></div></div><div id='property-weight' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-property-weight' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-property-weight' class='name expandable'>weight</a><span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>0</code></p></div></div></div><div id='property-zIndexManager' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-property-zIndexManager' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-property-zIndexManager' class='name expandable'>zIndexManager</a><span> : <a href=\"#!/api/Ext.ZIndexManager\" rel=\"Ext.ZIndexManager\" class=\"docClass\">Ext.ZIndexManager</a></span><strong class='readonly signature' >readonly</strong></div><div class='description'><div class='short'>Only present for floating Components after they have been rendered. ...</div><div class='long'><p>Only present for <a href=\"#!/api/Ext.Component-cfg-floating\" rel=\"Ext.Component-cfg-floating\" class=\"docClass\">floating</a> Components after they have been rendered.</p>\n\n<p>A reference to the ZIndexManager which is managing this Component's z-index.</p>\n\n<p>The <a href=\"#!/api/Ext.ZIndexManager\" rel=\"Ext.ZIndexManager\" class=\"docClass\">ZIndexManager</a> maintains a stack of floating Component z-indices, and also provides\na single modal mask which is insert just beneath the topmost visible modal floating Component.</p>\n\n<p>Floating Components may be <a href=\"#!/api/Ext.Component-method-toFront\" rel=\"Ext.Component-method-toFront\" class=\"docClass\">brought to the front</a> or <a href=\"#!/api/Ext.Component-method-toBack\" rel=\"Ext.Component-method-toBack\" class=\"docClass\">sent to the back</a> of the\nz-index stack.</p>\n\n<p>This defaults to the global <a href=\"#!/api/Ext.WindowManager\" rel=\"Ext.WindowManager\" class=\"docClass\">ZIndexManager</a> for floating Components that are\nprogramatically <a href=\"#!/api/Ext.Component-method-render\" rel=\"Ext.Component-method-render\" class=\"docClass\">rendered</a>.</p>\n\n<p>For <a href=\"#!/api/Ext.Component-cfg-floating\" rel=\"Ext.Component-cfg-floating\" class=\"docClass\">floating</a> Components which are added to a Container, the ZIndexManager is acquired from the first\nancestor Container found which is floating. If no floating ancestor is found, the global <a href=\"#!/api/Ext.WindowManager\" rel=\"Ext.WindowManager\" class=\"docClass\">ZIndexManager</a> is\nused.</p>\n\n<p>See <a href=\"#!/api/Ext.Component-cfg-floating\" rel=\"Ext.Component-cfg-floating\" class=\"docClass\">floating</a> and <a href=\"#!/api/Ext.Component-property-zIndexParent\" rel=\"Ext.Component-property-zIndexParent\" class=\"docClass\">zIndexParent</a></p>\n</div></div></div><div id='property-zIndexParent' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-property-zIndexParent' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-property-zIndexParent' class='name expandable'>zIndexParent</a><span> : <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.Container</a></span><strong class='readonly signature' >readonly</strong></div><div class='description'><div class='short'>Only present for floating Components which were inserted as child items of Containers, and which have a floating\nCont...</div><div class='long'><p>Only present for <a href=\"#!/api/Ext.Component-cfg-floating\" rel=\"Ext.Component-cfg-floating\" class=\"docClass\">floating</a> Components which were inserted as child items of Containers, and which have a floating\nContainer in their containment ancestry.</p>\n\n<p>For <a href=\"#!/api/Ext.Component-cfg-floating\" rel=\"Ext.Component-cfg-floating\" class=\"docClass\">floating</a> Components which are child items of a Container, the zIndexParent will be a floating\nancestor Container which is responsible for the base z-index value of all its floating descendants. It provides\na <a href=\"#!/api/Ext.ZIndexManager\" rel=\"Ext.ZIndexManager\" class=\"docClass\">ZIndexManager</a> which provides z-indexing services for all its descendant floating\nComponents.</p>\n\n<p>Floating Components that are programatically <a href=\"#!/api/Ext.Component-method-render\" rel=\"Ext.Component-method-render\" class=\"docClass\">rendered</a> will not have a <code>zIndexParent</code>\nproperty.</p>\n\n<p>For example, the dropdown <a href=\"#!/api/Ext.view.BoundList\" rel=\"Ext.view.BoundList\" class=\"docClass\">BoundList</a> of a ComboBox which is in a Window will have the\nWindow as its <code>zIndexParent</code>, and will always show above that Window, wherever the Window is placed in the z-index stack.</p>\n\n<p>See <a href=\"#!/api/Ext.Component-cfg-floating\" rel=\"Ext.Component-cfg-floating\" class=\"docClass\">floating</a> and <a href=\"#!/api/Ext.Component-property-zIndexManager\" rel=\"Ext.Component-property-zIndexManager\" class=\"docClass\">zIndexManager</a></p>\n</div></div></div></div><div class='subsection'><div class='definedBy'>Defined By</div><h4 class='members-subtitle'>Static Properties</h3><div id='static-property-S-onExtended' class='member first-child inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-static-property-S-onExtended' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-static-property-S-onExtended' class='name expandable'>$onExtended</a><span> : <a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a></span><strong class='private signature' >private</strong><strong class='static signature' >static</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>[]</code></p></div></div></div></div></div><div class='members-section'><h3 class='members-title icon-method'>Methods</h3><div class='subsection'><div class='definedBy'>Defined By</div><h4 class='members-subtitle'>Instance Methods</h3><div id='method-constructor' class='member first-child inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-method-constructor' target='_blank' class='view-source'>view source</a></div><strong class='new-keyword'>new</strong><a href='#!/api/Ext.toolbar.Toolbar-method-constructor' class='name expandable'>Ext.ux.statusbar.StatusBar</a>( <span class='pre'>config</span> ) : <a href=\"#!/api/Ext.toolbar.Toolbar\" rel=\"Ext.toolbar.Toolbar\" class=\"docClass\">Ext.toolbar.Toolbar</a></div><div class='description'><div class='short'>Creates a new Toolbar ...</div><div class='long'><p>Creates a new Toolbar</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>config</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>[]<div class='sub-desc'><p>A config object or an array of buttons to <a href=\"#!/api/Ext.toolbar.Toolbar-method-add\" rel=\"Ext.toolbar.Toolbar-method-add\" class=\"docClass\">add</a></p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.toolbar.Toolbar\" rel=\"Ext.toolbar.Toolbar\" class=\"docClass\">Ext.toolbar.Toolbar</a></span><div class='sub-desc'>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.Component-method-constructor' rel='Ext.Component-method-constructor' class='docClass'>Ext.Component.constructor</a></p></div></div></div><div id='method-add' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-method-add' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-method-add' class='name expandable'>add</a>( <span class='pre'>args</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>[]/<a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Adds element(s) to the toolbar -- this function takes a variable number of\narguments of mixed type and adds them to t...</div><div class='long'><p>Adds element(s) to the toolbar -- this function takes a variable number of\narguments of mixed type and adds them to the toolbar.</p>\n\n<p><strong>Note</strong>: See the notes within <a href=\"#!/api/Ext.container.Container-method-add\" rel=\"Ext.container.Container-method-add\" class=\"docClass\">Ext.container.Container.add</a>.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>args</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>.../<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>.../<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>.../HTMLElement...<div class='sub-desc'><p>The following types of arguments are all valid:</p>\n\n<ul>\n<li><code><a href=\"#!/api/Ext.button.Button\" rel=\"Ext.button.Button\" class=\"docClass\">config</a></code>: A valid button config object</li>\n<li><code>HtmlElement</code>: Any standard HTML element</li>\n<li><code>Field</code>: Any form field</li>\n<li><code>Item</code>: Any subclass of <a href=\"#!/api/Ext.toolbar.Item\" rel=\"Ext.toolbar.Item\" class=\"docClass\">Ext.toolbar.Item</a></li>\n<li><p><code>String</code>: Any generic string (gets wrapped in a <a href=\"#!/api/Ext.toolbar.TextItem\" rel=\"Ext.toolbar.TextItem\" class=\"docClass\">Ext.toolbar.TextItem</a>).</p>\n\n<p>Note that there are a few special strings that are treated differently as explained next:</p>\n\n<ul>\n<li><code>'-'</code>: Creates a separator element</li>\n<li><code>' '</code>: Creates a spacer element</li>\n<li><code>'->'</code>: Creates a fill element</li>\n</ul>\n</li>\n</ul>\n\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>[]/<a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>The Components that were added.</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.container.AbstractContainer-method-add' rel='Ext.container.AbstractContainer-method-add' class='docClass'>Ext.container.AbstractContainer.add</a></p></div></div></div><div id='method-addChildEls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.ElementContainer' rel='Ext.util.ElementContainer' class='defined-in docClass'>Ext.util.ElementContainer</a><br/><a href='source/ElementContainer.html#Ext-util-ElementContainer-method-addChildEls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.ElementContainer-method-addChildEls' class='name expandable'>addChildEls</a>( <span class='pre'></span> )</div><div class='description'><div class='short'>Adds each argument passed to this method to the childEls array. ...</div><div class='long'><p>Adds each argument passed to this method to the <a href=\"#!/api/Ext.AbstractComponent-cfg-childEls\" rel=\"Ext.AbstractComponent-cfg-childEls\" class=\"docClass\">childEls</a> array.</p>\n</div></div></div><div id='method-addClass' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-addClass' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-addClass' class='name expandable'>addClass</a>( <span class='pre'>cls</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><strong class='deprecated signature' >deprecated</strong></div><div class='description'><div class='short'>Adds a CSS class to the top level element representing this component. ...</div><div class='long'><p>Adds a CSS class to the top level element representing this component.</p>\n <div class='signature-box deprecated'>\n <p>This method has been <strong>deprecated</strong> since 4.1</p>\n <p>Use <a href=\"#!/api/Ext.AbstractComponent-method-addCls\" rel=\"Ext.AbstractComponent-method-addCls\" class=\"docClass\">addCls</a> instead.</p>\n\n </div>\n <p>Available since: <b>2.3.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>cls</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>[]<div class='sub-desc'><p>The CSS class name to add.</p>\n\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>Returns the Component to allow method chaining.</p>\n\n</div></li></ul></div></div></div><div id='method-addCls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-addCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-addCls' class='name expandable'>addCls</a>( <span class='pre'>cls</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Adds a CSS class to the top level element representing this component. ...</div><div class='long'><p>Adds a CSS class to the top level element representing this component.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>cls</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>[]<div class='sub-desc'><p>The CSS class name to add.</p>\n\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>Returns the Component to allow method chaining.</p>\n\n</div></li></ul></div></div></div><div id='method-addClsWithUI' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-addClsWithUI' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-addClsWithUI' class='name expandable'>addClsWithUI</a>( <span class='pre'>classes, skip</span> )</div><div class='description'><div class='short'>Adds a cls to the uiCls array, which will also call addUIClsToElement and adds to all elements of this\ncomponent. ...</div><div class='long'><p>Adds a <code>cls</code> to the <code>uiCls</code> array, which will also call <a href=\"#!/api/Ext.AbstractComponent-method-addUIClsToElement\" rel=\"Ext.AbstractComponent-method-addUIClsToElement\" class=\"docClass\">addUIClsToElement</a> and adds to all elements of this\ncomponent.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>classes</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>[]<div class='sub-desc'><p>A string or an array of strings to add to the <code>uiCls</code>.</p>\n</div></li><li><span class='pre'>skip</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>(Boolean) skip <code>true</code> to skip adding it to the class and do it later (via the return).</p>\n</div></li></ul></div></div></div><div id='method-addEvents' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-addEvents' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-addEvents' class='name expandable'>addEvents</a>( <span class='pre'>eventNames</span> )</div><div class='description'><div class='short'>Adds the specified events to the list of events which this Observable may fire. ...</div><div class='long'><p>Adds the specified events to the list of events which this Observable may fire.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>eventNames</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>...<div class='sub-desc'><p>Either an object with event names as properties with\na value of <code>true</code>. For example:</p>\n\n<pre><code>this.addEvents({\n storeloaded: true,\n storecleared: true\n});\n</code></pre>\n\n<p>Or any number of event names as separate parameters. For example:</p>\n\n<pre><code>this.addEvents('storeloaded', 'storecleared');\n</code></pre>\n</div></li></ul></div></div></div><div id='method-addFocusListener' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-addFocusListener' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-addFocusListener' class='name expandable'>addFocusListener</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Sets up the focus listener on this Component's focusEl if it has one. ...</div><div class='long'><p>Sets up the focus listener on this Component's <a href=\"#!/api/Ext.AbstractComponent-method-getFocusEl\" rel=\"Ext.AbstractComponent-method-getFocusEl\" class=\"docClass\">focusEl</a> if it has one.</p>\n\n<p>Form Components which must implicitly participate in tabbing order usually have a naturally focusable\nelement as their <a href=\"#!/api/Ext.AbstractComponent-method-getFocusEl\" rel=\"Ext.AbstractComponent-method-getFocusEl\" class=\"docClass\">focusEl</a>, and it is the DOM event of that receiving focus which drives\nthe Component's <code>onFocus</code> handling, and the DOM event of it being blurred which drives the <code>onBlur</code> handling.</p>\n\n<p>If the <a href=\"#!/api/Ext.AbstractComponent-method-getFocusEl\" rel=\"Ext.AbstractComponent-method-getFocusEl\" class=\"docClass\">focusEl</a> is <strong>not</strong> naturally focusable, then the listeners are only added\nif the <a href=\"#!/api/Ext.FocusManager\" rel=\"Ext.FocusManager\" class=\"docClass\">FocusManager</a> is enabled.</p>\n</div></div></div><div id='method-addListener' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-addListener' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-addListener' class='name expandable'>addListener</a>( <span class='pre'>eventName, [fn], [scope], [options]</span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></div><div class='description'><div class='short'>Appends an event handler to this object. ...</div><div class='long'><p>Appends an event handler to this object. For example:</p>\n\n<pre><code>myGridPanel.on(\"mouseover\", this.onMouseOver, this);\n</code></pre>\n\n<p>The method also allows for a single argument to be passed which is a config object\ncontaining properties which specify multiple events. For example:</p>\n\n<pre><code>myGridPanel.on({\n cellClick: this.onCellClick,\n mouseover: this.onMouseOver,\n mouseout: this.onMouseOut,\n scope: this // Important. Ensure \"this\" is correct during handler execution\n});\n</code></pre>\n\n<p>One can also specify options for each event handler separately:</p>\n\n<pre><code>myGridPanel.on({\n cellClick: {fn: this.onCellClick, scope: this, single: true},\n mouseover: {fn: panel.onMouseOver, scope: panel}\n});\n</code></pre>\n\n<p><em>Names</em> of methods in a specified scope may also be used. Note that\n<code>scope</code> MUST be specified to use this option:</p>\n\n<pre><code>myGridPanel.on({\n cellClick: {fn: 'onCellClick', scope: this, single: true},\n mouseover: {fn: 'onMouseOver', scope: panel}\n});\n</code></pre>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>eventName</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The name of the event to listen for.\nMay also be an object who's property names are event names.</p>\n</div></li><li><span class='pre'>fn</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a> (optional)<div class='sub-desc'><p>The method the event invokes, or <em>if <code>scope</code> is specified, the </em>name* of the method within\nthe specified <code>scope</code>. Will be called with arguments\ngiven to <a href=\"#!/api/Ext.util.Observable-method-fireEvent\" rel=\"Ext.util.Observable-method-fireEvent\" class=\"docClass\">Ext.util.Observable.fireEvent</a> plus the <code>options</code> parameter described below.</p>\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>The scope (<code>this</code> reference) in which the handler function is\nexecuted. <strong>If omitted, defaults to the object which fired the event.</strong></p>\n</div></li><li><span class='pre'>options</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>An object containing handler configuration.</p>\n\n<p><strong>Note:</strong> Unlike in ExtJS 3.x, the options object will also be passed as the last\nargument to every event handler.</p>\n\n<p>This object may contain any of the following properties:</p>\n<ul><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The scope (<code>this</code> reference) in which the handler function is executed. <strong>If omitted,\n defaults to the object which fired the event.</strong></p>\n</div></li><li><span class='pre'>delay</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The number of milliseconds to delay the invocation of the handler after the event fires.</p>\n</div></li><li><span class='pre'>single</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><div class='sub-desc'><p>True to add a handler to handle just the next firing of the event, and then remove itself.</p>\n</div></li><li><span class='pre'>buffer</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>Causes the handler to be scheduled to run in an <a href=\"#!/api/Ext.util.DelayedTask\" rel=\"Ext.util.DelayedTask\" class=\"docClass\">Ext.util.DelayedTask</a> delayed\n by the specified number of milliseconds. If the event fires again within that time,\n the original handler is <em>not</em> invoked, but the new handler is scheduled in its place.</p>\n</div></li><li><span class='pre'>target</span> : <a href=\"#!/api/Ext.util.Observable\" rel=\"Ext.util.Observable\" class=\"docClass\">Ext.util.Observable</a><div class='sub-desc'><p>Only call the handler if the event was fired on the target Observable, <em>not</em> if the event\n was bubbled up from a child Observable.</p>\n</div></li><li><span class='pre'>element</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p><strong>This option is only valid for listeners bound to <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Components</a>.</strong>\n The name of a Component property which references an element to add a listener to.</p>\n\n<p> This option is useful during Component construction to add DOM event listeners to elements of\n <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Components</a> which will exist only after the Component is rendered.\n For example, to add a click listener to a Panel's body:</p>\n\n<pre><code> new <a href=\"#!/api/Ext.panel.Panel\" rel=\"Ext.panel.Panel\" class=\"docClass\">Ext.panel.Panel</a>({\n title: 'The title',\n listeners: {\n click: this.handlePanelClick,\n element: 'body'\n }\n });\n</code></pre>\n</div></li><li><span class='pre'>destroyable</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p>When specified as <code>true</code>, the function returns A <code>Destroyable</code> object. An object which implements the <code>destroy</code> method which removes all listeners added in this call.</p>\n<p>Defaults to: <code>false</code></p></div></li><li><span class='pre'>priority</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a> (optional)<div class='sub-desc'><p>An optional numeric priority that determines the order in which event handlers\n are run. Event handlers with no priority will be run as if they had a priority\n of 0. Handlers with a higher priority will be prioritized to run sooner than\n those with a lower priority. Negative numbers can be used to set a priority\n lower than the default. Internally, the framework uses a range of 1000 or\n greater, and -1000 or lesser for handers that are intended to run before or\n after all others, so it is recommended to stay within the range of -999 to 999\n when setting the priority of event handlers in application-level code.</p>\n\n<p><strong>Combining Options</strong></p>\n\n<p>Using the options argument, it is possible to combine different types of listeners:</p>\n\n<p>A delayed, one-time listener.</p>\n\n<pre><code>myPanel.on('hide', this.handleClick, this, {\n single: true,\n delay: 100\n});\n</code></pre>\n</div></li></ul></div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p><strong>Only when the <code>destroyable</code> option is specified. </strong></p>\n\n<p> A <code>Destroyable</code> object. An object which implements the <code>destroy</code> method which removes all listeners added in this call. For example:</p>\n\n<pre><code>this.btnListeners = = myButton.on({\n destroyable: true\n mouseover: function() { console.log('mouseover'); },\n mouseout: function() { console.log('mouseout'); },\n click: function() { console.log('click'); }\n});\n</code></pre>\n\n<p>And when those listeners need to be removed:</p>\n\n<pre><code><a href=\"#!/api/Ext-method-destroy\" rel=\"Ext-method-destroy\" class=\"docClass\">Ext.destroy</a>(this.btnListeners);\n</code></pre>\n\n<p>or</p>\n\n<pre><code>this.btnListeners.destroy();\n</code></pre>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.util.Observable-method-addListener' rel='Ext.util.Observable-method-addListener' class='docClass'>Ext.util.Observable.addListener</a></p></div></div></div><div id='method-addManagedListener' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-addManagedListener' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-addManagedListener' class='name expandable'>addManagedListener</a>( <span class='pre'>item, ename, [fn], [scope], [options]</span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></div><div class='description'><div class='short'>Adds listeners to any Observable object (or Ext.Element) which are automatically removed when this Component is\ndestr...</div><div class='long'><p>Adds listeners to any Observable object (or <a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a>) which are automatically removed when this Component is\ndestroyed.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>item</span> : <a href=\"#!/api/Ext.util.Observable\" rel=\"Ext.util.Observable\" class=\"docClass\">Ext.util.Observable</a>/<a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a><div class='sub-desc'><p>The item to which to add a listener/listeners.</p>\n\n</div></li><li><span class='pre'>ename</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The event name, or an object containing event name properties.</p>\n\n</div></li><li><span class='pre'>fn</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a> (optional)<div class='sub-desc'><p>If the <code>ename</code> parameter was an event name, this is the handler function.</p>\n\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>If the <code>ename</code> parameter was an event name, this is the scope (<code>this</code> reference)\nin which the handler function is executed.</p>\n\n</div></li><li><span class='pre'>options</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>If the <code>ename</code> parameter was an event name, this is the\n<a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">addListener</a> options.</p>\n\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p><strong>Only when the <code>destroyable</code> option is specified. </strong></p>\n\n\n\n\n<p> A <code>Destroyable</code> object. An object which implements the <code>destroy</code> method which removes all listeners added in this call. For example:</p>\n\n\n\n\n<pre><code>this.btnListeners = = myButton.mon({\n destroyable: true\n mouseover: function() { console.log('mouseover'); },\n mouseout: function() { console.log('mouseout'); },\n click: function() { console.log('click'); }\n});\n</code></pre>\n\n\n\n\n<p>And when those listeners need to be removed:</p>\n\n\n\n\n<pre><code><a href=\"#!/api/Ext-method-destroy\" rel=\"Ext-method-destroy\" class=\"docClass\">Ext.destroy</a>(this.btnListeners);\n</code></pre>\n\n\n\n\n<p>or</p>\n\n\n\n\n<pre><code>this.btnListeners.destroy();\n</code></pre>\n\n</div></li></ul></div></div></div><div id='method-addOverCls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-addOverCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-addOverCls' class='name expandable'>addOverCls</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'><p></debug></p>\n</div></div></div><div id='method-addPlugin' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-addPlugin' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-addPlugin' class='name expandable'>addPlugin</a>( <span class='pre'>plugin</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Adds a plugin. ...</div><div class='long'><p>Adds a plugin. May be called at any time in the component's lifecycle.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>plugin</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-addPropertyToState' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-addPropertyToState' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-addPropertyToState' class='name expandable'>addPropertyToState</a>( <span class='pre'>state, propName, [value]</span> ) : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><strong class='protected signature' >protected</strong></div><div class='description'><div class='short'>Save a property to the given state object if it is not its default or configured\nvalue. ...</div><div class='long'><p>Save a property to the given state object if it is not its default or configured\nvalue.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>state</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The state object.</p>\n</div></li><li><span class='pre'>propName</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The name of the property on this object to save.</p>\n</div></li><li><span class='pre'>value</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a> (optional)<div class='sub-desc'><p>The value of the state property (defaults to <code>this[propName]</code>).</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'><p>The state object or a new object if state was <code>null</code> and the property\nwas saved.</p>\n</div></li></ul></div></div></div><div id='method-addStateEvents' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.state.Stateful' rel='Ext.state.Stateful' class='defined-in docClass'>Ext.state.Stateful</a><br/><a href='source/Stateful.html#Ext-state-Stateful-method-addStateEvents' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.state.Stateful-method-addStateEvents' class='name expandable'>addStateEvents</a>( <span class='pre'>events</span> )</div><div class='description'><div class='short'>Add events that will trigger the state to be saved. ...</div><div class='long'><p>Add events that will trigger the state to be saved. If the first argument is an\narray, each element of that array is the name of a state event. Otherwise, each\nargument passed to this method is the name of a state event.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>events</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>[]<div class='sub-desc'><p>The event name or an array of event names.</p>\n</div></li></ul></div></div></div><div id='method-addUIClsToElement' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-addUIClsToElement' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-addUIClsToElement' class='name expandable'>addUIClsToElement</a>( <span class='pre'>ui</span> )</div><div class='description'><div class='short'>Method which adds a specified UI + uiCls to the components element. ...</div><div class='long'><p>Method which adds a specified UI + <code>uiCls</code> to the components element. Can be overridden to remove the UI from more\nthan just the components element.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>ui</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The UI to remove from the element.</p>\n</div></li></ul></div></div></div><div id='method-addUIToElement' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-addUIToElement' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-addUIToElement' class='name expandable'>addUIToElement</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Method which adds a specified UI to the components element. ...</div><div class='long'><p>Method which adds a specified UI to the components element.</p>\n</div></div></div><div id='method-adjustForConstraints' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='defined-in docClass'>Ext.util.Positionable</a><br/><a href='source/Positionable.html#Ext-util-Positionable-method-adjustForConstraints' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Positionable-method-adjustForConstraints' class='name expandable'>adjustForConstraints</a>( <span class='pre'>xy, parent</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>private ==> used outside of core\nTODO: currently only used by ToolTip. ...</div><div class='long'><p>private ==> used outside of core\nTODO: currently only used by ToolTip. does this method belong here?</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>xy</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>parent</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-adjustPosition' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-adjustPosition' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-adjustPosition' class='name expandable'>adjustPosition</a>( <span class='pre'>x, y</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>x</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>y</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-afterComponentLayout' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-afterComponentLayout' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-afterComponentLayout' class='name expandable'>afterComponentLayout</a>( <span class='pre'>width, height, oldWidth, oldHeight</span> )<strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>Called by the layout system after the Component has been laid out. ...</div><div class='long'><p>Called by the layout system after the Component has been laid out.</p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>width</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The width that was set</p>\n</div></li><li><span class='pre'>height</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The height that was set</p>\n</div></li><li><span class='pre'>oldWidth</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/undefined<div class='sub-desc'><p>The old width, or <code>undefined</code> if this was the initial layout.</p>\n</div></li><li><span class='pre'>oldHeight</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/undefined<div class='sub-desc'><p>The old height, or <code>undefined</code> if this was the initial layout.</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.Component-method-afterComponentLayout' rel='Ext.Component-method-afterComponentLayout' class='docClass'>Ext.Component.afterComponentLayout</a></p></div></div></div><div id='method-afterFirstLayout' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-afterFirstLayout' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-afterFirstLayout' class='name expandable'>afterFirstLayout</a>( <span class='pre'>width, height</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>width</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>height</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-afterHide' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-afterHide' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-afterHide' class='name expandable'>afterHide</a>( <span class='pre'>[callback], [scope]</span> )<strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>Invoked after the Component has been hidden. ...</div><div class='long'><p>Invoked after the Component has been hidden.</p>\n\n<p>Gets passed the same <code>callback</code> and <code>scope</code> parameters that <a href=\"#!/api/Ext.Component-method-onHide\" rel=\"Ext.Component-method-onHide\" class=\"docClass\">onHide</a> received.</p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>callback</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a> (optional)<div class='sub-desc'>\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-afterLayout' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-afterLayout' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-afterLayout' class='name expandable'>afterLayout</a>( <span class='pre'>layout</span> )<strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>Invoked after the Container has laid out (and rendered if necessary)\nits child Components. ...</div><div class='long'><p>Invoked after the Container has laid out (and rendered if necessary)\nits child Components.</p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>layout</span> : <a href=\"#!/api/Ext.layout.container.Container\" rel=\"Ext.layout.container.Container\" class=\"docClass\">Ext.layout.container.Container</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-afterRender' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-afterRender' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-afterRender' class='name expandable'>afterRender</a>( <span class='pre'></span> )<strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>Allows addition of behavior after rendering is complete. ...</div><div class='long'><p>Allows addition of behavior after rendering is complete. At this stage the Component’s Element\nwill have been styled according to the configuration, will have had any configured CSS class\nnames added, and will be in the configured visibility and the configured enable state.</p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<p>Overrides: <a href='#!/api/Ext.util.Renderable-method-afterRender' rel='Ext.util.Renderable-method-afterRender' class='docClass'>Ext.util.Renderable.afterRender</a></p></div></div></div><div id='method-afterSetPosition' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-afterSetPosition' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-afterSetPosition' class='name expandable'>afterSetPosition</a>( <span class='pre'>x, y</span> )<strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>Template method called after a Component has been positioned. ...</div><div class='long'><p>Template method called after a Component has been positioned.</p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>x</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'>\n</div></li><li><span class='pre'>y</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.AbstractComponent-method-afterSetPosition' rel='Ext.AbstractComponent-method-afterSetPosition' class='docClass'>Ext.AbstractComponent.afterSetPosition</a></p></div></div></div><div id='method-afterShow' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-afterShow' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-afterShow' class='name expandable'>afterShow</a>( <span class='pre'>[animateTarget], [callback], [scope]</span> )<strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>Invoked after the Component is shown (after onShow is called). ...</div><div class='long'><p>Invoked after the Component is shown (after <a href=\"#!/api/Ext.Component-method-onShow\" rel=\"Ext.Component-method-onShow\" class=\"docClass\">onShow</a> is called).</p>\n\n<p>Gets passed the same parameters as <a href=\"#!/api/Ext.Component-method-show\" rel=\"Ext.Component-method-show\" class=\"docClass\">show</a>.</p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>animateTarget</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a> (optional)<div class='sub-desc'>\n</div></li><li><span class='pre'>callback</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a> (optional)<div class='sub-desc'>\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-alignTo' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='defined-in docClass'>Ext.util.Positionable</a><br/><a href='source/Positionable.html#Ext-util-Positionable-method-alignTo' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Positionable-method-alignTo' class='name expandable'>alignTo</a>( <span class='pre'>element, [position], [offsets], [animate]</span> ) : <a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Aligns the element with another element relative to the specified anchor points. ...</div><div class='long'><p>Aligns the element with another element relative to the specified anchor points. If\nthe other element is the document it aligns it to the viewport. The position\nparameter is optional, and can be specified in any one of the following formats:</p>\n\n<ul>\n<li><strong>Blank</strong>: Defaults to aligning the element's top-left corner to the target's\nbottom-left corner (\"tl-bl\").</li>\n<li><strong>One anchor (deprecated)</strong>: The passed anchor position is used as the target\nelement's anchor point. The element being aligned will position its top-left\ncorner (tl) to that point. <em>This method has been deprecated in favor of the newer\ntwo anchor syntax below</em>.</li>\n<li><strong>Two anchors</strong>: If two values from the table below are passed separated by a dash,\nthe first value is used as the element's anchor point, and the second value is\nused as the target's anchor point.</li>\n</ul>\n\n\n<p>In addition to the anchor points, the position parameter also supports the \"?\"\ncharacter. If \"?\" is passed at the end of the position string, the element will\nattempt to align as specified, but the position will be adjusted to constrain to\nthe viewport if necessary. Note that the element being aligned might be swapped to\nalign to a different position than that specified in order to enforce the viewport\nconstraints. Following are all of the supported anchor positions:</p>\n\n<pre>Value Description\n----- -----------------------------\ntl The top left corner (default)\nt The center of the top edge\ntr The top right corner\nl The center of the left edge\nc In the center of the element\nr The center of the right edge\nbl The bottom left corner\nb The center of the bottom edge\nbr The bottom right corner\n</pre>\n\n\n<p>Example Usage:</p>\n\n<pre><code>// align el to other-el using the default positioning\n// (\"tl-bl\", non-constrained)\nel.alignTo(\"other-el\");\n\n// align the top left corner of el with the top right corner of other-el\n// (constrained to viewport)\nel.alignTo(\"other-el\", \"tr?\");\n\n// align the bottom right corner of el with the center left edge of other-el\nel.alignTo(\"other-el\", \"br-l?\");\n\n// align the center of el with the bottom left corner of other-el and\n// adjust the x position by -6 pixels (and the y position by 0)\nel.alignTo(\"other-el\", \"c-bl\", [-6, 0]);\n</code></pre>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>element</span> : <a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a>/HTMLElement/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The Positionable,\nHTMLElement, or id of the element to align to.</p>\n</div></li><li><span class='pre'>position</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a> (optional)<div class='sub-desc'><p>The position to align to</p>\n<p>Defaults to: <code>"tl-bl?"</code></p></div></li><li><span class='pre'>offsets</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[] (optional)<div class='sub-desc'><p>Offset the positioning by [x, y]</p>\n</div></li><li><span class='pre'>animate</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>true for the default animation or a standard\nElement animation config object</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-anchorTo' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='defined-in docClass'>Ext.util.Positionable</a><br/><a href='source/Positionable.html#Ext-util-Positionable-method-anchorTo' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Positionable-method-anchorTo' class='name expandable'>anchorTo</a>( <span class='pre'>element, [position], [offsets], [animate], [monitorScroll], [callback]</span> ) : <a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Anchors an element to another element and realigns it when the window is resized. ...</div><div class='long'><p>Anchors an element to another element and realigns it when the window is resized.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>element</span> : <a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a>/HTMLElement/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The Positionable,\nHTMLElement, or id of the element to align to.</p>\n</div></li><li><span class='pre'>position</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a> (optional)<div class='sub-desc'><p>The position to align to</p>\n<p>Defaults to: <code>"tl-bl?"</code></p></div></li><li><span class='pre'>offsets</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[] (optional)<div class='sub-desc'><p>Offset the positioning by [x, y]</p>\n</div></li><li><span class='pre'>animate</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>true for the default animation or a standard\nElement animation config object</p>\n</div></li><li><span class='pre'>monitorScroll</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a>/<a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a> (optional)<div class='sub-desc'><p>True to monitor body scroll and\nreposition. If this parameter is a number, it is used as the buffer delay in\nmilliseconds.</p>\n<p>Defaults to: <code>50</code></p></div></li><li><span class='pre'>callback</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a> (optional)<div class='sub-desc'><p>The function to call after the animation finishes</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-anim' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Animate' rel='Ext.util.Animate' class='defined-in docClass'>Ext.util.Animate</a><br/><a href='source/Animate.html#Ext-util-Animate-method-anim' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Animate-method-anim' class='name expandable'>anim</a>( <span class='pre'>config</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>process the passed fx configuration. ...</div><div class='long'><ul>\n<li>process the passed fx configuration.</li>\n</ul>\n\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>config</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-animate' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-animate' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-animate' class='name expandable'>animate</a>( <span class='pre'>config</span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></div><div class='description'><div class='short'>Performs custom animation on this object. ...</div><div class='long'><p>Performs custom animation on this object.</p>\n\n<p>This method is applicable to both the <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Component</a> class and the <a href=\"#!/api/Ext.draw.Sprite\" rel=\"Ext.draw.Sprite\" class=\"docClass\">Sprite</a>\nclass. It performs animated transitions of certain properties of this object over a specified timeline.</p>\n\n<h3>Animating a <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Component</a></h3>\n\n<p>When animating a Component, the following properties may be specified in <code>from</code>, <code>to</code>, and <code>keyframe</code> objects:</p>\n\n<ul>\n<li><p><code>x</code> - The Component's page X position in pixels.</p></li>\n<li><p><code>y</code> - The Component's page Y position in pixels</p></li>\n<li><p><code>left</code> - The Component's <code>left</code> value in pixels.</p></li>\n<li><p><code>top</code> - The Component's <code>top</code> value in pixels.</p></li>\n<li><p><code>width</code> - The Component's <code>width</code> value in pixels.</p></li>\n<li><p><code>height</code> - The Component's <code>height</code> value in pixels.</p></li>\n<li><p><code>dynamic</code> - Specify as true to update the Component's layout (if it is a Container) at every frame of the animation.\n<em>Use sparingly as laying out on every intermediate size change is an expensive operation.</em></p></li>\n</ul>\n\n\n<p>For example, to animate a Window to a new size, ensuring that its internal layout and any shadow is correct:</p>\n\n<pre><code>myWindow = <a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('<a href=\"#!/api/Ext.window.Window\" rel=\"Ext.window.Window\" class=\"docClass\">Ext.window.Window</a>', {\n title: 'Test Component animation',\n width: 500,\n height: 300,\n layout: {\n type: 'hbox',\n align: 'stretch'\n },\n items: [{\n title: 'Left: 33%',\n margins: '5 0 5 5',\n flex: 1\n }, {\n title: 'Left: 66%',\n margins: '5 5 5 5',\n flex: 2\n }]\n});\nmyWindow.show();\nmyWindow.header.el.on('click', function() {\n myWindow.animate({\n to: {\n width: (myWindow.getWidth() == 500) ? 700 : 500,\n height: (myWindow.getHeight() == 300) ? 400 : 300\n }\n });\n});\n</code></pre>\n\n<p>For performance reasons, by default, the internal layout is only updated when the Window reaches its final <code>\"to\"</code>\nsize. If dynamic updating of the Window's child Components is required, then configure the animation with\n<code>dynamic: true</code> and the two child items will maintain their proportions during the animation.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>config</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>Configuration for <a href=\"#!/api/Ext.fx.Anim\" rel=\"Ext.fx.Anim\" class=\"docClass\">Ext.fx.Anim</a>.\nNote that the <a href=\"#!/api/Ext.fx.Anim-cfg-to\" rel=\"Ext.fx.Anim-cfg-to\" class=\"docClass\">to</a> config is required.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.util.Animate-method-animate' rel='Ext.util.Animate-method-animate' class='docClass'>Ext.util.Animate.animate</a></p></div></div></div><div id='method-applyChildEls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.ElementContainer' rel='Ext.util.ElementContainer' class='defined-in docClass'>Ext.util.ElementContainer</a><br/><a href='source/ElementContainer.html#Ext-util-ElementContainer-method-applyChildEls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.ElementContainer-method-applyChildEls' class='name expandable'>applyChildEls</a>( <span class='pre'>el, id</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Sets references to elements inside the component. ...</div><div class='long'><p>Sets references to elements inside the component.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>el</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>id</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-applyDefaults' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-method-applyDefaults' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-method-applyDefaults' class='name expandable'>applyDefaults</a>( <span class='pre'>c</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>c</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.container.AbstractContainer-method-applyDefaults' rel='Ext.container.AbstractContainer-method-applyDefaults' class='docClass'>Ext.container.AbstractContainer.applyDefaults</a></p></div></div></div><div id='method-applyRenderSelectors' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-applyRenderSelectors' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-applyRenderSelectors' class='name expandable'>applyRenderSelectors</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Sets references to elements inside the component. ...</div><div class='long'><p>Sets references to elements inside the component. This applies <a href=\"#!/api/Ext.AbstractComponent-cfg-renderSelectors\" rel=\"Ext.AbstractComponent-cfg-renderSelectors\" class=\"docClass\">renderSelectors</a>\nas well as <a href=\"#!/api/Ext.AbstractComponent-cfg-childEls\" rel=\"Ext.AbstractComponent-cfg-childEls\" class=\"docClass\">childEls</a>.</p>\n</div></div></div><div id='method-applyState' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.state.Stateful' rel='Ext.state.Stateful' class='defined-in docClass'>Ext.state.Stateful</a><br/><a href='source/Stateful.html#Ext-state-Stateful-method-applyState' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.state.Stateful-method-applyState' class='name expandable'>applyState</a>( <span class='pre'>state</span> )</div><div class='description'><div class='short'>Applies the state to the object. ...</div><div class='long'><p>Applies the state to the object. This should be overridden in subclasses to do\nmore complex state operations. By default it applies the state properties onto\nthe current object.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>state</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The state</p>\n</div></li></ul></div></div></div><div id='method-applyTargetCls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-applyTargetCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-applyTargetCls' class='name expandable'>applyTargetCls</a>( <span class='pre'>targetCls</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>The targetCls is a CSS class that the layout needs added to the targetEl. ...</div><div class='long'><p>The targetCls is a CSS class that the layout needs added to the targetEl. The targetEl is where the container's\nchildren are rendered and is usually just the main el. Some containers (e.g. panels) use a body instead.</p>\n\n<p>In general, if a class overrides getTargetEl it will also need to override this method. This is necessary to\navoid a post-render step to add the targetCls.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>targetCls</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-beforeBlur' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-beforeBlur' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-beforeBlur' class='name expandable'>beforeBlur</a>( <span class='pre'>e</span> )<strong class='protected signature' >protected</strong></div><div class='description'><div class='short'>Template method to do any pre-blur processing. ...</div><div class='long'><p>Template method to do any pre-blur processing.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>e</span> : <a href=\"#!/api/Ext.EventObject\" rel=\"Ext.EventObject\" class=\"docClass\">Ext.EventObject</a><div class='sub-desc'><p>The event object</p>\n</div></li></ul></div></div></div><div id='method-beforeComponentLayout' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-beforeComponentLayout' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-beforeComponentLayout' class='name expandable'>beforeComponentLayout</a>( <span class='pre'>adjWidth, adjHeight</span> )<strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>Occurs before componentLayout is run. ...</div><div class='long'><p>Occurs before <code>componentLayout</code> is run. Returning <code>false</code> from this method will prevent the <code>componentLayout</code> from\nbeing executed.</p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>adjWidth</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The box-adjusted width that was set.</p>\n</div></li><li><span class='pre'>adjHeight</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The box-adjusted height that was set.</p>\n</div></li></ul></div></div></div><div id='method-beforeDestroy' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-beforeDestroy' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-beforeDestroy' class='name expandable'>beforeDestroy</a>( <span class='pre'></span> )<strong class='private signature' >private</strong><strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>Invoked before the Component is destroyed. ...</div><div class='long'><p>Invoked before the Component is destroyed.</p>\n <p>Available since: <b>2.3.0</b></p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<p>Overrides: <a href='#!/api/Ext.AbstractComponent-method-beforeDestroy' rel='Ext.AbstractComponent-method-beforeDestroy' class='docClass'>Ext.AbstractComponent.beforeDestroy</a></p></div></div></div><div id='method-beforeFocus' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-beforeFocus' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-beforeFocus' class='name expandable'>beforeFocus</a>( <span class='pre'>e</span> )<strong class='protected signature' >protected</strong></div><div class='description'><div class='short'>Template method to do any pre-focus processing. ...</div><div class='long'><p>Template method to do any pre-focus processing.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>e</span> : <a href=\"#!/api/Ext.EventObject\" rel=\"Ext.EventObject\" class=\"docClass\">Ext.EventObject</a><div class='sub-desc'><p>The event object</p>\n</div></li></ul></div></div></div><div id='method-beforeLayout' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-beforeLayout' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-beforeLayout' class='name expandable'>beforeLayout</a>( <span class='pre'></span> )<strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>Occurs before componentLayout is run. ...</div><div class='long'><p>Occurs before componentLayout is run. In previous releases, this method could\nreturn <code>false</code> to prevent its layout but that is not supported in Ext JS 4.1 or\nhigher. This method is simply a notification of the impending layout to give the\ncomponent a chance to adjust the DOM. Ideally, DOM reads should be avoided at this\ntime to reduce expensive document reflows.</p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<p>Overrides: <a href='#!/api/Ext.AbstractComponent-method-beforeLayout' rel='Ext.AbstractComponent-method-beforeLayout' class='docClass'>Ext.AbstractComponent.beforeLayout</a></p></div></div></div><div id='method-beforeRender' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-beforeRender' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-beforeRender' class='name expandable'>beforeRender</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Overrides: <a href='#!/api/Ext.Component-method-beforeRender' rel='Ext.Component-method-beforeRender' class='docClass'>Ext.Component.beforeRender</a></p></div></div></div><div id='method-beforeSetPosition' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-beforeSetPosition' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-beforeSetPosition' class='name expandable'>beforeSetPosition</a>( <span class='pre'>x, y, animate</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Template method called before a Component is positioned. ...</div><div class='long'><p>Template method called before a Component is positioned.</p>\n\n<p>Ensures that the position is adjusted so that the Component is constrained if so configured.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>x</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>y</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>animate</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.AbstractComponent-method-beforeSetPosition' rel='Ext.AbstractComponent-method-beforeSetPosition' class='docClass'>Ext.AbstractComponent.beforeSetPosition</a></p></div></div></div><div id='method-beforeShow' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-beforeShow' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-beforeShow' class='name expandable'>beforeShow</a>( <span class='pre'></span> )<strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>Invoked before the Component is shown. ...</div><div class='long'><p>Invoked before the Component is shown.</p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n</div></div></div><div id='method-blur' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-blur' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-blur' class='name expandable'>blur</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><strong class='chainable signature' >chainable</strong><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-bubble' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-bubble' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-bubble' class='name expandable'>bubble</a>( <span class='pre'>fn, [scope], [args]</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Bubbles up the component/container heirarchy, calling the specified function with each component. ...</div><div class='long'><p>Bubbles up the component/container heirarchy, calling the specified function with each component. The scope\n(<em>this</em>) of function call will be the scope provided or the current component. The arguments to the function will\nbe the args provided or the current component. If the function returns false at any point, the bubble is stopped.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>fn</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a><div class='sub-desc'><p>The function to call</p>\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>The scope of the function. Defaults to current node.</p>\n</div></li><li><span class='pre'>args</span> : <a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a> (optional)<div class='sub-desc'><p>The args to call the function with. Defaults to passing the current component.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-calculateAnchorXY' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='defined-in docClass'>Ext.util.Positionable</a><br/><a href='source/Positionable.html#Ext-util-Positionable-method-calculateAnchorXY' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Positionable-method-calculateAnchorXY' class='name expandable'>calculateAnchorXY</a>( <span class='pre'>[anchor], [extraX], [extraY], [size]</span> ) : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Calculates x,y coordinates specified by the anchor position on the element, adding\nextraX and extraY values. ...</div><div class='long'><p>Calculates x,y coordinates specified by the anchor position on the element, adding\nextraX and extraY values.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>anchor</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a> (optional)<div class='sub-desc'><p>The specified anchor position.\nSee <a href=\"#!/api/Ext.util.Positionable-method-alignTo\" rel=\"Ext.util.Positionable-method-alignTo\" class=\"docClass\">alignTo</a> for details on supported anchor positions.</p>\n<p>Defaults to: <code>'tl'</code></p></div></li><li><span class='pre'>extraX</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a> (optional)<div class='sub-desc'><p>value to be added to the x coordinate</p>\n</div></li><li><span class='pre'>extraY</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a> (optional)<div class='sub-desc'><p>value to be added to the y coordinate</p>\n</div></li><li><span class='pre'>size</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>An object containing the size to use for calculating anchor\nposition {width: (target width), height: (target height)} (defaults to the\nelement's current size)</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]</span><div class='sub-desc'><p>[x, y] An array containing the element's x and y coordinates</p>\n</div></li></ul></div></div></div><div id='method-calculateConstrainedPosition' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='defined-in docClass'>Ext.util.Positionable</a><br/><a href='source/Positionable.html#Ext-util-Positionable-method-calculateConstrainedPosition' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Positionable-method-calculateConstrainedPosition' class='name expandable'>calculateConstrainedPosition</a>( <span class='pre'>[constrainTo], [proposedPosition], [local], [proposedSize]</span> ) : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]</div><div class='description'><div class='short'>Calculates the new [x,y] position to move this Positionable into a constrain region. ...</div><div class='long'><p>Calculates the new [x,y] position to move this Positionable into a constrain region.</p>\n\n<p>By default, this Positionable is constrained to be within the container it was added to, or the element it was\nrendered to.</p>\n\n<p>Priority is given to constraining the top and left within the constraint.</p>\n\n<p>An alternative constraint may be passed.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>constrainTo</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/HTMLElement/<a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a>/<a href=\"#!/api/Ext.util.Region\" rel=\"Ext.util.Region\" class=\"docClass\">Ext.util.Region</a> (optional)<div class='sub-desc'><p>The Element or <a href=\"#!/api/Ext.util.Region\" rel=\"Ext.util.Region\" class=\"docClass\">Region</a>\ninto which this Component is to be constrained. Defaults to the element into which this Positionable\nwas rendered, or this Component's {@link <a href=\"#!/api/Ext.Component-cfg-constrainTo\" rel=\"Ext.Component-cfg-constrainTo\" class=\"docClass\">Ext.Component.constrainTo</a>.</p>\n</div></li><li><span class='pre'>proposedPosition</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[] (optional)<div class='sub-desc'><p>A proposed <code>[X, Y]</code> position to test for validity\nand to coerce into constraints instead of using this Positionable's current position.</p>\n</div></li><li><span class='pre'>local</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p>The proposedPosition is local <em>(relative to floatParent if a floating Component)</em></p>\n</div></li><li><span class='pre'>proposedSize</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[] (optional)<div class='sub-desc'><p>A proposed <code>[width, height]</code> size to use when calculating\nconstraints instead of using this Positionable's current size.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]</span><div class='sub-desc'><p><strong>If</strong> the element <em>needs</em> to be translated, the new <code>[X, Y]</code> position within\nconstraints if possible, giving priority to keeping the top and left edge in the constrain region.\nOtherwise, <code>false</code>.</p>\n</div></li></ul></div></div></div><div id='method-callOverridden' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-method-callOverridden' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-method-callOverridden' class='name expandable'>callOverridden</a>( <span class='pre'>args</span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><strong class='deprecated signature' >deprecated</strong><strong class='protected signature' >protected</strong></div><div class='description'><div class='short'>Call the original method that was previously overridden with override\n\nExt.define('My.Cat', {\n constructor: functi...</div><div class='long'><p>Call the original method that was previously overridden with <a href=\"#!/api/Ext.Base-static-method-override\" rel=\"Ext.Base-static-method-override\" class=\"docClass\">override</a></p>\n\n<pre><code><a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('My.Cat', {\n constructor: function() {\n alert(\"I'm a cat!\");\n }\n});\n\nMy.Cat.override({\n constructor: function() {\n alert(\"I'm going to be a cat!\");\n\n this.callOverridden();\n\n alert(\"Meeeeoooowwww\");\n }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n // alerts \"I'm a cat!\"\n // alerts \"Meeeeoooowwww\"\n</code></pre>\n <div class='signature-box deprecated'>\n <p>This method has been <strong>deprecated</strong> </p>\n <p>as of 4.1. Use <a href=\"#!/api/Ext.Base-method-callParent\" rel=\"Ext.Base-method-callParent\" class=\"docClass\">callParent</a> instead.</p>\n\n </div>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>args</span> : <a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a>/Arguments<div class='sub-desc'><p>The arguments, either an array or the <code>arguments</code> object\nfrom the current method, for example: <code>this.callOverridden(arguments)</code></p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p>Returns the result of calling the overridden method</p>\n</div></li></ul></div></div></div><div id='method-callParent' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-method-callParent' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-method-callParent' class='name expandable'>callParent</a>( <span class='pre'>args</span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><strong class='protected signature' >protected</strong></div><div class='description'><div class='short'>Call the \"parent\" method of the current method. ...</div><div class='long'><p>Call the \"parent\" method of the current method. That is the method previously\noverridden by derivation or by an override (see <a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>).</p>\n\n<pre><code> <a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('My.Base', {\n constructor: function (x) {\n this.x = x;\n },\n\n statics: {\n method: function (x) {\n return x;\n }\n }\n });\n\n <a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('My.Derived', {\n extend: 'My.Base',\n\n constructor: function () {\n this.callParent([21]);\n }\n });\n\n var obj = new My.Derived();\n\n alert(obj.x); // alerts 21\n</code></pre>\n\n<p>This can be used with an override as follows:</p>\n\n<pre><code> <a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('My.DerivedOverride', {\n override: 'My.Derived',\n\n constructor: function (x) {\n this.callParent([x*2]); // calls original My.Derived constructor\n }\n });\n\n var obj = new My.Derived();\n\n alert(obj.x); // now alerts 42\n</code></pre>\n\n<p>This also works with static methods.</p>\n\n<pre><code> <a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('My.Derived2', {\n extend: 'My.Base',\n\n statics: {\n method: function (x) {\n return this.callParent([x*2]); // calls My.Base.method\n }\n }\n });\n\n alert(My.Base.method(10); // alerts 10\n alert(My.Derived2.method(10); // alerts 20\n</code></pre>\n\n<p>Lastly, it also works with overridden static methods.</p>\n\n<pre><code> <a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('My.Derived2Override', {\n override: 'My.Derived2',\n\n statics: {\n method: function (x) {\n return this.callParent([x*2]); // calls My.Derived2.method\n }\n }\n });\n\n alert(My.Derived2.method(10); // now alerts 40\n</code></pre>\n\n<p>To override a method and replace it and also call the superclass method, use\n<a href=\"#!/api/Ext.Base-method-callSuper\" rel=\"Ext.Base-method-callSuper\" class=\"docClass\">callSuper</a>. This is often done to patch a method to fix a bug.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>args</span> : <a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a>/Arguments<div class='sub-desc'><p>The arguments, either an array or the <code>arguments</code> object\nfrom the current method, for example: <code>this.callParent(arguments)</code></p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p>Returns the result of calling the parent method</p>\n</div></li></ul></div></div></div><div id='method-callSuper' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-method-callSuper' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-method-callSuper' class='name expandable'>callSuper</a>( <span class='pre'>args</span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><strong class='protected signature' >protected</strong></div><div class='description'><div class='short'>This method is used by an override to call the superclass method but bypass any\noverridden method. ...</div><div class='long'><p>This method is used by an override to call the superclass method but bypass any\noverridden method. This is often done to \"patch\" a method that contains a bug\nbut for whatever reason cannot be fixed directly.</p>\n\n<p>Consider:</p>\n\n<pre><code> <a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('Ext.some.Class', {\n method: function () {\n console.log('Good');\n }\n });\n\n <a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('Ext.some.DerivedClass', {\n method: function () {\n console.log('Bad');\n\n // ... logic but with a bug ...\n\n this.callParent();\n }\n });\n</code></pre>\n\n<p>To patch the bug in <code>DerivedClass.method</code>, the typical solution is to create an\noverride:</p>\n\n<pre><code> <a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('App.paches.DerivedClass', {\n override: 'Ext.some.DerivedClass',\n\n method: function () {\n console.log('Fixed');\n\n // ... logic but with bug fixed ...\n\n this.callSuper();\n }\n });\n</code></pre>\n\n<p>The patch method cannot use <code>callParent</code> to call the superclass <code>method</code> since\nthat would call the overridden method containing the bug. In other words, the\nabove patch would only produce \"Fixed\" then \"Good\" in the console log, whereas,\nusing <code>callParent</code> would produce \"Fixed\" then \"Bad\" then \"Good\".</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>args</span> : <a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a>/Arguments<div class='sub-desc'><p>The arguments, either an array or the <code>arguments</code> object\nfrom the current method, for example: <code>this.callSuper(arguments)</code></p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p>Returns the result of calling the superclass method</p>\n</div></li></ul></div></div></div><div id='method-cancelFocus' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-cancelFocus' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-cancelFocus' class='name expandable'>cancelFocus</a>( <span class='pre'></span> )<strong class='protected signature' >protected</strong></div><div class='description'><div class='short'>Cancel any deferred focus on this component ...</div><div class='long'><p>Cancel any deferred focus on this component</p>\n</div></div></div><div id='method-captureArgs' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-captureArgs' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-captureArgs' class='name expandable'>captureArgs</a>( <span class='pre'>o, fn, scope</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>o</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>fn</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-cascade' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-cascade' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-cascade' class='name expandable'>cascade</a>( <span class='pre'>fn, [scope], [args]</span> ) : <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.Container</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Cascades down the component/container heirarchy from this component (passed in\nthe first call), calling the specified...</div><div class='long'><p>Cascades down the component/container heirarchy from this component (passed in\nthe first call), calling the specified function with each component. The scope\n(this reference) of the function call will be the scope provided or the current\ncomponent. The arguments to the function will be the args provided or the current\ncomponent. If the function returns false at any point, the cascade is stopped on\nthat branch.</p>\n <p>Available since: <b>2.3.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>fn</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a><div class='sub-desc'><p>The function to call</p>\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>The scope of the function (defaults to current component)</p>\n</div></li><li><span class='pre'>args</span> : <a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a> (optional)<div class='sub-desc'><p>The args to call the function with. The current component\nalways passed as the last argument.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.Container</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-center' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-method-center' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-method-center' class='name expandable'>center</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Center this Component in its container. ...</div><div class='long'><p>Center this Component in its container.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-child' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Queryable' rel='Ext.Queryable' class='defined-in docClass'>Ext.Queryable</a><br/><a href='source/Queryable.html#Ext-Queryable-method-child' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Queryable-method-child' class='name expandable'>child</a>( <span class='pre'>[selector]</span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></div><div class='description'><div class='short'>Retrieves the first direct child of this container which matches the passed selector or component. ...</div><div class='long'><p>Retrieves the first direct child of this container which matches the passed selector or component.\nThe passed in selector must comply with an <a href=\"#!/api/Ext.ComponentQuery\" rel=\"Ext.ComponentQuery\" class=\"docClass\">Ext.ComponentQuery</a> selector, or it can be an actual <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>selector</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> (optional)<div class='sub-desc'><p>An <a href=\"#!/api/Ext.ComponentQuery\" rel=\"Ext.ComponentQuery\" class=\"docClass\">Ext.ComponentQuery</a> selector. If no selector is\nspecified, the first child will be returned.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> The matching child <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> (or <code>null</code> if no match was found).</p>\n</div></li></ul></div></div></div><div id='method-clearListeners' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-clearListeners' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-clearListeners' class='name expandable'>clearListeners</a>( <span class='pre'></span> )</div><div class='description'><div class='short'>Removes all listeners for this object including the managed listeners ...</div><div class='long'><p>Removes all listeners for this object including the managed listeners</p>\n</div></div></div><div id='method-clearManagedListeners' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-clearManagedListeners' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-clearManagedListeners' class='name expandable'>clearManagedListeners</a>( <span class='pre'></span> )</div><div class='description'><div class='short'>Removes all managed listeners for this object. ...</div><div class='long'><p>Removes all managed listeners for this object.</p>\n</div></div></div><div id='method-clearStatus' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.statusbar.StatusBar'>Ext.ux.statusbar.StatusBar</span><br/><a href='source/StatusBar.html#Ext-ux-statusbar-StatusBar-method-clearStatus' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.statusbar.StatusBar-method-clearStatus' class='name expandable'>clearStatus</a>( <span class='pre'>[config]</span> ) : <a href=\"#!/api/Ext.ux.statusbar.StatusBar\" rel=\"Ext.ux.statusbar.StatusBar\" class=\"docClass\">Ext.ux.statusbar.StatusBar</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Clears the status text and iconCls. ...</div><div class='long'><p>Clears the status <a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-text\" rel=\"Ext.ux.statusbar.StatusBar-cfg-text\" class=\"docClass\">text</a> and <a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-iconCls\" rel=\"Ext.ux.statusbar.StatusBar-cfg-iconCls\" class=\"docClass\">iconCls</a>. Also supports clearing via an optional fade out animation.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>config</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>A config object containing any or all of the following properties. If this\nobject is not specified the status will be cleared using the defaults below:</p>\n<ul><li><span class='pre'>anim</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><div class='sub-desc'><p>True to clear the status by fading out the status element (defaults\nto false which clears immediately).</p>\n</div></li><li><span class='pre'>useDefaults</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><div class='sub-desc'><p>True to reset the text and icon using <a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-defaultText\" rel=\"Ext.ux.statusbar.StatusBar-cfg-defaultText\" class=\"docClass\">defaultText</a> and\n<a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-defaultIconCls\" rel=\"Ext.ux.statusbar.StatusBar-cfg-defaultIconCls\" class=\"docClass\">defaultIconCls</a> (defaults to false which sets the text to '' and removes any existing icon class).</p>\n</div></li></ul></div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.ux.statusbar.StatusBar\" rel=\"Ext.ux.statusbar.StatusBar\" class=\"docClass\">Ext.ux.statusbar.StatusBar</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-cloneConfig' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-cloneConfig' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-cloneConfig' class='name expandable'>cloneConfig</a>( <span class='pre'>overrides</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Clone the current component using the original config values passed into this instance by default. ...</div><div class='long'><p>Clone the current component using the original config values passed into this instance by default.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>overrides</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>A new config containing any properties to override in the cloned version.\nAn id property can be passed on this object, otherwise one will be generated to avoid duplicates.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>clone The cloned copy of this component</p>\n</div></li></ul></div></div></div><div id='method-configClass' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-method-configClass' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-method-configClass' class='name expandable'>configClass</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-constructPlugin' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-constructPlugin' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-constructPlugin' class='name expandable'>constructPlugin</a>( <span class='pre'>ptype</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>ptype</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>string or config object containing a ptype property.</p>\n\n<p>Constructs a plugin according to the passed config object/ptype string.</p>\n\n<p>Ensures that the constructed plugin always has a <code>cmp</code> reference back to this component.\nThe setting up of this is done in PluginManager. The PluginManager ensures that a reference to this\ncomponent is passed to the constructor. It also ensures that the plugin's <code>setCmp</code> method (if any) is called.</p>\n</div></li></ul></div></div></div><div id='method-constructPlugins' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-constructPlugins' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-constructPlugins' class='name expandable'>constructPlugins</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Returns an array of fully constructed plugin instances. ...</div><div class='long'><p>Returns an array of fully constructed plugin instances. This converts any configs into their\nappropriate instances.</p>\n\n<p>It does not mutate the plugins array. It creates a new array.</p>\n</div></div></div><div id='method-contains' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-contains' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-contains' class='name expandable'>contains</a>( <span class='pre'>comp, [deep]</span> ) : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></div><div class='description'><div class='short'>Determines whether the passed Component is either an immediate child of this Container,\nor whether it is a descendant. ...</div><div class='long'><p>Determines whether the passed Component is either an immediate child of this Container,\nor whether it is a descendant.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>comp</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'><p>The Component to test.</p>\n</div></li><li><span class='pre'>deep</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p>Pass <code>true</code> to test for the Component being a descendant at any level.</p>\n<p>Defaults to: <code>false</code></p></div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'><p><code>true</code> if the passed Component is contained at the specified level.</p>\n</div></li></ul></div></div></div><div id='method-continueFireEvent' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-continueFireEvent' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-continueFireEvent' class='name expandable'>continueFireEvent</a>( <span class='pre'>eventName, args, bubbles</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Continue to fire event. ...</div><div class='long'><p>Continue to fire event.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>eventName</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'>\n</div></li><li><span class='pre'>args</span> : <a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a><div class='sub-desc'>\n</div></li><li><span class='pre'>bubbles</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-convertPositionSpec' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent2.html#Ext-AbstractComponent-method-convertPositionSpec' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-convertPositionSpec' class='name expandable'>convertPositionSpec</a>( <span class='pre'>posSpec</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Defined in override Ext.rtl.AbstractComponent. ...</div><div class='long'><p><strong>Defined in override Ext.rtl.AbstractComponent.</strong></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>posSpec</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-createRelayer' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-createRelayer' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-createRelayer' class='name expandable'>createRelayer</a>( <span class='pre'>newName, [beginEnd]</span> ) : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a><strong class='private signature' >private</strong></div><div class='description'><div class='short'>Creates an event handling function which refires the event from this object as the passed event name. ...</div><div class='long'><p>Creates an event handling function which refires the event from this object as the passed event name.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>newName</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The name under which to refire the passed parameters.</p>\n</div></li><li><span class='pre'>beginEnd</span> : <a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a> (optional)<div class='sub-desc'><p>The caller can specify on which indices to slice.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a></span><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-deleteMembers' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-deleteMembers' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-deleteMembers' class='name expandable'>deleteMembers</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-destroy' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-method-destroy' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-method-destroy' class='name expandable'>destroy</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Overrides: <a href='#!/api/Ext.state.Stateful-method-destroy' rel='Ext.state.Stateful-method-destroy' class='docClass'>Ext.state.Stateful.destroy</a>, <a href='#!/api/Ext.util.ElementContainer-method-destroy' rel='Ext.util.ElementContainer-method-destroy' class='docClass'>Ext.util.ElementContainer.destroy</a>, <a href='#!/api/Ext.AbstractComponent-method-destroy' rel='Ext.AbstractComponent-method-destroy' class='docClass'>Ext.AbstractComponent.destroy</a>, <a href='#!/api/Ext.AbstractPlugin-method-destroy' rel='Ext.AbstractPlugin-method-destroy' class='docClass'>Ext.AbstractPlugin.destroy</a></p></div></div></div><div id='method-detachComponent' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-detachComponent' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-detachComponent' class='name expandable'>detachComponent</a>( <span class='pre'>component</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Detach a component from the DOM ...</div><div class='long'><p>Detach a component from the DOM</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>component</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-disable' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-disable' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-disable' class='name expandable'>disable</a>( <span class='pre'>[silent]</span> ) : <a href=\"#!/api/Ext.container.AbstractContainer\" rel=\"Ext.container.AbstractContainer\" class=\"docClass\">Ext.container.AbstractContainer</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Inherit docs\nDisable all immediate children that was previously disabled\nOverride disable because onDisable only gets...</div><div class='long'><p>Inherit docs\nDisable all immediate children that was previously disabled\nOverride disable because onDisable only gets called when rendered</p>\n\n<p>Disable the component.</p>\n <p>Available since: <b>1.1.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>silent</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p>Passing <code>true</code> will suppress the <code>disable</code> event from being fired.</p>\n<p>Defaults to: <code>false</code></p></div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.container.AbstractContainer\" rel=\"Ext.container.AbstractContainer\" class=\"docClass\">Ext.container.AbstractContainer</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.AbstractComponent-method-disable' rel='Ext.AbstractComponent-method-disable' class='docClass'>Ext.AbstractComponent.disable</a></p></div></div></div><div id='method-doApplyRenderTpl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-doApplyRenderTpl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-doApplyRenderTpl' class='name expandable'>doApplyRenderTpl</a>( <span class='pre'>out, values</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Called from the selected frame generation template to insert this Component's inner structure inside the framing stru...</div><div class='long'><p>Called from the selected frame generation template to insert this Component's inner structure inside the framing structure.</p>\n\n<p>When framing is used, a selected frame generation template is used as the primary template of the <a href=\"#!/api/Ext.util.Renderable-method-getElConfig\" rel=\"Ext.util.Renderable-method-getElConfig\" class=\"docClass\">getElConfig</a> instead\nof the configured <a href=\"#!/api/Ext.AbstractComponent-cfg-renderTpl\" rel=\"Ext.AbstractComponent-cfg-renderTpl\" class=\"docClass\">renderTpl</a>. The renderTpl is invoked by this method which is injected into the framing template.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>out</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>values</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-doAutoRender' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-doAutoRender' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-doAutoRender' class='name expandable'>doAutoRender</a>( <span class='pre'></span> )</div><div class='description'><div class='short'>Handles autoRender. ...</div><div class='long'><p>Handles autoRender.\nFloating Components may have an ownerCt. If they are asking to be constrained, constrain them within that\nownerCt, and have their z-index managed locally. Floating Components are always rendered to document.body</p>\n</div></div></div><div id='method-doComponentLayout' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-doComponentLayout' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-doComponentLayout' class='name expandable'>doComponentLayout</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>This method needs to be called whenever you change something on this component that requires the Component's\nlayout t...</div><div class='long'><p>This method needs to be called whenever you change something on this component that requires the Component's\nlayout to be recalculated.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-doConstrain' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-method-doConstrain' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-method-doConstrain' class='name expandable'>doConstrain</a>( <span class='pre'>[constrainTo]</span> )</div><div class='description'><div class='short'>Moves this floating Component into a constrain region. ...</div><div class='long'><p>Moves this floating Component into a constrain region.</p>\n\n<p>By default, this Component is constrained to be within the container it was added to, or the element it was\nrendered to.</p>\n\n<p>An alternative constraint may be passed.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>constrainTo</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/HTMLElement/<a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a>/<a href=\"#!/api/Ext.util.Region\" rel=\"Ext.util.Region\" class=\"docClass\">Ext.util.Region</a> (optional)<div class='sub-desc'><p>The Element or <a href=\"#!/api/Ext.util.Region\" rel=\"Ext.util.Region\" class=\"docClass\">Region</a>\ninto which this Component is to be constrained. Defaults to the element into which this floating Component\nwas rendered.</p>\n</div></li></ul></div></div></div><div id='method-doLayout' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-doLayout' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-doLayout' class='name expandable'>doLayout</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Manually force this container's layout to be recalculated. ...</div><div class='long'><p>Manually force this container's layout to be recalculated. The framework uses this internally to refresh layouts\nform most cases.</p>\n <p>Available since: <b>2.3.0</b></p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-doRemove' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-doRemove' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-doRemove' class='name expandable'>doRemove</a>( <span class='pre'>component, doDestroy</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>component</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>doDestroy</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-doRenderContent' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-doRenderContent' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-doRenderContent' class='name expandable'>doRenderContent</a>( <span class='pre'>out, renderData</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>out</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>renderData</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-doRenderFramingDockedItems' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-doRenderFramingDockedItems' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-doRenderFramingDockedItems' class='name expandable'>doRenderFramingDockedItems</a>( <span class='pre'>out, renderData, after</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>out</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>renderData</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>after</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-down' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Queryable' rel='Ext.Queryable' class='defined-in docClass'>Ext.Queryable</a><br/><a href='source/Queryable.html#Ext-Queryable-method-down' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Queryable-method-down' class='name expandable'>down</a>( <span class='pre'>[selector]</span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></div><div class='description'><div class='short'>Retrieves the first descendant of this container which matches the passed selector. ...</div><div class='long'><p>Retrieves the first descendant of this container which matches the passed selector.\nThe passed in selector must comply with an <a href=\"#!/api/Ext.ComponentQuery\" rel=\"Ext.ComponentQuery\" class=\"docClass\">Ext.ComponentQuery</a> selector, or it can be an actual <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>selector</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> (optional)<div class='sub-desc'><p>An <a href=\"#!/api/Ext.ComponentQuery\" rel=\"Ext.ComponentQuery\" class=\"docClass\">Ext.ComponentQuery</a> selector or <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>. If no selector is\nspecified, the first child will be returned.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> The matching descendant <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> (or <code>null</code> if no match was found).</p>\n</div></li></ul></div></div></div><div id='method-enable' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-enable' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-enable' class='name expandable'>enable</a>( <span class='pre'>[silent]</span> ) : <a href=\"#!/api/Ext.container.AbstractContainer\" rel=\"Ext.container.AbstractContainer\" class=\"docClass\">Ext.container.AbstractContainer</a><strong class='chainable signature' >chainable</strong><strong class='private signature' >private</strong></div><div class='description'><div class='short'>Enable all immediate children that was previously disabled\nOverride enable because onEnable only gets called when ren...</div><div class='long'><p>Enable all immediate children that was previously disabled\nOverride enable because onEnable only gets called when rendered</p>\n\n<p>Enable the component</p>\n <p>Available since: <b>1.1.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>silent</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p>Passing <code>true</code> will suppress the <code>enable</code> event from being fired.</p>\n<p>Defaults to: <code>false</code></p></div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.container.AbstractContainer\" rel=\"Ext.container.AbstractContainer\" class=\"docClass\">Ext.container.AbstractContainer</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.AbstractComponent-method-enable' rel='Ext.AbstractComponent-method-enable' class='docClass'>Ext.AbstractComponent.enable</a></p></div></div></div><div id='method-enableBubble' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-enableBubble' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-enableBubble' class='name expandable'>enableBubble</a>( <span class='pre'>eventNames</span> )</div><div class='description'><div class='short'>Enables events fired by this Observable to bubble up an owner hierarchy by calling this.getBubbleTarget() if\npresent. ...</div><div class='long'><p>Enables events fired by this Observable to bubble up an owner hierarchy by calling <code>this.getBubbleTarget()</code> if\npresent. There is no implementation in the Observable base class.</p>\n\n<p>This is commonly used by Ext.Components to bubble events to owner Containers.\nSee <a href=\"#!/api/Ext.Component-method-getBubbleTarget\" rel=\"Ext.Component-method-getBubbleTarget\" class=\"docClass\">Ext.Component.getBubbleTarget</a>. The default implementation in <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> returns the\nComponent's immediate owner. But if a known target is required, this can be overridden to access the\nrequired target more quickly.</p>\n\n<p>Example:</p>\n\n<pre><code><a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('Ext.overrides.form.field.Base', {\n override: '<a href=\"#!/api/Ext.form.field.Base\" rel=\"Ext.form.field.Base\" class=\"docClass\">Ext.form.field.Base</a>',\n\n // Add functionality to Field's initComponent to enable the change event to bubble\n initComponent: function () {\n this.callParent();\n this.enableBubble('change');\n }\n});\n\nvar myForm = <a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('<a href=\"#!/api/Ext.form.Panel\" rel=\"Ext.form.Panel\" class=\"docClass\">Ext.form.Panel</a>', {\n title: 'User Details',\n items: [{\n ...\n }],\n listeners: {\n change: function() {\n // Title goes red if form has been modified.\n myForm.header.setStyle('color', 'red');\n }\n }\n});\n</code></pre>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>eventNames</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>[]<div class='sub-desc'><p>The event name to bubble, or an Array of event names.</p>\n</div></li></ul></div></div></div><div id='method-ensureAttachedToBody' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-ensureAttachedToBody' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-ensureAttachedToBody' class='name expandable'>ensureAttachedToBody</a>( <span class='pre'>[runLayout]</span> )</div><div class='description'><div class='short'>Ensures that this component is attached to document.body. ...</div><div class='long'><p>Ensures that this component is attached to <code>document.body</code>. If the component was\nrendered to <a href=\"#!/api/Ext-method-getDetachedBody\" rel=\"Ext-method-getDetachedBody\" class=\"docClass\">Ext.getDetachedBody</a>, then it will be appended to <code>document.body</code>.\nAny configured position is also restored.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>runLayout</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p>True to run the component's layout.</p>\n<p>Defaults to: <code>false</code></p></div></li></ul></div></div></div><div id='method-findParentBy' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-findParentBy' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-findParentBy' class='name expandable'>findParentBy</a>( <span class='pre'>fn</span> ) : <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a></div><div class='description'><div class='short'>Find a container above this component at any level by a custom function. ...</div><div class='long'><p>Find a container above this component at any level by a custom function. If the passed function returns true, the\ncontainer will be returned.</p>\n\n<p>See also the <a href=\"#!/api/Ext.Component-method-up\" rel=\"Ext.Component-method-up\" class=\"docClass\">up</a> method.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>fn</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a><div class='sub-desc'><p>The custom function to call with the arguments (container, this component).</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a></span><div class='sub-desc'><p>The first Container for which the custom function returns true</p>\n</div></li></ul></div></div></div><div id='method-findParentByType' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-findParentByType' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-findParentByType' class='name expandable'>findParentByType</a>( <span class='pre'>xtype</span> ) : <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a></div><div class='description'><div class='short'>Find a container above this component at any level by xtype or class\n\nSee also the up method. ...</div><div class='long'><p>Find a container above this component at any level by xtype or class</p>\n\n<p>See also the <a href=\"#!/api/Ext.Component-method-up\" rel=\"Ext.Component-method-up\" class=\"docClass\">up</a> method.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>xtype</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Ext.Class\" rel=\"Ext.Class\" class=\"docClass\">Ext.Class</a><div class='sub-desc'><p>The xtype string for a component, or the class of the component directly</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a></span><div class='sub-desc'><p>The first Container which matches the given xtype or class</p>\n</div></li></ul></div></div></div><div id='method-findPlugin' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-findPlugin' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-findPlugin' class='name expandable'>findPlugin</a>( <span class='pre'>ptype</span> ) : <a href=\"#!/api/Ext.AbstractPlugin\" rel=\"Ext.AbstractPlugin\" class=\"docClass\">Ext.AbstractPlugin</a></div><div class='description'><div class='short'>Retrieves plugin from this component's collection by its ptype. ...</div><div class='long'><p>Retrieves plugin from this component's collection by its <code>ptype</code>.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>ptype</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The Plugin's ptype as specified by the class's <code>alias</code> configuration.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.AbstractPlugin\" rel=\"Ext.AbstractPlugin\" class=\"docClass\">Ext.AbstractPlugin</a></span><div class='sub-desc'><p>plugin instance.</p>\n</div></li></ul></div></div></div><div id='method-finishRender' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-finishRender' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-finishRender' class='name expandable'>finishRender</a>( <span class='pre'>containerIdx</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>This method visits the rendered component tree in a \"top-down\" order. ...</div><div class='long'><p>This method visits the rendered component tree in a \"top-down\" order. That is, this\ncode runs on a parent component before running on a child. This method calls the\n<a href=\"#!/api/Ext.util.Renderable-method-onRender\" rel=\"Ext.util.Renderable-method-onRender\" class=\"docClass\">onRender</a> method of each component.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>containerIdx</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The index into the Container items of this Component.</p>\n</div></li></ul></div></div></div><div id='method-finishRenderChildren' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-finishRenderChildren' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-finishRenderChildren' class='name expandable'>finishRenderChildren</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Overrides: <a href='#!/api/Ext.util.Renderable-method-finishRenderChildren' rel='Ext.util.Renderable-method-finishRenderChildren' class='docClass'>Ext.util.Renderable.finishRenderChildren</a></p></div></div></div><div id='method-fireEvent' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-fireEvent' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-fireEvent' class='name expandable'>fireEvent</a>( <span class='pre'>eventName, args</span> ) : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></div><div class='description'><div class='short'>Fires the specified event with the passed parameters (minus the event name, plus the options object passed\nto addList...</div><div class='long'><p>Fires the specified event with the passed parameters (minus the event name, plus the <code>options</code> object passed\nto <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">addListener</a>).</p>\n\n<p>An event may be set to bubble up an Observable parent hierarchy (See <a href=\"#!/api/Ext.Component-method-getBubbleTarget\" rel=\"Ext.Component-method-getBubbleTarget\" class=\"docClass\">Ext.Component.getBubbleTarget</a>) by\ncalling <a href=\"#!/api/Ext.util.Observable-method-enableBubble\" rel=\"Ext.util.Observable-method-enableBubble\" class=\"docClass\">enableBubble</a>.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>eventName</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The name of the event to fire.</p>\n</div></li><li><span class='pre'>args</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>...<div class='sub-desc'><p>Variable number of parameters are passed to handlers.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'><p>returns false if any of the handlers return false otherwise it returns true.</p>\n</div></li></ul></div></div></div><div id='method-fireEventArgs' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-fireEventArgs' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-fireEventArgs' class='name expandable'>fireEventArgs</a>( <span class='pre'>eventName, args</span> ) : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></div><div class='description'><div class='short'>Fires the specified event with the passed parameter list. ...</div><div class='long'><p>Fires the specified event with the passed parameter list.</p>\n\n<p>An event may be set to bubble up an Observable parent hierarchy (See <a href=\"#!/api/Ext.Component-method-getBubbleTarget\" rel=\"Ext.Component-method-getBubbleTarget\" class=\"docClass\">Ext.Component.getBubbleTarget</a>) by\ncalling <a href=\"#!/api/Ext.util.Observable-method-enableBubble\" rel=\"Ext.util.Observable-method-enableBubble\" class=\"docClass\">enableBubble</a>.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>eventName</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The name of the event to fire.</p>\n</div></li><li><span class='pre'>args</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>[]<div class='sub-desc'><p>An array of parameters which are passed to handlers.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'><p>returns false if any of the handlers return false otherwise it returns true.</p>\n</div></li></ul></div></div></div><div id='method-fireHierarchyEvent' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-fireHierarchyEvent' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-fireHierarchyEvent' class='name expandable'>fireHierarchyEvent</a>( <span class='pre'>ename</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>For more information on the hierarchy events, see the note for the\nhierarchyEventSource observer defined in the onCla...</div><div class='long'><p>For more information on the hierarchy events, see the note for the\nhierarchyEventSource observer defined in the onClassCreated callback.</p>\n\n<p>This functionality is contained in Component (as opposed to Container)\nbecause a Component can be the ownerCt for a floating component (loadmask),\nand the loadmask needs to know when its owner is shown/hidden via the\nhierarchyEventSource so that its hidden state can be synchronized.</p>\n\n<p>TODO: merge this functionality with <a href=\"#!/api/Ext-property-globalEvents\" rel=\"Ext-property-globalEvents\" class=\"docClass\">Ext.globalEvents</a></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>ename</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-fitContainer' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-method-fitContainer' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-method-fitContainer' class='name expandable'>fitContainer</a>( <span class='pre'>animate</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>animate</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-focus' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-focus' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-focus' class='name expandable'>focus</a>( <span class='pre'>[selectText], [delay], [callback], [scope]</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Try to focus this component. ...</div><div class='long'><p>Try to focus this component.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>selectText</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p>If applicable, true to also select the text in this component</p>\n</div></li><li><span class='pre'>delay</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a>/<a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a> (optional)<div class='sub-desc'><p>Delay the focus this number of milliseconds (true for 10 milliseconds).</p>\n</div></li><li><span class='pre'>callback</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a> (optional)<div class='sub-desc'><p>Only needed if the <code>delay</code> parameter is used. A function to call upon focus.</p>\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a> (optional)<div class='sub-desc'><p>Only needed if the <code>delay</code> parameter is used. The scope (<code>this</code> reference) in which to execute the callback.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>The focused Component. Usually <code>this</code> Component. Some Containers may\ndelegate focus to a descendant Component (<a href=\"#!/api/Ext.window.Window\" rel=\"Ext.window.Window\" class=\"docClass\">Window</a>s can do this through their\n<a href=\"#!/api/Ext.window.Window-cfg-defaultFocus\" rel=\"Ext.window.Window-cfg-defaultFocus\" class=\"docClass\">defaultFocus</a> config option.</p>\n</div></li></ul></div></div></div><div id='method-forceComponentLayout' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-forceComponentLayout' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-forceComponentLayout' class='name expandable'>forceComponentLayout</a>( <span class='pre'></span> )<strong class='deprecated signature' >deprecated</strong></div><div class='description'><div class='short'>Forces this component to redo its componentLayout. ...</div><div class='long'><p>Forces this component to redo its componentLayout.</p>\n <div class='signature-box deprecated'>\n <p>This method has been <strong>deprecated</strong> since 4.1.0</p>\n <p>Use <a href=\"#!/api/Ext.AbstractComponent-method-updateLayout\" rel=\"Ext.AbstractComponent-method-updateLayout\" class=\"docClass\">updateLayout</a> instead.</p>\n\n </div>\n</div></div></div><div id='method-getActionEl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-getActionEl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-getActionEl' class='name expandable'>getActionEl</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Deprecate 5.0 ...</div><div class='long'><p>Deprecate 5.0</p>\n</div></div></div><div id='method-getActiveAnimation' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Animate' rel='Ext.util.Animate' class='defined-in docClass'>Ext.util.Animate</a><br/><a href='source/Animate.html#Ext-util-Animate-method-getActiveAnimation' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Animate-method-getActiveAnimation' class='name expandable'>getActiveAnimation</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.fx.Anim\" rel=\"Ext.fx.Anim\" class=\"docClass\">Ext.fx.Anim</a>/<a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></div><div class='description'><div class='short'>Returns the current animation if this object has any effects actively running or queued, else returns false. ...</div><div class='long'><p>Returns the current animation if this object has any effects actively running or queued, else returns false.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.fx.Anim\" rel=\"Ext.fx.Anim\" class=\"docClass\">Ext.fx.Anim</a>/<a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'><p>Anim if element has active effects, else false</p>\n\n</div></li></ul></div></div></div><div id='method-getAlignToXY' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='defined-in docClass'>Ext.util.Positionable</a><br/><a href='source/Positionable.html#Ext-util-Positionable-method-getAlignToXY' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Positionable-method-getAlignToXY' class='name expandable'>getAlignToXY</a>( <span class='pre'>element, [position], [offsets]</span> ) : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]</div><div class='description'><div class='short'>Gets the x,y coordinates to align this element with another element. ...</div><div class='long'><p>Gets the x,y coordinates to align this element with another element. See\n<a href=\"#!/api/Ext.util.Positionable-method-alignTo\" rel=\"Ext.util.Positionable-method-alignTo\" class=\"docClass\">alignTo</a> for more info on the supported position values.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>element</span> : <a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a>/HTMLElement/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The Positionable,\nHTMLElement, or id of the element to align to.</p>\n</div></li><li><span class='pre'>position</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a> (optional)<div class='sub-desc'><p>The position to align to</p>\n<p>Defaults to: <code>"tl-bl?"</code></p></div></li><li><span class='pre'>offsets</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[] (optional)<div class='sub-desc'><p>Offset the positioning by [x, y]</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]</span><div class='sub-desc'><p>[x, y]</p>\n</div></li></ul></div></div></div><div id='method-getAnchor' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='defined-in docClass'>Ext.util.Positionable</a><br/><a href='source/Positionable.html#Ext-util-Positionable-method-getAnchor' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Positionable-method-getAnchor' class='name expandable'>getAnchor</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>private ...</div><div class='long'><p>private</p>\n</div></div></div><div id='method-getAnchorToXY' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getAnchorToXY' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getAnchorToXY' class='name expandable'>getAnchorToXY</a>( <span class='pre'>el, [anchor], [local], [size]</span> ) : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Begin Positionable methods\n\n\n\nOverridden in Ext.rtl.AbstractComponent. ...</div><div class='long'><hr />\n\n<p> Begin Positionable methods</p>\n\n<hr />\n\n<p><strong>Overridden in Ext.rtl.AbstractComponent.</strong></p>\n\n<p>Gets the x,y coordinates of an element specified by the anchor position on the\nelement.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>el</span> : <a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.dom.Element</a><div class='sub-desc'><p>The element</p>\n</div></li><li><span class='pre'>anchor</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a> (optional)<div class='sub-desc'><p>The specified anchor position.\nSee <a href=\"#!/api/Ext.AbstractComponent-method-alignTo\" rel=\"Ext.AbstractComponent-method-alignTo\" class=\"docClass\">alignTo</a> for details on supported anchor positions.</p>\n<p>Defaults to: <code>'tl'</code></p></div></li><li><span class='pre'>local</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p>True to get the local (element top/left-relative) anchor\nposition instead of page coordinates</p>\n</div></li><li><span class='pre'>size</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>An object containing the size to use for calculating anchor\nposition {width: (target width), height: (target height)} (defaults to the\nelement's current size)</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]</span><div class='sub-desc'><p>[x, y] An array containing the element's x and y coordinates</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.util.Positionable-method-getAnchorToXY' rel='Ext.util.Positionable-method-getAnchorToXY' class='docClass'>Ext.util.Positionable.getAnchorToXY</a></p></div></div></div><div id='method-getAnchorXY' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='defined-in docClass'>Ext.util.Positionable</a><br/><a href='source/Positionable.html#Ext-util-Positionable-method-getAnchorXY' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Positionable-method-getAnchorXY' class='name expandable'>getAnchorXY</a>( <span class='pre'>[anchor], [local], [size]</span> ) : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]</div><div class='description'><div class='short'>Gets the x,y coordinates specified by the anchor position on the element. ...</div><div class='long'><p>Gets the x,y coordinates specified by the anchor position on the element.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>anchor</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a> (optional)<div class='sub-desc'><p>The specified anchor position.\nSee <a href=\"#!/api/Ext.util.Positionable-method-alignTo\" rel=\"Ext.util.Positionable-method-alignTo\" class=\"docClass\">alignTo</a> for details on supported anchor positions.</p>\n<p>Defaults to: <code>'tl'</code></p></div></li><li><span class='pre'>local</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p>True to get the local (element top/left-relative) anchor\nposition instead of page coordinates</p>\n</div></li><li><span class='pre'>size</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>An object containing the size to use for calculating anchor\nposition {width: (target width), height: (target height)} (defaults to the\nelement's current size)</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]</span><div class='sub-desc'><p>[x, y] An array containing the element's x and y coordinates</p>\n</div></li></ul></div></div></div><div id='method-getAnimateTarget' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-getAnimateTarget' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-getAnimateTarget' class='name expandable'>getAnimateTarget</a>( <span class='pre'>target</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>target</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-getAutoId' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getAutoId' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getAutoId' class='name expandable'>getAutoId</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-getBorderPadding' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getBorderPadding' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getBorderPadding' class='name expandable'>getBorderPadding</a>( <span class='pre'></span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><strong class='private signature' >private</strong></div><div class='description'><div class='short'>Overridden in Ext.rtl.AbstractComponent. ...</div><div class='long'><p><strong>Overridden in Ext.rtl.AbstractComponent.</strong></p>\n\n<p>Returns the size of the element's borders and padding.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p>an object with the following numeric properties\n- beforeX\n- afterX\n- beforeY\n- afterY</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.util.Positionable-method-getBorderPadding' rel='Ext.util.Positionable-method-getBorderPadding' class='docClass'>Ext.util.Positionable.getBorderPadding</a></p></div></div></div><div id='method-getBox' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='defined-in docClass'>Ext.util.Positionable</a><br/><a href='source/Positionable.html#Ext-util-Positionable-method-getBox' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Positionable-method-getBox' class='name expandable'>getBox</a>( <span class='pre'>[contentBox], [local]</span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></div><div class='description'><div class='short'>Return an object defining the area of this Element which can be passed to\nsetBox to set another Element's size/locati...</div><div class='long'><p>Return an object defining the area of this Element which can be passed to\n<a href=\"#!/api/Ext.util.Positionable-method-setBox\" rel=\"Ext.util.Positionable-method-setBox\" class=\"docClass\">setBox</a> to set another Element's size/location to match this element.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>contentBox</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p>If true a box for the content of the element is\nreturned.</p>\n</div></li><li><span class='pre'>local</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p>If true the element's left and top relative to its\n<code>offsetParent</code> are returned instead of page x/y.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p>box An object in the format:</p>\n\n<pre><code>{\n x: <Element's X position>,\n y: <Element's Y position>,\n left: <Element's X position (an alias for x)>,\n top: <Element's Y position (an alias for y)>,\n width: <Element's width>,\n height: <Element's height>,\n bottom: <Element's lower bound>,\n right: <Element's rightmost bound>\n}\n</code></pre>\n\n<p>The returned object may also be addressed as an Array where index 0 contains the X\nposition and index 1 contains the Y position. The result may also be used for\n<a href=\"#!/api/Ext.util.Positionable-method-setXY\" rel=\"Ext.util.Positionable-method-setXY\" class=\"docClass\">setXY</a></p>\n</div></li></ul></div></div></div><div id='method-getBubbleParent' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-getBubbleParent' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-getBubbleParent' class='name expandable'>getBubbleParent</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.util.Observable\" rel=\"Ext.util.Observable\" class=\"docClass\">Ext.util.Observable</a><strong class='private signature' >private</strong></div><div class='description'><div class='short'>Gets the bubbling parent for an Observable ...</div><div class='long'><p>Gets the bubbling parent for an Observable</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.util.Observable\" rel=\"Ext.util.Observable\" class=\"docClass\">Ext.util.Observable</a></span><div class='sub-desc'><p>The bubble parent. null is returned if no bubble target exists</p>\n</div></li></ul></div></div></div><div id='method-getBubbleTarget' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-getBubbleTarget' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-getBubbleTarget' class='name expandable'>getBubbleTarget</a>( <span class='pre'></span> )<strong class='protected signature' >protected</strong></div><div class='description'><div class='short'>Implements an upward event bubbling policy. ...</div><div class='long'><p>Implements an upward event bubbling policy. By default a Component bubbles events up to its <a href=\"#!/api/Ext.Component-method-getRefOwner\" rel=\"Ext.Component-method-getRefOwner\" class=\"docClass\">reference owner</a>.</p>\n\n<p>Component subclasses may implement a different bubbling strategy by overriding this method.</p>\n<p>Overrides: <a href='#!/api/Ext.AbstractComponent-method-getBubbleTarget' rel='Ext.AbstractComponent-method-getBubbleTarget' class='docClass'>Ext.AbstractComponent.getBubbleTarget</a></p></div></div></div><div id='method-getChildByElement' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.Container' rel='Ext.container.Container' class='defined-in docClass'>Ext.container.Container</a><br/><a href='source/Container.html#Ext-container-Container-method-getChildByElement' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.Container-method-getChildByElement' class='name expandable'>getChildByElement</a>( <span class='pre'>el, deep</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Return the immediate child Component in which the passed element is located. ...</div><div class='long'><p>Return the immediate child Component in which the passed element is located.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>el</span> : <a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a>/HTMLElement/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The element to test (or ID of element).</p>\n</div></li><li><span class='pre'>deep</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><div class='sub-desc'><p>If <code>true</code>, returns the deepest descendant Component which contains the passed element.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>The child item which contains the passed element.</p>\n</div></li></ul></div></div></div><div id='method-getChildEls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.ElementContainer' rel='Ext.util.ElementContainer' class='defined-in docClass'>Ext.util.ElementContainer</a><br/><a href='source/ElementContainer.html#Ext-util-ElementContainer-method-getChildEls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.ElementContainer-method-getChildEls' class='name expandable'>getChildEls</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-getChildItemsToDisable' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-method-getChildItemsToDisable' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-method-getChildItemsToDisable' class='name expandable'>getChildItemsToDisable</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>[]<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Gets a list of child components to enable/disable when the container is\nenabled/disabled ...</div><div class='long'><p>Gets a list of child components to enable/disable when the container is\nenabled/disabled</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>[]</span><div class='sub-desc'><p>Items to be enabled/disabled</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.container.AbstractContainer-method-getChildItemsToDisable' rel='Ext.container.AbstractContainer-method-getChildItemsToDisable' class='docClass'>Ext.container.AbstractContainer.getChildItemsToDisable</a></p></div></div></div><div id='method-getClassChildEls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.ElementContainer' rel='Ext.util.ElementContainer' class='defined-in docClass'>Ext.util.ElementContainer</a><br/><a href='source/ElementContainer.html#Ext-util-ElementContainer-method-getClassChildEls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.ElementContainer-method-getClassChildEls' class='name expandable'>getClassChildEls</a>( <span class='pre'>cls</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>cls</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-getComponent' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-getComponent' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-getComponent' class='name expandable'>getComponent</a>( <span class='pre'>comp</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Examines this container's items property and gets a direct child\ncomponent of this container. ...</div><div class='long'><p>Examines this container's <a href=\"#!/api/Ext.container.AbstractContainer-property-items\" rel=\"Ext.container.AbstractContainer-property-items\" class=\"docClass\">items</a> <strong>property</strong> and gets a direct child\ncomponent of this container.</p>\n <p>Available since: <b>2.3.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>comp</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>This parameter may be any of the following:</p>\n\n<ul>\n<li>a <strong>String</strong> : representing the <a href=\"#!/api/Ext.Component-cfg-itemId\" rel=\"Ext.Component-cfg-itemId\" class=\"docClass\">itemId</a>\nor <a href=\"#!/api/Ext.Component-cfg-id\" rel=\"Ext.Component-cfg-id\" class=\"docClass\">id</a> of the child component.</li>\n<li>a <strong>Number</strong> : representing the position of the child component\nwithin the <a href=\"#!/api/Ext.container.AbstractContainer-property-items\" rel=\"Ext.container.AbstractContainer-property-items\" class=\"docClass\">items</a> <strong>property</strong></li>\n</ul>\n\n\n<p>For additional information see <a href=\"#!/api/Ext.util.MixedCollection-method-get\" rel=\"Ext.util.MixedCollection-method-get\" class=\"docClass\">Ext.util.MixedCollection.get</a>.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>The component (if found).</p>\n</div></li></ul></div></div></div><div id='method-getComponentId' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-getComponentId' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-getComponentId' class='name expandable'>getComponentId</a>( <span class='pre'>comp</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>used as the key lookup function for the items collection ...</div><div class='long'><ul>\n<li>used as the key lookup function for the items collection</li>\n</ul>\n\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>comp</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-getComponentLayout' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getComponentLayout' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getComponentLayout' class='name expandable'>getComponentLayout</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-getConfig' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-method-getConfig' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-method-getConfig' class='name expandable'>getConfig</a>( <span class='pre'>name</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>name</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-getConstrainVector' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='defined-in docClass'>Ext.util.Positionable</a><br/><a href='source/Positionable.html#Ext-util-Positionable-method-getConstrainVector' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Positionable-method-getConstrainVector' class='name expandable'>getConstrainVector</a>( <span class='pre'>[constrainTo], [proposedPosition], [proposedSize]</span> ) : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]/<a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></div><div class='description'><div class='short'>Returns the [X, Y] vector by which this Positionable's element must be translated to make a best\nattempt to constrain...</div><div class='long'><p>Returns the <code>[X, Y]</code> vector by which this Positionable's element must be translated to make a best\nattempt to constrain within the passed constraint. Returns <code>false</code> if the element\ndoes not need to be moved.</p>\n\n<p>Priority is given to constraining the top and left within the constraint.</p>\n\n<p>The constraint may either be an existing element into which the element is to be\nconstrained, or a <a href=\"#!/api/Ext.util.Region\" rel=\"Ext.util.Region\" class=\"docClass\">Region</a> into which this element is to be\nconstrained.</p>\n\n<p>By default, any extra shadow around the element is <strong>not</strong> included in the constrain calculations - the edges\nof the element are used as the element bounds. To constrain the shadow within the constrain region, set the\n<code>constrainShadow</code> property on this element to <code>true</code>.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>constrainTo</span> : <a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a>/HTMLElement/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Ext.util.Region\" rel=\"Ext.util.Region\" class=\"docClass\">Ext.util.Region</a> (optional)<div class='sub-desc'><p>The\nPositionable, HTMLElement, element id, or Region into which the element is to be\nconstrained.</p>\n</div></li><li><span class='pre'>proposedPosition</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[] (optional)<div class='sub-desc'><p>A proposed <code>[X, Y]</code> position to test for validity\nand to produce a vector for instead of using the element's current position</p>\n</div></li><li><span class='pre'>proposedSize</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[] (optional)<div class='sub-desc'><p>A proposed <code>[width, height]</code> size to constrain\ninstead of using the element's current size</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]/<a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'><p><strong>If</strong> the element <em>needs</em> to be translated, an <code>[X, Y]</code>\nvector by which this element must be translated. Otherwise, <code>false</code>.</p>\n</div></li></ul></div></div></div><div id='method-getContentTarget' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-getContentTarget' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-getContentTarget' class='name expandable'>getContentTarget</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Overrides: <a href='#!/api/Ext.Component-method-getContentTarget' rel='Ext.Component-method-getContentTarget' class='docClass'>Ext.Component.getContentTarget</a></p></div></div></div><div id='method-getDefaultContentTarget' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-getDefaultContentTarget' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-getDefaultContentTarget' class='name expandable'>getDefaultContentTarget</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-getDragEl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-getDragEl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-getDragEl' class='name expandable'>getDragEl</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-getEl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-getEl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-getEl' class='name expandable'>getEl</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.dom.Element</a></div><div class='description'><div class='short'>Retrieves the top level element representing this component. ...</div><div class='long'><p>Retrieves the top level element representing this component.</p>\n <p>Available since: <b>1.1.0</b></p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.dom.Element</a></span><div class='sub-desc'>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.AbstractComponent-method-getEl' rel='Ext.AbstractComponent-method-getEl' class='docClass'>Ext.AbstractComponent.getEl</a></p></div></div></div><div id='method-getElConfig' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-getElConfig' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-getElConfig' class='name expandable'>getElConfig</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-getFocusEl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-getFocusEl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-getFocusEl' class='name expandable'>getFocusEl</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a><strong class='private signature' >private</strong></div><div class='description'><div class='short'>Returns the focus holder element associated with this Container. ...</div><div class='long'><p>Returns the focus holder element associated with this Container. By default, this is the Container's target\nelement. Subclasses which use embedded focusable elements (such as Window and Button) should override this for use\nby the <a href=\"#!/api/Ext.container.AbstractContainer-method-focus\" rel=\"Ext.container.AbstractContainer-method-focus\" class=\"docClass\">focus</a> method.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a></span><div class='sub-desc'><p>the focus holding element.</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.AbstractComponent-method-getFocusEl' rel='Ext.AbstractComponent-method-getFocusEl' class='docClass'>Ext.AbstractComponent.getFocusEl</a></p></div></div></div><div id='method-getFrameInfo' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-getFrameInfo' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-getFrameInfo' class='name expandable'>getFrameInfo</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>On render, reads an encoded style attribute, \"filter\" from the style of this Component's element. ...</div><div class='long'><p>On render, reads an encoded style attribute, \"filter\" from the style of this Component's element.\nThis information is memoized based upon the CSS class name of this Component's element.\nBecause child Components are rendered as textual HTML as part of the topmost Container, a dummy div is inserted\ninto the document to receive the document element's CSS class name, and therefore style attributes.</p>\n</div></div></div><div id='method-getFrameRenderData' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-getFrameRenderData' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-getFrameRenderData' class='name expandable'>getFrameRenderData</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-getFrameTpl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-getFrameTpl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-getFrameTpl' class='name expandable'>getFrameTpl</a>( <span class='pre'>table</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>table</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-getFramingInfoCls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-getFramingInfoCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-getFramingInfoCls' class='name expandable'>getFramingInfoCls</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-getHeight' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getHeight' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getHeight' class='name expandable'>getHeight</a>( <span class='pre'></span> ) : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></div><div class='description'><div class='short'>Gets the current height of the component's underlying element. ...</div><div class='long'><p>Gets the current height of the component's underlying element.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-getHierarchyState' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getHierarchyState' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getHierarchyState' class='name expandable'>getHierarchyState</a>( <span class='pre'>inner</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>A component's hierarchyState is used to keep track of aspects of a component's\nstate that affect its descendants hier...</div><div class='long'><p>A component's hierarchyState is used to keep track of aspects of a component's\nstate that affect its descendants hierarchically like \"collapsed\" and \"hidden\".\nFor example, if this.hierarchyState.hidden == true, it means that either this\ncomponent, or one of its ancestors is hidden.</p>\n\n<p>Hierarchical state management is implemented by chaining each component's\nhierarchyState property to its parent container's hierarchyState property via the\nprototype. The result is such that if a component's hierarchyState does not have\nit's own property, it inherits the property from the nearest ancestor that does.</p>\n\n<p>To set a hierarchical \"hidden\" value:</p>\n\n<pre><code>this.getHierarchyState().hidden = true;\n</code></pre>\n\n<p>It is important to remember when unsetting hierarchyState properties to delete\nthem instead of just setting them to a falsy value. This ensures that the\nhierarchyState returns to a state of inheriting the value instead of overriding it\nTo unset the hierarchical \"hidden\" value:</p>\n\n<pre><code>delete this.getHierarchyState().hidden;\n</code></pre>\n\n<p>IMPORTANT! ALWAYS access hierarchyState using this method, not by accessing\nthis.hierarchyState directly. The hierarchyState property does not exist until\nthe first time getHierarchyState() is called. At that point getHierarchyState()\nwalks up the component tree to establish the hierarchyState prototype chain.\nAdditionally the hierarchyState property should NOT be relied upon even after\nthe initial call to getHierarchyState() because it is possible for the\nhierarchyState to be invalidated. Invalidation typically happens when a component\nis moved to a new container. In such a case the hierarchy state remains invalid\nuntil the next time getHierarchyState() is called on the component or one of its\ndescendants.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>inner</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-getId' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-getId' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-getId' class='name expandable'>getId</a>( <span class='pre'></span> ) : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></div><div class='description'><div class='short'>Retrieves the id of this component. ...</div><div class='long'><p>Retrieves the <code>id</code> of this component. Will auto-generate an <code>id</code> if one has not already been set.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span><div class='sub-desc'>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.AbstractComponent-method-getId' rel='Ext.AbstractComponent-method-getId' class='docClass'>Ext.AbstractComponent.getId</a></p></div></div></div><div id='method-getInitialConfig' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-method-getInitialConfig' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-method-getInitialConfig' class='name expandable'>getInitialConfig</a>( <span class='pre'>[name]</span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>/Mixed</div><div class='description'><div class='short'>Returns the initial configuration passed to constructor when instantiating\nthis class. ...</div><div class='long'><p>Returns the initial configuration passed to constructor when instantiating\nthis class.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>name</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a> (optional)<div class='sub-desc'><p>Name of the config option to return.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>/Mixed</span><div class='sub-desc'><p>The full config object or a single config value\nwhen <code>name</code> parameter specified.</p>\n</div></li></ul></div></div></div><div id='method-getInsertPosition' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-getInsertPosition' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-getInsertPosition' class='name expandable'>getInsertPosition</a>( <span class='pre'>position</span> ) : HTMLElement</div><div class='description'><div class='short'>This function takes the position argument passed to onRender and returns a\nDOM element that you can use in the insert...</div><div class='long'><p>This function takes the position argument passed to onRender and returns a\nDOM element that you can use in the insertBefore.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>position</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/<a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.dom.Element</a>/HTMLElement<div class='sub-desc'><p>Index, element id or element you want\nto put this component before.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'>HTMLElement</span><div class='sub-desc'><p>DOM element that you can use in the insertBefore</p>\n</div></li></ul></div></div></div><div id='method-getItemId' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getItemId' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getItemId' class='name expandable'>getItemId</a>( <span class='pre'></span> ) : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></div><div class='description'><div class='short'>Returns the value of itemId assigned to this component, or when that\nis not set, returns the value of id. ...</div><div class='long'><p>Returns the value of <a href=\"#!/api/Ext.AbstractComponent-cfg-itemId\" rel=\"Ext.AbstractComponent-cfg-itemId\" class=\"docClass\">itemId</a> assigned to this component, or when that\nis not set, returns the value of <a href=\"#!/api/Ext.AbstractComponent-cfg-id\" rel=\"Ext.AbstractComponent-cfg-id\" class=\"docClass\">id</a>.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-getLayout' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-getLayout' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-getLayout' class='name expandable'>getLayout</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.layout.container.Container\" rel=\"Ext.layout.container.Container\" class=\"docClass\">Ext.layout.container.Container</a></div><div class='description'><div class='short'>Returns the layout instance currently associated with this Container. ...</div><div class='long'><p>Returns the <a href=\"#!/api/Ext.layout.container.Container\" rel=\"Ext.layout.container.Container\" class=\"docClass\">layout</a> instance currently associated with this Container.\nIf a layout has not been instantiated yet, that is done first</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.layout.container.Container\" rel=\"Ext.layout.container.Container\" class=\"docClass\">Ext.layout.container.Container</a></span><div class='sub-desc'><p>The layout</p>\n</div></li></ul></div></div></div><div id='method-getLoader' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getLoader' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getLoader' class='name expandable'>getLoader</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.ComponentLoader\" rel=\"Ext.ComponentLoader\" class=\"docClass\">Ext.ComponentLoader</a></div><div class='description'><div class='short'>Gets the Ext.ComponentLoader for this Component. ...</div><div class='long'><p>Gets the <a href=\"#!/api/Ext.ComponentLoader\" rel=\"Ext.ComponentLoader\" class=\"docClass\">Ext.ComponentLoader</a> for this Component.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.ComponentLoader\" rel=\"Ext.ComponentLoader\" class=\"docClass\">Ext.ComponentLoader</a></span><div class='sub-desc'><p>The loader instance, null if it doesn't exist.</p>\n</div></li></ul></div></div></div><div id='method-getLocalX' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getLocalX' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getLocalX' class='name expandable'>getLocalX</a>( <span class='pre'></span> ) : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></div><div class='description'><div class='short'>Overridden in Ext.rtl.AbstractComponent. ...</div><div class='long'><p><strong>Overridden in Ext.rtl.AbstractComponent.</strong></p>\n\n<p>Returns the x coordinate of this element reletive to its <code>offsetParent</code>.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span><div class='sub-desc'><p>The local x coordinate</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.util.Positionable-method-getLocalX' rel='Ext.util.Positionable-method-getLocalX' class='docClass'>Ext.util.Positionable.getLocalX</a></p></div></div></div><div id='method-getLocalXY' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getLocalXY' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getLocalXY' class='name expandable'>getLocalXY</a>( <span class='pre'></span> ) : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]</div><div class='description'><div class='short'>Overridden in Ext.rtl.AbstractComponent. ...</div><div class='long'><p><strong>Overridden in Ext.rtl.AbstractComponent.</strong></p>\n\n<p>Returns the x and y coordinates of this element relative to its <code>offsetParent</code>.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]</span><div class='sub-desc'><p>The local XY position of the element</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.util.Positionable-method-getLocalXY' rel='Ext.util.Positionable-method-getLocalXY' class='docClass'>Ext.util.Positionable.getLocalXY</a></p></div></div></div><div id='method-getLocalY' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getLocalY' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getLocalY' class='name expandable'>getLocalY</a>( <span class='pre'></span> ) : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></div><div class='description'><div class='short'>Returns the y coordinate of this element reletive to its offsetParent. ...</div><div class='long'><p>Returns the y coordinate of this element reletive to its <code>offsetParent</code>.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span><div class='sub-desc'><p>The local y coordinate</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.util.Positionable-method-getLocalY' rel='Ext.util.Positionable-method-getLocalY' class='docClass'>Ext.util.Positionable.getLocalY</a></p></div></div></div><div id='method-getMaskTarget' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getMaskTarget' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getMaskTarget' class='name expandable'>getMaskTarget</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-getOffsetsTo' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='defined-in docClass'>Ext.util.Positionable</a><br/><a href='source/Positionable.html#Ext-util-Positionable-method-getOffsetsTo' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Positionable-method-getOffsetsTo' class='name expandable'>getOffsetsTo</a>( <span class='pre'>offsetsTo</span> ) : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]</div><div class='description'><div class='short'>Returns the offsets of this element from the passed element. ...</div><div class='long'><p>Returns the offsets of this element from the passed element. The element must both\nbe part of the DOM tree and not have display:none to have page coordinates.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>offsetsTo</span> : <a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a>/HTMLElement/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The Positionable,\nHTMLElement, or element id to get get the offsets from.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]</span><div class='sub-desc'><p>The XY page offsets (e.g. <code>[100, -200]</code>)</p>\n</div></li></ul></div></div></div><div id='method-getOuterSize' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-getOuterSize' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-getOuterSize' class='name expandable'>getOuterSize</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Include margins ...</div><div class='long'><p>Include margins</p>\n</div></div></div><div id='method-getOverflowEl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getOverflowEl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getOverflowEl' class='name expandable'>getOverflowEl</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Get an el for overflowing, defaults to the target el ...</div><div class='long'><p>Get an el for overflowing, defaults to the target el</p>\n</div></div></div><div id='method-getOverflowStyle' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getOverflowStyle' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getOverflowStyle' class='name expandable'>getOverflowStyle</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Returns the CSS style object which will set the Component's scroll styles. ...</div><div class='long'><p>Returns the CSS style object which will set the Component's scroll styles. This must be applied\nto the <a href=\"#!/api/Ext.AbstractComponent-method-getTargetEl\" rel=\"Ext.AbstractComponent-method-getTargetEl\" class=\"docClass\">target element</a>.</p>\n</div></div></div><div id='method-getOwningBorderContainer' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Region2.html#Ext-Component-method-getOwningBorderContainer' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-getOwningBorderContainer' class='name expandable'>getOwningBorderContainer</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a><strong class='private signature' >private</strong></div><div class='description'><div class='short'>Returns the owning container if that container uses border layout. ...</div><div class='long'><p>Returns the owning container if that container uses <code>border</code> layout. Otherwise\nthis method returns <code>null</code>.</p>\n\n<p><strong>Defined in override Ext.layout.container.border.Region.</strong></p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a></span><div class='sub-desc'><p>The owning border container or <code>null</code>.</p>\n</div></li></ul></div></div></div><div id='method-getOwningBorderLayout' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Region2.html#Ext-Component-method-getOwningBorderLayout' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-getOwningBorderLayout' class='name expandable'>getOwningBorderLayout</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.layout.container.Border\" rel=\"Ext.layout.container.Border\" class=\"docClass\">Ext.layout.container.Border</a><strong class='private signature' >private</strong></div><div class='description'><div class='short'>Returns the owning border (Ext.layout.container.Border) instance if there is\none. ...</div><div class='long'><p>Returns the owning <code>border</code> (<code><a href=\"#!/api/Ext.layout.container.Border\" rel=\"Ext.layout.container.Border\" class=\"docClass\">Ext.layout.container.Border</a></code>) instance if there is\none. Otherwise this method returns <code>null</code>.</p>\n\n<p><strong>Defined in override Ext.layout.container.border.Region.</strong></p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.layout.container.Border\" rel=\"Ext.layout.container.Border\" class=\"docClass\">Ext.layout.container.Border</a></span><div class='sub-desc'><p>The owning border layout or <code>null</code>.</p>\n</div></li></ul></div></div></div><div id='method-getPlugin' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getPlugin' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getPlugin' class='name expandable'>getPlugin</a>( <span class='pre'>pluginId</span> ) : <a href=\"#!/api/Ext.AbstractPlugin\" rel=\"Ext.AbstractPlugin\" class=\"docClass\">Ext.AbstractPlugin</a></div><div class='description'><div class='short'>Retrieves a plugin from this component's collection by its pluginId. ...</div><div class='long'><p>Retrieves a plugin from this component's collection by its <code>pluginId</code>.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>pluginId</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.AbstractPlugin\" rel=\"Ext.AbstractPlugin\" class=\"docClass\">Ext.AbstractPlugin</a></span><div class='sub-desc'><p>plugin instance.</p>\n</div></li></ul></div></div></div><div id='method-getPosition' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-getPosition' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-getPosition' class='name expandable'>getPosition</a>( <span class='pre'>[local]</span> ) : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]</div><div class='description'><div class='short'>Gets the current XY position of the component's underlying element. ...</div><div class='long'><p>Gets the current XY position of the component's underlying element.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>local</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p>If true the element's left and top are returned instead of page XY.</p>\n<p>Defaults to: <code>false</code></p></div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]</span><div class='sub-desc'><p>The XY position of the element (e.g., [100, 200])</p>\n</div></li></ul></div></div></div><div id='method-getPositionEl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-getPositionEl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-getPositionEl' class='name expandable'>getPositionEl</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Deprecate 5.0 ...</div><div class='long'><p>Deprecate 5.0</p>\n</div></div></div><div id='method-getProxy' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-getProxy' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-getProxy' class='name expandable'>getProxy</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-getRefItems' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-method-getRefItems' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-method-getRefItems' class='name expandable'>getRefItems</a>( <span class='pre'>deep</span> )<strong class='protected signature' >protected</strong></div><div class='description'><div class='short'>Used by ComponentQuery, child and down to retrieve all of the items\nwhich can potentially be considered a child of th...</div><div class='long'><p>Used by <a href=\"#!/api/Ext.ComponentQuery\" rel=\"Ext.ComponentQuery\" class=\"docClass\">ComponentQuery</a>, <a href=\"#!/api/Ext.toolbar.Toolbar-method-child\" rel=\"Ext.toolbar.Toolbar-method-child\" class=\"docClass\">child</a> and <a href=\"#!/api/Ext.toolbar.Toolbar-method-down\" rel=\"Ext.toolbar.Toolbar-method-down\" class=\"docClass\">down</a> to retrieve all of the items\nwhich can potentially be considered a child of this Container.</p>\n\n<p>This may be overriden by Components which have ownership of Components\nthat are not contained in the <a href=\"#!/api/Ext.toolbar.Toolbar-property-items\" rel=\"Ext.toolbar.Toolbar-property-items\" class=\"docClass\">items</a> collection.</p>\n\n<p>NOTE: IMPORTANT note for maintainers:\nItems are returned in tree traversal order. Each item is appended to the result array\nfollowed by the results of that child's getRefItems call.\nFloating child items are appended after internal child items.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>deep</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.container.AbstractContainer-method-getRefItems' rel='Ext.container.AbstractContainer-method-getRefItems' class='docClass'>Ext.container.AbstractContainer.getRefItems</a></p></div></div></div><div id='method-getRefOwner' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-getRefOwner' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-getRefOwner' class='name expandable'>getRefOwner</a>( <span class='pre'></span> )<strong class='private signature' >private</strong><strong class='protected signature' >protected</strong></div><div class='description'><div class='short'>Used by ComponentQuery, and the up method to find the\nowning Component in the linkage hierarchy. ...</div><div class='long'><p>Used by <a href=\"#!/api/Ext.ComponentQuery\" rel=\"Ext.ComponentQuery\" class=\"docClass\">ComponentQuery</a>, and the <a href=\"#!/api/Ext.AbstractComponent-method-up\" rel=\"Ext.AbstractComponent-method-up\" class=\"docClass\">up</a> method to find the\nowning Component in the linkage hierarchy.</p>\n\n<p>By default this returns the Container which contains this Component.</p>\n\n<p>This may be overriden by Component authors who implement ownership hierarchies which are not\nbased upon ownerCt, such as BoundLists being owned by Fields or Menus being owned by Buttons.</p>\n</div></div></div><div id='method-getRegion' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='defined-in docClass'>Ext.util.Positionable</a><br/><a href='source/Positionable.html#Ext-util-Positionable-method-getRegion' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Positionable-method-getRegion' class='name expandable'>getRegion</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.util.Region\" rel=\"Ext.util.Region\" class=\"docClass\">Ext.util.Region</a></div><div class='description'><div class='short'>Returns a region object that defines the area of this element. ...</div><div class='long'><p>Returns a region object that defines the area of this element.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.util.Region\" rel=\"Ext.util.Region\" class=\"docClass\">Ext.util.Region</a></span><div class='sub-desc'><p>A Region containing \"top, left, bottom, right\" properties.</p>\n</div></li></ul></div></div></div><div id='method-getRenderTree' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-getRenderTree' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-getRenderTree' class='name expandable'>getRenderTree</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-getResizeEl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-getResizeEl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-getResizeEl' class='name expandable'>getResizeEl</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Deprecate 5.0 ...</div><div class='long'><p>Deprecate 5.0</p>\n</div></div></div><div id='method-getSize' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getSize' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getSize' class='name expandable'>getSize</a>( <span class='pre'></span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></div><div class='description'><div class='short'>Gets the current size of the component's underlying element. ...</div><div class='long'><p>Gets the current size of the component's underlying element.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p>An object containing the element's size <code>{width: (element width), height: (element height)}</code></p>\n</div></li></ul></div></div></div><div id='method-getSizeModel' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getSizeModel' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getSizeModel' class='name expandable'>getSizeModel</a>( <span class='pre'>ownerCtSizeModel</span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></div><div class='description'><div class='short'>Returns an object that describes how this component's width and height are managed. ...</div><div class='long'><p>Returns an object that describes how this component's width and height are managed.\nAll of these objects are shared and should not be modified.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>ownerCtSizeModel</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p>The size model for this component.</p>\n<ul><li><span class='pre'>width</span> : <a href=\"#!/api/Ext.layout.SizeModel\" rel=\"Ext.layout.SizeModel\" class=\"docClass\">Ext.layout.SizeModel</a><div class='sub-desc'><p>The <a href=\"#!/api/Ext.layout.SizeModel\" rel=\"Ext.layout.SizeModel\" class=\"docClass\">size model</a>\nfor the width.</p>\n</div></li><li><span class='pre'>height</span> : <a href=\"#!/api/Ext.layout.SizeModel\" rel=\"Ext.layout.SizeModel\" class=\"docClass\">Ext.layout.SizeModel</a><div class='sub-desc'><p>The <a href=\"#!/api/Ext.layout.SizeModel\" rel=\"Ext.layout.SizeModel\" class=\"docClass\">size model</a>\nfor the height.</p>\n</div></li></ul></div></li></ul></div></div></div><div id='method-getState' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getState' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getState' class='name expandable'>getState</a>( <span class='pre'></span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></div><div class='description'><div class='short'>The supplied default state gathering method for the AbstractComponent class. ...</div><div class='long'><p>The supplied default state gathering method for the AbstractComponent class.</p>\n\n<p>This method returns dimension settings such as <code>flex</code>, <code>anchor</code>, <code>width</code> and <code>height</code> along with <code>collapsed</code>\nstate.</p>\n\n<p>Subclasses which implement more complex state should call the superclass's implementation, and apply their state\nto the result if this basic state is to be saved.</p>\n\n<p>Note that Component state will only be saved if the Component has a <a href=\"#!/api/Ext.AbstractComponent-cfg-stateId\" rel=\"Ext.AbstractComponent-cfg-stateId\" class=\"docClass\">stateId</a> and there as a StateProvider\nconfigured for the document.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.state.Stateful-method-getState' rel='Ext.state.Stateful-method-getState' class='docClass'>Ext.state.Stateful.getState</a></p></div></div></div><div id='method-getStateId' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.state.Stateful' rel='Ext.state.Stateful' class='defined-in docClass'>Ext.state.Stateful</a><br/><a href='source/Stateful.html#Ext-state-Stateful-method-getStateId' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.state.Stateful-method-getStateId' class='name expandable'>getStateId</a>( <span class='pre'></span> ) : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><strong class='private signature' >private</strong></div><div class='description'><div class='short'>Gets the state id for this object. ...</div><div class='long'><p>Gets the state id for this object.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span><div class='sub-desc'><p>The 'stateId' or the implicit 'id' specified by component configuration.</p>\n</div></li></ul></div></div></div><div id='method-getStyleProxy' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-getStyleProxy' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-getStyleProxy' class='name expandable'>getStyleProxy</a>( <span class='pre'>cls</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Returns an offscreen div with the same class name as the element this is being rendered. ...</div><div class='long'><p>Returns an offscreen div with the same class name as the element this is being rendered.\nThis is because child item rendering takes place in a detached div which, being not\npart of the document, has no styling.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>cls</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-getTargetEl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getTargetEl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getTargetEl' class='name expandable'>getTargetEl</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>This is used to determine where to insert the 'html', 'contentEl' and 'items' in this component. ...</div><div class='long'><p>This is used to determine where to insert the 'html', 'contentEl' and 'items' in this component.</p>\n</div></div></div><div id='method-getText' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.statusbar.StatusBar'>Ext.ux.statusbar.StatusBar</span><br/><a href='source/StatusBar.html#Ext-ux-statusbar-StatusBar-method-getText' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.statusbar.StatusBar-method-getText' class='name expandable'>getText</a>( <span class='pre'></span> ) : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></div><div class='description'><div class='short'>Returns the current status text. ...</div><div class='long'><p>Returns the current status text.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span><div class='sub-desc'><p>The status text</p>\n</div></li></ul></div></div></div><div id='method-getTpl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getTpl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getTpl' class='name expandable'>getTpl</a>( <span class='pre'>name</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>name</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-getViewRegion' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='defined-in docClass'>Ext.util.Positionable</a><br/><a href='source/Positionable.html#Ext-util-Positionable-method-getViewRegion' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Positionable-method-getViewRegion' class='name expandable'>getViewRegion</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.util.Region\" rel=\"Ext.util.Region\" class=\"docClass\">Ext.util.Region</a></div><div class='description'><div class='short'>Returns the content region of this element. ...</div><div class='long'><p>Returns the <strong>content</strong> region of this element. That is the region within the borders\nand padding.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.util.Region\" rel=\"Ext.util.Region\" class=\"docClass\">Ext.util.Region</a></span><div class='sub-desc'><p>A Region containing \"top, left, bottom, right\" member data.</p>\n</div></li></ul></div></div></div><div id='method-getVisibilityEl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-getVisibilityEl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-getVisibilityEl' class='name expandable'>getVisibilityEl</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Deprecate 5.0 ...</div><div class='long'><p>Deprecate 5.0</p>\n</div></div></div><div id='method-getWidth' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getWidth' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getWidth' class='name expandable'>getWidth</a>( <span class='pre'></span> ) : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></div><div class='description'><div class='short'>Gets the current width of the component's underlying element. ...</div><div class='long'><p>Gets the current width of the component's underlying element.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-getX' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getX' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getX' class='name expandable'>getX</a>( <span class='pre'></span> ) : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></div><div class='description'><div class='short'>Gets the current X position of the DOM element based on page coordinates. ...</div><div class='long'><p>Gets the current X position of the DOM element based on page coordinates.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span><div class='sub-desc'><p>The X position of the element</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.util.Positionable-method-getX' rel='Ext.util.Positionable-method-getX' class='docClass'>Ext.util.Positionable.getX</a></p></div></div></div><div id='method-getXType' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-getXType' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-getXType' class='name expandable'>getXType</a>( <span class='pre'></span> ) : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></div><div class='description'><div class='short'>Gets the xtype for this component as registered with Ext.ComponentManager. ...</div><div class='long'><p>Gets the xtype for this component as registered with <a href=\"#!/api/Ext.ComponentManager\" rel=\"Ext.ComponentManager\" class=\"docClass\">Ext.ComponentManager</a>. For a list of all available\nxtypes, see the <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> header. Example usage:</p>\n\n<pre><code>var t = new <a href=\"#!/api/Ext.form.field.Text\" rel=\"Ext.form.field.Text\" class=\"docClass\">Ext.form.field.Text</a>();\nalert(t.getXType()); // alerts 'textfield'\n</code></pre>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span><div class='sub-desc'><p>The xtype</p>\n</div></li></ul></div></div></div><div id='method-getXTypes' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getXTypes' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getXTypes' class='name expandable'>getXTypes</a>( <span class='pre'></span> ) : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></div><div class='description'><div class='short'>Returns this Component's xtype hierarchy as a slash-delimited string. ...</div><div class='long'><p>Returns this Component's xtype hierarchy as a slash-delimited string. For a list of all available xtypes, see the\n<a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> header.</p>\n\n<p><strong>If using your own subclasses, be aware that a Component must register its own xtype to participate in\ndetermination of inherited xtypes.</strong></p>\n\n<p>Example usage:</p>\n\n<pre class='inline-example '><code>var t = new <a href=\"#!/api/Ext.form.field.Text\" rel=\"Ext.form.field.Text\" class=\"docClass\">Ext.form.field.Text</a>();\nalert(t.getXTypes()); // alerts 'component/field/textfield'\n</code></pre>\n <p>Available since: <b>2.3.0</b></p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span><div class='sub-desc'><p>The xtype hierarchy string</p>\n</div></li></ul></div></div></div><div id='method-getXY' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getXY' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getXY' class='name expandable'>getXY</a>( <span class='pre'></span> ) : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]</div><div class='description'><div class='short'>Gets the current position of the DOM element based on page coordinates. ...</div><div class='long'><p>Gets the current position of the DOM element based on page coordinates.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]</span><div class='sub-desc'><p>The XY position of the element</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.util.Positionable-method-getXY' rel='Ext.util.Positionable-method-getXY' class='docClass'>Ext.util.Positionable.getXY</a></p></div></div></div><div id='method-getY' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-getY' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-getY' class='name expandable'>getY</a>( <span class='pre'></span> ) : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></div><div class='description'><div class='short'>Gets the current Y position of the DOM element based on page coordinates. ...</div><div class='long'><p>Gets the current Y position of the DOM element based on page coordinates.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span><div class='sub-desc'><p>The Y position of the element</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.util.Positionable-method-getY' rel='Ext.util.Positionable-method-getY' class='docClass'>Ext.util.Positionable.getY</a></p></div></div></div><div id='method-hasActiveFx' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Animate' rel='Ext.util.Animate' class='defined-in docClass'>Ext.util.Animate</a><br/><a href='source/Animate.html#Ext-util-Animate-method-hasActiveFx' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Animate-method-hasActiveFx' class='name expandable'>hasActiveFx</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.fx.Anim\" rel=\"Ext.fx.Anim\" class=\"docClass\">Ext.fx.Anim</a>/<a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><strong class='deprecated signature' >deprecated</strong></div><div class='description'><div class='short'>Returns the current animation if this object has any effects actively running or queued, else returns false. ...</div><div class='long'><p>Returns the current animation if this object has any effects actively running or queued, else returns false.</p>\n <div class='signature-box deprecated'>\n <p>This method has been <strong>deprecated</strong> since 4.0</p>\n <p>Replaced by <a href=\"#!/api/Ext.util.Animate-method-getActiveAnimation\" rel=\"Ext.util.Animate-method-getActiveAnimation\" class=\"docClass\">getActiveAnimation</a></p>\n\n </div>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.fx.Anim\" rel=\"Ext.fx.Anim\" class=\"docClass\">Ext.fx.Anim</a>/<a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'><p>Anim if element has active effects, else false</p>\n\n</div></li></ul></div></div></div><div id='method-hasCls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-hasCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-hasCls' class='name expandable'>hasCls</a>( <span class='pre'>className</span> ) : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></div><div class='description'><div class='short'>Checks if the specified CSS class exists on this element's DOM node. ...</div><div class='long'><p>Checks if the specified CSS class exists on this element's DOM node.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>className</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The CSS class to check for.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'><p><code>true</code> if the class exists, else <code>false</code>.</p>\n</div></li></ul></div></div></div><div id='method-hasConfig' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-method-hasConfig' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-method-hasConfig' class='name expandable'>hasConfig</a>( <span class='pre'>config</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>config</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-hasListener' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-hasListener' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-hasListener' class='name expandable'>hasListener</a>( <span class='pre'>eventName</span> ) : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></div><div class='description'><div class='short'>Checks to see if this object has any listeners for a specified event, or whether the event bubbles. ...</div><div class='long'><p>Checks to see if this object has any listeners for a specified event, or whether the event bubbles. The answer\nindicates whether the event needs firing or not.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>eventName</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The name of the event to check for</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'><p><code>true</code> if the event is being listened for or bubbles, else <code>false</code></p>\n</div></li></ul></div></div></div><div id='method-hasUICls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-hasUICls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-hasUICls' class='name expandable'>hasUICls</a>( <span class='pre'>cls</span> )</div><div class='description'><div class='short'>Checks if there is currently a specified uiCls. ...</div><div class='long'><p>Checks if there is currently a specified <code>uiCls</code>.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>cls</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The <code>cls</code> to check.</p>\n</div></li></ul></div></div></div><div id='method-hide' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-hide' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-hide' class='name expandable'>hide</a>( <span class='pre'>[animateTarget], [callback], [scope]</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Hides this Component, setting it to invisible using the configured hideMode. ...</div><div class='long'><p>Hides this Component, setting it to invisible using the configured <a href=\"#!/api/Ext.Component-cfg-hideMode\" rel=\"Ext.Component-cfg-hideMode\" class=\"docClass\">hideMode</a>.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>animateTarget</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a>/<a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> (optional)<div class='sub-desc'><p><strong>only valid for <a href=\"#!/api/Ext.Component-cfg-floating\" rel=\"Ext.Component-cfg-floating\" class=\"docClass\">floating</a> Components\nsuch as <a href=\"#!/api/Ext.window.Window\" rel=\"Ext.window.Window\" class=\"docClass\">Window</a>s or <a href=\"#!/api/Ext.tip.ToolTip\" rel=\"Ext.tip.ToolTip\" class=\"docClass\">ToolTip</a>s, or regular Components which have\nbeen configured with <code>floating: true</code>.</strong>. The target to which the Component should animate while hiding.</p>\n<p>Defaults to: <code>null</code></p></div></li><li><span class='pre'>callback</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a> (optional)<div class='sub-desc'><p>A callback function to call after the Component is hidden.</p>\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>The scope (<code>this</code> reference) in which the callback is executed.\nDefaults to this Component.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-initBorderRegion' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Region2.html#Ext-Component-method-initBorderRegion' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-initBorderRegion' class='name expandable'>initBorderRegion</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>This method is called by the Ext.layout.container.Border class when instances are\nadded as regions to the layout. ...</div><div class='long'><p>This method is called by the <code><a href=\"#!/api/Ext.layout.container.Border\" rel=\"Ext.layout.container.Border\" class=\"docClass\">Ext.layout.container.Border</a></code> class when instances are\nadded as regions to the layout. Since it is valid to add any component to a border\nlayout as a region, this method must be added to <code><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></code> but is only ever\ncalled when that component is owned by a <code>border</code> layout.</p>\n\n<p><strong>Defined in override Ext.layout.container.border.Region.</strong></p>\n</div></div></div><div id='method-initCls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-initCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-initCls' class='name expandable'>initCls</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-initComponent' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.statusbar.StatusBar'>Ext.ux.statusbar.StatusBar</span><br/><a href='source/StatusBar.html#Ext-ux-statusbar-StatusBar-method-initComponent' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.statusbar.StatusBar-method-initComponent' class='name expandable'>initComponent</a>( <span class='pre'></span> )<strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>private\n\nThe initComponent template method is an important initialization step for a Component. ...</div><div class='long'><p>private</p>\n\n<p>The initComponent template method is an important initialization step for a Component. It is intended to be\nimplemented by each subclass of <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> to provide any needed constructor logic. The\ninitComponent method of the class being created is called first, with each initComponent method\nup the hierarchy to <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> being called thereafter. This makes it easy to implement and,\nif needed, override the constructor logic of the Component at any step in the hierarchy.</p>\n\n<p>The initComponent method <strong>must</strong> contain a call to <a href=\"#!/api/Ext.Base-method-callParent\" rel=\"Ext.Base-method-callParent\" class=\"docClass\">callParent</a> in order\nto ensure that the parent class' initComponent method is also called.</p>\n\n<p>All config options passed to the constructor are applied to <code>this</code> before initComponent is called,\nso you can simply access them with <code>this.someOption</code>.</p>\n\n<p>The following example demonstrates using a dynamic string for the text of a button at the time of\ninstantiation of the class.</p>\n\n<pre><code><a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('DynamicButtonText', {\n extend: '<a href=\"#!/api/Ext.button.Button\" rel=\"Ext.button.Button\" class=\"docClass\">Ext.button.Button</a>',\n\n initComponent: function() {\n this.text = new Date();\n this.renderTo = <a href=\"#!/api/Ext-method-getBody\" rel=\"Ext-method-getBody\" class=\"docClass\">Ext.getBody</a>();\n this.callParent();\n }\n});\n\n<a href=\"#!/api/Ext-method-onReady\" rel=\"Ext-method-onReady\" class=\"docClass\">Ext.onReady</a>(function() {\n <a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('DynamicButtonText');\n});\n</code></pre>\n <p>Available since: <b>1.1.0</b></p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<p>Overrides: <a href='#!/api/Ext.toolbar.Toolbar-method-initComponent' rel='Ext.toolbar.Toolbar-method-initComponent' class='docClass'>Ext.toolbar.Toolbar.initComponent</a></p></div></div></div><div id='method-initConfig' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-method-initConfig' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-method-initConfig' class='name expandable'>initConfig</a>( <span class='pre'>config</span> ) : <a href=\"#!/api/Ext.Base\" rel=\"Ext.Base\" class=\"docClass\">Ext.Base</a><strong class='chainable signature' >chainable</strong><strong class='protected signature' >protected</strong></div><div class='description'><div class='short'>Initialize configuration for this class. ...</div><div class='long'><p>Initialize configuration for this class. a typical example:</p>\n\n<pre><code><a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('My.awesome.Class', {\n // The default config\n config: {\n name: 'Awesome',\n isAwesome: true\n },\n\n constructor: function(config) {\n this.initConfig(config);\n }\n});\n\nvar awesome = new My.awesome.Class({\n name: 'Super Awesome'\n});\n\nalert(awesome.getName()); // 'Super Awesome'\n</code></pre>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>config</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Base\" rel=\"Ext.Base\" class=\"docClass\">Ext.Base</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-initContainer' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-initContainer' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-initContainer' class='name expandable'>initContainer</a>( <span class='pre'>container</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>container</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-initDraggable' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-initDraggable' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-initDraggable' class='name expandable'>initDraggable</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-initEvents' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-initEvents' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-initEvents' class='name expandable'>initEvents</a>( <span class='pre'></span> )<strong class='protected signature' >protected</strong></div><div class='description'><div class='short'>Initialize any events on this component ...</div><div class='long'><p>Initialize any events on this component</p>\n</div></div></div><div id='method-initFrame' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-initFrame' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-initFrame' class='name expandable'>initFrame</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-initFramingTpl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-initFramingTpl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-initFramingTpl' class='name expandable'>initFramingTpl</a>( <span class='pre'>table</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Poke in a reference to applyRenderTpl(frameInfo, out) ...</div><div class='long'><p>Poke in a reference to applyRenderTpl(frameInfo, out)</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>table</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-initHierarchyEvents' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-method-initHierarchyEvents' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-method-initHierarchyEvents' class='name expandable'>initHierarchyEvents</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-initHierarchyState' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-initHierarchyState' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-initHierarchyState' class='name expandable'>initHierarchyState</a>( <span class='pre'>hierarchyState</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Called by getHierarchyState to initialize the hierarchyState the first\ntime it is requested. ...</div><div class='long'><p>Called by <a href=\"#!/api/Ext.AbstractComponent-method-getHierarchyState\" rel=\"Ext.AbstractComponent-method-getHierarchyState\" class=\"docClass\">getHierarchyState</a> to initialize the hierarchyState the first\ntime it is requested.</p>\n\n<p><strong>Overridden in Ext.rtl.AbstractComponent.</strong></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>hierarchyState</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-initItems' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-initItems' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-initItems' class='name expandable'>initItems</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-initPadding' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-initPadding' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-initPadding' class='name expandable'>initPadding</a>( <span class='pre'>targetEl</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Initializes padding by applying it to the target element, or if the layout manages\npadding ensures that the padding o...</div><div class='long'><p>Initializes padding by applying it to the target element, or if the layout manages\npadding ensures that the padding on the target element is \"0\".</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>targetEl</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-initPlugin' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-initPlugin' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-initPlugin' class='name expandable'>initPlugin</a>( <span class='pre'>plugin</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>plugin</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-initRenderData' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-initRenderData' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-initRenderData' class='name expandable'>initRenderData</a>( <span class='pre'></span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><strong class='protected signature' >protected</strong></div><div class='description'><div class='short'>Initialized the renderData to be used when rendering the renderTpl. ...</div><div class='long'><p>Initialized the renderData to be used when rendering the renderTpl.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p>Object with keys and values that are going to be applied to the renderTpl</p>\n</div></li></ul></div></div></div><div id='method-initRenderTpl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-initRenderTpl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-initRenderTpl' class='name expandable'>initRenderTpl</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.XTemplate\" rel=\"Ext.XTemplate\" class=\"docClass\">Ext.XTemplate</a><strong class='private signature' >private</strong></div><div class='description'><div class='short'>Initializes the renderTpl. ...</div><div class='long'><p>Initializes the renderTpl.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.XTemplate\" rel=\"Ext.XTemplate\" class=\"docClass\">Ext.XTemplate</a></span><div class='sub-desc'><p>The renderTpl XTemplate instance.</p>\n</div></li></ul></div></div></div><div id='method-initResizable' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-initResizable' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-initResizable' class='name expandable'>initResizable</a>( <span class='pre'>resizable</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>resizable</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-initState' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.state.Stateful' rel='Ext.state.Stateful' class='defined-in docClass'>Ext.state.Stateful</a><br/><a href='source/Stateful.html#Ext-state-Stateful-method-initState' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.state.Stateful-method-initState' class='name expandable'>initState</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Initializes the state of the object upon construction. ...</div><div class='long'><p>Initializes the state of the object upon construction.</p>\n</div></div></div><div id='method-initStyles' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-initStyles' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-initStyles' class='name expandable'>initStyles</a>( <span class='pre'>targetEl</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Applies padding, margin, border, top, left, height, and width configs to the\nappropriate elements. ...</div><div class='long'><p>Applies padding, margin, border, top, left, height, and width configs to the\nappropriate elements.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>targetEl</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-insert' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-method-insert' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-method-insert' class='name expandable'>insert</a>( <span class='pre'>index, component</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Inserts a Component into this Container at a specified index. ...</div><div class='long'><p>Inserts a Component into this Container at a specified index.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>index</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The index at which the Component will be inserted.</p>\n</div></li><li><span class='pre'>component</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/HTMLElement<div class='sub-desc'><p>See <a href=\"#!/api/Ext.toolbar.Toolbar-method-add\" rel=\"Ext.toolbar.Toolbar-method-add\" class=\"docClass\">add</a> method for overview of possible values.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>The component that was inserted.</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.container.AbstractContainer-method-insert' rel='Ext.container.AbstractContainer-method-insert' class='docClass'>Ext.container.AbstractContainer.insert</a></p></div></div></div><div id='method-is' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-is' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-is' class='name expandable'>is</a>( <span class='pre'>selector</span> ) : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></div><div class='description'><div class='short'>Tests whether this Component matches the selector string. ...</div><div class='long'><p>Tests whether this Component matches the selector string.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>selector</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The selector string to test against.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'><p><code>true</code> if this Component matches the selector.</p>\n</div></li></ul></div></div></div><div id='method-isAncestor' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-isAncestor' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-isAncestor' class='name expandable'>isAncestor</a>( <span class='pre'>possibleDescendant</span> )</div><div class='description'><div class='short'>Determines whether this Container is an ancestor of the passed Component. ...</div><div class='long'><p>Determines whether <strong>this Container</strong> is an ancestor of the passed Component.\nThis will return <code>true</code> if the passed Component is anywhere within the subtree\nbeneath this Container.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>possibleDescendant</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'><p>The Component to test for presence\nwithin this Container's subtree.</p>\n</div></li></ul></div></div></div><div id='method-isContainedFloater' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-isContainedFloater' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-isContainedFloater' class='name expandable'>isContainedFloater</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Utility method to determine if a Component is floating, and has an owning Container whose coordinate system\nit must b...</div><div class='long'><p>Utility method to determine if a Component is floating, and has an owning Container whose coordinate system\nit must be positioned in when using setPosition.</p>\n</div></div></div><div id='method-isDescendant' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-isDescendant' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-isDescendant' class='name expandable'>isDescendant</a>( <span class='pre'>ancestor</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>ancestor</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-isDescendantOf' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-isDescendantOf' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-isDescendantOf' class='name expandable'>isDescendantOf</a>( <span class='pre'>container</span> ) : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></div><div class='description'><div class='short'>Determines whether this component is the descendant of a particular container. ...</div><div class='long'><p>Determines whether this component is the descendant of a particular container.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>container</span> : <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.Container</a><div class='sub-desc'>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'><p><code>true</code> if the component is the descendant of a particular container, otherwise <code>false</code>.</p>\n</div></li></ul></div></div></div><div id='method-isDisabled' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-isDisabled' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-isDisabled' class='name expandable'>isDisabled</a>( <span class='pre'></span> ) : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></div><div class='description'><div class='short'>Method to determine whether this Component is currently disabled. ...</div><div class='long'><p>Method to determine whether this Component is currently disabled.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'><p>the disabled state of this Component.</p>\n</div></li></ul></div></div></div><div id='method-isDraggable' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-isDraggable' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-isDraggable' class='name expandable'>isDraggable</a>( <span class='pre'></span> ) : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></div><div class='description'><div class='short'>Method to determine whether this Component is draggable. ...</div><div class='long'><p>Method to determine whether this Component is draggable.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'><p>the draggable state of this component.</p>\n</div></li></ul></div></div></div><div id='method-isDroppable' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-isDroppable' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-isDroppable' class='name expandable'>isDroppable</a>( <span class='pre'></span> ) : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></div><div class='description'><div class='short'>Method to determine whether this Component is droppable. ...</div><div class='long'><p>Method to determine whether this Component is droppable.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'><p>the droppable state of this component.</p>\n</div></li></ul></div></div></div><div id='method-isFloating' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-isFloating' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-isFloating' class='name expandable'>isFloating</a>( <span class='pre'></span> ) : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></div><div class='description'><div class='short'>Method to determine whether this Component is floating. ...</div><div class='long'><p>Method to determine whether this Component is floating.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'><p>the floating state of this component.</p>\n</div></li></ul></div></div></div><div id='method-isFocusable' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-isFocusable' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-isFocusable' class='name expandable'>isFocusable</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-isHidden' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-isHidden' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-isHidden' class='name expandable'>isHidden</a>( <span class='pre'></span> ) : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></div><div class='description'><div class='short'>Method to determine whether this Component is currently set to hidden. ...</div><div class='long'><p>Method to determine whether this Component is currently set to hidden.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'><p>the hidden state of this Component.</p>\n</div></li></ul></div></div></div><div id='method-isHierarchicallyHidden' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-isHierarchicallyHidden' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-isHierarchicallyHidden' class='name expandable'>isHierarchicallyHidden</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-isLayoutRoot' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-isLayoutRoot' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-isLayoutRoot' class='name expandable'>isLayoutRoot</a>( <span class='pre'></span> )<strong class='protected signature' >protected</strong></div><div class='description'><div class='short'>Determines whether this Component is the root of a layout. ...</div><div class='long'><p>Determines whether this Component is the root of a layout. This returns <code>true</code> if\nthis component can run its layout without assistance from or impact on its owner.\nIf this component cannot run its layout given these restrictions, <code>false</code> is returned\nand its owner will be considered as the next candidate for the layout root.</p>\n\n<p>Setting the <a href=\"#!/api/Ext.AbstractComponent-property-_isLayoutRoot\" rel=\"Ext.AbstractComponent-property-_isLayoutRoot\" class=\"docClass\">_isLayoutRoot</a> property to <code>true</code> causes this method to always\nreturn <code>true</code>. This may be useful when updating a layout of a Container which shrink\nwraps content, and you know that it will not change size, and so can safely be the\ntopmost participant in the layout run.</p>\n</div></div></div><div id='method-isLayoutSuspended' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-isLayoutSuspended' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-isLayoutSuspended' class='name expandable'>isLayoutSuspended</a>( <span class='pre'></span> ) : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></div><div class='description'><div class='short'>Returns true if layout is suspended for this component. ...</div><div class='long'><p>Returns <code>true</code> if layout is suspended for this component. This can come from direct\nsuspension of this component's layout activity (<a href=\"#!/api/Ext.container.Container-cfg-suspendLayout\" rel=\"Ext.container.Container-cfg-suspendLayout\" class=\"docClass\">Ext.Container.suspendLayout</a>) or if one\nof this component's containers is suspended.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'><p><code>true</code> layout of this component is suspended.</p>\n</div></li></ul></div></div></div><div id='method-isLocalRtl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent2.html#Ext-AbstractComponent-method-isLocalRtl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-isLocalRtl' class='name expandable'>isLocalRtl</a>( <span class='pre'></span> ) : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><strong class='private signature' >private</strong></div><div class='description'><div class='short'>Returns true if this component's local coordinate system is rtl. ...</div><div class='long'><p>Returns true if this component's local coordinate system is rtl. For normal\ncomponents this equates to the value of isParentRtl(). Floaters are a bit different\nbecause a floater's element can be a childNode of something other than its\nparent component's element. For floaters we have to read the dom to see if the\ncomponent's element's parentNode has a css direction value of \"rtl\".</p>\n\n<p><strong>Defined in override Ext.rtl.AbstractComponent.</strong></p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-isOppositeRootDirection' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent2.html#Ext-AbstractComponent-method-isOppositeRootDirection' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-isOppositeRootDirection' class='name expandable'>isOppositeRootDirection</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Defined in override Ext.rtl.AbstractComponent. ...</div><div class='long'><p><strong>Defined in override Ext.rtl.AbstractComponent.</strong></p>\n</div></div></div><div id='method-isParentRtl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent2.html#Ext-AbstractComponent-method-isParentRtl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-isParentRtl' class='name expandable'>isParentRtl</a>( <span class='pre'></span> ) : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><strong class='private signature' >private</strong></div><div class='description'><div class='short'>Returns true if this component's parent container is rtl. ...</div><div class='long'><p>Returns true if this component's parent container is rtl. Used by rtl positioning\nmethods to determine if the component should be positioned using a right-to-left\ncoordinate system.</p>\n\n<p><strong>Defined in override Ext.rtl.AbstractComponent.</strong></p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-isVisible' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-isVisible' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-isVisible' class='name expandable'>isVisible</a>( <span class='pre'>[deep]</span> ) : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></div><div class='description'><div class='short'>Returns true if this component is visible. ...</div><div class='long'><p>Returns <code>true</code> if this component is visible.</p>\n <p>Available since: <b>1.1.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>deep</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p>Pass <code>true</code> to interrogate the visibility status of all parent Containers to\ndetermine whether this Component is truly visible to the user.</p>\n\n<p>Generally, to determine whether a Component is hidden, the no argument form is needed. For example when creating\ndynamically laid out UIs in a hidden Container before showing them.</p>\n<p>Defaults to: <code>false</code></p></div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'><p><code>true</code> if this component is visible, <code>false</code> otherwise.</p>\n</div></li></ul></div></div></div><div id='method-isXType' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-isXType' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-isXType' class='name expandable'>isXType</a>( <span class='pre'>xtype, [shallow]</span> ) : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></div><div class='description'><div class='short'>Tests whether or not this Component is of a specific xtype. ...</div><div class='long'><p>Tests whether or not this Component is of a specific xtype. This can test whether this Component is descended\nfrom the xtype (default) or whether it is directly of the xtype specified (<code>shallow = true</code>).</p>\n\n<p><strong>If using your own subclasses, be aware that a Component must register its own xtype to participate in\ndetermination of inherited xtypes.</strong></p>\n\n<p>For a list of all available xtypes, see the <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> header.</p>\n\n<p>Example usage:</p>\n\n<pre class='inline-example '><code>var t = new <a href=\"#!/api/Ext.form.field.Text\" rel=\"Ext.form.field.Text\" class=\"docClass\">Ext.form.field.Text</a>();\nvar isText = t.isXType('textfield'); // true\nvar isBoxSubclass = t.isXType('field'); // true, descended from <a href=\"#!/api/Ext.form.field.Base\" rel=\"Ext.form.field.Base\" class=\"docClass\">Ext.form.field.Base</a>\nvar isBoxInstance = t.isXType('field', true); // false, not a direct <a href=\"#!/api/Ext.form.field.Base\" rel=\"Ext.form.field.Base\" class=\"docClass\">Ext.form.field.Base</a> instance\n</code></pre>\n <p>Available since: <b>2.3.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>xtype</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The xtype to check for this Component</p>\n</div></li><li><span class='pre'>shallow</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p><code>true</code> to check whether this Component is directly of the specified xtype, <code>false</code> to\ncheck whether this Component is descended from the xtype.</p>\n<p>Defaults to: <code>false</code></p></div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'><p><code>true</code> if this component descends from the specified xtype, <code>false</code> otherwise.</p>\n</div></li></ul></div></div></div><div id='method-lookupComponent' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-method-lookupComponent' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-method-lookupComponent' class='name expandable'>lookupComponent</a>( <span class='pre'>c</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>c</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.container.AbstractContainer-method-lookupComponent' rel='Ext.container.AbstractContainer-method-lookupComponent' class='docClass'>Ext.container.AbstractContainer.lookupComponent</a></p></div></div></div><div id='method-makeFloating' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-makeFloating' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-makeFloating' class='name expandable'>makeFloating</a>( <span class='pre'>dom</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>dom</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-mask' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-mask' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-mask' class='name expandable'>mask</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-mon' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-mon' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-mon' class='name expandable'>mon</a>( <span class='pre'>item, ename, [fn], [scope], [options]</span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></div><div class='description'><div class='short'>Shorthand for addManagedListener. ...</div><div class='long'><p>Shorthand for <a href=\"#!/api/Ext.util.Observable-method-addManagedListener\" rel=\"Ext.util.Observable-method-addManagedListener\" class=\"docClass\">addManagedListener</a>.</p>\n\n<p>Adds listeners to any Observable object (or <a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a>) which are automatically removed when this Component is\ndestroyed.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>item</span> : <a href=\"#!/api/Ext.util.Observable\" rel=\"Ext.util.Observable\" class=\"docClass\">Ext.util.Observable</a>/<a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a><div class='sub-desc'><p>The item to which to add a listener/listeners.</p>\n\n</div></li><li><span class='pre'>ename</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The event name, or an object containing event name properties.</p>\n\n</div></li><li><span class='pre'>fn</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a> (optional)<div class='sub-desc'><p>If the <code>ename</code> parameter was an event name, this is the handler function.</p>\n\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>If the <code>ename</code> parameter was an event name, this is the scope (<code>this</code> reference)\nin which the handler function is executed.</p>\n\n</div></li><li><span class='pre'>options</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>If the <code>ename</code> parameter was an event name, this is the\n<a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">addListener</a> options.</p>\n\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p><strong>Only when the <code>destroyable</code> option is specified. </strong></p>\n\n\n\n\n<p> A <code>Destroyable</code> object. An object which implements the <code>destroy</code> method which removes all listeners added in this call. For example:</p>\n\n\n\n\n<pre><code>this.btnListeners = = myButton.mon({\n destroyable: true\n mouseover: function() { console.log('mouseover'); },\n mouseout: function() { console.log('mouseout'); },\n click: function() { console.log('click'); }\n});\n</code></pre>\n\n\n\n\n<p>And when those listeners need to be removed:</p>\n\n\n\n\n<pre><code><a href=\"#!/api/Ext-method-destroy\" rel=\"Ext-method-destroy\" class=\"docClass\">Ext.destroy</a>(this.btnListeners);\n</code></pre>\n\n\n\n\n<p>or</p>\n\n\n\n\n<pre><code>this.btnListeners.destroy();\n</code></pre>\n\n</div></li></ul></div></div></div><div id='method-move' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-move' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-move' class='name expandable'>move</a>( <span class='pre'>fromIdx, toIdx</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Moves a Component within the Container ...</div><div class='long'><p>Moves a Component within the Container</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>fromIdx</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/<a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'><p>The index/component to move.</p>\n</div></li><li><span class='pre'>toIdx</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The new index for the Component.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>component The Component that was moved.</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.util.Positionable-method-move' rel='Ext.util.Positionable-method-move' class='docClass'>Ext.util.Positionable.move</a></p></div></div></div><div id='method-mun' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-mun' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-mun' class='name expandable'>mun</a>( <span class='pre'>item, ename, [fn], [scope]</span> )</div><div class='description'><div class='short'>Shorthand for removeManagedListener. ...</div><div class='long'><p>Shorthand for <a href=\"#!/api/Ext.util.Observable-method-removeManagedListener\" rel=\"Ext.util.Observable-method-removeManagedListener\" class=\"docClass\">removeManagedListener</a>.</p>\n\n<p>Removes listeners that were added by the <a href=\"#!/api/Ext.util.Observable-method-mon\" rel=\"Ext.util.Observable-method-mon\" class=\"docClass\">mon</a> method.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>item</span> : <a href=\"#!/api/Ext.util.Observable\" rel=\"Ext.util.Observable\" class=\"docClass\">Ext.util.Observable</a>/<a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a><div class='sub-desc'><p>The item from which to remove a listener/listeners.</p>\n\n</div></li><li><span class='pre'>ename</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The event name, or an object containing event name properties.</p>\n\n</div></li><li><span class='pre'>fn</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a> (optional)<div class='sub-desc'><p>If the <code>ename</code> parameter was an event name, this is the handler function.</p>\n\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>If the <code>ename</code> parameter was an event name, this is the scope (<code>this</code> reference)\nin which the handler function is executed.</p>\n\n</div></li></ul></div></div></div><div id='method-nextChild' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-nextChild' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-nextChild' class='name expandable'>nextChild</a>( <span class='pre'>child, selector</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>child</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>selector</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-nextNode' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-nextNode' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-nextNode' class='name expandable'>nextNode</a>( <span class='pre'>[selector]</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Returns the next node in the Component tree in tree traversal order. ...</div><div class='long'><p>Returns the next node in the Component tree in tree traversal order.</p>\n\n<p>Note that this is not limited to siblings, and if invoked upon a node with no matching siblings, will walk the\ntree to attempt to find a match. Contrast with <a href=\"#!/api/Ext.AbstractComponent-method-nextSibling\" rel=\"Ext.AbstractComponent-method-nextSibling\" class=\"docClass\">nextSibling</a>.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>selector</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a> (optional)<div class='sub-desc'><p>A <a href=\"#!/api/Ext.ComponentQuery\" rel=\"Ext.ComponentQuery\" class=\"docClass\">ComponentQuery</a> selector to filter the following nodes.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>The next node (or the next node which matches the selector).\nReturns <code>null</code> if there is no matching node.</p>\n</div></li></ul></div></div></div><div id='method-nextSibling' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-nextSibling' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-nextSibling' class='name expandable'>nextSibling</a>( <span class='pre'>[selector]</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Returns the next sibling of this Component. ...</div><div class='long'><p>Returns the next sibling of this Component.</p>\n\n<p>Optionally selects the next sibling which matches the passed <a href=\"#!/api/Ext.ComponentQuery\" rel=\"Ext.ComponentQuery\" class=\"docClass\">ComponentQuery</a> selector.</p>\n\n<p>May also be referred to as <strong><code>next()</code></strong></p>\n\n<p>Note that this is limited to siblings, and if no siblings of the item match, <code>null</code> is returned. Contrast with\n<a href=\"#!/api/Ext.AbstractComponent-method-nextNode\" rel=\"Ext.AbstractComponent-method-nextNode\" class=\"docClass\">nextNode</a></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>selector</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a> (optional)<div class='sub-desc'><p>A <a href=\"#!/api/Ext.ComponentQuery\" rel=\"Ext.ComponentQuery\" class=\"docClass\">ComponentQuery</a> selector to filter the following items.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>The next sibling (or the next sibling which matches the selector).\nReturns <code>null</code> if there is no matching sibling.</p>\n</div></li></ul></div></div></div><div id='method-on' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-on' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-on' class='name expandable'>on</a>( <span class='pre'>eventName, [fn], [scope], [options]</span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></div><div class='description'><div class='short'>Shorthand for addListener. ...</div><div class='long'><p>Shorthand for <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">addListener</a>.</p>\n\n<p>Appends an event handler to this object. For example:</p>\n\n<pre><code>myGridPanel.on(\"mouseover\", this.onMouseOver, this);\n</code></pre>\n\n<p>The method also allows for a single argument to be passed which is a config object\ncontaining properties which specify multiple events. For example:</p>\n\n<pre><code>myGridPanel.on({\n cellClick: this.onCellClick,\n mouseover: this.onMouseOver,\n mouseout: this.onMouseOut,\n scope: this // Important. Ensure \"this\" is correct during handler execution\n});\n</code></pre>\n\n<p>One can also specify options for each event handler separately:</p>\n\n<pre><code>myGridPanel.on({\n cellClick: {fn: this.onCellClick, scope: this, single: true},\n mouseover: {fn: panel.onMouseOver, scope: panel}\n});\n</code></pre>\n\n<p><em>Names</em> of methods in a specified scope may also be used. Note that\n<code>scope</code> MUST be specified to use this option:</p>\n\n<pre><code>myGridPanel.on({\n cellClick: {fn: 'onCellClick', scope: this, single: true},\n mouseover: {fn: 'onMouseOver', scope: panel}\n});\n</code></pre>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>eventName</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The name of the event to listen for.\nMay also be an object who's property names are event names.</p>\n\n</div></li><li><span class='pre'>fn</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a> (optional)<div class='sub-desc'><p>The method the event invokes, or <em>if <code>scope</code> is specified, the </em>name* of the method within\nthe specified <code>scope</code>. Will be called with arguments\ngiven to <a href=\"#!/api/Ext.util.Observable-method-fireEvent\" rel=\"Ext.util.Observable-method-fireEvent\" class=\"docClass\">fireEvent</a> plus the <code>options</code> parameter described below.</p>\n\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>The scope (<code>this</code> reference) in which the handler function is\nexecuted. <strong>If omitted, defaults to the object which fired the event.</strong></p>\n\n</div></li><li><span class='pre'>options</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>An object containing handler configuration.</p>\n\n\n\n\n<p><strong>Note:</strong> Unlike in ExtJS 3.x, the options object will also be passed as the last\nargument to every event handler.</p>\n\n\n\n\n<p>This object may contain any of the following properties:</p>\n\n<ul><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The scope (<code>this</code> reference) in which the handler function is executed. <strong>If omitted,\n defaults to the object which fired the event.</strong></p>\n\n</div></li><li><span class='pre'>delay</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The number of milliseconds to delay the invocation of the handler after the event fires.</p>\n\n</div></li><li><span class='pre'>single</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><div class='sub-desc'><p>True to add a handler to handle just the next firing of the event, and then remove itself.</p>\n\n</div></li><li><span class='pre'>buffer</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>Causes the handler to be scheduled to run in an <a href=\"#!/api/Ext.util.DelayedTask\" rel=\"Ext.util.DelayedTask\" class=\"docClass\">Ext.util.DelayedTask</a> delayed\n by the specified number of milliseconds. If the event fires again within that time,\n the original handler is <em>not</em> invoked, but the new handler is scheduled in its place.</p>\n\n</div></li><li><span class='pre'>target</span> : <a href=\"#!/api/Ext.util.Observable\" rel=\"Ext.util.Observable\" class=\"docClass\">Ext.util.Observable</a><div class='sub-desc'><p>Only call the handler if the event was fired on the target Observable, <em>not</em> if the event\n was bubbled up from a child Observable.</p>\n\n</div></li><li><span class='pre'>element</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p><strong>This option is only valid for listeners bound to <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Components</a>.</strong>\n The name of a Component property which references an element to add a listener to.</p>\n\n\n\n\n<p> This option is useful during Component construction to add DOM event listeners to elements of\n <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Components</a> which will exist only after the Component is rendered.\n For example, to add a click listener to a Panel's body:</p>\n\n\n\n\n<pre><code> new <a href=\"#!/api/Ext.panel.Panel\" rel=\"Ext.panel.Panel\" class=\"docClass\">Ext.panel.Panel</a>({\n title: 'The title',\n listeners: {\n click: this.handlePanelClick,\n element: 'body'\n }\n });\n</code></pre>\n\n</div></li><li><span class='pre'>destroyable</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p>When specified as <code>true</code>, the function returns A <code>Destroyable</code> object. An object which implements the <code>destroy</code> method which removes all listeners added in this call.</p>\n\n<p>Defaults to: <code>false</code></p></div></li><li><span class='pre'>priority</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a> (optional)<div class='sub-desc'><p>An optional numeric priority that determines the order in which event handlers\n are run. Event handlers with no priority will be run as if they had a priority\n of 0. Handlers with a higher priority will be prioritized to run sooner than\n those with a lower priority. Negative numbers can be used to set a priority\n lower than the default. Internally, the framework uses a range of 1000 or\n greater, and -1000 or lesser for handers that are intended to run before or\n after all others, so it is recommended to stay within the range of -999 to 999\n when setting the priority of event handlers in application-level code.</p>\n\n\n\n\n<p><strong>Combining Options</strong></p>\n\n\n\n\n<p>Using the options argument, it is possible to combine different types of listeners:</p>\n\n\n\n\n<p>A delayed, one-time listener.</p>\n\n\n\n\n<pre><code>myPanel.on('hide', this.handleClick, this, {\n single: true,\n delay: 100\n});\n</code></pre>\n\n</div></li></ul></div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p><strong>Only when the <code>destroyable</code> option is specified. </strong></p>\n\n\n\n\n<p> A <code>Destroyable</code> object. An object which implements the <code>destroy</code> method which removes all listeners added in this call. For example:</p>\n\n\n\n\n<pre><code>this.btnListeners = = myButton.on({\n destroyable: true\n mouseover: function() { console.log('mouseover'); },\n mouseout: function() { console.log('mouseout'); },\n click: function() { console.log('click'); }\n});\n</code></pre>\n\n\n\n\n<p>And when those listeners need to be removed:</p>\n\n\n\n\n<pre><code><a href=\"#!/api/Ext-method-destroy\" rel=\"Ext-method-destroy\" class=\"docClass\">Ext.destroy</a>(this.btnListeners);\n</code></pre>\n\n\n\n\n<p>or</p>\n\n\n\n\n<pre><code>this.btnListeners.destroy();\n</code></pre>\n\n</div></li></ul></div></div></div><div id='method-onAdd' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-method-onAdd' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-method-onAdd' class='name expandable'>onAdd</a>( <span class='pre'>component, position</span> )<strong class='private signature' >private</strong><strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>This method is invoked after a new Component has been added. ...</div><div class='long'><p>This method is invoked after a new Component has been added. It\nis passed the Component which has been added. This method may\nbe used to update any internal structure which may depend upon\nthe state of the child items.</p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>component</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>position</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.container.AbstractContainer-method-onAdd' rel='Ext.container.AbstractContainer-method-onAdd' class='docClass'>Ext.container.AbstractContainer.onAdd</a></p></div></div></div><div id='method-onAdded' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-onAdded' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-onAdded' class='name expandable'>onAdded</a>( <span class='pre'>container, pos</span> )<strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>Method to manage awareness of when components are added to their\nrespective Container, firing an added event. ...</div><div class='long'><p>Method to manage awareness of when components are added to their\nrespective Container, firing an <a href=\"#!/api/Ext.Component-event-added\" rel=\"Ext.Component-event-added\" class=\"docClass\">added</a> event. References are\nestablished at add time rather than at render time.</p>\n\n<p>Allows addition of behavior when a Component is added to a\nContainer. At this stage, the Component is in the parent\nContainer's collection of child items. After calling the\nsuperclass's <code>onAdded</code>, the <code>ownerCt</code> reference will be present,\nand if configured with a ref, the <code>refOwner</code> will be set.</p>\n <p>Available since: <b>3.4.0</b></p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>container</span> : <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a><div class='sub-desc'><p>Container which holds the component.</p>\n</div></li><li><span class='pre'>pos</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>Position at which the component was added.</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.AbstractComponent-method-onAdded' rel='Ext.AbstractComponent-method-onAdded' class='docClass'>Ext.AbstractComponent.onAdded</a></p></div></div></div><div id='method-onAfterFloatLayout' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-method-onAfterFloatLayout' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-method-onAfterFloatLayout' class='name expandable'>onAfterFloatLayout</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-onBeforeAdd' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-method-onBeforeAdd' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-method-onBeforeAdd' class='name expandable'>onBeforeAdd</a>( <span class='pre'>item</span> )<strong class='private signature' >private</strong><strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>This method is invoked before adding a new child Component. ...</div><div class='long'><p>This method is invoked before adding a new child Component. It\nis passed the new Component, and may be used to modify the\nComponent, or prepare the Container in some way. Returning\nfalse aborts the add operation.</p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>item</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.container.AbstractContainer-method-onBeforeAdd' rel='Ext.container.AbstractContainer-method-onBeforeAdd' class='docClass'>Ext.container.AbstractContainer.onBeforeAdd</a></p></div></div></div><div id='method-onBeforeFloatLayout' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-method-onBeforeFloatLayout' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-method-onBeforeFloatLayout' class='name expandable'>onBeforeFloatLayout</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-onBlur' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-onBlur' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-onBlur' class='name expandable'>onBlur</a>( <span class='pre'>e</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>private ...</div><div class='long'><p>private</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>e</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-onBoxReady' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-onBoxReady' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-onBoxReady' class='name expandable'>onBoxReady</a>( <span class='pre'>width, height</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>width</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>height</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-onButtonMenuHide' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-method-onButtonMenuHide' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-method-onButtonMenuHide' class='name expandable'>onButtonMenuHide</a>( <span class='pre'>btn</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>btn</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-onButtonMenuShow' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-method-onButtonMenuShow' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-method-onButtonMenuShow' class='name expandable'>onButtonMenuShow</a>( <span class='pre'>btn</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>btn</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-onButtonOver' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-method-onButtonOver' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-method-onButtonOver' class='name expandable'>onButtonOver</a>( <span class='pre'>btn</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>btn</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-onConfigUpdate' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-method-onConfigUpdate' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-method-onConfigUpdate' class='name expandable'>onConfigUpdate</a>( <span class='pre'>names, callback, scope</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>names</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>callback</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-onDestroy' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-onDestroy' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-onDestroy' class='name expandable'>onDestroy</a>( <span class='pre'></span> )<strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>Allows addition of behavior to the destroy operation. ...</div><div class='long'><p>Allows addition of behavior to the destroy operation.\nAfter calling the superclass's onDestroy, the Component will be destroyed.</p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<p>Overrides: <a href='#!/api/Ext.AbstractComponent-method-onDestroy' rel='Ext.AbstractComponent-method-onDestroy' class='docClass'>Ext.AbstractComponent.onDestroy</a></p></div></div></div><div id='method-onDisable' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-onDisable' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-onDisable' class='name expandable'>onDisable</a>( <span class='pre'></span> )<strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>Allows addition of behavior to the disable operation. ...</div><div class='long'><p>Allows addition of behavior to the disable operation.\nAfter calling the superclass's <code>onDisable</code>, the Component will be disabled.</p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n</div></div></div><div id='method-onEnable' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-onEnable' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-onEnable' class='name expandable'>onEnable</a>( <span class='pre'></span> )<strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>Allows addition of behavior to the enable operation. ...</div><div class='long'><p>Allows addition of behavior to the enable operation.\nAfter calling the superclass's <code>onEnable</code>, the Component will be enabled.</p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n</div></div></div><div id='method-onFloatShow' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-method-onFloatShow' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-method-onFloatShow' class='name expandable'>onFloatShow</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-onFocus' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-onFocus' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-onFocus' class='name expandable'>onFocus</a>( <span class='pre'>e</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>private ...</div><div class='long'><p>private</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>e</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-onHide' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-onHide' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-onHide' class='name expandable'>onHide</a>( <span class='pre'>[animateTarget], [callback], [scope]</span> )<strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>Possibly animates down to a target element. ...</div><div class='long'><p>Possibly animates down to a target element.</p>\n\n<p>Allows addition of behavior to the hide operation. After\ncalling the superclass’s onHide, the Component will be hidden.</p>\n\n<p>Gets passed the same parameters as <a href=\"#!/api/Ext.Component-method-hide\" rel=\"Ext.Component-method-hide\" class=\"docClass\">hide</a>.</p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>animateTarget</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a>/<a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> (optional)<div class='sub-desc'>\n</div></li><li><span class='pre'>callback</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a> (optional)<div class='sub-desc'>\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.AbstractComponent-method-onHide' rel='Ext.AbstractComponent-method-onHide' class='docClass'>Ext.AbstractComponent.onHide</a></p></div></div></div><div id='method-onKeyDown' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-method-onKeyDown' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-method-onKeyDown' class='name expandable'>onKeyDown</a>( <span class='pre'>e</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Listen for TAB events and wrap round if tabbing of either end of the Floater ...</div><div class='long'><p>Listen for TAB events and wrap round if tabbing of either end of the Floater</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>e</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-onMouseDown' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-method-onMouseDown' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-method-onMouseDown' class='name expandable'>onMouseDown</a>( <span class='pre'>e</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Mousedown brings to front, and programatically grabs focus unless the mousedown was on a focusable element ...</div><div class='long'><p>Mousedown brings to front, and programatically grabs focus <em>unless the mousedown was on a focusable element</em></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>e</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-onMove' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-onMove' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-onMove' class='name expandable'>onMove</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-onPosition' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-onPosition' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-onPosition' class='name expandable'>onPosition</a>( <span class='pre'>x, y</span> )<strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>Called after the component is moved, this method is empty by default but can be implemented by any\nsubclass that need...</div><div class='long'><p>Called after the component is moved, this method is empty by default but can be implemented by any\nsubclass that needs to perform custom logic after a move occurs.</p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>x</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The new x position.</p>\n</div></li><li><span class='pre'>y</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The new y position.</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.AbstractComponent-method-onPosition' rel='Ext.AbstractComponent-method-onPosition' class='docClass'>Ext.AbstractComponent.onPosition</a></p></div></div></div><div id='method-onRemove' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-method-onRemove' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-method-onRemove' class='name expandable'>onRemove</a>( <span class='pre'>component, autoDestroy</span> )<strong class='private signature' >private</strong><strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>This method is invoked after a new Component has been\nremoved. ...</div><div class='long'><p>This method is invoked after a new Component has been\nremoved. It is passed the Component which has been\nremoved. This method may be used to update any internal\nstructure which may depend upon the state of the child items.</p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>component</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>autoDestroy</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><div class='sub-desc'>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.container.AbstractContainer-method-onRemove' rel='Ext.container.AbstractContainer-method-onRemove' class='docClass'>Ext.container.AbstractContainer.onRemove</a></p></div></div></div><div id='method-onRemoved' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-onRemoved' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-onRemoved' class='name expandable'>onRemoved</a>( <span class='pre'>destroying</span> )<strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>Method to manage awareness of when components are removed from their\nrespective Container, firing a removed event. ...</div><div class='long'><p>Method to manage awareness of when components are removed from their\nrespective Container, firing a <a href=\"#!/api/Ext.AbstractComponent-event-removed\" rel=\"Ext.AbstractComponent-event-removed\" class=\"docClass\">removed</a> event. References are properly\ncleaned up after removing a component from its owning container.</p>\n\n<p>Allows addition of behavior when a Component is removed from\nits parent Container. At this stage, the Component has been\nremoved from its parent Container's collection of child items,\nbut has not been destroyed (It will be destroyed if the parent\nContainer's <code>autoDestroy</code> is <code>true</code>, or if the remove call was\npassed a truthy second parameter). After calling the\nsuperclass's <code>onRemoved</code>, the <code>ownerCt</code> and the <code>refOwner</code> will not\nbe present.</p>\n <p>Available since: <b>3.4.0</b></p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>destroying</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><div class='sub-desc'><p>Will be passed as <code>true</code> if the Container performing the remove operation will delete this\nComponent upon remove.</p>\n</div></li></ul></div></div></div><div id='method-onRender' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-onRender' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-onRender' class='name expandable'>onRender</a>( <span class='pre'>parentNode, containerIdx</span> )<strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>Template method called when this Component's DOM structure is created. ...</div><div class='long'><p>Template method called when this Component's DOM structure is created.</p>\n\n<p>At this point, this Component's (and all descendants') DOM structure <em>exists</em> but it has not\nbeen layed out (positioned and sized).</p>\n\n<p>Subclasses which override this to gain access to the structure at render time should\ncall the parent class's method before attempting to access any child elements of the Component.</p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>parentNode</span> : <a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.core.Element</a><div class='sub-desc'><p>The parent Element in which this Component's encapsulating element is contained.</p>\n</div></li><li><span class='pre'>containerIdx</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The index within the parent Container's child collection of this Component.</p>\n</div></li></ul></div></div></div><div id='method-onResize' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-onResize' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-onResize' class='name expandable'>onResize</a>( <span class='pre'>width, height, oldWidth, oldHeight</span> )<strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>Allows addition of behavior to the resize operation. ...</div><div class='long'><p>Allows addition of behavior to the resize operation.</p>\n\n<p>Called when Ext.resizer.Resizer#drag event is fired.</p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>width</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>height</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>oldWidth</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>oldHeight</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.AbstractComponent-method-onResize' rel='Ext.AbstractComponent-method-onResize' class='docClass'>Ext.AbstractComponent.onResize</a></p></div></div></div><div id='method-onShow' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-onShow' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-onShow' class='name expandable'>onShow</a>( <span class='pre'>[animateTarget], [callback], [scope]</span> )<strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>Allows addition of behavior to the show operation. ...</div><div class='long'><p>Allows addition of behavior to the show operation. After\ncalling the superclass's onShow, the Component will be visible.</p>\n\n<p>Override in subclasses where more complex behaviour is needed.</p>\n\n<p>Gets passed the same parameters as <a href=\"#!/api/Ext.Component-method-show\" rel=\"Ext.Component-method-show\" class=\"docClass\">show</a>.</p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>animateTarget</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a> (optional)<div class='sub-desc'>\n</div></li><li><span class='pre'>callback</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a> (optional)<div class='sub-desc'>\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.AbstractComponent-method-onShow' rel='Ext.AbstractComponent-method-onShow' class='docClass'>Ext.AbstractComponent.onShow</a></p></div></div></div><div id='method-onShowComplete' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-onShowComplete' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-onShowComplete' class='name expandable'>onShowComplete</a>( <span class='pre'>[callback], [scope]</span> )<strong class='protected signature' >protected</strong><strong class='template signature' >template</strong></div><div class='description'><div class='short'>Invoked after the afterShow method is complete. ...</div><div class='long'><p>Invoked after the <a href=\"#!/api/Ext.Component-method-afterShow\" rel=\"Ext.Component-method-afterShow\" class=\"docClass\">afterShow</a> method is complete.</p>\n\n<p>Gets passed the same <code>callback</code> and <code>scope</code> parameters that <a href=\"#!/api/Ext.Component-method-afterShow\" rel=\"Ext.Component-method-afterShow\" class=\"docClass\">afterShow</a> received.</p>\n <div class='signature-box template'>\n <p>This is a <a href=\"#!/guide/components\">template method</a>.\n a hook into the functionality of this class.\n Feel free to override it in child classes.</p>\n </div>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>callback</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a> (optional)<div class='sub-desc'>\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-onShowVeto' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-onShowVeto' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-onShowVeto' class='name expandable'>onShowVeto</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-onStateChange' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.state.Stateful' rel='Ext.state.Stateful' class='defined-in docClass'>Ext.state.Stateful</a><br/><a href='source/Stateful.html#Ext-state-Stateful-method-onStateChange' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.state.Stateful-method-onStateChange' class='name expandable'>onStateChange</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>This method is called when any of the stateEvents are fired. ...</div><div class='long'><p>This method is called when any of the <a href=\"#!/api/Ext.state.Stateful-cfg-stateEvents\" rel=\"Ext.state.Stateful-cfg-stateEvents\" class=\"docClass\">stateEvents</a> are fired.</p>\n</div></div></div><div id='method-parseBox' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-parseBox' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-parseBox' class='name expandable'>parseBox</a>( <span class='pre'>box</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Overridden in Ext.rtl.AbstractComponent. ...</div><div class='long'><p><strong>Overridden in Ext.rtl.AbstractComponent.</strong></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>box</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-postBlur' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-postBlur' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-postBlur' class='name expandable'>postBlur</a>( <span class='pre'>e</span> )<strong class='protected signature' >protected</strong></div><div class='description'><div class='short'>Template method to do any post-blur processing. ...</div><div class='long'><p>Template method to do any post-blur processing.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>e</span> : <a href=\"#!/api/Ext.EventObject\" rel=\"Ext.EventObject\" class=\"docClass\">Ext.EventObject</a><div class='sub-desc'><p>The event object</p>\n</div></li></ul></div></div></div><div id='method-prepareClass' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-prepareClass' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-prepareClass' class='name expandable'>prepareClass</a>( <span class='pre'>T</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Prepares a given class for observable instances. ...</div><div class='long'><p>Prepares a given class for observable instances. This method is called when a\nclass derives from this class or uses this class as a mixin.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>T</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a><div class='sub-desc'><p>The class constructor to prepare.</p>\n</div></li></ul></div></div></div><div id='method-prepareItems' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-prepareItems' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-prepareItems' class='name expandable'>prepareItems</a>( <span class='pre'>items, applyDefaults</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>items</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>applyDefaults</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-prevChild' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-prevChild' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-prevChild' class='name expandable'>prevChild</a>( <span class='pre'>child, selector</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>child</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>selector</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-previousNode' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-previousNode' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-previousNode' class='name expandable'>previousNode</a>( <span class='pre'>[selector]</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Returns the previous node in the Component tree in tree traversal order. ...</div><div class='long'><p>Returns the previous node in the Component tree in tree traversal order.</p>\n\n<p>Note that this is not limited to siblings, and if invoked upon a node with no matching siblings, will walk the\ntree in reverse order to attempt to find a match. Contrast with <a href=\"#!/api/Ext.AbstractComponent-method-previousSibling\" rel=\"Ext.AbstractComponent-method-previousSibling\" class=\"docClass\">previousSibling</a>.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>selector</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a> (optional)<div class='sub-desc'><p>A <a href=\"#!/api/Ext.ComponentQuery\" rel=\"Ext.ComponentQuery\" class=\"docClass\">ComponentQuery</a> selector to filter the preceding nodes.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>The previous node (or the previous node which matches the selector).\nReturns <code>null</code> if there is no matching node.</p>\n</div></li></ul></div></div></div><div id='method-previousSibling' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-previousSibling' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-previousSibling' class='name expandable'>previousSibling</a>( <span class='pre'>[selector]</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Returns the previous sibling of this Component. ...</div><div class='long'><p>Returns the previous sibling of this Component.</p>\n\n<p>Optionally selects the previous sibling which matches the passed <a href=\"#!/api/Ext.ComponentQuery\" rel=\"Ext.ComponentQuery\" class=\"docClass\">ComponentQuery</a>\nselector.</p>\n\n<p>May also be referred to as <strong><code>prev()</code></strong></p>\n\n<p>Note that this is limited to siblings, and if no siblings of the item match, <code>null</code> is returned. Contrast with\n<a href=\"#!/api/Ext.AbstractComponent-method-previousNode\" rel=\"Ext.AbstractComponent-method-previousNode\" class=\"docClass\">previousNode</a></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>selector</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a> (optional)<div class='sub-desc'><p>A <a href=\"#!/api/Ext.ComponentQuery\" rel=\"Ext.ComponentQuery\" class=\"docClass\">ComponentQuery</a> selector to filter the preceding items.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>The previous sibling (or the previous sibling which matches the selector).\nReturns <code>null</code> if there is no matching sibling.</p>\n</div></li></ul></div></div></div><div id='method-prune' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.ElementContainer' rel='Ext.util.ElementContainer' class='defined-in docClass'>Ext.util.ElementContainer</a><br/><a href='source/ElementContainer.html#Ext-util-ElementContainer-method-prune' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.ElementContainer-method-prune' class='name expandable'>prune</a>( <span class='pre'>childEls, shared</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>childEls</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>shared</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-query' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Queryable' rel='Ext.Queryable' class='defined-in docClass'>Ext.Queryable</a><br/><a href='source/Queryable.html#Ext-Queryable-method-query' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Queryable-method-query' class='name expandable'>query</a>( <span class='pre'>[selector]</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>[]</div><div class='description'><div class='short'>Retrieves all descendant components which match the passed selector. ...</div><div class='long'><p>Retrieves all descendant components which match the passed selector.\nExecutes an <a href=\"#!/api/Ext.ComponentQuery-method-query\" rel=\"Ext.ComponentQuery-method-query\" class=\"docClass\">Ext.ComponentQuery.query</a> using this container as its root.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>selector</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a> (optional)<div class='sub-desc'><p>Selector complying to an <a href=\"#!/api/Ext.ComponentQuery\" rel=\"Ext.ComponentQuery\" class=\"docClass\">Ext.ComponentQuery</a> selector.\nIf no selector is specified all items will be returned.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>[]</span><div class='sub-desc'><p>Components which matched the selector</p>\n</div></li></ul></div></div></div><div id='method-queryBy' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Queryable' rel='Ext.Queryable' class='defined-in docClass'>Ext.Queryable</a><br/><a href='source/Queryable.html#Ext-Queryable-method-queryBy' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Queryable-method-queryBy' class='name expandable'>queryBy</a>( <span class='pre'>fn, [scope]</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>[]</div><div class='description'><div class='short'>Retrieves all descendant components which match the passed function. ...</div><div class='long'><p>Retrieves all descendant components which match the passed function.\nThe function should return false for components that are to be\nexcluded from the selection.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>fn</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a><div class='sub-desc'><p>The matcher function. It will be called with a single argument,\nthe component being tested.</p>\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>The scope in which to run the function. If not specified,\nit will default to the active component.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>[]</span><div class='sub-desc'><p>Components matched by the passed function</p>\n</div></li></ul></div></div></div><div id='method-queryById' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Queryable' rel='Ext.Queryable' class='defined-in docClass'>Ext.Queryable</a><br/><a href='source/Queryable.html#Ext-Queryable-method-queryById' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Queryable-method-queryById' class='name expandable'>queryById</a>( <span class='pre'>id</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Finds a component at any level under this container matching the id/itemId. ...</div><div class='long'><p>Finds a component at any level under this container matching the id/itemId.\nThis is a shorthand for calling ct.down('#' + id);</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>id</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The id to find</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>The matching id, null if not found</p>\n</div></li></ul></div></div></div><div id='method-registerFloatingItem' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-registerFloatingItem' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-registerFloatingItem' class='name expandable'>registerFloatingItem</a>( <span class='pre'>cmp</span> )</div><div class='description'><div class='short'>Called by Component#doAutoRender\n\nRegister a Container configured floating: true with this Component's ZIndexManager. ...</div><div class='long'><p>Called by Component#doAutoRender</p>\n\n<p>Register a Container configured <code>floating: true</code> with this Component's <a href=\"#!/api/Ext.ZIndexManager\" rel=\"Ext.ZIndexManager\" class=\"docClass\">ZIndexManager</a>.</p>\n\n<p>Components added in this way will not participate in any layout, but will be rendered\nupon first show in the way that <a href=\"#!/api/Ext.window.Window\" rel=\"Ext.window.Window\" class=\"docClass\">Window</a>s are.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>cmp</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-registerWithOwnerCt' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-method-registerWithOwnerCt' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-method-registerWithOwnerCt' class='name expandable'>registerWithOwnerCt</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-relayEvents' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-relayEvents' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-relayEvents' class='name expandable'>relayEvents</a>( <span class='pre'>origin, events, [prefix]</span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></div><div class='description'><div class='short'>Relays selected events from the specified Observable as if the events were fired by this. ...</div><div class='long'><p>Relays selected events from the specified Observable as if the events were fired by <code>this</code>.</p>\n\n<p>For example if you are extending Grid, you might decide to forward some events from store.\nSo you can do this inside your initComponent:</p>\n\n<pre><code>this.relayEvents(this.getStore(), ['load']);\n</code></pre>\n\n<p>The grid instance will then have an observable 'load' event which will be passed the\nparameters of the store's load event and any function fired with the grid's load event\nwould have access to the grid using the <code>this</code> keyword.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>origin</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The Observable whose events this object is to relay.</p>\n</div></li><li><span class='pre'>events</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>[]<div class='sub-desc'><p>Array of event names to relay.</p>\n</div></li><li><span class='pre'>prefix</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a> (optional)<div class='sub-desc'><p>A common prefix to prepend to the event names. For example:</p>\n\n<pre><code>this.relayEvents(this.getStore(), ['load', 'clear'], 'store');\n</code></pre>\n\n<p>Now the grid will forward 'load' and 'clear' events of store as 'storeload' and 'storeclear'.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p>A <code>Destroyable</code> object. An object which implements the <code>destroy</code> method which, when destroyed, removes all relayers. For example:</p>\n\n<pre><code>this.storeRelayers = this.relayEvents(this.getStore(), ['load', 'clear'], 'store');\n</code></pre>\n\n<p>Can be undone by calling</p>\n\n<pre><code><a href=\"#!/api/Ext-method-destroy\" rel=\"Ext-method-destroy\" class=\"docClass\">Ext.destroy</a>(this.storeRelayers);\n</code></pre>\n\n<p>or</p>\n\n<pre><code>this.store.relayers.destroy();\n</code></pre>\n</div></li></ul></div></div></div><div id='method-remove' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-remove' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-remove' class='name expandable'>remove</a>( <span class='pre'>component, [autoDestroy]</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Removes a component from this container. ...</div><div class='long'><p>Removes a component from this container. Fires the <a href=\"#!/api/Ext.container.AbstractContainer-event-beforeremove\" rel=\"Ext.container.AbstractContainer-event-beforeremove\" class=\"docClass\">beforeremove</a> event\nbefore removing, then fires the <a href=\"#!/api/Ext.container.AbstractContainer-event-remove\" rel=\"Ext.container.AbstractContainer-event-remove\" class=\"docClass\">remove</a> event after the component has\nbeen removed.</p>\n <p>Available since: <b>2.3.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>component</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The component reference or id to remove.</p>\n</div></li><li><span class='pre'>autoDestroy</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p>True to automatically invoke the removed Component's\n<a href=\"#!/api/Ext.Component-method-destroy\" rel=\"Ext.Component-method-destroy\" class=\"docClass\">Ext.Component.destroy</a> function.</p>\n\n<p>Defaults to the value of this Container's <a href=\"#!/api/Ext.container.AbstractContainer-cfg-autoDestroy\" rel=\"Ext.container.AbstractContainer-cfg-autoDestroy\" class=\"docClass\">autoDestroy</a> config.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>component The Component that was removed.</p>\n</div></li></ul></div></div></div><div id='method-removeAll' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-removeAll' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-removeAll' class='name expandable'>removeAll</a>( <span class='pre'>[autoDestroy]</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>[]</div><div class='description'><div class='short'>Removes all components from this container. ...</div><div class='long'><p>Removes all components from this container.</p>\n <p>Available since: <b>2.3.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>autoDestroy</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p>True to automatically invoke the removed\nComponent's <a href=\"#!/api/Ext.Component-method-destroy\" rel=\"Ext.Component-method-destroy\" class=\"docClass\">Ext.Component.destroy</a> function.\nDefaults to the value of this Container's <a href=\"#!/api/Ext.container.AbstractContainer-cfg-autoDestroy\" rel=\"Ext.container.AbstractContainer-cfg-autoDestroy\" class=\"docClass\">autoDestroy</a> config.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>[]</span><div class='sub-desc'><p>Array of the removed components</p>\n</div></li></ul></div></div></div><div id='method-removeAnchor' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='defined-in docClass'>Ext.util.Positionable</a><br/><a href='source/Positionable.html#Ext-util-Positionable-method-removeAnchor' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Positionable-method-removeAnchor' class='name expandable'>removeAnchor</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Remove any anchor to this element. ...</div><div class='long'><p>Remove any anchor to this element. See <a href=\"#!/api/Ext.util.Positionable-method-anchorTo\" rel=\"Ext.util.Positionable-method-anchorTo\" class=\"docClass\">anchorTo</a>.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-removeChildEls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.ElementContainer' rel='Ext.util.ElementContainer' class='defined-in docClass'>Ext.util.ElementContainer</a><br/><a href='source/ElementContainer.html#Ext-util-ElementContainer-method-removeChildEls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.ElementContainer-method-removeChildEls' class='name expandable'>removeChildEls</a>( <span class='pre'>testFn</span> )</div><div class='description'><div class='short'>Removes items in the childEls array based on the return value of a supplied test\nfunction. ...</div><div class='long'><p>Removes items in the childEls array based on the return value of a supplied test\nfunction. The function is called with a entry in childEls and if the test function\nreturn true, that entry is removed. If false, that entry is kept.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>testFn</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a><div class='sub-desc'><p>The test function.</p>\n</div></li></ul></div></div></div><div id='method-removeClass' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-removeClass' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-removeClass' class='name expandable'>removeClass</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'><p><debug></p>\n <p>Available since: <b>2.3.0</b></p>\n</div></div></div><div id='method-removeCls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-removeCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-removeCls' class='name expandable'>removeCls</a>( <span class='pre'>cls</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Removes a CSS class from the top level element representing this component. ...</div><div class='long'><p>Removes a CSS class from the top level element representing this component.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>cls</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>[]<div class='sub-desc'><p>The CSS class name to remove.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>Returns the Component to allow method chaining.</p>\n</div></li></ul></div></div></div><div id='method-removeClsWithUI' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-removeClsWithUI' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-removeClsWithUI' class='name expandable'>removeClsWithUI</a>( <span class='pre'>cls</span> )</div><div class='description'><div class='short'>Removes a cls to the uiCls array, which will also call removeUIClsFromElement and removes it from all\nelements of thi...</div><div class='long'><p>Removes a <code>cls</code> to the <code>uiCls</code> array, which will also call <a href=\"#!/api/Ext.AbstractComponent-method-removeUIClsFromElement\" rel=\"Ext.AbstractComponent-method-removeUIClsFromElement\" class=\"docClass\">removeUIClsFromElement</a> and removes it from all\nelements of this component.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>cls</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>[]<div class='sub-desc'><p>A string or an array of strings to remove to the <code>uiCls</code>.</p>\n</div></li></ul></div></div></div><div id='method-removeListener' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-removeListener' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-removeListener' class='name expandable'>removeListener</a>( <span class='pre'>eventName, fn, [scope]</span> )</div><div class='description'><div class='short'>Removes an event handler. ...</div><div class='long'><p>Removes an event handler.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>eventName</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The type of event the handler was associated with.</p>\n\n</div></li><li><span class='pre'>fn</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a><div class='sub-desc'><p>The handler to remove. <strong>This must be a reference to the function passed into the\n<a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">addListener</a> call.</strong></p>\n\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>The scope originally specified for the handler. It must be the same as the\nscope argument specified in the original call to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">addListener</a> or the listener will not be removed.</p>\n\n</div></li></ul></div></div></div><div id='method-removeManagedListener' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-removeManagedListener' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-removeManagedListener' class='name expandable'>removeManagedListener</a>( <span class='pre'>item, ename, [fn], [scope]</span> )</div><div class='description'><div class='short'>Removes listeners that were added by the mon method. ...</div><div class='long'><p>Removes listeners that were added by the <a href=\"#!/api/Ext.util.Observable-method-mon\" rel=\"Ext.util.Observable-method-mon\" class=\"docClass\">mon</a> method.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>item</span> : <a href=\"#!/api/Ext.util.Observable\" rel=\"Ext.util.Observable\" class=\"docClass\">Ext.util.Observable</a>/<a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a><div class='sub-desc'><p>The item from which to remove a listener/listeners.</p>\n\n</div></li><li><span class='pre'>ename</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The event name, or an object containing event name properties.</p>\n\n</div></li><li><span class='pre'>fn</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a> (optional)<div class='sub-desc'><p>If the <code>ename</code> parameter was an event name, this is the handler function.</p>\n\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>If the <code>ename</code> parameter was an event name, this is the scope (<code>this</code> reference)\nin which the handler function is executed.</p>\n\n</div></li></ul></div></div></div><div id='method-removeManagedListenerItem' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-removeManagedListenerItem' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-removeManagedListenerItem' class='name expandable'>removeManagedListenerItem</a>( <span class='pre'>isClear, managedListener</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>inherit docs\n\nRemove a single managed listener item ...</div><div class='long'><p>inherit docs</p>\n\n<p>Remove a single managed listener item</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>isClear</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><div class='sub-desc'><p>True if this is being called during a clear</p>\n</div></li><li><span class='pre'>managedListener</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The managed listener item\nSee removeManagedListener for other args</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.util.Observable-method-removeManagedListenerItem' rel='Ext.util.Observable-method-removeManagedListenerItem' class='docClass'>Ext.util.Observable.removeManagedListenerItem</a></p></div></div></div><div id='method-removeOverCls' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-removeOverCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-removeOverCls' class='name expandable'>removeOverCls</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-removePlugin' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-removePlugin' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-removePlugin' class='name expandable'>removePlugin</a>( <span class='pre'>plugin</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>plugin</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-removeUIClsFromElement' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-removeUIClsFromElement' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-removeUIClsFromElement' class='name expandable'>removeUIClsFromElement</a>( <span class='pre'>ui</span> )</div><div class='description'><div class='short'>Method which removes a specified UI + uiCls from the components element. ...</div><div class='long'><p>Method which removes a specified UI + <code>uiCls</code> from the components element. The <code>cls</code> which is added to the element\nwill be: <code>this.baseCls + '-' + ui</code>.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>ui</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The UI to add to the element.</p>\n</div></li></ul></div></div></div><div id='method-removeUIFromElement' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-removeUIFromElement' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-removeUIFromElement' class='name expandable'>removeUIFromElement</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Method which removes a specified UI from the components element. ...</div><div class='long'><p>Method which removes a specified UI from the components element.</p>\n</div></div></div><div id='method-render' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-render' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-render' class='name expandable'>render</a>( <span class='pre'>[container], [position]</span> )</div><div class='description'><div class='short'>Renders the Component into the passed HTML element. ...</div><div class='long'><p>Renders the Component into the passed HTML element.</p>\n\n<p><strong>If you are using a <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Container</a> object to house this\nComponent, then do not use the render method.</strong></p>\n\n<p>A Container's child Components are rendered by that Container's\n<a href=\"#!/api/Ext.container.Container-cfg-layout\" rel=\"Ext.container.Container-cfg-layout\" class=\"docClass\">layout</a> manager when the Container is first rendered.</p>\n\n<p>If the Container is already rendered when a new child Component is added, you may need to call\nthe Container's <a href=\"#!/api/Ext.container.Container-method-doLayout\" rel=\"Ext.container.Container-method-doLayout\" class=\"docClass\">doLayout</a> to refresh the view which\ncauses any unrendered child Components to be rendered. This is required so that you can add\nmultiple child components if needed while only refreshing the layout once.</p>\n\n<p>When creating complex UIs, it is important to remember that sizing and positioning\nof child items is the responsibility of the Container's <a href=\"#!/api/Ext.container.Container-cfg-layout\" rel=\"Ext.container.Container-cfg-layout\" class=\"docClass\">layout</a>\nmanager. If you expect child items to be sized in response to user interactions, you must\nconfigure the Container with a layout manager which creates and manages the type of layout you\nhave in mind.</p>\n\n<p><strong>Omitting the Container's <a href=\"#!/api/Ext.container.Container-cfg-layout\" rel=\"Ext.container.Container-cfg-layout\" class=\"docClass\">layout</a> config means that a basic\nlayout manager is used which does nothing but render child components sequentially into the\nContainer. No sizing or positioning will be performed in this situation.</strong></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>container</span> : <a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a>/HTMLElement/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a> (optional)<div class='sub-desc'><p>The element this Component should be\nrendered into. If it is being created from existing markup, this should be omitted.</p>\n</div></li><li><span class='pre'>position</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a> (optional)<div class='sub-desc'><p>The element ID or DOM node index within the container <strong>before</strong>\nwhich this component will be inserted (defaults to appending to the end of the container)</p>\n</div></li></ul></div></div></div><div id='method-repositionFloatingItems' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-repositionFloatingItems' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-repositionFloatingItems' class='name expandable'>repositionFloatingItems</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-resumeEvent' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-resumeEvent' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-resumeEvent' class='name expandable'>resumeEvent</a>( <span class='pre'>eventName</span> )</div><div class='description'><div class='short'>Resumes firing of the named event(s). ...</div><div class='long'><p>Resumes firing of the named event(s).</p>\n\n<p>After calling this method to resume events, the events will fire when requested to fire.</p>\n\n<p><strong>Note that if the <a href=\"#!/api/Ext.util.Observable-method-suspendEvent\" rel=\"Ext.util.Observable-method-suspendEvent\" class=\"docClass\">suspendEvent</a> method is called multiple times for a certain event,\nthis converse method will have to be called the same number of times for it to resume firing.</strong></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>eventName</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>...<div class='sub-desc'><p>Multiple event names to resume.</p>\n</div></li></ul></div></div></div><div id='method-resumeEvents' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-resumeEvents' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-resumeEvents' class='name expandable'>resumeEvents</a>( <span class='pre'></span> )</div><div class='description'><div class='short'>Resumes firing events (see suspendEvents). ...</div><div class='long'><p>Resumes firing events (see <a href=\"#!/api/Ext.util.Observable-method-suspendEvents\" rel=\"Ext.util.Observable-method-suspendEvents\" class=\"docClass\">suspendEvents</a>).</p>\n\n<p>If events were suspended using the <code>queueSuspended</code> parameter, then all events fired\nduring event suspension will be sent to any listeners now.</p>\n</div></div></div><div id='method-resumeLayouts' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-resumeLayouts' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-resumeLayouts' class='name expandable'>resumeLayouts</a>( <span class='pre'>flushOptions</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>flushOptions</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-savePropToState' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.state.Stateful' rel='Ext.state.Stateful' class='defined-in docClass'>Ext.state.Stateful</a><br/><a href='source/Stateful.html#Ext-state-Stateful-method-savePropToState' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.state.Stateful-method-savePropToState' class='name expandable'>savePropToState</a>( <span class='pre'>propName, state, [stateName]</span> ) : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></div><div class='description'><div class='short'>Conditionally saves a single property from this object to the given state object. ...</div><div class='long'><p>Conditionally saves a single property from this object to the given state object.\nThe idea is to only save state which has changed from the initial state so that\ncurrent software settings do not override future software settings. Only those\nvalues that are user-changed state should be saved.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>propName</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The name of the property to save.</p>\n</div></li><li><span class='pre'>state</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The state object in to which to save the property.</p>\n</div></li><li><span class='pre'>stateName</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a> (optional)<div class='sub-desc'><p>The name to use for the property in state.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a></span><div class='sub-desc'><p>True if the property was saved, false if not.</p>\n</div></li></ul></div></div></div><div id='method-savePropsToState' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.state.Stateful' rel='Ext.state.Stateful' class='defined-in docClass'>Ext.state.Stateful</a><br/><a href='source/Stateful.html#Ext-state-Stateful-method-savePropsToState' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.state.Stateful-method-savePropsToState' class='name expandable'>savePropsToState</a>( <span class='pre'>propNames, state</span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></div><div class='description'><div class='short'>Gathers additional named properties of the instance and adds their current values\nto the passed state object. ...</div><div class='long'><p>Gathers additional named properties of the instance and adds their current values\nto the passed state object.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>propNames</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>[]<div class='sub-desc'><p>The name (or array of names) of the property to save.</p>\n</div></li><li><span class='pre'>state</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The state object in to which to save the property values.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p>state</p>\n</div></li></ul></div></div></div><div id='method-saveState' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.state.Stateful' rel='Ext.state.Stateful' class='defined-in docClass'>Ext.state.Stateful</a><br/><a href='source/Stateful.html#Ext-state-Stateful-method-saveState' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.state.Stateful-method-saveState' class='name expandable'>saveState</a>( <span class='pre'></span> )</div><div class='description'><div class='short'>Saves the state of the object to the persistence store. ...</div><div class='long'><p>Saves the state of the object to the persistence store.</p>\n</div></div></div><div id='method-scrollBy' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-scrollBy' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-scrollBy' class='name expandable'>scrollBy</a>( <span class='pre'>deltaX, deltaY, animate</span> )</div><div class='description'><div class='short'>Scrolls this Component's target element by the passed delta values, optionally animating. ...</div><div class='long'><p>Scrolls this Component's <a href=\"#!/api/Ext.Component-method-getTargetEl\" rel=\"Ext.Component-method-getTargetEl\" class=\"docClass\">target element</a> by the passed delta values, optionally animating.</p>\n\n<p>All of the following are equivalent:</p>\n\n<pre><code> comp.scrollBy(10, 10, true);\n comp.scrollBy([10, 10], true);\n comp.scrollBy({ x: 10, y: 10 }, true);\n</code></pre>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>deltaX</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/<a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>Either the x delta, an Array specifying x and y deltas or\nan object with \"x\" and \"y\" properties.</p>\n</div></li><li><span class='pre'>deltaY</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/<a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>Either the y delta, or an animate flag or config object.</p>\n</div></li><li><span class='pre'>animate</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>Animate flag/config object if the delta values were passed separately.</p>\n</div></li></ul></div></div></div><div id='method-sequenceFx' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Animate' rel='Ext.util.Animate' class='defined-in docClass'>Ext.util.Animate</a><br/><a href='source/Animate.html#Ext-util-Animate-method-sequenceFx' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Animate-method-sequenceFx' class='name expandable'>sequenceFx</a>( <span class='pre'></span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Ensures that all effects queued after sequenceFx is called on this object are run in sequence. ...</div><div class='long'><p>Ensures that all effects queued after sequenceFx is called on this object are run in sequence. This is the\nopposite of <a href=\"#!/api/Ext.util.Animate-method-syncFx\" rel=\"Ext.util.Animate-method-syncFx\" class=\"docClass\">syncFx</a>.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-setActive' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-method-setActive' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-method-setActive' class='name expandable'>setActive</a>( <span class='pre'>[active], [newActive]</span> )</div><div class='description'><div class='short'>This method is called internally by Ext.ZIndexManager to signal that a floating Component has either been\nmoved to th...</div><div class='long'><p>This method is called internally by <a href=\"#!/api/Ext.ZIndexManager\" rel=\"Ext.ZIndexManager\" class=\"docClass\">Ext.ZIndexManager</a> to signal that a floating Component has either been\nmoved to the top of its zIndex stack, or pushed from the top of its zIndex stack.</p>\n\n<p>If a <em>Window</em> is superceded by another Window, deactivating it hides its shadow.</p>\n\n<p>This method also fires the <a href=\"#!/api/Ext.Component-event-activate\" rel=\"Ext.Component-event-activate\" class=\"docClass\">activate</a> or\n<a href=\"#!/api/Ext.Component-event-deactivate\" rel=\"Ext.Component-event-deactivate\" class=\"docClass\">deactivate</a> event depending on which action occurred.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>active</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p>True to activate the Component, false to deactivate it.</p>\n<p>Defaults to: <code>false</code></p></div></li><li><span class='pre'>newActive</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> (optional)<div class='sub-desc'><p>The newly active Component which is taking over topmost zIndex position.</p>\n</div></li></ul></div></div></div><div id='method-setAutoScroll' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-setAutoScroll' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-setAutoScroll' class='name expandable'>setAutoScroll</a>( <span class='pre'>scroll</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Sets the overflow on the content element of the component. ...</div><div class='long'><p>Sets the overflow on the content element of the component.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>scroll</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><div class='sub-desc'><p>True to allow the Component to auto scroll.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-setBorder' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-setBorder' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-setBorder' class='name expandable'>setBorder</a>( <span class='pre'>border</span> )</div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>border</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The border, see <a href=\"#!/api/Ext.AbstractComponent-cfg-border\" rel=\"Ext.AbstractComponent-cfg-border\" class=\"docClass\">border</a>. If a falsey value is passed\nthe border will be removed.</p>\n</div></li></ul></div></div></div><div id='method-setBorderRegion' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Region2.html#Ext-Component-method-setBorderRegion' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-setBorderRegion' class='name expandable'>setBorderRegion</a>( <span class='pre'>region</span> ) : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></div><div class='description'><div class='short'>This method changes the region config property for this border region. ...</div><div class='long'><p>This method changes the <code>region</code> config property for this border region. This is\nonly valid if this component is in a <code>border</code> layout (<code><a href=\"#!/api/Ext.layout.container.Border\" rel=\"Ext.layout.container.Border\" class=\"docClass\">Ext.layout.container.Border</a></code>).</p>\n\n<p><strong>Defined in override Ext.layout.container.border.Region.</strong></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>region</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The new <code>region</code> value (<code>\"north\"</code>, <code>\"south\"</code>, <code>\"east\"</code> or\n<code>\"west\"</code>).</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span><div class='sub-desc'><p>The previous value of the <code>region</code> property.</p>\n</div></li></ul></div></div></div><div id='method-setBox' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='defined-in docClass'>Ext.util.Positionable</a><br/><a href='source/Positionable.html#Ext-util-Positionable-method-setBox' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Positionable-method-setBox' class='name expandable'>setBox</a>( <span class='pre'>box, [animate]</span> ) : <a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Sets the element's box. ...</div><div class='long'><p>Sets the element's box. If animate is true then x, y, width, and height will be\nanimated concurrently.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>box</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The box to fill {x, y, width, height}</p>\n</div></li><li><span class='pre'>animate</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>true for the default animation or a standard\nElement animation config object</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-setComponentLayout' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-setComponentLayout' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-setComponentLayout' class='name expandable'>setComponentLayout</a>( <span class='pre'>layout</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>layout</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-setConfig' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-method-setConfig' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-method-setConfig' class='name expandable'>setConfig</a>( <span class='pre'>config, applyIfNotSet</span> ) : <a href=\"#!/api/Ext.Base\" rel=\"Ext.Base\" class=\"docClass\">Ext.Base</a><strong class='chainable signature' >chainable</strong><strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>config</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>applyIfNotSet</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Base\" rel=\"Ext.Base\" class=\"docClass\">Ext.Base</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-setDisabled' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-setDisabled' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-setDisabled' class='name expandable'>setDisabled</a>( <span class='pre'>disabled</span> )</div><div class='description'><div class='short'>Enable or disable the component. ...</div><div class='long'><p>Enable or disable the component.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>disabled</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><div class='sub-desc'><p><code>true</code> to disable.</p>\n</div></li></ul></div></div></div><div id='method-setDocked' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-setDocked' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-setDocked' class='name expandable'>setDocked</a>( <span class='pre'>dock, [layoutParent]</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Sets the dock position of this component in its parent panel. ...</div><div class='long'><p>Sets the dock position of this component in its parent panel. Note that this only has effect if this item is part\nof the <code>dockedItems</code> collection of a parent that has a DockLayout (note that any Panel has a DockLayout by default)</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>dock</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The dock position.</p>\n</div></li><li><span class='pre'>layoutParent</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p><code>true</code> to re-layout parent.</p>\n<p>Defaults to: <code>false</code></p></div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-setFloatParent' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-method-setFloatParent' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-method-setFloatParent' class='name expandable'>setFloatParent</a>( <span class='pre'>floatParent</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>floatParent</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-setHeight' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-setHeight' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-setHeight' class='name expandable'>setHeight</a>( <span class='pre'>height</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Sets the height of the component. ...</div><div class='long'><p>Sets the height of the component. This method fires the <a href=\"#!/api/Ext.AbstractComponent-event-resize\" rel=\"Ext.AbstractComponent-event-resize\" class=\"docClass\">resize</a> event.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>height</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The new height to set. This may be one of:</p>\n\n<ul>\n<li>A Number specifying the new height in the <a href=\"#!/api/Ext.AbstractComponent-method-getEl\" rel=\"Ext.AbstractComponent-method-getEl\" class=\"docClass\">Element</a>'s <a href=\"#!/api/Ext.dom.Element-property-defaultUnit\" rel=\"Ext.dom.Element-property-defaultUnit\" class=\"docClass\">Ext.Element.defaultUnit</a>s (by default, pixels).</li>\n<li>A String used to set the CSS height style.</li>\n<li><em>undefined</em> to leave the height unchanged.</li>\n</ul>\n\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-setHiddenState' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-setHiddenState' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-setHiddenState' class='name expandable'>setHiddenState</a>( <span class='pre'>hidden</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>hidden</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-setIcon' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.statusbar.StatusBar'>Ext.ux.statusbar.StatusBar</span><br/><a href='source/StatusBar.html#Ext-ux-statusbar-StatusBar-method-setIcon' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.statusbar.StatusBar-method-setIcon' class='name expandable'>setIcon</a>( <span class='pre'>[iconCls]</span> ) : <a href=\"#!/api/Ext.ux.statusbar.StatusBar\" rel=\"Ext.ux.statusbar.StatusBar\" class=\"docClass\">Ext.ux.statusbar.StatusBar</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Convenience method for setting the status icon directly. ...</div><div class='long'><p>Convenience method for setting the status icon directly. For more flexible options see <a href=\"#!/api/Ext.ux.statusbar.StatusBar-method-setStatus\" rel=\"Ext.ux.statusbar.StatusBar-method-setStatus\" class=\"docClass\">setStatus</a>.\nSee <a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-iconCls\" rel=\"Ext.ux.statusbar.StatusBar-cfg-iconCls\" class=\"docClass\">iconCls</a> for complete details about customizing the icon.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>iconCls</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a> (optional)<div class='sub-desc'><p>The icon class to set (defaults to '', and any current icon class is removed)</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.ux.statusbar.StatusBar\" rel=\"Ext.ux.statusbar.StatusBar\" class=\"docClass\">Ext.ux.statusbar.StatusBar</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-setLayout' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-setLayout' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-setLayout' class='name expandable'>setLayout</a>( <span class='pre'>layout</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>layout</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-setLoading' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-setLoading' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-setLoading' class='name expandable'>setLoading</a>( <span class='pre'>load, [targetEl]</span> ) : <a href=\"#!/api/Ext.LoadMask\" rel=\"Ext.LoadMask\" class=\"docClass\">Ext.LoadMask</a></div><div class='description'><div class='short'>This method allows you to show or hide a LoadMask on top of this component. ...</div><div class='long'><p>This method allows you to show or hide a LoadMask on top of this component.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>load</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>True to show the default LoadMask, a config object that will be passed to the\nLoadMask constructor, or a message String to show. False to hide the current LoadMask.</p>\n</div></li><li><span class='pre'>targetEl</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p>True to mask the targetEl of this Component instead of the <code>this.el</code>. For example,\nsetting this to true on a Panel will cause only the body to be masked.</p>\n<p>Defaults to: <code>false</code></p></div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.LoadMask\" rel=\"Ext.LoadMask\" class=\"docClass\">Ext.LoadMask</a></span><div class='sub-desc'><p>The LoadMask instance that has just been shown.</p>\n</div></li></ul></div></div></div><div id='method-setLocalX' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-setLocalX' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-setLocalX' class='name expandable'>setLocalX</a>( <span class='pre'>x</span> ) : <a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a></div><div class='description'><div class='short'>Overridden in Ext.rtl.AbstractComponent. ...</div><div class='long'><p><strong>Overridden in Ext.rtl.AbstractComponent.</strong></p>\n\n<p>Sets the local x coordinate of this element using CSS style. When used on an\nabsolute positioned element this method is symmetrical with <a href=\"#!/api/Ext.AbstractComponent-method-getLocalX\" rel=\"Ext.AbstractComponent-method-getLocalX\" class=\"docClass\">getLocalX</a>, but\nmay not be symmetrical when used on a relatively positioned element.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>x</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The x coordinate. A value of <code>null</code> sets the left style to 'auto'.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.util.Positionable-method-setLocalX' rel='Ext.util.Positionable-method-setLocalX' class='docClass'>Ext.util.Positionable.setLocalX</a></p></div></div></div><div id='method-setLocalXY' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-setLocalXY' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-setLocalXY' class='name expandable'>setLocalXY</a>( <span class='pre'>x, [y]</span> ) : <a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a></div><div class='description'><div class='short'>Overridden in Ext.rtl.AbstractComponent. ...</div><div class='long'><p><strong>Overridden in Ext.rtl.AbstractComponent.</strong></p>\n\n<p>Sets the local x and y coordinates of this element using CSS style. When used on an\nabsolute positioned element this method is symmetrical with <a href=\"#!/api/Ext.AbstractComponent-method-getLocalXY\" rel=\"Ext.AbstractComponent-method-getLocalXY\" class=\"docClass\">getLocalXY</a>, but\nmay not be symmetrical when used on a relatively positioned element.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>x</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/<a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a><div class='sub-desc'><p>The x coordinate or an array containing [x, y]. A value of\n<code>null</code> sets the left style to 'auto'</p>\n</div></li><li><span class='pre'>y</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a> (optional)<div class='sub-desc'><p>The y coordinate, required if x is not an array. A value of\n<code>null</code> sets the top style to 'auto'</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.util.Positionable-method-setLocalXY' rel='Ext.util.Positionable-method-setLocalXY' class='docClass'>Ext.util.Positionable.setLocalXY</a></p></div></div></div><div id='method-setLocalY' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-setLocalY' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-setLocalY' class='name expandable'>setLocalY</a>( <span class='pre'>y</span> ) : <a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a></div><div class='description'><div class='short'>Sets the local y coordinate of this element using CSS style. ...</div><div class='long'><p>Sets the local y coordinate of this element using CSS style. When used on an\nabsolute positioned element this method is symmetrical with <a href=\"#!/api/Ext.AbstractComponent-method-getLocalY\" rel=\"Ext.AbstractComponent-method-getLocalY\" class=\"docClass\">getLocalY</a>, but\nmay not be symmetrical when used on a relatively positioned element.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>y</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The y coordinate. A value of <code>null</code> sets the top style to 'auto'.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.util.Positionable-method-setLocalY' rel='Ext.util.Positionable-method-setLocalY' class='docClass'>Ext.util.Positionable.setLocalY</a></p></div></div></div><div id='method-setMargin' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-setMargin' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-setMargin' class='name expandable'>setMargin</a>( <span class='pre'>margin</span> )</div><div class='description'><div class='short'>Sets the margin on the target element. ...</div><div class='long'><p>Sets the margin on the target element.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>margin</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The margin to set. See the <a href=\"#!/api/Ext.AbstractComponent-cfg-margin\" rel=\"Ext.AbstractComponent-cfg-margin\" class=\"docClass\">margin</a> config.</p>\n</div></li></ul></div></div></div><div id='method-setOverflowXY' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-setOverflowXY' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-setOverflowXY' class='name expandable'>setOverflowXY</a>( <span class='pre'>overflowX, overflowY</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Sets the overflow x/y on the content element of the component. ...</div><div class='long'><p>Sets the overflow x/y on the content element of the component. The x/y overflow\nvalues can be any valid CSS overflow (e.g., 'auto' or 'scroll'). By default, the\nvalue is 'hidden'. Passing null for one of the values will erase the inline style.\nPassing <code>undefined</code> will preserve the current value.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>overflowX</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The overflow-x value.</p>\n</div></li><li><span class='pre'>overflowY</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The overflow-y value.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-setPagePosition' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-setPagePosition' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-setPagePosition' class='name expandable'>setPagePosition</a>( <span class='pre'>x, [y], [animate]</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Sets the page XY position of the component. ...</div><div class='long'><p>Sets the page XY position of the component. To set the left and top instead, use <a href=\"#!/api/Ext.Component-method-setPosition\" rel=\"Ext.Component-method-setPosition\" class=\"docClass\">setPosition</a>.\nThis method fires the <a href=\"#!/api/Ext.Component-event-move\" rel=\"Ext.Component-event-move\" class=\"docClass\">move</a> event.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>x</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/<a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]<div class='sub-desc'><p>The new x position or an array of <code>[x,y]</code>.</p>\n</div></li><li><span class='pre'>y</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a> (optional)<div class='sub-desc'><p>The new y position.</p>\n</div></li><li><span class='pre'>animate</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>True to animate the Component into its new position. You may also pass an\nanimation configuration.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-setPosition' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/AbstractComponent.html#Ext-Component-method-setPosition' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-setPosition' class='name expandable'>setPosition</a>( <span class='pre'>x, [y], [animate]</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Sets the left and top of the component. ...</div><div class='long'><p>Sets the left and top of the component. To set the page XY position instead, use <a href=\"#!/api/Ext.Component-method-setPagePosition\" rel=\"Ext.Component-method-setPagePosition\" class=\"docClass\">setPagePosition</a>. This\nmethod fires the <a href=\"#!/api/Ext.Component-event-move\" rel=\"Ext.Component-event-move\" class=\"docClass\">move</a> event.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>x</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/<a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The new left, an array of <code>[x,y]</code>, or animation config object containing <code>x</code> and <code>y</code> properties.</p>\n</div></li><li><span class='pre'>y</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a> (optional)<div class='sub-desc'><p>The new top.</p>\n</div></li><li><span class='pre'>animate</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>If <code>true</code>, the Component is <em>animated</em> into its new position. You may also pass an\nanimation configuration.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-setRegion' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='defined-in docClass'>Ext.util.Positionable</a><br/><a href='source/Positionable.html#Ext-util-Positionable-method-setRegion' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Positionable-method-setRegion' class='name expandable'>setRegion</a>( <span class='pre'>region, [animate]</span> ) : <a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Sets the element's position and size to the specified region. ...</div><div class='long'><p>Sets the element's position and size to the specified region. If animation is true\nthen width, height, x and y will be animated concurrently.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>region</span> : <a href=\"#!/api/Ext.util.Region\" rel=\"Ext.util.Region\" class=\"docClass\">Ext.util.Region</a><div class='sub-desc'><p>The region to fill</p>\n</div></li><li><span class='pre'>animate</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>true for the default animation or a standard\nElement animation config object</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-setRegionWeight' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Region2.html#Ext-Component-method-setRegionWeight' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-setRegionWeight' class='name expandable'>setRegionWeight</a>( <span class='pre'>weight</span> ) : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></div><div class='description'><div class='short'>Sets the weight config property for this component. ...</div><div class='long'><p>Sets the <code>weight</code> config property for this component. This is only valid if this\ncomponent is in a <code>border</code> layout (<code><a href=\"#!/api/Ext.layout.container.Border\" rel=\"Ext.layout.container.Border\" class=\"docClass\">Ext.layout.container.Border</a></code>).</p>\n\n<p><strong>Defined in override Ext.layout.container.border.Region.</strong></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>weight</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The new <code>weight</code> value.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a></span><div class='sub-desc'><p>The previous value of the <code>weight</code> property.</p>\n</div></li></ul></div></div></div><div id='method-setSize' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-setSize' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-setSize' class='name expandable'>setSize</a>( <span class='pre'>width, height</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Sets the width and height of this Component. ...</div><div class='long'><p>Sets the width and height of this Component. This method fires the <a href=\"#!/api/Ext.AbstractComponent-event-resize\" rel=\"Ext.AbstractComponent-event-resize\" class=\"docClass\">resize</a> event. This method can accept\neither width and height as separate arguments, or you can pass a size object like <code>{width:10, height:20}</code>.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>width</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The new width to set. This may be one of:</p>\n\n<ul>\n<li>A Number specifying the new width in the <a href=\"#!/api/Ext.AbstractComponent-method-getEl\" rel=\"Ext.AbstractComponent-method-getEl\" class=\"docClass\">Element</a>'s <a href=\"#!/api/Ext.dom.Element-property-defaultUnit\" rel=\"Ext.dom.Element-property-defaultUnit\" class=\"docClass\">Ext.Element.defaultUnit</a>s (by default, pixels).</li>\n<li>A String used to set the CSS width style.</li>\n<li>A size object in the format <code>{width: widthValue, height: heightValue}</code>.</li>\n<li><code>undefined</code> to leave the width unchanged.</li>\n</ul>\n\n</div></li><li><span class='pre'>height</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The new height to set (not required if a size object is passed as the first arg).\nThis may be one of:</p>\n\n<ul>\n<li>A Number specifying the new height in the <a href=\"#!/api/Ext.AbstractComponent-method-getEl\" rel=\"Ext.AbstractComponent-method-getEl\" class=\"docClass\">Element</a>'s <a href=\"#!/api/Ext.dom.Element-property-defaultUnit\" rel=\"Ext.dom.Element-property-defaultUnit\" class=\"docClass\">Ext.Element.defaultUnit</a>s (by default, pixels).</li>\n<li>A String used to set the CSS height style. Animation may <strong>not</strong> be used.</li>\n<li><code>undefined</code> to leave the height unchanged.</li>\n</ul>\n\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-setStatus' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.statusbar.StatusBar'>Ext.ux.statusbar.StatusBar</span><br/><a href='source/StatusBar.html#Ext-ux-statusbar-StatusBar-method-setStatus' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.statusbar.StatusBar-method-setStatus' class='name expandable'>setStatus</a>( <span class='pre'>config</span> ) : <a href=\"#!/api/Ext.ux.statusbar.StatusBar\" rel=\"Ext.ux.statusbar.StatusBar\" class=\"docClass\">Ext.ux.statusbar.StatusBar</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Sets the status text and/or iconCls. ...</div><div class='long'><p>Sets the status <a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-text\" rel=\"Ext.ux.statusbar.StatusBar-cfg-text\" class=\"docClass\">text</a> and/or <a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-iconCls\" rel=\"Ext.ux.statusbar.StatusBar-cfg-iconCls\" class=\"docClass\">iconCls</a>. Also supports automatically clearing the\nstatus that was set after a specified interval.</p>\n\n<p>Example usage:</p>\n\n<pre><code>// Simple call to update the text\nstatusBar.setStatus('New status');\n\n// Set the status and icon, auto-clearing with default options:\nstatusBar.setStatus({\n text: 'New status',\n iconCls: 'x-status-custom',\n clear: true\n});\n\n// Auto-clear with custom options:\nstatusBar.setStatus({\n text: 'New status',\n iconCls: 'x-status-custom',\n clear: {\n wait: 8000,\n anim: false,\n useDefaults: false\n }\n});\n</code></pre>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>config</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>A config object specifying what status to set, or a string assumed\nto be the status text (and all other options are defaulted as explained below). A config\nobject containing any or all of the following properties can be passed:</p>\n<ul><li><span class='pre'>text</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The status text to display. If not specified, any current\nstatus text will remain unchanged.</p>\n</div></li><li><span class='pre'>iconCls</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The CSS class used to customize the status icon (see\n<a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-iconCls\" rel=\"Ext.ux.statusbar.StatusBar-cfg-iconCls\" class=\"docClass\">iconCls</a> for details). If not specified, any current iconCls will remain unchanged.</p>\n</div></li><li><span class='pre'>clear</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a>/<a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>Allows you to set an internal callback that will\nautomatically clear the status text and iconCls after a specified amount of time has passed. If clear is not\nspecified, the new status will not be auto-cleared and will stay until updated again or cleared using\n<a href=\"#!/api/Ext.ux.statusbar.StatusBar-method-clearStatus\" rel=\"Ext.ux.statusbar.StatusBar-method-clearStatus\" class=\"docClass\">clearStatus</a>. If <code>true</code> is passed, the status will be cleared using <a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-autoClear\" rel=\"Ext.ux.statusbar.StatusBar-cfg-autoClear\" class=\"docClass\">autoClear</a>,\n<a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-defaultText\" rel=\"Ext.ux.statusbar.StatusBar-cfg-defaultText\" class=\"docClass\">defaultText</a> and <a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-defaultIconCls\" rel=\"Ext.ux.statusbar.StatusBar-cfg-defaultIconCls\" class=\"docClass\">defaultIconCls</a> via a fade out animation. If a numeric value is passed,\nit will be used as the callback interval (in milliseconds), overriding the <a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-autoClear\" rel=\"Ext.ux.statusbar.StatusBar-cfg-autoClear\" class=\"docClass\">autoClear</a> value.\nAll other options will be defaulted as with the boolean option. To customize any other options,\nyou can pass an object in the format:</p>\n<ul><li><span class='pre'>wait</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The number of milliseconds to wait before clearing\n(defaults to <a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-autoClear\" rel=\"Ext.ux.statusbar.StatusBar-cfg-autoClear\" class=\"docClass\">autoClear</a>).</p>\n</div></li><li><span class='pre'>anim</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><div class='sub-desc'><p>False to clear the status immediately once the callback\nexecutes (defaults to true which fades the status out).</p>\n</div></li><li><span class='pre'>useDefaults</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><div class='sub-desc'><p>False to completely clear the status text and iconCls\n(defaults to true which uses <a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-defaultText\" rel=\"Ext.ux.statusbar.StatusBar-cfg-defaultText\" class=\"docClass\">defaultText</a> and <a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-defaultIconCls\" rel=\"Ext.ux.statusbar.StatusBar-cfg-defaultIconCls\" class=\"docClass\">defaultIconCls</a>).</p>\n</div></li></ul></div></li></ul></div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.ux.statusbar.StatusBar\" rel=\"Ext.ux.statusbar.StatusBar\" class=\"docClass\">Ext.ux.statusbar.StatusBar</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-setText' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.statusbar.StatusBar'>Ext.ux.statusbar.StatusBar</span><br/><a href='source/StatusBar.html#Ext-ux-statusbar-StatusBar-method-setText' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.statusbar.StatusBar-method-setText' class='name expandable'>setText</a>( <span class='pre'>[text]</span> ) : <a href=\"#!/api/Ext.ux.statusbar.StatusBar\" rel=\"Ext.ux.statusbar.StatusBar\" class=\"docClass\">Ext.ux.statusbar.StatusBar</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Convenience method for setting the status text directly. ...</div><div class='long'><p>Convenience method for setting the status text directly. For more flexible options see <a href=\"#!/api/Ext.ux.statusbar.StatusBar-method-setStatus\" rel=\"Ext.ux.statusbar.StatusBar-method-setStatus\" class=\"docClass\">setStatus</a>.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>text</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a> (optional)<div class='sub-desc'><p>The text to set (defaults to '')</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.ux.statusbar.StatusBar\" rel=\"Ext.ux.statusbar.StatusBar\" class=\"docClass\">Ext.ux.statusbar.StatusBar</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-setUI' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-setUI' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-setUI' class='name expandable'>setUI</a>( <span class='pre'>ui</span> )</div><div class='description'><div class='short'>Sets the UI for the component. ...</div><div class='long'><p>Sets the UI for the component. This will remove any existing UIs on the component. It will also loop through any\n<code>uiCls</code> set on the component and rename them so they include the new UI.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>ui</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The new UI for the component.</p>\n</div></li></ul></div></div></div><div id='method-setVisible' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-setVisible' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-setVisible' class='name expandable'>setVisible</a>( <span class='pre'>visible</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Convenience function to hide or show this component by Boolean. ...</div><div class='long'><p>Convenience function to hide or show this component by Boolean.</p>\n <p>Available since: <b>1.1.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>visible</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><div class='sub-desc'><p><code>true</code> to show, <code>false</code> to hide.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-setWidth' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-setWidth' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-setWidth' class='name expandable'>setWidth</a>( <span class='pre'>width</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Sets the width of the component. ...</div><div class='long'><p>Sets the width of the component. This method fires the <a href=\"#!/api/Ext.AbstractComponent-event-resize\" rel=\"Ext.AbstractComponent-event-resize\" class=\"docClass\">resize</a> event.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>width</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The new width to setThis may be one of:</p>\n\n<ul>\n<li>A Number specifying the new width in the <a href=\"#!/api/Ext.AbstractComponent-method-getEl\" rel=\"Ext.AbstractComponent-method-getEl\" class=\"docClass\">Element</a>'s <a href=\"#!/api/Ext.dom.Element-property-defaultUnit\" rel=\"Ext.dom.Element-property-defaultUnit\" class=\"docClass\">Ext.Element.defaultUnit</a>s (by default, pixels).</li>\n<li>A String used to set the CSS width style.</li>\n</ul>\n\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-setX' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-setX' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-setX' class='name expandable'>setX</a>( <span class='pre'>The, [animate]</span> ) : <a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a></div><div class='description'><div class='short'>Sets the X position of the DOM element based on page coordinates. ...</div><div class='long'><p>Sets the X position of the DOM element based on page coordinates.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>The</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>X position</p>\n</div></li><li><span class='pre'>animate</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>True for the default animation, or a standard\nElement animation config object</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.util.Positionable-method-setX' rel='Ext.util.Positionable-method-setX' class='docClass'>Ext.util.Positionable.setX</a></p></div></div></div><div id='method-setXY' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-setXY' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-setXY' class='name expandable'>setXY</a>( <span class='pre'>pos, [animate]</span> ) : <a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a></div><div class='description'><div class='short'>Sets the position of the DOM element in page coordinates. ...</div><div class='long'><p>Sets the position of the DOM element in page coordinates.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>pos</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]<div class='sub-desc'><p>Contains X & Y [x, y] values for new position (coordinates\nare page-based)</p>\n</div></li><li><span class='pre'>animate</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>True for the default animation, or a standard\nElement animation config object</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.util.Positionable-method-setXY' rel='Ext.util.Positionable-method-setXY' class='docClass'>Ext.util.Positionable.setXY</a></p></div></div></div><div id='method-setY' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-setY' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-setY' class='name expandable'>setY</a>( <span class='pre'>The, [animate]</span> ) : <a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a></div><div class='description'><div class='short'>Sets the Y position of the DOM element based on page coordinates. ...</div><div class='long'><p>Sets the Y position of the DOM element based on page coordinates.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>The</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>Y position</p>\n</div></li><li><span class='pre'>animate</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>True for the default animation, or a standard\nElement animation config object</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.util.Positionable\" rel=\"Ext.util.Positionable\" class=\"docClass\">Ext.util.Positionable</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.util.Positionable-method-setY' rel='Ext.util.Positionable-method-setY' class='docClass'>Ext.util.Positionable.setY</a></p></div></div></div><div id='method-setZIndex' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-method-setZIndex' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-method-setZIndex' class='name expandable'>setZIndex</a>( <span class='pre'>index</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>z-index is managed by the zIndexManager and may be overwritten at any time. ...</div><div class='long'><p>z-index is managed by the zIndexManager and may be overwritten at any time.\nReturns the next z-index to be used.\nIf this is a Container, then it will have rebased any managed floating Components,\nand so the next available z-index will be approximately 10000 above that.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>index</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-setupFramingTpl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-setupFramingTpl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-setupFramingTpl' class='name expandable'>setupFramingTpl</a>( <span class='pre'>frameTpl</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Inject a reference to the function which applies the render template into the framing template. ...</div><div class='long'><p>Inject a reference to the function which applies the render template into the framing template. The framing template\nwraps the content.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>frameTpl</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-setupProtoEl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-setupProtoEl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-setupProtoEl' class='name expandable'>setupProtoEl</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-setupRenderTpl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-method-setupRenderTpl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-method-setupRenderTpl' class='name expandable'>setupRenderTpl</a>( <span class='pre'>renderTpl</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>renderTpl</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.util.Renderable-method-setupRenderTpl' rel='Ext.util.Renderable-method-setupRenderTpl' class='docClass'>Ext.util.Renderable.setupRenderTpl</a></p></div></div></div><div id='method-show' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-show' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-show' class='name expandable'>show</a>( <span class='pre'>[animateTarget], [callback], [scope]</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Shows this Component, rendering it first if autoRender or floating are true. ...</div><div class='long'><p>Shows this Component, rendering it first if <a href=\"#!/api/Ext.Component-cfg-autoRender\" rel=\"Ext.Component-cfg-autoRender\" class=\"docClass\">autoRender</a> or <a href=\"#!/api/Ext.Component-cfg-floating\" rel=\"Ext.Component-cfg-floating\" class=\"docClass\">floating</a> are <code>true</code>.</p>\n\n<p>After being shown, a <a href=\"#!/api/Ext.Component-cfg-floating\" rel=\"Ext.Component-cfg-floating\" class=\"docClass\">floating</a> Component (such as a <a href=\"#!/api/Ext.window.Window\" rel=\"Ext.window.Window\" class=\"docClass\">Ext.window.Window</a>), is activated it and\nbrought to the front of its <a href=\"#!/api/Ext.Component-property-zIndexManager\" rel=\"Ext.Component-property-zIndexManager\" class=\"docClass\">z-index stack</a>.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>animateTarget</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a> (optional)<div class='sub-desc'><p><strong>only valid for <a href=\"#!/api/Ext.Component-cfg-floating\" rel=\"Ext.Component-cfg-floating\" class=\"docClass\">floating</a> Components such as <a href=\"#!/api/Ext.window.Window\" rel=\"Ext.window.Window\" class=\"docClass\">Window</a>s or <a href=\"#!/api/Ext.tip.ToolTip\" rel=\"Ext.tip.ToolTip\" class=\"docClass\">ToolTip</a>s, or regular Components which have been configured\nwith <code>floating: true</code>.</strong> The target from which the Component should animate from while opening.</p>\n<p>Defaults to: <code>null</code></p></div></li><li><span class='pre'>callback</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a> (optional)<div class='sub-desc'><p>A callback function to call after the Component is displayed.\nOnly necessary if animation was specified.</p>\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>The scope (<code>this</code> reference) in which the callback is executed.\nDefaults to this Component.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.AbstractComponent-method-show' rel='Ext.AbstractComponent-method-show' class='docClass'>Ext.AbstractComponent.show</a></p></div></div></div><div id='method-showAt' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-showAt' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-showAt' class='name expandable'>showAt</a>( <span class='pre'>x, [y], [animate]</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Displays component at specific xy position. ...</div><div class='long'><p>Displays component at specific xy position.\nA floating component (like a menu) is positioned relative to its ownerCt if any.\nUseful for popping up a context menu:</p>\n\n<pre><code>listeners: {\n itemcontextmenu: function(view, record, item, index, event, options) {\n <a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('<a href=\"#!/api/Ext.menu.Menu\" rel=\"Ext.menu.Menu\" class=\"docClass\">Ext.menu.Menu</a>', {\n width: 100,\n height: 100,\n margin: '0 0 10 0',\n items: [{\n text: 'regular item 1'\n },{\n text: 'regular item 2'\n },{\n text: 'regular item 3'\n }]\n }).showAt(event.getXY());\n }\n}\n</code></pre>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>x</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/<a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[]<div class='sub-desc'><p>The new x position or array of <code>[x,y]</code>.</p>\n</div></li><li><span class='pre'>y</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a> (optional)<div class='sub-desc'><p>The new y position</p>\n</div></li><li><span class='pre'>animate</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>True to animate the Component into its new position. You may also pass an\nanimation configuration.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-showBusy' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.statusbar.StatusBar'>Ext.ux.statusbar.StatusBar</span><br/><a href='source/StatusBar.html#Ext-ux-statusbar-StatusBar-method-showBusy' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.statusbar.StatusBar-method-showBusy' class='name expandable'>showBusy</a>( <span class='pre'>[config]</span> ) : <a href=\"#!/api/Ext.ux.statusbar.StatusBar\" rel=\"Ext.ux.statusbar.StatusBar\" class=\"docClass\">Ext.ux.statusbar.StatusBar</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Convenience method for setting the status text and icon to special values that are pre-configured to indicate\na \"busy...</div><div class='long'><p>Convenience method for setting the status text and icon to special values that are pre-configured to indicate\na \"busy\" state, usually for loading or processing activities.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>config</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a> (optional)<div class='sub-desc'><p>A config object in the same format supported by <a href=\"#!/api/Ext.ux.statusbar.StatusBar-method-setStatus\" rel=\"Ext.ux.statusbar.StatusBar-method-setStatus\" class=\"docClass\">setStatus</a>, or a\nstring to use as the status text (in which case all other options for setStatus will be defaulted). Use the\n<code>text</code> and/or <code>iconCls</code> properties on the config to override the default <a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-busyText\" rel=\"Ext.ux.statusbar.StatusBar-cfg-busyText\" class=\"docClass\">busyText</a>\nand <a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-busyIconCls\" rel=\"Ext.ux.statusbar.StatusBar-cfg-busyIconCls\" class=\"docClass\">busyIconCls</a> settings. If the config argument is not specified, <a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-busyText\" rel=\"Ext.ux.statusbar.StatusBar-cfg-busyText\" class=\"docClass\">busyText</a> and\n<a href=\"#!/api/Ext.ux.statusbar.StatusBar-cfg-busyIconCls\" rel=\"Ext.ux.statusbar.StatusBar-cfg-busyIconCls\" class=\"docClass\">busyIconCls</a> will be used in conjunction with all of the default options for <a href=\"#!/api/Ext.ux.statusbar.StatusBar-method-setStatus\" rel=\"Ext.ux.statusbar.StatusBar-method-setStatus\" class=\"docClass\">setStatus</a>.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.ux.statusbar.StatusBar\" rel=\"Ext.ux.statusbar.StatusBar\" class=\"docClass\">Ext.ux.statusbar.StatusBar</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-showBy' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-showBy' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-showBy' class='name expandable'>showBy</a>( <span class='pre'>component, [position], [offsets]</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Shows this component by the specified Component or Element. ...</div><div class='long'><p>Shows this component by the specified <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Component</a> or <a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Element</a>.\nUsed when this component is <a href=\"#!/api/Ext.Component-cfg-floating\" rel=\"Ext.Component-cfg-floating\" class=\"docClass\">floating</a>.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>component</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>/<a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.dom.Element</a><div class='sub-desc'><p>The <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> or <a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a> to show the component by.</p>\n</div></li><li><span class='pre'>position</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a> (optional)<div class='sub-desc'><p>Alignment position as used by <a href=\"#!/api/Ext.util.Positionable-method-getAlignToXY\" rel=\"Ext.util.Positionable-method-getAlignToXY\" class=\"docClass\">Ext.util.Positionable.getAlignToXY</a>.\nDefaults to <code><a href=\"#!/api/Ext.Component-cfg-defaultAlign\" rel=\"Ext.Component-cfg-defaultAlign\" class=\"docClass\">defaultAlign</a></code>.</p>\n</div></li><li><span class='pre'>offsets</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>[] (optional)<div class='sub-desc'><p>Alignment offsets as used by <a href=\"#!/api/Ext.util.Positionable-method-getAlignToXY\" rel=\"Ext.util.Positionable-method-getAlignToXY\" class=\"docClass\">Ext.util.Positionable.getAlignToXY</a>.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-statics' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-method-statics' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-method-statics' class='name expandable'>statics</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.Class\" rel=\"Ext.Class\" class=\"docClass\">Ext.Class</a><strong class='protected signature' >protected</strong></div><div class='description'><div class='short'>Get the reference to the class from which this object was instantiated. ...</div><div class='long'><p>Get the reference to the class from which this object was instantiated. Note that unlike <a href=\"#!/api/Ext.Base-property-self\" rel=\"Ext.Base-property-self\" class=\"docClass\">self</a>,\n<code>this.statics()</code> is scope-independent and it always returns the class from which it was called, regardless of what\n<code>this</code> points to during run-time</p>\n\n<pre><code><a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('My.Cat', {\n statics: {\n totalCreated: 0,\n speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n },\n\n constructor: function() {\n var statics = this.statics();\n\n alert(statics.speciesName); // always equals to 'Cat' no matter what 'this' refers to\n // equivalent to: My.Cat.speciesName\n\n alert(this.self.speciesName); // dependent on 'this'\n\n statics.totalCreated++;\n },\n\n clone: function() {\n var cloned = new this.self; // dependent on 'this'\n\n cloned.groupName = this.statics().speciesName; // equivalent to: My.Cat.speciesName\n\n return cloned;\n }\n});\n\n\n<a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('My.SnowLeopard', {\n extend: 'My.Cat',\n\n statics: {\n speciesName: 'Snow Leopard' // My.SnowLeopard.speciesName = 'Snow Leopard'\n },\n\n constructor: function() {\n this.callParent();\n }\n});\n\nvar cat = new My.Cat(); // alerts 'Cat', then alerts 'Cat'\n\nvar snowLeopard = new My.SnowLeopard(); // alerts 'Cat', then alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(<a href=\"#!/api/Ext-method-getClassName\" rel=\"Ext-method-getClassName\" class=\"docClass\">Ext.getClassName</a>(clone)); // alerts 'My.SnowLeopard'\nalert(clone.groupName); // alerts 'Cat'\n\nalert(My.Cat.totalCreated); // alerts 3\n</code></pre>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Class\" rel=\"Ext.Class\" class=\"docClass\">Ext.Class</a></span><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-stopAnimation' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Animate' rel='Ext.util.Animate' class='defined-in docClass'>Ext.util.Animate</a><br/><a href='source/Animate.html#Ext-util-Animate-method-stopAnimation' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Animate-method-stopAnimation' class='name expandable'>stopAnimation</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Stops any running effects and clears this object's internal effects queue if it contains any additional effects\nthat ...</div><div class='long'><p>Stops any running effects and clears this object's internal effects queue if it contains any additional effects\nthat haven't started yet.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a></span><div class='sub-desc'><p>The Element</p>\n</div></li></ul></div></div></div><div id='method-stopFx' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Animate' rel='Ext.util.Animate' class='defined-in docClass'>Ext.util.Animate</a><br/><a href='source/Animate.html#Ext-util-Animate-method-stopFx' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Animate-method-stopFx' class='name expandable'>stopFx</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a><strong class='deprecated signature' >deprecated</strong></div><div class='description'><div class='short'>Stops any running effects and clears this object's internal effects queue if it contains any additional effects\nthat ...</div><div class='long'><p>Stops any running effects and clears this object's internal effects queue if it contains any additional effects\nthat haven't started yet.</p>\n <div class='signature-box deprecated'>\n <p>This method has been <strong>deprecated</strong> since 4.0</p>\n <p>Replaced by <a href=\"#!/api/Ext.util.Animate-method-stopAnimation\" rel=\"Ext.util.Animate-method-stopAnimation\" class=\"docClass\">stopAnimation</a></p>\n\n </div>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a></span><div class='sub-desc'><p>The Element</p>\n</div></li></ul></div></div></div><div id='method-suspendEvent' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-suspendEvent' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-suspendEvent' class='name expandable'>suspendEvent</a>( <span class='pre'>eventName</span> )</div><div class='description'><div class='short'>Suspends firing of the named event(s). ...</div><div class='long'><p>Suspends firing of the named event(s).</p>\n\n<p>After calling this method to suspend events, the events will no longer fire when requested to fire.</p>\n\n<p><strong>Note that if this is called multiple times for a certain event, the converse method\n<a href=\"#!/api/Ext.util.Observable-method-resumeEvent\" rel=\"Ext.util.Observable-method-resumeEvent\" class=\"docClass\">resumeEvent</a> will have to be called the same number of times for it to resume firing.</strong></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>eventName</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>...<div class='sub-desc'><p>Multiple event names to suspend.</p>\n</div></li></ul></div></div></div><div id='method-suspendEvents' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-suspendEvents' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-suspendEvents' class='name expandable'>suspendEvents</a>( <span class='pre'>queueSuspended</span> )</div><div class='description'><div class='short'>Suspends the firing of all events. ...</div><div class='long'><p>Suspends the firing of all events. (see <a href=\"#!/api/Ext.util.Observable-method-resumeEvents\" rel=\"Ext.util.Observable-method-resumeEvents\" class=\"docClass\">resumeEvents</a>)</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>queueSuspended</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><div class='sub-desc'><p>Pass as true to queue up suspended events to be fired\nafter the <a href=\"#!/api/Ext.util.Observable-method-resumeEvents\" rel=\"Ext.util.Observable-method-resumeEvents\" class=\"docClass\">resumeEvents</a> call instead of discarding all suspended events.</p>\n</div></li></ul></div></div></div><div id='method-suspendLayouts' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-suspendLayouts' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-suspendLayouts' class='name expandable'>suspendLayouts</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-syncFx' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Animate' rel='Ext.util.Animate' class='defined-in docClass'>Ext.util.Animate</a><br/><a href='source/Animate.html#Ext-util-Animate-method-syncFx' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Animate-method-syncFx' class='name expandable'>syncFx</a>( <span class='pre'></span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Ensures that all effects queued after syncFx is called on this object are run concurrently. ...</div><div class='long'><p>Ensures that all effects queued after syncFx is called on this object are run concurrently. This is the opposite\nof <a href=\"#!/api/Ext.util.Animate-method-sequenceFx\" rel=\"Ext.util.Animate-method-sequenceFx\" class=\"docClass\">sequenceFx</a>.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-syncHidden' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-method-syncHidden' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-method-syncHidden' class='name expandable'>syncHidden</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>synchronizes the hidden state of this component with the state of its hierarchy ...</div><div class='long'><p>synchronizes the hidden state of this component with the state of its hierarchy</p>\n</div></div></div><div id='method-syncShadow' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-method-syncShadow' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-method-syncShadow' class='name expandable'>syncShadow</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-toBack' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-method-toBack' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-method-toBack' class='name expandable'>toBack</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Sends this Component to the back of (lower z-index than) any other visible windows ...</div><div class='long'><p>Sends this Component to the back of (lower z-index than) any other visible windows</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-toFront' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Floating' rel='Ext.util.Floating' class='defined-in docClass'>Ext.util.Floating</a><br/><a href='source/Floating2.html#Ext-util-Floating-method-toFront' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Floating-method-toFront' class='name expandable'>toFront</a>( <span class='pre'>[preventFocus]</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></div><div class='description'><div class='short'>Brings this floating Component to the front of any other visible, floating Components managed by the same\nZIndexManag...</div><div class='long'><p>Brings this floating Component to the front of any other visible, floating Components managed by the same\n<a href=\"#!/api/Ext.ZIndexManager\" rel=\"Ext.ZIndexManager\" class=\"docClass\">ZIndexManager</a></p>\n\n<p>If this Component is modal, inserts the modal mask just below this Component in the z-index stack.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>preventFocus</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p>Specify <code>true</code> to prevent the Component from being focused.</p>\n<p>Defaults to: <code>false</code></p></div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-trackMenu' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-method-trackMenu' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-method-trackMenu' class='name expandable'>trackMenu</a>( <span class='pre'>item, remove</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>item</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>remove</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-translatePoints' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='defined-in docClass'>Ext.util.Positionable</a><br/><a href='source/Positionable.html#Ext-util-Positionable-method-translatePoints' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Positionable-method-translatePoints' class='name expandable'>translatePoints</a>( <span class='pre'>x, [y]</span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></div><div class='description'><div class='short'>Translates the passed page coordinates into left/top css values for the element ...</div><div class='long'><p>Translates the passed page coordinates into left/top css values for the element</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>x</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/<a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a><div class='sub-desc'><p>The page x or an array containing [x, y]</p>\n</div></li><li><span class='pre'>y</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a> (optional)<div class='sub-desc'><p>The page y, required if x is not an array</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p>An object with left and top properties. e.g.\n{left: (value), top: (value)}</p>\n</div></li></ul></div></div></div><div id='method-translateXY' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Positionable' rel='Ext.util.Positionable' class='defined-in docClass'>Ext.util.Positionable</a><br/><a href='source/Positionable.html#Ext-util-Positionable-method-translateXY' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Positionable-method-translateXY' class='name expandable'>translateXY</a>( <span class='pre'>x, [y]</span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><strong class='private signature' >private</strong></div><div class='description'><div class='short'>Translates the passed page coordinates into x and y css values for the element ...</div><div class='long'><p>Translates the passed page coordinates into x and y css values for the element</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>x</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/<a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a><div class='sub-desc'><p>The page x or an array containing [x, y]</p>\n</div></li><li><span class='pre'>y</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a> (optional)<div class='sub-desc'><p>The page y, required if x is not an array</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p>An object with x and y properties. e.g.\n{x: (value), y: (value)}</p>\n</div></li></ul></div></div></div><div id='method-un' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='defined-in docClass'>Ext.util.Observable</a><br/><a href='source/Observable.html#Ext-util-Observable-method-un' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Observable-method-un' class='name expandable'>un</a>( <span class='pre'>eventName, fn, [scope]</span> )</div><div class='description'><div class='short'>Shorthand for removeListener. ...</div><div class='long'><p>Shorthand for <a href=\"#!/api/Ext.util.Observable-method-removeListener\" rel=\"Ext.util.Observable-method-removeListener\" class=\"docClass\">removeListener</a>.</p>\n\n<p>Removes an event handler.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>eventName</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The type of event the handler was associated with.</p>\n\n</div></li><li><span class='pre'>fn</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a><div class='sub-desc'><p>The handler to remove. <strong>This must be a reference to the function passed into the\n<a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">addListener</a> call.</strong></p>\n\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>The scope originally specified for the handler. It must be the same as the\nscope argument specified in the original call to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">addListener</a> or the listener will not be removed.</p>\n\n</div></li></ul></div></div></div><div id='method-unitizeBox' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-unitizeBox' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-unitizeBox' class='name expandable'>unitizeBox</a>( <span class='pre'>box</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Overridden in Ext.rtl.AbstractComponent. ...</div><div class='long'><p><strong>Overridden in Ext.rtl.AbstractComponent.</strong></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>box</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-unmask' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-unmask' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-unmask' class='name expandable'>unmask</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-unregisterFloatingItem' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-unregisterFloatingItem' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-unregisterFloatingItem' class='name expandable'>unregisterFloatingItem</a>( <span class='pre'>cmp</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>cmp</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-up' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-up' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-up' class='name expandable'>up</a>( <span class='pre'>[selector], [limit]</span> ) : <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a></div><div class='description'><div class='short'>Navigates up the ownership hierarchy searching for an ancestor Container which matches any passed simple selector or ...</div><div class='long'><p>Navigates up the ownership hierarchy searching for an ancestor Container which matches any passed simple selector or component.</p>\n\n<p><em>Important.</em> There is not a universal upwards navigation pointer. There are several upwards relationships\nsuch as the <a href=\"#!/api/Ext.button.Button\" rel=\"Ext.button.Button\" class=\"docClass\">button</a> which activates a <a href=\"#!/api/Ext.button.Button-cfg-menu\" rel=\"Ext.button.Button-cfg-menu\" class=\"docClass\">menu</a>, or the\n<a href=\"#!/api/Ext.menu.Item\" rel=\"Ext.menu.Item\" class=\"docClass\">menu item</a> which activated a <a href=\"#!/api/Ext.menu.Item-cfg-menu\" rel=\"Ext.menu.Item-cfg-menu\" class=\"docClass\">submenu</a>, or the\n<a href=\"#!/api/Ext.grid.column.Column\" rel=\"Ext.grid.column.Column\" class=\"docClass\">column header</a> which activated the column menu.</p>\n\n<p>These differences are abstracted away by this method.</p>\n\n<p>Example:</p>\n\n<pre><code>var owningTabPanel = grid.up('tabpanel');\n</code></pre>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>selector</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> (optional)<div class='sub-desc'><p>The simple selector component or actual component to test. If not passed the immediate owner/activater is returned.</p>\n</div></li><li><span class='pre'>limit</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a>/<a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> (optional)<div class='sub-desc'><p>This may be a selector upon which to stop the upward scan, or a limit of teh number of steps, or Component reference to stop on.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a></span><div class='sub-desc'><p>The matching ancestor Container (or <code>undefined</code> if no match was found).</p>\n</div></li></ul></div></div></div><div id='method-update' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-update' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-update' class='name expandable'>update</a>( <span class='pre'>htmlOrData, [loadScripts], [callback]</span> )</div><div class='description'><div class='short'>Update the content area of a component. ...</div><div class='long'><p>Update the content area of a component.</p>\n <p>Available since: <b>3.4.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>htmlOrData</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>If this component has been configured with a template via the tpl config then\nit will use this argument as data to populate the template. If this component was not configured with a template,\nthe components content area will be updated via <a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a> update.</p>\n</div></li><li><span class='pre'>loadScripts</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a> (optional)<div class='sub-desc'><p>Only legitimate when using the <code>html</code> configuration.</p>\n<p>Defaults to: <code>false</code></p></div></li><li><span class='pre'>callback</span> : <a href=\"#!/api/Function\" rel=\"Function\" class=\"docClass\">Function</a> (optional)<div class='sub-desc'><p>Only legitimate when using the <code>html</code> configuration. Callback to execute when\nscripts have finished loading.</p>\n</div></li></ul></div></div></div><div id='method-updateAria' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-updateAria' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-updateAria' class='name expandable'>updateAria</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'>Injected as an override by Ext.Aria.initialize ...</div><div class='long'><p>Injected as an override by Ext.Aria.initialize</p>\n</div></div></div><div id='method-updateBox' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-updateBox' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-updateBox' class='name expandable'>updateBox</a>( <span class='pre'>box</span> ) : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Sets the current box measurements of the component's underlying element. ...</div><div class='long'><p>Sets the current box measurements of the component's underlying element.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>box</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>An object in the format {x, y, width, height}</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-updateFrame' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.util.Renderable' rel='Ext.util.Renderable' class='defined-in docClass'>Ext.util.Renderable</a><br/><a href='source/Renderable2.html#Ext-util-Renderable-method-updateFrame' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.util.Renderable-method-updateFrame' class='name expandable'>updateFrame</a>( <span class='pre'></span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-updateLayout' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-method-updateLayout' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-method-updateLayout' class='name expandable'>updateLayout</a>( <span class='pre'>[options]</span> )</div><div class='description'><div class='short'>Updates this component's layout. ...</div><div class='long'><p>Updates this component's layout. If this update affects this components <a href=\"#!/api/Ext.AbstractComponent-property-ownerCt\" rel=\"Ext.AbstractComponent-property-ownerCt\" class=\"docClass\">ownerCt</a>,\nthat component's <code>updateLayout</code> method will be called to perform the layout instead.\nOtherwise, just this component (and its child items) will layout.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>options</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> (optional)<div class='sub-desc'><p>An object with layout options.</p>\n<ul><li><span class='pre'>defer</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><div class='sub-desc'><p><code>true</code> if this layout should be deferred.</p>\n</div></li><li><span class='pre'>isRoot</span> : <a href=\"#!/api/Boolean\" rel=\"Boolean\" class=\"docClass\">Boolean</a><div class='sub-desc'><p><code>true</code> if this layout should be the root of the layout.</p>\n</div></li></ul></div></li></ul></div></div></div><div id='method-wrapPrimaryEl' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Component' rel='Ext.Component' class='defined-in docClass'>Ext.Component</a><br/><a href='source/Component5.html#Ext-Component-method-wrapPrimaryEl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Component-method-wrapPrimaryEl' class='name expandable'>wrapPrimaryEl</a>( <span class='pre'>dom</span> )<strong class='private signature' >private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>dom</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul><p>Overrides: <a href='#!/api/Ext.util.Renderable-method-wrapPrimaryEl' rel='Ext.util.Renderable-method-wrapPrimaryEl' class='docClass'>Ext.util.Renderable.wrapPrimaryEl</a></p></div></div></div></div><div class='subsection'><div class='definedBy'>Defined By</div><h4 class='members-subtitle'>Static Methods</h3><div id='static-method-addConfig' class='member first-child inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-static-method-addConfig' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-static-method-addConfig' class='name expandable'>addConfig</a>( <span class='pre'>config</span> )<strong class='private signature' >private</strong><strong class='static signature' >static</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>config</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='static-method-addInheritableStatics' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-static-method-addInheritableStatics' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-static-method-addInheritableStatics' class='name expandable'>addInheritableStatics</a>( <span class='pre'>members</span> )<strong class='chainable signature' >chainable</strong><strong class='private signature' >private</strong><strong class='static signature' >static</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>members</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='static-method-addMember' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-static-method-addMember' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-static-method-addMember' class='name expandable'>addMember</a>( <span class='pre'>name, member</span> )<strong class='chainable signature' >chainable</strong><strong class='private signature' >private</strong><strong class='static signature' >static</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>name</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>member</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='static-method-addMembers' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-static-method-addMembers' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-static-method-addMembers' class='name expandable'>addMembers</a>( <span class='pre'>members</span> )<strong class='chainable signature' >chainable</strong><strong class='static signature' >static</strong></div><div class='description'><div class='short'>Add methods / properties to the prototype of this class. ...</div><div class='long'><p>Add methods / properties to the prototype of this class.</p>\n\n<pre><code><a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('My.awesome.Cat', {\n constructor: function() {\n ...\n }\n});\n\n My.awesome.Cat.addMembers({\n meow: function() {\n alert('Meowww...');\n }\n });\n\n var kitty = new My.awesome.Cat;\n kitty.meow();\n</code></pre>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>members</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='static-method-addStatics' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-static-method-addStatics' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-static-method-addStatics' class='name expandable'>addStatics</a>( <span class='pre'>members</span> ) : <a href=\"#!/api/Ext.Base\" rel=\"Ext.Base\" class=\"docClass\">Ext.Base</a><strong class='chainable signature' >chainable</strong><strong class='static signature' >static</strong></div><div class='description'><div class='short'>Add / override static properties of this class. ...</div><div class='long'><p>Add / override static properties of this class.</p>\n\n<pre><code><a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('My.cool.Class', {\n ...\n});\n\nMy.cool.Class.addStatics({\n someProperty: 'someValue', // My.cool.Class.someProperty = 'someValue'\n method1: function() { ... }, // My.cool.Class.method1 = function() { ... };\n method2: function() { ... } // My.cool.Class.method2 = function() { ... };\n});\n</code></pre>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>members</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Base\" rel=\"Ext.Base\" class=\"docClass\">Ext.Base</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='static-method-addXtype' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-static-method-addXtype' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-static-method-addXtype' class='name expandable'>addXtype</a>( <span class='pre'>xtype</span> )<strong class='chainable signature' >chainable</strong><strong class='private signature' >private</strong><strong class='static signature' >static</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>xtype</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='static-method-borrow' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-static-method-borrow' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-static-method-borrow' class='name expandable'>borrow</a>( <span class='pre'>fromClass, members</span> ) : <a href=\"#!/api/Ext.Base\" rel=\"Ext.Base\" class=\"docClass\">Ext.Base</a><strong class='chainable signature' >chainable</strong><strong class='private signature' >private</strong><strong class='static signature' >static</strong></div><div class='description'><div class='short'>Borrow another class' members to the prototype of this class. ...</div><div class='long'><p>Borrow another class' members to the prototype of this class.</p>\n\n<pre><code><a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('Bank', {\n money: '$$$',\n printMoney: function() {\n alert('$$$$$$$');\n }\n});\n\n<a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('Thief', {\n ...\n});\n\nThief.borrow(Bank, ['money', 'printMoney']);\n\nvar steve = new Thief();\n\nalert(steve.money); // alerts '$$$'\nsteve.printMoney(); // alerts '$$$$$$$'\n</code></pre>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>fromClass</span> : <a href=\"#!/api/Ext.Base\" rel=\"Ext.Base\" class=\"docClass\">Ext.Base</a><div class='sub-desc'><p>The class to borrow members from</p>\n</div></li><li><span class='pre'>members</span> : <a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a>/<a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The names of the members to borrow</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Base\" rel=\"Ext.Base\" class=\"docClass\">Ext.Base</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='static-method-create' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-static-method-create' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-static-method-create' class='name expandable'>create</a>( <span class='pre'></span> ) : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><strong class='static signature' >static</strong></div><div class='description'><div class='short'>Create a new instance of this Class. ...</div><div class='long'><p>Create a new instance of this Class.</p>\n\n<pre><code><a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('My.cool.Class', {\n ...\n});\n\nMy.cool.Class.create({\n someConfig: true\n});\n</code></pre>\n\n<p>All parameters are passed to the constructor of the class.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span><div class='sub-desc'><p>the created instance.</p>\n</div></li></ul></div></div></div><div id='static-method-createAlias' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-static-method-createAlias' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-static-method-createAlias' class='name expandable'>createAlias</a>( <span class='pre'>alias, origin</span> )<strong class='static signature' >static</strong></div><div class='description'><div class='short'>Create aliases for existing prototype methods. ...</div><div class='long'><p>Create aliases for existing prototype methods. Example:</p>\n\n<pre><code><a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('My.cool.Class', {\n method1: function() { ... },\n method2: function() { ... }\n});\n\nvar test = new My.cool.Class();\n\nMy.cool.Class.createAlias({\n method3: 'method1',\n method4: 'method2'\n});\n\ntest.method3(); // test.method1()\n\nMy.cool.Class.createAlias('method5', 'method3');\n\ntest.method5(); // test.method3() -> test.method1()\n</code></pre>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>alias</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The new method name, or an object to set multiple aliases. See\n<a href=\"#!/api/Ext.Function-method-flexSetter\" rel=\"Ext.Function-method-flexSetter\" class=\"docClass\">flexSetter</a></p>\n</div></li><li><span class='pre'>origin</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a>/<a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The original method name</p>\n</div></li></ul></div></div></div><div id='static-method-extend' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-static-method-extend' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-static-method-extend' class='name expandable'>extend</a>( <span class='pre'>config</span> )<strong class='private signature' >private</strong><strong class='static signature' >static</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>config</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='static-method-getName' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-static-method-getName' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-static-method-getName' class='name expandable'>getName</a>( <span class='pre'></span> ) : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><strong class='static signature' >static</strong></div><div class='description'><div class='short'>Get the current class' name in string format. ...</div><div class='long'><p>Get the current class' name in string format.</p>\n\n<pre><code><a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('My.cool.Class', {\n constructor: function() {\n alert(this.self.getName()); // alerts 'My.cool.Class'\n }\n});\n\nMy.cool.Class.getName(); // 'My.cool.Class'\n</code></pre>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span><div class='sub-desc'><p>className</p>\n</div></li></ul></div></div></div><div id='static-method-implement' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-static-method-implement' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-static-method-implement' class='name expandable'>implement</a>( <span class='pre'></span> )<strong class='deprecated signature' >deprecated</strong><strong class='static signature' >static</strong></div><div class='description'><div class='short'>Adds members to class. ...</div><div class='long'><p>Adds members to class.</p>\n <div class='signature-box deprecated'>\n <p>This method has been <strong>deprecated</strong> since 4.1</p>\n <p>Use <a href=\"#!/api/Ext.Base-static-method-addMembers\" rel=\"Ext.Base-static-method-addMembers\" class=\"docClass\">addMembers</a> instead.</p>\n\n </div>\n</div></div></div><div id='static-method-mixin' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-static-method-mixin' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-static-method-mixin' class='name expandable'>mixin</a>( <span class='pre'>name, mixinClass</span> )<strong class='private signature' >private</strong><strong class='static signature' >static</strong></div><div class='description'><div class='short'>Used internally by the mixins pre-processor ...</div><div class='long'><p>Used internally by the mixins pre-processor</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>name</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>mixinClass</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='static-method-onExtended' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-static-method-onExtended' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-static-method-onExtended' class='name expandable'>onExtended</a>( <span class='pre'>fn, scope</span> )<strong class='chainable signature' >chainable</strong><strong class='private signature' >private</strong><strong class='static signature' >static</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>fn</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li><li><span class='pre'>scope</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='static-method-override' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-static-method-override' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-static-method-override' class='name expandable'>override</a>( <span class='pre'>members</span> ) : <a href=\"#!/api/Ext.Base\" rel=\"Ext.Base\" class=\"docClass\">Ext.Base</a><strong class='chainable signature' >chainable</strong><strong class='deprecated signature' >deprecated</strong><strong class='static signature' >static</strong></div><div class='description'><div class='short'>Override members of this class. ...</div><div class='long'><p>Override members of this class. Overridden methods can be invoked via\n<a href=\"#!/api/Ext.Base-method-callParent\" rel=\"Ext.Base-method-callParent\" class=\"docClass\">callParent</a>.</p>\n\n<pre><code><a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('My.Cat', {\n constructor: function() {\n alert(\"I'm a cat!\");\n }\n});\n\nMy.Cat.override({\n constructor: function() {\n alert(\"I'm going to be a cat!\");\n\n this.callParent(arguments);\n\n alert(\"Meeeeoooowwww\");\n }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n // alerts \"I'm a cat!\"\n // alerts \"Meeeeoooowwww\"\n</code></pre>\n\n<p>As of 4.1, direct use of this method is deprecated. Use <a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>\ninstead:</p>\n\n<pre><code><a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a>('My.CatOverride', {\n override: 'My.Cat',\n constructor: function() {\n alert(\"I'm going to be a cat!\");\n\n this.callParent(arguments);\n\n alert(\"Meeeeoooowwww\");\n }\n});\n</code></pre>\n\n<p>The above accomplishes the same result but can be managed by the <a href=\"#!/api/Ext.Loader\" rel=\"Ext.Loader\" class=\"docClass\">Ext.Loader</a>\nwhich can properly order the override and its target class and the build process\ncan determine whether the override is needed based on the required state of the\ntarget class (My.Cat).</p>\n <div class='signature-box deprecated'>\n <p>This method has been <strong>deprecated</strong> since 4.1.0</p>\n <p>Use <a href=\"#!/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a> instead</p>\n\n </div>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>members</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The properties to add to this class. This should be\nspecified as an object literal containing one or more properties.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.Base\" rel=\"Ext.Base\" class=\"docClass\">Ext.Base</a></span><div class='sub-desc'><p>this class</p>\n</div></li></ul></div></div></div><div id='static-method-triggerExtended' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.Base' rel='Ext.Base' class='defined-in docClass'>Ext.Base</a><br/><a href='source/Base.html#Ext-Base-static-method-triggerExtended' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.Base-static-method-triggerExtended' class='name expandable'>triggerExtended</a>( <span class='pre'></span> )<strong class='private signature' >private</strong><strong class='static signature' >static</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div></div></div><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-event'>Events</h3><div class='subsection'><div id='event-activate' class='member first-child inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-activate' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-activate' class='name expandable'>activate</a>( <span class='pre'>this, eOpts</span> )</div><div class='description'><div class='short'>Fires after a Component has been visually activated. ...</div><div class='long'><p>Fires after a Component has been visually activated.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-add' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-event-add' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-event-add' class='name expandable'>add</a>( <span class='pre'>this, component, index, eOpts</span> )</div><div class='description'><div class='short'>Fires after any Ext.Component is added or inserted into the container. ...</div><div class='long'><p>Fires after any <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> is added or inserted into the container.</p>\n\n<p><strong>This event bubbles:</strong> 'add' will also be fired when Component is added to any of\nthe child containers or their childern or ...</p>\n <p>Available since: <b>2.3.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a><div class='sub-desc'>\n</div></li><li><span class='pre'>component</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'><p>The component that was added</p>\n</div></li><li><span class='pre'>index</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The index at which the component was added to the container's items collection</p>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-added' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-added' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-added' class='name expandable'>added</a>( <span class='pre'>this, container, pos, eOpts</span> )</div><div class='description'><div class='short'>Fires after a Component had been added to a Container. ...</div><div class='long'><p>Fires after a Component had been added to a Container.</p>\n <p>Available since: <b>3.4.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>container</span> : <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a><div class='sub-desc'><p>Parent Container</p>\n</div></li><li><span class='pre'>pos</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>position of Component</p>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-afterlayout' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-event-afterlayout' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-event-afterlayout' class='name expandable'>afterlayout</a>( <span class='pre'>this, layout, eOpts</span> )</div><div class='description'><div class='short'>Fires when the components in this container are arranged by the associated layout manager. ...</div><div class='long'><p>Fires when the components in this container are arranged by the associated layout manager.</p>\n <p>Available since: <b>2.3.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a><div class='sub-desc'>\n</div></li><li><span class='pre'>layout</span> : <a href=\"#!/api/Ext.layout.container.Container\" rel=\"Ext.layout.container.Container\" class=\"docClass\">Ext.layout.container.Container</a><div class='sub-desc'><p>The ContainerLayout implementation for this container</p>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-afterrender' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-afterrender' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-afterrender' class='name expandable'>afterrender</a>( <span class='pre'>this, eOpts</span> )</div><div class='description'><div class='short'>Fires after the component rendering is finished. ...</div><div class='long'><p>Fires after the component rendering is finished.</p>\n\n<p>The <code>afterrender</code> event is fired after this Component has been <a href=\"#!/api/Ext.AbstractComponent-property-rendered\" rel=\"Ext.AbstractComponent-property-rendered\" class=\"docClass\">rendered</a>, been postprocessed by any\n<code>afterRender</code> method defined for the Component.</p>\n <p>Available since: <b>3.4.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-beforeactivate' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-beforeactivate' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-beforeactivate' class='name expandable'>beforeactivate</a>( <span class='pre'>this, eOpts</span> )</div><div class='description'><div class='short'>Fires before a Component has been visually activated. ...</div><div class='long'><p>Fires before a Component has been visually activated. Returning <code>false</code> from an event listener can prevent\nthe activate from occurring.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-beforeadd' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-event-beforeadd' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-event-beforeadd' class='name expandable'>beforeadd</a>( <span class='pre'>this, component, index, eOpts</span> )</div><div class='description'><div class='short'>Fires before any Ext.Component is added or inserted into the container. ...</div><div class='long'><p>Fires before any <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> is added or inserted into the container.\nA handler can return false to cancel the add.</p>\n <p>Available since: <b>2.3.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a><div class='sub-desc'>\n</div></li><li><span class='pre'>component</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'><p>The component being added</p>\n</div></li><li><span class='pre'>index</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The index at which the component will be added to the container's items collection</p>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-beforedeactivate' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-beforedeactivate' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-beforedeactivate' class='name expandable'>beforedeactivate</a>( <span class='pre'>this, eOpts</span> )</div><div class='description'><div class='short'>Fires before a Component has been visually deactivated. ...</div><div class='long'><p>Fires before a Component has been visually deactivated. Returning <code>false</code> from an event listener can\nprevent the deactivate from occurring.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-beforedestroy' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-beforedestroy' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-beforedestroy' class='name expandable'>beforedestroy</a>( <span class='pre'>this, eOpts</span> )</div><div class='description'><div class='short'>Fires before the component is destroyed. ...</div><div class='long'><p>Fires before the component is <a href=\"#!/api/Ext.AbstractComponent-method-destroy\" rel=\"Ext.AbstractComponent-method-destroy\" class=\"docClass\">destroy</a>ed. Return <code>false</code> from an event handler to stop the\n<a href=\"#!/api/Ext.AbstractComponent-method-destroy\" rel=\"Ext.AbstractComponent-method-destroy\" class=\"docClass\">destroy</a>.</p>\n <p>Available since: <b>1.1.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-beforehide' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-beforehide' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-beforehide' class='name expandable'>beforehide</a>( <span class='pre'>this, eOpts</span> )</div><div class='description'><div class='short'>Fires before the component is hidden when calling the hide method. ...</div><div class='long'><p>Fires before the component is hidden when calling the <a href=\"#!/api/Ext.Component-method-hide\" rel=\"Ext.Component-method-hide\" class=\"docClass\">hide</a> method. Return <code>false</code> from an event\nhandler to stop the hide.</p>\n <p>Available since: <b>1.1.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-beforeremove' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-event-beforeremove' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-event-beforeremove' class='name expandable'>beforeremove</a>( <span class='pre'>this, component, eOpts</span> )</div><div class='description'><div class='short'>Fires before any Ext.Component is removed from the container. ...</div><div class='long'><p>Fires before any <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> is removed from the container. A handler can return\nfalse to cancel the remove.</p>\n <p>Available since: <b>2.3.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a><div class='sub-desc'>\n</div></li><li><span class='pre'>component</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'><p>The component being removed</p>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-beforerender' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-beforerender' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-beforerender' class='name expandable'>beforerender</a>( <span class='pre'>this, eOpts</span> )</div><div class='description'><div class='short'>Fires before the component is rendered. ...</div><div class='long'><p>Fires before the component is <a href=\"#!/api/Ext.AbstractComponent-property-rendered\" rel=\"Ext.AbstractComponent-property-rendered\" class=\"docClass\">rendered</a>. Return <code>false</code> from an event handler to stop the\n<a href=\"#!/api/Ext.AbstractComponent-method-render\" rel=\"Ext.AbstractComponent-method-render\" class=\"docClass\">render</a>.</p>\n <p>Available since: <b>1.1.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-beforeshow' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-beforeshow' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-beforeshow' class='name expandable'>beforeshow</a>( <span class='pre'>this, eOpts</span> )</div><div class='description'><div class='short'>Fires before the component is shown when calling the show method. ...</div><div class='long'><p>Fires before the component is shown when calling the <a href=\"#!/api/Ext.Component-method-show\" rel=\"Ext.Component-method-show\" class=\"docClass\">show</a> method. Return <code>false</code> from an event\nhandler to stop the show.</p>\n <p>Available since: <b>1.1.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-beforestaterestore' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.state.Stateful' rel='Ext.state.Stateful' class='defined-in docClass'>Ext.state.Stateful</a><br/><a href='source/Stateful.html#Ext-state-Stateful-event-beforestaterestore' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.state.Stateful-event-beforestaterestore' class='name expandable'>beforestaterestore</a>( <span class='pre'>this, state, eOpts</span> )</div><div class='description'><div class='short'>Fires before the state of the object is restored. ...</div><div class='long'><p>Fires before the state of the object is restored. Return false from an event handler to stop the restore.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.state.Stateful\" rel=\"Ext.state.Stateful\" class=\"docClass\">Ext.state.Stateful</a><div class='sub-desc'>\n</div></li><li><span class='pre'>state</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The hash of state values returned from the StateProvider. If this\nevent is not vetoed, then the state object is passed to <b><tt>applyState</tt></b>. By default,\nthat simply copies property values into this object. The method maybe overriden to\nprovide custom state restoration.</p>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-beforestatesave' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.state.Stateful' rel='Ext.state.Stateful' class='defined-in docClass'>Ext.state.Stateful</a><br/><a href='source/Stateful.html#Ext-state-Stateful-event-beforestatesave' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.state.Stateful-event-beforestatesave' class='name expandable'>beforestatesave</a>( <span class='pre'>this, state, eOpts</span> )</div><div class='description'><div class='short'>Fires before the state of the object is saved to the configured state provider. ...</div><div class='long'><p>Fires before the state of the object is saved to the configured state provider. Return false to stop the save.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.state.Stateful\" rel=\"Ext.state.Stateful\" class=\"docClass\">Ext.state.Stateful</a><div class='sub-desc'>\n</div></li><li><span class='pre'>state</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The hash of state values. This is determined by calling\n<b><tt>getState()</tt></b> on the object. This method must be provided by the\ndeveloper to return whetever representation of state is required, by default, <a href=\"#!/api/Ext.state.Stateful\" rel=\"Ext.state.Stateful\" class=\"docClass\">Ext.state.Stateful</a>\nhas a null implementation.</p>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-blur' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-blur' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-blur' class='name expandable'>blur</a>( <span class='pre'>this, The, eOpts</span> )</div><div class='description'><div class='short'>Fires when this Component loses focus. ...</div><div class='long'><p>Fires when this Component loses focus.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>The</span> : <a href=\"#!/api/Ext.EventObject\" rel=\"Ext.EventObject\" class=\"docClass\">Ext.EventObject</a><div class='sub-desc'><p>blur event.</p>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-boxready' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-boxready' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-boxready' class='name expandable'>boxready</a>( <span class='pre'>this, width, height, eOpts</span> )</div><div class='description'><div class='short'>Fires one time - after the component has been laid out for the first time at its initial size. ...</div><div class='long'><p>Fires <em>one time</em> - after the component has been laid out for the first time at its initial size.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>width</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The initial width.</p>\n</div></li><li><span class='pre'>height</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The initial height.</p>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-deactivate' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-deactivate' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-deactivate' class='name expandable'>deactivate</a>( <span class='pre'>this, eOpts</span> )</div><div class='description'><div class='short'>Fires after a Component has been visually deactivated. ...</div><div class='long'><p>Fires after a Component has been visually deactivated.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-destroy' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-destroy' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-destroy' class='name expandable'>destroy</a>( <span class='pre'>this, eOpts</span> )</div><div class='description'><div class='short'>Fires after the component is destroyed. ...</div><div class='long'><p>Fires after the component is <a href=\"#!/api/Ext.AbstractComponent-method-destroy\" rel=\"Ext.AbstractComponent-method-destroy\" class=\"docClass\">destroy</a>ed.</p>\n <p>Available since: <b>1.1.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-disable' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-disable' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-disable' class='name expandable'>disable</a>( <span class='pre'>this, eOpts</span> )</div><div class='description'><div class='short'>Fires after the component is disabled. ...</div><div class='long'><p>Fires after the component is disabled.</p>\n <p>Available since: <b>1.1.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-enable' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-enable' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-enable' class='name expandable'>enable</a>( <span class='pre'>this, eOpts</span> )</div><div class='description'><div class='short'>Fires after the component is enabled. ...</div><div class='long'><p>Fires after the component is enabled.</p>\n <p>Available since: <b>1.1.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-focus' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-focus' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-focus' class='name expandable'>focus</a>( <span class='pre'>this, The, eOpts</span> )</div><div class='description'><div class='short'>Fires when this Component receives focus. ...</div><div class='long'><p>Fires when this Component receives focus.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>The</span> : <a href=\"#!/api/Ext.EventObject\" rel=\"Ext.EventObject\" class=\"docClass\">Ext.EventObject</a><div class='sub-desc'><p>focus event.</p>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-hide' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-hide' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-hide' class='name expandable'>hide</a>( <span class='pre'>this, eOpts</span> )</div><div class='description'><div class='short'>Fires after the component is hidden. ...</div><div class='long'><p>Fires after the component is hidden. Fires after the component is hidden when calling the <a href=\"#!/api/Ext.Component-method-hide\" rel=\"Ext.Component-method-hide\" class=\"docClass\">hide</a>\nmethod.</p>\n <p>Available since: <b>1.1.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-move' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-move' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-move' class='name expandable'>move</a>( <span class='pre'>this, x, y, eOpts</span> )</div><div class='description'><div class='short'>Fires after the component is moved. ...</div><div class='long'><p>Fires after the component is moved.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>x</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The new x position.</p>\n</div></li><li><span class='pre'>y</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The new y position.</p>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-overflowchange' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.html#Ext-toolbar-Toolbar-event-overflowchange' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-event-overflowchange' class='name expandable'>overflowchange</a>( <span class='pre'>lastHiddenCount, hiddenCount, The, eOpts</span> )</div><div class='description'><div class='short'>Fires after the overflow state has changed. ...</div><div class='long'><p>Fires after the overflow state has changed.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>lastHiddenCount</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The number of overflowing items that used to be hidden.</p>\n</div></li><li><span class='pre'>hiddenCount</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The number of overflowing items that are hidden now.</p>\n</div></li><li><span class='pre'>The</span> : <a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a><div class='sub-desc'><p>hidden items</p>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-remove' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.container.AbstractContainer' rel='Ext.container.AbstractContainer' class='defined-in docClass'>Ext.container.AbstractContainer</a><br/><a href='source/AbstractContainer.html#Ext-container-AbstractContainer-event-remove' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.container.AbstractContainer-event-remove' class='name expandable'>remove</a>( <span class='pre'>this, component, eOpts</span> )</div><div class='description'><div class='short'>Fires after any Ext.Component is removed from the container. ...</div><div class='long'><p>Fires after any <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a> is removed from the container.</p>\n\n<p><strong>This event bubbles:</strong> 'remove' will also be fired when Component is removed from any of\nthe child containers or their children or ...</p>\n <p>Available since: <b>2.3.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a><div class='sub-desc'>\n</div></li><li><span class='pre'>component</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'><p>The component that was removed</p>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-removed' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-removed' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-removed' class='name expandable'>removed</a>( <span class='pre'>this, ownerCt, eOpts</span> )</div><div class='description'><div class='short'>Fires when a component is removed from an Ext.container.Container ...</div><div class='long'><p>Fires when a component is removed from an <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a></p>\n <p>Available since: <b>3.4.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>ownerCt</span> : <a href=\"#!/api/Ext.container.Container\" rel=\"Ext.container.Container\" class=\"docClass\">Ext.container.Container</a><div class='sub-desc'><p>Container which holds the component</p>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-render' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-render' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-render' class='name expandable'>render</a>( <span class='pre'>this, eOpts</span> )</div><div class='description'><div class='short'>Fires after the component markup is rendered. ...</div><div class='long'><p>Fires after the component markup is <a href=\"#!/api/Ext.AbstractComponent-property-rendered\" rel=\"Ext.AbstractComponent-property-rendered\" class=\"docClass\">rendered</a>.</p>\n <p>Available since: <b>1.1.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-resize' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-resize' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-resize' class='name expandable'>resize</a>( <span class='pre'>this, width, height, oldWidth, oldHeight, eOpts</span> )</div><div class='description'><div class='short'>Fires after the component is resized. ...</div><div class='long'><p>Fires after the component is resized. Note that this does <em>not</em> fire when the component is first laid out at its initial\nsize. To hook that point in the life cycle, use the <a href=\"#!/api/Ext.AbstractComponent-event-boxready\" rel=\"Ext.AbstractComponent-event-boxready\" class=\"docClass\">boxready</a> event.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>width</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The new width that was set.</p>\n</div></li><li><span class='pre'>height</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The new height that was set.</p>\n</div></li><li><span class='pre'>oldWidth</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The previous width.</p>\n</div></li><li><span class='pre'>oldHeight</span> : <a href=\"#!/api/Number\" rel=\"Number\" class=\"docClass\">Number</a><div class='sub-desc'><p>The previous height.</p>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-show' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.AbstractComponent' rel='Ext.AbstractComponent' class='defined-in docClass'>Ext.AbstractComponent</a><br/><a href='source/AbstractComponent.html#Ext-AbstractComponent-event-show' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.AbstractComponent-event-show' class='name expandable'>show</a>( <span class='pre'>this, eOpts</span> )</div><div class='description'><div class='short'>Fires after the component is shown when calling the show method. ...</div><div class='long'><p>Fires after the component is shown when calling the <a href=\"#!/api/Ext.Component-method-show\" rel=\"Ext.Component-method-show\" class=\"docClass\">show</a> method.</p>\n <p>Available since: <b>1.1.0</b></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a><div class='sub-desc'>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-staterestore' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.state.Stateful' rel='Ext.state.Stateful' class='defined-in docClass'>Ext.state.Stateful</a><br/><a href='source/Stateful.html#Ext-state-Stateful-event-staterestore' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.state.Stateful-event-staterestore' class='name expandable'>staterestore</a>( <span class='pre'>this, state, eOpts</span> )</div><div class='description'><div class='short'>Fires after the state of the object is restored. ...</div><div class='long'><p>Fires after the state of the object is restored.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.state.Stateful\" rel=\"Ext.state.Stateful\" class=\"docClass\">Ext.state.Stateful</a><div class='sub-desc'>\n</div></li><li><span class='pre'>state</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The hash of state values returned from the StateProvider. This is passed\nto <b><tt>applyState</tt></b>. By default, that simply copies property values into this\nobject. The method maybe overriden to provide custom state restoration.</p>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div><div id='event-statesave' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.state.Stateful' rel='Ext.state.Stateful' class='defined-in docClass'>Ext.state.Stateful</a><br/><a href='source/Stateful.html#Ext-state-Stateful-event-statesave' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.state.Stateful-event-statesave' class='name expandable'>statesave</a>( <span class='pre'>this, state, eOpts</span> )</div><div class='description'><div class='short'>Fires after the state of the object is saved to the configured state provider. ...</div><div class='long'><p>Fires after the state of the object is saved to the configured state provider.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>this</span> : <a href=\"#!/api/Ext.state.Stateful\" rel=\"Ext.state.Stateful\" class=\"docClass\">Ext.state.Stateful</a><div class='sub-desc'>\n</div></li><li><span class='pre'>state</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The hash of state values. This is determined by calling\n<b><tt>getState()</tt></b> on the object. This method must be provided by the\ndeveloper to return whetever representation of state is required, by default, <a href=\"#!/api/Ext.state.Stateful\" rel=\"Ext.state.Stateful\" class=\"docClass\">Ext.state.Stateful</a>\nhas a null implementation.</p>\n</div></li><li><span class='pre'>eOpts</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'><p>The options object passed to <a href=\"#!/api/Ext.util.Observable-method-addListener\" rel=\"Ext.util.Observable-method-addListener\" class=\"docClass\">Ext.util.Observable.addListener</a>.</p>\n\n\n\n</div></li></ul></div></div></div></div></div><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-css_var'>CSS Variables</h3><div class='subsection'><div id='css_var-S-include-toolbar-default-ui' class='member first-child inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-include-toolbar-default-ui' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-include-toolbar-default-ui' class='name expandable'>$include-toolbar-default-ui</a><span> : boolean</span></div><div class='description'><div class='short'>True to include the \"default\" toolbar UI ...</div><div class='long'><p>True to include the \"default\" toolbar UI</p>\n<p>Defaults to: <code>$include-default-uis</code></p></div></div></div><div id='css_var-S-toolbar-background-color' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-background-color' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-background-color' class='name expandable'>$toolbar-background-color</a><span> : color</span></div><div class='description'><div class='short'>The background-color of the Toolbar ...</div><div class='long'><p>The background-color of the Toolbar</p>\n<p>Defaults to: <code>$base-color</code></p></div></div></div><div id='css_var-S-toolbar-background-gradient' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-background-gradient' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-background-gradient' class='name expandable'>$toolbar-background-gradient</a><span> : string/list</span></div><div class='description'><div class='short'>The background-gradient of the Toolbar. ...</div><div class='long'><p>The background-gradient of the Toolbar. Can be either the name of a predefined gradient\nor a list of color stops. Used as the <code>$type</code> parameter for <a href=\"#!/api/Global_CSS-css_mixin-background-gradient\" rel=\"Global_CSS-css_mixin-background-gradient\" class=\"docClass\">Global_CSS.background-gradient</a>.</p>\n<p>Defaults to: <code>null</code></p></div></div></div><div id='css_var-S-toolbar-border-color' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-border-color' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-border-color' class='name expandable'>$toolbar-border-color</a><span> : color</span></div><div class='description'><div class='short'>The border-color of Toolbars ...</div><div class='long'><p>The border-color of Toolbars</p>\n<p>Defaults to: <code>$base-color</code></p></div></div></div><div id='css_var-S-toolbar-border-style' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-border-style' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-border-style' class='name expandable'>$toolbar-border-style</a><span> : string</span></div><div class='description'><div class='short'>The border-style of Toolbars ...</div><div class='long'><p>The border-style of Toolbars</p>\n<p>Defaults to: <code>solid</code></p></div></div></div><div id='css_var-S-toolbar-border-width' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-border-width' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-border-width' class='name expandable'>$toolbar-border-width</a><span> : number</span></div><div class='description'><div class='short'>The border-width of Toolbars ...</div><div class='long'><p>The border-width of Toolbars</p>\n<p>Defaults to: <code>1px</code></p></div></div></div><div id='css_var-S-toolbar-font-size' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-font-size' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-font-size' class='name expandable'>$toolbar-font-size</a><span> : number</span></div><div class='description'><div class='short'>The default font-size of Toolbar text ...</div><div class='long'><p>The default font-size of Toolbar text</p>\n<p>Defaults to: <code>$font-size</code></p></div></div></div><div id='css_var-S-toolbar-footer-background-color' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-footer-background-color' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-footer-background-color' class='name expandable'>$toolbar-footer-background-color</a><span> : color</span></div><div class='description'><div class='short'>The background-color of footer Toolbars ...</div><div class='long'><p>The background-color of <a href=\"#!/api/Ext.panel.Panel-cfg-fbar\" rel=\"Ext.panel.Panel-cfg-fbar\" class=\"docClass\">footer</a> Toolbars</p>\n<p>Defaults to: <code>transparent</code></p></div></div></div><div id='css_var-S-toolbar-footer-border-width' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-footer-border-width' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-footer-border-width' class='name expandable'>$toolbar-footer-border-width</a><span> : number</span></div><div class='description'><div class='short'>The border-width of footer Toolbars ...</div><div class='long'><p>The border-width of <a href=\"#!/api/Ext.panel.Panel-cfg-fbar\" rel=\"Ext.panel.Panel-cfg-fbar\" class=\"docClass\">footer</a> Toolbars</p>\n<p>Defaults to: <code>0</code></p></div></div></div><div id='css_var-S-toolbar-footer-horizontal-spacing' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-footer-horizontal-spacing' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-footer-horizontal-spacing' class='name expandable'>$toolbar-footer-horizontal-spacing</a><span> : number</span></div><div class='description'><div class='short'>The horizontal spacing of footer Toolbar items ...</div><div class='long'><p>The horizontal spacing of <a href=\"#!/api/Ext.panel.Panel-cfg-fbar\" rel=\"Ext.panel.Panel-cfg-fbar\" class=\"docClass\">footer</a> Toolbar items</p>\n<p>Defaults to: <code>6px</code></p></div></div></div><div id='css_var-S-toolbar-footer-margin' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-footer-margin' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-footer-margin' class='name expandable'>$toolbar-footer-margin</a><span> : number/list</span></div><div class='description'><div class='short'>The margin of footer Toolbars ...</div><div class='long'><p>The margin of <a href=\"#!/api/Ext.panel.Panel-cfg-fbar\" rel=\"Ext.panel.Panel-cfg-fbar\" class=\"docClass\">footer</a> Toolbars</p>\n<p>Defaults to: <code>0</code></p></div></div></div><div id='css_var-S-toolbar-footer-vertical-spacing' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-footer-vertical-spacing' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-footer-vertical-spacing' class='name expandable'>$toolbar-footer-vertical-spacing</a><span> : number</span></div><div class='description'><div class='short'>The vertical spacing of footer Toolbar items ...</div><div class='long'><p>The vertical spacing of <a href=\"#!/api/Ext.panel.Panel-cfg-fbar\" rel=\"Ext.panel.Panel-cfg-fbar\" class=\"docClass\">footer</a> Toolbar items</p>\n<p>Defaults to: <code>2px</code></p></div></div></div><div id='css_var-S-toolbar-horizontal-spacing' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-horizontal-spacing' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-horizontal-spacing' class='name expandable'>$toolbar-horizontal-spacing</a><span> : number</span></div><div class='description'><div class='short'>The horizontal spacing of Toolbar items ...</div><div class='long'><p>The horizontal spacing of Toolbar items</p>\n<p>Defaults to: <code>2px</code></p></div></div></div><div id='css_var-S-toolbar-scroller-border-color' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-scroller-border-color' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-scroller-border-color' class='name expandable'>$toolbar-scroller-border-color</a><span> : color</span></div><div class='description'><div class='short'>The border-color of Toolbar scrollers ...</div><div class='long'><p>The border-color of Toolbar scrollers</p>\n<p>Defaults to: <code>#8db2e3</code></p></div></div></div><div id='css_var-S-toolbar-scroller-border-width' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-scroller-border-width' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-scroller-border-width' class='name expandable'>$toolbar-scroller-border-width</a><span> : number</span></div><div class='description'><div class='short'>The border-width of Toolbar scrollers ...</div><div class='long'><p>The border-width of Toolbar scrollers</p>\n<p>Defaults to: <code>0 0 1px</code></p></div></div></div><div id='css_var-S-toolbar-scroller-cursor' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-scroller-cursor' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-scroller-cursor' class='name expandable'>$toolbar-scroller-cursor</a><span> : string</span></div><div class='description'><div class='short'>The cursor of Toolbar scrollers ...</div><div class='long'><p>The cursor of Toolbar scrollers</p>\n<p>Defaults to: <code>pointer</code></p></div></div></div><div id='css_var-S-toolbar-scroller-cursor-disabled' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-scroller-cursor-disabled' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-scroller-cursor-disabled' class='name expandable'>$toolbar-scroller-cursor-disabled</a><span> : string</span></div><div class='description'><div class='short'>The cursor of disabled Toolbar scrollers ...</div><div class='long'><p>The cursor of disabled Toolbar scrollers</p>\n<p>Defaults to: <code>default</code></p></div></div></div><div id='css_var-S-toolbar-scroller-height' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-scroller-height' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-scroller-height' class='name expandable'>$toolbar-scroller-height</a><span> : number</span></div><div class='description'><div class='short'>The height of Toolbar scrollers ...</div><div class='long'><p>The height of Toolbar scrollers</p>\n<p>Defaults to: <code>22px</code></p></div></div></div><div id='css_var-S-toolbar-scroller-opacity-disabled' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-scroller-opacity-disabled' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-scroller-opacity-disabled' class='name expandable'>$toolbar-scroller-opacity-disabled</a><span> : number</span></div><div class='description'><div class='short'>The opacity of disabled Toolbar scrollers ...</div><div class='long'><p>The opacity of disabled Toolbar scrollers</p>\n<p>Defaults to: <code>1</code></p></div></div></div><div id='css_var-S-toolbar-scroller-width' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-scroller-width' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-scroller-width' class='name expandable'>$toolbar-scroller-width</a><span> : number</span></div><div class='description'><div class='short'>The width of Toolbar scrollers ...</div><div class='long'><p>The width of Toolbar scrollers</p>\n<p>Defaults to: <code>14px</code></p></div></div></div><div id='css_var-S-toolbar-separator-color' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-separator-color' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-separator-color' class='name expandable'>$toolbar-separator-color</a><span> : color</span></div><div class='description'><div class='short'>The main border-color of Toolbar Separators ...</div><div class='long'><p>The main border-color of Toolbar <a href=\"#!/api/Ext.toolbar.Separator\" rel=\"Ext.toolbar.Separator\" class=\"docClass\">Separators</a></p>\n<p>Defaults to: <code>adjust-color ( $base-color , $hue : - 1deg , $saturation : 100% , $lightness : - 4.3% )</code></p></div></div></div><div id='css_var-S-toolbar-separator-highlight-color' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-separator-highlight-color' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-separator-highlight-color' class='name expandable'>$toolbar-separator-highlight-color</a><span> : color</span></div><div class='description'><div class='short'>The highlight border-color of Toolbar Separators ...</div><div class='long'><p>The highlight border-color of Toolbar <a href=\"#!/api/Ext.toolbar.Separator\" rel=\"Ext.toolbar.Separator\" class=\"docClass\">Separators</a></p>\n<p>Defaults to: <code>#fff</code></p></div></div></div><div id='css_var-S-toolbar-separator-horizontal-border-style' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-separator-horizontal-border-style' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-separator-horizontal-border-style' class='name expandable'>$toolbar-separator-horizontal-border-style</a><span> : string</span></div><div class='description'><div class='short'>The border-style of Separators on a horizontally oriented Toolbar ...</div><div class='long'><p>The border-style of <a href=\"#!/api/Ext.toolbar.Separator\" rel=\"Ext.toolbar.Separator\" class=\"docClass\">Separators</a> on a horizontally oriented Toolbar</p>\n<p>Defaults to: <code>solid</code></p></div></div></div><div id='css_var-S-toolbar-separator-horizontal-border-width' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-separator-horizontal-border-width' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-separator-horizontal-border-width' class='name expandable'>$toolbar-separator-horizontal-border-width</a><span> : number</span></div><div class='description'><div class='short'>The border-width of Separators on a horizontally oriented Toolbar ...</div><div class='long'><p>The border-width of <a href=\"#!/api/Ext.toolbar.Separator\" rel=\"Ext.toolbar.Separator\" class=\"docClass\">Separators</a> on a horizontally oriented Toolbar</p>\n<p>Defaults to: <code>0 1px</code></p></div></div></div><div id='css_var-S-toolbar-separator-horizontal-height' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-separator-horizontal-height' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-separator-horizontal-height' class='name expandable'>$toolbar-separator-horizontal-height</a><span> : number</span></div><div class='description'><div class='short'>The height of Separators on a horizontally oriented Toolbar ...</div><div class='long'><p>The height of <a href=\"#!/api/Ext.toolbar.Separator\" rel=\"Ext.toolbar.Separator\" class=\"docClass\">Separators</a> on a horizontally oriented Toolbar</p>\n<p>Defaults to: <code>14px</code></p></div></div></div><div id='css_var-S-toolbar-separator-horizontal-margin' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-separator-horizontal-margin' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-separator-horizontal-margin' class='name expandable'>$toolbar-separator-horizontal-margin</a><span> : number/list</span></div><div class='description'><div class='short'>The margin of Separators on a horizontally oriented Toolbar ...</div><div class='long'><p>The margin of <a href=\"#!/api/Ext.toolbar.Separator\" rel=\"Ext.toolbar.Separator\" class=\"docClass\">Separators</a> on a horizontally oriented Toolbar</p>\n<p>Defaults to: <code>0 $toolbar-horizontal-spacing 0 0</code></p></div></div></div><div id='css_var-S-toolbar-separator-vertical-border-style' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-separator-vertical-border-style' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-separator-vertical-border-style' class='name expandable'>$toolbar-separator-vertical-border-style</a><span> : string</span></div><div class='description'><div class='short'>The border-style of Separators on a vertically oriented Toolbar ...</div><div class='long'><p>The border-style of <a href=\"#!/api/Ext.toolbar.Separator\" rel=\"Ext.toolbar.Separator\" class=\"docClass\">Separators</a> on a vertically oriented Toolbar</p>\n<p>Defaults to: <code>solid none</code></p></div></div></div><div id='css_var-S-toolbar-separator-vertical-border-width' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-separator-vertical-border-width' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-separator-vertical-border-width' class='name expandable'>$toolbar-separator-vertical-border-width</a><span> : number</span></div><div class='description'><div class='short'>The border-width of Separators on a vertically oriented Toolbar ...</div><div class='long'><p>The border-width of <a href=\"#!/api/Ext.toolbar.Separator\" rel=\"Ext.toolbar.Separator\" class=\"docClass\">Separators</a> on a vertically oriented Toolbar</p>\n<p>Defaults to: <code>1px 0</code></p></div></div></div><div id='css_var-S-toolbar-separator-vertical-margin' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-separator-vertical-margin' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-separator-vertical-margin' class='name expandable'>$toolbar-separator-vertical-margin</a><span> : number/list</span></div><div class='description'><div class='short'>The margin of Separators on a vertically oriented Toolbar ...</div><div class='long'><p>The margin of <a href=\"#!/api/Ext.toolbar.Separator\" rel=\"Ext.toolbar.Separator\" class=\"docClass\">Separators</a> on a vertically oriented Toolbar</p>\n<p>Defaults to: <code>0 5px $toolbar-vertical-spacing</code></p></div></div></div><div id='css_var-S-toolbar-spacer-width' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-spacer-width' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-spacer-width' class='name expandable'>$toolbar-spacer-width</a><span> : number</span></div><div class='description'><div class='short'>The width of Toolbar Spacers ...</div><div class='long'><p>The width of Toolbar <a href=\"#!/api/Ext.toolbar.Spacer\" rel=\"Ext.toolbar.Spacer\" class=\"docClass\">Spacers</a></p>\n<p>Defaults to: <code>2px</code></p></div></div></div><div id='css_var-S-toolbar-text-color' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-text-color' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-text-color' class='name expandable'>$toolbar-text-color</a><span> : color</span></div><div class='description'><div class='short'>The text-color of Toolbar text ...</div><div class='long'><p>The text-color of Toolbar text</p>\n<p>Defaults to: <code>mix ( desaturate ( lighten ( $base-color , 37 ) , 5 ) , #000 , 30 )</code></p></div></div></div><div id='css_var-S-toolbar-text-font-family' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-text-font-family' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-text-font-family' class='name expandable'>$toolbar-text-font-family</a><span> : string</span></div><div class='description'><div class='short'>The default font-family of Toolbar text ...</div><div class='long'><p>The default font-family of Toolbar text</p>\n<p>Defaults to: <code>$font-family</code></p></div></div></div><div id='css_var-S-toolbar-text-font-size' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-text-font-size' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-text-font-size' class='name expandable'>$toolbar-text-font-size</a><span> : number</span></div><div class='description'><div class='short'>The default font-size of Toolbar text ...</div><div class='long'><p>The default font-size of Toolbar text</p>\n<p>Defaults to: <code>ceil ( $font-size * .9 )</code></p></div></div></div><div id='css_var-S-toolbar-text-font-weight' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-text-font-weight' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-text-font-weight' class='name expandable'>$toolbar-text-font-weight</a><span> : number</span></div><div class='description'><div class='short'>The default font-size of Toolbar text ...</div><div class='long'><p>The default font-size of Toolbar text</p>\n<p>Defaults to: <code>normal</code></p></div></div></div><div id='css_var-S-toolbar-text-line-height' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-text-line-height' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-text-line-height' class='name expandable'>$toolbar-text-line-height</a><span> : number</span></div><div class='description'><div class='short'>The line-height of Toolbar text ...</div><div class='long'><p>The line-height of Toolbar text</p>\n<p>Defaults to: <code>16px</code></p></div></div></div><div id='css_var-S-toolbar-text-margin' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-text-margin' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-text-margin' class='name expandable'>$toolbar-text-margin</a><span> : number/list</span></div><div class='description'><div class='short'>The margin of Toolbar text ...</div><div class='long'><p>The margin of Toolbar text</p>\n<p>Defaults to: <code>0 6px 0 4px</code></p></div></div></div><div id='css_var-S-toolbar-text-padding' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-text-padding' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-text-padding' class='name expandable'>$toolbar-text-padding</a><span> : number/list</span></div><div class='description'><div class='short'>The padding of Toolbar text ...</div><div class='long'><p>The padding of Toolbar text</p>\n<p>Defaults to: <code>3px 4px 0 4px</code></p></div></div></div><div id='css_var-S-toolbar-tool-background-image' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-tool-background-image' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-tool-background-image' class='name expandable'>$toolbar-tool-background-image</a><span> : string</span></div><div class='description'><div class='short'>The sprite to use for Tools on a Toolbar ...</div><div class='long'><p>The sprite to use for <a href=\"#!/api/Ext.panel.Tool\" rel=\"Ext.panel.Tool\" class=\"docClass\">Tools</a> on a Toolbar</p>\n<p>Defaults to: <code>null</code></p></div></div></div><div id='css_var-S-toolbar-vertical-spacing' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss3.html#Ext-toolbar-Toolbar-css_var-S-toolbar-vertical-spacing' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_var-S-toolbar-vertical-spacing' class='name expandable'>$toolbar-vertical-spacing</a><span> : number</span></div><div class='description'><div class='short'>The vertical spacing of Toolbar items ...</div><div class='long'><p>The vertical spacing of Toolbar items</p>\n<p>Defaults to: <code>2px</code></p></div></div></div></div></div><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-css_mixin'>CSS Mixins</h3><div class='subsection'><div id='css_mixin-extjs-toolbar-ui' class='member first-child inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Ext.toolbar.Toolbar' rel='Ext.toolbar.Toolbar' class='defined-in docClass'>Ext.toolbar.Toolbar</a><br/><a href='source/Toolbar.scss2.html#Ext-toolbar-Toolbar-css_mixin-extjs-toolbar-ui' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.toolbar.Toolbar-css_mixin-extjs-toolbar-ui' class='name expandable'>extjs-toolbar-ui</a>( <span class='pre'>$ui, [$background-color], [$background-gradient], [$border-color], [$border-width], [$scroller-cursor], [$scroller-cursor-disabled], [$scroller-opacity-disabled], [$tool-background-image]</span> )</div><div class='description'><div class='short'>Creates a visual theme for a Toolbar. ...</div><div class='long'><p>Creates a visual theme for a Toolbar.</p>\n<ul><li><span class='pre'>$ui</span> : String<div class='sub-desc'><p>The name of the UI</p>\n</div></li><li><span class='pre'>$background-color</span> : color (optional)<div class='sub-desc'><p>The background color of the toolbar</p>\n<p>Defaults to: <code>$toolbar-background-color</code></p></div></li><li><span class='pre'>$background-gradient</span> : string/list (optional)<div class='sub-desc'><p>The background gradient of the toolbar</p>\n<p>Defaults to: <code>$toolbar-background-gradient</code></p></div></li><li><span class='pre'>$border-color</span> : color (optional)<div class='sub-desc'><p>The border color of the toolbar</p>\n<p>Defaults to: <code>$toolbar-border-color</code></p></div></li><li><span class='pre'>$border-width</span> : number (optional)<div class='sub-desc'><p>The border-width of the toolbar</p>\n<p>Defaults to: <code>$toolbar-border-width</code></p></div></li><li><span class='pre'>$scroller-cursor</span> : string (optional)<div class='sub-desc'><p>The cursor of Toolbar scrollers</p>\n<p>Defaults to: <code>$toolbar-scroller-cursor</code></p></div></li><li><span class='pre'>$scroller-cursor-disabled</span> : string (optional)<div class='sub-desc'><p>The cursor of disabled Toolbar scrollers</p>\n<p>Defaults to: <code>$toolbar-scroller-cursor-disabled</code></p></div></li><li><span class='pre'>$scroller-opacity-disabled</span> : number (optional)<div class='sub-desc'><p>The opacity of disabled Toolbar scrollers</p>\n<p>Defaults to: <code>$toolbar-scroller-opacity-disabled</code></p></div></li><li><span class='pre'>$tool-background-image</span> : string (optional)<div class='sub-desc'><p>The sprite to use for <a href=\"#!/api/Ext.panel.Tool\" rel=\"Ext.panel.Tool\" class=\"docClass\">Tools</a> on a Toolbar</p>\n<p>Defaults to: <code>$toolbar-tool-background-image</code></p></div></li></ul></div></div></div></div></div></div></div>","superclasses":["Ext.Base","Ext.AbstractComponent","Ext.Component","Ext.container.AbstractContainer","Ext.container.Container","Ext.toolbar.Toolbar"],"meta":{},"code_type":"ext_define","requires":["Ext.toolbar.TextItem"],"html_meta":{},"statics":{"property":[{"tagname":"property","owner":"Ext.Base","meta":{"static":true,"private":true},"name":"$onExtended","id":"static-property-S-onExtended"}],"cfg":[],"css_var":[],"method":[{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"private":true},"name":"addConfig","id":"static-method-addConfig"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"chainable":true,"private":true},"name":"addInheritableStatics","id":"static-method-addInheritableStatics"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"chainable":true,"private":true},"name":"addMember","id":"static-method-addMember"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"chainable":true},"name":"addMembers","id":"static-method-addMembers"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"chainable":true},"name":"addStatics","id":"static-method-addStatics"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"chainable":true,"private":true},"name":"addXtype","id":"static-method-addXtype"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"chainable":true,"private":true},"name":"borrow","id":"static-method-borrow"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true},"name":"create","id":"static-method-create"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true},"name":"createAlias","id":"static-method-createAlias"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"private":true},"name":"extend","id":"static-method-extend"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true},"name":"getName","id":"static-method-getName"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"deprecated":{"text":"Use {@link #addMembers} instead.","version":"4.1"}},"name":"implement","id":"static-method-implement"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"private":true},"name":"mixin","id":"static-method-mixin"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"chainable":true,"private":true},"name":"onExtended","id":"static-method-onExtended"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"chainable":true,"markdown":true,"deprecated":{"text":"Use {@link Ext#define Ext.define} instead","version":"4.1.0"}},"name":"override","id":"static-method-override"},{"tagname":"method","owner":"Ext.Base","meta":{"static":true,"private":true},"name":"triggerExtended","id":"static-method-triggerExtended"}],"event":[],"css_mixin":[]},"files":[{"href":"StatusBar.html#Ext-ux-statusbar-StatusBar","filename":"StatusBar.js"}],"linenr":1,"members":{"property":[{"tagname":"property","owner":"Ext.Base","meta":{"private":true},"name":"$className","id":"property-S-className"},{"tagname":"property","owner":"Ext.util.Positionable","meta":{"private":true},"name":"_alignRe","id":"property-_alignRe"},{"tagname":"property","owner":"Ext.AbstractComponent","meta":{"protected":true},"name":"_isLayoutRoot","id":"property-_isLayoutRoot"},{"tagname":"property","owner":"Ext.util.Positionable","meta":{"private":true},"name":"_positionTopLeft","id":"property-_positionTopLeft"},{"tagname":"property","owner":"Ext.ux.statusbar.StatusBar","meta":{"private":true},"name":"activeThreadId","id":"property-activeThreadId"},{"tagname":"property","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"allowDomMove","id":"property-allowDomMove"},{"tagname":"property","owner":"Ext.toolbar.Toolbar","meta":{"private":true},"name":"ariaRole","id":"property-ariaRole"},{"tagname":"property","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"autoGenId","id":"property-autoGenId"},{"tagname":"property","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"borderBoxCls","id":"property-borderBoxCls"},{"tagname":"property","owner":"Ext.Component","meta":{"private":true},"name":"bubbleEvents","id":"property-bubbleEvents"},{"tagname":"property","owner":"Ext.util.ElementContainer","meta":{"private":true},"name":"childEls","id":"property-childEls"},{"tagname":"property","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"componentLayoutCounter","id":"property-componentLayoutCounter"},{"tagname":"property","owner":"Ext.Base","meta":{"private":true},"name":"configMap","id":"property-configMap"},{"tagname":"property","owner":"Ext.AbstractComponent","meta":{},"name":"contentPaddingProperty","id":"property-contentPaddingProperty"},{"tagname":"property","owner":"Ext.util.Positionable","meta":{"private":true},"name":"convertPositionSpec","id":"property-convertPositionSpec"},{"tagname":"property","owner":"Ext.Component","meta":{"private":true},"name":"defaultComponentLayoutType","id":"property-defaultComponentLayoutType"},{"tagname":"property","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"deferLayouts","id":"property-deferLayouts"},{"tagname":"property","owner":"Ext.AbstractComponent","meta":{"readonly":true},"name":"draggable","id":"property-draggable"},{"tagname":"property","owner":"Ext.util.Observable","meta":{"private":true},"name":"eventsSuspended","id":"property-eventsSuspended"},{"tagname":"property","owner":"Ext.Component","meta":{"readonly":true},"name":"floatParent","id":"property-floatParent"},{"tagname":"property","owner":"Ext.util.Renderable","meta":{"private":true},"name":"frameCls","id":"property-frameCls"},{"tagname":"property","owner":"Ext.util.Renderable","meta":{"private":true},"name":"frameElNames","id":"property-frameElNames"},{"tagname":"property","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"frameElementsArray","id":"property-frameElementsArray"},{"tagname":"property","owner":"Ext.util.Renderable","meta":{"private":true},"name":"frameIdRegex","id":"property-frameIdRegex"},{"tagname":"property","owner":"Ext.util.Renderable","meta":{"private":true},"name":"frameInfoCache","id":"property-frameInfoCache"},{"tagname":"property","owner":"Ext.AbstractComponent","meta":{"readonly":true},"name":"frameSize","id":"property-frameSize"},{"tagname":"property","owner":"Ext.util.Renderable","meta":{"private":true},"name":"frameTableTpl","id":"property-frameTableTpl"},{"tagname":"property","owner":"Ext.util.Renderable","meta":{"private":true},"name":"frameTpl","id":"property-frameTpl"},{"tagname":"property","owner":"Ext.util.Observable","meta":{"readonly":true},"name":"hasListeners","id":"property-hasListeners"},{"tagname":"property","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"horizontalPosProp","id":"property-horizontalPosProp"},{"tagname":"property","owner":"Ext.Base","meta":{"private":true},"name":"initConfigList","id":"property-initConfigList"},{"tagname":"property","owner":"Ext.Base","meta":{"private":true},"name":"initConfigMap","id":"property-initConfigMap"},{"tagname":"property","owner":"Ext.util.Animate","meta":{"private":true},"name":"isAnimate","id":"property-isAnimate"},{"tagname":"property","owner":"Ext.AbstractComponent","meta":{},"name":"isComponent","id":"property-isComponent"},{"tagname":"property","owner":"Ext.container.AbstractContainer","meta":{"private":true},"name":"isContainer","id":"property-isContainer"},{"tagname":"property","owner":"Ext.Base","meta":{"private":true},"name":"isInstance","id":"property-isInstance"},{"tagname":"property","owner":"Ext.util.Observable","meta":{},"name":"isObservable","id":"property-isObservable"},{"tagname":"property","owner":"Ext.Queryable","meta":{"private":true},"name":"isQueryable","id":"property-isQueryable"},{"tagname":"property","owner":"Ext.toolbar.Toolbar","meta":{},"name":"isToolbar","id":"property-isToolbar"},{"tagname":"property","owner":"Ext.toolbar.Toolbar","meta":{"private":true},"name":"itemCls","id":"property-itemCls"},{"tagname":"property","owner":"Ext.container.AbstractContainer","meta":{"since":"2.3.0"},"name":"items","id":"property-items"},{"tagname":"property","owner":"Ext.container.AbstractContainer","meta":{"private":true},"name":"layoutCounter","id":"property-layoutCounter"},{"tagname":"property","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"layoutSuspendCount","id":"property-layoutSuspendCount"},{"tagname":"property","owner":"Ext.AbstractComponent","meta":{},"name":"maskOnDisable","id":"property-maskOnDisable"},{"tagname":"property","owner":"Ext.Component","meta":{"private":true},"name":"offsetsCls","id":"property-offsetsCls"},{"tagname":"property","owner":"Ext.AbstractComponent","meta":{"since":"2.3.0","readonly":true},"name":"ownerCt","id":"property-ownerCt"},{"tagname":"property","owner":"Ext.AbstractComponent","meta":{"since":"1.1.0","readonly":true},"name":"rendered","id":"property-rendered"},{"tagname":"property","owner":"Ext.Component","meta":{"readonly":true},"name":"scrollFlags","id":"property-scrollFlags"},{"tagname":"property","owner":"Ext.Base","meta":{"protected":true},"name":"self","id":"property-self"},{"tagname":"property","owner":"Ext.toolbar.Toolbar","meta":{"private":true},"name":"trackMenus","id":"property-trackMenus"},{"tagname":"property","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"weight","id":"property-weight"},{"tagname":"property","owner":"Ext.Component","meta":{"readonly":true},"name":"zIndexManager","id":"property-zIndexManager"},{"tagname":"property","owner":"Ext.Component","meta":{"readonly":true},"name":"zIndexParent","id":"property-zIndexParent"}],"cfg":[{"tagname":"cfg","owner":"Ext.container.AbstractContainer","meta":{"since":"2.3.0"},"name":"activeItem","id":"cfg-activeItem"},{"tagname":"cfg","owner":"Ext.container.Container","meta":{},"name":"anchorSize","id":"cfg-anchorSize"},{"tagname":"cfg","owner":"Ext.ux.statusbar.StatusBar","meta":{},"name":"autoClear","id":"cfg-autoClear"},{"tagname":"cfg","owner":"Ext.container.AbstractContainer","meta":{"since":"2.3.0"},"name":"autoDestroy","id":"cfg-autoDestroy"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{"since":"2.3.0"},"name":"autoEl","id":"cfg-autoEl"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{"deprecated":{"text":"Use {@link #loader} config instead.","version":"4.1.1"}},"name":"autoLoad","id":"cfg-autoLoad"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{},"name":"autoRender","id":"cfg-autoRender"},{"tagname":"cfg","owner":"Ext.Component","meta":{},"name":"autoScroll","id":"cfg-autoScroll"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{"since":"2.3.0"},"name":"autoShow","id":"cfg-autoShow"},{"tagname":"cfg","owner":"Ext.toolbar.Toolbar","meta":{},"name":"baseCls","id":"cfg-baseCls"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{},"name":"border","id":"cfg-border"},{"tagname":"cfg","owner":"Ext.container.AbstractContainer","meta":{"since":"3.4.0"},"name":"bubbleEvents","id":"cfg-bubbleEvents"},{"tagname":"cfg","owner":"Ext.ux.statusbar.StatusBar","meta":{},"name":"busyIconCls","id":"cfg-busyIconCls"},{"tagname":"cfg","owner":"Ext.ux.statusbar.StatusBar","meta":{},"name":"busyText","id":"cfg-busyText"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{},"name":"childEls","id":"cfg-childEls"},{"tagname":"cfg","owner":"Ext.ux.statusbar.StatusBar","meta":{},"name":"cls","id":"cfg-cls"},{"tagname":"cfg","owner":"Ext.Component","meta":{},"name":"columnWidth","id":"cfg-columnWidth"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{},"name":"componentCls","id":"cfg-componentCls"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{},"name":"componentLayout","id":"cfg-componentLayout"},{"tagname":"cfg","owner":"Ext.util.Floating","meta":{},"name":"constrain","id":"cfg-constrain"},{"tagname":"cfg","owner":"Ext.Component","meta":{},"name":"constrainTo","id":"cfg-constrainTo"},{"tagname":"cfg","owner":"Ext.Component","meta":{},"name":"constraintInsets","id":"cfg-constraintInsets"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{"since":"3.4.0"},"name":"contentEl","id":"cfg-contentEl"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{"since":"3.4.0"},"name":"data","id":"cfg-data"},{"tagname":"cfg","owner":"Ext.Component","meta":{},"name":"defaultAlign","id":"cfg-defaultAlign"},{"tagname":"cfg","owner":"Ext.toolbar.Toolbar","meta":{},"name":"defaultButtonUI","id":"cfg-defaultButtonUI"},{"tagname":"cfg","owner":"Ext.ux.statusbar.StatusBar","meta":{},"name":"defaultIconCls","id":"cfg-defaultIconCls"},{"tagname":"cfg","owner":"Ext.ux.statusbar.StatusBar","meta":{},"name":"defaultText","id":"cfg-defaultText"},{"tagname":"cfg","owner":"Ext.toolbar.Toolbar","meta":{"since":"2.3.0"},"name":"defaultType","id":"cfg-defaultType"},{"tagname":"cfg","owner":"Ext.container.AbstractContainer","meta":{"since":"2.3.0"},"name":"defaults","id":"cfg-defaults"},{"tagname":"cfg","owner":"Ext.container.AbstractContainer","meta":{},"name":"detachOnRemove","id":"cfg-detachOnRemove"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{"since":"2.3.0"},"name":"disabled","id":"cfg-disabled"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{},"name":"disabledCls","id":"cfg-disabledCls"},{"tagname":"cfg","owner":"Ext.Component","meta":{},"name":"draggable","id":"cfg-draggable"},{"tagname":"cfg","owner":"Ext.ux.statusbar.StatusBar","meta":{},"name":"emptyText","id":"cfg-emptyText"},{"tagname":"cfg","owner":"Ext.toolbar.Toolbar","meta":{},"name":"enableOverflow","id":"cfg-enableOverflow"},{"tagname":"cfg","owner":"Ext.util.Floating","meta":{},"name":"fixed","id":"cfg-fixed"},{"tagname":"cfg","owner":"Ext.Component","meta":{},"name":"floating","id":"cfg-floating"},{"tagname":"cfg","owner":"Ext.util.Floating","meta":{},"name":"focusOnToFront","id":"cfg-focusOnToFront"},{"tagname":"cfg","owner":"Ext.Component","meta":{},"name":"formBind","id":"cfg-formBind"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{},"name":"frame","id":"cfg-frame"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{},"name":"height","id":"cfg-height"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{"since":"2.3.0"},"name":"hidden","id":"cfg-hidden"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{"since":"1.1.0"},"name":"hideMode","id":"cfg-hideMode"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{"since":"3.4.0"},"name":"html","id":"cfg-html"},{"tagname":"cfg","owner":"Ext.ux.statusbar.StatusBar","meta":{},"name":"iconCls","id":"cfg-iconCls"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{"since":"1.1.0"},"name":"id","id":"cfg-id"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{"since":"3.4.0"},"name":"itemId","id":"cfg-itemId"},{"tagname":"cfg","owner":"Ext.container.AbstractContainer","meta":{"since":"2.3.0"},"name":"items","id":"cfg-items"},{"tagname":"cfg","owner":"Ext.toolbar.Toolbar","meta":{},"name":"layout","id":"cfg-layout"},{"tagname":"cfg","owner":"Ext.util.Observable","meta":{},"name":"listeners","id":"cfg-listeners"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{},"name":"loader","id":"cfg-loader"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{},"name":"margin","id":"cfg-margin"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{},"name":"maxHeight","id":"cfg-maxHeight"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{},"name":"maxWidth","id":"cfg-maxWidth"},{"tagname":"cfg","owner":"Ext.toolbar.Toolbar","meta":{},"name":"menuTriggerCls","id":"cfg-menuTriggerCls"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{},"name":"minHeight","id":"cfg-minHeight"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{},"name":"minWidth","id":"cfg-minWidth"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{"since":"2.3.0"},"name":"overCls","id":"cfg-overCls"},{"tagname":"cfg","owner":"Ext.Component","meta":{},"name":"overflowX","id":"cfg-overflowX"},{"tagname":"cfg","owner":"Ext.Component","meta":{},"name":"overflowY","id":"cfg-overflowY"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{},"name":"padding","id":"cfg-padding"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{"since":"2.3.0"},"name":"plugins","id":"cfg-plugins"},{"tagname":"cfg","owner":"Ext.Component","meta":{},"name":"region","id":"cfg-region"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{},"name":"renderData","id":"cfg-renderData"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{},"name":"renderSelectors","id":"cfg-renderSelectors"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{"since":"2.3.0"},"name":"renderTo","id":"cfg-renderTo"},{"tagname":"cfg","owner":"Ext.container.AbstractContainer","meta":{"protected":true},"name":"renderTpl","id":"cfg-renderTpl"},{"tagname":"cfg","owner":"Ext.Component","meta":{},"name":"resizable","id":"cfg-resizable"},{"tagname":"cfg","owner":"Ext.Component","meta":{},"name":"resizeHandles","id":"cfg-resizeHandles"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{},"name":"rtl","id":"cfg-rtl"},{"tagname":"cfg","owner":"Ext.state.Stateful","meta":{},"name":"saveDelay","id":"cfg-saveDelay"},{"tagname":"cfg","owner":"Ext.util.Floating","meta":{},"name":"shadow","id":"cfg-shadow"},{"tagname":"cfg","owner":"Ext.util.Floating","meta":{},"name":"shadowOffset","id":"cfg-shadowOffset"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{},"name":"shrinkWrap","id":"cfg-shrinkWrap"},{"tagname":"cfg","owner":"Ext.state.Stateful","meta":{},"name":"stateEvents","id":"cfg-stateEvents"},{"tagname":"cfg","owner":"Ext.state.Stateful","meta":{},"name":"stateId","id":"cfg-stateId"},{"tagname":"cfg","owner":"Ext.state.Stateful","meta":{},"name":"stateful","id":"cfg-stateful"},{"tagname":"cfg","owner":"Ext.ux.statusbar.StatusBar","meta":{},"name":"statusAlign","id":"cfg-statusAlign"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{"since":"1.1.0"},"name":"style","id":"cfg-style"},{"tagname":"cfg","owner":"Ext.container.AbstractContainer","meta":{},"name":"suspendLayout","id":"cfg-suspendLayout"},{"tagname":"cfg","owner":"Ext.ux.statusbar.StatusBar","meta":{},"name":"text","id":"cfg-text"},{"tagname":"cfg","owner":"Ext.Component","meta":{},"name":"toFrontOnShow","id":"cfg-toFrontOnShow"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{"since":"3.4.0"},"name":"tpl","id":"cfg-tpl"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{"since":"3.4.0"},"name":"tplWriteMode","id":"cfg-tplWriteMode"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{},"name":"ui","id":"cfg-ui"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"uiCls","id":"cfg-uiCls"},{"tagname":"cfg","owner":"Ext.toolbar.Toolbar","meta":{},"name":"vertical","id":"cfg-vertical"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{},"name":"width","id":"cfg-width"},{"tagname":"cfg","owner":"Ext.AbstractComponent","meta":{"since":"2.3.0"},"name":"xtype","id":"cfg-xtype"}],"css_var":[{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$include-toolbar-default-ui","id":"css_var-S-include-toolbar-default-ui"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-background-color","id":"css_var-S-toolbar-background-color"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-background-gradient","id":"css_var-S-toolbar-background-gradient"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-border-color","id":"css_var-S-toolbar-border-color"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-border-style","id":"css_var-S-toolbar-border-style"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-border-width","id":"css_var-S-toolbar-border-width"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-font-size","id":"css_var-S-toolbar-font-size"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-footer-background-color","id":"css_var-S-toolbar-footer-background-color"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-footer-border-width","id":"css_var-S-toolbar-footer-border-width"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-footer-horizontal-spacing","id":"css_var-S-toolbar-footer-horizontal-spacing"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-footer-margin","id":"css_var-S-toolbar-footer-margin"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-footer-vertical-spacing","id":"css_var-S-toolbar-footer-vertical-spacing"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-horizontal-spacing","id":"css_var-S-toolbar-horizontal-spacing"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-scroller-border-color","id":"css_var-S-toolbar-scroller-border-color"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-scroller-border-width","id":"css_var-S-toolbar-scroller-border-width"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-scroller-cursor","id":"css_var-S-toolbar-scroller-cursor"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-scroller-cursor-disabled","id":"css_var-S-toolbar-scroller-cursor-disabled"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-scroller-height","id":"css_var-S-toolbar-scroller-height"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-scroller-opacity-disabled","id":"css_var-S-toolbar-scroller-opacity-disabled"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-scroller-width","id":"css_var-S-toolbar-scroller-width"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-separator-color","id":"css_var-S-toolbar-separator-color"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-separator-highlight-color","id":"css_var-S-toolbar-separator-highlight-color"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-separator-horizontal-border-style","id":"css_var-S-toolbar-separator-horizontal-border-style"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-separator-horizontal-border-width","id":"css_var-S-toolbar-separator-horizontal-border-width"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-separator-horizontal-height","id":"css_var-S-toolbar-separator-horizontal-height"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-separator-horizontal-margin","id":"css_var-S-toolbar-separator-horizontal-margin"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-separator-vertical-border-style","id":"css_var-S-toolbar-separator-vertical-border-style"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-separator-vertical-border-width","id":"css_var-S-toolbar-separator-vertical-border-width"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-separator-vertical-margin","id":"css_var-S-toolbar-separator-vertical-margin"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-spacer-width","id":"css_var-S-toolbar-spacer-width"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-text-color","id":"css_var-S-toolbar-text-color"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-text-font-family","id":"css_var-S-toolbar-text-font-family"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-text-font-size","id":"css_var-S-toolbar-text-font-size"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-text-font-weight","id":"css_var-S-toolbar-text-font-weight"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-text-line-height","id":"css_var-S-toolbar-text-line-height"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-text-margin","id":"css_var-S-toolbar-text-margin"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-text-padding","id":"css_var-S-toolbar-text-padding"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-tool-background-image","id":"css_var-S-toolbar-tool-background-image"},{"tagname":"css_var","owner":"Ext.toolbar.Toolbar","meta":{},"name":"$toolbar-vertical-spacing","id":"css_var-S-toolbar-vertical-spacing"}],"method":[{"tagname":"method","owner":"Ext.toolbar.Toolbar","meta":{"docauthor":["Robert Dougan <rob@sencha.com>"]},"name":"constructor","id":"method-constructor"},{"tagname":"method","owner":"Ext.toolbar.Toolbar","meta":{},"name":"add","id":"method-add"},{"tagname":"method","owner":"Ext.util.ElementContainer","meta":{},"name":"addChildEls","id":"method-addChildEls"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"since":"2.3.0","deprecated":{"text":"Use {@link #addCls} instead.","version":"4.1"}},"name":"addClass","id":"method-addClass"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"addCls","id":"method-addCls"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"addClsWithUI","id":"method-addClsWithUI"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"addEvents","id":"method-addEvents"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"addFocusListener","id":"method-addFocusListener"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"addListener","id":"method-addListener"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"addManagedListener","id":"method-addManagedListener"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"addOverCls","id":"method-addOverCls"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"addPlugin","id":"method-addPlugin"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"protected":true},"name":"addPropertyToState","id":"method-addPropertyToState"},{"tagname":"method","owner":"Ext.state.Stateful","meta":{},"name":"addStateEvents","id":"method-addStateEvents"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"addUIClsToElement","id":"method-addUIClsToElement"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"addUIToElement","id":"method-addUIToElement"},{"tagname":"method","owner":"Ext.util.Positionable","meta":{"private":true},"name":"adjustForConstraints","id":"method-adjustForConstraints"},{"tagname":"method","owner":"Ext.Component","meta":{"private":true},"name":"adjustPosition","id":"method-adjustPosition"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"template":true,"protected":true},"name":"afterComponentLayout","id":"method-afterComponentLayout"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{"private":true},"name":"afterFirstLayout","id":"method-afterFirstLayout"},{"tagname":"method","owner":"Ext.Component","meta":{"protected":true,"template":true},"name":"afterHide","id":"method-afterHide"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"protected":true,"template":true},"name":"afterLayout","id":"method-afterLayout"},{"tagname":"method","owner":"Ext.Component","meta":{"template":true,"protected":true},"name":"afterRender","id":"method-afterRender"},{"tagname":"method","owner":"Ext.Component","meta":{"template":true,"protected":true},"name":"afterSetPosition","id":"method-afterSetPosition"},{"tagname":"method","owner":"Ext.Component","meta":{"protected":true,"template":true},"name":"afterShow","id":"method-afterShow"},{"tagname":"method","owner":"Ext.util.Positionable","meta":{"chainable":true},"name":"alignTo","id":"method-alignTo"},{"tagname":"method","owner":"Ext.util.Positionable","meta":{"chainable":true},"name":"anchorTo","id":"method-anchorTo"},{"tagname":"method","owner":"Ext.util.Animate","meta":{"private":true},"name":"anim","id":"method-anim"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"animate","id":"method-animate"},{"tagname":"method","owner":"Ext.util.ElementContainer","meta":{"private":true},"name":"applyChildEls","id":"method-applyChildEls"},{"tagname":"method","owner":"Ext.toolbar.Toolbar","meta":{"private":true},"name":"applyDefaults","id":"method-applyDefaults"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{"private":true},"name":"applyRenderSelectors","id":"method-applyRenderSelectors"},{"tagname":"method","owner":"Ext.state.Stateful","meta":{},"name":"applyState","id":"method-applyState"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"private":true},"name":"applyTargetCls","id":"method-applyTargetCls"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"protected":true},"name":"beforeBlur","id":"method-beforeBlur"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"protected":true,"template":true},"name":"beforeComponentLayout","id":"method-beforeComponentLayout"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"since":"2.3.0","template":true,"protected":true,"private":true},"name":"beforeDestroy","id":"method-beforeDestroy"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"protected":true},"name":"beforeFocus","id":"method-beforeFocus"},{"tagname":"method","owner":"Ext.Component","meta":{"template":true,"protected":true},"name":"beforeLayout","id":"method-beforeLayout"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"private":true},"name":"beforeRender","id":"method-beforeRender"},{"tagname":"method","owner":"Ext.Component","meta":{"private":true},"name":"beforeSetPosition","id":"method-beforeSetPosition"},{"tagname":"method","owner":"Ext.Component","meta":{"protected":true,"template":true},"name":"beforeShow","id":"method-beforeShow"},{"tagname":"method","owner":"Ext.Component","meta":{"chainable":true,"private":true},"name":"blur","id":"method-blur"},{"tagname":"method","owner":"Ext.Component","meta":{"chainable":true},"name":"bubble","id":"method-bubble"},{"tagname":"method","owner":"Ext.util.Positionable","meta":{"private":true},"name":"calculateAnchorXY","id":"method-calculateAnchorXY"},{"tagname":"method","owner":"Ext.util.Positionable","meta":{},"name":"calculateConstrainedPosition","id":"method-calculateConstrainedPosition"},{"tagname":"method","owner":"Ext.Base","meta":{"protected":true,"deprecated":{"text":"as of 4.1. Use {@link #callParent} instead."}},"name":"callOverridden","id":"method-callOverridden"},{"tagname":"method","owner":"Ext.Base","meta":{"protected":true},"name":"callParent","id":"method-callParent"},{"tagname":"method","owner":"Ext.Base","meta":{"protected":true},"name":"callSuper","id":"method-callSuper"},{"tagname":"method","owner":"Ext.Component","meta":{"protected":true},"name":"cancelFocus","id":"method-cancelFocus"},{"tagname":"method","owner":"Ext.util.Observable","meta":{"private":true},"name":"captureArgs","id":"method-captureArgs"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"chainable":true,"since":"2.3.0"},"name":"cascade","id":"method-cascade"},{"tagname":"method","owner":"Ext.util.Floating","meta":{},"name":"center","id":"method-center"},{"tagname":"method","owner":"Ext.Queryable","meta":{},"name":"child","id":"method-child"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"clearListeners","id":"method-clearListeners"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"clearManagedListeners","id":"method-clearManagedListeners"},{"tagname":"method","owner":"Ext.ux.statusbar.StatusBar","meta":{"chainable":true},"name":"clearStatus","id":"method-clearStatus"},{"tagname":"method","owner":"Ext.Component","meta":{},"name":"cloneConfig","id":"method-cloneConfig"},{"tagname":"method","owner":"Ext.Base","meta":{"private":true},"name":"configClass","id":"method-configClass"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"constructPlugin","id":"method-constructPlugin"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"constructPlugins","id":"method-constructPlugins"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{},"name":"contains","id":"method-contains"},{"tagname":"method","owner":"Ext.util.Observable","meta":{"private":true},"name":"continueFireEvent","id":"method-continueFireEvent"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"convertPositionSpec","id":"method-convertPositionSpec"},{"tagname":"method","owner":"Ext.util.Observable","meta":{"private":true},"name":"createRelayer","id":"method-createRelayer"},{"tagname":"method","owner":"Ext.Component","meta":{"private":true},"name":"deleteMembers","id":"method-deleteMembers"},{"tagname":"method","owner":"Ext.Base","meta":{"private":true},"name":"destroy","id":"method-destroy"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"private":true},"name":"detachComponent","id":"method-detachComponent"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"chainable":true,"since":"1.1.0"},"name":"disable","id":"method-disable"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{"private":true},"name":"doApplyRenderTpl","id":"method-doApplyRenderTpl"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{},"name":"doAutoRender","id":"method-doAutoRender"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"chainable":true},"name":"doComponentLayout","id":"method-doComponentLayout"},{"tagname":"method","owner":"Ext.util.Floating","meta":{},"name":"doConstrain","id":"method-doConstrain"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"chainable":true,"since":"2.3.0"},"name":"doLayout","id":"method-doLayout"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"private":true},"name":"doRemove","id":"method-doRemove"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{"private":true},"name":"doRenderContent","id":"method-doRenderContent"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{"private":true},"name":"doRenderFramingDockedItems","id":"method-doRenderFramingDockedItems"},{"tagname":"method","owner":"Ext.Queryable","meta":{},"name":"down","id":"method-down"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"chainable":true,"since":"1.1.0","private":true},"name":"enable","id":"method-enable"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"enableBubble","id":"method-enableBubble"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{},"name":"ensureAttachedToBody","id":"method-ensureAttachedToBody"},{"tagname":"method","owner":"Ext.Component","meta":{},"name":"findParentBy","id":"method-findParentBy"},{"tagname":"method","owner":"Ext.Component","meta":{},"name":"findParentByType","id":"method-findParentByType"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"findPlugin","id":"method-findPlugin"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{"private":true},"name":"finishRender","id":"method-finishRender"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"private":true},"name":"finishRenderChildren","id":"method-finishRenderChildren"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"fireEvent","id":"method-fireEvent"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"fireEventArgs","id":"method-fireEventArgs"},{"tagname":"method","owner":"Ext.Component","meta":{"private":true},"name":"fireHierarchyEvent","id":"method-fireHierarchyEvent"},{"tagname":"method","owner":"Ext.util.Floating","meta":{"private":true},"name":"fitContainer","id":"method-fitContainer"},{"tagname":"method","owner":"Ext.Component","meta":{},"name":"focus","id":"method-focus"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"deprecated":{"text":"Use {@link #updateLayout} instead.","version":"4.1.0"}},"name":"forceComponentLayout","id":"method-forceComponentLayout"},{"tagname":"method","owner":"Ext.Component","meta":{"private":true},"name":"getActionEl","id":"method-getActionEl"},{"tagname":"method","owner":"Ext.util.Animate","meta":{},"name":"getActiveAnimation","id":"method-getActiveAnimation"},{"tagname":"method","owner":"Ext.util.Positionable","meta":{},"name":"getAlignToXY","id":"method-getAlignToXY"},{"tagname":"method","owner":"Ext.util.Positionable","meta":{"private":true},"name":"getAnchor","id":"method-getAnchor"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"getAnchorToXY","id":"method-getAnchorToXY"},{"tagname":"method","owner":"Ext.util.Positionable","meta":{},"name":"getAnchorXY","id":"method-getAnchorXY"},{"tagname":"method","owner":"Ext.Component","meta":{"private":true},"name":"getAnimateTarget","id":"method-getAnimateTarget"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"getAutoId","id":"method-getAutoId"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"getBorderPadding","id":"method-getBorderPadding"},{"tagname":"method","owner":"Ext.util.Positionable","meta":{},"name":"getBox","id":"method-getBox"},{"tagname":"method","owner":"Ext.util.Observable","meta":{"private":true},"name":"getBubbleParent","id":"method-getBubbleParent"},{"tagname":"method","owner":"Ext.Component","meta":{"protected":true},"name":"getBubbleTarget","id":"method-getBubbleTarget"},{"tagname":"method","owner":"Ext.container.Container","meta":{},"name":"getChildByElement","id":"method-getChildByElement"},{"tagname":"method","owner":"Ext.util.ElementContainer","meta":{"private":true},"name":"getChildEls","id":"method-getChildEls"},{"tagname":"method","owner":"Ext.toolbar.Toolbar","meta":{"private":true},"name":"getChildItemsToDisable","id":"method-getChildItemsToDisable"},{"tagname":"method","owner":"Ext.util.ElementContainer","meta":{"private":true},"name":"getClassChildEls","id":"method-getClassChildEls"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"since":"2.3.0"},"name":"getComponent","id":"method-getComponent"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"private":true},"name":"getComponentId","id":"method-getComponentId"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"getComponentLayout","id":"method-getComponentLayout"},{"tagname":"method","owner":"Ext.Base","meta":{"private":true},"name":"getConfig","id":"method-getConfig"},{"tagname":"method","owner":"Ext.util.Positionable","meta":{},"name":"getConstrainVector","id":"method-getConstrainVector"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"private":true},"name":"getContentTarget","id":"method-getContentTarget"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"private":true},"name":"getDefaultContentTarget","id":"method-getDefaultContentTarget"},{"tagname":"method","owner":"Ext.Component","meta":{"private":true},"name":"getDragEl","id":"method-getDragEl"},{"tagname":"method","owner":"Ext.Component","meta":{"since":"1.1.0"},"name":"getEl","id":"method-getEl"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{"private":true},"name":"getElConfig","id":"method-getElConfig"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"private":true},"name":"getFocusEl","id":"method-getFocusEl"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{"private":true},"name":"getFrameInfo","id":"method-getFrameInfo"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{"private":true},"name":"getFrameRenderData","id":"method-getFrameRenderData"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{"private":true},"name":"getFrameTpl","id":"method-getFrameTpl"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{"private":true},"name":"getFramingInfoCls","id":"method-getFramingInfoCls"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"getHeight","id":"method-getHeight"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"getHierarchyState","id":"method-getHierarchyState"},{"tagname":"method","owner":"Ext.Component","meta":{},"name":"getId","id":"method-getId"},{"tagname":"method","owner":"Ext.Base","meta":{},"name":"getInitialConfig","id":"method-getInitialConfig"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{},"name":"getInsertPosition","id":"method-getInsertPosition"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"getItemId","id":"method-getItemId"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{},"name":"getLayout","id":"method-getLayout"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"getLoader","id":"method-getLoader"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"getLocalX","id":"method-getLocalX"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"getLocalXY","id":"method-getLocalXY"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"getLocalY","id":"method-getLocalY"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"getMaskTarget","id":"method-getMaskTarget"},{"tagname":"method","owner":"Ext.util.Positionable","meta":{},"name":"getOffsetsTo","id":"method-getOffsetsTo"},{"tagname":"method","owner":"Ext.Component","meta":{"private":true},"name":"getOuterSize","id":"method-getOuterSize"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"getOverflowEl","id":"method-getOverflowEl"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"getOverflowStyle","id":"method-getOverflowStyle"},{"tagname":"method","owner":"Ext.Component","meta":{"private":true},"name":"getOwningBorderContainer","id":"method-getOwningBorderContainer"},{"tagname":"method","owner":"Ext.Component","meta":{"private":true},"name":"getOwningBorderLayout","id":"method-getOwningBorderLayout"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"getPlugin","id":"method-getPlugin"},{"tagname":"method","owner":"Ext.Component","meta":{},"name":"getPosition","id":"method-getPosition"},{"tagname":"method","owner":"Ext.Component","meta":{"private":true},"name":"getPositionEl","id":"method-getPositionEl"},{"tagname":"method","owner":"Ext.Component","meta":{"private":true},"name":"getProxy","id":"method-getProxy"},{"tagname":"method","owner":"Ext.toolbar.Toolbar","meta":{"protected":true},"name":"getRefItems","id":"method-getRefItems"},{"tagname":"method","owner":"Ext.Component","meta":{"protected":true,"private":true},"name":"getRefOwner","id":"method-getRefOwner"},{"tagname":"method","owner":"Ext.util.Positionable","meta":{},"name":"getRegion","id":"method-getRegion"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{"private":true},"name":"getRenderTree","id":"method-getRenderTree"},{"tagname":"method","owner":"Ext.Component","meta":{"private":true},"name":"getResizeEl","id":"method-getResizeEl"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"getSize","id":"method-getSize"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"getSizeModel","id":"method-getSizeModel"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"getState","id":"method-getState"},{"tagname":"method","owner":"Ext.state.Stateful","meta":{"private":true},"name":"getStateId","id":"method-getStateId"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{"private":true},"name":"getStyleProxy","id":"method-getStyleProxy"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"getTargetEl","id":"method-getTargetEl"},{"tagname":"method","owner":"Ext.ux.statusbar.StatusBar","meta":{},"name":"getText","id":"method-getText"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"getTpl","id":"method-getTpl"},{"tagname":"method","owner":"Ext.util.Positionable","meta":{},"name":"getViewRegion","id":"method-getViewRegion"},{"tagname":"method","owner":"Ext.Component","meta":{"private":true},"name":"getVisibilityEl","id":"method-getVisibilityEl"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"getWidth","id":"method-getWidth"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"getX","id":"method-getX"},{"tagname":"method","owner":"Ext.Component","meta":{},"name":"getXType","id":"method-getXType"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"since":"2.3.0"},"name":"getXTypes","id":"method-getXTypes"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"getXY","id":"method-getXY"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"getY","id":"method-getY"},{"tagname":"method","owner":"Ext.util.Animate","meta":{"deprecated":{"text":"Replaced by {@link #getActiveAnimation}","version":"4.0"}},"name":"hasActiveFx","id":"method-hasActiveFx"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"hasCls","id":"method-hasCls"},{"tagname":"method","owner":"Ext.Base","meta":{"private":true},"name":"hasConfig","id":"method-hasConfig"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"hasListener","id":"method-hasListener"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"hasUICls","id":"method-hasUICls"},{"tagname":"method","owner":"Ext.Component","meta":{"chainable":true},"name":"hide","id":"method-hide"},{"tagname":"method","owner":"Ext.Component","meta":{"private":true},"name":"initBorderRegion","id":"method-initBorderRegion"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"initCls","id":"method-initCls"},{"tagname":"method","owner":"Ext.ux.statusbar.StatusBar","meta":{"since":"1.1.0","template":true,"protected":true},"name":"initComponent","id":"method-initComponent"},{"tagname":"method","owner":"Ext.Base","meta":{"chainable":true,"protected":true},"name":"initConfig","id":"method-initConfig"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{"private":true},"name":"initContainer","id":"method-initContainer"},{"tagname":"method","owner":"Ext.Component","meta":{"private":true},"name":"initDraggable","id":"method-initDraggable"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"protected":true},"name":"initEvents","id":"method-initEvents"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{"private":true},"name":"initFrame","id":"method-initFrame"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{"private":true},"name":"initFramingTpl","id":"method-initFramingTpl"},{"tagname":"method","owner":"Ext.util.Floating","meta":{"private":true},"name":"initHierarchyEvents","id":"method-initHierarchyEvents"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"initHierarchyState","id":"method-initHierarchyState"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"private":true},"name":"initItems","id":"method-initItems"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"initPadding","id":"method-initPadding"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"initPlugin","id":"method-initPlugin"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{"protected":true},"name":"initRenderData","id":"method-initRenderData"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{"private":true},"name":"initRenderTpl","id":"method-initRenderTpl"},{"tagname":"method","owner":"Ext.Component","meta":{"private":true},"name":"initResizable","id":"method-initResizable"},{"tagname":"method","owner":"Ext.state.Stateful","meta":{"private":true},"name":"initState","id":"method-initState"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"initStyles","id":"method-initStyles"},{"tagname":"method","owner":"Ext.toolbar.Toolbar","meta":{},"name":"insert","id":"method-insert"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"is","id":"method-is"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{},"name":"isAncestor","id":"method-isAncestor"},{"tagname":"method","owner":"Ext.Component","meta":{"private":true},"name":"isContainedFloater","id":"method-isContainedFloater"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"isDescendant","id":"method-isDescendant"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"isDescendantOf","id":"method-isDescendantOf"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"isDisabled","id":"method-isDisabled"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"isDraggable","id":"method-isDraggable"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"isDroppable","id":"method-isDroppable"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"isFloating","id":"method-isFloating"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"isFocusable","id":"method-isFocusable"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"isHidden","id":"method-isHidden"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"isHierarchicallyHidden","id":"method-isHierarchicallyHidden"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"protected":true},"name":"isLayoutRoot","id":"method-isLayoutRoot"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"isLayoutSuspended","id":"method-isLayoutSuspended"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"isLocalRtl","id":"method-isLocalRtl"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"isOppositeRootDirection","id":"method-isOppositeRootDirection"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"isParentRtl","id":"method-isParentRtl"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"since":"1.1.0"},"name":"isVisible","id":"method-isVisible"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"since":"2.3.0"},"name":"isXType","id":"method-isXType"},{"tagname":"method","owner":"Ext.toolbar.Toolbar","meta":{"private":true},"name":"lookupComponent","id":"method-lookupComponent"},{"tagname":"method","owner":"Ext.Component","meta":{"private":true},"name":"makeFloating","id":"method-makeFloating"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"mask","id":"method-mask"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"mon","id":"method-mon"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{},"name":"move","id":"method-move"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"mun","id":"method-mun"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"private":true},"name":"nextChild","id":"method-nextChild"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"nextNode","id":"method-nextNode"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"nextSibling","id":"method-nextSibling"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"on","id":"method-on"},{"tagname":"method","owner":"Ext.toolbar.Toolbar","meta":{"template":true,"protected":true,"private":true},"name":"onAdd","id":"method-onAdd"},{"tagname":"method","owner":"Ext.Component","meta":{"since":"3.4.0","template":true,"protected":true},"name":"onAdded","id":"method-onAdded"},{"tagname":"method","owner":"Ext.util.Floating","meta":{"private":true},"name":"onAfterFloatLayout","id":"method-onAfterFloatLayout"},{"tagname":"method","owner":"Ext.toolbar.Toolbar","meta":{"template":true,"protected":true,"private":true},"name":"onBeforeAdd","id":"method-onBeforeAdd"},{"tagname":"method","owner":"Ext.util.Floating","meta":{"private":true},"name":"onBeforeFloatLayout","id":"method-onBeforeFloatLayout"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"onBlur","id":"method-onBlur"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"onBoxReady","id":"method-onBoxReady"},{"tagname":"method","owner":"Ext.toolbar.Toolbar","meta":{"private":true},"name":"onButtonMenuHide","id":"method-onButtonMenuHide"},{"tagname":"method","owner":"Ext.toolbar.Toolbar","meta":{"private":true},"name":"onButtonMenuShow","id":"method-onButtonMenuShow"},{"tagname":"method","owner":"Ext.toolbar.Toolbar","meta":{"private":true},"name":"onButtonOver","id":"method-onButtonOver"},{"tagname":"method","owner":"Ext.Base","meta":{"private":true},"name":"onConfigUpdate","id":"method-onConfigUpdate"},{"tagname":"method","owner":"Ext.Component","meta":{"protected":true,"template":true},"name":"onDestroy","id":"method-onDestroy"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"protected":true,"template":true},"name":"onDisable","id":"method-onDisable"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"protected":true,"template":true},"name":"onEnable","id":"method-onEnable"},{"tagname":"method","owner":"Ext.util.Floating","meta":{"private":true},"name":"onFloatShow","id":"method-onFloatShow"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"onFocus","id":"method-onFocus"},{"tagname":"method","owner":"Ext.Component","meta":{"protected":true,"template":true},"name":"onHide","id":"method-onHide"},{"tagname":"method","owner":"Ext.util.Floating","meta":{"private":true},"name":"onKeyDown","id":"method-onKeyDown"},{"tagname":"method","owner":"Ext.util.Floating","meta":{"private":true},"name":"onMouseDown","id":"method-onMouseDown"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"private":true},"name":"onMove","id":"method-onMove"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"template":true,"protected":true},"name":"onPosition","id":"method-onPosition"},{"tagname":"method","owner":"Ext.toolbar.Toolbar","meta":{"template":true,"protected":true,"private":true},"name":"onRemove","id":"method-onRemove"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"since":"3.4.0","protected":true,"template":true},"name":"onRemoved","id":"method-onRemoved"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{"protected":true,"template":true},"name":"onRender","id":"method-onRender"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"template":true,"protected":true},"name":"onResize","id":"method-onResize"},{"tagname":"method","owner":"Ext.Component","meta":{"protected":true,"template":true},"name":"onShow","id":"method-onShow"},{"tagname":"method","owner":"Ext.Component","meta":{"protected":true,"template":true},"name":"onShowComplete","id":"method-onShowComplete"},{"tagname":"method","owner":"Ext.Component","meta":{"private":true},"name":"onShowVeto","id":"method-onShowVeto"},{"tagname":"method","owner":"Ext.state.Stateful","meta":{"private":true},"name":"onStateChange","id":"method-onStateChange"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"parseBox","id":"method-parseBox"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"protected":true},"name":"postBlur","id":"method-postBlur"},{"tagname":"method","owner":"Ext.util.Observable","meta":{"private":true},"name":"prepareClass","id":"method-prepareClass"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"private":true},"name":"prepareItems","id":"method-prepareItems"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"private":true},"name":"prevChild","id":"method-prevChild"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"previousNode","id":"method-previousNode"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"previousSibling","id":"method-previousSibling"},{"tagname":"method","owner":"Ext.util.ElementContainer","meta":{"private":true},"name":"prune","id":"method-prune"},{"tagname":"method","owner":"Ext.Queryable","meta":{},"name":"query","id":"method-query"},{"tagname":"method","owner":"Ext.Queryable","meta":{},"name":"queryBy","id":"method-queryBy"},{"tagname":"method","owner":"Ext.Queryable","meta":{},"name":"queryById","id":"method-queryById"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"registerFloatingItem","id":"method-registerFloatingItem"},{"tagname":"method","owner":"Ext.util.Floating","meta":{"private":true},"name":"registerWithOwnerCt","id":"method-registerWithOwnerCt"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"relayEvents","id":"method-relayEvents"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"since":"2.3.0"},"name":"remove","id":"method-remove"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"since":"2.3.0"},"name":"removeAll","id":"method-removeAll"},{"tagname":"method","owner":"Ext.util.Positionable","meta":{"chainable":true},"name":"removeAnchor","id":"method-removeAnchor"},{"tagname":"method","owner":"Ext.util.ElementContainer","meta":{},"name":"removeChildEls","id":"method-removeChildEls"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"since":"2.3.0","private":true},"name":"removeClass","id":"method-removeClass"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"removeCls","id":"method-removeCls"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"removeClsWithUI","id":"method-removeClsWithUI"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"removeListener","id":"method-removeListener"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"removeManagedListener","id":"method-removeManagedListener"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"removeManagedListenerItem","id":"method-removeManagedListenerItem"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"removeOverCls","id":"method-removeOverCls"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"removePlugin","id":"method-removePlugin"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"removeUIClsFromElement","id":"method-removeUIClsFromElement"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"removeUIFromElement","id":"method-removeUIFromElement"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{},"name":"render","id":"method-render"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"private":true},"name":"repositionFloatingItems","id":"method-repositionFloatingItems"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"resumeEvent","id":"method-resumeEvent"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"resumeEvents","id":"method-resumeEvents"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"resumeLayouts","id":"method-resumeLayouts"},{"tagname":"method","owner":"Ext.state.Stateful","meta":{},"name":"savePropToState","id":"method-savePropToState"},{"tagname":"method","owner":"Ext.state.Stateful","meta":{},"name":"savePropsToState","id":"method-savePropsToState"},{"tagname":"method","owner":"Ext.state.Stateful","meta":{},"name":"saveState","id":"method-saveState"},{"tagname":"method","owner":"Ext.Component","meta":{},"name":"scrollBy","id":"method-scrollBy"},{"tagname":"method","owner":"Ext.util.Animate","meta":{"chainable":true},"name":"sequenceFx","id":"method-sequenceFx"},{"tagname":"method","owner":"Ext.util.Floating","meta":{},"name":"setActive","id":"method-setActive"},{"tagname":"method","owner":"Ext.Component","meta":{"chainable":true},"name":"setAutoScroll","id":"method-setAutoScroll"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"setBorder","id":"method-setBorder"},{"tagname":"method","owner":"Ext.Component","meta":{},"name":"setBorderRegion","id":"method-setBorderRegion"},{"tagname":"method","owner":"Ext.util.Positionable","meta":{"chainable":true},"name":"setBox","id":"method-setBox"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"setComponentLayout","id":"method-setComponentLayout"},{"tagname":"method","owner":"Ext.Base","meta":{"chainable":true,"private":true},"name":"setConfig","id":"method-setConfig"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"setDisabled","id":"method-setDisabled"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"setDocked","id":"method-setDocked"},{"tagname":"method","owner":"Ext.util.Floating","meta":{"private":true},"name":"setFloatParent","id":"method-setFloatParent"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"setHeight","id":"method-setHeight"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"setHiddenState","id":"method-setHiddenState"},{"tagname":"method","owner":"Ext.ux.statusbar.StatusBar","meta":{"chainable":true},"name":"setIcon","id":"method-setIcon"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"private":true},"name":"setLayout","id":"method-setLayout"},{"tagname":"method","owner":"Ext.Component","meta":{},"name":"setLoading","id":"method-setLoading"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"setLocalX","id":"method-setLocalX"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"setLocalXY","id":"method-setLocalXY"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"setLocalY","id":"method-setLocalY"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"setMargin","id":"method-setMargin"},{"tagname":"method","owner":"Ext.Component","meta":{"chainable":true},"name":"setOverflowXY","id":"method-setOverflowXY"},{"tagname":"method","owner":"Ext.Component","meta":{"chainable":true},"name":"setPagePosition","id":"method-setPagePosition"},{"tagname":"method","owner":"Ext.Component","meta":{"chainable":true},"name":"setPosition","id":"method-setPosition"},{"tagname":"method","owner":"Ext.util.Positionable","meta":{"chainable":true},"name":"setRegion","id":"method-setRegion"},{"tagname":"method","owner":"Ext.Component","meta":{},"name":"setRegionWeight","id":"method-setRegionWeight"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"setSize","id":"method-setSize"},{"tagname":"method","owner":"Ext.ux.statusbar.StatusBar","meta":{"chainable":true},"name":"setStatus","id":"method-setStatus"},{"tagname":"method","owner":"Ext.ux.statusbar.StatusBar","meta":{"chainable":true},"name":"setText","id":"method-setText"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"setUI","id":"method-setUI"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"since":"1.1.0"},"name":"setVisible","id":"method-setVisible"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"setWidth","id":"method-setWidth"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"setX","id":"method-setX"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"setXY","id":"method-setXY"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"setY","id":"method-setY"},{"tagname":"method","owner":"Ext.util.Floating","meta":{"private":true},"name":"setZIndex","id":"method-setZIndex"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{"private":true},"name":"setupFramingTpl","id":"method-setupFramingTpl"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"setupProtoEl","id":"method-setupProtoEl"},{"tagname":"method","owner":"Ext.container.AbstractContainer","meta":{"private":true},"name":"setupRenderTpl","id":"method-setupRenderTpl"},{"tagname":"method","owner":"Ext.Component","meta":{"chainable":true},"name":"show","id":"method-show"},{"tagname":"method","owner":"Ext.Component","meta":{"chainable":true},"name":"showAt","id":"method-showAt"},{"tagname":"method","owner":"Ext.ux.statusbar.StatusBar","meta":{"chainable":true},"name":"showBusy","id":"method-showBusy"},{"tagname":"method","owner":"Ext.Component","meta":{"chainable":true},"name":"showBy","id":"method-showBy"},{"tagname":"method","owner":"Ext.Base","meta":{"protected":true},"name":"statics","id":"method-statics"},{"tagname":"method","owner":"Ext.util.Animate","meta":{"chainable":true},"name":"stopAnimation","id":"method-stopAnimation"},{"tagname":"method","owner":"Ext.util.Animate","meta":{"deprecated":{"text":"Replaced by {@link #stopAnimation}","version":"4.0"}},"name":"stopFx","id":"method-stopFx"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"suspendEvent","id":"method-suspendEvent"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"suspendEvents","id":"method-suspendEvents"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"suspendLayouts","id":"method-suspendLayouts"},{"tagname":"method","owner":"Ext.util.Animate","meta":{"chainable":true},"name":"syncFx","id":"method-syncFx"},{"tagname":"method","owner":"Ext.util.Floating","meta":{"private":true},"name":"syncHidden","id":"method-syncHidden"},{"tagname":"method","owner":"Ext.util.Floating","meta":{"private":true},"name":"syncShadow","id":"method-syncShadow"},{"tagname":"method","owner":"Ext.util.Floating","meta":{"chainable":true},"name":"toBack","id":"method-toBack"},{"tagname":"method","owner":"Ext.util.Floating","meta":{},"name":"toFront","id":"method-toFront"},{"tagname":"method","owner":"Ext.toolbar.Toolbar","meta":{"private":true},"name":"trackMenu","id":"method-trackMenu"},{"tagname":"method","owner":"Ext.util.Positionable","meta":{},"name":"translatePoints","id":"method-translatePoints"},{"tagname":"method","owner":"Ext.util.Positionable","meta":{"private":true},"name":"translateXY","id":"method-translateXY"},{"tagname":"method","owner":"Ext.util.Observable","meta":{},"name":"un","id":"method-un"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"unitizeBox","id":"method-unitizeBox"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"unmask","id":"method-unmask"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"unregisterFloatingItem","id":"method-unregisterFloatingItem"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"up","id":"method-up"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"since":"3.4.0"},"name":"update","id":"method-update"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{"private":true},"name":"updateAria","id":"method-updateAria"},{"tagname":"method","owner":"Ext.Component","meta":{"chainable":true},"name":"updateBox","id":"method-updateBox"},{"tagname":"method","owner":"Ext.util.Renderable","meta":{"private":true},"name":"updateFrame","id":"method-updateFrame"},{"tagname":"method","owner":"Ext.AbstractComponent","meta":{},"name":"updateLayout","id":"method-updateLayout"},{"tagname":"method","owner":"Ext.Component","meta":{"private":true},"name":"wrapPrimaryEl","id":"method-wrapPrimaryEl"}],"event":[{"tagname":"event","owner":"Ext.AbstractComponent","meta":{},"name":"activate","id":"event-activate"},{"tagname":"event","owner":"Ext.container.AbstractContainer","meta":{"since":"2.3.0"},"name":"add","id":"event-add"},{"tagname":"event","owner":"Ext.AbstractComponent","meta":{"since":"3.4.0"},"name":"added","id":"event-added"},{"tagname":"event","owner":"Ext.container.AbstractContainer","meta":{"since":"2.3.0"},"name":"afterlayout","id":"event-afterlayout"},{"tagname":"event","owner":"Ext.AbstractComponent","meta":{"since":"3.4.0"},"name":"afterrender","id":"event-afterrender"},{"tagname":"event","owner":"Ext.AbstractComponent","meta":{},"name":"beforeactivate","id":"event-beforeactivate"},{"tagname":"event","owner":"Ext.container.AbstractContainer","meta":{"since":"2.3.0"},"name":"beforeadd","id":"event-beforeadd"},{"tagname":"event","owner":"Ext.AbstractComponent","meta":{},"name":"beforedeactivate","id":"event-beforedeactivate"},{"tagname":"event","owner":"Ext.AbstractComponent","meta":{"since":"1.1.0"},"name":"beforedestroy","id":"event-beforedestroy"},{"tagname":"event","owner":"Ext.AbstractComponent","meta":{"since":"1.1.0"},"name":"beforehide","id":"event-beforehide"},{"tagname":"event","owner":"Ext.container.AbstractContainer","meta":{"since":"2.3.0"},"name":"beforeremove","id":"event-beforeremove"},{"tagname":"event","owner":"Ext.AbstractComponent","meta":{"since":"1.1.0"},"name":"beforerender","id":"event-beforerender"},{"tagname":"event","owner":"Ext.AbstractComponent","meta":{"since":"1.1.0"},"name":"beforeshow","id":"event-beforeshow"},{"tagname":"event","owner":"Ext.state.Stateful","meta":{},"name":"beforestaterestore","id":"event-beforestaterestore"},{"tagname":"event","owner":"Ext.state.Stateful","meta":{},"name":"beforestatesave","id":"event-beforestatesave"},{"tagname":"event","owner":"Ext.AbstractComponent","meta":{},"name":"blur","id":"event-blur"},{"tagname":"event","owner":"Ext.AbstractComponent","meta":{},"name":"boxready","id":"event-boxready"},{"tagname":"event","owner":"Ext.AbstractComponent","meta":{},"name":"deactivate","id":"event-deactivate"},{"tagname":"event","owner":"Ext.AbstractComponent","meta":{"since":"1.1.0"},"name":"destroy","id":"event-destroy"},{"tagname":"event","owner":"Ext.AbstractComponent","meta":{"since":"1.1.0"},"name":"disable","id":"event-disable"},{"tagname":"event","owner":"Ext.AbstractComponent","meta":{"since":"1.1.0"},"name":"enable","id":"event-enable"},{"tagname":"event","owner":"Ext.AbstractComponent","meta":{},"name":"focus","id":"event-focus"},{"tagname":"event","owner":"Ext.AbstractComponent","meta":{"since":"1.1.0"},"name":"hide","id":"event-hide"},{"tagname":"event","owner":"Ext.AbstractComponent","meta":{},"name":"move","id":"event-move"},{"tagname":"event","owner":"Ext.toolbar.Toolbar","meta":{},"name":"overflowchange","id":"event-overflowchange"},{"tagname":"event","owner":"Ext.container.AbstractContainer","meta":{"since":"2.3.0"},"name":"remove","id":"event-remove"},{"tagname":"event","owner":"Ext.AbstractComponent","meta":{"since":"3.4.0"},"name":"removed","id":"event-removed"},{"tagname":"event","owner":"Ext.AbstractComponent","meta":{"since":"1.1.0"},"name":"render","id":"event-render"},{"tagname":"event","owner":"Ext.AbstractComponent","meta":{},"name":"resize","id":"event-resize"},{"tagname":"event","owner":"Ext.AbstractComponent","meta":{"since":"1.1.0"},"name":"show","id":"event-show"},{"tagname":"event","owner":"Ext.state.Stateful","meta":{},"name":"staterestore","id":"event-staterestore"},{"tagname":"event","owner":"Ext.state.Stateful","meta":{},"name":"statesave","id":"event-statesave"}],"css_mixin":[{"tagname":"css_mixin","owner":"Ext.toolbar.Toolbar","meta":{},"name":"extjs-toolbar-ui","id":"css_mixin-extjs-toolbar-ui"}]},"inheritable":null,"private":null,"component":true,"name":"Ext.ux.statusbar.StatusBar","singleton":false,"override":null,"inheritdoc":null,"id":"class-Ext.ux.statusbar.StatusBar","mixins":[],"mixedInto":[]});
|
packages/react-error-overlay/src/containers/StackTrace.js
|
timlogemann/create-react-app
|
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/* @flow */
import React, { Component } from 'react';
import StackFrame from './StackFrame';
import Collapsible from '../components/Collapsible';
import { isInternalFile } from '../utils/isInternalFile';
import { isBultinErrorName } from '../utils/isBultinErrorName';
import type { StackFrame as StackFrameType } from '../utils/stack-frame';
import type { ErrorLocation } from '../utils/parseCompileError';
const traceStyle = {
fontSize: '1em',
flex: '0 1 auto',
minHeight: '0px',
overflow: 'auto',
};
type Props = {|
stackFrames: StackFrameType[],
errorName: string,
contextSize: number,
editorHandler: (errorLoc: ErrorLocation) => void,
|};
class StackTrace extends Component<Props> {
renderFrames() {
const { stackFrames, errorName, contextSize, editorHandler } = this.props;
const renderedFrames = [];
let hasReachedAppCode = false,
currentBundle = [],
bundleCount = 0;
stackFrames.forEach((frame, index) => {
const { fileName, _originalFileName: sourceFileName } = frame;
const isInternalUrl = isInternalFile(sourceFileName, fileName);
const isThrownIntentionally = !isBultinErrorName(errorName);
const shouldCollapse =
isInternalUrl && (isThrownIntentionally || hasReachedAppCode);
if (!isInternalUrl) {
hasReachedAppCode = true;
}
const frameEle = (
<StackFrame
key={'frame-' + index}
frame={frame}
contextSize={contextSize}
critical={index === 0}
showCode={!shouldCollapse}
editorHandler={editorHandler}
/>
);
const lastElement = index === stackFrames.length - 1;
if (shouldCollapse) {
currentBundle.push(frameEle);
}
if (!shouldCollapse || lastElement) {
if (currentBundle.length === 1) {
renderedFrames.push(currentBundle[0]);
} else if (currentBundle.length > 1) {
bundleCount++;
renderedFrames.push(
<Collapsible key={'bundle-' + bundleCount}>
{currentBundle}
</Collapsible>
);
}
currentBundle = [];
}
if (!shouldCollapse) {
renderedFrames.push(frameEle);
}
});
return renderedFrames;
}
render() {
return <div style={traceStyle}>{this.renderFrames()}</div>;
}
}
export default StackTrace;
|
src/svg-icons/action/assignment-late.js
|
matthewoates/material-ui
|
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionAssignmentLate = (props) => (
<SvgIcon {...props}>
<path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-6 15h-2v-2h2v2zm0-4h-2V8h2v6zm-1-9c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"/>
</SvgIcon>
);
ActionAssignmentLate = pure(ActionAssignmentLate);
ActionAssignmentLate.displayName = 'ActionAssignmentLate';
ActionAssignmentLate.muiName = 'SvgIcon';
export default ActionAssignmentLate;
|
packages/cp-frontend/test/unit/components/manifest/name.js
|
yldio/copilot
|
/**
* @jest-environment jsdom
*/
import React from 'react';
import renderer from 'react-test-renderer';
import 'jest-styled-components';
import { Store } from '../../mocks';
import { reduxForm } from 'redux-form';
import { Name } from '@components/manifest';
const TestNameForm = reduxForm({ form: 'testNameForm' })(Name);
it('renders <Name /> without throwing', () => {
const tree = renderer
.create(
<Store>
<TestNameForm handleSubmit={() => {}} onCancel={() => {}} dirty />
</Store>
)
.toJSON();
expect(tree).toMatchSnapshot();
});
it('renders <Name /> without throwing', () => {
const tree = renderer
.create(
<Store>
<TestNameForm handleSubmit={() => {}} onCancel={() => {}} />
</Store>
)
.toJSON();
expect(tree).toMatchSnapshot();
});
|
src/components/TextInput/TextInput.js
|
miker169/ps-react-miker169
|
import React from 'react';
import PropTypes from 'prop-types';
import Label from '../Label';
/** Text input with integrated label to enforce consistency in layout, error display, label placement, and required field marker */
function TextInput({htmlId, name, label, type="text", required=false, onChange, placeholder, value, error, children, ...props}) {
return (
<div style={{marginBottom: 16}}>
<Label htmlFor={htmlId} label={label} required={required} />
<input
id={htmlId}
type={type}
name={name}
placeholder={placeholder}
value={value}
onChange={onChange}
style={error && {border: 'solid 1px red'}}
{...props}/>
{children}
{error && <div className="error" style={{color: 'red'}}>{error}</div>}
</div>
);
};
TextInput.propTypes = {
/** Unique HTML ID. Used for tying label to HTML input. Handy hook for automated testing. */
htmlId: PropTypes.string.isRequired,
/** Input name. Recommend setting this to match object's property so a single change handler can be used. */
name: PropTypes.string.isRequired,
/** Input label */
label: PropTypes.string.isRequired,
/** Input type */
type: PropTypes.oneOf(['text', 'number', 'password']),
/** Mark label with asterisk if set to true */
required: PropTypes.bool,
/** Function to call onChange */
onChange: PropTypes.func.isRequired,
/** Placeholder to display when empty */
placeholder: PropTypes.string,
/** Value */
value: PropTypes.any,
/** String to display when error occurs */
error: PropTypes.string,
/** Child component to display next to the input */
children: PropTypes.node
};
export default TextInput;
|
ajax/libs/parsley.js/2.3.9/parsley.js
|
keicheng/cdnjs
|
/*!
* Parsley.js
* Version 2.3.9 - built Tue, Apr 12th 2016, 9:29 pm
* http://parsleyjs.org
* Guillaume Potier - <guillaume@wisembly.com>
* Marc-Andre Lafortune - <petroselinum@marc-andre.ca>
* MIT Licensed
*/
// The source code below is generated by babel as
// Parsley is written in ECMAScript 6
//
var _slice = Array.prototype.slice;
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } }
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) : typeof define === 'function' && define.amd ? define(['jquery'], factory) : global.parsley = factory(global.jQuery);
})(this, function ($) {
'use strict';
var globalID = 1;
var pastWarnings = {};
var ParsleyUtils__ParsleyUtils = {
// Parsley DOM-API
// returns object from dom attributes and values
attr: function attr($element, namespace, obj) {
var i;
var attribute;
var attributes;
var regex = new RegExp('^' + namespace, 'i');
if ('undefined' === typeof obj) obj = {};else {
// Clear all own properties. This won't affect prototype's values
for (i in obj) {
if (obj.hasOwnProperty(i)) delete obj[i];
}
}
if ('undefined' === typeof $element || 'undefined' === typeof $element[0]) return obj;
attributes = $element[0].attributes;
for (i = attributes.length; i--;) {
attribute = attributes[i];
if (attribute && attribute.specified && regex.test(attribute.name)) {
obj[this.camelize(attribute.name.slice(namespace.length))] = this.deserializeValue(attribute.value);
}
}
return obj;
},
checkAttr: function checkAttr($element, namespace, _checkAttr) {
return $element.is('[' + namespace + _checkAttr + ']');
},
setAttr: function setAttr($element, namespace, attr, value) {
$element[0].setAttribute(this.dasherize(namespace + attr), String(value));
},
generateID: function generateID() {
return '' + globalID++;
},
/** Third party functions **/
// Zepto deserialize function
deserializeValue: function deserializeValue(value) {
var num;
try {
return value ? value == "true" || (value == "false" ? false : value == "null" ? null : !isNaN(num = Number(value)) ? num : /^[\[\{]/.test(value) ? $.parseJSON(value) : value) : value;
} catch (e) {
return value;
}
},
// Zepto camelize function
camelize: function camelize(str) {
return str.replace(/-+(.)?/g, function (match, chr) {
return chr ? chr.toUpperCase() : '';
});
},
// Zepto dasherize function
dasherize: function dasherize(str) {
return str.replace(/::/g, '/').replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2').replace(/([a-z\d])([A-Z])/g, '$1_$2').replace(/_/g, '-').toLowerCase();
},
warn: function warn() {
var _window$console;
if (window.console && 'function' === typeof window.console.warn) (_window$console = window.console).warn.apply(_window$console, arguments);
},
warnOnce: function warnOnce(msg) {
if (!pastWarnings[msg]) {
pastWarnings[msg] = true;
this.warn.apply(this, arguments);
}
},
_resetWarnings: function _resetWarnings() {
pastWarnings = {};
},
trimString: function trimString(string) {
return string.replace(/^\s+|\s+$/g, '');
},
namespaceEvents: function namespaceEvents(events, namespace) {
events = this.trimString(events || '').split(/\s+/);
if (!events[0]) return '';
return $.map(events, function (evt) {
return evt + '.' + namespace;
}).join(' ');
},
// Object.create polyfill, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create#Polyfill
objectCreate: Object.create || (function () {
var Object = function Object() {};
return function (prototype) {
if (arguments.length > 1) {
throw Error('Second argument not supported');
}
if (typeof prototype != 'object') {
throw TypeError('Argument must be an object');
}
Object.prototype = prototype;
var result = new Object();
Object.prototype = null;
return result;
};
})()
};
var ParsleyUtils__default = ParsleyUtils__ParsleyUtils;
// All these options could be overriden and specified directly in DOM using
// `data-parsley-` default DOM-API
// eg: `inputs` can be set in DOM using `data-parsley-inputs="input, textarea"`
// eg: `data-parsley-stop-on-first-failing-constraint="false"`
var ParsleyDefaults = {
// ### General
// Default data-namespace for DOM API
namespace: 'data-parsley-',
// Supported inputs by default
inputs: 'input, textarea, select',
// Excluded inputs by default
excluded: 'input[type=button], input[type=submit], input[type=reset], input[type=hidden]',
// Stop validating field on highest priority failing constraint
priorityEnabled: true,
// ### Field only
// identifier used to group together inputs (e.g. radio buttons...)
multiple: null,
// identifier (or array of identifiers) used to validate only a select group of inputs
group: null,
// ### UI
// Enable\Disable error messages
uiEnabled: true,
// Key events threshold before validation
validationThreshold: 3,
// Focused field on form validation error. 'first'|'last'|'none'
focus: 'first',
// event(s) that will trigger validation before first failure. eg: `input`...
trigger: false,
// event(s) that will trigger validation after first failure.
triggerAfterFailure: 'input',
// Class that would be added on every failing validation Parsley field
errorClass: 'parsley-error',
// Same for success validation
successClass: 'parsley-success',
// Return the `$element` that will receive these above success or error classes
// Could also be (and given directly from DOM) a valid selector like `'#div'`
classHandler: function classHandler(ParsleyField) {},
// Return the `$element` where errors will be appended
// Could also be (and given directly from DOM) a valid selector like `'#div'`
errorsContainer: function errorsContainer(ParsleyField) {},
// ul elem that would receive errors' list
errorsWrapper: '<ul class="parsley-errors-list"></ul>',
// li elem that would receive error message
errorTemplate: '<li></li>'
};
var ParsleyAbstract = function ParsleyAbstract() {
this.__id__ = ParsleyUtils__default.generateID();
};
ParsleyAbstract.prototype = {
asyncSupport: true, // Deprecated
_pipeAccordingToValidationResult: function _pipeAccordingToValidationResult() {
var _this = this;
var pipe = function pipe() {
var r = $.Deferred();
if (true !== _this.validationResult) r.reject();
return r.resolve().promise();
};
return [pipe, pipe];
},
actualizeOptions: function actualizeOptions() {
ParsleyUtils__default.attr(this.$element, this.options.namespace, this.domOptions);
if (this.parent && this.parent.actualizeOptions) this.parent.actualizeOptions();
return this;
},
_resetOptions: function _resetOptions(initOptions) {
this.domOptions = ParsleyUtils__default.objectCreate(this.parent.options);
this.options = ParsleyUtils__default.objectCreate(this.domOptions);
// Shallow copy of ownProperties of initOptions:
for (var i in initOptions) {
if (initOptions.hasOwnProperty(i)) this.options[i] = initOptions[i];
}
this.actualizeOptions();
},
_listeners: null,
// Register a callback for the given event name
// Callback is called with context as the first argument and the `this`
// The context is the current parsley instance, or window.Parsley if global
// A return value of `false` will interrupt the calls
on: function on(name, fn) {
this._listeners = this._listeners || {};
var queue = this._listeners[name] = this._listeners[name] || [];
queue.push(fn);
return this;
},
// Deprecated. Use `on` instead
subscribe: function subscribe(name, fn) {
$.listenTo(this, name.toLowerCase(), fn);
},
// Unregister a callback (or all if none is given) for the given event name
off: function off(name, fn) {
var queue = this._listeners && this._listeners[name];
if (queue) {
if (!fn) {
delete this._listeners[name];
} else {
for (var i = queue.length; i--;) if (queue[i] === fn) queue.splice(i, 1);
}
}
return this;
},
// Deprecated. Use `off`
unsubscribe: function unsubscribe(name, fn) {
$.unsubscribeTo(this, name.toLowerCase());
},
// Trigger an event of the given name
// A return value of `false` interrupts the callback chain
// Returns false if execution was interrupted
trigger: function trigger(name, target, extraArg) {
target = target || this;
var queue = this._listeners && this._listeners[name];
var result;
var parentResult;
if (queue) {
for (var i = queue.length; i--;) {
result = queue[i].call(target, target, extraArg);
if (result === false) return result;
}
}
if (this.parent) {
return this.parent.trigger(name, target, extraArg);
}
return true;
},
// Reset UI
reset: function reset() {
// Field case: just emit a reset event for UI
if ('ParsleyForm' !== this.__class__) {
this._resetUI();
return this._trigger('reset');
}
// Form case: emit a reset event for each field
for (var i = 0; i < this.fields.length; i++) this.fields[i].reset();
this._trigger('reset');
},
// Destroy Parsley instance (+ UI)
destroy: function destroy() {
// Field case: emit destroy event to clean UI and then destroy stored instance
this._destroyUI();
if ('ParsleyForm' !== this.__class__) {
this.$element.removeData('Parsley');
this.$element.removeData('ParsleyFieldMultiple');
this._trigger('destroy');
return;
}
// Form case: destroy all its fields and then destroy stored instance
for (var i = 0; i < this.fields.length; i++) this.fields[i].destroy();
this.$element.removeData('Parsley');
this._trigger('destroy');
},
asyncIsValid: function asyncIsValid(group, force) {
ParsleyUtils__default.warnOnce("asyncIsValid is deprecated; please use whenValid instead");
return this.whenValid({ group: group, force: force });
},
_findRelated: function _findRelated() {
return this.options.multiple ? this.parent.$element.find('[' + this.options.namespace + 'multiple="' + this.options.multiple + '"]') : this.$element;
}
};
var requirementConverters = {
string: function string(_string) {
return _string;
},
integer: function integer(string) {
if (isNaN(string)) throw 'Requirement is not an integer: "' + string + '"';
return parseInt(string, 10);
},
number: function number(string) {
if (isNaN(string)) throw 'Requirement is not a number: "' + string + '"';
return parseFloat(string);
},
reference: function reference(string) {
// Unused for now
var result = $(string);
if (result.length === 0) throw 'No such reference: "' + string + '"';
return result;
},
boolean: function boolean(string) {
return string !== 'false';
},
object: function object(string) {
return ParsleyUtils__default.deserializeValue(string);
},
regexp: function regexp(_regexp) {
var flags = '';
// Test if RegExp is literal, if not, nothing to be done, otherwise, we need to isolate flags and pattern
if (/^\/.*\/(?:[gimy]*)$/.test(_regexp)) {
// Replace the regexp literal string with the first match group: ([gimy]*)
// If no flag is present, this will be a blank string
flags = _regexp.replace(/.*\/([gimy]*)$/, '$1');
// Again, replace the regexp literal string with the first match group:
// everything excluding the opening and closing slashes and the flags
_regexp = _regexp.replace(new RegExp('^/(.*?)/' + flags + '$'), '$1');
} else {
// Anchor regexp:
_regexp = '^' + _regexp + '$';
}
return new RegExp(_regexp, flags);
}
};
var convertArrayRequirement = function convertArrayRequirement(string, length) {
var m = string.match(/^\s*\[(.*)\]\s*$/);
if (!m) throw 'Requirement is not an array: "' + string + '"';
var values = m[1].split(',').map(ParsleyUtils__default.trimString);
if (values.length !== length) throw 'Requirement has ' + values.length + ' values when ' + length + ' are needed';
return values;
};
var convertRequirement = function convertRequirement(requirementType, string) {
var converter = requirementConverters[requirementType || 'string'];
if (!converter) throw 'Unknown requirement specification: "' + requirementType + '"';
return converter(string);
};
var convertExtraOptionRequirement = function convertExtraOptionRequirement(requirementSpec, string, extraOptionReader) {
var main = null;
var extra = {};
for (var key in requirementSpec) {
if (key) {
var value = extraOptionReader(key);
if ('string' === typeof value) value = convertRequirement(requirementSpec[key], value);
extra[key] = value;
} else {
main = convertRequirement(requirementSpec[key], string);
}
}
return [main, extra];
};
// A Validator needs to implement the methods `validate` and `parseRequirements`
var ParsleyValidator = function ParsleyValidator(spec) {
$.extend(true, this, spec);
};
ParsleyValidator.prototype = {
// Returns `true` iff the given `value` is valid according the given requirements.
validate: function validate(value, requirementFirstArg) {
if (this.fn) {
// Legacy style validator
if (arguments.length > 3) // If more args then value, requirement, instance...
requirementFirstArg = [].slice.call(arguments, 1, -1); // Skip first arg (value) and last (instance), combining the rest
return this.fn.call(this, value, requirementFirstArg);
}
if ($.isArray(value)) {
if (!this.validateMultiple) throw 'Validator `' + this.name + '` does not handle multiple values';
return this.validateMultiple.apply(this, arguments);
} else {
if (this.validateNumber) {
if (isNaN(value)) return false;
arguments[0] = parseFloat(arguments[0]);
return this.validateNumber.apply(this, arguments);
}
if (this.validateString) {
return this.validateString.apply(this, arguments);
}
throw 'Validator `' + this.name + '` only handles multiple values';
}
},
// Parses `requirements` into an array of arguments,
// according to `this.requirementType`
parseRequirements: function parseRequirements(requirements, extraOptionReader) {
if ('string' !== typeof requirements) {
// Assume requirement already parsed
// but make sure we return an array
return $.isArray(requirements) ? requirements : [requirements];
}
var type = this.requirementType;
if ($.isArray(type)) {
var values = convertArrayRequirement(requirements, type.length);
for (var i = 0; i < values.length; i++) values[i] = convertRequirement(type[i], values[i]);
return values;
} else if ($.isPlainObject(type)) {
return convertExtraOptionRequirement(type, requirements, extraOptionReader);
} else {
return [convertRequirement(type, requirements)];
}
},
// Defaults:
requirementType: 'string',
priority: 2
};
var ParsleyValidatorRegistry = function ParsleyValidatorRegistry(validators, catalog) {
this.__class__ = 'ParsleyValidatorRegistry';
// Default Parsley locale is en
this.locale = 'en';
this.init(validators || {}, catalog || {});
};
var typeRegexes = {
email: /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,
// Follow https://www.w3.org/TR/html5/infrastructure.html#floating-point-numbers
number: /^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,
integer: /^-?\d+$/,
digits: /^\d+$/,
alphanum: /^\w+$/i,
url: new RegExp("^" +
// protocol identifier
"(?:(?:https?|ftp)://)?" + // ** mod: make scheme optional
// user:pass authentication
"(?:\\S+(?::\\S*)?@)?" + "(?:" +
// IP address exclusion
// private & local networks
// "(?!(?:10|127)(?:\\.\\d{1,3}){3})" + // ** mod: allow local networks
// "(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})" + // ** mod: allow local networks
// "(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})" + // ** mod: allow local networks
// IP address dotted notation octets
// excludes loopback network 0.0.0.0
// excludes reserved space >= 224.0.0.0
// excludes network & broacast addresses
// (first & last IP address of each class)
"(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])" + "(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}" + "(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))" + "|" +
// host name
'(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)' +
// domain name
'(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*' +
// TLD identifier
'(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))' + ")" +
// port number
"(?::\\d{2,5})?" +
// resource path
"(?:/\\S*)?" + "$", 'i')
};
typeRegexes.range = typeRegexes.number;
// See http://stackoverflow.com/a/10454560/8279
var decimalPlaces = function decimalPlaces(num) {
var match = ('' + num).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
if (!match) {
return 0;
}
return Math.max(0,
// Number of digits right of decimal point.
(match[1] ? match[1].length : 0) - (
// Adjust for scientific notation.
match[2] ? +match[2] : 0));
};
ParsleyValidatorRegistry.prototype = {
init: function init(validators, catalog) {
this.catalog = catalog;
// Copy prototype's validators:
this.validators = $.extend({}, this.validators);
for (var name in validators) this.addValidator(name, validators[name].fn, validators[name].priority);
window.Parsley.trigger('parsley:validator:init');
},
// Set new messages locale if we have dictionary loaded in ParsleyConfig.i18n
setLocale: function setLocale(locale) {
if ('undefined' === typeof this.catalog[locale]) throw new Error(locale + ' is not available in the catalog');
this.locale = locale;
return this;
},
// Add a new messages catalog for a given locale. Set locale for this catalog if set === `true`
addCatalog: function addCatalog(locale, messages, set) {
if ('object' === typeof messages) this.catalog[locale] = messages;
if (true === set) return this.setLocale(locale);
return this;
},
// Add a specific message for a given constraint in a given locale
addMessage: function addMessage(locale, name, message) {
if ('undefined' === typeof this.catalog[locale]) this.catalog[locale] = {};
this.catalog[locale][name] = message;
return this;
},
// Add messages for a given locale
addMessages: function addMessages(locale, nameMessageObject) {
for (var name in nameMessageObject) this.addMessage(locale, name, nameMessageObject[name]);
return this;
},
// Add a new validator
//
// addValidator('custom', {
// requirementType: ['integer', 'integer'],
// validateString: function(value, from, to) {},
// priority: 22,
// messages: {
// en: "Hey, that's no good",
// fr: "Aye aye, pas bon du tout",
// }
// })
//
// Old API was addValidator(name, function, priority)
//
addValidator: function addValidator(name, arg1, arg2) {
if (this.validators[name]) ParsleyUtils__default.warn('Validator "' + name + '" is already defined.');else if (ParsleyDefaults.hasOwnProperty(name)) {
ParsleyUtils__default.warn('"' + name + '" is a restricted keyword and is not a valid validator name.');
return;
}
return this._setValidator.apply(this, arguments);
},
updateValidator: function updateValidator(name, arg1, arg2) {
if (!this.validators[name]) {
ParsleyUtils__default.warn('Validator "' + name + '" is not already defined.');
return this.addValidator.apply(this, arguments);
}
return this._setValidator.apply(this, arguments);
},
removeValidator: function removeValidator(name) {
if (!this.validators[name]) ParsleyUtils__default.warn('Validator "' + name + '" is not defined.');
delete this.validators[name];
return this;
},
_setValidator: function _setValidator(name, validator, priority) {
if ('object' !== typeof validator) {
// Old style validator, with `fn` and `priority`
validator = {
fn: validator,
priority: priority
};
}
if (!validator.validate) {
validator = new ParsleyValidator(validator);
}
this.validators[name] = validator;
for (var locale in validator.messages || {}) this.addMessage(locale, name, validator.messages[locale]);
return this;
},
getErrorMessage: function getErrorMessage(constraint) {
var message;
// Type constraints are a bit different, we have to match their requirements too to find right error message
if ('type' === constraint.name) {
var typeMessages = this.catalog[this.locale][constraint.name] || {};
message = typeMessages[constraint.requirements];
} else message = this.formatMessage(this.catalog[this.locale][constraint.name], constraint.requirements);
return message || this.catalog[this.locale].defaultMessage || this.catalog.en.defaultMessage;
},
// Kind of light `sprintf()` implementation
formatMessage: function formatMessage(string, parameters) {
if ('object' === typeof parameters) {
for (var i in parameters) string = this.formatMessage(string, parameters[i]);
return string;
}
return 'string' === typeof string ? string.replace(/%s/i, parameters) : '';
},
// Here is the Parsley default validators list.
// A validator is an object with the following key values:
// - priority: an integer
// - requirement: 'string' (default), 'integer', 'number', 'regexp' or an Array of these
// - validateString, validateMultiple, validateNumber: functions returning `true`, `false` or a promise
// Alternatively, a validator can be a function that returns such an object
//
validators: {
notblank: {
validateString: function validateString(value) {
return (/\S/.test(value)
);
},
priority: 2
},
required: {
validateMultiple: function validateMultiple(values) {
return values.length > 0;
},
validateString: function validateString(value) {
return (/\S/.test(value)
);
},
priority: 512
},
type: {
validateString: function validateString(value, type) {
var _ref = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
var _ref$step = _ref.step;
var step = _ref$step === undefined ? '1' : _ref$step;
var _ref$base = _ref.base;
var base = _ref$base === undefined ? 0 : _ref$base;
var regex = typeRegexes[type];
if (!regex) {
throw new Error('validator type `' + type + '` is not supported');
}
if (!regex.test(value)) return false;
if ('number' === type) {
if (!/^any$/i.test(step || '')) {
var nb = Number(value);
var decimals = Math.max(decimalPlaces(step), decimalPlaces(base));
if (decimalPlaces(nb) > decimals) // Value can't have too many decimals
return false;
// Be careful of rounding errors by using integers.
var toInt = function toInt(f) {
return Math.round(f * Math.pow(10, decimals));
};
if ((toInt(nb) - toInt(base)) % toInt(step) != 0) return false;
}
}
return true;
},
requirementType: {
'': 'string',
step: 'string',
base: 'number'
},
priority: 256
},
pattern: {
validateString: function validateString(value, regexp) {
return regexp.test(value);
},
requirementType: 'regexp',
priority: 64
},
minlength: {
validateString: function validateString(value, requirement) {
return value.length >= requirement;
},
requirementType: 'integer',
priority: 30
},
maxlength: {
validateString: function validateString(value, requirement) {
return value.length <= requirement;
},
requirementType: 'integer',
priority: 30
},
length: {
validateString: function validateString(value, min, max) {
return value.length >= min && value.length <= max;
},
requirementType: ['integer', 'integer'],
priority: 30
},
mincheck: {
validateMultiple: function validateMultiple(values, requirement) {
return values.length >= requirement;
},
requirementType: 'integer',
priority: 30
},
maxcheck: {
validateMultiple: function validateMultiple(values, requirement) {
return values.length <= requirement;
},
requirementType: 'integer',
priority: 30
},
check: {
validateMultiple: function validateMultiple(values, min, max) {
return values.length >= min && values.length <= max;
},
requirementType: ['integer', 'integer'],
priority: 30
},
min: {
validateNumber: function validateNumber(value, requirement) {
return value >= requirement;
},
requirementType: 'number',
priority: 30
},
max: {
validateNumber: function validateNumber(value, requirement) {
return value <= requirement;
},
requirementType: 'number',
priority: 30
},
range: {
validateNumber: function validateNumber(value, min, max) {
return value >= min && value <= max;
},
requirementType: ['number', 'number'],
priority: 30
},
equalto: {
validateString: function validateString(value, refOrValue) {
var $reference = $(refOrValue);
if ($reference.length) return value === $reference.val();else return value === refOrValue;
},
priority: 256
}
}
};
var ParsleyUI = {};
var diffResults = function diffResults(newResult, oldResult, deep) {
var added = [];
var kept = [];
for (var i = 0; i < newResult.length; i++) {
var found = false;
for (var j = 0; j < oldResult.length; j++) if (newResult[i].assert.name === oldResult[j].assert.name) {
found = true;
break;
}
if (found) kept.push(newResult[i]);else added.push(newResult[i]);
}
return {
kept: kept,
added: added,
removed: !deep ? diffResults(oldResult, newResult, true).added : []
};
};
ParsleyUI.Form = {
_actualizeTriggers: function _actualizeTriggers() {
var _this2 = this;
this.$element.on('submit.Parsley', function (evt) {
_this2.onSubmitValidate(evt);
});
this.$element.on('click.Parsley', 'input[type="submit"], button[type="submit"]', function (evt) {
_this2.onSubmitButton(evt);
});
// UI could be disabled
if (false === this.options.uiEnabled) return;
this.$element.attr('novalidate', '');
},
focus: function focus() {
this._focusedField = null;
if (true === this.validationResult || 'none' === this.options.focus) return null;
for (var i = 0; i < this.fields.length; i++) {
var field = this.fields[i];
if (true !== field.validationResult && field.validationResult.length > 0 && 'undefined' === typeof field.options.noFocus) {
this._focusedField = field.$element;
if ('first' === this.options.focus) break;
}
}
if (null === this._focusedField) return null;
return this._focusedField.focus();
},
_destroyUI: function _destroyUI() {
// Reset all event listeners
this.$element.off('.Parsley');
}
};
ParsleyUI.Field = {
_reflowUI: function _reflowUI() {
this._buildUI();
// If this field doesn't have an active UI don't bother doing something
if (!this._ui) return;
// Diff between two validation results
var diff = diffResults(this.validationResult, this._ui.lastValidationResult);
// Then store current validation result for next reflow
this._ui.lastValidationResult = this.validationResult;
// Handle valid / invalid / none field class
this._manageStatusClass();
// Add, remove, updated errors messages
this._manageErrorsMessages(diff);
// Triggers impl
this._actualizeTriggers();
// If field is not valid for the first time, bind keyup trigger to ease UX and quickly inform user
if ((diff.kept.length || diff.added.length) && !this._failedOnce) {
this._failedOnce = true;
this._actualizeTriggers();
}
},
// Returns an array of field's error message(s)
getErrorsMessages: function getErrorsMessages() {
// No error message, field is valid
if (true === this.validationResult) return [];
var messages = [];
for (var i = 0; i < this.validationResult.length; i++) messages.push(this.validationResult[i].errorMessage || this._getErrorMessage(this.validationResult[i].assert));
return messages;
},
// It's a goal of Parsley that this method is no longer required [#1073]
addError: function addError(name) {
var _ref2 = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
var message = _ref2.message;
var assert = _ref2.assert;
var _ref2$updateClass = _ref2.updateClass;
var updateClass = _ref2$updateClass === undefined ? true : _ref2$updateClass;
this._buildUI();
this._addError(name, { message: message, assert: assert });
if (updateClass) this._errorClass();
},
// It's a goal of Parsley that this method is no longer required [#1073]
updateError: function updateError(name) {
var _ref3 = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
var message = _ref3.message;
var assert = _ref3.assert;
var _ref3$updateClass = _ref3.updateClass;
var updateClass = _ref3$updateClass === undefined ? true : _ref3$updateClass;
this._buildUI();
this._updateError(name, { message: message, assert: assert });
if (updateClass) this._errorClass();
},
// It's a goal of Parsley that this method is no longer required [#1073]
removeError: function removeError(name) {
var _ref4 = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
var _ref4$updateClass = _ref4.updateClass;
var updateClass = _ref4$updateClass === undefined ? true : _ref4$updateClass;
this._buildUI();
this._removeError(name);
// edge case possible here: remove a standard Parsley error that is still failing in this.validationResult
// but highly improbable cuz' manually removing a well Parsley handled error makes no sense.
if (updateClass) this._manageStatusClass();
},
_manageStatusClass: function _manageStatusClass() {
if (this.hasConstraints() && this.needsValidation() && true === this.validationResult) this._successClass();else if (this.validationResult.length > 0) this._errorClass();else this._resetClass();
},
_manageErrorsMessages: function _manageErrorsMessages(diff) {
if ('undefined' !== typeof this.options.errorsMessagesDisabled) return;
// Case where we have errorMessage option that configure an unique field error message, regardless failing validators
if ('undefined' !== typeof this.options.errorMessage) {
if (diff.added.length || diff.kept.length) {
this._insertErrorWrapper();
if (0 === this._ui.$errorsWrapper.find('.parsley-custom-error-message').length) this._ui.$errorsWrapper.append($(this.options.errorTemplate).addClass('parsley-custom-error-message'));
return this._ui.$errorsWrapper.addClass('filled').find('.parsley-custom-error-message').html(this.options.errorMessage);
}
return this._ui.$errorsWrapper.removeClass('filled').find('.parsley-custom-error-message').remove();
}
// Show, hide, update failing constraints messages
for (var i = 0; i < diff.removed.length; i++) this._removeError(diff.removed[i].assert.name);
for (i = 0; i < diff.added.length; i++) this._addError(diff.added[i].assert.name, { message: diff.added[i].errorMessage, assert: diff.added[i].assert });
for (i = 0; i < diff.kept.length; i++) this._updateError(diff.kept[i].assert.name, { message: diff.kept[i].errorMessage, assert: diff.kept[i].assert });
},
_addError: function _addError(name, _ref5) {
var message = _ref5.message;
var assert = _ref5.assert;
this._insertErrorWrapper();
this._ui.$errorsWrapper.addClass('filled').append($(this.options.errorTemplate).addClass('parsley-' + name).html(message || this._getErrorMessage(assert)));
},
_updateError: function _updateError(name, _ref6) {
var message = _ref6.message;
var assert = _ref6.assert;
this._ui.$errorsWrapper.addClass('filled').find('.parsley-' + name).html(message || this._getErrorMessage(assert));
},
_removeError: function _removeError(name) {
this._ui.$errorsWrapper.removeClass('filled').find('.parsley-' + name).remove();
},
_getErrorMessage: function _getErrorMessage(constraint) {
var customConstraintErrorMessage = constraint.name + 'Message';
if ('undefined' !== typeof this.options[customConstraintErrorMessage]) return window.Parsley.formatMessage(this.options[customConstraintErrorMessage], constraint.requirements);
return window.Parsley.getErrorMessage(constraint);
},
_buildUI: function _buildUI() {
// UI could be already built or disabled
if (this._ui || false === this.options.uiEnabled) return;
var _ui = {};
// Give field its Parsley id in DOM
this.$element.attr(this.options.namespace + 'id', this.__id__);
/** Generate important UI elements and store them in this **/
// $errorClassHandler is the $element that woul have parsley-error and parsley-success classes
_ui.$errorClassHandler = this._manageClassHandler();
// $errorsWrapper is a div that would contain the various field errors, it will be appended into $errorsContainer
_ui.errorsWrapperId = 'parsley-id-' + (this.options.multiple ? 'multiple-' + this.options.multiple : this.__id__);
_ui.$errorsWrapper = $(this.options.errorsWrapper).attr('id', _ui.errorsWrapperId);
// ValidationResult UI storage to detect what have changed bwt two validations, and update DOM accordingly
_ui.lastValidationResult = [];
_ui.validationInformationVisible = false;
// Store it in this for later
this._ui = _ui;
},
// Determine which element will have `parsley-error` and `parsley-success` classes
_manageClassHandler: function _manageClassHandler() {
// An element selector could be passed through DOM with `data-parsley-class-handler=#foo`
if ('string' === typeof this.options.classHandler && $(this.options.classHandler).length) return $(this.options.classHandler);
// Class handled could also be determined by function given in Parsley options
var $handler = this.options.classHandler.call(this, this);
// If this function returned a valid existing DOM element, go for it
if ('undefined' !== typeof $handler && $handler.length) return $handler;
// Otherwise, if simple element (input, texatrea, select...) it will perfectly host the classes
if (!this.options.multiple || this.$element.is('select')) return this.$element;
// But if multiple element (radio, checkbox), that would be their parent
return this.$element.parent();
},
_insertErrorWrapper: function _insertErrorWrapper() {
var $errorsContainer;
// Nothing to do if already inserted
if (0 !== this._ui.$errorsWrapper.parent().length) return this._ui.$errorsWrapper.parent();
if ('string' === typeof this.options.errorsContainer) {
if ($(this.options.errorsContainer).length) return $(this.options.errorsContainer).append(this._ui.$errorsWrapper);else ParsleyUtils__default.warn('The errors container `' + this.options.errorsContainer + '` does not exist in DOM');
} else if ('function' === typeof this.options.errorsContainer) $errorsContainer = this.options.errorsContainer.call(this, this);
if ('undefined' !== typeof $errorsContainer && $errorsContainer.length) return $errorsContainer.append(this._ui.$errorsWrapper);
var $from = this.$element;
if (this.options.multiple) $from = $from.parent();
return $from.after(this._ui.$errorsWrapper);
},
_actualizeTriggers: function _actualizeTriggers() {
var _this3 = this;
var $toBind = this._findRelated();
// Remove Parsley events already bound on this field
$toBind.off('.Parsley');
if (this._failedOnce) $toBind.on(ParsleyUtils__default.namespaceEvents(this.options.triggerAfterFailure, 'Parsley'), function () {
_this3.validate();
});else {
$toBind.on(ParsleyUtils__default.namespaceEvents(this.options.trigger, 'Parsley'), function (event) {
_this3._eventValidate(event);
});
}
},
_eventValidate: function _eventValidate(event) {
// For keyup, keypress, keydown, input... events that could be a little bit obstrusive
// do not validate if val length < min threshold on first validation. Once field have been validated once and info
// about success or failure have been displayed, always validate with this trigger to reflect every yalidation change.
if (/key|input/.test(event.type)) if (!(this._ui && this._ui.validationInformationVisible) && this.getValue().length <= this.options.validationThreshold) return;
this.validate();
},
_resetUI: function _resetUI() {
// Reset all event listeners
this._failedOnce = false;
this._actualizeTriggers();
// Nothing to do if UI never initialized for this field
if ('undefined' === typeof this._ui) return;
// Reset all errors' li
this._ui.$errorsWrapper.removeClass('filled').children().remove();
// Reset validation class
this._resetClass();
// Reset validation flags and last validation result
this._ui.lastValidationResult = [];
this._ui.validationInformationVisible = false;
},
_destroyUI: function _destroyUI() {
this._resetUI();
if ('undefined' !== typeof this._ui) this._ui.$errorsWrapper.remove();
delete this._ui;
},
_successClass: function _successClass() {
this._ui.validationInformationVisible = true;
this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass);
},
_errorClass: function _errorClass() {
this._ui.validationInformationVisible = true;
this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass);
},
_resetClass: function _resetClass() {
this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass);
}
};
var ParsleyForm = function ParsleyForm(element, domOptions, options) {
this.__class__ = 'ParsleyForm';
this.$element = $(element);
this.domOptions = domOptions;
this.options = options;
this.parent = window.Parsley;
this.fields = [];
this.validationResult = null;
};
var ParsleyForm__statusMapping = { pending: null, resolved: true, rejected: false };
ParsleyForm.prototype = {
onSubmitValidate: function onSubmitValidate(event) {
var _this4 = this;
// This is a Parsley generated submit event, do not validate, do not prevent, simply exit and keep normal behavior
if (true === event.parsley) return;
// If we didn't come here through a submit button, use the first one in the form
var $submitSource = this._$submitSource || this.$element.find('input[type="submit"], button[type="submit"]').first();
this._$submitSource = null;
this.$element.find('.parsley-synthetic-submit-button').prop('disabled', true);
if ($submitSource.is('[formnovalidate]')) return;
var promise = this.whenValidate({ event: event });
if ('resolved' === promise.state() && false !== this._trigger('submit')) {
// All good, let event go through. We make this distinction because browsers
// differ in their handling of `submit` being called from inside a submit event [#1047]
} else {
// Rejected or pending: cancel this submit
event.stopImmediatePropagation();
event.preventDefault();
if ('pending' === promise.state()) promise.done(function () {
_this4._submit($submitSource);
});
}
},
onSubmitButton: function onSubmitButton(event) {
this._$submitSource = $(event.target);
},
// internal
// _submit submits the form, this time without going through the validations.
// Care must be taken to "fake" the actual submit button being clicked.
_submit: function _submit($submitSource) {
if (false === this._trigger('submit')) return;
// Add submit button's data
if ($submitSource) {
var $synthetic = this.$element.find('.parsley-synthetic-submit-button').prop('disabled', false);
if (0 === $synthetic.length) $synthetic = $('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element);
$synthetic.attr({
name: $submitSource.attr('name'),
value: $submitSource.attr('value')
});
}
this.$element.trigger($.extend($.Event('submit'), { parsley: true }));
},
// Performs validation on fields while triggering events.
// @returns `true` if all validations succeeds, `false`
// if a failure is immediately detected, or `null`
// if dependant on a promise.
// Consider using `whenValidate` instead.
validate: function validate(options) {
if (arguments.length >= 1 && !$.isPlainObject(options)) {
ParsleyUtils__default.warnOnce('Calling validate on a parsley form without passing arguments as an object is deprecated.');
var _arguments = _slice.call(arguments);
var group = _arguments[0];
var force = _arguments[1];
var event = _arguments[2];
options = { group: group, force: force, event: event };
}
return ParsleyForm__statusMapping[this.whenValidate(options).state()];
},
whenValidate: function whenValidate() {
var _$$when$done$fail$always,
_this5 = this;
var _ref7 = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var group = _ref7.group;
var force = _ref7.force;
var event = _ref7.event;
this.submitEvent = event;
if (event) {
this.submitEvent = $.extend({}, event, { preventDefault: function preventDefault() {
ParsleyUtils__default.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`");
_this5.validationResult = false;
} });
}
this.validationResult = true;
// fire validate event to eventually modify things before very validation
this._trigger('validate');
// Refresh form DOM options and form's fields that could have changed
this._refreshFields();
var promises = this._withoutReactualizingFormOptions(function () {
return $.map(_this5.fields, function (field) {
return field.whenValidate({ force: force, group: group });
});
});
return (_$$when$done$fail$always = $.when.apply($, _toConsumableArray(promises)).done(function () {
_this5._trigger('success');
}).fail(function () {
_this5.validationResult = false;
_this5.focus();
_this5._trigger('error');
}).always(function () {
_this5._trigger('validated');
})).pipe.apply(_$$when$done$fail$always, _toConsumableArray(this._pipeAccordingToValidationResult()));
},
// Iterate over refreshed fields, and stop on first failure.
// Returns `true` if all fields are valid, `false` if a failure is detected
// or `null` if the result depends on an unresolved promise.
// Prefer using `whenValid` instead.
isValid: function isValid(options) {
if (arguments.length >= 1 && !$.isPlainObject(options)) {
ParsleyUtils__default.warnOnce('Calling isValid on a parsley form without passing arguments as an object is deprecated.');
var _arguments2 = _slice.call(arguments);
var group = _arguments2[0];
var force = _arguments2[1];
options = { group: group, force: force };
}
return ParsleyForm__statusMapping[this.whenValid(options).state()];
},
// Iterate over refreshed fields and validate them.
// Returns a promise.
// A validation that immediately fails will interrupt the validations.
whenValid: function whenValid() {
var _this6 = this;
var _ref8 = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var group = _ref8.group;
var force = _ref8.force;
this._refreshFields();
var promises = this._withoutReactualizingFormOptions(function () {
return $.map(_this6.fields, function (field) {
return field.whenValid({ group: group, force: force });
});
});
return $.when.apply($, _toConsumableArray(promises));
},
_refreshFields: function _refreshFields() {
return this.actualizeOptions()._bindFields();
},
_bindFields: function _bindFields() {
var _this7 = this;
var oldFields = this.fields;
this.fields = [];
this.fieldsMappedById = {};
this._withoutReactualizingFormOptions(function () {
_this7.$element.find(_this7.options.inputs).not(_this7.options.excluded).each(function (_, element) {
var fieldInstance = new window.Parsley.Factory(element, {}, _this7);
// Only add valid and not excluded `ParsleyField` and `ParsleyFieldMultiple` children
if (('ParsleyField' === fieldInstance.__class__ || 'ParsleyFieldMultiple' === fieldInstance.__class__) && true !== fieldInstance.options.excluded) if ('undefined' === typeof _this7.fieldsMappedById[fieldInstance.__class__ + '-' + fieldInstance.__id__]) {
_this7.fieldsMappedById[fieldInstance.__class__ + '-' + fieldInstance.__id__] = fieldInstance;
_this7.fields.push(fieldInstance);
}
});
$(oldFields).not(_this7.fields).each(function (_, field) {
field._trigger('reset');
});
});
return this;
},
// Internal only.
// Looping on a form's fields to do validation or similar
// will trigger reactualizing options on all of them, which
// in turn will reactualize the form's options.
// To avoid calling actualizeOptions so many times on the form
// for nothing, _withoutReactualizingFormOptions temporarily disables
// the method actualizeOptions on this form while `fn` is called.
_withoutReactualizingFormOptions: function _withoutReactualizingFormOptions(fn) {
var oldActualizeOptions = this.actualizeOptions;
this.actualizeOptions = function () {
return this;
};
var result = fn();
this.actualizeOptions = oldActualizeOptions;
return result;
},
// Internal only.
// Shortcut to trigger an event
// Returns true iff event is not interrupted and default not prevented.
_trigger: function _trigger(eventName) {
return this.trigger('form:' + eventName);
}
};
var ConstraintFactory = function ConstraintFactory(parsleyField, name, requirements, priority, isDomConstraint) {
if (!/ParsleyField/.test(parsleyField.__class__)) throw new Error('ParsleyField or ParsleyFieldMultiple instance expected');
var validatorSpec = window.Parsley._validatorRegistry.validators[name];
var validator = new ParsleyValidator(validatorSpec);
$.extend(this, {
validator: validator,
name: name,
requirements: requirements,
priority: priority || parsleyField.options[name + 'Priority'] || validator.priority,
isDomConstraint: true === isDomConstraint
});
this._parseRequirements(parsleyField.options);
};
var capitalize = function capitalize(str) {
var cap = str[0].toUpperCase();
return cap + str.slice(1);
};
ConstraintFactory.prototype = {
validate: function validate(value, instance) {
var args = this.requirementList.slice(0); // Make copy
args.unshift(value);
args.push(instance);
return this.validator.validate.apply(this.validator, args);
},
_parseRequirements: function _parseRequirements(options) {
var _this8 = this;
this.requirementList = this.validator.parseRequirements(this.requirements, function (key) {
return options[_this8.name + capitalize(key)];
});
}
};
var ParsleyField = function ParsleyField(field, domOptions, options, parsleyFormInstance) {
this.__class__ = 'ParsleyField';
this.$element = $(field);
// Set parent if we have one
if ('undefined' !== typeof parsleyFormInstance) {
this.parent = parsleyFormInstance;
}
this.options = options;
this.domOptions = domOptions;
// Initialize some properties
this.constraints = [];
this.constraintsByName = {};
this.validationResult = true;
// Bind constraints
this._bindConstraints();
};
var parsley_field__statusMapping = { pending: null, resolved: true, rejected: false };
ParsleyField.prototype = {
// # Public API
// Validate field and trigger some events for mainly `ParsleyUI`
// @returns `true`, an array of the validators that failed, or
// `null` if validation is not finished. Prefer using whenValidate
validate: function validate(options) {
if (arguments.length >= 1 && !$.isPlainObject(options)) {
ParsleyUtils__default.warnOnce('Calling validate on a parsley field without passing arguments as an object is deprecated.');
options = { options: options };
}
var promise = this.whenValidate(options);
if (!promise) // If excluded with `group` option
return true;
switch (promise.state()) {
case 'pending':
return null;
case 'resolved':
return true;
case 'rejected':
return this.validationResult;
}
},
// Validate field and trigger some events for mainly `ParsleyUI`
// @returns a promise that succeeds only when all validations do
// or `undefined` if field is not in the given `group`.
whenValidate: function whenValidate() {
var _whenValid$always$done$fail$always,
_this9 = this;
var _ref9 = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var force = _ref9.force;
var group = _ref9.group;
// do not validate a field if not the same as given validation group
this.refreshConstraints();
if (group && !this._isInGroup(group)) return;
this.value = this.getValue();
// Field Validate event. `this.value` could be altered for custom needs
this._trigger('validate');
return (_whenValid$always$done$fail$always = this.whenValid({ force: force, value: this.value, _refreshed: true }).always(function () {
_this9._reflowUI();
}).done(function () {
_this9._trigger('success');
}).fail(function () {
_this9._trigger('error');
}).always(function () {
_this9._trigger('validated');
})).pipe.apply(_whenValid$always$done$fail$always, _toConsumableArray(this._pipeAccordingToValidationResult()));
},
hasConstraints: function hasConstraints() {
return 0 !== this.constraints.length;
},
// An empty optional field does not need validation
needsValidation: function needsValidation(value) {
if ('undefined' === typeof value) value = this.getValue();
// If a field is empty and not required, it is valid
// Except if `data-parsley-validate-if-empty` explicitely added, useful for some custom validators
if (!value.length && !this._isRequired() && 'undefined' === typeof this.options.validateIfEmpty) return false;
return true;
},
_isInGroup: function _isInGroup(group) {
if ($.isArray(this.options.group)) return -1 !== $.inArray(group, this.options.group);
return this.options.group === group;
},
// Just validate field. Do not trigger any event.
// Returns `true` iff all constraints pass, `false` if there are failures,
// or `null` if the result can not be determined yet (depends on a promise)
// See also `whenValid`.
isValid: function isValid(options) {
if (arguments.length >= 1 && !$.isPlainObject(options)) {
ParsleyUtils__default.warnOnce('Calling isValid on a parsley field without passing arguments as an object is deprecated.');
var _arguments3 = _slice.call(arguments);
var force = _arguments3[0];
var value = _arguments3[1];
options = { force: force, value: value };
}
var promise = this.whenValid(options);
if (!promise) // Excluded via `group`
return true;
return parsley_field__statusMapping[promise.state()];
},
// Just validate field. Do not trigger any event.
// @returns a promise that succeeds only when all validations do
// or `undefined` if the field is not in the given `group`.
// The argument `force` will force validation of empty fields.
// If a `value` is given, it will be validated instead of the value of the input.
whenValid: function whenValid() {
var _this10 = this;
var _ref10 = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var _ref10$force = _ref10.force;
var force = _ref10$force === undefined ? false : _ref10$force;
var value = _ref10.value;
var group = _ref10.group;
var _refreshed = _ref10._refreshed;
// Recompute options and rebind constraints to have latest changes
if (!_refreshed) this.refreshConstraints();
// do not validate a field if not the same as given validation group
if (group && !this._isInGroup(group)) return;
this.validationResult = true;
// A field without constraint is valid
if (!this.hasConstraints()) return $.when();
// Value could be passed as argument, needed to add more power to 'field:validate'
if ('undefined' === typeof value || null === value) value = this.getValue();
if (!this.needsValidation(value) && true !== force) return $.when();
var groupedConstraints = this._getGroupedConstraints();
var promises = [];
$.each(groupedConstraints, function (_, constraints) {
// Process one group of constraints at a time, we validate the constraints
// and combine the promises together.
var promise = $.when.apply($, _toConsumableArray($.map(constraints, function (constraint) {
return _this10._validateConstraint(value, constraint);
})));
promises.push(promise);
if (promise.state() === 'rejected') return false; // Interrupt processing if a group has already failed
});
return $.when.apply($, promises);
},
// @returns a promise
_validateConstraint: function _validateConstraint(value, constraint) {
var _this11 = this;
var result = constraint.validate(value, this);
// Map false to a failed promise
if (false === result) result = $.Deferred().reject();
// Make sure we return a promise and that we record failures
return $.when(result).fail(function (errorMessage) {
if (!(_this11.validationResult instanceof Array)) _this11.validationResult = [];
_this11.validationResult.push({
assert: constraint,
errorMessage: 'string' === typeof errorMessage && errorMessage
});
});
},
// @returns Parsley field computed value that could be overrided or configured in DOM
getValue: function getValue() {
var value;
// Value could be overriden in DOM or with explicit options
if ('function' === typeof this.options.value) value = this.options.value(this);else if ('undefined' !== typeof this.options.value) value = this.options.value;else value = this.$element.val();
// Handle wrong DOM or configurations
if ('undefined' === typeof value || null === value) return '';
return this._handleWhitespace(value);
},
// Actualize options that could have change since previous validation
// Re-bind accordingly constraints (could be some new, removed or updated)
refreshConstraints: function refreshConstraints() {
return this.actualizeOptions()._bindConstraints();
},
/**
* Add a new constraint to a field
*
* @param {String} name
* @param {Mixed} requirements optional
* @param {Number} priority optional
* @param {Boolean} isDomConstraint optional
*/
addConstraint: function addConstraint(name, requirements, priority, isDomConstraint) {
if (window.Parsley._validatorRegistry.validators[name]) {
var constraint = new ConstraintFactory(this, name, requirements, priority, isDomConstraint);
// if constraint already exist, delete it and push new version
if ('undefined' !== this.constraintsByName[constraint.name]) this.removeConstraint(constraint.name);
this.constraints.push(constraint);
this.constraintsByName[constraint.name] = constraint;
}
return this;
},
// Remove a constraint
removeConstraint: function removeConstraint(name) {
for (var i = 0; i < this.constraints.length; i++) if (name === this.constraints[i].name) {
this.constraints.splice(i, 1);
break;
}
delete this.constraintsByName[name];
return this;
},
// Update a constraint (Remove + re-add)
updateConstraint: function updateConstraint(name, parameters, priority) {
return this.removeConstraint(name).addConstraint(name, parameters, priority);
},
// # Internals
// Internal only.
// Bind constraints from config + options + DOM
_bindConstraints: function _bindConstraints() {
var constraints = [];
var constraintsByName = {};
// clean all existing DOM constraints to only keep javascript user constraints
for (var i = 0; i < this.constraints.length; i++) if (false === this.constraints[i].isDomConstraint) {
constraints.push(this.constraints[i]);
constraintsByName[this.constraints[i].name] = this.constraints[i];
}
this.constraints = constraints;
this.constraintsByName = constraintsByName;
// then re-add Parsley DOM-API constraints
for (var name in this.options) this.addConstraint(name, this.options[name], undefined, true);
// finally, bind special HTML5 constraints
return this._bindHtml5Constraints();
},
// Internal only.
// Bind specific HTML5 constraints to be HTML5 compliant
_bindHtml5Constraints: function _bindHtml5Constraints() {
// html5 required
if (this.$element.hasClass('required') || this.$element.attr('required')) this.addConstraint('required', true, undefined, true);
// html5 pattern
if ('string' === typeof this.$element.attr('pattern')) this.addConstraint('pattern', this.$element.attr('pattern'), undefined, true);
// range
if ('undefined' !== typeof this.$element.attr('min') && 'undefined' !== typeof this.$element.attr('max')) this.addConstraint('range', [this.$element.attr('min'), this.$element.attr('max')], undefined, true);
// HTML5 min
else if ('undefined' !== typeof this.$element.attr('min')) this.addConstraint('min', this.$element.attr('min'), undefined, true);
// HTML5 max
else if ('undefined' !== typeof this.$element.attr('max')) this.addConstraint('max', this.$element.attr('max'), undefined, true);
// length
if ('undefined' !== typeof this.$element.attr('minlength') && 'undefined' !== typeof this.$element.attr('maxlength')) this.addConstraint('length', [this.$element.attr('minlength'), this.$element.attr('maxlength')], undefined, true);
// HTML5 minlength
else if ('undefined' !== typeof this.$element.attr('minlength')) this.addConstraint('minlength', this.$element.attr('minlength'), undefined, true);
// HTML5 maxlength
else if ('undefined' !== typeof this.$element.attr('maxlength')) this.addConstraint('maxlength', this.$element.attr('maxlength'), undefined, true);
// html5 types
var type = this.$element.attr('type');
if ('undefined' === typeof type) return this;
// Small special case here for HTML5 number: integer validator if step attribute is undefined or an integer value, number otherwise
if ('number' === type) {
return this.addConstraint('type', ['number', {
step: this.$element.attr('step'),
base: this.$element.attr('min') || this.$element.attr('value')
}], undefined, true);
// Regular other HTML5 supported types
} else if (/^(email|url|range)$/i.test(type)) {
return this.addConstraint('type', type, undefined, true);
}
return this;
},
// Internal only.
// Field is required if have required constraint without `false` value
_isRequired: function _isRequired() {
if ('undefined' === typeof this.constraintsByName.required) return false;
return false !== this.constraintsByName.required.requirements;
},
// Internal only.
// Shortcut to trigger an event
_trigger: function _trigger(eventName) {
return this.trigger('field:' + eventName);
},
// Internal only
// Handles whitespace in a value
// Use `data-parsley-whitespace="squish"` to auto squish input value
// Use `data-parsley-whitespace="trim"` to auto trim input value
_handleWhitespace: function _handleWhitespace(value) {
if (true === this.options.trimValue) ParsleyUtils__default.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"');
if ('squish' === this.options.whitespace) value = value.replace(/\s{2,}/g, ' ');
if ('trim' === this.options.whitespace || 'squish' === this.options.whitespace || true === this.options.trimValue) value = ParsleyUtils__default.trimString(value);
return value;
},
// Internal only.
// Returns the constraints, grouped by descending priority.
// The result is thus an array of arrays of constraints.
_getGroupedConstraints: function _getGroupedConstraints() {
if (false === this.options.priorityEnabled) return [this.constraints];
var groupedConstraints = [];
var index = {};
// Create array unique of priorities
for (var i = 0; i < this.constraints.length; i++) {
var p = this.constraints[i].priority;
if (!index[p]) groupedConstraints.push(index[p] = []);
index[p].push(this.constraints[i]);
}
// Sort them by priority DESC
groupedConstraints.sort(function (a, b) {
return b[0].priority - a[0].priority;
});
return groupedConstraints;
}
};
var parsley_field = ParsleyField;
var ParsleyMultiple = function ParsleyMultiple() {
this.__class__ = 'ParsleyFieldMultiple';
};
ParsleyMultiple.prototype = {
// Add new `$element` sibling for multiple field
addElement: function addElement($element) {
this.$elements.push($element);
return this;
},
// See `ParsleyField.refreshConstraints()`
refreshConstraints: function refreshConstraints() {
var fieldConstraints;
this.constraints = [];
// Select multiple special treatment
if (this.$element.is('select')) {
this.actualizeOptions()._bindConstraints();
return this;
}
// Gather all constraints for each input in the multiple group
for (var i = 0; i < this.$elements.length; i++) {
// Check if element have not been dynamically removed since last binding
if (!$('html').has(this.$elements[i]).length) {
this.$elements.splice(i, 1);
continue;
}
fieldConstraints = this.$elements[i].data('ParsleyFieldMultiple').refreshConstraints().constraints;
for (var j = 0; j < fieldConstraints.length; j++) this.addConstraint(fieldConstraints[j].name, fieldConstraints[j].requirements, fieldConstraints[j].priority, fieldConstraints[j].isDomConstraint);
}
return this;
},
// See `ParsleyField.getValue()`
getValue: function getValue() {
// Value could be overriden in DOM
if ('function' === typeof this.options.value) return this.options.value(this);else if ('undefined' !== typeof this.options.value) return this.options.value;
// Radio input case
if (this.$element.is('input[type=radio]')) return this._findRelated().filter(':checked').val() || '';
// checkbox input case
if (this.$element.is('input[type=checkbox]')) {
var values = [];
this._findRelated().filter(':checked').each(function () {
values.push($(this).val());
});
return values;
}
// Select multiple case
if (this.$element.is('select') && null === this.$element.val()) return [];
// Default case that should never happen
return this.$element.val();
},
_init: function _init() {
this.$elements = [this.$element];
return this;
}
};
var ParsleyFactory = function ParsleyFactory(element, options, parsleyFormInstance) {
this.$element = $(element);
// If the element has already been bound, returns its saved Parsley instance
var savedparsleyFormInstance = this.$element.data('Parsley');
if (savedparsleyFormInstance) {
// If the saved instance has been bound without a ParsleyForm parent and there is one given in this call, add it
if ('undefined' !== typeof parsleyFormInstance && savedparsleyFormInstance.parent === window.Parsley) {
savedparsleyFormInstance.parent = parsleyFormInstance;
savedparsleyFormInstance._resetOptions(savedparsleyFormInstance.options);
}
return savedparsleyFormInstance;
}
// Parsley must be instantiated with a DOM element or jQuery $element
if (!this.$element.length) throw new Error('You must bind Parsley on an existing element.');
if ('undefined' !== typeof parsleyFormInstance && 'ParsleyForm' !== parsleyFormInstance.__class__) throw new Error('Parent instance must be a ParsleyForm instance');
this.parent = parsleyFormInstance || window.Parsley;
return this.init(options);
};
ParsleyFactory.prototype = {
init: function init(options) {
this.__class__ = 'Parsley';
this.__version__ = '2.3.9';
this.__id__ = ParsleyUtils__default.generateID();
// Pre-compute options
this._resetOptions(options);
// A ParsleyForm instance is obviously a `<form>` element but also every node that is not an input and has the `data-parsley-validate` attribute
if (this.$element.is('form') || ParsleyUtils__default.checkAttr(this.$element, this.options.namespace, 'validate') && !this.$element.is(this.options.inputs)) return this.bind('parsleyForm');
// Every other element is bound as a `ParsleyField` or `ParsleyFieldMultiple`
return this.isMultiple() ? this.handleMultiple() : this.bind('parsleyField');
},
isMultiple: function isMultiple() {
return this.$element.is('input[type=radio], input[type=checkbox]') || this.$element.is('select') && 'undefined' !== typeof this.$element.attr('multiple');
},
// Multiples fields are a real nightmare :(
// Maybe some refactoring would be appreciated here...
handleMultiple: function handleMultiple() {
var _this12 = this;
var name;
var multiple;
var parsleyMultipleInstance;
// Handle multiple name
if (this.options.multiple) ; // We already have our 'multiple' identifier
else if ('undefined' !== typeof this.$element.attr('name') && this.$element.attr('name').length) this.options.multiple = name = this.$element.attr('name');else if ('undefined' !== typeof this.$element.attr('id') && this.$element.attr('id').length) this.options.multiple = this.$element.attr('id');
// Special select multiple input
if (this.$element.is('select') && 'undefined' !== typeof this.$element.attr('multiple')) {
this.options.multiple = this.options.multiple || this.__id__;
return this.bind('parsleyFieldMultiple');
// Else for radio / checkboxes, we need a `name` or `data-parsley-multiple` to properly bind it
} else if (!this.options.multiple) {
ParsleyUtils__default.warn('To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.', this.$element);
return this;
}
// Remove special chars
this.options.multiple = this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g, '');
// Add proper `data-parsley-multiple` to siblings if we have a valid multiple name
if ('undefined' !== typeof name) {
$('input[name="' + name + '"]').each(function (i, input) {
if ($(input).is('input[type=radio], input[type=checkbox]')) $(input).attr(_this12.options.namespace + 'multiple', _this12.options.multiple);
});
}
// Check here if we don't already have a related multiple instance saved
var $previouslyRelated = this._findRelated();
for (var i = 0; i < $previouslyRelated.length; i++) {
parsleyMultipleInstance = $($previouslyRelated.get(i)).data('Parsley');
if ('undefined' !== typeof parsleyMultipleInstance) {
if (!this.$element.data('ParsleyFieldMultiple')) {
parsleyMultipleInstance.addElement(this.$element);
}
break;
}
}
// Create a secret ParsleyField instance for every multiple field. It will be stored in `data('ParsleyFieldMultiple')`
// And will be useful later to access classic `ParsleyField` stuff while being in a `ParsleyFieldMultiple` instance
this.bind('parsleyField', true);
return parsleyMultipleInstance || this.bind('parsleyFieldMultiple');
},
// Return proper `ParsleyForm`, `ParsleyField` or `ParsleyFieldMultiple`
bind: function bind(type, doNotStore) {
var parsleyInstance;
switch (type) {
case 'parsleyForm':
parsleyInstance = $.extend(new ParsleyForm(this.$element, this.domOptions, this.options), new ParsleyAbstract(), window.ParsleyExtend)._bindFields();
break;
case 'parsleyField':
parsleyInstance = $.extend(new parsley_field(this.$element, this.domOptions, this.options, this.parent), new ParsleyAbstract(), window.ParsleyExtend);
break;
case 'parsleyFieldMultiple':
parsleyInstance = $.extend(new parsley_field(this.$element, this.domOptions, this.options, this.parent), new ParsleyMultiple(), new ParsleyAbstract(), window.ParsleyExtend)._init();
break;
default:
throw new Error(type + 'is not a supported Parsley type');
}
if (this.options.multiple) ParsleyUtils__default.setAttr(this.$element, this.options.namespace, 'multiple', this.options.multiple);
if ('undefined' !== typeof doNotStore) {
this.$element.data('ParsleyFieldMultiple', parsleyInstance);
return parsleyInstance;
}
// Store the freshly bound instance in a DOM element for later access using jQuery `data()`
this.$element.data('Parsley', parsleyInstance);
// Tell the world we have a new ParsleyForm or ParsleyField instance!
parsleyInstance._actualizeTriggers();
parsleyInstance._trigger('init');
return parsleyInstance;
}
};
var vernums = $.fn.jquery.split('.');
if (parseInt(vernums[0]) <= 1 && parseInt(vernums[1]) < 8) {
throw "The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";
}
if (!vernums.forEach) {
ParsleyUtils__default.warn('Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim');
}
// Inherit `on`, `off` & `trigger` to Parsley:
var Parsley = $.extend(new ParsleyAbstract(), {
$element: $(document),
actualizeOptions: null,
_resetOptions: null,
Factory: ParsleyFactory,
version: '2.3.9'
});
// Supplement ParsleyField and Form with ParsleyAbstract
// This way, the constructors will have access to those methods
$.extend(parsley_field.prototype, ParsleyUI.Field, ParsleyAbstract.prototype);
$.extend(ParsleyForm.prototype, ParsleyUI.Form, ParsleyAbstract.prototype);
// Inherit actualizeOptions and _resetOptions:
$.extend(ParsleyFactory.prototype, ParsleyAbstract.prototype);
// ### jQuery API
// `$('.elem').parsley(options)` or `$('.elem').psly(options)`
$.fn.parsley = $.fn.psly = function (options) {
if (this.length > 1) {
var instances = [];
this.each(function () {
instances.push($(this).parsley(options));
});
return instances;
}
// Return undefined if applied to non existing DOM element
if (!$(this).length) {
ParsleyUtils__default.warn('You must bind Parsley on an existing element.');
return;
}
return new ParsleyFactory(this, options);
};
// ### ParsleyField and ParsleyForm extension
// Ensure the extension is now defined if it wasn't previously
if ('undefined' === typeof window.ParsleyExtend) window.ParsleyExtend = {};
// ### Parsley config
// Inherit from ParsleyDefault, and copy over any existing values
Parsley.options = $.extend(ParsleyUtils__default.objectCreate(ParsleyDefaults), window.ParsleyConfig);
window.ParsleyConfig = Parsley.options; // Old way of accessing global options
// ### Globals
window.Parsley = window.psly = Parsley;
window.ParsleyUtils = ParsleyUtils__default;
// ### Define methods that forward to the registry, and deprecate all access except through window.Parsley
var registry = window.Parsley._validatorRegistry = new ParsleyValidatorRegistry(window.ParsleyConfig.validators, window.ParsleyConfig.i18n);
window.ParsleyValidator = {};
$.each('setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator'.split(' '), function (i, method) {
window.Parsley[method] = $.proxy(registry, method);
window.ParsleyValidator[method] = function () {
var _window$Parsley;
ParsleyUtils__default.warnOnce('Accessing the method \'' + method + '\' through ParsleyValidator is deprecated. Simply call \'window.Parsley.' + method + '(...)\'');
return (_window$Parsley = window.Parsley)[method].apply(_window$Parsley, arguments);
};
});
// ### ParsleyUI
// Deprecated global object
window.Parsley.UI = ParsleyUI;
window.ParsleyUI = {
removeError: function removeError(instance, name, doNotUpdateClass) {
var updateClass = true !== doNotUpdateClass;
ParsleyUtils__default.warnOnce('Accessing ParsleyUI is deprecated. Call \'removeError\' on the instance directly. Please comment in issue 1073 as to your need to call this method.');
return instance.removeError(name, { updateClass: updateClass });
},
getErrorsMessages: function getErrorsMessages(instance) {
ParsleyUtils__default.warnOnce('Accessing ParsleyUI is deprecated. Call \'getErrorsMessages\' on the instance directly.');
return instance.getErrorsMessages();
}
};
$.each('addError updateError'.split(' '), function (i, method) {
window.ParsleyUI[method] = function (instance, name, message, assert, doNotUpdateClass) {
var updateClass = true !== doNotUpdateClass;
ParsleyUtils__default.warnOnce('Accessing ParsleyUI is deprecated. Call \'' + method + '\' on the instance directly. Please comment in issue 1073 as to your need to call this method.');
return instance[method](name, { message: message, assert: assert, updateClass: updateClass });
};
});
// ### PARSLEY auto-binding
// Prevent it by setting `ParsleyConfig.autoBind` to `false`
if (false !== window.ParsleyConfig.autoBind) {
$(function () {
// Works only on `data-parsley-validate`.
if ($('[data-parsley-validate]').length) $('[data-parsley-validate]').parsley();
});
}
var o = $({});
var deprecated = function deprecated() {
ParsleyUtils__default.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley");
};
// Returns an event handler that calls `fn` with the arguments it expects
function adapt(fn, context) {
// Store to allow unbinding
if (!fn.parsleyAdaptedCallback) {
fn.parsleyAdaptedCallback = function () {
var args = Array.prototype.slice.call(arguments, 0);
args.unshift(this);
fn.apply(context || o, args);
};
}
return fn.parsleyAdaptedCallback;
}
var eventPrefix = 'parsley:';
// Converts 'parsley:form:validate' into 'form:validate'
function eventName(name) {
if (name.lastIndexOf(eventPrefix, 0) === 0) return name.substr(eventPrefix.length);
return name;
}
// $.listen is deprecated. Use Parsley.on instead.
$.listen = function (name, callback) {
var context;
deprecated();
if ('object' === typeof arguments[1] && 'function' === typeof arguments[2]) {
context = arguments[1];
callback = arguments[2];
}
if ('function' !== typeof callback) throw new Error('Wrong parameters');
window.Parsley.on(eventName(name), adapt(callback, context));
};
$.listenTo = function (instance, name, fn) {
deprecated();
if (!(instance instanceof parsley_field) && !(instance instanceof ParsleyForm)) throw new Error('Must give Parsley instance');
if ('string' !== typeof name || 'function' !== typeof fn) throw new Error('Wrong parameters');
instance.on(eventName(name), adapt(fn));
};
$.unsubscribe = function (name, fn) {
deprecated();
if ('string' !== typeof name || 'function' !== typeof fn) throw new Error('Wrong arguments');
window.Parsley.off(eventName(name), fn.parsleyAdaptedCallback);
};
$.unsubscribeTo = function (instance, name) {
deprecated();
if (!(instance instanceof parsley_field) && !(instance instanceof ParsleyForm)) throw new Error('Must give Parsley instance');
instance.off(eventName(name));
};
$.unsubscribeAll = function (name) {
deprecated();
window.Parsley.off(eventName(name));
$('form,input,textarea,select').each(function () {
var instance = $(this).data('Parsley');
if (instance) {
instance.off(eventName(name));
}
});
};
// $.emit is deprecated. Use jQuery events instead.
$.emit = function (name, instance) {
var _instance;
deprecated();
var instanceGiven = instance instanceof parsley_field || instance instanceof ParsleyForm;
var args = Array.prototype.slice.call(arguments, instanceGiven ? 2 : 1);
args.unshift(eventName(name));
if (!instanceGiven) {
instance = window.Parsley;
}
(_instance = instance).trigger.apply(_instance, _toConsumableArray(args));
};
var pubsub = {};
$.extend(true, Parsley, {
asyncValidators: {
'default': {
fn: function fn(xhr) {
// By default, only status 2xx are deemed successful.
// Note: we use status instead of state() because responses with status 200
// but invalid messages (e.g. an empty body for content type set to JSON) will
// result in state() === 'rejected'.
return xhr.status >= 200 && xhr.status < 300;
},
url: false
},
reverse: {
fn: function fn(xhr) {
// If reverse option is set, a failing ajax request is considered successful
return xhr.status < 200 || xhr.status >= 300;
},
url: false
}
},
addAsyncValidator: function addAsyncValidator(name, fn, url, options) {
Parsley.asyncValidators[name] = {
fn: fn,
url: url || false,
options: options || {}
};
return this;
}
});
Parsley.addValidator('remote', {
requirementType: {
'': 'string',
'validator': 'string',
'reverse': 'boolean',
'options': 'object'
},
validateString: function validateString(value, url, options, instance) {
var data = {};
var ajaxOptions;
var csr;
var validator = options.validator || (true === options.reverse ? 'reverse' : 'default');
if ('undefined' === typeof Parsley.asyncValidators[validator]) throw new Error('Calling an undefined async validator: `' + validator + '`');
url = Parsley.asyncValidators[validator].url || url;
// Fill current value
if (url.indexOf('{value}') > -1) {
url = url.replace('{value}', encodeURIComponent(value));
} else {
data[instance.$element.attr('name') || instance.$element.attr('id')] = value;
}
// Merge options passed in from the function with the ones in the attribute
var remoteOptions = $.extend(true, options.options || {}, Parsley.asyncValidators[validator].options);
// All `$.ajax(options)` could be overridden or extended directly from DOM in `data-parsley-remote-options`
ajaxOptions = $.extend(true, {}, {
url: url,
data: data,
type: 'GET'
}, remoteOptions);
// Generate store key based on ajax options
instance.trigger('field:ajaxoptions', instance, ajaxOptions);
csr = $.param(ajaxOptions);
// Initialise querry cache
if ('undefined' === typeof Parsley._remoteCache) Parsley._remoteCache = {};
// Try to retrieve stored xhr
var xhr = Parsley._remoteCache[csr] = Parsley._remoteCache[csr] || $.ajax(ajaxOptions);
var handleXhr = function handleXhr() {
var result = Parsley.asyncValidators[validator].fn.call(instance, xhr, url, options);
if (!result) // Map falsy results to rejected promise
result = $.Deferred().reject();
return $.when(result);
};
return xhr.then(handleXhr, handleXhr);
},
priority: -1
});
Parsley.on('form:submit', function () {
Parsley._remoteCache = {};
});
window.ParsleyExtend.addAsyncValidator = function () {
ParsleyUtils.warnOnce('Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`');
return Parsley.addAsyncValidator.apply(Parsley, arguments);
};
// This is included with the Parsley library itself,
// thus there is no use in adding it to your project.
Parsley.addMessages('en', {
defaultMessage: "This value seems to be invalid.",
type: {
email: "This value should be a valid email.",
url: "This value should be a valid url.",
number: "This value should be a valid number.",
integer: "This value should be a valid integer.",
digits: "This value should be digits.",
alphanum: "This value should be alphanumeric."
},
notblank: "This value should not be blank.",
required: "This value is required.",
pattern: "This value seems to be invalid.",
min: "This value should be greater than or equal to %s.",
max: "This value should be lower than or equal to %s.",
range: "This value should be between %s and %s.",
minlength: "This value is too short. It should have %s characters or more.",
maxlength: "This value is too long. It should have %s characters or fewer.",
length: "This value length is invalid. It should be between %s and %s characters long.",
mincheck: "You must select at least %s choices.",
maxcheck: "You must select %s choices or fewer.",
check: "You must select between %s and %s choices.",
equalto: "This value should be the same."
});
Parsley.setLocale('en');
/**
* inputevent - Alleviate browser bugs for input events
* https://github.com/marcandre/inputevent
* @version v0.0.1 - (built Tue, Apr 12th 2016, 4:31 pm)
* @author Marc-Andre Lafortune <github@marc-andre.ca>
* @license MIT
*/
function InputEvent() {
var _this13 = this;
var globals = window || global;
// Slightly odd way to have the object constructed have method force bound.
// Used to test duplicate library
$.extend(this, {
inputsToCheck: ['select', 'input[type="checkbox"]', 'input[type="radio"]'],
// For browsers that do not support isTrusted, assumes event is native.
isNativeEvent: function isNativeEvent(evt) {
return evt.originalEvent && evt.originalEvent.isTrusted !== false;
},
fakeInputEvent: function fakeInputEvent(evt) {
if (_this13.isNativeEvent(evt)) {
$(evt.target).trigger('input');
}
},
misbehaves: function misbehaves(evt) {
if (_this13.isNativeEvent(evt)) {
_this13.behavesOk(evt);
$(document).on('change.inputevent', evt.data.selector, _this13.fakeInputEvent);
_this13.fakeInputEvent(evt);
}
},
behavesOk: function behavesOk(evt) {
if (_this13.isNativeEvent(evt)) {
$(document) // Simply unbinds the testing handler
.off('input.inputevent', evt.data.selector, _this13.behavesOk).off('change.inputevent', evt.data.selector, _this13.misbehaves);
}
},
// Bind the testing handlers
install: function install() {
if (globals.inputEventPatched) {
return;
}
globals.inputEventPatched = '0.0.1';
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = _this13.inputsToCheck[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var selector = _step.value;
$(document).on('input.inputevent', selector, { selector: selector }, _this13.behavesOk).on('change.inputevent', selector, { selector: selector }, _this13.misbehaves);
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator['return']) {
_iterator['return']();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
},
uninstall: function uninstall() {
delete globals.inputEventPatched;
$(document).off('.inputevent');
}
});
};
var inputevent = new InputEvent();
inputevent.install();
var parsley = Parsley;
return parsley;
});
//# sourceMappingURL=parsley.js.map
|
client/src/components/App.js
|
shamb0t/orbit
|
'use strict'
import _ from 'lodash'
import React from 'react'
import { render } from 'react-dom'
import { Router, Route, hashHistory } from 'react-router'
import Logger from 'logplease'
import AppActions from 'actions/AppActions'
import UIActions from "actions/UIActions"
import NetworkActions from 'actions/NetworkActions'
import NotificationActions from 'actions/NotificationActions'
import IpfsDaemonActions from 'actions/IpfsDaemonActions'
import ChannelActions from 'actions/ChannelActions'
import SkynetActions from 'actions/SkynetActions'
import OrbitStore from 'stores/OrbitStore'
import IpfsDaemonStore from 'stores/IpfsDaemonStore'
import AppStateStore from 'stores/AppStateStore'
import UserStore from 'stores/UserStore'
import UserActions from 'actions/UserActions'
import NetworkStore from 'stores/NetworkStore'
import ChannelStore from 'stores/ChannelStore'
import MessageStore from 'stores/MessageStore'
import UsersStore from 'stores/UsersStore'
import SettingsStore from 'stores/SettingsStore'
import SwarmStore from 'stores/SwarmStore'
import ChannelsPanel from 'components/ChannelsPanel'
import ChannelView from 'components/ChannelView'
import SettingsView from 'components/SettingsView'
import IpfsSettingsView from 'components/IpfsSettingsView'
import SwarmView from 'components/SwarmView'
import LoginView from 'components/LoginView'
import LoadingView from 'components/LoadingView'
import Header from 'components/Header'
import Themes from 'app/Themes'
import 'normalize.css'
import '../styles/main.css'
import 'styles/App.scss'
import 'styles/Scrollbars.scss'
import 'highlight.js/styles/atom-one-dark.css'
// Agate, Atom One Dark, Github, Monokai, Monokai Sublime, Vs, Xcode
Logger.setLogLevel(window.DEV ? 'DEBUG' : 'ERROR')
const logger = Logger.create('App', { color: Logger.Colors.Red })
const views = {
"Index": "/",
"Settings": "/settings",
"IpfsSettings": "/ipfs-settings",
"Swarm": "/swarm",
"Connect": "/connect",
"Channel": "/channel/",
"Loading": "/loading",
}
const ipcRenderer = window.ipcRenderer
var App = React.createClass({
getInitialState: function() {
return {
panelOpen: false,
leftSidePanel: false,
user: null,
location: null,
joiningToChannel: null,
requirePassword: false,
theme: null,
networkName: "Unknown Network"
}
},
componentDidMount: function() {
if (!this.state.user) {
this._reset()
AppActions.setLocation("Connect")
}
document.title = 'Orbit'
UIActions.joinChannel.listen(this.joinChannel)
NetworkActions.joinedChannel.listen(this.onJoinedChannel)
NetworkActions.joinChannelError.listen(this.onJoinChannelError)
NetworkActions.leaveChannel.listen(this.onLeaveChannel)
AppActions.login.listen(this.onLogin)
this.unsubscribeFromNetworkStore = NetworkStore.listen(this.onNetworkUpdated)
this.unsubscribeFromUserStore = UserStore.listen(this.onUserUpdated)
this.stopListeningAppState = AppStateStore.listen(this._handleAppStateChange)
this.unsubscribeFromSettingsStore = SettingsStore.listen((settings) => {
this.setState({ theme: Themes[settings.theme] || null, leftSidePanel: settings.leftSidePanel })
})
},
_handleAppStateChange: function(state) {
let prefix = '', suffix = ''
if(!AppStateStore.state.hasFocus && AppStateStore.state.unreadMessages[AppStateStore.state.currentChannel] > 0)
suffix = `(${AppStateStore.state.unreadMessages[AppStateStore.state.currentChannel]})`
if(Object.keys(state.unreadMessages).length > 1 || (Object.keys(state.unreadMessages).length === 1 && !Object.keys(state.unreadMessages).includes(AppStateStore.state.currentChannel)))
prefix = '*'
if(Object.keys(state.mentions).length > 0)
prefix = '!'
if(state.currentChannel) {
document.title = prefix + ' ' + AppStateStore.state.location + ' ' + suffix
this.goToLocation(state.currentChannel, views.Channel + encodeURIComponent(state.currentChannel))
} else {
document.title = prefix + ' Orbit'
this.goToLocation(state.location, views[state.location])
}
},
_reset: function() {
if(ipcRenderer) ipcRenderer.send('disconnected')
this.setState(this.getInitialState())
},
onLogin: function(username) {
IpfsDaemonActions.start(username)
OrbitStore.listen((orbit) => {
logger.debug("Connect as " + username)
orbit.connect(username)
})
},
onNetworkUpdated: function(network) {
logger.debug("Network updated")
if (!network) {
this._reset()
AppActions.setLocation("Connect")
} else {
this.setState({ networkName: network.name })
const channels = this._getSavedChannels(this.state.networkName, this.state.user.name)
channels.forEach((channel) => NetworkActions.joinChannel(channel.name, ''))
}
},
_makeChannelsKey: function(username, networkName) {
return "orbit.app." + username + "." + networkName + ".channels"
},
_getSavedChannels: function(networkName, username) {
const channelsKey = this._makeChannelsKey(username, networkName)
return JSON.parse(localStorage.getItem(channelsKey)) || []
},
_saveChannels: function(networkName, username, channels) {
const channelsKey = this._makeChannelsKey(username, networkName)
localStorage.setItem(channelsKey, JSON.stringify(channels))
},
_showConnectView: function() {
this.setState({ user: null })
AppActions.setLocation("Connect")
},
onUserUpdated: function(user) {
logger.debug("User updated", user)
if (!user) {
AppActions.setLocation("Connect")
return
}
if (user === this.state.user)
return
this.setState({ user: user })
if (!this.state.panelOpen) this.openPanel()
AppActions.setLocation(null)
},
joinChannel: function(channelName, password) {
if (channelName === AppStateStore.state.currentChannel) {
this.closePanel()
return
}
logger.debug("Join channel #" + channelName)
NetworkActions.joinChannel(channelName, password)
},
onJoinChannelError: function(channel, err) {
if(!this.state.panelOpen) this.setState({ panelOpen: true })
this.setState({ joiningToChannel: channel, requirePassword: true} )
},
onJoinedChannel: function(channel) {
logger.debug("Joined channel #" + channel)
// this.showChannel(channel)
this.closePanel()
document.title = `#${channel}`
logger.debug("Set title: " + document.title)
AppActions.setCurrentChannel(channel)
let channels = this._getSavedChannels(this.state.networkName, this.state.user.name)
if (!_.some(channels, { name: channel })) {
channels.push({ name: channel })
this._saveChannels(this.state.networkName, this.state.user.name, channels)
}
},
onLeaveChannel: function(channel) {
const { user, networkName } = this.state
const channelsKey = this._makeChannelsKey(user.name, networkName)
const channels = this._getSavedChannels(networkName, user.name).filter((c) => c.name !== channel)
if (channels.length === 0)
localStorage.removeItem(channelsKey)
else
this._saveChannels(this.state.networkName, this.state.user.name, channels)
},
openSettings: function() {
this.closePanel()
AppActions.setLocation("Settings")
},
openSwarmView: function() {
this.closePanel()
AppActions.setLocation("Swarm")
},
closePanel: function() {
this.setState({ panelOpen: false })
UIActions.onPanelClosed()
},
openPanel: function() {
this.setState({ panelOpen: true })
},
disconnect: function() {
logger.debug('app disconnect')
this.closePanel()
AppActions.disconnect()
NetworkActions.disconnect()
// IpfsDaemonActions.stop()
this.setState({ user: null })
AppActions.setLocation("Connect")
},
onDaemonDisconnected: function() {
AppActions.setLocation("Connect")
},
goToLocation: function(name, url) {
hashHistory.push(url ? url : '/')
},
render: function() {
const location = AppStateStore.state.location
const noHeader = ["Connect", "IpfsSettings", "Loading"]
const header = location && noHeader.indexOf(location) < 0 ? (
<Header
onClick={this.openPanel}
title={location}
channels={ChannelStore.channels}
theme={this.state.theme}>
</Header>
) : null
const panel = this.state.panelOpen ? (
<ChannelsPanel
onClose={this.closePanel}
onOpenSwarmView={this.openSwarmView}
onOpenSettings={this.openSettings}
onDisconnect={this.disconnect}
channels={ChannelStore.channels}
currentChannel={location}
username={this.state.user ? this.state.user.name : ""}
requirePassword={this.state.requirePassword}
theme={this.state.theme}
left={this.state.leftSidePanel}
networkName={this.state.networkName}
joiningToChannel={this.state.joiningToChannel}
/>
) : ""
return (
<div className="App view">
{panel}
{header}
{this.props.children}
</div>
)
}
})
/* MAIN */
render(
<Router history={hashHistory}>
<Route path="/" component={App}>
<Route path="channel/:channel" component={ChannelView}/>
<Route path="settings" component={SettingsView}/>
<Route path="ipfs-settings" component={IpfsSettingsView}/>
<Route path="swarm" component={SwarmView}/>
<Route path="connect" component={LoginView}/>
<Route path="loading" component={LoadingView}/>
</Route>
</Router>
, document.getElementById('content')
)
export default ChannelView
|
client/modules/videos/components/preview.js
|
gotrecillo/daw-euskalvideo
|
import React from 'react';
import Dialog from 'material-ui/Dialog';
const Preview = ({video, fullWidth, watching, closeHandler, style}) => {
const { id } = video;
const dialogWidth = (fullWidth) ? '100%' : '50%';
return (
<Dialog
style={style}
contentStyle={{width: dialogWidth}}
open={watching}
onRequestClose={closeHandler}
autoScrollBodyContent
>
<div className="embed-container">
<iframe
id="ytplayer"
type="text/html"
src={`https://www.youtube.com/embed/${id}?autoplay=1`}
frameBorder="0"
/>
</div>
</Dialog>
);
};
export default Preview;
|
src/components/FeedList.js
|
leonardoelias/social-media-profile
|
import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux'
import { findOwner } from '../actions';
import ListItem from './ListItem'
const FeedList = ({ feed: { posts, friends } }) => {
const feedElements = posts.map(function(item, index) {
if (item.user !== '') {
let getUser = findOwner(item.user, friends)
return (
<ListItem picture={ getUser.avatar } user={ getUser.name } text={ item.text } key={"profile-" + index } />
);
}else{
const anonymous = 'https://pbs.twimg.com/profile_images/805766017993605120/nnsBQaVv_200x200.jpg';
return (
<ListItem picture={ anonymous } user="Anonymous" text={ item.text } key={"profile-" + index } />
);
}
});
return (
<div>
<br />
{ feedElements }
</div>
);
}
const mapStateToProps = (state) => {
return {
feed: state.feed
}
}
const mapDispatchToProps = dispatch => bindActionCreators({ findOwner }, dispatch)
export default connect(mapStateToProps, mapDispatchToProps)(FeedList);
|
data-browser-ui/public/app/components/tableComponents/td/relationTdComponent.js
|
CloudBoost/cloudboost
|
import React from 'react';
import ReactDOM from 'react-dom';
import Dialog from 'material-ui/Dialog';
//components
import SelectRelation from './relationComponents/selectRelation.js'
import ViewRelation from './relationComponents/viewRelation.js'
class RelationTd extends React.Component {
constructor(){
super()
this.state = {
isOpenView:false,
isOpenSelect:false
}
}
componentDidMount(){
}
openCloseModal(what,which){
this.state[which] = what
this.setState(this.state)
}
handleClose(){
}
render() {
let requiredClass = this.props.isRequired ? " requiredred":""
return (
<td className={'mdl-data-table__cell--non-numeric pointer'+requiredClass} onDoubleClick={this.openCloseModal.bind(this,true,'isOpenView')}>
<span className="color888 expandleftpspan">{ this.props.elementData ? this.props.elementData.id : '' }</span>
<i className="fa fa-expand fr expandCircle" aria-hidden="true" onClick={this.openCloseModal.bind(this,true,'isOpenView')}></i>
<i className="fa fa-plus fr mr10 expandCircle" aria-hidden="true" onClick={this.openCloseModal.bind(this,true,'isOpenSelect')}></i>
{
this.state.isOpenView ? <ViewRelation
elementData={ this.props.elementData }
table={ this.props.columnType.relatedTo }
open={ this.state.isOpenView }
openCloseModal={ this.openCloseModal.bind(this) }
overlay={ false }
columnName = { this.props.columnName }
/> : ''
}
{
this.state.isOpenSelect ? <SelectRelation
table={ this.props.columnType.relatedTo }
updateObject={ this.props.updateObject }
updateElement={ this.props.updateElement }
open={ this.state.isOpenSelect }
openCloseModal={ this.openCloseModal.bind(this) }
/> : ''
}
</td>
);
}
}
export default RelationTd;
|
app/app.js
|
adrianocola/spyfall
|
import 'babel-polyfill';
import 'react-hot-loader';
import 'bootstrap/dist/css/bootstrap.min.css';
import 'animate.css';
// Import all the third party stuff
import ReactGA from 'react-ga';
import React from 'react';
import ReactDOM from 'react-dom'; // eslint-disable-line import/no-unresolved,import/no-extraneous-dependencies
import FontFaceObserver from 'fontfaceobserver';
// Load the favicon
/* eslint-disable import/no-webpack-loader-syntax */
import '!file-loader?name=[name].[ext]!./favicon.ico';
import '!file-loader?name=[name].[ext]!./favicon-16x16.png';
import '!file-loader?name=[name].[ext]!./favicon-32x32.png';
import '!file-loader?name=[name].[ext]!./favicon-96x96.png';
/* eslint-enable import/no-webpack-loader-syntax */
// Import CSS reset and Global Styles
import 'react-toastify/dist/ReactToastify.css';
import 'styles/theme.scss';
import './services/firebase';
import './i18n';
import env from './env';
import EntryPoint from './EntryPoint';
import history from './browserHistory';
import { store, persistor } from './store';
// Observe loading of Open Sans (to remove open sans, remove the <link> tag in
// the index.html file and this observer)
const openSansObserver = new FontFaceObserver('Open Sans', {});
if (env.GOOGLE_ANALYTICS) {
ReactGA.initialize(env.GOOGLE_ANALYTICS);
ReactGA.pageview(window.location.pathname + window.location.search);
}
// When Open Sans is loaded, add a font-family using Open Sans to the body
openSansObserver.load().then(() => {
document.body.classList.add('fontLoaded');
}, () => {
document.body.classList.remove('fontLoaded');
});
ReactDOM.render(
<EntryPoint store={store} persistor={persistor} history={history} />,
document.getElementById('app')
);
|
test/BadgeSpec.js
|
wjb12/react-bootstrap
|
import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Badge from '../src/Badge';
describe('Badge', () => {
it('Should output a badge with content', () => {
let instance = ReactTestUtils.renderIntoDocument(
<Badge>
<strong>Content</strong>
</Badge>
);
assert.ok(ReactTestUtils.findRenderedDOMComponentWithTag(instance, 'strong'));
});
it('Should have a badge class', () => {
let instance = ReactTestUtils.renderIntoDocument(
<Badge>
Content
</Badge>
);
assert.ok(React.findDOMNode(instance).className.match(/\bbadge\b/));
});
it('Should have a badge using a number', () => {
let count = 42;
let instance = ReactTestUtils.renderIntoDocument(
<Badge>
{count}
</Badge>
);
assert.ok(React.findDOMNode(instance).className.match(/\bbadge\b/));
});
it('Should have a badge using a a mix of content', () => {
let count = 42;
let instance = ReactTestUtils.renderIntoDocument(
<Badge>
£{count}
</Badge>
);
assert.ok(React.findDOMNode(instance).className.match(/\bbadge\b/));
});
it('Should have a badge class pulled right', () => {
let instance = ReactTestUtils.renderIntoDocument(
<Badge pullRight>
Content
</Badge>
);
assert.ok(React.findDOMNode(instance).className.match(/\bpull-right\b/));
});
it('Should not have a badge class when empty', () => {
let instance = ReactTestUtils.renderIntoDocument(
<Badge />
);
assert.notOk(React.findDOMNode(instance).className.match(/\bbadge\b/));
});
});
|
ajax/libs/react-instantsearch/4.4.0/Connectors.js
|
sufuf3/cdnjs
|
/*! ReactInstantSearch 4.4.0 | © Algolia, inc. | https://community.algolia.com/react-instantsearch */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
(factory((global.ReactInstantSearch = global.ReactInstantSearch || {}, global.ReactInstantSearch.Connectors = {}),global.React));
}(this, (function (exports,React) { 'use strict';
var React__default = 'default' in React ? React['default'] : React;
/**
* The base implementation of `_.times` without support for iteratee shorthands
* or max array length checks.
*
* @private
* @param {number} n The number of times to invoke `iteratee`.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the array of results.
*/
function baseTimes(n, iteratee) {
var index = -1,
result = Array(n);
while (++index < n) {
result[index] = iteratee(index);
}
return result;
}
var _baseTimes = baseTimes;
var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
function createCommonjsModule(fn, module) {
return module = { exports: {} }, fn(module, module.exports), module.exports;
}
/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
var _freeGlobal = freeGlobal;
/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
/** Used as a reference to the global object. */
var root = _freeGlobal || freeSelf || Function('return this')();
var _root = root;
/** Built-in value references. */
var Symbol$1 = _root.Symbol;
var _Symbol = Symbol$1;
/** Used for built-in method references. */
var objectProto$2 = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var nativeObjectToString = objectProto$2.toString;
/** Built-in value references. */
var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
/**
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the raw `toStringTag`.
*/
function getRawTag(value) {
var isOwn = hasOwnProperty$2.call(value, symToStringTag$1),
tag = value[symToStringTag$1];
try {
value[symToStringTag$1] = undefined;
var unmasked = true;
} catch (e) {}
var result = nativeObjectToString.call(value);
if (unmasked) {
if (isOwn) {
value[symToStringTag$1] = tag;
} else {
delete value[symToStringTag$1];
}
}
return result;
}
var _getRawTag = getRawTag;
/** Used for built-in method references. */
var objectProto$3 = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var nativeObjectToString$1 = objectProto$3.toString;
/**
* Converts `value` to a string using `Object.prototype.toString`.
*
* @private
* @param {*} value The value to convert.
* @returns {string} Returns the converted string.
*/
function objectToString(value) {
return nativeObjectToString$1.call(value);
}
var _objectToString = objectToString;
/** `Object#toString` result references. */
var nullTag = '[object Null]';
var undefinedTag = '[object Undefined]';
/** Built-in value references. */
var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
/**
* The base implementation of `getTag` without fallbacks for buggy environments.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
function baseGetTag(value) {
if (value == null) {
return value === undefined ? undefinedTag : nullTag;
}
return (symToStringTag && symToStringTag in Object(value))
? _getRawTag(value)
: _objectToString(value);
}
var _baseGetTag = baseGetTag;
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return value != null && typeof value == 'object';
}
var isObjectLike_1 = isObjectLike;
/** `Object#toString` result references. */
var argsTag = '[object Arguments]';
/**
* The base implementation of `_.isArguments`.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
*/
function baseIsArguments(value) {
return isObjectLike_1(value) && _baseGetTag(value) == argsTag;
}
var _baseIsArguments = baseIsArguments;
/** Used for built-in method references. */
var objectProto$1 = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
/** Built-in value references. */
var propertyIsEnumerable = objectProto$1.propertyIsEnumerable;
/**
* Checks if `value` is likely an `arguments` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
* else `false`.
* @example
*
* _.isArguments(function() { return arguments; }());
* // => true
*
* _.isArguments([1, 2, 3]);
* // => false
*/
var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
return isObjectLike_1(value) && hasOwnProperty$1.call(value, 'callee') &&
!propertyIsEnumerable.call(value, 'callee');
};
var isArguments_1 = isArguments;
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(document.body.children);
* // => false
*
* _.isArray('abc');
* // => false
*
* _.isArray(_.noop);
* // => false
*/
var isArray = Array.isArray;
var isArray_1 = isArray;
/**
* This method returns `false`.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {boolean} Returns `false`.
* @example
*
* _.times(2, _.stubFalse);
* // => [false, false]
*/
function stubFalse() {
return false;
}
var stubFalse_1 = stubFalse;
var isBuffer_1 = createCommonjsModule(function (module, exports) {
/** Detect free variable `exports`. */
var freeExports = 'object' == 'object' && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;
/** Built-in value references. */
var Buffer = moduleExports ? _root.Buffer : undefined;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
/**
* Checks if `value` is a buffer.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
* @example
*
* _.isBuffer(new Buffer(2));
* // => true
*
* _.isBuffer(new Uint8Array(2));
* // => false
*/
var isBuffer = nativeIsBuffer || stubFalse_1;
module.exports = isBuffer;
});
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;
/**
* Checks if `value` is a valid array-like index.
*
* @private
* @param {*} value The value to check.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length &&
(typeof value == 'number' || reIsUint.test(value)) &&
(value > -1 && value % 1 == 0 && value < length);
}
var _isIndex = isIndex;
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER$1 = 9007199254740991;
/**
* Checks if `value` is a valid array-like length.
*
* **Note:** This method is loosely based on
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
* @example
*
* _.isLength(3);
* // => true
*
* _.isLength(Number.MIN_VALUE);
* // => false
*
* _.isLength(Infinity);
* // => false
*
* _.isLength('3');
* // => false
*/
function isLength(value) {
return typeof value == 'number' &&
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1;
}
var isLength_1 = isLength;
/** `Object#toString` result references. */
var argsTag$1 = '[object Arguments]';
var arrayTag = '[object Array]';
var boolTag = '[object Boolean]';
var dateTag = '[object Date]';
var errorTag = '[object Error]';
var funcTag = '[object Function]';
var mapTag = '[object Map]';
var numberTag = '[object Number]';
var objectTag = '[object Object]';
var regexpTag = '[object RegExp]';
var setTag = '[object Set]';
var stringTag = '[object String]';
var weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]';
var dataViewTag = '[object DataView]';
var float32Tag = '[object Float32Array]';
var float64Tag = '[object Float64Array]';
var int8Tag = '[object Int8Array]';
var int16Tag = '[object Int16Array]';
var int32Tag = '[object Int32Array]';
var uint8Tag = '[object Uint8Array]';
var uint8ClampedTag = '[object Uint8ClampedArray]';
var uint16Tag = '[object Uint16Array]';
var uint32Tag = '[object Uint32Array]';
/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag] =
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
typedArrayTags[setTag] = typedArrayTags[stringTag] =
typedArrayTags[weakMapTag] = false;
/**
* The base implementation of `_.isTypedArray` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
*/
function baseIsTypedArray(value) {
return isObjectLike_1(value) &&
isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)];
}
var _baseIsTypedArray = baseIsTypedArray;
/**
* The base implementation of `_.unary` without support for storing metadata.
*
* @private
* @param {Function} func The function to cap arguments for.
* @returns {Function} Returns the new capped function.
*/
function baseUnary(func) {
return function(value) {
return func(value);
};
}
var _baseUnary = baseUnary;
var _nodeUtil = createCommonjsModule(function (module, exports) {
/** Detect free variable `exports`. */
var freeExports = 'object' == 'object' && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;
/** Detect free variable `process` from Node.js. */
var freeProcess = moduleExports && _freeGlobal.process;
/** Used to access faster Node.js helpers. */
var nodeUtil = (function() {
try {
return freeProcess && freeProcess.binding && freeProcess.binding('util');
} catch (e) {}
}());
module.exports = nodeUtil;
});
/* Node.js helper references. */
var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;
/**
* Checks if `value` is classified as a typed array.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
* @example
*
* _.isTypedArray(new Uint8Array);
* // => true
*
* _.isTypedArray([]);
* // => false
*/
var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;
var isTypedArray_1 = isTypedArray;
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Creates an array of the enumerable property names of the array-like `value`.
*
* @private
* @param {*} value The value to query.
* @param {boolean} inherited Specify returning inherited property names.
* @returns {Array} Returns the array of property names.
*/
function arrayLikeKeys(value, inherited) {
var isArr = isArray_1(value),
isArg = !isArr && isArguments_1(value),
isBuff = !isArr && !isArg && isBuffer_1(value),
isType = !isArr && !isArg && !isBuff && isTypedArray_1(value),
skipIndexes = isArr || isArg || isBuff || isType,
result = skipIndexes ? _baseTimes(value.length, String) : [],
length = result.length;
for (var key in value) {
if ((inherited || hasOwnProperty.call(value, key)) &&
!(skipIndexes && (
// Safari 9 has enumerable `arguments.length` in strict mode.
key == 'length' ||
// Node.js 0.10 has enumerable non-index properties on buffers.
(isBuff && (key == 'offset' || key == 'parent')) ||
// PhantomJS 2 has enumerable non-index properties on typed arrays.
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
// Skip index properties.
_isIndex(key, length)
))) {
result.push(key);
}
}
return result;
}
var _arrayLikeKeys = arrayLikeKeys;
/** Used for built-in method references. */
var objectProto$5 = Object.prototype;
/**
* Checks if `value` is likely a prototype object.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
*/
function isPrototype(value) {
var Ctor = value && value.constructor,
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$5;
return value === proto;
}
var _isPrototype = isPrototype;
/**
* Creates a unary function that invokes `func` with its argument transformed.
*
* @private
* @param {Function} func The function to wrap.
* @param {Function} transform The argument transform.
* @returns {Function} Returns the new function.
*/
function overArg(func, transform) {
return function(arg) {
return func(transform(arg));
};
}
var _overArg = overArg;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeKeys = _overArg(Object.keys, Object);
var _nativeKeys = nativeKeys;
/** Used for built-in method references. */
var objectProto$4 = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
/**
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function baseKeys(object) {
if (!_isPrototype(object)) {
return _nativeKeys(object);
}
var result = [];
for (var key in Object(object)) {
if (hasOwnProperty$3.call(object, key) && key != 'constructor') {
result.push(key);
}
}
return result;
}
var _baseKeys = baseKeys;
/**
* Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
* @example
*
* _.isObject({});
* // => true
*
* _.isObject([1, 2, 3]);
* // => true
*
* _.isObject(_.noop);
* // => true
*
* _.isObject(null);
* // => false
*/
function isObject(value) {
var type = typeof value;
return value != null && (type == 'object' || type == 'function');
}
var isObject_1 = isObject;
/** `Object#toString` result references. */
var asyncTag = '[object AsyncFunction]';
var funcTag$1 = '[object Function]';
var genTag = '[object GeneratorFunction]';
var proxyTag = '[object Proxy]';
/**
* Checks if `value` is classified as a `Function` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
* // => true
*
* _.isFunction(/abc/);
* // => false
*/
function isFunction(value) {
if (!isObject_1(value)) {
return false;
}
// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 9 which returns 'object' for typed arrays and other constructors.
var tag = _baseGetTag(value);
return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
}
var isFunction_1 = isFunction;
/**
* Checks if `value` is array-like. A value is considered array-like if it's
* not a function and has a `value.length` that's an integer greater than or
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
* @example
*
* _.isArrayLike([1, 2, 3]);
* // => true
*
* _.isArrayLike(document.body.children);
* // => true
*
* _.isArrayLike('abc');
* // => true
*
* _.isArrayLike(_.noop);
* // => false
*/
function isArrayLike(value) {
return value != null && isLength_1(value.length) && !isFunction_1(value);
}
var isArrayLike_1 = isArrayLike;
/**
* Creates an array of the own enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects. See the
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
* for more details.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keys(new Foo);
* // => ['a', 'b'] (iteration order is not guaranteed)
*
* _.keys('hi');
* // => ['0', '1']
*/
function keys(object) {
return isArrayLike_1(object) ? _arrayLikeKeys(object) : _baseKeys(object);
}
var keys_1 = keys;
/** Used to detect overreaching core-js shims. */
var coreJsData = _root['__core-js_shared__'];
var _coreJsData = coreJsData;
/** Used to detect methods masquerading as native. */
var maskSrcKey = (function() {
var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
return uid ? ('Symbol(src)_1.' + uid) : '';
}());
/**
* Checks if `func` has its source masked.
*
* @private
* @param {Function} func The function to check.
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
*/
function isMasked(func) {
return !!maskSrcKey && (maskSrcKey in func);
}
var _isMasked = isMasked;
/** Used for built-in method references. */
var funcProto$1 = Function.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString$1 = funcProto$1.toString;
/**
* Converts `func` to its source code.
*
* @private
* @param {Function} func The function to convert.
* @returns {string} Returns the source code.
*/
function toSource(func) {
if (func != null) {
try {
return funcToString$1.call(func);
} catch (e) {}
try {
return (func + '');
} catch (e) {}
}
return '';
}
var _toSource = toSource;
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
/** Used for built-in method references. */
var funcProto = Function.prototype;
var objectProto$6 = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty$4 = objectProto$6.hasOwnProperty;
/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
funcToString.call(hasOwnProperty$4).replace(reRegExpChar, '\\$&')
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);
/**
* The base implementation of `_.isNative` without bad shim checks.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a native function,
* else `false`.
*/
function baseIsNative(value) {
if (!isObject_1(value) || _isMasked(value)) {
return false;
}
var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
return pattern.test(_toSource(value));
}
var _baseIsNative = baseIsNative;
/**
* Gets the value at `key` of `object`.
*
* @private
* @param {Object} [object] The object to query.
* @param {string} key The key of the property to get.
* @returns {*} Returns the property value.
*/
function getValue(object, key) {
return object == null ? undefined : object[key];
}
var _getValue = getValue;
/**
* Gets the native function at `key` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the method to get.
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
var value = _getValue(object, key);
return _baseIsNative(value) ? value : undefined;
}
var _getNative = getNative;
/* Built-in method references that are verified to be native. */
var nativeCreate = _getNative(Object, 'create');
var _nativeCreate = nativeCreate;
/**
* Removes all key-value entries from the hash.
*
* @private
* @name clear
* @memberOf Hash
*/
function hashClear() {
this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
this.size = 0;
}
var _hashClear = hashClear;
/**
* Removes `key` and its value from the hash.
*
* @private
* @name delete
* @memberOf Hash
* @param {Object} hash The hash to modify.
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function hashDelete(key) {
var result = this.has(key) && delete this.__data__[key];
this.size -= result ? 1 : 0;
return result;
}
var _hashDelete = hashDelete;
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/** Used for built-in method references. */
var objectProto$7 = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
/**
* Gets the hash value for `key`.
*
* @private
* @name get
* @memberOf Hash
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function hashGet(key) {
var data = this.__data__;
if (_nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? undefined : result;
}
return hasOwnProperty$5.call(data, key) ? data[key] : undefined;
}
var _hashGet = hashGet;
/** Used for built-in method references. */
var objectProto$8 = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
/**
* Checks if a hash value for `key` exists.
*
* @private
* @name has
* @memberOf Hash
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function hashHas(key) {
var data = this.__data__;
return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$6.call(data, key);
}
var _hashHas = hashHas;
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
/**
* Sets the hash `key` to `value`.
*
* @private
* @name set
* @memberOf Hash
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the hash instance.
*/
function hashSet(key, value) {
var data = this.__data__;
this.size += this.has(key) ? 0 : 1;
data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value;
return this;
}
var _hashSet = hashSet;
/**
* Creates a hash object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function Hash(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `Hash`.
Hash.prototype.clear = _hashClear;
Hash.prototype['delete'] = _hashDelete;
Hash.prototype.get = _hashGet;
Hash.prototype.has = _hashHas;
Hash.prototype.set = _hashSet;
var _Hash = Hash;
/**
* Removes all key-value entries from the list cache.
*
* @private
* @name clear
* @memberOf ListCache
*/
function listCacheClear() {
this.__data__ = [];
this.size = 0;
}
var _listCacheClear = listCacheClear;
/**
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
* var object = { 'a': 1 };
* var other = { 'a': 1 };
*
* _.eq(object, object);
* // => true
*
* _.eq(object, other);
* // => false
*
* _.eq('a', 'a');
* // => true
*
* _.eq('a', Object('a'));
* // => false
*
* _.eq(NaN, NaN);
* // => true
*/
function eq(value, other) {
return value === other || (value !== value && other !== other);
}
var eq_1 = eq;
/**
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq_1(array[length][0], key)) {
return length;
}
}
return -1;
}
var _assocIndexOf = assocIndexOf;
/** Used for built-in method references. */
var arrayProto = Array.prototype;
/** Built-in value references. */
var splice = arrayProto.splice;
/**
* Removes `key` and its value from the list cache.
*
* @private
* @name delete
* @memberOf ListCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function listCacheDelete(key) {
var data = this.__data__,
index = _assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
--this.size;
return true;
}
var _listCacheDelete = listCacheDelete;
/**
* Gets the list cache value for `key`.
*
* @private
* @name get
* @memberOf ListCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function listCacheGet(key) {
var data = this.__data__,
index = _assocIndexOf(data, key);
return index < 0 ? undefined : data[index][1];
}
var _listCacheGet = listCacheGet;
/**
* Checks if a list cache value for `key` exists.
*
* @private
* @name has
* @memberOf ListCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function listCacheHas(key) {
return _assocIndexOf(this.__data__, key) > -1;
}
var _listCacheHas = listCacheHas;
/**
* Sets the list cache `key` to `value`.
*
* @private
* @name set
* @memberOf ListCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the list cache instance.
*/
function listCacheSet(key, value) {
var data = this.__data__,
index = _assocIndexOf(data, key);
if (index < 0) {
++this.size;
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
var _listCacheSet = listCacheSet;
/**
* Creates an list cache object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function ListCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `ListCache`.
ListCache.prototype.clear = _listCacheClear;
ListCache.prototype['delete'] = _listCacheDelete;
ListCache.prototype.get = _listCacheGet;
ListCache.prototype.has = _listCacheHas;
ListCache.prototype.set = _listCacheSet;
var _ListCache = ListCache;
/* Built-in method references that are verified to be native. */
var Map = _getNative(_root, 'Map');
var _Map = Map;
/**
* Removes all key-value entries from the map.
*
* @private
* @name clear
* @memberOf MapCache
*/
function mapCacheClear() {
this.size = 0;
this.__data__ = {
'hash': new _Hash,
'map': new (_Map || _ListCache),
'string': new _Hash
};
}
var _mapCacheClear = mapCacheClear;
/**
* Checks if `value` is suitable for use as unique object key.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
*/
function isKeyable(value) {
var type = typeof value;
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
? (value !== '__proto__')
: (value === null);
}
var _isKeyable = isKeyable;
/**
* Gets the data for `map`.
*
* @private
* @param {Object} map The map to query.
* @param {string} key The reference key.
* @returns {*} Returns the map data.
*/
function getMapData(map, key) {
var data = map.__data__;
return _isKeyable(key)
? data[typeof key == 'string' ? 'string' : 'hash']
: data.map;
}
var _getMapData = getMapData;
/**
* Removes `key` and its value from the map.
*
* @private
* @name delete
* @memberOf MapCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function mapCacheDelete(key) {
var result = _getMapData(this, key)['delete'](key);
this.size -= result ? 1 : 0;
return result;
}
var _mapCacheDelete = mapCacheDelete;
/**
* Gets the map value for `key`.
*
* @private
* @name get
* @memberOf MapCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function mapCacheGet(key) {
return _getMapData(this, key).get(key);
}
var _mapCacheGet = mapCacheGet;
/**
* Checks if a map value for `key` exists.
*
* @private
* @name has
* @memberOf MapCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function mapCacheHas(key) {
return _getMapData(this, key).has(key);
}
var _mapCacheHas = mapCacheHas;
/**
* Sets the map `key` to `value`.
*
* @private
* @name set
* @memberOf MapCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the map cache instance.
*/
function mapCacheSet(key, value) {
var data = _getMapData(this, key),
size = data.size;
data.set(key, value);
this.size += data.size == size ? 0 : 1;
return this;
}
var _mapCacheSet = mapCacheSet;
/**
* Creates a map cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function MapCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `MapCache`.
MapCache.prototype.clear = _mapCacheClear;
MapCache.prototype['delete'] = _mapCacheDelete;
MapCache.prototype.get = _mapCacheGet;
MapCache.prototype.has = _mapCacheHas;
MapCache.prototype.set = _mapCacheSet;
var _MapCache = MapCache;
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
/**
* Adds `value` to the array cache.
*
* @private
* @name add
* @memberOf SetCache
* @alias push
* @param {*} value The value to cache.
* @returns {Object} Returns the cache instance.
*/
function setCacheAdd(value) {
this.__data__.set(value, HASH_UNDEFINED$2);
return this;
}
var _setCacheAdd = setCacheAdd;
/**
* Checks if `value` is in the array cache.
*
* @private
* @name has
* @memberOf SetCache
* @param {*} value The value to search for.
* @returns {number} Returns `true` if `value` is found, else `false`.
*/
function setCacheHas(value) {
return this.__data__.has(value);
}
var _setCacheHas = setCacheHas;
/**
*
* Creates an array cache object to store unique values.
*
* @private
* @constructor
* @param {Array} [values] The values to cache.
*/
function SetCache(values) {
var index = -1,
length = values == null ? 0 : values.length;
this.__data__ = new _MapCache;
while (++index < length) {
this.add(values[index]);
}
}
// Add methods to `SetCache`.
SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd;
SetCache.prototype.has = _setCacheHas;
var _SetCache = SetCache;
/**
* The base implementation of `_.findIndex` and `_.findLastIndex` without
* support for iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
* @param {Function} predicate The function invoked per iteration.
* @param {number} fromIndex The index to search from.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseFindIndex(array, predicate, fromIndex, fromRight) {
var length = array.length,
index = fromIndex + (fromRight ? 1 : -1);
while ((fromRight ? index-- : ++index < length)) {
if (predicate(array[index], index, array)) {
return index;
}
}
return -1;
}
var _baseFindIndex = baseFindIndex;
/**
* The base implementation of `_.isNaN` without support for number objects.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
*/
function baseIsNaN(value) {
return value !== value;
}
var _baseIsNaN = baseIsNaN;
/**
* A specialized version of `_.indexOf` which performs strict equality
* comparisons of values, i.e. `===`.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function strictIndexOf(array, value, fromIndex) {
var index = fromIndex - 1,
length = array.length;
while (++index < length) {
if (array[index] === value) {
return index;
}
}
return -1;
}
var _strictIndexOf = strictIndexOf;
/**
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseIndexOf(array, value, fromIndex) {
return value === value
? _strictIndexOf(array, value, fromIndex)
: _baseFindIndex(array, _baseIsNaN, fromIndex);
}
var _baseIndexOf = baseIndexOf;
/**
* A specialized version of `_.includes` for arrays without support for
* specifying an index to search from.
*
* @private
* @param {Array} [array] The array to inspect.
* @param {*} target The value to search for.
* @returns {boolean} Returns `true` if `target` is found, else `false`.
*/
function arrayIncludes(array, value) {
var length = array == null ? 0 : array.length;
return !!length && _baseIndexOf(array, value, 0) > -1;
}
var _arrayIncludes = arrayIncludes;
/**
* This function is like `arrayIncludes` except that it accepts a comparator.
*
* @private
* @param {Array} [array] The array to inspect.
* @param {*} target The value to search for.
* @param {Function} comparator The comparator invoked per element.
* @returns {boolean} Returns `true` if `target` is found, else `false`.
*/
function arrayIncludesWith(array, value, comparator) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (comparator(value, array[index])) {
return true;
}
}
return false;
}
var _arrayIncludesWith = arrayIncludesWith;
/**
* A specialized version of `_.map` for arrays without support for iteratee
* shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
*/
function arrayMap(array, iteratee) {
var index = -1,
length = array == null ? 0 : array.length,
result = Array(length);
while (++index < length) {
result[index] = iteratee(array[index], index, array);
}
return result;
}
var _arrayMap = arrayMap;
/**
* Checks if a `cache` value for `key` exists.
*
* @private
* @param {Object} cache The cache to query.
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function cacheHas(cache, key) {
return cache.has(key);
}
var _cacheHas = cacheHas;
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/**
* The base implementation of methods like `_.difference` without support
* for excluding multiple arrays or iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
* @param {Array} values The values to exclude.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of filtered values.
*/
function baseDifference(array, values, iteratee, comparator) {
var index = -1,
includes = _arrayIncludes,
isCommon = true,
length = array.length,
result = [],
valuesLength = values.length;
if (!length) {
return result;
}
if (iteratee) {
values = _arrayMap(values, _baseUnary(iteratee));
}
if (comparator) {
includes = _arrayIncludesWith;
isCommon = false;
}
else if (values.length >= LARGE_ARRAY_SIZE) {
includes = _cacheHas;
isCommon = false;
values = new _SetCache(values);
}
outer:
while (++index < length) {
var value = array[index],
computed = iteratee == null ? value : iteratee(value);
value = (comparator || value !== 0) ? value : 0;
if (isCommon && computed === computed) {
var valuesIndex = valuesLength;
while (valuesIndex--) {
if (values[valuesIndex] === computed) {
continue outer;
}
}
result.push(value);
}
else if (!includes(values, computed, comparator)) {
result.push(value);
}
}
return result;
}
var _baseDifference = baseDifference;
/**
* Appends the elements of `values` to `array`.
*
* @private
* @param {Array} array The array to modify.
* @param {Array} values The values to append.
* @returns {Array} Returns `array`.
*/
function arrayPush(array, values) {
var index = -1,
length = values.length,
offset = array.length;
while (++index < length) {
array[offset + index] = values[index];
}
return array;
}
var _arrayPush = arrayPush;
/** Built-in value references. */
var spreadableSymbol = _Symbol ? _Symbol.isConcatSpreadable : undefined;
/**
* Checks if `value` is a flattenable `arguments` object or array.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
*/
function isFlattenable(value) {
return isArray_1(value) || isArguments_1(value) ||
!!(spreadableSymbol && value && value[spreadableSymbol]);
}
var _isFlattenable = isFlattenable;
/**
* The base implementation of `_.flatten` with support for restricting flattening.
*
* @private
* @param {Array} array The array to flatten.
* @param {number} depth The maximum recursion depth.
* @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
* @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
* @param {Array} [result=[]] The initial result value.
* @returns {Array} Returns the new flattened array.
*/
function baseFlatten(array, depth, predicate, isStrict, result) {
var index = -1,
length = array.length;
predicate || (predicate = _isFlattenable);
result || (result = []);
while (++index < length) {
var value = array[index];
if (depth > 0 && predicate(value)) {
if (depth > 1) {
// Recursively flatten arrays (susceptible to call stack limits).
baseFlatten(value, depth - 1, predicate, isStrict, result);
} else {
_arrayPush(result, value);
}
} else if (!isStrict) {
result[result.length] = value;
}
}
return result;
}
var _baseFlatten = baseFlatten;
/**
* This method returns the first argument it receives.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {*} value Any value.
* @returns {*} Returns `value`.
* @example
*
* var object = { 'a': 1 };
*
* console.log(_.identity(object) === object);
* // => true
*/
function identity(value) {
return value;
}
var identity_1 = identity;
/**
* A faster alternative to `Function#apply`, this function invokes `func`
* with the `this` binding of `thisArg` and the arguments of `args`.
*
* @private
* @param {Function} func The function to invoke.
* @param {*} thisArg The `this` binding of `func`.
* @param {Array} args The arguments to invoke `func` with.
* @returns {*} Returns the result of `func`.
*/
function apply(func, thisArg, args) {
switch (args.length) {
case 0: return func.call(thisArg);
case 1: return func.call(thisArg, args[0]);
case 2: return func.call(thisArg, args[0], args[1]);
case 3: return func.call(thisArg, args[0], args[1], args[2]);
}
return func.apply(thisArg, args);
}
var _apply = apply;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* A specialized version of `baseRest` which transforms the rest array.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
* @param {Function} transform The rest array transform.
* @returns {Function} Returns the new function.
*/
function overRest(func, start, transform) {
start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
return function() {
var args = arguments,
index = -1,
length = nativeMax(args.length - start, 0),
array = Array(length);
while (++index < length) {
array[index] = args[start + index];
}
index = -1;
var otherArgs = Array(start + 1);
while (++index < start) {
otherArgs[index] = args[index];
}
otherArgs[start] = transform(array);
return _apply(func, this, otherArgs);
};
}
var _overRest = overRest;
/**
* Creates a function that returns `value`.
*
* @static
* @memberOf _
* @since 2.4.0
* @category Util
* @param {*} value The value to return from the new function.
* @returns {Function} Returns the new constant function.
* @example
*
* var objects = _.times(2, _.constant({ 'a': 1 }));
*
* console.log(objects);
* // => [{ 'a': 1 }, { 'a': 1 }]
*
* console.log(objects[0] === objects[1]);
* // => true
*/
function constant(value) {
return function() {
return value;
};
}
var constant_1 = constant;
var defineProperty = (function() {
try {
var func = _getNative(Object, 'defineProperty');
func({}, '', {});
return func;
} catch (e) {}
}());
var _defineProperty = defineProperty;
/**
* The base implementation of `setToString` without support for hot loop shorting.
*
* @private
* @param {Function} func The function to modify.
* @param {Function} string The `toString` result.
* @returns {Function} Returns `func`.
*/
var baseSetToString = !_defineProperty ? identity_1 : function(func, string) {
return _defineProperty(func, 'toString', {
'configurable': true,
'enumerable': false,
'value': constant_1(string),
'writable': true
});
};
var _baseSetToString = baseSetToString;
/** Used to detect hot functions by number of calls within a span of milliseconds. */
var HOT_COUNT = 800;
var HOT_SPAN = 16;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeNow = Date.now;
/**
* Creates a function that'll short out and invoke `identity` instead
* of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
* milliseconds.
*
* @private
* @param {Function} func The function to restrict.
* @returns {Function} Returns the new shortable function.
*/
function shortOut(func) {
var count = 0,
lastCalled = 0;
return function() {
var stamp = nativeNow(),
remaining = HOT_SPAN - (stamp - lastCalled);
lastCalled = stamp;
if (remaining > 0) {
if (++count >= HOT_COUNT) {
return arguments[0];
}
} else {
count = 0;
}
return func.apply(undefined, arguments);
};
}
var _shortOut = shortOut;
/**
* Sets the `toString` method of `func` to return `string`.
*
* @private
* @param {Function} func The function to modify.
* @param {Function} string The `toString` result.
* @returns {Function} Returns `func`.
*/
var setToString = _shortOut(_baseSetToString);
var _setToString = setToString;
/**
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
* @returns {Function} Returns the new function.
*/
function baseRest(func, start) {
return _setToString(_overRest(func, start, identity_1), func + '');
}
var _baseRest = baseRest;
/**
* This method is like `_.isArrayLike` except that it also checks if `value`
* is an object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array-like object,
* else `false`.
* @example
*
* _.isArrayLikeObject([1, 2, 3]);
* // => true
*
* _.isArrayLikeObject(document.body.children);
* // => true
*
* _.isArrayLikeObject('abc');
* // => false
*
* _.isArrayLikeObject(_.noop);
* // => false
*/
function isArrayLikeObject(value) {
return isObjectLike_1(value) && isArrayLike_1(value);
}
var isArrayLikeObject_1 = isArrayLikeObject;
/**
* Creates an array of `array` values not included in the other given arrays
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons. The order and references of result values are
* determined by the first array.
*
* **Note:** Unlike `_.pullAll`, this method returns a new array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {...Array} [values] The values to exclude.
* @returns {Array} Returns the new array of filtered values.
* @see _.without, _.xor
* @example
*
* _.difference([2, 1], [2, 3]);
* // => [1]
*/
var difference = _baseRest(function(array, values) {
return isArrayLikeObject_1(array)
? _baseDifference(array, _baseFlatten(values, 1, isArrayLikeObject_1, true))
: [];
});
var difference_1 = difference;
/**
* Removes all key-value entries from the stack.
*
* @private
* @name clear
* @memberOf Stack
*/
function stackClear() {
this.__data__ = new _ListCache;
this.size = 0;
}
var _stackClear = stackClear;
/**
* Removes `key` and its value from the stack.
*
* @private
* @name delete
* @memberOf Stack
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function stackDelete(key) {
var data = this.__data__,
result = data['delete'](key);
this.size = data.size;
return result;
}
var _stackDelete = stackDelete;
/**
* Gets the stack value for `key`.
*
* @private
* @name get
* @memberOf Stack
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function stackGet(key) {
return this.__data__.get(key);
}
var _stackGet = stackGet;
/**
* Checks if a stack value for `key` exists.
*
* @private
* @name has
* @memberOf Stack
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function stackHas(key) {
return this.__data__.has(key);
}
var _stackHas = stackHas;
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE$1 = 200;
/**
* Sets the stack `key` to `value`.
*
* @private
* @name set
* @memberOf Stack
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the stack cache instance.
*/
function stackSet(key, value) {
var data = this.__data__;
if (data instanceof _ListCache) {
var pairs = data.__data__;
if (!_Map || (pairs.length < LARGE_ARRAY_SIZE$1 - 1)) {
pairs.push([key, value]);
this.size = ++data.size;
return this;
}
data = this.__data__ = new _MapCache(pairs);
}
data.set(key, value);
this.size = data.size;
return this;
}
var _stackSet = stackSet;
/**
* Creates a stack cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function Stack(entries) {
var data = this.__data__ = new _ListCache(entries);
this.size = data.size;
}
// Add methods to `Stack`.
Stack.prototype.clear = _stackClear;
Stack.prototype['delete'] = _stackDelete;
Stack.prototype.get = _stackGet;
Stack.prototype.has = _stackHas;
Stack.prototype.set = _stackSet;
var _Stack = Stack;
/**
* A specialized version of `_.forEach` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns `array`.
*/
function arrayEach(array, iteratee) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (iteratee(array[index], index, array) === false) {
break;
}
}
return array;
}
var _arrayEach = arrayEach;
/**
* The base implementation of `assignValue` and `assignMergeValue` without
* value checks.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function baseAssignValue(object, key, value) {
if (key == '__proto__' && _defineProperty) {
_defineProperty(object, key, {
'configurable': true,
'enumerable': true,
'value': value,
'writable': true
});
} else {
object[key] = value;
}
}
var _baseAssignValue = baseAssignValue;
/** Used for built-in method references. */
var objectProto$9 = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
/**
* Assigns `value` to `key` of `object` if the existing value is not equivalent
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function assignValue(object, key, value) {
var objValue = object[key];
if (!(hasOwnProperty$7.call(object, key) && eq_1(objValue, value)) ||
(value === undefined && !(key in object))) {
_baseAssignValue(object, key, value);
}
}
var _assignValue = assignValue;
/**
* Copies properties of `source` to `object`.
*
* @private
* @param {Object} source The object to copy properties from.
* @param {Array} props The property identifiers to copy.
* @param {Object} [object={}] The object to copy properties to.
* @param {Function} [customizer] The function to customize copied values.
* @returns {Object} Returns `object`.
*/
function copyObject(source, props, object, customizer) {
var isNew = !object;
object || (object = {});
var index = -1,
length = props.length;
while (++index < length) {
var key = props[index];
var newValue = customizer
? customizer(object[key], source[key], key, object, source)
: undefined;
if (newValue === undefined) {
newValue = source[key];
}
if (isNew) {
_baseAssignValue(object, key, newValue);
} else {
_assignValue(object, key, newValue);
}
}
return object;
}
var _copyObject = copyObject;
/**
* The base implementation of `_.assign` without support for multiple sources
* or `customizer` functions.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @returns {Object} Returns `object`.
*/
function baseAssign(object, source) {
return object && _copyObject(source, keys_1(source), object);
}
var _baseAssign = baseAssign;
/**
* This function is like
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
* except that it includes inherited enumerable properties.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function nativeKeysIn(object) {
var result = [];
if (object != null) {
for (var key in Object(object)) {
result.push(key);
}
}
return result;
}
var _nativeKeysIn = nativeKeysIn;
/** Used for built-in method references. */
var objectProto$10 = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty$8 = objectProto$10.hasOwnProperty;
/**
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function baseKeysIn(object) {
if (!isObject_1(object)) {
return _nativeKeysIn(object);
}
var isProto = _isPrototype(object),
result = [];
for (var key in object) {
if (!(key == 'constructor' && (isProto || !hasOwnProperty$8.call(object, key)))) {
result.push(key);
}
}
return result;
}
var _baseKeysIn = baseKeysIn;
/**
* Creates an array of the own and inherited enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keysIn(new Foo);
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
*/
function keysIn$1(object) {
return isArrayLike_1(object) ? _arrayLikeKeys(object, true) : _baseKeysIn(object);
}
var keysIn_1 = keysIn$1;
/**
* The base implementation of `_.assignIn` without support for multiple sources
* or `customizer` functions.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @returns {Object} Returns `object`.
*/
function baseAssignIn(object, source) {
return object && _copyObject(source, keysIn_1(source), object);
}
var _baseAssignIn = baseAssignIn;
var _cloneBuffer = createCommonjsModule(function (module, exports) {
/** Detect free variable `exports`. */
var freeExports = 'object' == 'object' && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;
/** Built-in value references. */
var Buffer = moduleExports ? _root.Buffer : undefined,
allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
/**
* Creates a clone of `buffer`.
*
* @private
* @param {Buffer} buffer The buffer to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Buffer} Returns the cloned buffer.
*/
function cloneBuffer(buffer, isDeep) {
if (isDeep) {
return buffer.slice();
}
var length = buffer.length,
result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
buffer.copy(result);
return result;
}
module.exports = cloneBuffer;
});
/**
* Copies the values of `source` to `array`.
*
* @private
* @param {Array} source The array to copy values from.
* @param {Array} [array=[]] The array to copy values to.
* @returns {Array} Returns `array`.
*/
function copyArray(source, array) {
var index = -1,
length = source.length;
array || (array = Array(length));
while (++index < length) {
array[index] = source[index];
}
return array;
}
var _copyArray = copyArray;
/**
* A specialized version of `_.filter` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
*/
function arrayFilter(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length,
resIndex = 0,
result = [];
while (++index < length) {
var value = array[index];
if (predicate(value, index, array)) {
result[resIndex++] = value;
}
}
return result;
}
var _arrayFilter = arrayFilter;
/**
* This method returns a new empty array.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {Array} Returns the new empty array.
* @example
*
* var arrays = _.times(2, _.stubArray);
*
* console.log(arrays);
* // => [[], []]
*
* console.log(arrays[0] === arrays[1]);
* // => false
*/
function stubArray() {
return [];
}
var stubArray_1 = stubArray;
/** Used for built-in method references. */
var objectProto$11 = Object.prototype;
/** Built-in value references. */
var propertyIsEnumerable$1 = objectProto$11.propertyIsEnumerable;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeGetSymbols = Object.getOwnPropertySymbols;
/**
* Creates an array of the own enumerable symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols.
*/
var getSymbols = !nativeGetSymbols ? stubArray_1 : function(object) {
if (object == null) {
return [];
}
object = Object(object);
return _arrayFilter(nativeGetSymbols(object), function(symbol) {
return propertyIsEnumerable$1.call(object, symbol);
});
};
var _getSymbols = getSymbols;
/**
* Copies own symbols of `source` to `object`.
*
* @private
* @param {Object} source The object to copy symbols from.
* @param {Object} [object={}] The object to copy symbols to.
* @returns {Object} Returns `object`.
*/
function copySymbols(source, object) {
return _copyObject(source, _getSymbols(source), object);
}
var _copySymbols = copySymbols;
/** Built-in value references. */
var getPrototype = _overArg(Object.getPrototypeOf, Object);
var _getPrototype = getPrototype;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
/**
* Creates an array of the own and inherited enumerable symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols.
*/
var getSymbolsIn = !nativeGetSymbols$1 ? stubArray_1 : function(object) {
var result = [];
while (object) {
_arrayPush(result, _getSymbols(object));
object = _getPrototype(object);
}
return result;
};
var _getSymbolsIn = getSymbolsIn;
/**
* Copies own and inherited symbols of `source` to `object`.
*
* @private
* @param {Object} source The object to copy symbols from.
* @param {Object} [object={}] The object to copy symbols to.
* @returns {Object} Returns `object`.
*/
function copySymbolsIn(source, object) {
return _copyObject(source, _getSymbolsIn(source), object);
}
var _copySymbolsIn = copySymbolsIn;
/**
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
* symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Function} keysFunc The function to get the keys of `object`.
* @param {Function} symbolsFunc The function to get the symbols of `object`.
* @returns {Array} Returns the array of property names and symbols.
*/
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
var result = keysFunc(object);
return isArray_1(object) ? result : _arrayPush(result, symbolsFunc(object));
}
var _baseGetAllKeys = baseGetAllKeys;
/**
* Creates an array of own enumerable property names and symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names and symbols.
*/
function getAllKeys(object) {
return _baseGetAllKeys(object, keys_1, _getSymbols);
}
var _getAllKeys = getAllKeys;
/**
* Creates an array of own and inherited enumerable property names and
* symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names and symbols.
*/
function getAllKeysIn(object) {
return _baseGetAllKeys(object, keysIn_1, _getSymbolsIn);
}
var _getAllKeysIn = getAllKeysIn;
/* Built-in method references that are verified to be native. */
var DataView = _getNative(_root, 'DataView');
var _DataView = DataView;
/* Built-in method references that are verified to be native. */
var Promise$1 = _getNative(_root, 'Promise');
var _Promise = Promise$1;
/* Built-in method references that are verified to be native. */
var Set = _getNative(_root, 'Set');
var _Set = Set;
/* Built-in method references that are verified to be native. */
var WeakMap = _getNative(_root, 'WeakMap');
var _WeakMap = WeakMap;
/** `Object#toString` result references. */
var mapTag$2 = '[object Map]';
var objectTag$2 = '[object Object]';
var promiseTag = '[object Promise]';
var setTag$2 = '[object Set]';
var weakMapTag$2 = '[object WeakMap]';
var dataViewTag$2 = '[object DataView]';
/** Used to detect maps, sets, and weakmaps. */
var dataViewCtorString = _toSource(_DataView);
var mapCtorString = _toSource(_Map);
var promiseCtorString = _toSource(_Promise);
var setCtorString = _toSource(_Set);
var weakMapCtorString = _toSource(_WeakMap);
/**
* Gets the `toStringTag` of `value`.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
var getTag = _baseGetTag;
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
if ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag$2) ||
(_Map && getTag(new _Map) != mapTag$2) ||
(_Promise && getTag(_Promise.resolve()) != promiseTag) ||
(_Set && getTag(new _Set) != setTag$2) ||
(_WeakMap && getTag(new _WeakMap) != weakMapTag$2)) {
getTag = function(value) {
var result = _baseGetTag(value),
Ctor = result == objectTag$2 ? value.constructor : undefined,
ctorString = Ctor ? _toSource(Ctor) : '';
if (ctorString) {
switch (ctorString) {
case dataViewCtorString: return dataViewTag$2;
case mapCtorString: return mapTag$2;
case promiseCtorString: return promiseTag;
case setCtorString: return setTag$2;
case weakMapCtorString: return weakMapTag$2;
}
}
return result;
};
}
var _getTag = getTag;
/** Used for built-in method references. */
var objectProto$12 = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty$9 = objectProto$12.hasOwnProperty;
/**
* Initializes an array clone.
*
* @private
* @param {Array} array The array to clone.
* @returns {Array} Returns the initialized clone.
*/
function initCloneArray(array) {
var length = array.length,
result = array.constructor(length);
// Add properties assigned by `RegExp#exec`.
if (length && typeof array[0] == 'string' && hasOwnProperty$9.call(array, 'index')) {
result.index = array.index;
result.input = array.input;
}
return result;
}
var _initCloneArray = initCloneArray;
/** Built-in value references. */
var Uint8Array = _root.Uint8Array;
var _Uint8Array = Uint8Array;
/**
* Creates a clone of `arrayBuffer`.
*
* @private
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
* @returns {ArrayBuffer} Returns the cloned array buffer.
*/
function cloneArrayBuffer(arrayBuffer) {
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
new _Uint8Array(result).set(new _Uint8Array(arrayBuffer));
return result;
}
var _cloneArrayBuffer = cloneArrayBuffer;
/**
* Creates a clone of `dataView`.
*
* @private
* @param {Object} dataView The data view to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned data view.
*/
function cloneDataView(dataView, isDeep) {
var buffer = isDeep ? _cloneArrayBuffer(dataView.buffer) : dataView.buffer;
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
}
var _cloneDataView = cloneDataView;
/**
* Adds the key-value `pair` to `map`.
*
* @private
* @param {Object} map The map to modify.
* @param {Array} pair The key-value pair to add.
* @returns {Object} Returns `map`.
*/
function addMapEntry(map, pair) {
// Don't return `map.set` because it's not chainable in IE 11.
map.set(pair[0], pair[1]);
return map;
}
var _addMapEntry = addMapEntry;
/**
* A specialized version of `_.reduce` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {*} [accumulator] The initial value.
* @param {boolean} [initAccum] Specify using the first element of `array` as
* the initial value.
* @returns {*} Returns the accumulated value.
*/
function arrayReduce(array, iteratee, accumulator, initAccum) {
var index = -1,
length = array == null ? 0 : array.length;
if (initAccum && length) {
accumulator = array[++index];
}
while (++index < length) {
accumulator = iteratee(accumulator, array[index], index, array);
}
return accumulator;
}
var _arrayReduce = arrayReduce;
/**
* Converts `map` to its key-value pairs.
*
* @private
* @param {Object} map The map to convert.
* @returns {Array} Returns the key-value pairs.
*/
function mapToArray(map) {
var index = -1,
result = Array(map.size);
map.forEach(function(value, key) {
result[++index] = [key, value];
});
return result;
}
var _mapToArray = mapToArray;
/** Used to compose bitmasks for cloning. */
var CLONE_DEEP_FLAG$2 = 1;
/**
* Creates a clone of `map`.
*
* @private
* @param {Object} map The map to clone.
* @param {Function} cloneFunc The function to clone values.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned map.
*/
function cloneMap(map, isDeep, cloneFunc) {
var array = isDeep ? cloneFunc(_mapToArray(map), CLONE_DEEP_FLAG$2) : _mapToArray(map);
return _arrayReduce(array, _addMapEntry, new map.constructor);
}
var _cloneMap = cloneMap;
/** Used to match `RegExp` flags from their coerced string values. */
var reFlags = /\w*$/;
/**
* Creates a clone of `regexp`.
*
* @private
* @param {Object} regexp The regexp to clone.
* @returns {Object} Returns the cloned regexp.
*/
function cloneRegExp(regexp) {
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
result.lastIndex = regexp.lastIndex;
return result;
}
var _cloneRegExp = cloneRegExp;
/**
* Adds `value` to `set`.
*
* @private
* @param {Object} set The set to modify.
* @param {*} value The value to add.
* @returns {Object} Returns `set`.
*/
function addSetEntry(set, value) {
// Don't return `set.add` because it's not chainable in IE 11.
set.add(value);
return set;
}
var _addSetEntry = addSetEntry;
/**
* Converts `set` to an array of its values.
*
* @private
* @param {Object} set The set to convert.
* @returns {Array} Returns the values.
*/
function setToArray(set) {
var index = -1,
result = Array(set.size);
set.forEach(function(value) {
result[++index] = value;
});
return result;
}
var _setToArray = setToArray;
/** Used to compose bitmasks for cloning. */
var CLONE_DEEP_FLAG$3 = 1;
/**
* Creates a clone of `set`.
*
* @private
* @param {Object} set The set to clone.
* @param {Function} cloneFunc The function to clone values.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned set.
*/
function cloneSet(set, isDeep, cloneFunc) {
var array = isDeep ? cloneFunc(_setToArray(set), CLONE_DEEP_FLAG$3) : _setToArray(set);
return _arrayReduce(array, _addSetEntry, new set.constructor);
}
var _cloneSet = cloneSet;
/** Used to convert symbols to primitives and strings. */
var symbolProto = _Symbol ? _Symbol.prototype : undefined;
var symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
/**
* Creates a clone of the `symbol` object.
*
* @private
* @param {Object} symbol The symbol object to clone.
* @returns {Object} Returns the cloned symbol object.
*/
function cloneSymbol(symbol) {
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
}
var _cloneSymbol = cloneSymbol;
/**
* Creates a clone of `typedArray`.
*
* @private
* @param {Object} typedArray The typed array to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned typed array.
*/
function cloneTypedArray(typedArray, isDeep) {
var buffer = isDeep ? _cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}
var _cloneTypedArray = cloneTypedArray;
/** `Object#toString` result references. */
var boolTag$2 = '[object Boolean]';
var dateTag$2 = '[object Date]';
var mapTag$3 = '[object Map]';
var numberTag$2 = '[object Number]';
var regexpTag$2 = '[object RegExp]';
var setTag$3 = '[object Set]';
var stringTag$2 = '[object String]';
var symbolTag$1 = '[object Symbol]';
var arrayBufferTag$2 = '[object ArrayBuffer]';
var dataViewTag$3 = '[object DataView]';
var float32Tag$2 = '[object Float32Array]';
var float64Tag$2 = '[object Float64Array]';
var int8Tag$2 = '[object Int8Array]';
var int16Tag$2 = '[object Int16Array]';
var int32Tag$2 = '[object Int32Array]';
var uint8Tag$2 = '[object Uint8Array]';
var uint8ClampedTag$2 = '[object Uint8ClampedArray]';
var uint16Tag$2 = '[object Uint16Array]';
var uint32Tag$2 = '[object Uint32Array]';
/**
* Initializes an object clone based on its `toStringTag`.
*
* **Note:** This function only supports cloning values with tags of
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
*
* @private
* @param {Object} object The object to clone.
* @param {string} tag The `toStringTag` of the object to clone.
* @param {Function} cloneFunc The function to clone values.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the initialized clone.
*/
function initCloneByTag(object, tag, cloneFunc, isDeep) {
var Ctor = object.constructor;
switch (tag) {
case arrayBufferTag$2:
return _cloneArrayBuffer(object);
case boolTag$2:
case dateTag$2:
return new Ctor(+object);
case dataViewTag$3:
return _cloneDataView(object, isDeep);
case float32Tag$2: case float64Tag$2:
case int8Tag$2: case int16Tag$2: case int32Tag$2:
case uint8Tag$2: case uint8ClampedTag$2: case uint16Tag$2: case uint32Tag$2:
return _cloneTypedArray(object, isDeep);
case mapTag$3:
return _cloneMap(object, isDeep, cloneFunc);
case numberTag$2:
case stringTag$2:
return new Ctor(object);
case regexpTag$2:
return _cloneRegExp(object);
case setTag$3:
return _cloneSet(object, isDeep, cloneFunc);
case symbolTag$1:
return _cloneSymbol(object);
}
}
var _initCloneByTag = initCloneByTag;
/** Built-in value references. */
var objectCreate = Object.create;
/**
* The base implementation of `_.create` without support for assigning
* properties to the created object.
*
* @private
* @param {Object} proto The object to inherit from.
* @returns {Object} Returns the new object.
*/
var baseCreate = (function() {
function object() {}
return function(proto) {
if (!isObject_1(proto)) {
return {};
}
if (objectCreate) {
return objectCreate(proto);
}
object.prototype = proto;
var result = new object;
object.prototype = undefined;
return result;
};
}());
var _baseCreate = baseCreate;
/**
* Initializes an object clone.
*
* @private
* @param {Object} object The object to clone.
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
return (typeof object.constructor == 'function' && !_isPrototype(object))
? _baseCreate(_getPrototype(object))
: {};
}
var _initCloneObject = initCloneObject;
/** Used to compose bitmasks for cloning. */
var CLONE_DEEP_FLAG$1 = 1;
var CLONE_FLAT_FLAG$1 = 2;
var CLONE_SYMBOLS_FLAG$1 = 4;
/** `Object#toString` result references. */
var argsTag$2 = '[object Arguments]';
var arrayTag$1 = '[object Array]';
var boolTag$1 = '[object Boolean]';
var dateTag$1 = '[object Date]';
var errorTag$1 = '[object Error]';
var funcTag$2 = '[object Function]';
var genTag$1 = '[object GeneratorFunction]';
var mapTag$1 = '[object Map]';
var numberTag$1 = '[object Number]';
var objectTag$1 = '[object Object]';
var regexpTag$1 = '[object RegExp]';
var setTag$1 = '[object Set]';
var stringTag$1 = '[object String]';
var symbolTag = '[object Symbol]';
var weakMapTag$1 = '[object WeakMap]';
var arrayBufferTag$1 = '[object ArrayBuffer]';
var dataViewTag$1 = '[object DataView]';
var float32Tag$1 = '[object Float32Array]';
var float64Tag$1 = '[object Float64Array]';
var int8Tag$1 = '[object Int8Array]';
var int16Tag$1 = '[object Int16Array]';
var int32Tag$1 = '[object Int32Array]';
var uint8Tag$1 = '[object Uint8Array]';
var uint8ClampedTag$1 = '[object Uint8ClampedArray]';
var uint16Tag$1 = '[object Uint16Array]';
var uint32Tag$1 = '[object Uint32Array]';
/** Used to identify `toStringTag` values supported by `_.clone`. */
var cloneableTags = {};
cloneableTags[argsTag$2] = cloneableTags[arrayTag$1] =
cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] =
cloneableTags[boolTag$1] = cloneableTags[dateTag$1] =
cloneableTags[float32Tag$1] = cloneableTags[float64Tag$1] =
cloneableTags[int8Tag$1] = cloneableTags[int16Tag$1] =
cloneableTags[int32Tag$1] = cloneableTags[mapTag$1] =
cloneableTags[numberTag$1] = cloneableTags[objectTag$1] =
cloneableTags[regexpTag$1] = cloneableTags[setTag$1] =
cloneableTags[stringTag$1] = cloneableTags[symbolTag] =
cloneableTags[uint8Tag$1] = cloneableTags[uint8ClampedTag$1] =
cloneableTags[uint16Tag$1] = cloneableTags[uint32Tag$1] = true;
cloneableTags[errorTag$1] = cloneableTags[funcTag$2] =
cloneableTags[weakMapTag$1] = false;
/**
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
* traversed objects.
*
* @private
* @param {*} value The value to clone.
* @param {boolean} bitmask The bitmask flags.
* 1 - Deep clone
* 2 - Flatten inherited properties
* 4 - Clone symbols
* @param {Function} [customizer] The function to customize cloning.
* @param {string} [key] The key of `value`.
* @param {Object} [object] The parent object of `value`.
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
* @returns {*} Returns the cloned value.
*/
function baseClone(value, bitmask, customizer, key, object, stack) {
var result,
isDeep = bitmask & CLONE_DEEP_FLAG$1,
isFlat = bitmask & CLONE_FLAT_FLAG$1,
isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
if (customizer) {
result = object ? customizer(value, key, object, stack) : customizer(value);
}
if (result !== undefined) {
return result;
}
if (!isObject_1(value)) {
return value;
}
var isArr = isArray_1(value);
if (isArr) {
result = _initCloneArray(value);
if (!isDeep) {
return _copyArray(value, result);
}
} else {
var tag = _getTag(value),
isFunc = tag == funcTag$2 || tag == genTag$1;
if (isBuffer_1(value)) {
return _cloneBuffer(value, isDeep);
}
if (tag == objectTag$1 || tag == argsTag$2 || (isFunc && !object)) {
result = (isFlat || isFunc) ? {} : _initCloneObject(value);
if (!isDeep) {
return isFlat
? _copySymbolsIn(value, _baseAssignIn(result, value))
: _copySymbols(value, _baseAssign(result, value));
}
} else {
if (!cloneableTags[tag]) {
return object ? value : {};
}
result = _initCloneByTag(value, tag, baseClone, isDeep);
}
}
// Check for circular references and return its corresponding clone.
stack || (stack = new _Stack);
var stacked = stack.get(value);
if (stacked) {
return stacked;
}
stack.set(value, result);
var keysFunc = isFull
? (isFlat ? _getAllKeysIn : _getAllKeys)
: (isFlat ? keysIn : keys_1);
var props = isArr ? undefined : keysFunc(value);
_arrayEach(props || value, function(subValue, key) {
if (props) {
key = subValue;
subValue = value[key];
}
// Recursively populate clone (susceptible to call stack limits).
_assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
});
return result;
}
var _baseClone = baseClone;
/** `Object#toString` result references. */
var symbolTag$2 = '[object Symbol]';
/**
* Checks if `value` is classified as a `Symbol` primitive or object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
* // => true
*
* _.isSymbol('abc');
* // => false
*/
function isSymbol(value) {
return typeof value == 'symbol' ||
(isObjectLike_1(value) && _baseGetTag(value) == symbolTag$2);
}
var isSymbol_1 = isSymbol;
/** Used to match property names within property paths. */
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
var reIsPlainProp = /^\w*$/;
/**
* Checks if `value` is a property name and not a property path.
*
* @private
* @param {*} value The value to check.
* @param {Object} [object] The object to query keys on.
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
*/
function isKey(value, object) {
if (isArray_1(value)) {
return false;
}
var type = typeof value;
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
value == null || isSymbol_1(value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
(object != null && value in Object(object));
}
var _isKey = isKey;
/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/**
* Creates a function that memoizes the result of `func`. If `resolver` is
* provided, it determines the cache key for storing the result based on the
* arguments provided to the memoized function. By default, the first argument
* provided to the memoized function is used as the map cache key. The `func`
* is invoked with the `this` binding of the memoized function.
*
* **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to have its output memoized.
* @param {Function} [resolver] The function to resolve the cache key.
* @returns {Function} Returns the new memoized function.
* @example
*
* var object = { 'a': 1, 'b': 2 };
* var other = { 'c': 3, 'd': 4 };
*
* var values = _.memoize(_.values);
* values(object);
* // => [1, 2]
*
* values(other);
* // => [3, 4]
*
* object.a = 2;
* values(object);
* // => [1, 2]
*
* // Modify the result cache.
* values.cache.set(object, ['a', 'b']);
* values(object);
* // => ['a', 'b']
*
* // Replace `_.memoize.Cache`.
* _.memoize.Cache = WeakMap;
*/
function memoize(func, resolver) {
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = function() {
var args = arguments,
key = resolver ? resolver.apply(this, args) : args[0],
cache = memoized.cache;
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, args);
memoized.cache = cache.set(key, result) || cache;
return result;
};
memoized.cache = new (memoize.Cache || _MapCache);
return memoized;
}
// Expose `MapCache`.
memoize.Cache = _MapCache;
var memoize_1 = memoize;
/** Used as the maximum memoize cache size. */
var MAX_MEMOIZE_SIZE = 500;
/**
* A specialized version of `_.memoize` which clears the memoized function's
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
*
* @private
* @param {Function} func The function to have its output memoized.
* @returns {Function} Returns the new memoized function.
*/
function memoizeCapped(func) {
var result = memoize_1(func, function(key) {
if (cache.size === MAX_MEMOIZE_SIZE) {
cache.clear();
}
return key;
});
var cache = result.cache;
return result;
}
var _memoizeCapped = memoizeCapped;
/** Used to match property names within property paths. */
var reLeadingDot = /^\./;
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;
/**
* Converts `string` to a property path array.
*
* @private
* @param {string} string The string to convert.
* @returns {Array} Returns the property path array.
*/
var stringToPath = _memoizeCapped(function(string) {
var result = [];
if (reLeadingDot.test(string)) {
result.push('');
}
string.replace(rePropName, function(match, number, quote, string) {
result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
});
return result;
});
var _stringToPath = stringToPath;
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
/** Used to convert symbols to primitives and strings. */
var symbolProto$1 = _Symbol ? _Symbol.prototype : undefined;
var symbolToString = symbolProto$1 ? symbolProto$1.toString : undefined;
/**
* The base implementation of `_.toString` which doesn't convert nullish
* values to empty strings.
*
* @private
* @param {*} value The value to process.
* @returns {string} Returns the string.
*/
function baseToString(value) {
// Exit early for strings to avoid a performance hit in some environments.
if (typeof value == 'string') {
return value;
}
if (isArray_1(value)) {
// Recursively convert values (susceptible to call stack limits).
return _arrayMap(value, baseToString) + '';
}
if (isSymbol_1(value)) {
return symbolToString ? symbolToString.call(value) : '';
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
var _baseToString = baseToString;
/**
* Converts `value` to a string. An empty string is returned for `null`
* and `undefined` values. The sign of `-0` is preserved.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {string} Returns the converted string.
* @example
*
* _.toString(null);
* // => ''
*
* _.toString(-0);
* // => '-0'
*
* _.toString([1, 2, 3]);
* // => '1,2,3'
*/
function toString(value) {
return value == null ? '' : _baseToString(value);
}
var toString_1 = toString;
/**
* Casts `value` to a path array if it's not one.
*
* @private
* @param {*} value The value to inspect.
* @param {Object} [object] The object to query keys on.
* @returns {Array} Returns the cast property path array.
*/
function castPath(value, object) {
if (isArray_1(value)) {
return value;
}
return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
}
var _castPath = castPath;
/**
* Gets the last element of `array`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to query.
* @returns {*} Returns the last element of `array`.
* @example
*
* _.last([1, 2, 3]);
* // => 3
*/
function last(array) {
var length = array == null ? 0 : array.length;
return length ? array[length - 1] : undefined;
}
var last_1 = last;
/** Used as references for various `Number` constants. */
var INFINITY$1 = 1 / 0;
/**
* Converts `value` to a string key if it's not a string or symbol.
*
* @private
* @param {*} value The value to inspect.
* @returns {string|symbol} Returns the key.
*/
function toKey(value) {
if (typeof value == 'string' || isSymbol_1(value)) {
return value;
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
}
var _toKey = toKey;
/**
* The base implementation of `_.get` without support for default values.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to get.
* @returns {*} Returns the resolved value.
*/
function baseGet(object, path) {
path = _castPath(path, object);
var index = 0,
length = path.length;
while (object != null && index < length) {
object = object[_toKey(path[index++])];
}
return (index && index == length) ? object : undefined;
}
var _baseGet = baseGet;
/**
* The base implementation of `_.slice` without an iteratee call guard.
*
* @private
* @param {Array} array The array to slice.
* @param {number} [start=0] The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns the slice of `array`.
*/
function baseSlice(array, start, end) {
var index = -1,
length = array.length;
if (start < 0) {
start = -start > length ? 0 : (length + start);
}
end = end > length ? length : end;
if (end < 0) {
end += length;
}
length = start > end ? 0 : ((end - start) >>> 0);
start >>>= 0;
var result = Array(length);
while (++index < length) {
result[index] = array[index + start];
}
return result;
}
var _baseSlice = baseSlice;
/**
* Gets the parent value at `path` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Array} path The path to get the parent value of.
* @returns {*} Returns the parent value.
*/
function parent(object, path) {
return path.length < 2 ? object : _baseGet(object, _baseSlice(path, 0, -1));
}
var _parent = parent;
/**
* The base implementation of `_.unset`.
*
* @private
* @param {Object} object The object to modify.
* @param {Array|string} path The property path to unset.
* @returns {boolean} Returns `true` if the property is deleted, else `false`.
*/
function baseUnset(object, path) {
path = _castPath(path, object);
object = _parent(object, path);
return object == null || delete object[_toKey(last_1(path))];
}
var _baseUnset = baseUnset;
/** `Object#toString` result references. */
var objectTag$3 = '[object Object]';
/** Used for built-in method references. */
var funcProto$2 = Function.prototype;
var objectProto$13 = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString$2 = funcProto$2.toString;
/** Used to check objects for own properties. */
var hasOwnProperty$10 = objectProto$13.hasOwnProperty;
/** Used to infer the `Object` constructor. */
var objectCtorString = funcToString$2.call(Object);
/**
* Checks if `value` is a plain object, that is, an object created by the
* `Object` constructor or one with a `[[Prototype]]` of `null`.
*
* @static
* @memberOf _
* @since 0.8.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
* @example
*
* function Foo() {
* this.a = 1;
* }
*
* _.isPlainObject(new Foo);
* // => false
*
* _.isPlainObject([1, 2, 3]);
* // => false
*
* _.isPlainObject({ 'x': 0, 'y': 0 });
* // => true
*
* _.isPlainObject(Object.create(null));
* // => true
*/
function isPlainObject(value) {
if (!isObjectLike_1(value) || _baseGetTag(value) != objectTag$3) {
return false;
}
var proto = _getPrototype(value);
if (proto === null) {
return true;
}
var Ctor = hasOwnProperty$10.call(proto, 'constructor') && proto.constructor;
return typeof Ctor == 'function' && Ctor instanceof Ctor &&
funcToString$2.call(Ctor) == objectCtorString;
}
var isPlainObject_1 = isPlainObject;
/**
* Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
* objects.
*
* @private
* @param {*} value The value to inspect.
* @param {string} key The key of the property to inspect.
* @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
*/
function customOmitClone(value) {
return isPlainObject_1(value) ? undefined : value;
}
var _customOmitClone = customOmitClone;
/**
* Flattens `array` a single level deep.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to flatten.
* @returns {Array} Returns the new flattened array.
* @example
*
* _.flatten([1, [2, [3, [4]], 5]]);
* // => [1, 2, [3, [4]], 5]
*/
function flatten(array) {
var length = array == null ? 0 : array.length;
return length ? _baseFlatten(array, 1) : [];
}
var flatten_1 = flatten;
/**
* A specialized version of `baseRest` which flattens the rest array.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @returns {Function} Returns the new function.
*/
function flatRest(func) {
return _setToString(_overRest(func, undefined, flatten_1), func + '');
}
var _flatRest = flatRest;
/** Used to compose bitmasks for cloning. */
var CLONE_DEEP_FLAG = 1;
var CLONE_FLAT_FLAG = 2;
var CLONE_SYMBOLS_FLAG = 4;
/**
* The opposite of `_.pick`; this method creates an object composed of the
* own and inherited enumerable property paths of `object` that are not omitted.
*
* **Note:** This method is considerably slower than `_.pick`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The source object.
* @param {...(string|string[])} [paths] The property paths to omit.
* @returns {Object} Returns the new object.
* @example
*
* var object = { 'a': 1, 'b': '2', 'c': 3 };
*
* _.omit(object, ['a', 'c']);
* // => { 'b': '2' }
*/
var omit = _flatRest(function(object, paths) {
var result = {};
if (object == null) {
return result;
}
var isDeep = false;
paths = _arrayMap(paths, function(path) {
path = _castPath(path, object);
isDeep || (isDeep = path.length > 1);
return path;
});
_copyObject(object, _getAllKeysIn(object), result);
if (isDeep) {
result = _baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, _customOmitClone);
}
var length = paths.length;
while (length--) {
_baseUnset(result, paths[length]);
}
return result;
});
var omit_1 = omit;
var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};
// shim for using process in browser
// based off https://github.com/defunctzombie/node-process/blob/master/browser.js
function defaultSetTimout() {
throw new Error('setTimeout has not been defined');
}
function defaultClearTimeout() {
throw new Error('clearTimeout has not been defined');
}
var cachedSetTimeout = defaultSetTimout;
var cachedClearTimeout = defaultClearTimeout;
if (typeof global$1.setTimeout === 'function') {
cachedSetTimeout = setTimeout;
}
if (typeof global$1.clearTimeout === 'function') {
cachedClearTimeout = clearTimeout;
}
function runTimeout(fun) {
if (cachedSetTimeout === setTimeout) {
//normal enviroments in sane situations
return setTimeout(fun, 0);
}
// if setTimeout wasn't available but was latter defined
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
cachedSetTimeout = setTimeout;
return setTimeout(fun, 0);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedSetTimeout(fun, 0);
} catch (e) {
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedSetTimeout.call(null, fun, 0);
} catch (e) {
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
return cachedSetTimeout.call(this, fun, 0);
}
}
}
function runClearTimeout(marker) {
if (cachedClearTimeout === clearTimeout) {
//normal enviroments in sane situations
return clearTimeout(marker);
}
// if clearTimeout wasn't available but was latter defined
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
cachedClearTimeout = clearTimeout;
return clearTimeout(marker);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedClearTimeout(marker);
} catch (e) {
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedClearTimeout.call(null, marker);
} catch (e) {
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
return cachedClearTimeout.call(this, marker);
}
}
}
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;
function cleanUpNextTick() {
if (!draining || !currentQueue) {
return;
}
draining = false;
if (currentQueue.length) {
queue = currentQueue.concat(queue);
} else {
queueIndex = -1;
}
if (queue.length) {
drainQueue();
}
}
function drainQueue() {
if (draining) {
return;
}
var timeout = runTimeout(cleanUpNextTick);
draining = true;
var len = queue.length;
while (len) {
currentQueue = queue;
queue = [];
while (++queueIndex < len) {
if (currentQueue) {
currentQueue[queueIndex].run();
}
}
queueIndex = -1;
len = queue.length;
}
currentQueue = null;
draining = false;
runClearTimeout(timeout);
}
function nextTick(fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) {
for (var i = 1; i < arguments.length; i++) {
args[i - 1] = arguments[i];
}
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
runTimeout(drainQueue);
}
}
// v8 likes predictible objects
function Item(fun, array) {
this.fun = fun;
this.array = array;
}
Item.prototype.run = function () {
this.fun.apply(null, this.array);
};
var title = 'browser';
var platform = 'browser';
var browser = true;
var env = {};
var argv = [];
var version = ''; // empty string to avoid regexp issues
var versions = {};
var release = {};
var config = {};
function noop() {}
var on = noop;
var addListener = noop;
var once = noop;
var off = noop;
var removeListener = noop;
var removeAllListeners = noop;
var emit = noop;
function binding(name) {
throw new Error('process.binding is not supported');
}
function cwd() {
return '/';
}
function chdir(dir) {
throw new Error('process.chdir is not supported');
}
function umask() {
return 0;
}
// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js
var performance = global$1.performance || {};
var performanceNow = performance.now || performance.mozNow || performance.msNow || performance.oNow || performance.webkitNow || function () {
return new Date().getTime();
};
// generate timestamp or delta
// see http://nodejs.org/api/process.html#process_process_hrtime
function hrtime(previousTimestamp) {
var clocktime = performanceNow.call(performance) * 1e-3;
var seconds = Math.floor(clocktime);
var nanoseconds = Math.floor(clocktime % 1 * 1e9);
if (previousTimestamp) {
seconds = seconds - previousTimestamp[0];
nanoseconds = nanoseconds - previousTimestamp[1];
if (nanoseconds < 0) {
seconds--;
nanoseconds += 1e9;
}
}
return [seconds, nanoseconds];
}
var startTime = new Date();
function uptime() {
var currentTime = new Date();
var dif = currentTime - startTime;
return dif / 1000;
}
var process = {
nextTick: nextTick,
title: title,
browser: browser,
env: env,
argv: argv,
version: version,
versions: versions,
on: on,
addListener: addListener,
once: once,
off: off,
removeListener: removeListener,
removeAllListeners: removeAllListeners,
emit: emit,
binding: binding,
cwd: cwd,
chdir: chdir,
umask: umask,
hrtime: hrtime,
platform: platform,
release: release,
config: config,
uptime: uptime
};
/**
* A specialized version of `_.some` for arrays without support for iteratee
* shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {boolean} Returns `true` if any element passes the predicate check,
* else `false`.
*/
function arraySome(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (predicate(array[index], index, array)) {
return true;
}
}
return false;
}
var _arraySome = arraySome;
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG$1 = 1;
var COMPARE_UNORDERED_FLAG = 2;
/**
* A specialized version of `baseIsEqualDeep` for arrays with support for
* partial deep comparisons.
*
* @private
* @param {Array} array The array to compare.
* @param {Array} other The other array to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `array` and `other` objects.
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
*/
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1,
arrLength = array.length,
othLength = other.length;
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
return false;
}
// Assume cyclic values are equal.
var stacked = stack.get(array);
if (stacked && stack.get(other)) {
return stacked == other;
}
var index = -1,
result = true,
seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache : undefined;
stack.set(array, other);
stack.set(other, array);
// Ignore non-index properties.
while (++index < arrLength) {
var arrValue = array[index],
othValue = other[index];
if (customizer) {
var compared = isPartial
? customizer(othValue, arrValue, index, other, array, stack)
: customizer(arrValue, othValue, index, array, other, stack);
}
if (compared !== undefined) {
if (compared) {
continue;
}
result = false;
break;
}
// Recursively compare arrays (susceptible to call stack limits).
if (seen) {
if (!_arraySome(other, function(othValue, othIndex) {
if (!_cacheHas(seen, othIndex) &&
(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
return seen.push(othIndex);
}
})) {
result = false;
break;
}
} else if (!(
arrValue === othValue ||
equalFunc(arrValue, othValue, bitmask, customizer, stack)
)) {
result = false;
break;
}
}
stack['delete'](array);
stack['delete'](other);
return result;
}
var _equalArrays = equalArrays;
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG$2 = 1;
var COMPARE_UNORDERED_FLAG$1 = 2;
/** `Object#toString` result references. */
var boolTag$3 = '[object Boolean]';
var dateTag$3 = '[object Date]';
var errorTag$2 = '[object Error]';
var mapTag$4 = '[object Map]';
var numberTag$3 = '[object Number]';
var regexpTag$3 = '[object RegExp]';
var setTag$4 = '[object Set]';
var stringTag$3 = '[object String]';
var symbolTag$3 = '[object Symbol]';
var arrayBufferTag$3 = '[object ArrayBuffer]';
var dataViewTag$4 = '[object DataView]';
/** Used to convert symbols to primitives and strings. */
var symbolProto$2 = _Symbol ? _Symbol.prototype : undefined;
var symbolValueOf$1 = symbolProto$2 ? symbolProto$2.valueOf : undefined;
/**
* A specialized version of `baseIsEqualDeep` for comparing objects of
* the same `toStringTag`.
*
* **Note:** This function only supports comparing values with tags of
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {string} tag The `toStringTag` of the objects to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
switch (tag) {
case dataViewTag$4:
if ((object.byteLength != other.byteLength) ||
(object.byteOffset != other.byteOffset)) {
return false;
}
object = object.buffer;
other = other.buffer;
case arrayBufferTag$3:
if ((object.byteLength != other.byteLength) ||
!equalFunc(new _Uint8Array(object), new _Uint8Array(other))) {
return false;
}
return true;
case boolTag$3:
case dateTag$3:
case numberTag$3:
// Coerce booleans to `1` or `0` and dates to milliseconds.
// Invalid dates are coerced to `NaN`.
return eq_1(+object, +other);
case errorTag$2:
return object.name == other.name && object.message == other.message;
case regexpTag$3:
case stringTag$3:
// Coerce regexes to strings and treat strings, primitives and objects,
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
// for more details.
return object == (other + '');
case mapTag$4:
var convert = _mapToArray;
case setTag$4:
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
convert || (convert = _setToArray);
if (object.size != other.size && !isPartial) {
return false;
}
// Assume cyclic values are equal.
var stacked = stack.get(object);
if (stacked) {
return stacked == other;
}
bitmask |= COMPARE_UNORDERED_FLAG$1;
// Recursively compare objects (susceptible to call stack limits).
stack.set(object, other);
var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
stack['delete'](object);
return result;
case symbolTag$3:
if (symbolValueOf$1) {
return symbolValueOf$1.call(object) == symbolValueOf$1.call(other);
}
}
return false;
}
var _equalByTag = equalByTag;
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG$3 = 1;
/** Used for built-in method references. */
var objectProto$15 = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty$12 = objectProto$15.hasOwnProperty;
/**
* A specialized version of `baseIsEqualDeep` for objects with support for
* partial deep comparisons.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3,
objProps = _getAllKeys(object),
objLength = objProps.length,
othProps = _getAllKeys(other),
othLength = othProps.length;
if (objLength != othLength && !isPartial) {
return false;
}
var index = objLength;
while (index--) {
var key = objProps[index];
if (!(isPartial ? key in other : hasOwnProperty$12.call(other, key))) {
return false;
}
}
// Assume cyclic values are equal.
var stacked = stack.get(object);
if (stacked && stack.get(other)) {
return stacked == other;
}
var result = true;
stack.set(object, other);
stack.set(other, object);
var skipCtor = isPartial;
while (++index < objLength) {
key = objProps[index];
var objValue = object[key],
othValue = other[key];
if (customizer) {
var compared = isPartial
? customizer(othValue, objValue, key, other, object, stack)
: customizer(objValue, othValue, key, object, other, stack);
}
// Recursively compare objects (susceptible to call stack limits).
if (!(compared === undefined
? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
: compared
)) {
result = false;
break;
}
skipCtor || (skipCtor = key == 'constructor');
}
if (result && !skipCtor) {
var objCtor = object.constructor,
othCtor = other.constructor;
// Non `Object` object instances with different constructors are not equal.
if (objCtor != othCtor &&
('constructor' in object && 'constructor' in other) &&
!(typeof objCtor == 'function' && objCtor instanceof objCtor &&
typeof othCtor == 'function' && othCtor instanceof othCtor)) {
result = false;
}
}
stack['delete'](object);
stack['delete'](other);
return result;
}
var _equalObjects = equalObjects;
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1;
/** `Object#toString` result references. */
var argsTag$3 = '[object Arguments]';
var arrayTag$2 = '[object Array]';
var objectTag$4 = '[object Object]';
/** Used for built-in method references. */
var objectProto$14 = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty$11 = objectProto$14.hasOwnProperty;
/**
* A specialized version of `baseIsEqual` for arrays and objects which performs
* deep comparisons and tracks traversed objects enabling objects with circular
* references to be compared.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
var objIsArr = isArray_1(object),
othIsArr = isArray_1(other),
objTag = objIsArr ? arrayTag$2 : _getTag(object),
othTag = othIsArr ? arrayTag$2 : _getTag(other);
objTag = objTag == argsTag$3 ? objectTag$4 : objTag;
othTag = othTag == argsTag$3 ? objectTag$4 : othTag;
var objIsObj = objTag == objectTag$4,
othIsObj = othTag == objectTag$4,
isSameTag = objTag == othTag;
if (isSameTag && isBuffer_1(object)) {
if (!isBuffer_1(other)) {
return false;
}
objIsArr = true;
objIsObj = false;
}
if (isSameTag && !objIsObj) {
stack || (stack = new _Stack);
return (objIsArr || isTypedArray_1(object))
? _equalArrays(object, other, bitmask, customizer, equalFunc, stack)
: _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
}
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
var objIsWrapped = objIsObj && hasOwnProperty$11.call(object, '__wrapped__'),
othIsWrapped = othIsObj && hasOwnProperty$11.call(other, '__wrapped__');
if (objIsWrapped || othIsWrapped) {
var objUnwrapped = objIsWrapped ? object.value() : object,
othUnwrapped = othIsWrapped ? other.value() : other;
stack || (stack = new _Stack);
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
}
}
if (!isSameTag) {
return false;
}
stack || (stack = new _Stack);
return _equalObjects(object, other, bitmask, customizer, equalFunc, stack);
}
var _baseIsEqualDeep = baseIsEqualDeep;
/**
* The base implementation of `_.isEqual` which supports partial comparisons
* and tracks traversed objects.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @param {boolean} bitmask The bitmask flags.
* 1 - Unordered comparison
* 2 - Partial comparison
* @param {Function} [customizer] The function to customize comparisons.
* @param {Object} [stack] Tracks traversed `value` and `other` objects.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
*/
function baseIsEqual(value, other, bitmask, customizer, stack) {
if (value === other) {
return true;
}
if (value == null || other == null || (!isObjectLike_1(value) && !isObjectLike_1(other))) {
return value !== value && other !== other;
}
return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
}
var _baseIsEqual = baseIsEqual;
/**
* Performs a deep comparison between two values to determine if they are
* equivalent.
*
* **Note:** This method supports comparing arrays, array buffers, booleans,
* date objects, error objects, maps, numbers, `Object` objects, regexes,
* sets, strings, symbols, and typed arrays. `Object` objects are compared
* by their own, not inherited, enumerable properties. Functions and DOM
* nodes are compared by strict equality, i.e. `===`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
* var object = { 'a': 1 };
* var other = { 'a': 1 };
*
* _.isEqual(object, other);
* // => true
*
* object === other;
* // => false
*/
function isEqual(value, other) {
return _baseIsEqual(value, other);
}
var isEqual_1 = isEqual;
/** Used for built-in method references. */
var objectProto$16 = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty$13 = objectProto$16.hasOwnProperty;
/**
* The base implementation of `_.has` without support for deep paths.
*
* @private
* @param {Object} [object] The object to query.
* @param {Array|string} key The key to check.
* @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
function baseHas(object, key) {
return object != null && hasOwnProperty$13.call(object, key);
}
var _baseHas = baseHas;
/**
* Checks if `path` exists on `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @param {Function} hasFunc The function to check properties.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
*/
function hasPath(object, path, hasFunc) {
path = _castPath(path, object);
var index = -1,
length = path.length,
result = false;
while (++index < length) {
var key = _toKey(path[index]);
if (!(result = object != null && hasFunc(object, key))) {
break;
}
object = object[key];
}
if (result || ++index != length) {
return result;
}
length = object == null ? 0 : object.length;
return !!length && isLength_1(length) && _isIndex(key, length) &&
(isArray_1(object) || isArguments_1(object));
}
var _hasPath = hasPath;
/**
* Checks if `path` is a direct property of `object`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
* @example
*
* var object = { 'a': { 'b': 2 } };
* var other = _.create({ 'a': _.create({ 'b': 2 }) });
*
* _.has(object, 'a');
* // => true
*
* _.has(object, 'a.b');
* // => true
*
* _.has(object, ['a', 'b']);
* // => true
*
* _.has(other, 'a');
* // => false
*/
function has(object, path) {
return object != null && _hasPath(object, path, _baseHas);
}
var has_1 = has;
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/
function makeEmptyFunction(arg) {
return function () {
return arg;
};
}
/**
* This function accepts and discards inputs; it has no side effects. This is
* primarily useful idiomatically for overridable function endpoints which
* always need to be callable, since JS lacks a null-call idiom ala Cocoa.
*/
var emptyFunction = function emptyFunction() {};
emptyFunction.thatReturns = makeEmptyFunction;
emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
emptyFunction.thatReturnsNull = makeEmptyFunction(null);
emptyFunction.thatReturnsThis = function () {
return this;
};
emptyFunction.thatReturnsArgument = function (arg) {
return arg;
};
var emptyFunction_1 = emptyFunction;
function invariant(condition, format, a, b, c, d, e, f) {
if (!condition) {
var error;
if (format === undefined) {
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
} else {
var args = [a, b, c, d, e, f];
var argIndex = 0;
error = new Error(format.replace(/%s/g, function () {
return args[argIndex++];
}));
error.name = 'Invariant Violation';
}
error.framesToPop = 1; // we don't care about invariant's own frame
throw error;
}
}
var invariant_1 = invariant;
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/* eslint-disable no-unused-vars */
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var hasOwnProperty$14 = Object.prototype.hasOwnProperty;
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
function toObject(val) {
if (val === null || val === undefined) {
throw new TypeError('Object.assign cannot be called with null or undefined');
}
return Object(val);
}
function shouldUseNative() {
try {
if (!Object.assign) {
return false;
}
// Detect buggy property enumeration order in older V8 versions.
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
test1[5] = 'de';
if (Object.getOwnPropertyNames(test1)[0] === '5') {
return false;
}
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
var test2 = {};
for (var i = 0; i < 10; i++) {
test2['_' + String.fromCharCode(i)] = i;
}
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
return test2[n];
});
if (order2.join('') !== '0123456789') {
return false;
}
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
var test3 = {};
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
test3[letter] = letter;
});
if (Object.keys(Object.assign({}, test3)).join('') !==
'abcdefghijklmnopqrst') {
return false;
}
return true;
} catch (err) {
// We don't expect any of the above to throw, but better to be safe.
return false;
}
}
var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
var from;
var to = toObject(target);
var symbols;
for (var s = 1; s < arguments.length; s++) {
from = Object(arguments[s]);
for (var key in from) {
if (hasOwnProperty$14.call(from, key)) {
to[key] = from[key];
}
}
if (getOwnPropertySymbols) {
symbols = getOwnPropertySymbols(from);
for (var i = 0; i < symbols.length; i++) {
if (propIsEnumerable.call(from, symbols[i])) {
to[symbols[i]] = from[symbols[i]];
}
}
}
}
return to;
};
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
var ReactPropTypesSecret_1 = ReactPropTypesSecret;
var factoryWithThrowingShims = function() {
function shim(props, propName, componentName, location, propFullName, secret) {
if (secret === ReactPropTypesSecret_1) {
// It is still safe when called from React.
return;
}
invariant_1(
false,
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
'Use PropTypes.checkPropTypes() to call them. ' +
'Read more at http://fb.me/use-check-prop-types'
);
}
shim.isRequired = shim;
function getShim() {
return shim;
}
// Important!
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
var ReactPropTypes = {
array: shim,
bool: shim,
func: shim,
number: shim,
object: shim,
string: shim,
symbol: shim,
any: shim,
arrayOf: getShim,
element: shim,
instanceOf: getShim,
node: shim,
objectOf: getShim,
oneOf: getShim,
oneOfType: getShim,
shape: getShim,
exact: getShim
};
ReactPropTypes.checkPropTypes = emptyFunction_1;
ReactPropTypes.PropTypes = ReactPropTypes;
return ReactPropTypes;
};
var propTypes = createCommonjsModule(function (module) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
{
// By explicitly using `prop-types` you are opting into new production behavior.
// http://fb.me/prop-types-in-prod
module.exports = factoryWithThrowingShims();
}
});
/** `Object#toString` result references. */
var mapTag$5 = '[object Map]';
var setTag$5 = '[object Set]';
/** Used for built-in method references. */
var objectProto$17 = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty$15 = objectProto$17.hasOwnProperty;
/**
* Checks if `value` is an empty object, collection, map, or set.
*
* Objects are considered empty if they have no own enumerable string keyed
* properties.
*
* Array-like values such as `arguments` objects, arrays, buffers, strings, or
* jQuery-like collections are considered empty if they have a `length` of `0`.
* Similarly, maps and sets are considered empty if they have a `size` of `0`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is empty, else `false`.
* @example
*
* _.isEmpty(null);
* // => true
*
* _.isEmpty(true);
* // => true
*
* _.isEmpty(1);
* // => true
*
* _.isEmpty([1, 2, 3]);
* // => false
*
* _.isEmpty({ 'a': 1 });
* // => false
*/
function isEmpty(value) {
if (value == null) {
return true;
}
if (isArrayLike_1(value) &&
(isArray_1(value) || typeof value == 'string' || typeof value.splice == 'function' ||
isBuffer_1(value) || isTypedArray_1(value) || isArguments_1(value))) {
return !value.length;
}
var tag = _getTag(value);
if (tag == mapTag$5 || tag == setTag$5) {
return !value.size;
}
if (_isPrototype(value)) {
return !_baseKeys(value).length;
}
for (var key in value) {
if (hasOwnProperty$15.call(value, key)) {
return false;
}
}
return true;
}
var isEmpty_1 = isEmpty;
// From https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js
function shallowEqual(objA, objB) {
if (objA === objB) {
return true;
}
var keysA = Object.keys(objA);
var keysB = Object.keys(objB);
if (keysA.length !== keysB.length) {
return false;
}
// Test for A's keys different from B.
var hasOwn = Object.prototype.hasOwnProperty;
for (var i = 0; i < keysA.length; i++) {
if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) {
return false;
}
}
return true;
}
function getDisplayName(Component$$1) {
return Component$$1.displayName || Component$$1.name || 'UnknownComponent';
}
function removeEmptyKey(obj) {
Object.keys(obj).forEach(function (key) {
var value = obj[key];
if (isEmpty_1(value) && isPlainObject_1(value)) {
delete obj[key];
} else if (isPlainObject_1(value)) {
removeEmptyKey(value);
}
});
return obj;
}
var classCallCheck = function (instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
};
var createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}();
var defineProperty$2 = function (obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
};
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
var inherits = function (subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
};
var possibleConstructorReturn = function (self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
};
var slicedToArray = function () {
function sliceIterator(arr, i) {
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"]) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
return function (arr, i) {
if (Array.isArray(arr)) {
return arr;
} else if (Symbol.iterator in Object(arr)) {
return sliceIterator(arr, i);
} else {
throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
};
}();
var toConsumableArray = function (arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
return arr2;
} else {
return Array.from(arr);
}
};
/**
* @typedef {object} ConnectorDescription
* @property {string} displayName - the displayName used by the wrapper
* @property {function} refine - a function to filter the local state
* @property {function} getSearchParameters - function transforming the local state to a SearchParameters
* @property {function} getMetadata - metadata of the widget
* @property {function} transitionState - hook after the state has changed
* @property {function} getProvidedProps - transform the state into props passed to the wrapped component.
* Receives (props, widgetStates, searchState, metadata) and returns the local state.
* @property {function} getId - Receives props and return the id that will be used to identify the widget
* @property {function} cleanUp - hook when the widget will unmount. Receives (props, searchState) and return a cleaned state.
* @property {object} propTypes - PropTypes forwarded to the wrapped component.
* @property {object} defaultProps - default values for the props
*/
/**
* Connectors are the HOC used to transform React components
* into InstantSearch widgets.
* In order to simplify the construction of such connectors
* `createConnector` takes a description and transform it into
* a connector.
* @param {ConnectorDescription} connectorDesc the description of the connector
* @return {Connector} a function that wraps a component into
* an instantsearch connected one.
*/
function createConnector(connectorDesc) {
if (!connectorDesc.displayName) {
throw new Error('`createConnector` requires you to provide a `displayName` property.');
}
var hasRefine = has_1(connectorDesc, 'refine');
var hasSearchForFacetValues = has_1(connectorDesc, 'searchForFacetValues');
var hasSearchParameters = has_1(connectorDesc, 'getSearchParameters');
var hasMetadata = has_1(connectorDesc, 'getMetadata');
var hasTransitionState = has_1(connectorDesc, 'transitionState');
var hasCleanUp = has_1(connectorDesc, 'cleanUp');
var isWidget = hasSearchParameters || hasMetadata || hasTransitionState;
return function (Composed) {
var _class, _temp, _initialiseProps;
return _temp = _class = function (_Component) {
inherits(Connector, _Component);
function Connector(props, context) {
classCallCheck(this, Connector);
var _this = possibleConstructorReturn(this, (Connector.__proto__ || Object.getPrototypeOf(Connector)).call(this, props, context));
_initialiseProps.call(_this);
var _context$ais = context.ais,
store = _context$ais.store,
widgetsManager = _context$ais.widgetsManager;
var canRender = false;
_this.state = {
props: _this.getProvidedProps(_extends({}, props, { canRender: canRender })),
canRender: canRender // use to know if a component is rendered (browser), or not (server).
};
_this.unsubscribe = store.subscribe(function () {
if (_this.state.canRender) {
_this.setState({
props: _this.getProvidedProps(_extends({}, _this.props, {
canRender: _this.state.canRender
}))
});
}
});
if (isWidget) {
_this.unregisterWidget = widgetsManager.registerWidget(_this);
}
return _this;
}
createClass(Connector, [{
key: 'getMetadata',
value: function getMetadata(nextWidgetsState) {
if (hasMetadata) {
return connectorDesc.getMetadata.call(this, this.props, nextWidgetsState);
}
return {};
}
}, {
key: 'getSearchParameters',
value: function getSearchParameters(searchParameters) {
if (hasSearchParameters) {
return connectorDesc.getSearchParameters.call(this, searchParameters, this.props, this.context.ais.store.getState().widgets);
}
return null;
}
}, {
key: 'transitionState',
value: function transitionState(prevWidgetsState, nextWidgetsState) {
if (hasTransitionState) {
return connectorDesc.transitionState.call(this, this.props, prevWidgetsState, nextWidgetsState);
}
return nextWidgetsState;
}
}, {
key: 'componentDidMount',
value: function componentDidMount() {
this.setState({
canRender: true
});
}
}, {
key: 'componentWillMount',
value: function componentWillMount() {
if (connectorDesc.getSearchParameters) {
this.context.ais.onSearchParameters(connectorDesc.getSearchParameters, this.context, this.props);
}
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (!isEqual_1(this.props, nextProps)) {
this.setState({
props: this.getProvidedProps(nextProps)
});
if (isWidget) {
// Since props might have changed, we need to re-run getSearchParameters
// and getMetadata with the new props.
this.context.ais.widgetsManager.update();
if (connectorDesc.transitionState) {
this.context.ais.onSearchStateChange(connectorDesc.transitionState.call(this, nextProps, this.context.ais.store.getState().widgets, this.context.ais.store.getState().widgets));
}
}
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.unsubscribe();
if (isWidget) {
this.unregisterWidget(); // will schedule an update
if (hasCleanUp) {
var newState = connectorDesc.cleanUp.call(this, this.props, this.context.ais.store.getState().widgets);
this.context.ais.store.setState(_extends({}, this.context.ais.store.getState(), {
widgets: newState
}));
this.context.ais.onSearchStateChange(removeEmptyKey(newState));
}
}
}
}, {
key: 'shouldComponentUpdate',
value: function shouldComponentUpdate(nextProps, nextState) {
var propsEqual = shallowEqual(this.props, nextProps);
if (this.state.props === null || nextState.props === null) {
if (this.state.props === nextState.props) {
return !propsEqual;
}
return true;
}
return !propsEqual || !shallowEqual(this.state.props, nextState.props);
}
}, {
key: 'render',
value: function render() {
var _this2 = this;
if (this.state.props === null) {
return null;
}
var refineProps = hasRefine ? { refine: this.refine, createURL: this.createURL } : {};
var searchForFacetValuesProps = hasSearchForFacetValues ? {
searchForItems: this.searchForFacetValues,
searchForFacetValues: function searchForFacetValues(facetName, query) {
_this2.searchForFacetValues(facetName, query);
}
} : {};
return React__default.createElement(Composed, _extends({}, this.props, this.state.props, refineProps, searchForFacetValuesProps));
}
}]);
return Connector;
}(React.Component), _class.displayName = connectorDesc.displayName + '(' + getDisplayName(Composed) + ')', _class.defaultClassNames = Composed.defaultClassNames, _class.propTypes = connectorDesc.propTypes, _class.defaultProps = connectorDesc.defaultProps, _class.contextTypes = {
// @TODO: more precise state manager propType
ais: propTypes.object.isRequired,
multiIndexContext: propTypes.object
}, _initialiseProps = function _initialiseProps() {
var _this3 = this;
this.getProvidedProps = function (props) {
var store = _this3.context.ais.store;
var _store$getState = store.getState(),
results = _store$getState.results,
searching = _store$getState.searching,
error = _store$getState.error,
widgets = _store$getState.widgets,
metadata = _store$getState.metadata,
resultsFacetValues = _store$getState.resultsFacetValues,
searchingForFacetValues = _store$getState.searchingForFacetValues,
isSearchStalled = _store$getState.isSearchStalled;
var searchResults = {
results: results,
searching: searching,
error: error,
searchingForFacetValues: searchingForFacetValues,
isSearchStalled: isSearchStalled
};
return connectorDesc.getProvidedProps.call(_this3, props, widgets, searchResults, metadata, resultsFacetValues);
};
this.refine = function () {
var _connectorDesc$refine;
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this3.context.ais.onInternalStateUpdate((_connectorDesc$refine = connectorDesc.refine).call.apply(_connectorDesc$refine, [_this3, _this3.props, _this3.context.ais.store.getState().widgets].concat(args)));
};
this.searchForFacetValues = function () {
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
_this3.context.ais.onSearchForFacetValues(connectorDesc.searchForFacetValues.apply(connectorDesc, [_this3.props, _this3.context.ais.store.getState().widgets].concat(args)));
};
this.createURL = function () {
var _connectorDesc$refine2;
for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
args[_key3] = arguments[_key3];
}
return _this3.context.ais.createHrefForState((_connectorDesc$refine2 = connectorDesc.refine).call.apply(_connectorDesc$refine2, [_this3, _this3.props, _this3.context.ais.store.getState().widgets].concat(args)));
};
this.cleanUp = function () {
var _connectorDesc$cleanU;
for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
args[_key4] = arguments[_key4];
}
return (_connectorDesc$cleanU = connectorDesc.cleanUp).call.apply(_connectorDesc$cleanU, [_this3].concat(args));
};
}, _temp;
};
}
/**
* Gets the value at `path` of `object`. If the resolved value is
* `undefined`, the `defaultValue` is returned in its place.
*
* @static
* @memberOf _
* @since 3.7.0
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to get.
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
* @returns {*} Returns the resolved value.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
*
* _.get(object, 'a[0].b.c');
* // => 3
*
* _.get(object, ['a', '0', 'b', 'c']);
* // => 3
*
* _.get(object, 'a.b.c', 'default');
* // => 'default'
*/
function get$1(object, path, defaultValue) {
var result = object == null ? undefined : _baseGet(object, path);
return result === undefined ? defaultValue : result;
}
var get_1 = get$1;
function getIndex(context) {
return context && context.multiIndexContext ? context.multiIndexContext.targetedIndex : context.ais.mainTargetedIndex;
}
function getResults(searchResults, context) {
if (searchResults.results && !searchResults.results.hits) {
return searchResults.results[getIndex(context)] ? searchResults.results[getIndex(context)] : null;
} else {
return searchResults.results ? searchResults.results : null;
}
}
function hasMultipleIndex(context) {
return context && context.multiIndexContext;
}
// eslint-disable-next-line max-params
function refineValue(searchState, nextRefinement, context, resetPage, namespace) {
if (hasMultipleIndex(context)) {
return namespace ? refineMultiIndexWithNamespace(searchState, nextRefinement, context, resetPage, namespace) : refineMultiIndex(searchState, nextRefinement, context, resetPage);
} else {
// When we have a multi index page with shared widgets we should also
// reset their page to 1 if the resetPage is provided. Otherwise the
// indices will always be reset
// see: https://github.com/algolia/react-instantsearch/issues/310
// see: https://github.com/algolia/react-instantsearch/issues/637
if (searchState.indices && resetPage) {
Object.keys(searchState.indices).forEach(function (targetedIndex) {
searchState = refineValue(searchState, { page: 1 }, { multiIndexContext: { targetedIndex: targetedIndex } }, true, namespace);
});
}
return namespace ? refineSingleIndexWithNamespace(searchState, nextRefinement, resetPage, namespace) : refineSingleIndex(searchState, nextRefinement, resetPage);
}
}
function refineMultiIndex(searchState, nextRefinement, context, resetPage) {
var page = resetPage ? { page: 1 } : undefined;
var index = getIndex(context);
var state = has_1(searchState, 'indices.' + index) ? _extends({}, searchState.indices, defineProperty$2({}, index, _extends({}, searchState.indices[index], nextRefinement, page))) : _extends({}, searchState.indices, defineProperty$2({}, index, _extends({}, nextRefinement, page)));
return _extends({}, searchState, { indices: state });
}
function refineSingleIndex(searchState, nextRefinement, resetPage) {
var page = resetPage ? { page: 1 } : undefined;
return _extends({}, searchState, nextRefinement, page);
}
// eslint-disable-next-line max-params
function refineMultiIndexWithNamespace(searchState, nextRefinement, context, resetPage, namespace) {
var _babelHelpers$extends3;
var index = getIndex(context);
var page = resetPage ? { page: 1 } : undefined;
var state = has_1(searchState, 'indices.' + index) ? _extends({}, searchState.indices, defineProperty$2({}, index, _extends({}, searchState.indices[index], (_babelHelpers$extends3 = {}, defineProperty$2(_babelHelpers$extends3, namespace, _extends({}, searchState.indices[index][namespace], nextRefinement)), defineProperty$2(_babelHelpers$extends3, 'page', 1), _babelHelpers$extends3)))) : _extends({}, searchState.indices, defineProperty$2({}, index, _extends(defineProperty$2({}, namespace, nextRefinement), page)));
return _extends({}, searchState, { indices: state });
}
function refineSingleIndexWithNamespace(searchState, nextRefinement, resetPage, namespace) {
var page = resetPage ? { page: 1 } : undefined;
return _extends({}, searchState, defineProperty$2({}, namespace, _extends({}, searchState[namespace], nextRefinement)), page);
}
function getNamespaceAndAttributeName(id) {
var parts = id.match(/^([^.]*)\.(.*)/);
var namespace = parts && parts[1];
var attributeName = parts && parts[2];
return { namespace: namespace, attributeName: attributeName };
}
// eslint-disable-next-line max-params
function getCurrentRefinementValue(props, searchState, context, id, defaultValue, refinementsCallback) {
var index = getIndex(context);
var _getNamespaceAndAttri = getNamespaceAndAttributeName(id),
namespace = _getNamespaceAndAttri.namespace,
attributeName = _getNamespaceAndAttri.attributeName;
var refinements = hasMultipleIndex(context) && searchState.indices && namespace && searchState.indices['' + index] && has_1(searchState.indices['' + index][namespace], '' + attributeName) || hasMultipleIndex(context) && searchState.indices && has_1(searchState, 'indices.' + index + '.' + id) || !hasMultipleIndex(context) && namespace && has_1(searchState[namespace], attributeName) || !hasMultipleIndex(context) && has_1(searchState, id);
if (refinements) {
var currentRefinement = void 0;
if (hasMultipleIndex(context)) {
currentRefinement = namespace ? get_1(searchState.indices['' + index][namespace], attributeName) : get_1(searchState.indices[index], id);
} else {
currentRefinement = namespace ? get_1(searchState[namespace], attributeName) : get_1(searchState, id);
}
return refinementsCallback(currentRefinement);
}
if (props.defaultRefinement) {
return props.defaultRefinement;
}
return defaultValue;
}
function cleanUpValue(searchState, context, id) {
var index = getIndex(context);
var _getNamespaceAndAttri2 = getNamespaceAndAttributeName(id),
namespace = _getNamespaceAndAttri2.namespace,
attributeName = _getNamespaceAndAttri2.attributeName;
if (hasMultipleIndex(context)) {
return namespace ? _extends({}, searchState, {
indices: _extends({}, searchState.indices, defineProperty$2({}, index, _extends({}, searchState.indices[index], defineProperty$2({}, namespace, omit_1(searchState.indices[index][namespace], '' + attributeName)))))
}) : omit_1(searchState, 'indices.' + index + '.' + id);
} else {
return namespace ? _extends({}, searchState, defineProperty$2({}, namespace, omit_1(searchState[namespace], '' + attributeName))) : omit_1(searchState, '' + id);
}
}
function getId() {
return 'configure';
}
var connectConfigure = createConnector({
displayName: 'AlgoliaConfigure',
getProvidedProps: function getProvidedProps() {
return {};
},
getSearchParameters: function getSearchParameters(searchParameters, props) {
var items = omit_1(props, 'children');
return searchParameters.setQueryParameters(items);
},
transitionState: function transitionState(props, prevSearchState, nextSearchState) {
var id = getId();
var items = omit_1(props, 'children');
var nonPresentKeys = this._props ? difference_1(keys_1(this._props), keys_1(props)) : [];
this._props = props;
var nextValue = defineProperty$2({}, id, _extends({}, omit_1(nextSearchState[id], nonPresentKeys), items));
return refineValue(nextSearchState, nextValue, this.context);
},
cleanUp: function cleanUp(props, searchState) {
var id = getId();
var index = getIndex(this.context);
var subState = hasMultipleIndex(this.context) && searchState.indices ? searchState.indices[index] : searchState;
var configureKeys = subState && subState[id] ? Object.keys(subState[id]) : [];
var configureState = configureKeys.reduce(function (acc, item) {
if (!props[item]) {
acc[item] = subState[id][item];
}
return acc;
}, {});
var nextValue = defineProperty$2({}, id, configureState);
return refineValue(searchState, nextValue, this.context);
}
});
/**
* connectCurrentRefinements connector provides the logic to build a widget that will
* give the user the ability to remove all or some of the filters that were
* set.
* @name connectCurrentRefinements
* @kind connector
* @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return.
* @propType {function} [clearsQuery=false] - Pass true to also clear the search query
* @providedPropType {function} refine - a function to remove a single filter
* @providedPropType {array.<{label: string, attributeName: string, currentRefinement: string || object, items: array, value: function}>} items - all the filters, the `value` is to pass to the `refine` function for removing all currentrefinements, `label` is for the display. When existing several refinements for the same atribute name, then you get a nested `items` object that contains a `label` and a `value` function to use to remove a single filter. `attributeName` and `currentRefinement` are metadata containing row values.
* @providedPropType {string} query - the search query
*/
var connectCurrentRefinements = createConnector({
displayName: 'AlgoliaCurrentRefinements',
propTypes: {
transformItems: propTypes.func
},
getProvidedProps: function getProvidedProps(props, searchState, searchResults, metadata) {
var items = metadata.reduce(function (res, meta) {
if (typeof meta.items !== 'undefined') {
if (!props.clearsQuery && meta.id === 'query') {
return res;
} else {
if (props.clearsQuery && meta.id === 'query' && meta.items[0].currentRefinement === '') {
return res;
}
return res.concat(meta.items);
}
}
return res;
}, []);
return {
items: props.transformItems ? props.transformItems(items) : items,
canRefine: items.length > 0
};
},
refine: function refine(props, searchState, items) {
// `value` corresponds to our internal clear function computed in each connector metadata.
var refinementsToClear = items instanceof Array ? items.map(function (item) {
return item.value;
}) : [items];
return refinementsToClear.reduce(function (res, clear) {
return clear(res);
}, searchState);
}
});
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMin = Math.min;
/**
* The base implementation of methods like `_.intersection`, without support
* for iteratee shorthands, that accepts an array of arrays to inspect.
*
* @private
* @param {Array} arrays The arrays to inspect.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of shared values.
*/
function baseIntersection(arrays, iteratee, comparator) {
var includes = comparator ? _arrayIncludesWith : _arrayIncludes,
length = arrays[0].length,
othLength = arrays.length,
othIndex = othLength,
caches = Array(othLength),
maxLength = Infinity,
result = [];
while (othIndex--) {
var array = arrays[othIndex];
if (othIndex && iteratee) {
array = _arrayMap(array, _baseUnary(iteratee));
}
maxLength = nativeMin(array.length, maxLength);
caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
? new _SetCache(othIndex && array)
: undefined;
}
array = arrays[0];
var index = -1,
seen = caches[0];
outer:
while (++index < length && result.length < maxLength) {
var value = array[index],
computed = iteratee ? iteratee(value) : value;
value = (comparator || value !== 0) ? value : 0;
if (!(seen
? _cacheHas(seen, computed)
: includes(result, computed, comparator)
)) {
othIndex = othLength;
while (--othIndex) {
var cache = caches[othIndex];
if (!(cache
? _cacheHas(cache, computed)
: includes(arrays[othIndex], computed, comparator))
) {
continue outer;
}
}
if (seen) {
seen.push(computed);
}
result.push(value);
}
}
return result;
}
var _baseIntersection = baseIntersection;
/**
* Casts `value` to an empty array if it's not an array like object.
*
* @private
* @param {*} value The value to inspect.
* @returns {Array|Object} Returns the cast array-like object.
*/
function castArrayLikeObject(value) {
return isArrayLikeObject_1(value) ? value : [];
}
var _castArrayLikeObject = castArrayLikeObject;
/**
* Creates an array of unique values that are included in all given arrays
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons. The order and references of result values are
* determined by the first array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @returns {Array} Returns the new array of intersecting values.
* @example
*
* _.intersection([2, 1], [2, 3]);
* // => [2]
*/
var intersection = _baseRest(function(arrays) {
var mapped = _arrayMap(arrays, _castArrayLikeObject);
return (mapped.length && mapped[0] === arrays[0])
? _baseIntersection(mapped)
: [];
});
var intersection_1 = intersection;
/**
* Creates a base function for methods like `_.forIn` and `_.forOwn`.
*
* @private
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Function} Returns the new base function.
*/
function createBaseFor(fromRight) {
return function(object, iteratee, keysFunc) {
var index = -1,
iterable = Object(object),
props = keysFunc(object),
length = props.length;
while (length--) {
var key = props[fromRight ? length : ++index];
if (iteratee(iterable[key], key, iterable) === false) {
break;
}
}
return object;
};
}
var _createBaseFor = createBaseFor;
/**
* The base implementation of `baseForOwn` which iterates over `object`
* properties returned by `keysFunc` and invokes `iteratee` for each property.
* Iteratee functions may exit iteration early by explicitly returning `false`.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {Function} keysFunc The function to get the keys of `object`.
* @returns {Object} Returns `object`.
*/
var baseFor = _createBaseFor();
var _baseFor = baseFor;
/**
* The base implementation of `_.forOwn` without support for iteratee shorthands.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Object} Returns `object`.
*/
function baseForOwn(object, iteratee) {
return object && _baseFor(object, iteratee, keys_1);
}
var _baseForOwn = baseForOwn;
/**
* Casts `value` to `identity` if it's not a function.
*
* @private
* @param {*} value The value to inspect.
* @returns {Function} Returns cast function.
*/
function castFunction(value) {
return typeof value == 'function' ? value : identity_1;
}
var _castFunction = castFunction;
/**
* Iterates over own enumerable string keyed properties of an object and
* invokes `iteratee` for each property. The iteratee is invoked with three
* arguments: (value, key, object). Iteratee functions may exit iteration
* early by explicitly returning `false`.
*
* @static
* @memberOf _
* @since 0.3.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Object} Returns `object`.
* @see _.forOwnRight
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.forOwn(new Foo, function(value, key) {
* console.log(key);
* });
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
*/
function forOwn(object, iteratee) {
return object && _baseForOwn(object, _castFunction(iteratee));
}
var forOwn_1 = forOwn;
/**
* Creates a `baseEach` or `baseEachRight` function.
*
* @private
* @param {Function} eachFunc The function to iterate over a collection.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Function} Returns the new base function.
*/
function createBaseEach(eachFunc, fromRight) {
return function(collection, iteratee) {
if (collection == null) {
return collection;
}
if (!isArrayLike_1(collection)) {
return eachFunc(collection, iteratee);
}
var length = collection.length,
index = fromRight ? length : -1,
iterable = Object(collection);
while ((fromRight ? index-- : ++index < length)) {
if (iteratee(iterable[index], index, iterable) === false) {
break;
}
}
return collection;
};
}
var _createBaseEach = createBaseEach;
/**
* The base implementation of `_.forEach` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
*/
var baseEach = _createBaseEach(_baseForOwn);
var _baseEach = baseEach;
/**
* Iterates over elements of `collection` and invokes `iteratee` for each element.
* The iteratee is invoked with three arguments: (value, index|key, collection).
* Iteratee functions may exit iteration early by explicitly returning `false`.
*
* **Note:** As with other "Collections" methods, objects with a "length"
* property are iterated like arrays. To avoid this behavior use `_.forIn`
* or `_.forOwn` for object iteration.
*
* @static
* @memberOf _
* @since 0.1.0
* @alias each
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
* @see _.forEachRight
* @example
*
* _.forEach([1, 2], function(value) {
* console.log(value);
* });
* // => Logs `1` then `2`.
*
* _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
* console.log(key);
* });
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
*/
function forEach(collection, iteratee) {
var func = isArray_1(collection) ? _arrayEach : _baseEach;
return func(collection, _castFunction(iteratee));
}
var forEach_1 = forEach;
/**
* The base implementation of `_.filter` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
*/
function baseFilter(collection, predicate) {
var result = [];
_baseEach(collection, function(value, index, collection) {
if (predicate(value, index, collection)) {
result.push(value);
}
});
return result;
}
var _baseFilter = baseFilter;
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG$4 = 1;
var COMPARE_UNORDERED_FLAG$2 = 2;
/**
* The base implementation of `_.isMatch` without support for iteratee shorthands.
*
* @private
* @param {Object} object The object to inspect.
* @param {Object} source The object of property values to match.
* @param {Array} matchData The property names, values, and compare flags to match.
* @param {Function} [customizer] The function to customize comparisons.
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
*/
function baseIsMatch(object, source, matchData, customizer) {
var index = matchData.length,
length = index,
noCustomizer = !customizer;
if (object == null) {
return !length;
}
object = Object(object);
while (index--) {
var data = matchData[index];
if ((noCustomizer && data[2])
? data[1] !== object[data[0]]
: !(data[0] in object)
) {
return false;
}
}
while (++index < length) {
data = matchData[index];
var key = data[0],
objValue = object[key],
srcValue = data[1];
if (noCustomizer && data[2]) {
if (objValue === undefined && !(key in object)) {
return false;
}
} else {
var stack = new _Stack;
if (customizer) {
var result = customizer(objValue, srcValue, key, object, source, stack);
}
if (!(result === undefined
? _baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$4 | COMPARE_UNORDERED_FLAG$2, customizer, stack)
: result
)) {
return false;
}
}
}
return true;
}
var _baseIsMatch = baseIsMatch;
/**
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` if suitable for strict
* equality comparisons, else `false`.
*/
function isStrictComparable(value) {
return value === value && !isObject_1(value);
}
var _isStrictComparable = isStrictComparable;
/**
* Gets the property names, values, and compare flags of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the match data of `object`.
*/
function getMatchData(object) {
var result = keys_1(object),
length = result.length;
while (length--) {
var key = result[length],
value = object[key];
result[length] = [key, value, _isStrictComparable(value)];
}
return result;
}
var _getMatchData = getMatchData;
/**
* A specialized version of `matchesProperty` for source values suitable
* for strict equality comparisons, i.e. `===`.
*
* @private
* @param {string} key The key of the property to get.
* @param {*} srcValue The value to match.
* @returns {Function} Returns the new spec function.
*/
function matchesStrictComparable(key, srcValue) {
return function(object) {
if (object == null) {
return false;
}
return object[key] === srcValue &&
(srcValue !== undefined || (key in Object(object)));
};
}
var _matchesStrictComparable = matchesStrictComparable;
/**
* The base implementation of `_.matches` which doesn't clone `source`.
*
* @private
* @param {Object} source The object of property values to match.
* @returns {Function} Returns the new spec function.
*/
function baseMatches(source) {
var matchData = _getMatchData(source);
if (matchData.length == 1 && matchData[0][2]) {
return _matchesStrictComparable(matchData[0][0], matchData[0][1]);
}
return function(object) {
return object === source || _baseIsMatch(object, source, matchData);
};
}
var _baseMatches = baseMatches;
/**
* The base implementation of `_.hasIn` without support for deep paths.
*
* @private
* @param {Object} [object] The object to query.
* @param {Array|string} key The key to check.
* @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
function baseHasIn(object, key) {
return object != null && key in Object(object);
}
var _baseHasIn = baseHasIn;
/**
* Checks if `path` is a direct or inherited property of `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
* @example
*
* var object = _.create({ 'a': _.create({ 'b': 2 }) });
*
* _.hasIn(object, 'a');
* // => true
*
* _.hasIn(object, 'a.b');
* // => true
*
* _.hasIn(object, ['a', 'b']);
* // => true
*
* _.hasIn(object, 'b');
* // => false
*/
function hasIn(object, path) {
return object != null && _hasPath(object, path, _baseHasIn);
}
var hasIn_1 = hasIn;
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG$5 = 1;
var COMPARE_UNORDERED_FLAG$3 = 2;
/**
* The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
*
* @private
* @param {string} path The path of the property to get.
* @param {*} srcValue The value to match.
* @returns {Function} Returns the new spec function.
*/
function baseMatchesProperty(path, srcValue) {
if (_isKey(path) && _isStrictComparable(srcValue)) {
return _matchesStrictComparable(_toKey(path), srcValue);
}
return function(object) {
var objValue = get_1(object, path);
return (objValue === undefined && objValue === srcValue)
? hasIn_1(object, path)
: _baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$5 | COMPARE_UNORDERED_FLAG$3);
};
}
var _baseMatchesProperty = baseMatchesProperty;
/**
* The base implementation of `_.property` without support for deep paths.
*
* @private
* @param {string} key The key of the property to get.
* @returns {Function} Returns the new accessor function.
*/
function baseProperty(key) {
return function(object) {
return object == null ? undefined : object[key];
};
}
var _baseProperty = baseProperty;
/**
* A specialized version of `baseProperty` which supports deep paths.
*
* @private
* @param {Array|string} path The path of the property to get.
* @returns {Function} Returns the new accessor function.
*/
function basePropertyDeep(path) {
return function(object) {
return _baseGet(object, path);
};
}
var _basePropertyDeep = basePropertyDeep;
/**
* Creates a function that returns the value at `path` of a given object.
*
* @static
* @memberOf _
* @since 2.4.0
* @category Util
* @param {Array|string} path The path of the property to get.
* @returns {Function} Returns the new accessor function.
* @example
*
* var objects = [
* { 'a': { 'b': 2 } },
* { 'a': { 'b': 1 } }
* ];
*
* _.map(objects, _.property('a.b'));
* // => [2, 1]
*
* _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
* // => [1, 2]
*/
function property(path) {
return _isKey(path) ? _baseProperty(_toKey(path)) : _basePropertyDeep(path);
}
var property_1 = property;
/**
* The base implementation of `_.iteratee`.
*
* @private
* @param {*} [value=_.identity] The value to convert to an iteratee.
* @returns {Function} Returns the iteratee.
*/
function baseIteratee(value) {
// Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
// See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
if (typeof value == 'function') {
return value;
}
if (value == null) {
return identity_1;
}
if (typeof value == 'object') {
return isArray_1(value)
? _baseMatchesProperty(value[0], value[1])
: _baseMatches(value);
}
return property_1(value);
}
var _baseIteratee = baseIteratee;
/**
* Iterates over elements of `collection`, returning an array of all elements
* `predicate` returns truthy for. The predicate is invoked with three
* arguments: (value, index|key, collection).
*
* **Note:** Unlike `_.remove`, this method returns a new array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
* @see _.reject
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36, 'active': true },
* { 'user': 'fred', 'age': 40, 'active': false }
* ];
*
* _.filter(users, function(o) { return !o.active; });
* // => objects for ['fred']
*
* // The `_.matches` iteratee shorthand.
* _.filter(users, { 'age': 36, 'active': true });
* // => objects for ['barney']
*
* // The `_.matchesProperty` iteratee shorthand.
* _.filter(users, ['active', false]);
* // => objects for ['fred']
*
* // The `_.property` iteratee shorthand.
* _.filter(users, 'active');
* // => objects for ['barney']
*/
function filter(collection, predicate) {
var func = isArray_1(collection) ? _arrayFilter : _baseFilter;
return func(collection, _baseIteratee(predicate, 3));
}
var filter_1 = filter;
/**
* The base implementation of `_.map` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
*/
function baseMap(collection, iteratee) {
var index = -1,
result = isArrayLike_1(collection) ? Array(collection.length) : [];
_baseEach(collection, function(value, key, collection) {
result[++index] = iteratee(value, key, collection);
});
return result;
}
var _baseMap = baseMap;
/**
* Creates an array of values by running each element in `collection` thru
* `iteratee`. The iteratee is invoked with three arguments:
* (value, index|key, collection).
*
* Many lodash methods are guarded to work as iteratees for methods like
* `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
*
* The guarded methods are:
* `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
* `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
* `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
* `template`, `trim`, `trimEnd`, `trimStart`, and `words`
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
* @example
*
* function square(n) {
* return n * n;
* }
*
* _.map([4, 8], square);
* // => [16, 64]
*
* _.map({ 'a': 4, 'b': 8 }, square);
* // => [16, 64] (iteration order is not guaranteed)
*
* var users = [
* { 'user': 'barney' },
* { 'user': 'fred' }
* ];
*
* // The `_.property` iteratee shorthand.
* _.map(users, 'user');
* // => ['barney', 'fred']
*/
function map(collection, iteratee) {
var func = isArray_1(collection) ? _arrayMap : _baseMap;
return func(collection, _baseIteratee(iteratee, 3));
}
var map_1 = map;
/**
* The base implementation of `_.reduce` and `_.reduceRight`, without support
* for iteratee shorthands, which iterates over `collection` using `eachFunc`.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {*} accumulator The initial value.
* @param {boolean} initAccum Specify using the first or last element of
* `collection` as the initial value.
* @param {Function} eachFunc The function to iterate over `collection`.
* @returns {*} Returns the accumulated value.
*/
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
eachFunc(collection, function(value, index, collection) {
accumulator = initAccum
? (initAccum = false, value)
: iteratee(accumulator, value, index, collection);
});
return accumulator;
}
var _baseReduce = baseReduce;
/**
* Reduces `collection` to a value which is the accumulated result of running
* each element in `collection` thru `iteratee`, where each successive
* invocation is supplied the return value of the previous. If `accumulator`
* is not given, the first element of `collection` is used as the initial
* value. The iteratee is invoked with four arguments:
* (accumulator, value, index|key, collection).
*
* Many lodash methods are guarded to work as iteratees for methods like
* `_.reduce`, `_.reduceRight`, and `_.transform`.
*
* The guarded methods are:
* `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
* and `sortBy`
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @param {*} [accumulator] The initial value.
* @returns {*} Returns the accumulated value.
* @see _.reduceRight
* @example
*
* _.reduce([1, 2], function(sum, n) {
* return sum + n;
* }, 0);
* // => 3
*
* _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
* (result[value] || (result[value] = [])).push(key);
* return result;
* }, {});
* // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
*/
function reduce(collection, iteratee, accumulator) {
var func = isArray_1(collection) ? _arrayReduce : _baseReduce,
initAccum = arguments.length < 3;
return func(collection, _baseIteratee(iteratee, 4), accumulator, initAccum, _baseEach);
}
var reduce_1 = reduce;
/** Used as references for various `Number` constants. */
var NAN = 0 / 0;
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;
/** Used to detect bad signed hexadecimal string values. */
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
/** Used to detect binary string values. */
var reIsBinary = /^0b[01]+$/i;
/** Used to detect octal string values. */
var reIsOctal = /^0o[0-7]+$/i;
/** Built-in method references without a dependency on `root`. */
var freeParseInt = parseInt;
/**
* Converts `value` to a number.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
* @example
*
* _.toNumber(3.2);
* // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
*
* _.toNumber(Infinity);
* // => Infinity
*
* _.toNumber('3.2');
* // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
return value;
}
if (isSymbol_1(value)) {
return NAN;
}
if (isObject_1(value)) {
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
value = isObject_1(other) ? (other + '') : other;
}
if (typeof value != 'string') {
return value === 0 ? value : +value;
}
value = value.replace(reTrim, '');
var isBinary = reIsBinary.test(value);
return (isBinary || reIsOctal.test(value))
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
: (reIsBadHex.test(value) ? NAN : +value);
}
var toNumber_1 = toNumber;
/** Used as references for various `Number` constants. */
var INFINITY$2 = 1 / 0;
var MAX_INTEGER = 1.7976931348623157e+308;
/**
* Converts `value` to a finite number.
*
* @static
* @memberOf _
* @since 4.12.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted number.
* @example
*
* _.toFinite(3.2);
* // => 3.2
*
* _.toFinite(Number.MIN_VALUE);
* // => 5e-324
*
* _.toFinite(Infinity);
* // => 1.7976931348623157e+308
*
* _.toFinite('3.2');
* // => 3.2
*/
function toFinite(value) {
if (!value) {
return value === 0 ? value : 0;
}
value = toNumber_1(value);
if (value === INFINITY$2 || value === -INFINITY$2) {
var sign = (value < 0 ? -1 : 1);
return sign * MAX_INTEGER;
}
return value === value ? value : 0;
}
var toFinite_1 = toFinite;
/**
* Converts `value` to an integer.
*
* **Note:** This method is loosely based on
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted integer.
* @example
*
* _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
* // => 0
*
* _.toInteger(Infinity);
* // => 1.7976931348623157e+308
*
* _.toInteger('3.2');
* // => 3
*/
function toInteger(value) {
var result = toFinite_1(value),
remainder = result % 1;
return result === result ? (remainder ? result - remainder : result) : 0;
}
var toInteger_1 = toInteger;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax$1 = Math.max;
/**
* Gets the index at which the first occurrence of `value` is found in `array`
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons. If `fromIndex` is negative, it's used as the
* offset from the end of `array`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} [fromIndex=0] The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
* @example
*
* _.indexOf([1, 2, 1, 2], 2);
* // => 1
*
* // Search from the `fromIndex`.
* _.indexOf([1, 2, 1, 2], 2, 2);
* // => 3
*/
function indexOf(array, value, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = fromIndex == null ? 0 : toInteger_1(fromIndex);
if (index < 0) {
index = nativeMax$1(length + index, 0);
}
return _baseIndexOf(array, value, index);
}
var indexOf_1 = indexOf;
/** `Object#toString` result references. */
var numberTag$4 = '[object Number]';
/**
* Checks if `value` is classified as a `Number` primitive or object.
*
* **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
* classified as numbers, use the `_.isFinite` method.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a number, else `false`.
* @example
*
* _.isNumber(3);
* // => true
*
* _.isNumber(Number.MIN_VALUE);
* // => true
*
* _.isNumber(Infinity);
* // => true
*
* _.isNumber('3');
* // => false
*/
function isNumber(value) {
return typeof value == 'number' ||
(isObjectLike_1(value) && _baseGetTag(value) == numberTag$4);
}
var isNumber_1 = isNumber;
/**
* Checks if `value` is `NaN`.
*
* **Note:** This method is based on
* [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
* global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
* `undefined` and other non-number values.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
* @example
*
* _.isNaN(NaN);
* // => true
*
* _.isNaN(new Number(NaN));
* // => true
*
* isNaN(undefined);
* // => true
*
* _.isNaN(undefined);
* // => false
*/
function isNaN$1(value) {
// An `NaN` primitive is the only value that is not equal to itself.
// Perform the `toStringTag` check first to avoid errors with some
// ActiveX objects in IE.
return isNumber_1(value) && value != +value;
}
var _isNaN = isNaN$1;
/**
* Checks if `value` is `undefined`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
* @example
*
* _.isUndefined(void 0);
* // => true
*
* _.isUndefined(null);
* // => false
*/
function isUndefined(value) {
return value === undefined;
}
var isUndefined_1 = isUndefined;
/** `Object#toString` result references. */
var stringTag$4 = '[object String]';
/**
* Checks if `value` is classified as a `String` primitive or object.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
* @example
*
* _.isString('abc');
* // => true
*
* _.isString(1);
* // => false
*/
function isString(value) {
return typeof value == 'string' ||
(!isArray_1(value) && isObjectLike_1(value) && _baseGetTag(value) == stringTag$4);
}
var isString_1 = isString;
/**
* Creates a `_.find` or `_.findLast` function.
*
* @private
* @param {Function} findIndexFunc The function to find the collection index.
* @returns {Function} Returns the new find function.
*/
function createFind(findIndexFunc) {
return function(collection, predicate, fromIndex) {
var iterable = Object(collection);
if (!isArrayLike_1(collection)) {
var iteratee = _baseIteratee(predicate, 3);
collection = keys_1(collection);
predicate = function(key) { return iteratee(iterable[key], key, iterable); };
}
var index = findIndexFunc(collection, predicate, fromIndex);
return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
};
}
var _createFind = createFind;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax$2 = Math.max;
/**
* This method is like `_.find` except that it returns the index of the first
* element `predicate` returns truthy for instead of the element itself.
*
* @static
* @memberOf _
* @since 1.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @param {number} [fromIndex=0] The index to search from.
* @returns {number} Returns the index of the found element, else `-1`.
* @example
*
* var users = [
* { 'user': 'barney', 'active': false },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': true }
* ];
*
* _.findIndex(users, function(o) { return o.user == 'barney'; });
* // => 0
*
* // The `_.matches` iteratee shorthand.
* _.findIndex(users, { 'user': 'fred', 'active': false });
* // => 1
*
* // The `_.matchesProperty` iteratee shorthand.
* _.findIndex(users, ['active', false]);
* // => 0
*
* // The `_.property` iteratee shorthand.
* _.findIndex(users, 'active');
* // => 2
*/
function findIndex(array, predicate, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = fromIndex == null ? 0 : toInteger_1(fromIndex);
if (index < 0) {
index = nativeMax$2(length + index, 0);
}
return _baseFindIndex(array, _baseIteratee(predicate, 3), index);
}
var findIndex_1 = findIndex;
/**
* Iterates over elements of `collection`, returning the first element
* `predicate` returns truthy for. The predicate is invoked with three
* arguments: (value, index|key, collection).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to inspect.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @param {number} [fromIndex=0] The index to search from.
* @returns {*} Returns the matched element, else `undefined`.
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36, 'active': true },
* { 'user': 'fred', 'age': 40, 'active': false },
* { 'user': 'pebbles', 'age': 1, 'active': true }
* ];
*
* _.find(users, function(o) { return o.age < 40; });
* // => object for 'barney'
*
* // The `_.matches` iteratee shorthand.
* _.find(users, { 'age': 1, 'active': true });
* // => object for 'pebbles'
*
* // The `_.matchesProperty` iteratee shorthand.
* _.find(users, ['active', false]);
* // => object for 'fred'
*
* // The `_.property` iteratee shorthand.
* _.find(users, 'active');
* // => object for 'barney'
*/
var find = _createFind(findIndex_1);
var find_1 = find;
/**
* Casts `array` to a slice if it's needed.
*
* @private
* @param {Array} array The array to inspect.
* @param {number} start The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns the cast slice.
*/
function castSlice(array, start, end) {
var length = array.length;
end = end === undefined ? length : end;
return (!start && end >= length) ? array : _baseSlice(array, start, end);
}
var _castSlice = castSlice;
/**
* Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
* that is not found in the character symbols.
*
* @private
* @param {Array} strSymbols The string symbols to inspect.
* @param {Array} chrSymbols The character symbols to find.
* @returns {number} Returns the index of the last unmatched string symbol.
*/
function charsEndIndex(strSymbols, chrSymbols) {
var index = strSymbols.length;
while (index-- && _baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
return index;
}
var _charsEndIndex = charsEndIndex;
/**
* Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
* that is not found in the character symbols.
*
* @private
* @param {Array} strSymbols The string symbols to inspect.
* @param {Array} chrSymbols The character symbols to find.
* @returns {number} Returns the index of the first unmatched string symbol.
*/
function charsStartIndex(strSymbols, chrSymbols) {
var index = -1,
length = strSymbols.length;
while (++index < length && _baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
return index;
}
var _charsStartIndex = charsStartIndex;
/**
* Converts an ASCII `string` to an array.
*
* @private
* @param {string} string The string to convert.
* @returns {Array} Returns the converted array.
*/
function asciiToArray(string) {
return string.split('');
}
var _asciiToArray = asciiToArray;
/** Used to compose unicode character classes. */
var rsAstralRange = '\\ud800-\\udfff';
var rsComboMarksRange = '\\u0300-\\u036f';
var reComboHalfMarksRange = '\\ufe20-\\ufe2f';
var rsComboSymbolsRange = '\\u20d0-\\u20ff';
var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
var rsVarRange = '\\ufe0e\\ufe0f';
/** Used to compose unicode capture groups. */
var rsZWJ = '\\u200d';
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
/**
* Checks if `string` contains Unicode symbols.
*
* @private
* @param {string} string The string to inspect.
* @returns {boolean} Returns `true` if a symbol is found, else `false`.
*/
function hasUnicode(string) {
return reHasUnicode.test(string);
}
var _hasUnicode = hasUnicode;
/** Used to compose unicode character classes. */
var rsAstralRange$1 = '\\ud800-\\udfff';
var rsComboMarksRange$1 = '\\u0300-\\u036f';
var reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f';
var rsComboSymbolsRange$1 = '\\u20d0-\\u20ff';
var rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1;
var rsVarRange$1 = '\\ufe0e\\ufe0f';
/** Used to compose unicode capture groups. */
var rsAstral = '[' + rsAstralRange$1 + ']';
var rsCombo = '[' + rsComboRange$1 + ']';
var rsFitz = '\\ud83c[\\udffb-\\udfff]';
var rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')';
var rsNonAstral = '[^' + rsAstralRange$1 + ']';
var rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}';
var rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]';
var rsZWJ$1 = '\\u200d';
/** Used to compose unicode regexes. */
var reOptMod = rsModifier + '?';
var rsOptVar = '[' + rsVarRange$1 + ']?';
var rsOptJoin = '(?:' + rsZWJ$1 + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*';
var rsSeq = rsOptVar + reOptMod + rsOptJoin;
var rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
/**
* Converts a Unicode `string` to an array.
*
* @private
* @param {string} string The string to convert.
* @returns {Array} Returns the converted array.
*/
function unicodeToArray(string) {
return string.match(reUnicode) || [];
}
var _unicodeToArray = unicodeToArray;
/**
* Converts `string` to an array.
*
* @private
* @param {string} string The string to convert.
* @returns {Array} Returns the converted array.
*/
function stringToArray(string) {
return _hasUnicode(string)
? _unicodeToArray(string)
: _asciiToArray(string);
}
var _stringToArray = stringToArray;
/** Used to match leading and trailing whitespace. */
var reTrim$1 = /^\s+|\s+$/g;
/**
* Removes leading and trailing whitespace or specified characters from `string`.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to trim.
* @param {string} [chars=whitespace] The characters to trim.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {string} Returns the trimmed string.
* @example
*
* _.trim(' abc ');
* // => 'abc'
*
* _.trim('-_-abc-_-', '_-');
* // => 'abc'
*
* _.map([' foo ', ' bar '], _.trim);
* // => ['foo', 'bar']
*/
function trim(string, chars, guard) {
string = toString_1(string);
if (string && (guard || chars === undefined)) {
return string.replace(reTrim$1, '');
}
if (!string || !(chars = _baseToString(chars))) {
return string;
}
var strSymbols = _stringToArray(string),
chrSymbols = _stringToArray(chars),
start = _charsStartIndex(strSymbols, chrSymbols),
end = _charsEndIndex(strSymbols, chrSymbols) + 1;
return _castSlice(strSymbols, start, end).join('');
}
var trim_1 = trim;
/**
* Checks if the given arguments are from an iteratee call.
*
* @private
* @param {*} value The potential iteratee value argument.
* @param {*} index The potential iteratee index or key argument.
* @param {*} object The potential iteratee object argument.
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
* else `false`.
*/
function isIterateeCall(value, index, object) {
if (!isObject_1(object)) {
return false;
}
var type = typeof index;
if (type == 'number'
? (isArrayLike_1(object) && _isIndex(index, object.length))
: (type == 'string' && index in object)
) {
return eq_1(object[index], value);
}
return false;
}
var _isIterateeCall = isIterateeCall;
/**
* Creates a function like `_.assign`.
*
* @private
* @param {Function} assigner The function to assign values.
* @returns {Function} Returns the new assigner function.
*/
function createAssigner(assigner) {
return _baseRest(function(object, sources) {
var index = -1,
length = sources.length,
customizer = length > 1 ? sources[length - 1] : undefined,
guard = length > 2 ? sources[2] : undefined;
customizer = (assigner.length > 3 && typeof customizer == 'function')
? (length--, customizer)
: undefined;
if (guard && _isIterateeCall(sources[0], sources[1], guard)) {
customizer = length < 3 ? undefined : customizer;
length = 1;
}
object = Object(object);
while (++index < length) {
var source = sources[index];
if (source) {
assigner(object, source, index, customizer);
}
}
return object;
});
}
var _createAssigner = createAssigner;
/**
* This method is like `_.assignIn` except that it accepts `customizer`
* which is invoked to produce the assigned values. If `customizer` returns
* `undefined`, assignment is handled by the method instead. The `customizer`
* is invoked with five arguments: (objValue, srcValue, key, object, source).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @alias extendWith
* @category Object
* @param {Object} object The destination object.
* @param {...Object} sources The source objects.
* @param {Function} [customizer] The function to customize assigned values.
* @returns {Object} Returns `object`.
* @see _.assignWith
* @example
*
* function customizer(objValue, srcValue) {
* return _.isUndefined(objValue) ? srcValue : objValue;
* }
*
* var defaults = _.partialRight(_.assignInWith, customizer);
*
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
* // => { 'a': 1, 'b': 2 }
*/
var assignInWith = _createAssigner(function(object, source, srcIndex, customizer) {
_copyObject(source, keysIn_1(source), object, customizer);
});
var assignInWith_1 = assignInWith;
/** Used for built-in method references. */
var objectProto$18 = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty$16 = objectProto$18.hasOwnProperty;
/**
* Used by `_.defaults` to customize its `_.assignIn` use to assign properties
* of source objects to the destination object for all destination properties
* that resolve to `undefined`.
*
* @private
* @param {*} objValue The destination value.
* @param {*} srcValue The source value.
* @param {string} key The key of the property to assign.
* @param {Object} object The parent object of `objValue`.
* @returns {*} Returns the value to assign.
*/
function customDefaultsAssignIn(objValue, srcValue, key, object) {
if (objValue === undefined ||
(eq_1(objValue, objectProto$18[key]) && !hasOwnProperty$16.call(object, key))) {
return srcValue;
}
return objValue;
}
var _customDefaultsAssignIn = customDefaultsAssignIn;
/**
* Assigns own and inherited enumerable string keyed properties of source
* objects to the destination object for all destination properties that
* resolve to `undefined`. Source objects are applied from left to right.
* Once a property is set, additional values of the same property are ignored.
*
* **Note:** This method mutates `object`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @see _.defaultsDeep
* @example
*
* _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
* // => { 'a': 1, 'b': 2 }
*/
var defaults$1 = _baseRest(function(args) {
args.push(undefined, _customDefaultsAssignIn);
return _apply(assignInWith_1, undefined, args);
});
var defaults_1 = defaults$1;
/**
* This function is like `assignValue` except that it doesn't assign
* `undefined` values.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function assignMergeValue(object, key, value) {
if ((value !== undefined && !eq_1(object[key], value)) ||
(value === undefined && !(key in object))) {
_baseAssignValue(object, key, value);
}
}
var _assignMergeValue = assignMergeValue;
/**
* Converts `value` to a plain object flattening inherited enumerable string
* keyed properties of `value` to own properties of the plain object.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {Object} Returns the converted plain object.
* @example
*
* function Foo() {
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.assign({ 'a': 1 }, new Foo);
* // => { 'a': 1, 'b': 2 }
*
* _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
* // => { 'a': 1, 'b': 2, 'c': 3 }
*/
function toPlainObject(value) {
return _copyObject(value, keysIn_1(value));
}
var toPlainObject_1 = toPlainObject;
/**
* A specialized version of `baseMerge` for arrays and objects which performs
* deep merges and tracks traversed objects enabling objects with circular
* references to be merged.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @param {string} key The key of the value to merge.
* @param {number} srcIndex The index of `source`.
* @param {Function} mergeFunc The function to merge values.
* @param {Function} [customizer] The function to customize assigned values.
* @param {Object} [stack] Tracks traversed source values and their merged
* counterparts.
*/
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
var objValue = object[key],
srcValue = source[key],
stacked = stack.get(srcValue);
if (stacked) {
_assignMergeValue(object, key, stacked);
return;
}
var newValue = customizer
? customizer(objValue, srcValue, (key + ''), object, source, stack)
: undefined;
var isCommon = newValue === undefined;
if (isCommon) {
var isArr = isArray_1(srcValue),
isBuff = !isArr && isBuffer_1(srcValue),
isTyped = !isArr && !isBuff && isTypedArray_1(srcValue);
newValue = srcValue;
if (isArr || isBuff || isTyped) {
if (isArray_1(objValue)) {
newValue = objValue;
}
else if (isArrayLikeObject_1(objValue)) {
newValue = _copyArray(objValue);
}
else if (isBuff) {
isCommon = false;
newValue = _cloneBuffer(srcValue, true);
}
else if (isTyped) {
isCommon = false;
newValue = _cloneTypedArray(srcValue, true);
}
else {
newValue = [];
}
}
else if (isPlainObject_1(srcValue) || isArguments_1(srcValue)) {
newValue = objValue;
if (isArguments_1(objValue)) {
newValue = toPlainObject_1(objValue);
}
else if (!isObject_1(objValue) || (srcIndex && isFunction_1(objValue))) {
newValue = _initCloneObject(srcValue);
}
}
else {
isCommon = false;
}
}
if (isCommon) {
// Recursively merge objects and arrays (susceptible to call stack limits).
stack.set(srcValue, newValue);
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
stack['delete'](srcValue);
}
_assignMergeValue(object, key, newValue);
}
var _baseMergeDeep = baseMergeDeep;
/**
* The base implementation of `_.merge` without support for multiple sources.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @param {number} srcIndex The index of `source`.
* @param {Function} [customizer] The function to customize merged values.
* @param {Object} [stack] Tracks traversed source values and their merged
* counterparts.
*/
function baseMerge(object, source, srcIndex, customizer, stack) {
if (object === source) {
return;
}
_baseFor(source, function(srcValue, key) {
if (isObject_1(srcValue)) {
stack || (stack = new _Stack);
_baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
}
else {
var newValue = customizer
? customizer(object[key], srcValue, (key + ''), object, source, stack)
: undefined;
if (newValue === undefined) {
newValue = srcValue;
}
_assignMergeValue(object, key, newValue);
}
}, keysIn_1);
}
var _baseMerge = baseMerge;
/**
* This method is like `_.assign` except that it recursively merges own and
* inherited enumerable string keyed properties of source objects into the
* destination object. Source properties that resolve to `undefined` are
* skipped if a destination value exists. Array and plain object properties
* are merged recursively. Other objects and value types are overridden by
* assignment. Source objects are applied from left to right. Subsequent
* sources overwrite property assignments of previous sources.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 0.5.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @example
*
* var object = {
* 'a': [{ 'b': 2 }, { 'd': 4 }]
* };
*
* var other = {
* 'a': [{ 'c': 3 }, { 'e': 5 }]
* };
*
* _.merge(object, other);
* // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
*/
var merge = _createAssigner(function(object, source, srcIndex) {
_baseMerge(object, source, srcIndex);
});
var merge_1 = merge;
function valToNumber(v) {
if (isNumber_1(v)) {
return v;
} else if (isString_1(v)) {
return parseFloat(v);
} else if (isArray_1(v)) {
return map_1(v, valToNumber);
}
throw new Error('The value should be a number, a parseable string or an array of those.');
}
var valToNumber_1 = valToNumber;
function filterState(state, filters) {
var partialState = {};
var attributeFilters = filter_1(filters, function(f) { return f.indexOf('attribute:') !== -1; });
var attributes = map_1(attributeFilters, function(aF) { return aF.split(':')[1]; });
if (indexOf_1(attributes, '*') === -1) {
forEach_1(attributes, function(attr) {
if (state.isConjunctiveFacet(attr) && state.isFacetRefined(attr)) {
if (!partialState.facetsRefinements) partialState.facetsRefinements = {};
partialState.facetsRefinements[attr] = state.facetsRefinements[attr];
}
if (state.isDisjunctiveFacet(attr) && state.isDisjunctiveFacetRefined(attr)) {
if (!partialState.disjunctiveFacetsRefinements) partialState.disjunctiveFacetsRefinements = {};
partialState.disjunctiveFacetsRefinements[attr] = state.disjunctiveFacetsRefinements[attr];
}
if (state.isHierarchicalFacet(attr) && state.isHierarchicalFacetRefined(attr)) {
if (!partialState.hierarchicalFacetsRefinements) partialState.hierarchicalFacetsRefinements = {};
partialState.hierarchicalFacetsRefinements[attr] = state.hierarchicalFacetsRefinements[attr];
}
var numericRefinements = state.getNumericRefinements(attr);
if (!isEmpty_1(numericRefinements)) {
if (!partialState.numericRefinements) partialState.numericRefinements = {};
partialState.numericRefinements[attr] = state.numericRefinements[attr];
}
});
} else {
if (!isEmpty_1(state.numericRefinements)) {
partialState.numericRefinements = state.numericRefinements;
}
if (!isEmpty_1(state.facetsRefinements)) partialState.facetsRefinements = state.facetsRefinements;
if (!isEmpty_1(state.disjunctiveFacetsRefinements)) {
partialState.disjunctiveFacetsRefinements = state.disjunctiveFacetsRefinements;
}
if (!isEmpty_1(state.hierarchicalFacetsRefinements)) {
partialState.hierarchicalFacetsRefinements = state.hierarchicalFacetsRefinements;
}
}
var searchParameters = filter_1(
filters,
function(f) {
return f.indexOf('attribute:') === -1;
}
);
forEach_1(
searchParameters,
function(parameterKey) {
partialState[parameterKey] = state[parameterKey];
}
);
return partialState;
}
var filterState_1 = filterState;
/**
* Functions to manipulate refinement lists
*
* The RefinementList is not formally defined through a prototype but is based
* on a specific structure.
*
* @module SearchParameters.refinementList
*
* @typedef {string[]} SearchParameters.refinementList.Refinements
* @typedef {Object.<string, SearchParameters.refinementList.Refinements>} SearchParameters.refinementList.RefinementList
*/
var lib = {
/**
* Adds a refinement to a RefinementList
* @param {RefinementList} refinementList the initial list
* @param {string} attribute the attribute to refine
* @param {string} value the value of the refinement, if the value is not a string it will be converted
* @return {RefinementList} a new and updated refinement list
*/
addRefinement: function addRefinement(refinementList, attribute, value) {
if (lib.isRefined(refinementList, attribute, value)) {
return refinementList;
}
var valueAsString = '' + value;
var facetRefinement = !refinementList[attribute] ?
[valueAsString] :
refinementList[attribute].concat(valueAsString);
var mod = {};
mod[attribute] = facetRefinement;
return defaults_1({}, mod, refinementList);
},
/**
* Removes refinement(s) for an attribute:
* - if the value is specified removes the refinement for the value on the attribute
* - if no value is specified removes all the refinements for this attribute
* @param {RefinementList} refinementList the initial list
* @param {string} attribute the attribute to refine
* @param {string} [value] the value of the refinement
* @return {RefinementList} a new and updated refinement lst
*/
removeRefinement: function removeRefinement(refinementList, attribute, value) {
if (isUndefined_1(value)) {
return lib.clearRefinement(refinementList, attribute);
}
var valueAsString = '' + value;
return lib.clearRefinement(refinementList, function(v, f) {
return attribute === f && valueAsString === v;
});
},
/**
* Toggles the refinement value for an attribute.
* @param {RefinementList} refinementList the initial list
* @param {string} attribute the attribute to refine
* @param {string} value the value of the refinement
* @return {RefinementList} a new and updated list
*/
toggleRefinement: function toggleRefinement(refinementList, attribute, value) {
if (isUndefined_1(value)) throw new Error('toggleRefinement should be used with a value');
if (lib.isRefined(refinementList, attribute, value)) {
return lib.removeRefinement(refinementList, attribute, value);
}
return lib.addRefinement(refinementList, attribute, value);
},
/**
* Clear all or parts of a RefinementList. Depending on the arguments, three
* kinds of behavior can happen:
* - if no attribute is provided: clears the whole list
* - if an attribute is provided as a string: clears the list for the specific attribute
* - if an attribute is provided as a function: discards the elements for which the function returns true
* @param {RefinementList} refinementList the initial list
* @param {string} [attribute] the attribute or function to discard
* @param {string} [refinementType] optional parameter to give more context to the attribute function
* @return {RefinementList} a new and updated refinement list
*/
clearRefinement: function clearRefinement(refinementList, attribute, refinementType) {
if (isUndefined_1(attribute)) {
return {};
} else if (isString_1(attribute)) {
return omit_1(refinementList, attribute);
} else if (isFunction_1(attribute)) {
return reduce_1(refinementList, function(memo, values, key) {
var facetList = filter_1(values, function(value) {
return !attribute(value, key, refinementType);
});
if (!isEmpty_1(facetList)) memo[key] = facetList;
return memo;
}, {});
}
},
/**
* Test if the refinement value is used for the attribute. If no refinement value
* is provided, test if the refinementList contains any refinement for the
* given attribute.
* @param {RefinementList} refinementList the list of refinement
* @param {string} attribute name of the attribute
* @param {string} [refinementValue] value of the filter/refinement
* @return {boolean}
*/
isRefined: function isRefined(refinementList, attribute, refinementValue) {
var indexOf = indexOf_1;
var containsRefinements = !!refinementList[attribute] &&
refinementList[attribute].length > 0;
if (isUndefined_1(refinementValue) || !containsRefinements) {
return containsRefinements;
}
var refinementValueAsString = '' + refinementValue;
return indexOf(refinementList[attribute], refinementValueAsString) !== -1;
}
};
var RefinementList = lib;
/**
* like _.find but using _.isEqual to be able to use it
* to find arrays.
* @private
* @param {any[]} array array to search into
* @param {any} searchedValue the value we're looking for
* @return {any} the searched value or undefined
*/
function findArray(array, searchedValue) {
return find_1(array, function(currentValue) {
return isEqual_1(currentValue, searchedValue);
});
}
/**
* The facet list is the structure used to store the list of values used to
* filter a single attribute.
* @typedef {string[]} SearchParameters.FacetList
*/
/**
* Structure to store numeric filters with the operator as the key. The supported operators
* are `=`, `>`, `<`, `>=`, `<=` and `!=`.
* @typedef {Object.<string, Array.<number|number[]>>} SearchParameters.OperatorList
*/
/**
* SearchParameters is the data structure that contains all the information
* usable for making a search to Algolia API. It doesn't do the search itself,
* nor does it contains logic about the parameters.
* It is an immutable object, therefore it has been created in a way that each
* changes does not change the object itself but returns a copy with the
* modification.
* This object should probably not be instantiated outside of the helper. It will
* be provided when needed. This object is documented for reference as you'll
* get it from events generated by the {@link AlgoliaSearchHelper}.
* If need be, instantiate the Helper from the factory function {@link SearchParameters.make}
* @constructor
* @classdesc contains all the parameters of a search
* @param {object|SearchParameters} newParameters existing parameters or partial object
* for the properties of a new SearchParameters
* @see SearchParameters.make
* @example <caption>SearchParameters of the first query in
* <a href="http://demos.algolia.com/instant-search-demo/">the instant search demo</a></caption>
{
"query": "",
"disjunctiveFacets": [
"customerReviewCount",
"category",
"salePrice_range",
"manufacturer"
],
"maxValuesPerFacet": 30,
"page": 0,
"hitsPerPage": 10,
"facets": [
"type",
"shipping"
]
}
*/
function SearchParameters(newParameters) {
var params = newParameters ? SearchParameters._parseNumbers(newParameters) : {};
/**
* Targeted index. This parameter is mandatory.
* @member {string}
*/
this.index = params.index || '';
// Query
/**
* Query string of the instant search. The empty string is a valid query.
* @member {string}
* @see https://www.algolia.com/doc/rest#param-query
*/
this.query = params.query || '';
// Facets
/**
* This attribute contains the list of all the conjunctive facets
* used. This list will be added to requested facets in the
* [facets attribute](https://www.algolia.com/doc/rest-api/search#param-facets) sent to algolia.
* @member {string[]}
*/
this.facets = params.facets || [];
/**
* This attribute contains the list of all the disjunctive facets
* used. This list will be added to requested facets in the
* [facets attribute](https://www.algolia.com/doc/rest-api/search#param-facets) sent to algolia.
* @member {string[]}
*/
this.disjunctiveFacets = params.disjunctiveFacets || [];
/**
* This attribute contains the list of all the hierarchical facets
* used. This list will be added to requested facets in the
* [facets attribute](https://www.algolia.com/doc/rest-api/search#param-facets) sent to algolia.
* Hierarchical facets are a sub type of disjunctive facets that
* let you filter faceted attributes hierarchically.
* @member {string[]|object[]}
*/
this.hierarchicalFacets = params.hierarchicalFacets || [];
// Refinements
/**
* This attribute contains all the filters that need to be
* applied on the conjunctive facets. Each facet must be properly
* defined in the `facets` attribute.
*
* The key is the name of the facet, and the `FacetList` contains all
* filters selected for the associated facet name.
*
* When querying algolia, the values stored in this attribute will
* be translated into the `facetFilters` attribute.
* @member {Object.<string, SearchParameters.FacetList>}
*/
this.facetsRefinements = params.facetsRefinements || {};
/**
* This attribute contains all the filters that need to be
* excluded from the conjunctive facets. Each facet must be properly
* defined in the `facets` attribute.
*
* The key is the name of the facet, and the `FacetList` contains all
* filters excluded for the associated facet name.
*
* When querying algolia, the values stored in this attribute will
* be translated into the `facetFilters` attribute.
* @member {Object.<string, SearchParameters.FacetList>}
*/
this.facetsExcludes = params.facetsExcludes || {};
/**
* This attribute contains all the filters that need to be
* applied on the disjunctive facets. Each facet must be properly
* defined in the `disjunctiveFacets` attribute.
*
* The key is the name of the facet, and the `FacetList` contains all
* filters selected for the associated facet name.
*
* When querying algolia, the values stored in this attribute will
* be translated into the `facetFilters` attribute.
* @member {Object.<string, SearchParameters.FacetList>}
*/
this.disjunctiveFacetsRefinements = params.disjunctiveFacetsRefinements || {};
/**
* This attribute contains all the filters that need to be
* applied on the numeric attributes.
*
* The key is the name of the attribute, and the value is the
* filters to apply to this attribute.
*
* When querying algolia, the values stored in this attribute will
* be translated into the `numericFilters` attribute.
* @member {Object.<string, SearchParameters.OperatorList>}
*/
this.numericRefinements = params.numericRefinements || {};
/**
* This attribute contains all the tags used to refine the query.
*
* When querying algolia, the values stored in this attribute will
* be translated into the `tagFilters` attribute.
* @member {string[]}
*/
this.tagRefinements = params.tagRefinements || [];
/**
* This attribute contains all the filters that need to be
* applied on the hierarchical facets. Each facet must be properly
* defined in the `hierarchicalFacets` attribute.
*
* The key is the name of the facet, and the `FacetList` contains all
* filters selected for the associated facet name. The FacetList values
* are structured as a string that contain the values for each level
* separated by the configured separator.
*
* When querying algolia, the values stored in this attribute will
* be translated into the `facetFilters` attribute.
* @member {Object.<string, SearchParameters.FacetList>}
*/
this.hierarchicalFacetsRefinements = params.hierarchicalFacetsRefinements || {};
/**
* Contains the numeric filters in the raw format of the Algolia API. Setting
* this parameter is not compatible with the usage of numeric filters methods.
* @see https://www.algolia.com/doc/javascript#numericFilters
* @member {string}
*/
this.numericFilters = params.numericFilters;
/**
* Contains the tag filters in the raw format of the Algolia API. Setting this
* parameter is not compatible with the of the add/remove/toggle methods of the
* tag api.
* @see https://www.algolia.com/doc/rest#param-tagFilters
* @member {string}
*/
this.tagFilters = params.tagFilters;
/**
* Contains the optional tag filters in the raw format of the Algolia API.
* @see https://www.algolia.com/doc/rest#param-tagFilters
* @member {string}
*/
this.optionalTagFilters = params.optionalTagFilters;
/**
* Contains the optional facet filters in the raw format of the Algolia API.
* @see https://www.algolia.com/doc/rest#param-tagFilters
* @member {string}
*/
this.optionalFacetFilters = params.optionalFacetFilters;
// Misc. parameters
/**
* Number of hits to be returned by the search API
* @member {number}
* @see https://www.algolia.com/doc/rest#param-hitsPerPage
*/
this.hitsPerPage = params.hitsPerPage;
/**
* Number of values for each faceted attribute
* @member {number}
* @see https://www.algolia.com/doc/rest#param-maxValuesPerFacet
*/
this.maxValuesPerFacet = params.maxValuesPerFacet;
/**
* The current page number
* @member {number}
* @see https://www.algolia.com/doc/rest#param-page
*/
this.page = params.page || 0;
/**
* How the query should be treated by the search engine.
* Possible values: prefixAll, prefixLast, prefixNone
* @see https://www.algolia.com/doc/rest#param-queryType
* @member {string}
*/
this.queryType = params.queryType;
/**
* How the typo tolerance behave in the search engine.
* Possible values: true, false, min, strict
* @see https://www.algolia.com/doc/rest#param-typoTolerance
* @member {string}
*/
this.typoTolerance = params.typoTolerance;
/**
* Number of characters to wait before doing one character replacement.
* @see https://www.algolia.com/doc/rest#param-minWordSizefor1Typo
* @member {number}
*/
this.minWordSizefor1Typo = params.minWordSizefor1Typo;
/**
* Number of characters to wait before doing a second character replacement.
* @see https://www.algolia.com/doc/rest#param-minWordSizefor2Typos
* @member {number}
*/
this.minWordSizefor2Typos = params.minWordSizefor2Typos;
/**
* Configure the precision of the proximity ranking criterion
* @see https://www.algolia.com/doc/rest#param-minProximity
*/
this.minProximity = params.minProximity;
/**
* Should the engine allow typos on numerics.
* @see https://www.algolia.com/doc/rest#param-allowTyposOnNumericTokens
* @member {boolean}
*/
this.allowTyposOnNumericTokens = params.allowTyposOnNumericTokens;
/**
* Should the plurals be ignored
* @see https://www.algolia.com/doc/rest#param-ignorePlurals
* @member {boolean}
*/
this.ignorePlurals = params.ignorePlurals;
/**
* Restrict which attribute is searched.
* @see https://www.algolia.com/doc/rest#param-restrictSearchableAttributes
* @member {string}
*/
this.restrictSearchableAttributes = params.restrictSearchableAttributes;
/**
* Enable the advanced syntax.
* @see https://www.algolia.com/doc/rest#param-advancedSyntax
* @member {boolean}
*/
this.advancedSyntax = params.advancedSyntax;
/**
* Enable the analytics
* @see https://www.algolia.com/doc/rest#param-analytics
* @member {boolean}
*/
this.analytics = params.analytics;
/**
* Tag of the query in the analytics.
* @see https://www.algolia.com/doc/rest#param-analyticsTags
* @member {string}
*/
this.analyticsTags = params.analyticsTags;
/**
* Enable the synonyms
* @see https://www.algolia.com/doc/rest#param-synonyms
* @member {boolean}
*/
this.synonyms = params.synonyms;
/**
* Should the engine replace the synonyms in the highlighted results.
* @see https://www.algolia.com/doc/rest#param-replaceSynonymsInHighlight
* @member {boolean}
*/
this.replaceSynonymsInHighlight = params.replaceSynonymsInHighlight;
/**
* Add some optional words to those defined in the dashboard
* @see https://www.algolia.com/doc/rest#param-optionalWords
* @member {string}
*/
this.optionalWords = params.optionalWords;
/**
* Possible values are "lastWords" "firstWords" "allOptional" "none" (default)
* @see https://www.algolia.com/doc/rest#param-removeWordsIfNoResults
* @member {string}
*/
this.removeWordsIfNoResults = params.removeWordsIfNoResults;
/**
* List of attributes to retrieve
* @see https://www.algolia.com/doc/rest#param-attributesToRetrieve
* @member {string}
*/
this.attributesToRetrieve = params.attributesToRetrieve;
/**
* List of attributes to highlight
* @see https://www.algolia.com/doc/rest#param-attributesToHighlight
* @member {string}
*/
this.attributesToHighlight = params.attributesToHighlight;
/**
* Code to be embedded on the left part of the highlighted results
* @see https://www.algolia.com/doc/rest#param-highlightPreTag
* @member {string}
*/
this.highlightPreTag = params.highlightPreTag;
/**
* Code to be embedded on the right part of the highlighted results
* @see https://www.algolia.com/doc/rest#param-highlightPostTag
* @member {string}
*/
this.highlightPostTag = params.highlightPostTag;
/**
* List of attributes to snippet
* @see https://www.algolia.com/doc/rest#param-attributesToSnippet
* @member {string}
*/
this.attributesToSnippet = params.attributesToSnippet;
/**
* Enable the ranking informations in the response, set to 1 to activate
* @see https://www.algolia.com/doc/rest#param-getRankingInfo
* @member {number}
*/
this.getRankingInfo = params.getRankingInfo;
/**
* Remove duplicates based on the index setting attributeForDistinct
* @see https://www.algolia.com/doc/rest#param-distinct
* @member {boolean|number}
*/
this.distinct = params.distinct;
/**
* Center of the geo search.
* @see https://www.algolia.com/doc/rest#param-aroundLatLng
* @member {string}
*/
this.aroundLatLng = params.aroundLatLng;
/**
* Center of the search, retrieve from the user IP.
* @see https://www.algolia.com/doc/rest#param-aroundLatLngViaIP
* @member {boolean}
*/
this.aroundLatLngViaIP = params.aroundLatLngViaIP;
/**
* Radius of the geo search.
* @see https://www.algolia.com/doc/rest#param-aroundRadius
* @member {number}
*/
this.aroundRadius = params.aroundRadius;
/**
* Precision of the geo search.
* @see https://www.algolia.com/doc/rest#param-aroundPrecision
* @member {number}
*/
this.minimumAroundRadius = params.minimumAroundRadius;
/**
* Precision of the geo search.
* @see https://www.algolia.com/doc/rest#param-minimumAroundRadius
* @member {number}
*/
this.aroundPrecision = params.aroundPrecision;
/**
* Geo search inside a box.
* @see https://www.algolia.com/doc/rest#param-insideBoundingBox
* @member {string}
*/
this.insideBoundingBox = params.insideBoundingBox;
/**
* Geo search inside a polygon.
* @see https://www.algolia.com/doc/rest#param-insidePolygon
* @member {string}
*/
this.insidePolygon = params.insidePolygon;
/**
* Allows to specify an ellipsis character for the snippet when we truncate the text
* (added before and after if truncated).
* The default value is an empty string and we recommend to set it to "…"
* @see https://www.algolia.com/doc/rest#param-insidePolygon
* @member {string}
*/
this.snippetEllipsisText = params.snippetEllipsisText;
/**
* Allows to specify some attributes name on which exact won't be applied.
* Attributes are separated with a comma (for example "name,address" ), you can also use a
* JSON string array encoding (for example encodeURIComponent('["name","address"]') ).
* By default the list is empty.
* @see https://www.algolia.com/doc/rest#param-disableExactOnAttributes
* @member {string|string[]}
*/
this.disableExactOnAttributes = params.disableExactOnAttributes;
/**
* Applies 'exact' on single word queries if the word contains at least 3 characters
* and is not a stop word.
* Can take two values: true or false.
* By default, its set to false.
* @see https://www.algolia.com/doc/rest#param-enableExactOnSingleWordQuery
* @member {boolean}
*/
this.enableExactOnSingleWordQuery = params.enableExactOnSingleWordQuery;
// Undocumented parameters, still needed otherwise we fail
this.offset = params.offset;
this.length = params.length;
var self = this;
forOwn_1(params, function checkForUnknownParameter(paramValue, paramName) {
if (SearchParameters.PARAMETERS.indexOf(paramName) === -1) {
self[paramName] = paramValue;
}
});
}
/**
* List all the properties in SearchParameters and therefore all the known Algolia properties
* This doesn't contain any beta/hidden features.
* @private
*/
SearchParameters.PARAMETERS = keys_1(new SearchParameters());
/**
* @private
* @param {object} partialState full or part of a state
* @return {object} a new object with the number keys as number
*/
SearchParameters._parseNumbers = function(partialState) {
// Do not reparse numbers in SearchParameters, they ought to be parsed already
if (partialState instanceof SearchParameters) return partialState;
var numbers = {};
var numberKeys = [
'aroundPrecision',
'aroundRadius',
'getRankingInfo',
'minWordSizefor2Typos',
'minWordSizefor1Typo',
'page',
'maxValuesPerFacet',
'distinct',
'minimumAroundRadius',
'hitsPerPage',
'minProximity'
];
forEach_1(numberKeys, function(k) {
var value = partialState[k];
if (isString_1(value)) {
var parsedValue = parseFloat(value);
numbers[k] = _isNaN(parsedValue) ? value : parsedValue;
}
});
if (partialState.numericRefinements) {
var numericRefinements = {};
forEach_1(partialState.numericRefinements, function(operators, attribute) {
numericRefinements[attribute] = {};
forEach_1(operators, function(values, operator) {
var parsedValues = map_1(values, function(v) {
if (isArray_1(v)) {
return map_1(v, function(vPrime) {
if (isString_1(vPrime)) {
return parseFloat(vPrime);
}
return vPrime;
});
} else if (isString_1(v)) {
return parseFloat(v);
}
return v;
});
numericRefinements[attribute][operator] = parsedValues;
});
});
numbers.numericRefinements = numericRefinements;
}
return merge_1({}, partialState, numbers);
};
/**
* Factory for SearchParameters
* @param {object|SearchParameters} newParameters existing parameters or partial
* object for the properties of a new SearchParameters
* @return {SearchParameters} frozen instance of SearchParameters
*/
SearchParameters.make = function makeSearchParameters(newParameters) {
var instance = new SearchParameters(newParameters);
forEach_1(newParameters.hierarchicalFacets, function(facet) {
if (facet.rootPath) {
var currentRefinement = instance.getHierarchicalRefinement(facet.name);
if (currentRefinement.length > 0 && currentRefinement[0].indexOf(facet.rootPath) !== 0) {
instance = instance.clearRefinements(facet.name);
}
// get it again in case it has been cleared
currentRefinement = instance.getHierarchicalRefinement(facet.name);
if (currentRefinement.length === 0) {
instance = instance.toggleHierarchicalFacetRefinement(facet.name, facet.rootPath);
}
}
});
return instance;
};
/**
* Validates the new parameters based on the previous state
* @param {SearchParameters} currentState the current state
* @param {object|SearchParameters} parameters the new parameters to set
* @return {Error|null} Error if the modification is invalid, null otherwise
*/
SearchParameters.validate = function(currentState, parameters) {
var params = parameters || {};
if (currentState.tagFilters && params.tagRefinements && params.tagRefinements.length > 0) {
return new Error(
'[Tags] Cannot switch from the managed tag API to the advanced API. It is probably ' +
'an error, if it is really what you want, you should first clear the tags with clearTags method.');
}
if (currentState.tagRefinements.length > 0 && params.tagFilters) {
return new Error(
'[Tags] Cannot switch from the advanced tag API to the managed API. It is probably ' +
'an error, if it is not, you should first clear the tags with clearTags method.');
}
if (currentState.numericFilters && params.numericRefinements && !isEmpty_1(params.numericRefinements)) {
return new Error(
"[Numeric filters] Can't switch from the advanced to the managed API. It" +
' is probably an error, if this is really what you want, you have to first' +
' clear the numeric filters.');
}
if (!isEmpty_1(currentState.numericRefinements) && params.numericFilters) {
return new Error(
"[Numeric filters] Can't switch from the managed API to the advanced. It" +
' is probably an error, if this is really what you want, you have to first' +
' clear the numeric filters.');
}
return null;
};
SearchParameters.prototype = {
constructor: SearchParameters,
/**
* Remove all refinements (disjunctive + conjunctive + excludes + numeric filters)
* @method
* @param {undefined|string|SearchParameters.clearCallback} [attribute] optional string or function
* - If not given, means to clear all the filters.
* - If `string`, means to clear all refinements for the `attribute` named filter.
* - If `function`, means to clear all the refinements that return truthy values.
* @return {SearchParameters}
*/
clearRefinements: function clearRefinements(attribute) {
var clear = RefinementList.clearRefinement;
return this.setQueryParameters({
numericRefinements: this._clearNumericRefinements(attribute),
facetsRefinements: clear(this.facetsRefinements, attribute, 'conjunctiveFacet'),
facetsExcludes: clear(this.facetsExcludes, attribute, 'exclude'),
disjunctiveFacetsRefinements: clear(this.disjunctiveFacetsRefinements, attribute, 'disjunctiveFacet'),
hierarchicalFacetsRefinements: clear(this.hierarchicalFacetsRefinements, attribute, 'hierarchicalFacet')
});
},
/**
* Remove all the refined tags from the SearchParameters
* @method
* @return {SearchParameters}
*/
clearTags: function clearTags() {
if (this.tagFilters === undefined && this.tagRefinements.length === 0) return this;
return this.setQueryParameters({
tagFilters: undefined,
tagRefinements: []
});
},
/**
* Set the index.
* @method
* @param {string} index the index name
* @return {SearchParameters}
*/
setIndex: function setIndex(index) {
if (index === this.index) return this;
return this.setQueryParameters({
index: index
});
},
/**
* Query setter
* @method
* @param {string} newQuery value for the new query
* @return {SearchParameters}
*/
setQuery: function setQuery(newQuery) {
if (newQuery === this.query) return this;
return this.setQueryParameters({
query: newQuery
});
},
/**
* Page setter
* @method
* @param {number} newPage new page number
* @return {SearchParameters}
*/
setPage: function setPage(newPage) {
if (newPage === this.page) return this;
return this.setQueryParameters({
page: newPage
});
},
/**
* Facets setter
* The facets are the simple facets, used for conjunctive (and) faceting.
* @method
* @param {string[]} facets all the attributes of the algolia records used for conjunctive faceting
* @return {SearchParameters}
*/
setFacets: function setFacets(facets) {
return this.setQueryParameters({
facets: facets
});
},
/**
* Disjunctive facets setter
* Change the list of disjunctive (or) facets the helper chan handle.
* @method
* @param {string[]} facets all the attributes of the algolia records used for disjunctive faceting
* @return {SearchParameters}
*/
setDisjunctiveFacets: function setDisjunctiveFacets(facets) {
return this.setQueryParameters({
disjunctiveFacets: facets
});
},
/**
* HitsPerPage setter
* Hits per page represents the number of hits retrieved for this query
* @method
* @param {number} n number of hits retrieved per page of results
* @return {SearchParameters}
*/
setHitsPerPage: function setHitsPerPage(n) {
if (this.hitsPerPage === n) return this;
return this.setQueryParameters({
hitsPerPage: n
});
},
/**
* typoTolerance setter
* Set the value of typoTolerance
* @method
* @param {string} typoTolerance new value of typoTolerance ("true", "false", "min" or "strict")
* @return {SearchParameters}
*/
setTypoTolerance: function setTypoTolerance(typoTolerance) {
if (this.typoTolerance === typoTolerance) return this;
return this.setQueryParameters({
typoTolerance: typoTolerance
});
},
/**
* Add a numeric filter for a given attribute
* When value is an array, they are combined with OR
* When value is a single value, it will combined with AND
* @method
* @param {string} attribute attribute to set the filter on
* @param {string} operator operator of the filter (possible values: =, >, >=, <, <=, !=)
* @param {number | number[]} value value of the filter
* @return {SearchParameters}
* @example
* // for price = 50 or 40
* searchparameter.addNumericRefinement('price', '=', [50, 40]);
* @example
* // for size = 38 and 40
* searchparameter.addNumericRefinement('size', '=', 38);
* searchparameter.addNumericRefinement('size', '=', 40);
*/
addNumericRefinement: function(attribute, operator, v) {
var value = valToNumber_1(v);
if (this.isNumericRefined(attribute, operator, value)) return this;
var mod = merge_1({}, this.numericRefinements);
mod[attribute] = merge_1({}, mod[attribute]);
if (mod[attribute][operator]) {
// Array copy
mod[attribute][operator] = mod[attribute][operator].slice();
// Add the element. Concat can't be used here because value can be an array.
mod[attribute][operator].push(value);
} else {
mod[attribute][operator] = [value];
}
return this.setQueryParameters({
numericRefinements: mod
});
},
/**
* Get the list of conjunctive refinements for a single facet
* @param {string} facetName name of the attribute used for faceting
* @return {string[]} list of refinements
*/
getConjunctiveRefinements: function(facetName) {
if (!this.isConjunctiveFacet(facetName)) {
throw new Error(facetName + ' is not defined in the facets attribute of the helper configuration');
}
return this.facetsRefinements[facetName] || [];
},
/**
* Get the list of disjunctive refinements for a single facet
* @param {string} facetName name of the attribute used for faceting
* @return {string[]} list of refinements
*/
getDisjunctiveRefinements: function(facetName) {
if (!this.isDisjunctiveFacet(facetName)) {
throw new Error(
facetName + ' is not defined in the disjunctiveFacets attribute of the helper configuration'
);
}
return this.disjunctiveFacetsRefinements[facetName] || [];
},
/**
* Get the list of hierarchical refinements for a single facet
* @param {string} facetName name of the attribute used for faceting
* @return {string[]} list of refinements
*/
getHierarchicalRefinement: function(facetName) {
// we send an array but we currently do not support multiple
// hierarchicalRefinements for a hierarchicalFacet
return this.hierarchicalFacetsRefinements[facetName] || [];
},
/**
* Get the list of exclude refinements for a single facet
* @param {string} facetName name of the attribute used for faceting
* @return {string[]} list of refinements
*/
getExcludeRefinements: function(facetName) {
if (!this.isConjunctiveFacet(facetName)) {
throw new Error(facetName + ' is not defined in the facets attribute of the helper configuration');
}
return this.facetsExcludes[facetName] || [];
},
/**
* Remove all the numeric filter for a given (attribute, operator)
* @method
* @param {string} attribute attribute to set the filter on
* @param {string} [operator] operator of the filter (possible values: =, >, >=, <, <=, !=)
* @param {number} [number] the value to be removed
* @return {SearchParameters}
*/
removeNumericRefinement: function(attribute, operator, paramValue) {
if (paramValue !== undefined) {
var paramValueAsNumber = valToNumber_1(paramValue);
if (!this.isNumericRefined(attribute, operator, paramValueAsNumber)) return this;
return this.setQueryParameters({
numericRefinements: this._clearNumericRefinements(function(value, key) {
return key === attribute && value.op === operator && isEqual_1(value.val, paramValueAsNumber);
})
});
} else if (operator !== undefined) {
if (!this.isNumericRefined(attribute, operator)) return this;
return this.setQueryParameters({
numericRefinements: this._clearNumericRefinements(function(value, key) {
return key === attribute && value.op === operator;
})
});
}
if (!this.isNumericRefined(attribute)) return this;
return this.setQueryParameters({
numericRefinements: this._clearNumericRefinements(function(value, key) {
return key === attribute;
})
});
},
/**
* Get the list of numeric refinements for a single facet
* @param {string} facetName name of the attribute used for faceting
* @return {SearchParameters.OperatorList[]} list of refinements
*/
getNumericRefinements: function(facetName) {
return this.numericRefinements[facetName] || {};
},
/**
* Return the current refinement for the (attribute, operator)
* @param {string} attribute of the record
* @param {string} operator applied
* @return {number} value of the refinement
*/
getNumericRefinement: function(attribute, operator) {
return this.numericRefinements[attribute] && this.numericRefinements[attribute][operator];
},
/**
* Clear numeric filters.
* @method
* @private
* @param {string|SearchParameters.clearCallback} [attribute] optional string or function
* - If not given, means to clear all the filters.
* - If `string`, means to clear all refinements for the `attribute` named filter.
* - If `function`, means to clear all the refinements that return truthy values.
* @return {Object.<string, OperatorList>}
*/
_clearNumericRefinements: function _clearNumericRefinements(attribute) {
if (isUndefined_1(attribute)) {
return {};
} else if (isString_1(attribute)) {
return omit_1(this.numericRefinements, attribute);
} else if (isFunction_1(attribute)) {
return reduce_1(this.numericRefinements, function(memo, operators, key) {
var operatorList = {};
forEach_1(operators, function(values, operator) {
var outValues = [];
forEach_1(values, function(value) {
var predicateResult = attribute({val: value, op: operator}, key, 'numeric');
if (!predicateResult) outValues.push(value);
});
if (!isEmpty_1(outValues)) operatorList[operator] = outValues;
});
if (!isEmpty_1(operatorList)) memo[key] = operatorList;
return memo;
}, {});
}
},
/**
* Add a facet to the facets attribute of the helper configuration, if it
* isn't already present.
* @method
* @param {string} facet facet name to add
* @return {SearchParameters}
*/
addFacet: function addFacet(facet) {
if (this.isConjunctiveFacet(facet)) {
return this;
}
return this.setQueryParameters({
facets: this.facets.concat([facet])
});
},
/**
* Add a disjunctive facet to the disjunctiveFacets attribute of the helper
* configuration, if it isn't already present.
* @method
* @param {string} facet disjunctive facet name to add
* @return {SearchParameters}
*/
addDisjunctiveFacet: function addDisjunctiveFacet(facet) {
if (this.isDisjunctiveFacet(facet)) {
return this;
}
return this.setQueryParameters({
disjunctiveFacets: this.disjunctiveFacets.concat([facet])
});
},
/**
* Add a hierarchical facet to the hierarchicalFacets attribute of the helper
* configuration.
* @method
* @param {object} hierarchicalFacet hierarchical facet to add
* @return {SearchParameters}
* @throws will throw an error if a hierarchical facet with the same name was already declared
*/
addHierarchicalFacet: function addHierarchicalFacet(hierarchicalFacet) {
if (this.isHierarchicalFacet(hierarchicalFacet.name)) {
throw new Error(
'Cannot declare two hierarchical facets with the same name: `' + hierarchicalFacet.name + '`');
}
return this.setQueryParameters({
hierarchicalFacets: this.hierarchicalFacets.concat([hierarchicalFacet])
});
},
/**
* Add a refinement on a "normal" facet
* @method
* @param {string} facet attribute to apply the faceting on
* @param {string} value value of the attribute (will be converted to string)
* @return {SearchParameters}
*/
addFacetRefinement: function addFacetRefinement(facet, value) {
if (!this.isConjunctiveFacet(facet)) {
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
}
if (RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
return this.setQueryParameters({
facetsRefinements: RefinementList.addRefinement(this.facetsRefinements, facet, value)
});
},
/**
* Exclude a value from a "normal" facet
* @method
* @param {string} facet attribute to apply the exclusion on
* @param {string} value value of the attribute (will be converted to string)
* @return {SearchParameters}
*/
addExcludeRefinement: function addExcludeRefinement(facet, value) {
if (!this.isConjunctiveFacet(facet)) {
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
}
if (RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
return this.setQueryParameters({
facetsExcludes: RefinementList.addRefinement(this.facetsExcludes, facet, value)
});
},
/**
* Adds a refinement on a disjunctive facet.
* @method
* @param {string} facet attribute to apply the faceting on
* @param {string} value value of the attribute (will be converted to string)
* @return {SearchParameters}
*/
addDisjunctiveFacetRefinement: function addDisjunctiveFacetRefinement(facet, value) {
if (!this.isDisjunctiveFacet(facet)) {
throw new Error(
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
}
if (RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
return this.setQueryParameters({
disjunctiveFacetsRefinements: RefinementList.addRefinement(
this.disjunctiveFacetsRefinements, facet, value)
});
},
/**
* addTagRefinement adds a tag to the list used to filter the results
* @param {string} tag tag to be added
* @return {SearchParameters}
*/
addTagRefinement: function addTagRefinement(tag) {
if (this.isTagRefined(tag)) return this;
var modification = {
tagRefinements: this.tagRefinements.concat(tag)
};
return this.setQueryParameters(modification);
},
/**
* Remove a facet from the facets attribute of the helper configuration, if it
* is present.
* @method
* @param {string} facet facet name to remove
* @return {SearchParameters}
*/
removeFacet: function removeFacet(facet) {
if (!this.isConjunctiveFacet(facet)) {
return this;
}
return this.clearRefinements(facet).setQueryParameters({
facets: filter_1(this.facets, function(f) {
return f !== facet;
})
});
},
/**
* Remove a disjunctive facet from the disjunctiveFacets attribute of the
* helper configuration, if it is present.
* @method
* @param {string} facet disjunctive facet name to remove
* @return {SearchParameters}
*/
removeDisjunctiveFacet: function removeDisjunctiveFacet(facet) {
if (!this.isDisjunctiveFacet(facet)) {
return this;
}
return this.clearRefinements(facet).setQueryParameters({
disjunctiveFacets: filter_1(this.disjunctiveFacets, function(f) {
return f !== facet;
})
});
},
/**
* Remove a hierarchical facet from the hierarchicalFacets attribute of the
* helper configuration, if it is present.
* @method
* @param {string} facet hierarchical facet name to remove
* @return {SearchParameters}
*/
removeHierarchicalFacet: function removeHierarchicalFacet(facet) {
if (!this.isHierarchicalFacet(facet)) {
return this;
}
return this.clearRefinements(facet).setQueryParameters({
hierarchicalFacets: filter_1(this.hierarchicalFacets, function(f) {
return f.name !== facet;
})
});
},
/**
* Remove a refinement set on facet. If a value is provided, it will clear the
* refinement for the given value, otherwise it will clear all the refinement
* values for the faceted attribute.
* @method
* @param {string} facet name of the attribute used for faceting
* @param {string} [value] value used to filter
* @return {SearchParameters}
*/
removeFacetRefinement: function removeFacetRefinement(facet, value) {
if (!this.isConjunctiveFacet(facet)) {
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
}
if (!RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
return this.setQueryParameters({
facetsRefinements: RefinementList.removeRefinement(this.facetsRefinements, facet, value)
});
},
/**
* Remove a negative refinement on a facet
* @method
* @param {string} facet name of the attribute used for faceting
* @param {string} value value used to filter
* @return {SearchParameters}
*/
removeExcludeRefinement: function removeExcludeRefinement(facet, value) {
if (!this.isConjunctiveFacet(facet)) {
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
}
if (!RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
return this.setQueryParameters({
facetsExcludes: RefinementList.removeRefinement(this.facetsExcludes, facet, value)
});
},
/**
* Remove a refinement on a disjunctive facet
* @method
* @param {string} facet name of the attribute used for faceting
* @param {string} value value used to filter
* @return {SearchParameters}
*/
removeDisjunctiveFacetRefinement: function removeDisjunctiveFacetRefinement(facet, value) {
if (!this.isDisjunctiveFacet(facet)) {
throw new Error(
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
}
if (!RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
return this.setQueryParameters({
disjunctiveFacetsRefinements: RefinementList.removeRefinement(
this.disjunctiveFacetsRefinements, facet, value)
});
},
/**
* Remove a tag from the list of tag refinements
* @method
* @param {string} tag the tag to remove
* @return {SearchParameters}
*/
removeTagRefinement: function removeTagRefinement(tag) {
if (!this.isTagRefined(tag)) return this;
var modification = {
tagRefinements: filter_1(this.tagRefinements, function(t) { return t !== tag; })
};
return this.setQueryParameters(modification);
},
/**
* Generic toggle refinement method to use with facet, disjunctive facets
* and hierarchical facets
* @param {string} facet the facet to refine
* @param {string} value the associated value
* @return {SearchParameters}
* @throws will throw an error if the facet is not declared in the settings of the helper
* @deprecated since version 2.19.0, see {@link SearchParameters#toggleFacetRefinement}
*/
toggleRefinement: function toggleRefinement(facet, value) {
return this.toggleFacetRefinement(facet, value);
},
/**
* Generic toggle refinement method to use with facet, disjunctive facets
* and hierarchical facets
* @param {string} facet the facet to refine
* @param {string} value the associated value
* @return {SearchParameters}
* @throws will throw an error if the facet is not declared in the settings of the helper
*/
toggleFacetRefinement: function toggleFacetRefinement(facet, value) {
if (this.isHierarchicalFacet(facet)) {
return this.toggleHierarchicalFacetRefinement(facet, value);
} else if (this.isConjunctiveFacet(facet)) {
return this.toggleConjunctiveFacetRefinement(facet, value);
} else if (this.isDisjunctiveFacet(facet)) {
return this.toggleDisjunctiveFacetRefinement(facet, value);
}
throw new Error('Cannot refine the undeclared facet ' + facet +
'; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets');
},
/**
* Switch the refinement applied over a facet/value
* @method
* @param {string} facet name of the attribute used for faceting
* @param {value} value value used for filtering
* @return {SearchParameters}
*/
toggleConjunctiveFacetRefinement: function toggleConjunctiveFacetRefinement(facet, value) {
if (!this.isConjunctiveFacet(facet)) {
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
}
return this.setQueryParameters({
facetsRefinements: RefinementList.toggleRefinement(this.facetsRefinements, facet, value)
});
},
/**
* Switch the refinement applied over a facet/value
* @method
* @param {string} facet name of the attribute used for faceting
* @param {value} value value used for filtering
* @return {SearchParameters}
*/
toggleExcludeFacetRefinement: function toggleExcludeFacetRefinement(facet, value) {
if (!this.isConjunctiveFacet(facet)) {
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
}
return this.setQueryParameters({
facetsExcludes: RefinementList.toggleRefinement(this.facetsExcludes, facet, value)
});
},
/**
* Switch the refinement applied over a facet/value
* @method
* @param {string} facet name of the attribute used for faceting
* @param {value} value value used for filtering
* @return {SearchParameters}
*/
toggleDisjunctiveFacetRefinement: function toggleDisjunctiveFacetRefinement(facet, value) {
if (!this.isDisjunctiveFacet(facet)) {
throw new Error(
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
}
return this.setQueryParameters({
disjunctiveFacetsRefinements: RefinementList.toggleRefinement(
this.disjunctiveFacetsRefinements, facet, value)
});
},
/**
* Switch the refinement applied over a facet/value
* @method
* @param {string} facet name of the attribute used for faceting
* @param {value} value value used for filtering
* @return {SearchParameters}
*/
toggleHierarchicalFacetRefinement: function toggleHierarchicalFacetRefinement(facet, value) {
if (!this.isHierarchicalFacet(facet)) {
throw new Error(
facet + ' is not defined in the hierarchicalFacets attribute of the helper configuration');
}
var separator = this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(facet));
var mod = {};
var upOneOrMultipleLevel = this.hierarchicalFacetsRefinements[facet] !== undefined &&
this.hierarchicalFacetsRefinements[facet].length > 0 && (
// remove current refinement:
// refinement was 'beer > IPA', call is toggleRefine('beer > IPA'), refinement should be `beer`
this.hierarchicalFacetsRefinements[facet][0] === value ||
// remove a parent refinement of the current refinement:
// - refinement was 'beer > IPA > Flying dog'
// - call is toggleRefine('beer > IPA')
// - refinement should be `beer`
this.hierarchicalFacetsRefinements[facet][0].indexOf(value + separator) === 0
);
if (upOneOrMultipleLevel) {
if (value.indexOf(separator) === -1) {
// go back to root level
mod[facet] = [];
} else {
mod[facet] = [value.slice(0, value.lastIndexOf(separator))];
}
} else {
mod[facet] = [value];
}
return this.setQueryParameters({
hierarchicalFacetsRefinements: defaults_1({}, mod, this.hierarchicalFacetsRefinements)
});
},
/**
* Adds a refinement on a hierarchical facet.
* @param {string} facet the facet name
* @param {string} path the hierarchical facet path
* @return {SearchParameter} the new state
* @throws Error if the facet is not defined or if the facet is refined
*/
addHierarchicalFacetRefinement: function(facet, path) {
if (this.isHierarchicalFacetRefined(facet)) {
throw new Error(facet + ' is already refined.');
}
var mod = {};
mod[facet] = [path];
return this.setQueryParameters({
hierarchicalFacetsRefinements: defaults_1({}, mod, this.hierarchicalFacetsRefinements)
});
},
/**
* Removes the refinement set on a hierarchical facet.
* @param {string} facet the facet name
* @return {SearchParameter} the new state
* @throws Error if the facet is not defined or if the facet is not refined
*/
removeHierarchicalFacetRefinement: function(facet) {
if (!this.isHierarchicalFacetRefined(facet)) {
throw new Error(facet + ' is not refined.');
}
var mod = {};
mod[facet] = [];
return this.setQueryParameters({
hierarchicalFacetsRefinements: defaults_1({}, mod, this.hierarchicalFacetsRefinements)
});
},
/**
* Switch the tag refinement
* @method
* @param {string} tag the tag to remove or add
* @return {SearchParameters}
*/
toggleTagRefinement: function toggleTagRefinement(tag) {
if (this.isTagRefined(tag)) {
return this.removeTagRefinement(tag);
}
return this.addTagRefinement(tag);
},
/**
* Test if the facet name is from one of the disjunctive facets
* @method
* @param {string} facet facet name to test
* @return {boolean}
*/
isDisjunctiveFacet: function(facet) {
return indexOf_1(this.disjunctiveFacets, facet) > -1;
},
/**
* Test if the facet name is from one of the hierarchical facets
* @method
* @param {string} facetName facet name to test
* @return {boolean}
*/
isHierarchicalFacet: function(facetName) {
return this.getHierarchicalFacetByName(facetName) !== undefined;
},
/**
* Test if the facet name is from one of the conjunctive/normal facets
* @method
* @param {string} facet facet name to test
* @return {boolean}
*/
isConjunctiveFacet: function(facet) {
return indexOf_1(this.facets, facet) > -1;
},
/**
* Returns true if the facet is refined, either for a specific value or in
* general.
* @method
* @param {string} facet name of the attribute for used for faceting
* @param {string} value, optional value. If passed will test that this value
* is filtering the given facet.
* @return {boolean} returns true if refined
*/
isFacetRefined: function isFacetRefined(facet, value) {
if (!this.isConjunctiveFacet(facet)) {
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
}
return RefinementList.isRefined(this.facetsRefinements, facet, value);
},
/**
* Returns true if the facet contains exclusions or if a specific value is
* excluded.
*
* @method
* @param {string} facet name of the attribute for used for faceting
* @param {string} [value] optional value. If passed will test that this value
* is filtering the given facet.
* @return {boolean} returns true if refined
*/
isExcludeRefined: function isExcludeRefined(facet, value) {
if (!this.isConjunctiveFacet(facet)) {
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
}
return RefinementList.isRefined(this.facetsExcludes, facet, value);
},
/**
* Returns true if the facet contains a refinement, or if a value passed is a
* refinement for the facet.
* @method
* @param {string} facet name of the attribute for used for faceting
* @param {string} value optional, will test if the value is used for refinement
* if there is one, otherwise will test if the facet contains any refinement
* @return {boolean}
*/
isDisjunctiveFacetRefined: function isDisjunctiveFacetRefined(facet, value) {
if (!this.isDisjunctiveFacet(facet)) {
throw new Error(
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
}
return RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value);
},
/**
* Returns true if the facet contains a refinement, or if a value passed is a
* refinement for the facet.
* @method
* @param {string} facet name of the attribute for used for faceting
* @param {string} value optional, will test if the value is used for refinement
* if there is one, otherwise will test if the facet contains any refinement
* @return {boolean}
*/
isHierarchicalFacetRefined: function isHierarchicalFacetRefined(facet, value) {
if (!this.isHierarchicalFacet(facet)) {
throw new Error(
facet + ' is not defined in the hierarchicalFacets attribute of the helper configuration');
}
var refinements = this.getHierarchicalRefinement(facet);
if (!value) {
return refinements.length > 0;
}
return indexOf_1(refinements, value) !== -1;
},
/**
* Test if the triple (attribute, operator, value) is already refined.
* If only the attribute and the operator are provided, it tests if the
* contains any refinement value.
* @method
* @param {string} attribute attribute for which the refinement is applied
* @param {string} [operator] operator of the refinement
* @param {string} [value] value of the refinement
* @return {boolean} true if it is refined
*/
isNumericRefined: function isNumericRefined(attribute, operator, value) {
if (isUndefined_1(value) && isUndefined_1(operator)) {
return !!this.numericRefinements[attribute];
}
var isOperatorDefined = this.numericRefinements[attribute] &&
!isUndefined_1(this.numericRefinements[attribute][operator]);
if (isUndefined_1(value) || !isOperatorDefined) {
return isOperatorDefined;
}
var parsedValue = valToNumber_1(value);
var isAttributeValueDefined = !isUndefined_1(
findArray(this.numericRefinements[attribute][operator], parsedValue)
);
return isOperatorDefined && isAttributeValueDefined;
},
/**
* Returns true if the tag refined, false otherwise
* @method
* @param {string} tag the tag to check
* @return {boolean}
*/
isTagRefined: function isTagRefined(tag) {
return indexOf_1(this.tagRefinements, tag) !== -1;
},
/**
* Returns the list of all disjunctive facets refined
* @method
* @param {string} facet name of the attribute used for faceting
* @param {value} value value used for filtering
* @return {string[]}
*/
getRefinedDisjunctiveFacets: function getRefinedDisjunctiveFacets() {
// attributes used for numeric filter can also be disjunctive
var disjunctiveNumericRefinedFacets = intersection_1(
keys_1(this.numericRefinements),
this.disjunctiveFacets
);
return keys_1(this.disjunctiveFacetsRefinements)
.concat(disjunctiveNumericRefinedFacets)
.concat(this.getRefinedHierarchicalFacets());
},
/**
* Returns the list of all disjunctive facets refined
* @method
* @param {string} facet name of the attribute used for faceting
* @param {value} value value used for filtering
* @return {string[]}
*/
getRefinedHierarchicalFacets: function getRefinedHierarchicalFacets() {
return intersection_1(
// enforce the order between the two arrays,
// so that refinement name index === hierarchical facet index
map_1(this.hierarchicalFacets, 'name'),
keys_1(this.hierarchicalFacetsRefinements)
);
},
/**
* Returned the list of all disjunctive facets not refined
* @method
* @return {string[]}
*/
getUnrefinedDisjunctiveFacets: function() {
var refinedFacets = this.getRefinedDisjunctiveFacets();
return filter_1(this.disjunctiveFacets, function(f) {
return indexOf_1(refinedFacets, f) === -1;
});
},
managedParameters: [
'index',
'facets', 'disjunctiveFacets', 'facetsRefinements',
'facetsExcludes', 'disjunctiveFacetsRefinements',
'numericRefinements', 'tagRefinements', 'hierarchicalFacets', 'hierarchicalFacetsRefinements'
],
getQueryParams: function getQueryParams() {
var managedParameters = this.managedParameters;
var queryParams = {};
forOwn_1(this, function(paramValue, paramName) {
if (indexOf_1(managedParameters, paramName) === -1 && paramValue !== undefined) {
queryParams[paramName] = paramValue;
}
});
return queryParams;
},
/**
* Let the user retrieve any parameter value from the SearchParameters
* @param {string} paramName name of the parameter
* @return {any} the value of the parameter
*/
getQueryParameter: function getQueryParameter(paramName) {
if (!this.hasOwnProperty(paramName)) {
throw new Error(
"Parameter '" + paramName + "' is not an attribute of SearchParameters " +
'(http://algolia.github.io/algoliasearch-helper-js/docs/SearchParameters.html)');
}
return this[paramName];
},
/**
* Let the user set a specific value for a given parameter. Will return the
* same instance if the parameter is invalid or if the value is the same as the
* previous one.
* @method
* @param {string} parameter the parameter name
* @param {any} value the value to be set, must be compliant with the definition
* of the attribute on the object
* @return {SearchParameters} the updated state
*/
setQueryParameter: function setParameter(parameter, value) {
if (this[parameter] === value) return this;
var modification = {};
modification[parameter] = value;
return this.setQueryParameters(modification);
},
/**
* Let the user set any of the parameters with a plain object.
* @method
* @param {object} params all the keys and the values to be updated
* @return {SearchParameters} a new updated instance
*/
setQueryParameters: function setQueryParameters(params) {
if (!params) return this;
var error = SearchParameters.validate(this, params);
if (error) {
throw error;
}
var parsedParams = SearchParameters._parseNumbers(params);
return this.mutateMe(function mergeWith(newInstance) {
var ks = keys_1(params);
forEach_1(ks, function(k) {
newInstance[k] = parsedParams[k];
});
return newInstance;
});
},
/**
* Returns an object with only the selected attributes.
* @param {string[]} filters filters to retrieve only a subset of the state. It
* accepts strings that can be either attributes of the SearchParameters (e.g. hitsPerPage)
* or attributes of the index with the notation 'attribute:nameOfMyAttribute'
* @return {object}
*/
filter: function(filters) {
return filterState_1(this, filters);
},
/**
* Helper function to make it easier to build new instances from a mutating
* function
* @private
* @param {function} fn newMutableState -> previousState -> () function that will
* change the value of the newMutable to the desired state
* @return {SearchParameters} a new instance with the specified modifications applied
*/
mutateMe: function mutateMe(fn) {
var newState = new this.constructor(this);
fn(newState, this);
return newState;
},
/**
* Helper function to get the hierarchicalFacet separator or the default one (`>`)
* @param {object} hierarchicalFacet
* @return {string} returns the hierarchicalFacet.separator or `>` as default
*/
_getHierarchicalFacetSortBy: function(hierarchicalFacet) {
return hierarchicalFacet.sortBy || ['isRefined:desc', 'name:asc'];
},
/**
* Helper function to get the hierarchicalFacet separator or the default one (`>`)
* @private
* @param {object} hierarchicalFacet
* @return {string} returns the hierarchicalFacet.separator or `>` as default
*/
_getHierarchicalFacetSeparator: function(hierarchicalFacet) {
return hierarchicalFacet.separator || ' > ';
},
/**
* Helper function to get the hierarchicalFacet prefix path or null
* @private
* @param {object} hierarchicalFacet
* @return {string} returns the hierarchicalFacet.rootPath or null as default
*/
_getHierarchicalRootPath: function(hierarchicalFacet) {
return hierarchicalFacet.rootPath || null;
},
/**
* Helper function to check if we show the parent level of the hierarchicalFacet
* @private
* @param {object} hierarchicalFacet
* @return {string} returns the hierarchicalFacet.showParentLevel or true as default
*/
_getHierarchicalShowParentLevel: function(hierarchicalFacet) {
if (typeof hierarchicalFacet.showParentLevel === 'boolean') {
return hierarchicalFacet.showParentLevel;
}
return true;
},
/**
* Helper function to get the hierarchicalFacet by it's name
* @param {string} hierarchicalFacetName
* @return {object} a hierarchicalFacet
*/
getHierarchicalFacetByName: function(hierarchicalFacetName) {
return find_1(
this.hierarchicalFacets,
{name: hierarchicalFacetName}
);
},
/**
* Get the current breadcrumb for a hierarchical facet, as an array
* @param {string} facetName Hierarchical facet name
* @return {array.<string>} the path as an array of string
*/
getHierarchicalFacetBreadcrumb: function(facetName) {
if (!this.isHierarchicalFacet(facetName)) {
throw new Error(
'Cannot get the breadcrumb of an unknown hierarchical facet: `' + facetName + '`');
}
var refinement = this.getHierarchicalRefinement(facetName)[0];
if (!refinement) return [];
var separator = this._getHierarchicalFacetSeparator(
this.getHierarchicalFacetByName(facetName)
);
var path = refinement.split(separator);
return map_1(path, trim_1);
}
};
/**
* Callback used for clearRefinement method
* @callback SearchParameters.clearCallback
* @param {OperatorList|FacetList} value the value of the filter
* @param {string} key the current attribute name
* @param {string} type `numeric`, `disjunctiveFacet`, `conjunctiveFacet`, `hierarchicalFacet` or `exclude`
* depending on the type of facet
* @return {boolean} `true` if the element should be removed. `false` otherwise.
*/
var SearchParameters_1 = SearchParameters;
/**
* Creates an array with all falsey values removed. The values `false`, `null`,
* `0`, `""`, `undefined`, and `NaN` are falsey.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to compact.
* @returns {Array} Returns the new array of filtered values.
* @example
*
* _.compact([0, 1, false, 2, '', 3]);
* // => [1, 2, 3]
*/
function compact(array) {
var index = -1,
length = array == null ? 0 : array.length,
resIndex = 0,
result = [];
while (++index < length) {
var value = array[index];
if (value) {
result[resIndex++] = value;
}
}
return result;
}
var compact_1 = compact;
/**
* The base implementation of `_.sum` and `_.sumBy` without support for
* iteratee shorthands.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {number} Returns the sum.
*/
function baseSum(array, iteratee) {
var result,
index = -1,
length = array.length;
while (++index < length) {
var current = iteratee(array[index]);
if (current !== undefined) {
result = result === undefined ? current : (result + current);
}
}
return result;
}
var _baseSum = baseSum;
/**
* This method is like `_.sum` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the value to be summed.
* The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Math
* @param {Array} array The array to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {number} Returns the sum.
* @example
*
* var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
*
* _.sumBy(objects, function(o) { return o.n; });
* // => 20
*
* // The `_.property` iteratee shorthand.
* _.sumBy(objects, 'n');
* // => 20
*/
function sumBy(array, iteratee) {
return (array && array.length)
? _baseSum(array, _baseIteratee(iteratee, 2))
: 0;
}
var sumBy_1 = sumBy;
/**
* The base implementation of `_.values` and `_.valuesIn` which creates an
* array of `object` property values corresponding to the property names
* of `props`.
*
* @private
* @param {Object} object The object to query.
* @param {Array} props The property names to get values for.
* @returns {Object} Returns the array of property values.
*/
function baseValues(object, props) {
return _arrayMap(props, function(key) {
return object[key];
});
}
var _baseValues = baseValues;
/**
* Creates an array of the own enumerable string keyed property values of `object`.
*
* **Note:** Non-object values are coerced to objects.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property values.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.values(new Foo);
* // => [1, 2] (iteration order is not guaranteed)
*
* _.values('hi');
* // => ['h', 'i']
*/
function values(object) {
return object == null ? [] : _baseValues(object, keys_1(object));
}
var values_1 = values;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax$3 = Math.max;
/**
* Checks if `value` is in `collection`. If `collection` is a string, it's
* checked for a substring of `value`, otherwise
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* is used for equality comparisons. If `fromIndex` is negative, it's used as
* the offset from the end of `collection`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object|string} collection The collection to inspect.
* @param {*} value The value to search for.
* @param {number} [fromIndex=0] The index to search from.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
* @returns {boolean} Returns `true` if `value` is found, else `false`.
* @example
*
* _.includes([1, 2, 3], 1);
* // => true
*
* _.includes([1, 2, 3], 1, 2);
* // => false
*
* _.includes({ 'a': 1, 'b': 2 }, 1);
* // => true
*
* _.includes('abcd', 'bc');
* // => true
*/
function includes(collection, value, fromIndex, guard) {
collection = isArrayLike_1(collection) ? collection : values_1(collection);
fromIndex = (fromIndex && !guard) ? toInteger_1(fromIndex) : 0;
var length = collection.length;
if (fromIndex < 0) {
fromIndex = nativeMax$3(length + fromIndex, 0);
}
return isString_1(collection)
? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
: (!!length && _baseIndexOf(collection, value, fromIndex) > -1);
}
var includes_1 = includes;
/**
* The base implementation of `_.sortBy` which uses `comparer` to define the
* sort order of `array` and replaces criteria objects with their corresponding
* values.
*
* @private
* @param {Array} array The array to sort.
* @param {Function} comparer The function to define sort order.
* @returns {Array} Returns `array`.
*/
function baseSortBy(array, comparer) {
var length = array.length;
array.sort(comparer);
while (length--) {
array[length] = array[length].value;
}
return array;
}
var _baseSortBy = baseSortBy;
/**
* Compares values to sort them in ascending order.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {number} Returns the sort order indicator for `value`.
*/
function compareAscending(value, other) {
if (value !== other) {
var valIsDefined = value !== undefined,
valIsNull = value === null,
valIsReflexive = value === value,
valIsSymbol = isSymbol_1(value);
var othIsDefined = other !== undefined,
othIsNull = other === null,
othIsReflexive = other === other,
othIsSymbol = isSymbol_1(other);
if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
(valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
(valIsNull && othIsDefined && othIsReflexive) ||
(!valIsDefined && othIsReflexive) ||
!valIsReflexive) {
return 1;
}
if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
(othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
(othIsNull && valIsDefined && valIsReflexive) ||
(!othIsDefined && valIsReflexive) ||
!othIsReflexive) {
return -1;
}
}
return 0;
}
var _compareAscending = compareAscending;
/**
* Used by `_.orderBy` to compare multiple properties of a value to another
* and stable sort them.
*
* If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
* specify an order of "desc" for descending or "asc" for ascending sort order
* of corresponding values.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {boolean[]|string[]} orders The order to sort by for each property.
* @returns {number} Returns the sort order indicator for `object`.
*/
function compareMultiple(object, other, orders) {
var index = -1,
objCriteria = object.criteria,
othCriteria = other.criteria,
length = objCriteria.length,
ordersLength = orders.length;
while (++index < length) {
var result = _compareAscending(objCriteria[index], othCriteria[index]);
if (result) {
if (index >= ordersLength) {
return result;
}
var order = orders[index];
return result * (order == 'desc' ? -1 : 1);
}
}
// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
// that causes it, under certain circumstances, to provide the same value for
// `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
// for more details.
//
// This also ensures a stable sort in V8 and other engines.
// See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
return object.index - other.index;
}
var _compareMultiple = compareMultiple;
/**
* The base implementation of `_.orderBy` without param guards.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
* @param {string[]} orders The sort orders of `iteratees`.
* @returns {Array} Returns the new sorted array.
*/
function baseOrderBy(collection, iteratees, orders) {
var index = -1;
iteratees = _arrayMap(iteratees.length ? iteratees : [identity_1], _baseUnary(_baseIteratee));
var result = _baseMap(collection, function(value, key, collection) {
var criteria = _arrayMap(iteratees, function(iteratee) {
return iteratee(value);
});
return { 'criteria': criteria, 'index': ++index, 'value': value };
});
return _baseSortBy(result, function(object, other) {
return _compareMultiple(object, other, orders);
});
}
var _baseOrderBy = baseOrderBy;
/**
* This method is like `_.sortBy` except that it allows specifying the sort
* orders of the iteratees to sort by. If `orders` is unspecified, all values
* are sorted in ascending order. Otherwise, specify an order of "desc" for
* descending or "asc" for ascending sort order of corresponding values.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
* The iteratees to sort by.
* @param {string[]} [orders] The sort orders of `iteratees`.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
* @returns {Array} Returns the new sorted array.
* @example
*
* var users = [
* { 'user': 'fred', 'age': 48 },
* { 'user': 'barney', 'age': 34 },
* { 'user': 'fred', 'age': 40 },
* { 'user': 'barney', 'age': 36 }
* ];
*
* // Sort by `user` in ascending order and by `age` in descending order.
* _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
*/
function orderBy(collection, iteratees, orders, guard) {
if (collection == null) {
return [];
}
if (!isArray_1(iteratees)) {
iteratees = iteratees == null ? [] : [iteratees];
}
orders = guard ? undefined : orders;
if (!isArray_1(orders)) {
orders = orders == null ? [] : [orders];
}
return _baseOrderBy(collection, iteratees, orders);
}
var orderBy_1 = orderBy;
/** Used to store function metadata. */
var metaMap = _WeakMap && new _WeakMap;
var _metaMap = metaMap;
/**
* The base implementation of `setData` without support for hot loop shorting.
*
* @private
* @param {Function} func The function to associate metadata with.
* @param {*} data The metadata.
* @returns {Function} Returns `func`.
*/
var baseSetData = !_metaMap ? identity_1 : function(func, data) {
_metaMap.set(func, data);
return func;
};
var _baseSetData = baseSetData;
/**
* Creates a function that produces an instance of `Ctor` regardless of
* whether it was invoked as part of a `new` expression or by `call` or `apply`.
*
* @private
* @param {Function} Ctor The constructor to wrap.
* @returns {Function} Returns the new wrapped function.
*/
function createCtor(Ctor) {
return function() {
// Use a `switch` statement to work with class constructors. See
// http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
// for more details.
var args = arguments;
switch (args.length) {
case 0: return new Ctor;
case 1: return new Ctor(args[0]);
case 2: return new Ctor(args[0], args[1]);
case 3: return new Ctor(args[0], args[1], args[2]);
case 4: return new Ctor(args[0], args[1], args[2], args[3]);
case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
}
var thisBinding = _baseCreate(Ctor.prototype),
result = Ctor.apply(thisBinding, args);
// Mimic the constructor's `return` behavior.
// See https://es5.github.io/#x13.2.2 for more details.
return isObject_1(result) ? result : thisBinding;
};
}
var _createCtor = createCtor;
/** Used to compose bitmasks for function metadata. */
var WRAP_BIND_FLAG$1 = 1;
/**
* Creates a function that wraps `func` to invoke it with the optional `this`
* binding of `thisArg`.
*
* @private
* @param {Function} func The function to wrap.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @param {*} [thisArg] The `this` binding of `func`.
* @returns {Function} Returns the new wrapped function.
*/
function createBind(func, bitmask, thisArg) {
var isBind = bitmask & WRAP_BIND_FLAG$1,
Ctor = _createCtor(func);
function wrapper() {
var fn = (this && this !== _root && this instanceof wrapper) ? Ctor : func;
return fn.apply(isBind ? thisArg : this, arguments);
}
return wrapper;
}
var _createBind = createBind;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax$5 = Math.max;
/**
* Creates an array that is the composition of partially applied arguments,
* placeholders, and provided arguments into a single array of arguments.
*
* @private
* @param {Array} args The provided arguments.
* @param {Array} partials The arguments to prepend to those provided.
* @param {Array} holders The `partials` placeholder indexes.
* @params {boolean} [isCurried] Specify composing for a curried function.
* @returns {Array} Returns the new array of composed arguments.
*/
function composeArgs(args, partials, holders, isCurried) {
var argsIndex = -1,
argsLength = args.length,
holdersLength = holders.length,
leftIndex = -1,
leftLength = partials.length,
rangeLength = nativeMax$5(argsLength - holdersLength, 0),
result = Array(leftLength + rangeLength),
isUncurried = !isCurried;
while (++leftIndex < leftLength) {
result[leftIndex] = partials[leftIndex];
}
while (++argsIndex < holdersLength) {
if (isUncurried || argsIndex < argsLength) {
result[holders[argsIndex]] = args[argsIndex];
}
}
while (rangeLength--) {
result[leftIndex++] = args[argsIndex++];
}
return result;
}
var _composeArgs = composeArgs;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax$6 = Math.max;
/**
* This function is like `composeArgs` except that the arguments composition
* is tailored for `_.partialRight`.
*
* @private
* @param {Array} args The provided arguments.
* @param {Array} partials The arguments to append to those provided.
* @param {Array} holders The `partials` placeholder indexes.
* @params {boolean} [isCurried] Specify composing for a curried function.
* @returns {Array} Returns the new array of composed arguments.
*/
function composeArgsRight(args, partials, holders, isCurried) {
var argsIndex = -1,
argsLength = args.length,
holdersIndex = -1,
holdersLength = holders.length,
rightIndex = -1,
rightLength = partials.length,
rangeLength = nativeMax$6(argsLength - holdersLength, 0),
result = Array(rangeLength + rightLength),
isUncurried = !isCurried;
while (++argsIndex < rangeLength) {
result[argsIndex] = args[argsIndex];
}
var offset = argsIndex;
while (++rightIndex < rightLength) {
result[offset + rightIndex] = partials[rightIndex];
}
while (++holdersIndex < holdersLength) {
if (isUncurried || argsIndex < argsLength) {
result[offset + holders[holdersIndex]] = args[argsIndex++];
}
}
return result;
}
var _composeArgsRight = composeArgsRight;
/**
* Gets the number of `placeholder` occurrences in `array`.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} placeholder The placeholder to search for.
* @returns {number} Returns the placeholder count.
*/
function countHolders(array, placeholder) {
var length = array.length,
result = 0;
while (length--) {
if (array[length] === placeholder) {
++result;
}
}
return result;
}
var _countHolders = countHolders;
/**
* The function whose prototype chain sequence wrappers inherit from.
*
* @private
*/
function baseLodash() {
// No operation performed.
}
var _baseLodash = baseLodash;
/** Used as references for the maximum length and index of an array. */
var MAX_ARRAY_LENGTH = 4294967295;
/**
* Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
*
* @private
* @constructor
* @param {*} value The value to wrap.
*/
function LazyWrapper(value) {
this.__wrapped__ = value;
this.__actions__ = [];
this.__dir__ = 1;
this.__filtered__ = false;
this.__iteratees__ = [];
this.__takeCount__ = MAX_ARRAY_LENGTH;
this.__views__ = [];
}
// Ensure `LazyWrapper` is an instance of `baseLodash`.
LazyWrapper.prototype = _baseCreate(_baseLodash.prototype);
LazyWrapper.prototype.constructor = LazyWrapper;
var _LazyWrapper = LazyWrapper;
/**
* This method returns `undefined`.
*
* @static
* @memberOf _
* @since 2.3.0
* @category Util
* @example
*
* _.times(2, _.noop);
* // => [undefined, undefined]
*/
function noop$1() {
// No operation performed.
}
var noop_1 = noop$1;
/**
* Gets metadata for `func`.
*
* @private
* @param {Function} func The function to query.
* @returns {*} Returns the metadata for `func`.
*/
var getData = !_metaMap ? noop_1 : function(func) {
return _metaMap.get(func);
};
var _getData = getData;
/** Used to lookup unminified function names. */
var realNames = {};
var _realNames = realNames;
/** Used for built-in method references. */
var objectProto$19 = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty$17 = objectProto$19.hasOwnProperty;
/**
* Gets the name of `func`.
*
* @private
* @param {Function} func The function to query.
* @returns {string} Returns the function name.
*/
function getFuncName(func) {
var result = (func.name + ''),
array = _realNames[result],
length = hasOwnProperty$17.call(_realNames, result) ? array.length : 0;
while (length--) {
var data = array[length],
otherFunc = data.func;
if (otherFunc == null || otherFunc == func) {
return data.name;
}
}
return result;
}
var _getFuncName = getFuncName;
/**
* The base constructor for creating `lodash` wrapper objects.
*
* @private
* @param {*} value The value to wrap.
* @param {boolean} [chainAll] Enable explicit method chain sequences.
*/
function LodashWrapper(value, chainAll) {
this.__wrapped__ = value;
this.__actions__ = [];
this.__chain__ = !!chainAll;
this.__index__ = 0;
this.__values__ = undefined;
}
LodashWrapper.prototype = _baseCreate(_baseLodash.prototype);
LodashWrapper.prototype.constructor = LodashWrapper;
var _LodashWrapper = LodashWrapper;
/**
* Creates a clone of `wrapper`.
*
* @private
* @param {Object} wrapper The wrapper to clone.
* @returns {Object} Returns the cloned wrapper.
*/
function wrapperClone(wrapper) {
if (wrapper instanceof _LazyWrapper) {
return wrapper.clone();
}
var result = new _LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
result.__actions__ = _copyArray(wrapper.__actions__);
result.__index__ = wrapper.__index__;
result.__values__ = wrapper.__values__;
return result;
}
var _wrapperClone = wrapperClone;
/** Used for built-in method references. */
var objectProto$20 = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty$18 = objectProto$20.hasOwnProperty;
/**
* Creates a `lodash` object which wraps `value` to enable implicit method
* chain sequences. Methods that operate on and return arrays, collections,
* and functions can be chained together. Methods that retrieve a single value
* or may return a primitive value will automatically end the chain sequence
* and return the unwrapped value. Otherwise, the value must be unwrapped
* with `_#value`.
*
* Explicit chain sequences, which must be unwrapped with `_#value`, may be
* enabled using `_.chain`.
*
* The execution of chained methods is lazy, that is, it's deferred until
* `_#value` is implicitly or explicitly called.
*
* Lazy evaluation allows several methods to support shortcut fusion.
* Shortcut fusion is an optimization to merge iteratee calls; this avoids
* the creation of intermediate arrays and can greatly reduce the number of
* iteratee executions. Sections of a chain sequence qualify for shortcut
* fusion if the section is applied to an array and iteratees accept only
* one argument. The heuristic for whether a section qualifies for shortcut
* fusion is subject to change.
*
* Chaining is supported in custom builds as long as the `_#value` method is
* directly or indirectly included in the build.
*
* In addition to lodash methods, wrappers have `Array` and `String` methods.
*
* The wrapper `Array` methods are:
* `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
*
* The wrapper `String` methods are:
* `replace` and `split`
*
* The wrapper methods that support shortcut fusion are:
* `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
* `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
* `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
*
* The chainable wrapper methods are:
* `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
* `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
* `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
* `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
* `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
* `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
* `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
* `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
* `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
* `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
* `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
* `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
* `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
* `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
* `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
* `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
* `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
* `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
* `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
* `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
* `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
* `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
* `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
* `zipObject`, `zipObjectDeep`, and `zipWith`
*
* The wrapper methods that are **not** chainable by default are:
* `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
* `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
* `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
* `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
* `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
* `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
* `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
* `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
* `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
* `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
* `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
* `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
* `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
* `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
* `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
* `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
* `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
* `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
* `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
* `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
* `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
* `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
* `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
* `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
* `upperFirst`, `value`, and `words`
*
* @name _
* @constructor
* @category Seq
* @param {*} value The value to wrap in a `lodash` instance.
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* function square(n) {
* return n * n;
* }
*
* var wrapped = _([1, 2, 3]);
*
* // Returns an unwrapped value.
* wrapped.reduce(_.add);
* // => 6
*
* // Returns a wrapped value.
* var squares = wrapped.map(square);
*
* _.isArray(squares);
* // => false
*
* _.isArray(squares.value());
* // => true
*/
function lodash(value) {
if (isObjectLike_1(value) && !isArray_1(value) && !(value instanceof _LazyWrapper)) {
if (value instanceof _LodashWrapper) {
return value;
}
if (hasOwnProperty$18.call(value, '__wrapped__')) {
return _wrapperClone(value);
}
}
return new _LodashWrapper(value);
}
// Ensure wrappers are instances of `baseLodash`.
lodash.prototype = _baseLodash.prototype;
lodash.prototype.constructor = lodash;
var wrapperLodash = lodash;
/**
* Checks if `func` has a lazy counterpart.
*
* @private
* @param {Function} func The function to check.
* @returns {boolean} Returns `true` if `func` has a lazy counterpart,
* else `false`.
*/
function isLaziable(func) {
var funcName = _getFuncName(func),
other = wrapperLodash[funcName];
if (typeof other != 'function' || !(funcName in _LazyWrapper.prototype)) {
return false;
}
if (func === other) {
return true;
}
var data = _getData(other);
return !!data && func === data[0];
}
var _isLaziable = isLaziable;
/**
* Sets metadata for `func`.
*
* **Note:** If this function becomes hot, i.e. is invoked a lot in a short
* period of time, it will trip its breaker and transition to an identity
* function to avoid garbage collection pauses in V8. See
* [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
* for more details.
*
* @private
* @param {Function} func The function to associate metadata with.
* @param {*} data The metadata.
* @returns {Function} Returns `func`.
*/
var setData = _shortOut(_baseSetData);
var _setData = setData;
/** Used to match wrap detail comments. */
var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/;
var reSplitDetails = /,? & /;
/**
* Extracts wrapper details from the `source` body comment.
*
* @private
* @param {string} source The source to inspect.
* @returns {Array} Returns the wrapper details.
*/
function getWrapDetails(source) {
var match = source.match(reWrapDetails);
return match ? match[1].split(reSplitDetails) : [];
}
var _getWrapDetails = getWrapDetails;
/** Used to match wrap detail comments. */
var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;
/**
* Inserts wrapper `details` in a comment at the top of the `source` body.
*
* @private
* @param {string} source The source to modify.
* @returns {Array} details The details to insert.
* @returns {string} Returns the modified source.
*/
function insertWrapDetails(source, details) {
var length = details.length;
if (!length) {
return source;
}
var lastIndex = length - 1;
details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
details = details.join(length > 2 ? ', ' : ' ');
return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
}
var _insertWrapDetails = insertWrapDetails;
/** Used to compose bitmasks for function metadata. */
var WRAP_BIND_FLAG$4 = 1;
var WRAP_BIND_KEY_FLAG$3 = 2;
var WRAP_CURRY_FLAG$3 = 8;
var WRAP_CURRY_RIGHT_FLAG$2 = 16;
var WRAP_PARTIAL_FLAG$3 = 32;
var WRAP_PARTIAL_RIGHT_FLAG$2 = 64;
var WRAP_ARY_FLAG$1 = 128;
var WRAP_REARG_FLAG = 256;
var WRAP_FLIP_FLAG$1 = 512;
/** Used to associate wrap methods with their bit flags. */
var wrapFlags = [
['ary', WRAP_ARY_FLAG$1],
['bind', WRAP_BIND_FLAG$4],
['bindKey', WRAP_BIND_KEY_FLAG$3],
['curry', WRAP_CURRY_FLAG$3],
['curryRight', WRAP_CURRY_RIGHT_FLAG$2],
['flip', WRAP_FLIP_FLAG$1],
['partial', WRAP_PARTIAL_FLAG$3],
['partialRight', WRAP_PARTIAL_RIGHT_FLAG$2],
['rearg', WRAP_REARG_FLAG]
];
/**
* Updates wrapper `details` based on `bitmask` flags.
*
* @private
* @returns {Array} details The details to modify.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @returns {Array} Returns `details`.
*/
function updateWrapDetails(details, bitmask) {
_arrayEach(wrapFlags, function(pair) {
var value = '_.' + pair[0];
if ((bitmask & pair[1]) && !_arrayIncludes(details, value)) {
details.push(value);
}
});
return details.sort();
}
var _updateWrapDetails = updateWrapDetails;
/**
* Sets the `toString` method of `wrapper` to mimic the source of `reference`
* with wrapper details in a comment at the top of the source body.
*
* @private
* @param {Function} wrapper The function to modify.
* @param {Function} reference The reference function.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @returns {Function} Returns `wrapper`.
*/
function setWrapToString(wrapper, reference, bitmask) {
var source = (reference + '');
return _setToString(wrapper, _insertWrapDetails(source, _updateWrapDetails(_getWrapDetails(source), bitmask)));
}
var _setWrapToString = setWrapToString;
/** Used to compose bitmasks for function metadata. */
var WRAP_BIND_FLAG$3 = 1;
var WRAP_BIND_KEY_FLAG$2 = 2;
var WRAP_CURRY_BOUND_FLAG = 4;
var WRAP_CURRY_FLAG$2 = 8;
var WRAP_PARTIAL_FLAG$2 = 32;
var WRAP_PARTIAL_RIGHT_FLAG$1 = 64;
/**
* Creates a function that wraps `func` to continue currying.
*
* @private
* @param {Function} func The function to wrap.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @param {Function} wrapFunc The function to create the `func` wrapper.
* @param {*} placeholder The placeholder value.
* @param {*} [thisArg] The `this` binding of `func`.
* @param {Array} [partials] The arguments to prepend to those provided to
* the new function.
* @param {Array} [holders] The `partials` placeholder indexes.
* @param {Array} [argPos] The argument positions of the new function.
* @param {number} [ary] The arity cap of `func`.
* @param {number} [arity] The arity of `func`.
* @returns {Function} Returns the new wrapped function.
*/
function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
var isCurry = bitmask & WRAP_CURRY_FLAG$2,
newHolders = isCurry ? holders : undefined,
newHoldersRight = isCurry ? undefined : holders,
newPartials = isCurry ? partials : undefined,
newPartialsRight = isCurry ? undefined : partials;
bitmask |= (isCurry ? WRAP_PARTIAL_FLAG$2 : WRAP_PARTIAL_RIGHT_FLAG$1);
bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG$1 : WRAP_PARTIAL_FLAG$2);
if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
bitmask &= ~(WRAP_BIND_FLAG$3 | WRAP_BIND_KEY_FLAG$2);
}
var newData = [
func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
newHoldersRight, argPos, ary, arity
];
var result = wrapFunc.apply(undefined, newData);
if (_isLaziable(func)) {
_setData(result, newData);
}
result.placeholder = placeholder;
return _setWrapToString(result, func, bitmask);
}
var _createRecurry = createRecurry;
/**
* Gets the argument placeholder value for `func`.
*
* @private
* @param {Function} func The function to inspect.
* @returns {*} Returns the placeholder value.
*/
function getHolder(func) {
var object = func;
return object.placeholder;
}
var _getHolder = getHolder;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMin$1 = Math.min;
/**
* Reorder `array` according to the specified indexes where the element at
* the first index is assigned as the first element, the element at
* the second index is assigned as the second element, and so on.
*
* @private
* @param {Array} array The array to reorder.
* @param {Array} indexes The arranged array indexes.
* @returns {Array} Returns `array`.
*/
function reorder(array, indexes) {
var arrLength = array.length,
length = nativeMin$1(indexes.length, arrLength),
oldArray = _copyArray(array);
while (length--) {
var index = indexes[length];
array[length] = _isIndex(index, arrLength) ? oldArray[index] : undefined;
}
return array;
}
var _reorder = reorder;
/** Used as the internal argument placeholder. */
var PLACEHOLDER = '__lodash_placeholder__';
/**
* Replaces all `placeholder` elements in `array` with an internal placeholder
* and returns an array of their indexes.
*
* @private
* @param {Array} array The array to modify.
* @param {*} placeholder The placeholder to replace.
* @returns {Array} Returns the new array of placeholder indexes.
*/
function replaceHolders(array, placeholder) {
var index = -1,
length = array.length,
resIndex = 0,
result = [];
while (++index < length) {
var value = array[index];
if (value === placeholder || value === PLACEHOLDER) {
array[index] = PLACEHOLDER;
result[resIndex++] = index;
}
}
return result;
}
var _replaceHolders = replaceHolders;
/** Used to compose bitmasks for function metadata. */
var WRAP_BIND_FLAG$2 = 1;
var WRAP_BIND_KEY_FLAG$1 = 2;
var WRAP_CURRY_FLAG$1 = 8;
var WRAP_CURRY_RIGHT_FLAG$1 = 16;
var WRAP_ARY_FLAG = 128;
var WRAP_FLIP_FLAG = 512;
/**
* Creates a function that wraps `func` to invoke it with optional `this`
* binding of `thisArg`, partial application, and currying.
*
* @private
* @param {Function|string} func The function or method name to wrap.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @param {*} [thisArg] The `this` binding of `func`.
* @param {Array} [partials] The arguments to prepend to those provided to
* the new function.
* @param {Array} [holders] The `partials` placeholder indexes.
* @param {Array} [partialsRight] The arguments to append to those provided
* to the new function.
* @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
* @param {Array} [argPos] The argument positions of the new function.
* @param {number} [ary] The arity cap of `func`.
* @param {number} [arity] The arity of `func`.
* @returns {Function} Returns the new wrapped function.
*/
function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
var isAry = bitmask & WRAP_ARY_FLAG,
isBind = bitmask & WRAP_BIND_FLAG$2,
isBindKey = bitmask & WRAP_BIND_KEY_FLAG$1,
isCurried = bitmask & (WRAP_CURRY_FLAG$1 | WRAP_CURRY_RIGHT_FLAG$1),
isFlip = bitmask & WRAP_FLIP_FLAG,
Ctor = isBindKey ? undefined : _createCtor(func);
function wrapper() {
var length = arguments.length,
args = Array(length),
index = length;
while (index--) {
args[index] = arguments[index];
}
if (isCurried) {
var placeholder = _getHolder(wrapper),
holdersCount = _countHolders(args, placeholder);
}
if (partials) {
args = _composeArgs(args, partials, holders, isCurried);
}
if (partialsRight) {
args = _composeArgsRight(args, partialsRight, holdersRight, isCurried);
}
length -= holdersCount;
if (isCurried && length < arity) {
var newHolders = _replaceHolders(args, placeholder);
return _createRecurry(
func, bitmask, createHybrid, wrapper.placeholder, thisArg,
args, newHolders, argPos, ary, arity - length
);
}
var thisBinding = isBind ? thisArg : this,
fn = isBindKey ? thisBinding[func] : func;
length = args.length;
if (argPos) {
args = _reorder(args, argPos);
} else if (isFlip && length > 1) {
args.reverse();
}
if (isAry && ary < length) {
args.length = ary;
}
if (this && this !== _root && this instanceof wrapper) {
fn = Ctor || _createCtor(fn);
}
return fn.apply(thisBinding, args);
}
return wrapper;
}
var _createHybrid = createHybrid;
/**
* Creates a function that wraps `func` to enable currying.
*
* @private
* @param {Function} func The function to wrap.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @param {number} arity The arity of `func`.
* @returns {Function} Returns the new wrapped function.
*/
function createCurry(func, bitmask, arity) {
var Ctor = _createCtor(func);
function wrapper() {
var length = arguments.length,
args = Array(length),
index = length,
placeholder = _getHolder(wrapper);
while (index--) {
args[index] = arguments[index];
}
var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
? []
: _replaceHolders(args, placeholder);
length -= holders.length;
if (length < arity) {
return _createRecurry(
func, bitmask, _createHybrid, wrapper.placeholder, undefined,
args, holders, undefined, undefined, arity - length);
}
var fn = (this && this !== _root && this instanceof wrapper) ? Ctor : func;
return _apply(fn, this, args);
}
return wrapper;
}
var _createCurry = createCurry;
/** Used to compose bitmasks for function metadata. */
var WRAP_BIND_FLAG$5 = 1;
/**
* Creates a function that wraps `func` to invoke it with the `this` binding
* of `thisArg` and `partials` prepended to the arguments it receives.
*
* @private
* @param {Function} func The function to wrap.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @param {*} thisArg The `this` binding of `func`.
* @param {Array} partials The arguments to prepend to those provided to
* the new function.
* @returns {Function} Returns the new wrapped function.
*/
function createPartial(func, bitmask, thisArg, partials) {
var isBind = bitmask & WRAP_BIND_FLAG$5,
Ctor = _createCtor(func);
function wrapper() {
var argsIndex = -1,
argsLength = arguments.length,
leftIndex = -1,
leftLength = partials.length,
args = Array(leftLength + argsLength),
fn = (this && this !== _root && this instanceof wrapper) ? Ctor : func;
while (++leftIndex < leftLength) {
args[leftIndex] = partials[leftIndex];
}
while (argsLength--) {
args[leftIndex++] = arguments[++argsIndex];
}
return _apply(fn, isBind ? thisArg : this, args);
}
return wrapper;
}
var _createPartial = createPartial;
/** Used as the internal argument placeholder. */
var PLACEHOLDER$1 = '__lodash_placeholder__';
/** Used to compose bitmasks for function metadata. */
var WRAP_BIND_FLAG$6 = 1;
var WRAP_BIND_KEY_FLAG$4 = 2;
var WRAP_CURRY_BOUND_FLAG$1 = 4;
var WRAP_CURRY_FLAG$4 = 8;
var WRAP_ARY_FLAG$2 = 128;
var WRAP_REARG_FLAG$1 = 256;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMin$2 = Math.min;
/**
* Merges the function metadata of `source` into `data`.
*
* Merging metadata reduces the number of wrappers used to invoke a function.
* This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
* may be applied regardless of execution order. Methods like `_.ary` and
* `_.rearg` modify function arguments, making the order in which they are
* executed important, preventing the merging of metadata. However, we make
* an exception for a safe combined case where curried functions have `_.ary`
* and or `_.rearg` applied.
*
* @private
* @param {Array} data The destination metadata.
* @param {Array} source The source metadata.
* @returns {Array} Returns `data`.
*/
function mergeData(data, source) {
var bitmask = data[1],
srcBitmask = source[1],
newBitmask = bitmask | srcBitmask,
isCommon = newBitmask < (WRAP_BIND_FLAG$6 | WRAP_BIND_KEY_FLAG$4 | WRAP_ARY_FLAG$2);
var isCombo =
((srcBitmask == WRAP_ARY_FLAG$2) && (bitmask == WRAP_CURRY_FLAG$4)) ||
((srcBitmask == WRAP_ARY_FLAG$2) && (bitmask == WRAP_REARG_FLAG$1) && (data[7].length <= source[8])) ||
((srcBitmask == (WRAP_ARY_FLAG$2 | WRAP_REARG_FLAG$1)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG$4));
// Exit early if metadata can't be merged.
if (!(isCommon || isCombo)) {
return data;
}
// Use source `thisArg` if available.
if (srcBitmask & WRAP_BIND_FLAG$6) {
data[2] = source[2];
// Set when currying a bound function.
newBitmask |= bitmask & WRAP_BIND_FLAG$6 ? 0 : WRAP_CURRY_BOUND_FLAG$1;
}
// Compose partial arguments.
var value = source[3];
if (value) {
var partials = data[3];
data[3] = partials ? _composeArgs(partials, value, source[4]) : value;
data[4] = partials ? _replaceHolders(data[3], PLACEHOLDER$1) : source[4];
}
// Compose partial right arguments.
value = source[5];
if (value) {
partials = data[5];
data[5] = partials ? _composeArgsRight(partials, value, source[6]) : value;
data[6] = partials ? _replaceHolders(data[5], PLACEHOLDER$1) : source[6];
}
// Use source `argPos` if available.
value = source[7];
if (value) {
data[7] = value;
}
// Use source `ary` if it's smaller.
if (srcBitmask & WRAP_ARY_FLAG$2) {
data[8] = data[8] == null ? source[8] : nativeMin$2(data[8], source[8]);
}
// Use source `arity` if one is not provided.
if (data[9] == null) {
data[9] = source[9];
}
// Use source `func` and merge bitmasks.
data[0] = source[0];
data[1] = newBitmask;
return data;
}
var _mergeData = mergeData;
/** Error message constants. */
var FUNC_ERROR_TEXT$1 = 'Expected a function';
/** Used to compose bitmasks for function metadata. */
var WRAP_BIND_FLAG = 1;
var WRAP_BIND_KEY_FLAG = 2;
var WRAP_CURRY_FLAG = 8;
var WRAP_CURRY_RIGHT_FLAG = 16;
var WRAP_PARTIAL_FLAG$1 = 32;
var WRAP_PARTIAL_RIGHT_FLAG = 64;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax$4 = Math.max;
/**
* Creates a function that either curries or invokes `func` with optional
* `this` binding and partially applied arguments.
*
* @private
* @param {Function|string} func The function or method name to wrap.
* @param {number} bitmask The bitmask flags.
* 1 - `_.bind`
* 2 - `_.bindKey`
* 4 - `_.curry` or `_.curryRight` of a bound function
* 8 - `_.curry`
* 16 - `_.curryRight`
* 32 - `_.partial`
* 64 - `_.partialRight`
* 128 - `_.rearg`
* 256 - `_.ary`
* 512 - `_.flip`
* @param {*} [thisArg] The `this` binding of `func`.
* @param {Array} [partials] The arguments to be partially applied.
* @param {Array} [holders] The `partials` placeholder indexes.
* @param {Array} [argPos] The argument positions of the new function.
* @param {number} [ary] The arity cap of `func`.
* @param {number} [arity] The arity of `func`.
* @returns {Function} Returns the new wrapped function.
*/
function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
if (!isBindKey && typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT$1);
}
var length = partials ? partials.length : 0;
if (!length) {
bitmask &= ~(WRAP_PARTIAL_FLAG$1 | WRAP_PARTIAL_RIGHT_FLAG);
partials = holders = undefined;
}
ary = ary === undefined ? ary : nativeMax$4(toInteger_1(ary), 0);
arity = arity === undefined ? arity : toInteger_1(arity);
length -= holders ? holders.length : 0;
if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
var partialsRight = partials,
holdersRight = holders;
partials = holders = undefined;
}
var data = isBindKey ? undefined : _getData(func);
var newData = [
func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
argPos, ary, arity
];
if (data) {
_mergeData(newData, data);
}
func = newData[0];
bitmask = newData[1];
thisArg = newData[2];
partials = newData[3];
holders = newData[4];
arity = newData[9] = newData[9] === undefined
? (isBindKey ? 0 : func.length)
: nativeMax$4(newData[9] - length, 0);
if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
}
if (!bitmask || bitmask == WRAP_BIND_FLAG) {
var result = _createBind(func, bitmask, thisArg);
} else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
result = _createCurry(func, bitmask, arity);
} else if ((bitmask == WRAP_PARTIAL_FLAG$1 || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG$1)) && !holders.length) {
result = _createPartial(func, bitmask, thisArg, partials);
} else {
result = _createHybrid.apply(undefined, newData);
}
var setter = data ? _baseSetData : _setData;
return _setWrapToString(setter(result, newData), func, bitmask);
}
var _createWrap = createWrap;
/** Used to compose bitmasks for function metadata. */
var WRAP_PARTIAL_FLAG = 32;
/**
* Creates a function that invokes `func` with `partials` prepended to the
* arguments it receives. This method is like `_.bind` except it does **not**
* alter the `this` binding.
*
* The `_.partial.placeholder` value, which defaults to `_` in monolithic
* builds, may be used as a placeholder for partially applied arguments.
*
* **Note:** This method doesn't set the "length" property of partially
* applied functions.
*
* @static
* @memberOf _
* @since 0.2.0
* @category Function
* @param {Function} func The function to partially apply arguments to.
* @param {...*} [partials] The arguments to be partially applied.
* @returns {Function} Returns the new partially applied function.
* @example
*
* function greet(greeting, name) {
* return greeting + ' ' + name;
* }
*
* var sayHelloTo = _.partial(greet, 'hello');
* sayHelloTo('fred');
* // => 'hello fred'
*
* // Partially applied with placeholders.
* var greetFred = _.partial(greet, _, 'fred');
* greetFred('hi');
* // => 'hi fred'
*/
var partial = _baseRest(function(func, partials) {
var holders = _replaceHolders(partials, _getHolder(partial));
return _createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
});
// Assign default placeholders.
partial.placeholder = {};
var partial_1 = partial;
/** Used to compose bitmasks for function metadata. */
var WRAP_PARTIAL_RIGHT_FLAG$3 = 64;
/**
* This method is like `_.partial` except that partially applied arguments
* are appended to the arguments it receives.
*
* The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
* builds, may be used as a placeholder for partially applied arguments.
*
* **Note:** This method doesn't set the "length" property of partially
* applied functions.
*
* @static
* @memberOf _
* @since 1.0.0
* @category Function
* @param {Function} func The function to partially apply arguments to.
* @param {...*} [partials] The arguments to be partially applied.
* @returns {Function} Returns the new partially applied function.
* @example
*
* function greet(greeting, name) {
* return greeting + ' ' + name;
* }
*
* var greetFred = _.partialRight(greet, 'fred');
* greetFred('hi');
* // => 'hi fred'
*
* // Partially applied with placeholders.
* var sayHelloTo = _.partialRight(greet, 'hello', _);
* sayHelloTo('fred');
* // => 'hello fred'
*/
var partialRight = _baseRest(function(func, partials) {
var holders = _replaceHolders(partials, _getHolder(partialRight));
return _createWrap(func, WRAP_PARTIAL_RIGHT_FLAG$3, undefined, partials, holders);
});
// Assign default placeholders.
partialRight.placeholder = {};
var partialRight_1 = partialRight;
/**
* The base implementation of `_.clamp` which doesn't coerce arguments.
*
* @private
* @param {number} number The number to clamp.
* @param {number} [lower] The lower bound.
* @param {number} upper The upper bound.
* @returns {number} Returns the clamped number.
*/
function baseClamp(number, lower, upper) {
if (number === number) {
if (upper !== undefined) {
number = number <= upper ? number : upper;
}
if (lower !== undefined) {
number = number >= lower ? number : lower;
}
}
return number;
}
var _baseClamp = baseClamp;
/**
* Checks if `string` starts with the given target string.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to inspect.
* @param {string} [target] The string to search for.
* @param {number} [position=0] The position to search from.
* @returns {boolean} Returns `true` if `string` starts with `target`,
* else `false`.
* @example
*
* _.startsWith('abc', 'a');
* // => true
*
* _.startsWith('abc', 'b');
* // => false
*
* _.startsWith('abc', 'b', 1);
* // => true
*/
function startsWith(string, target, position) {
string = toString_1(string);
position = position == null
? 0
: _baseClamp(toInteger_1(position), 0, string.length);
target = _baseToString(target);
return string.slice(position, position + target.length) == target;
}
var startsWith_1 = startsWith;
/**
* Transform sort format from user friendly notation to lodash format
* @param {string[]} sortBy array of predicate of the form "attribute:order"
* @return {array.<string[]>} array containing 2 elements : attributes, orders
*/
var formatSort = function formatSort(sortBy, defaults) {
return reduce_1(sortBy, function preparePredicate(out, sortInstruction) {
var sortInstructions = sortInstruction.split(':');
if (defaults && sortInstructions.length === 1) {
var similarDefault = find_1(defaults, function(predicate) {
return startsWith_1(predicate, sortInstruction[0]);
});
if (similarDefault) {
sortInstructions = similarDefault.split(':');
}
}
out[0].push(sortInstructions[0]);
out[1].push(sortInstructions[1]);
return out;
}, [[], []]);
};
/**
* The base implementation of `_.set`.
*
* @private
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to set.
* @param {*} value The value to set.
* @param {Function} [customizer] The function to customize path creation.
* @returns {Object} Returns `object`.
*/
function baseSet(object, path, value, customizer) {
if (!isObject_1(object)) {
return object;
}
path = _castPath(path, object);
var index = -1,
length = path.length,
lastIndex = length - 1,
nested = object;
while (nested != null && ++index < length) {
var key = _toKey(path[index]),
newValue = value;
if (index != lastIndex) {
var objValue = nested[key];
newValue = customizer ? customizer(objValue, key, nested) : undefined;
if (newValue === undefined) {
newValue = isObject_1(objValue)
? objValue
: (_isIndex(path[index + 1]) ? [] : {});
}
}
_assignValue(nested, key, newValue);
nested = nested[key];
}
return object;
}
var _baseSet = baseSet;
/**
* The base implementation of `_.pickBy` without support for iteratee shorthands.
*
* @private
* @param {Object} object The source object.
* @param {string[]} paths The property paths to pick.
* @param {Function} predicate The function invoked per property.
* @returns {Object} Returns the new object.
*/
function basePickBy(object, paths, predicate) {
var index = -1,
length = paths.length,
result = {};
while (++index < length) {
var path = paths[index],
value = _baseGet(object, path);
if (predicate(value, path)) {
_baseSet(result, _castPath(path, object), value);
}
}
return result;
}
var _basePickBy = basePickBy;
/**
* Creates an object composed of the `object` properties `predicate` returns
* truthy for. The predicate is invoked with two arguments: (value, key).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The source object.
* @param {Function} [predicate=_.identity] The function invoked per property.
* @returns {Object} Returns the new object.
* @example
*
* var object = { 'a': 1, 'b': '2', 'c': 3 };
*
* _.pickBy(object, _.isNumber);
* // => { 'a': 1, 'c': 3 }
*/
function pickBy(object, predicate) {
if (object == null) {
return {};
}
var props = _arrayMap(_getAllKeysIn(object), function(prop) {
return [prop];
});
predicate = _baseIteratee(predicate);
return _basePickBy(object, props, function(value, path) {
return predicate(value, path[0]);
});
}
var pickBy_1 = pickBy;
var generateHierarchicalTree_1 = generateTrees;
function generateTrees(state) {
return function generate(hierarchicalFacetResult, hierarchicalFacetIndex) {
var hierarchicalFacet = state.hierarchicalFacets[hierarchicalFacetIndex];
var hierarchicalFacetRefinement = state.hierarchicalFacetsRefinements[hierarchicalFacet.name] &&
state.hierarchicalFacetsRefinements[hierarchicalFacet.name][0] || '';
var hierarchicalSeparator = state._getHierarchicalFacetSeparator(hierarchicalFacet);
var hierarchicalRootPath = state._getHierarchicalRootPath(hierarchicalFacet);
var hierarchicalShowParentLevel = state._getHierarchicalShowParentLevel(hierarchicalFacet);
var sortBy = formatSort(state._getHierarchicalFacetSortBy(hierarchicalFacet));
var generateTreeFn = generateHierarchicalTree(sortBy, hierarchicalSeparator, hierarchicalRootPath,
hierarchicalShowParentLevel, hierarchicalFacetRefinement);
var results = hierarchicalFacetResult;
if (hierarchicalRootPath) {
results = hierarchicalFacetResult.slice(hierarchicalRootPath.split(hierarchicalSeparator).length);
}
return reduce_1(results, generateTreeFn, {
name: state.hierarchicalFacets[hierarchicalFacetIndex].name,
count: null, // root level, no count
isRefined: true, // root level, always refined
path: null, // root level, no path
data: null
});
};
}
function generateHierarchicalTree(sortBy, hierarchicalSeparator, hierarchicalRootPath,
hierarchicalShowParentLevel, currentRefinement) {
return function generateTree(hierarchicalTree, hierarchicalFacetResult, currentHierarchicalLevel) {
var parent = hierarchicalTree;
if (currentHierarchicalLevel > 0) {
var level = 0;
parent = hierarchicalTree;
while (level < currentHierarchicalLevel) {
parent = parent && find_1(parent.data, {isRefined: true});
level++;
}
}
// we found a refined parent, let's add current level data under it
if (parent) {
// filter values in case an object has multiple categories:
// {
// categories: {
// level0: ['beers', 'bières'],
// level1: ['beers > IPA', 'bières > Belges']
// }
// }
//
// If parent refinement is `beers`, then we do not want to have `bières > Belges`
// showing up
var onlyMatchingValuesFn = filterFacetValues(parent.path || hierarchicalRootPath,
currentRefinement, hierarchicalSeparator, hierarchicalRootPath, hierarchicalShowParentLevel);
parent.data = orderBy_1(
map_1(
pickBy_1(hierarchicalFacetResult.data, onlyMatchingValuesFn),
formatHierarchicalFacetValue(hierarchicalSeparator, currentRefinement)
),
sortBy[0], sortBy[1]
);
}
return hierarchicalTree;
};
}
function filterFacetValues(parentPath, currentRefinement, hierarchicalSeparator, hierarchicalRootPath,
hierarchicalShowParentLevel) {
return function(facetCount, facetValue) {
// we want the facetValue is a child of hierarchicalRootPath
if (hierarchicalRootPath &&
(facetValue.indexOf(hierarchicalRootPath) !== 0 || hierarchicalRootPath === facetValue)) {
return false;
}
// we always want root levels (only when there is no prefix path)
return !hierarchicalRootPath && facetValue.indexOf(hierarchicalSeparator) === -1 ||
// if there is a rootPath, being root level mean 1 level under rootPath
hierarchicalRootPath &&
facetValue.split(hierarchicalSeparator).length - hierarchicalRootPath.split(hierarchicalSeparator).length === 1 ||
// if current refinement is a root level and current facetValue is a root level,
// keep the facetValue
facetValue.indexOf(hierarchicalSeparator) === -1 &&
currentRefinement.indexOf(hierarchicalSeparator) === -1 ||
// currentRefinement is a child of the facet value
currentRefinement.indexOf(facetValue) === 0 ||
// facetValue is a child of the current parent, add it
facetValue.indexOf(parentPath + hierarchicalSeparator) === 0 &&
(hierarchicalShowParentLevel || facetValue.indexOf(currentRefinement) === 0);
};
}
function formatHierarchicalFacetValue(hierarchicalSeparator, currentRefinement) {
return function format(facetCount, facetValue) {
return {
name: trim_1(last_1(facetValue.split(hierarchicalSeparator))),
path: facetValue,
count: facetCount,
isRefined: currentRefinement === facetValue || currentRefinement.indexOf(facetValue + hierarchicalSeparator) === 0,
data: null
};
};
}
/**
* @typedef SearchResults.Facet
* @type {object}
* @property {string} name name of the attribute in the record
* @property {object} data the faceting data: value, number of entries
* @property {object} stats undefined unless facet_stats is retrieved from algolia
*/
/**
* @typedef SearchResults.HierarchicalFacet
* @type {object}
* @property {string} name name of the current value given the hierarchical level, trimmed.
* If root node, you get the facet name
* @property {number} count number of objects matching this hierarchical value
* @property {string} path the current hierarchical value full path
* @property {boolean} isRefined `true` if the current value was refined, `false` otherwise
* @property {HierarchicalFacet[]} data sub values for the current level
*/
/**
* @typedef SearchResults.FacetValue
* @type {object}
* @property {string} name the facet value itself
* @property {number} count times this facet appears in the results
* @property {boolean} isRefined is the facet currently selected
* @property {boolean} isExcluded is the facet currently excluded (only for conjunctive facets)
*/
/**
* @typedef Refinement
* @type {object}
* @property {string} type the type of filter used:
* `numeric`, `facet`, `exclude`, `disjunctive`, `hierarchical`
* @property {string} attributeName name of the attribute used for filtering
* @property {string} name the value of the filter
* @property {number} numericValue the value as a number. Only for numeric filters.
* @property {string} operator the operator used. Only for numeric filters.
* @property {number} count the number of computed hits for this filter. Only on facets.
* @property {boolean} exhaustive if the count is exhaustive
*/
function getIndices(obj) {
var indices = {};
forEach_1(obj, function(val, idx) { indices[val] = idx; });
return indices;
}
function assignFacetStats(dest, facetStats, key) {
if (facetStats && facetStats[key]) {
dest.stats = facetStats[key];
}
}
function findMatchingHierarchicalFacetFromAttributeName(hierarchicalFacets, hierarchicalAttributeName) {
return find_1(
hierarchicalFacets,
function facetKeyMatchesAttribute(hierarchicalFacet) {
return includes_1(hierarchicalFacet.attributes, hierarchicalAttributeName);
}
);
}
/*eslint-disable */
/**
* Constructor for SearchResults
* @class
* @classdesc SearchResults contains the results of a query to Algolia using the
* {@link AlgoliaSearchHelper}.
* @param {SearchParameters} state state that led to the response
* @param {array.<object>} results the results from algolia client
* @example <caption>SearchResults of the first query in
* <a href="http://demos.algolia.com/instant-search-demo">the instant search demo</a></caption>
{
"hitsPerPage": 10,
"processingTimeMS": 2,
"facets": [
{
"name": "type",
"data": {
"HardGood": 6627,
"BlackTie": 550,
"Music": 665,
"Software": 131,
"Game": 456,
"Movie": 1571
},
"exhaustive": false
},
{
"exhaustive": false,
"data": {
"Free shipping": 5507
},
"name": "shipping"
}
],
"hits": [
{
"thumbnailImage": "http://img.bbystatic.com/BestBuy_US/images/products/1688/1688832_54x108_s.gif",
"_highlightResult": {
"shortDescription": {
"matchLevel": "none",
"value": "Safeguard your PC, Mac, Android and iOS devices with comprehensive Internet protection",
"matchedWords": []
},
"category": {
"matchLevel": "none",
"value": "Computer Security Software",
"matchedWords": []
},
"manufacturer": {
"matchedWords": [],
"value": "Webroot",
"matchLevel": "none"
},
"name": {
"value": "Webroot SecureAnywhere Internet Security (3-Device) (1-Year Subscription) - Mac/Windows",
"matchedWords": [],
"matchLevel": "none"
}
},
"image": "http://img.bbystatic.com/BestBuy_US/images/products/1688/1688832_105x210_sc.jpg",
"shipping": "Free shipping",
"bestSellingRank": 4,
"shortDescription": "Safeguard your PC, Mac, Android and iOS devices with comprehensive Internet protection",
"url": "http://www.bestbuy.com/site/webroot-secureanywhere-internet-security-3-devi…d=1219060687969&skuId=1688832&cmp=RMX&ky=2d3GfEmNIzjA0vkzveHdZEBgpPCyMnLTJ",
"name": "Webroot SecureAnywhere Internet Security (3-Device) (1-Year Subscription) - Mac/Windows",
"category": "Computer Security Software",
"salePrice_range": "1 - 50",
"objectID": "1688832",
"type": "Software",
"customerReviewCount": 5980,
"salePrice": 49.99,
"manufacturer": "Webroot"
},
....
],
"nbHits": 10000,
"disjunctiveFacets": [
{
"exhaustive": false,
"data": {
"5": 183,
"12": 112,
"7": 149,
...
},
"name": "customerReviewCount",
"stats": {
"max": 7461,
"avg": 157.939,
"min": 1
}
},
{
"data": {
"Printer Ink": 142,
"Wireless Speakers": 60,
"Point & Shoot Cameras": 48,
...
},
"name": "category",
"exhaustive": false
},
{
"exhaustive": false,
"data": {
"> 5000": 2,
"1 - 50": 6524,
"501 - 2000": 566,
"201 - 500": 1501,
"101 - 200": 1360,
"2001 - 5000": 47
},
"name": "salePrice_range"
},
{
"data": {
"Dynex™": 202,
"Insignia™": 230,
"PNY": 72,
...
},
"name": "manufacturer",
"exhaustive": false
}
],
"query": "",
"nbPages": 100,
"page": 0,
"index": "bestbuy"
}
**/
/*eslint-enable */
function SearchResults(state, results) {
var mainSubResponse = results[0];
this._rawResults = results;
/**
* query used to generate the results
* @member {string}
*/
this.query = mainSubResponse.query;
/**
* The query as parsed by the engine given all the rules.
* @member {string}
*/
this.parsedQuery = mainSubResponse.parsedQuery;
/**
* all the records that match the search parameters. Each record is
* augmented with a new attribute `_highlightResult`
* which is an object keyed by attribute and with the following properties:
* - `value` : the value of the facet highlighted (html)
* - `matchLevel`: full, partial or none depending on how the query terms match
* @member {object[]}
*/
this.hits = mainSubResponse.hits;
/**
* index where the results come from
* @member {string}
*/
this.index = mainSubResponse.index;
/**
* number of hits per page requested
* @member {number}
*/
this.hitsPerPage = mainSubResponse.hitsPerPage;
/**
* total number of hits of this query on the index
* @member {number}
*/
this.nbHits = mainSubResponse.nbHits;
/**
* total number of pages with respect to the number of hits per page and the total number of hits
* @member {number}
*/
this.nbPages = mainSubResponse.nbPages;
/**
* current page
* @member {number}
*/
this.page = mainSubResponse.page;
/**
* sum of the processing time of all the queries
* @member {number}
*/
this.processingTimeMS = sumBy_1(results, 'processingTimeMS');
/**
* The position if the position was guessed by IP.
* @member {string}
* @example "48.8637,2.3615",
*/
this.aroundLatLng = mainSubResponse.aroundLatLng;
/**
* The radius computed by Algolia.
* @member {string}
* @example "126792922",
*/
this.automaticRadius = mainSubResponse.automaticRadius;
/**
* String identifying the server used to serve this request.
* @member {string}
* @example "c7-use-2.algolia.net",
*/
this.serverUsed = mainSubResponse.serverUsed;
/**
* Boolean that indicates if the computation of the counts did time out.
* @deprecated
* @member {boolean}
*/
this.timeoutCounts = mainSubResponse.timeoutCounts;
/**
* Boolean that indicates if the computation of the hits did time out.
* @deprecated
* @member {boolean}
*/
this.timeoutHits = mainSubResponse.timeoutHits;
/**
* True if the counts of the facets is exhaustive
* @member {boolean}
*/
this.exhaustiveFacetsCount = mainSubResponse.exhaustiveFacetsCount;
/**
* True if the number of hits is exhaustive
* @member {boolean}
*/
this.exhaustiveNbHits = mainSubResponse.exhaustiveNbHits;
/**
* Contains the userData if they are set by a [query rule](https://www.algolia.com/doc/guides/query-rules/query-rules-overview/).
* @member {object[]}
*/
this.userData = mainSubResponse.userData;
/**
* disjunctive facets results
* @member {SearchResults.Facet[]}
*/
this.disjunctiveFacets = [];
/**
* disjunctive facets results
* @member {SearchResults.HierarchicalFacet[]}
*/
this.hierarchicalFacets = map_1(state.hierarchicalFacets, function initFutureTree() {
return [];
});
/**
* other facets results
* @member {SearchResults.Facet[]}
*/
this.facets = [];
var disjunctiveFacets = state.getRefinedDisjunctiveFacets();
var facetsIndices = getIndices(state.facets);
var disjunctiveFacetsIndices = getIndices(state.disjunctiveFacets);
var nextDisjunctiveResult = 1;
var self = this;
// Since we send request only for disjunctive facets that have been refined,
// we get the facets informations from the first, general, response.
forEach_1(mainSubResponse.facets, function(facetValueObject, facetKey) {
var hierarchicalFacet = findMatchingHierarchicalFacetFromAttributeName(
state.hierarchicalFacets,
facetKey
);
if (hierarchicalFacet) {
// Place the hierarchicalFacet data at the correct index depending on
// the attributes order that was defined at the helper initialization
var facetIndex = hierarchicalFacet.attributes.indexOf(facetKey);
var idxAttributeName = findIndex_1(state.hierarchicalFacets, {name: hierarchicalFacet.name});
self.hierarchicalFacets[idxAttributeName][facetIndex] = {
attribute: facetKey,
data: facetValueObject,
exhaustive: mainSubResponse.exhaustiveFacetsCount
};
} else {
var isFacetDisjunctive = indexOf_1(state.disjunctiveFacets, facetKey) !== -1;
var isFacetConjunctive = indexOf_1(state.facets, facetKey) !== -1;
var position;
if (isFacetDisjunctive) {
position = disjunctiveFacetsIndices[facetKey];
self.disjunctiveFacets[position] = {
name: facetKey,
data: facetValueObject,
exhaustive: mainSubResponse.exhaustiveFacetsCount
};
assignFacetStats(self.disjunctiveFacets[position], mainSubResponse.facets_stats, facetKey);
}
if (isFacetConjunctive) {
position = facetsIndices[facetKey];
self.facets[position] = {
name: facetKey,
data: facetValueObject,
exhaustive: mainSubResponse.exhaustiveFacetsCount
};
assignFacetStats(self.facets[position], mainSubResponse.facets_stats, facetKey);
}
}
});
// Make sure we do not keep holes within the hierarchical facets
this.hierarchicalFacets = compact_1(this.hierarchicalFacets);
// aggregate the refined disjunctive facets
forEach_1(disjunctiveFacets, function(disjunctiveFacet) {
var result = results[nextDisjunctiveResult];
var hierarchicalFacet = state.getHierarchicalFacetByName(disjunctiveFacet);
// There should be only item in facets.
forEach_1(result.facets, function(facetResults, dfacet) {
var position;
if (hierarchicalFacet) {
position = findIndex_1(state.hierarchicalFacets, {name: hierarchicalFacet.name});
var attributeIndex = findIndex_1(self.hierarchicalFacets[position], {attribute: dfacet});
// previous refinements and no results so not able to find it
if (attributeIndex === -1) {
return;
}
self.hierarchicalFacets[position][attributeIndex].data = merge_1(
{},
self.hierarchicalFacets[position][attributeIndex].data,
facetResults
);
} else {
position = disjunctiveFacetsIndices[dfacet];
var dataFromMainRequest = mainSubResponse.facets && mainSubResponse.facets[dfacet] || {};
self.disjunctiveFacets[position] = {
name: dfacet,
data: defaults_1({}, facetResults, dataFromMainRequest),
exhaustive: result.exhaustiveFacetsCount
};
assignFacetStats(self.disjunctiveFacets[position], result.facets_stats, dfacet);
if (state.disjunctiveFacetsRefinements[dfacet]) {
forEach_1(state.disjunctiveFacetsRefinements[dfacet], function(refinementValue) {
// add the disjunctive refinements if it is no more retrieved
if (!self.disjunctiveFacets[position].data[refinementValue] &&
indexOf_1(state.disjunctiveFacetsRefinements[dfacet], refinementValue) > -1) {
self.disjunctiveFacets[position].data[refinementValue] = 0;
}
});
}
}
});
nextDisjunctiveResult++;
});
// if we have some root level values for hierarchical facets, merge them
forEach_1(state.getRefinedHierarchicalFacets(), function(refinedFacet) {
var hierarchicalFacet = state.getHierarchicalFacetByName(refinedFacet);
var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet);
var currentRefinement = state.getHierarchicalRefinement(refinedFacet);
// if we are already at a root refinement (or no refinement at all), there is no
// root level values request
if (currentRefinement.length === 0 || currentRefinement[0].split(separator).length < 2) {
return;
}
var result = results[nextDisjunctiveResult];
forEach_1(result.facets, function(facetResults, dfacet) {
var position = findIndex_1(state.hierarchicalFacets, {name: hierarchicalFacet.name});
var attributeIndex = findIndex_1(self.hierarchicalFacets[position], {attribute: dfacet});
// previous refinements and no results so not able to find it
if (attributeIndex === -1) {
return;
}
// when we always get root levels, if the hits refinement is `beers > IPA` (count: 5),
// then the disjunctive values will be `beers` (count: 100),
// but we do not want to display
// | beers (100)
// > IPA (5)
// We want
// | beers (5)
// > IPA (5)
var defaultData = {};
if (currentRefinement.length > 0) {
var root = currentRefinement[0].split(separator)[0];
defaultData[root] = self.hierarchicalFacets[position][attributeIndex].data[root];
}
self.hierarchicalFacets[position][attributeIndex].data = defaults_1(
defaultData,
facetResults,
self.hierarchicalFacets[position][attributeIndex].data
);
});
nextDisjunctiveResult++;
});
// add the excludes
forEach_1(state.facetsExcludes, function(excludes, facetName) {
var position = facetsIndices[facetName];
self.facets[position] = {
name: facetName,
data: mainSubResponse.facets[facetName],
exhaustive: mainSubResponse.exhaustiveFacetsCount
};
forEach_1(excludes, function(facetValue) {
self.facets[position] = self.facets[position] || {name: facetName};
self.facets[position].data = self.facets[position].data || {};
self.facets[position].data[facetValue] = 0;
});
});
this.hierarchicalFacets = map_1(this.hierarchicalFacets, generateHierarchicalTree_1(state));
this.facets = compact_1(this.facets);
this.disjunctiveFacets = compact_1(this.disjunctiveFacets);
this._state = state;
}
/**
* Get a facet object with its name
* @deprecated
* @param {string} name name of the faceted attribute
* @return {SearchResults.Facet} the facet object
*/
SearchResults.prototype.getFacetByName = function(name) {
var predicate = {name: name};
return find_1(this.facets, predicate) ||
find_1(this.disjunctiveFacets, predicate) ||
find_1(this.hierarchicalFacets, predicate);
};
/**
* Get the facet values of a specified attribute from a SearchResults object.
* @private
* @param {SearchResults} results the search results to search in
* @param {string} attribute name of the faceted attribute to search for
* @return {array|object} facet values. For the hierarchical facets it is an object.
*/
function extractNormalizedFacetValues(results, attribute) {
var predicate = {name: attribute};
if (results._state.isConjunctiveFacet(attribute)) {
var facet = find_1(results.facets, predicate);
if (!facet) return [];
return map_1(facet.data, function(v, k) {
return {
name: k,
count: v,
isRefined: results._state.isFacetRefined(attribute, k),
isExcluded: results._state.isExcludeRefined(attribute, k)
};
});
} else if (results._state.isDisjunctiveFacet(attribute)) {
var disjunctiveFacet = find_1(results.disjunctiveFacets, predicate);
if (!disjunctiveFacet) return [];
return map_1(disjunctiveFacet.data, function(v, k) {
return {
name: k,
count: v,
isRefined: results._state.isDisjunctiveFacetRefined(attribute, k)
};
});
} else if (results._state.isHierarchicalFacet(attribute)) {
return find_1(results.hierarchicalFacets, predicate);
}
}
/**
* Sort nodes of a hierarchical facet results
* @private
* @param {HierarchicalFacet} node node to upon which we want to apply the sort
*/
function recSort(sortFn, node) {
if (!node.data || node.data.length === 0) {
return node;
}
var children = map_1(node.data, partial_1(recSort, sortFn));
var sortedChildren = sortFn(children);
var newNode = merge_1({}, node, {data: sortedChildren});
return newNode;
}
SearchResults.DEFAULT_SORT = ['isRefined:desc', 'count:desc', 'name:asc'];
function vanillaSortFn(order, data) {
return data.sort(order);
}
/**
* Get a the list of values for a given facet attribute. Those values are sorted
* refinement first, descending count (bigger value on top), and name ascending
* (alphabetical order). The sort formula can overridden using either string based
* predicates or a function.
*
* This method will return all the values returned by the Algolia engine plus all
* the values already refined. This means that it can happen that the
* `maxValuesPerFacet` [configuration](https://www.algolia.com/doc/rest-api/search#param-maxValuesPerFacet)
* might not be respected if you have facet values that are already refined.
* @param {string} attribute attribute name
* @param {object} opts configuration options.
* @param {Array.<string> | function} opts.sortBy
* When using strings, it consists of
* the name of the [FacetValue](#SearchResults.FacetValue) or the
* [HierarchicalFacet](#SearchResults.HierarchicalFacet) attributes with the
* order (`asc` or `desc`). For example to order the value by count, the
* argument would be `['count:asc']`.
*
* If only the attribute name is specified, the ordering defaults to the one
* specified in the default value for this attribute.
*
* When not specified, the order is
* ascending. This parameter can also be a function which takes two facet
* values and should return a number, 0 if equal, 1 if the first argument is
* bigger or -1 otherwise.
*
* The default value for this attribute `['isRefined:desc', 'count:desc', 'name:asc']`
* @return {FacetValue[]|HierarchicalFacet} depending on the type of facet of
* the attribute requested (hierarchical, disjunctive or conjunctive)
* @example
* helper.on('results', function(content){
* //get values ordered only by name ascending using the string predicate
* content.getFacetValues('city', {sortBy: ['name:asc']});
* //get values ordered only by count ascending using a function
* content.getFacetValues('city', {
* // this is equivalent to ['count:asc']
* sortBy: function(a, b) {
* if (a.count === b.count) return 0;
* if (a.count > b.count) return 1;
* if (b.count > a.count) return -1;
* }
* });
* });
*/
SearchResults.prototype.getFacetValues = function(attribute, opts) {
var facetValues = extractNormalizedFacetValues(this, attribute);
if (!facetValues) throw new Error(attribute + ' is not a retrieved facet.');
var options = defaults_1({}, opts, {sortBy: SearchResults.DEFAULT_SORT});
if (isArray_1(options.sortBy)) {
var order = formatSort(options.sortBy, SearchResults.DEFAULT_SORT);
if (isArray_1(facetValues)) {
return orderBy_1(facetValues, order[0], order[1]);
}
// If facetValues is not an array, it's an object thus a hierarchical facet object
return recSort(partialRight_1(orderBy_1, order[0], order[1]), facetValues);
} else if (isFunction_1(options.sortBy)) {
if (isArray_1(facetValues)) {
return facetValues.sort(options.sortBy);
}
// If facetValues is not an array, it's an object thus a hierarchical facet object
return recSort(partial_1(vanillaSortFn, options.sortBy), facetValues);
}
throw new Error(
'options.sortBy is optional but if defined it must be ' +
'either an array of string (predicates) or a sorting function'
);
};
/**
* Returns the facet stats if attribute is defined and the facet contains some.
* Otherwise returns undefined.
* @param {string} attribute name of the faceted attribute
* @return {object} The stats of the facet
*/
SearchResults.prototype.getFacetStats = function(attribute) {
if (this._state.isConjunctiveFacet(attribute)) {
return getFacetStatsIfAvailable(this.facets, attribute);
} else if (this._state.isDisjunctiveFacet(attribute)) {
return getFacetStatsIfAvailable(this.disjunctiveFacets, attribute);
}
throw new Error(attribute + ' is not present in `facets` or `disjunctiveFacets`');
};
function getFacetStatsIfAvailable(facetList, facetName) {
var data = find_1(facetList, {name: facetName});
return data && data.stats;
}
/**
* Returns all refinements for all filters + tags. It also provides
* additional information: count and exhausistivity for each filter.
*
* See the [refinement type](#Refinement) for an exhaustive view of the available
* data.
*
* @return {Array.<Refinement>} all the refinements
*/
SearchResults.prototype.getRefinements = function() {
var state = this._state;
var results = this;
var res = [];
forEach_1(state.facetsRefinements, function(refinements, attributeName) {
forEach_1(refinements, function(name) {
res.push(getRefinement(state, 'facet', attributeName, name, results.facets));
});
});
forEach_1(state.facetsExcludes, function(refinements, attributeName) {
forEach_1(refinements, function(name) {
res.push(getRefinement(state, 'exclude', attributeName, name, results.facets));
});
});
forEach_1(state.disjunctiveFacetsRefinements, function(refinements, attributeName) {
forEach_1(refinements, function(name) {
res.push(getRefinement(state, 'disjunctive', attributeName, name, results.disjunctiveFacets));
});
});
forEach_1(state.hierarchicalFacetsRefinements, function(refinements, attributeName) {
forEach_1(refinements, function(name) {
res.push(getHierarchicalRefinement(state, attributeName, name, results.hierarchicalFacets));
});
});
forEach_1(state.numericRefinements, function(operators, attributeName) {
forEach_1(operators, function(values, operator) {
forEach_1(values, function(value) {
res.push({
type: 'numeric',
attributeName: attributeName,
name: value,
numericValue: value,
operator: operator
});
});
});
});
forEach_1(state.tagRefinements, function(name) {
res.push({type: 'tag', attributeName: '_tags', name: name});
});
return res;
};
function getRefinement(state, type, attributeName, name, resultsFacets) {
var facet = find_1(resultsFacets, {name: attributeName});
var count = get_1(facet, 'data[' + name + ']');
var exhaustive = get_1(facet, 'exhaustive');
return {
type: type,
attributeName: attributeName,
name: name,
count: count || 0,
exhaustive: exhaustive || false
};
}
function getHierarchicalRefinement(state, attributeName, name, resultsFacets) {
var facet = find_1(resultsFacets, {name: attributeName});
var facetDeclaration = state.getHierarchicalFacetByName(attributeName);
var splitted = name.split(facetDeclaration.separator);
var configuredName = splitted[splitted.length - 1];
for (var i = 0; facet !== undefined && i < splitted.length; ++i) {
facet = find_1(facet.data, {name: splitted[i]});
}
var count = get_1(facet, 'count');
var exhaustive = get_1(facet, 'exhaustive');
return {
type: 'hierarchical',
attributeName: attributeName,
name: configuredName,
count: count || 0,
exhaustive: exhaustive || false
};
}
var SearchResults_1 = SearchResults;
var isBufferBrowser = function isBuffer(arg) {
return arg && typeof arg === 'object'
&& typeof arg.copy === 'function'
&& typeof arg.fill === 'function'
&& typeof arg.readUInt8 === 'function';
};
var inherits_browser = createCommonjsModule(function (module) {
if (typeof Object.create === 'function') {
// implementation from standard node.js 'util' module
module.exports = function inherits(ctor, superCtor) {
ctor.super_ = superCtor;
ctor.prototype = Object.create(superCtor.prototype, {
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true
}
});
};
} else {
// old school shim for old browsers
module.exports = function inherits(ctor, superCtor) {
ctor.super_ = superCtor;
var TempCtor = function () {};
TempCtor.prototype = superCtor.prototype;
ctor.prototype = new TempCtor();
ctor.prototype.constructor = ctor;
};
}
});
var util = createCommonjsModule(function (module, exports) {
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var formatRegExp = /%[sdj%]/g;
exports.format = function(f) {
if (!isString(f)) {
var objects = [];
for (var i = 0; i < arguments.length; i++) {
objects.push(inspect(arguments[i]));
}
return objects.join(' ');
}
var i = 1;
var args = arguments;
var len = args.length;
var str = String(f).replace(formatRegExp, function(x) {
if (x === '%%') return '%';
if (i >= len) return x;
switch (x) {
case '%s': return String(args[i++]);
case '%d': return Number(args[i++]);
case '%j':
try {
return JSON.stringify(args[i++]);
} catch (_) {
return '[Circular]';
}
default:
return x;
}
});
for (var x = args[i]; i < len; x = args[++i]) {
if (isNull(x) || !isObject(x)) {
str += ' ' + x;
} else {
str += ' ' + inspect(x);
}
}
return str;
};
// Mark that a method should not be used.
// Returns a modified function which warns once by default.
// If --no-deprecation is set, then it is a no-op.
exports.deprecate = function(fn, msg) {
// Allow for deprecating things in the process of starting up.
if (isUndefined(commonjsGlobal.process)) {
return function() {
return exports.deprecate(fn, msg).apply(this, arguments);
};
}
if (process.noDeprecation === true) {
return fn;
}
var warned = false;
function deprecated() {
if (!warned) {
if (process.throwDeprecation) {
throw new Error(msg);
} else if (process.traceDeprecation) {
console.trace(msg);
} else {
console.error(msg);
}
warned = true;
}
return fn.apply(this, arguments);
}
return deprecated;
};
var debugs = {};
var debugEnviron;
exports.debuglog = function(set) {
if (isUndefined(debugEnviron))
debugEnviron = process.env.NODE_DEBUG || '';
set = set.toUpperCase();
if (!debugs[set]) {
if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
var pid = process.pid;
debugs[set] = function() {
var msg = exports.format.apply(exports, arguments);
console.error('%s %d: %s', set, pid, msg);
};
} else {
debugs[set] = function() {};
}
}
return debugs[set];
};
/**
* Echos the value of a value. Trys to print the value out
* in the best way possible given the different types.
*
* @param {Object} obj The object to print out.
* @param {Object} opts Optional options object that alters the output.
*/
/* legacy: obj, showHidden, depth, colors*/
function inspect(obj, opts) {
// default options
var ctx = {
seen: [],
stylize: stylizeNoColor
};
// legacy...
if (arguments.length >= 3) ctx.depth = arguments[2];
if (arguments.length >= 4) ctx.colors = arguments[3];
if (isBoolean(opts)) {
// legacy...
ctx.showHidden = opts;
} else if (opts) {
// got an "options" object
exports._extend(ctx, opts);
}
// set default options
if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
if (isUndefined(ctx.depth)) ctx.depth = 2;
if (isUndefined(ctx.colors)) ctx.colors = false;
if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
if (ctx.colors) ctx.stylize = stylizeWithColor;
return formatValue(ctx, obj, ctx.depth);
}
exports.inspect = inspect;
// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
inspect.colors = {
'bold' : [1, 22],
'italic' : [3, 23],
'underline' : [4, 24],
'inverse' : [7, 27],
'white' : [37, 39],
'grey' : [90, 39],
'black' : [30, 39],
'blue' : [34, 39],
'cyan' : [36, 39],
'green' : [32, 39],
'magenta' : [35, 39],
'red' : [31, 39],
'yellow' : [33, 39]
};
// Don't use 'blue' not visible on cmd.exe
inspect.styles = {
'special': 'cyan',
'number': 'yellow',
'boolean': 'yellow',
'undefined': 'grey',
'null': 'bold',
'string': 'green',
'date': 'magenta',
// "name": intentionally not styling
'regexp': 'red'
};
function stylizeWithColor(str, styleType) {
var style = inspect.styles[styleType];
if (style) {
return '\u001b[' + inspect.colors[style][0] + 'm' + str +
'\u001b[' + inspect.colors[style][1] + 'm';
} else {
return str;
}
}
function stylizeNoColor(str, styleType) {
return str;
}
function arrayToHash(array) {
var hash = {};
array.forEach(function(val, idx) {
hash[val] = true;
});
return hash;
}
function formatValue(ctx, value, recurseTimes) {
// Provide a hook for user-specified inspect functions.
// Check that value is an object with an inspect function on it
if (ctx.customInspect &&
value &&
isFunction(value.inspect) &&
// Filter out the util module, it's inspect function is special
value.inspect !== exports.inspect &&
// Also filter out any prototype objects using the circular check.
!(value.constructor && value.constructor.prototype === value)) {
var ret = value.inspect(recurseTimes, ctx);
if (!isString(ret)) {
ret = formatValue(ctx, ret, recurseTimes);
}
return ret;
}
// Primitive types cannot have properties
var primitive = formatPrimitive(ctx, value);
if (primitive) {
return primitive;
}
// Look up the keys of the object.
var keys = Object.keys(value);
var visibleKeys = arrayToHash(keys);
if (ctx.showHidden) {
keys = Object.getOwnPropertyNames(value);
}
// IE doesn't make error fields non-enumerable
// http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
if (isError(value)
&& (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
return formatError(value);
}
// Some type of object without properties can be shortcutted.
if (keys.length === 0) {
if (isFunction(value)) {
var name = value.name ? ': ' + value.name : '';
return ctx.stylize('[Function' + name + ']', 'special');
}
if (isRegExp(value)) {
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
}
if (isDate(value)) {
return ctx.stylize(Date.prototype.toString.call(value), 'date');
}
if (isError(value)) {
return formatError(value);
}
}
var base = '', array = false, braces = ['{', '}'];
// Make Array say that they are Array
if (isArray(value)) {
array = true;
braces = ['[', ']'];
}
// Make functions say that they are functions
if (isFunction(value)) {
var n = value.name ? ': ' + value.name : '';
base = ' [Function' + n + ']';
}
// Make RegExps say that they are RegExps
if (isRegExp(value)) {
base = ' ' + RegExp.prototype.toString.call(value);
}
// Make dates with properties first say the date
if (isDate(value)) {
base = ' ' + Date.prototype.toUTCString.call(value);
}
// Make error with message first say the error
if (isError(value)) {
base = ' ' + formatError(value);
}
if (keys.length === 0 && (!array || value.length == 0)) {
return braces[0] + base + braces[1];
}
if (recurseTimes < 0) {
if (isRegExp(value)) {
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
} else {
return ctx.stylize('[Object]', 'special');
}
}
ctx.seen.push(value);
var output;
if (array) {
output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
} else {
output = keys.map(function(key) {
return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
});
}
ctx.seen.pop();
return reduceToSingleString(output, base, braces);
}
function formatPrimitive(ctx, value) {
if (isUndefined(value))
return ctx.stylize('undefined', 'undefined');
if (isString(value)) {
var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
.replace(/'/g, "\\'")
.replace(/\\"/g, '"') + '\'';
return ctx.stylize(simple, 'string');
}
if (isNumber(value))
return ctx.stylize('' + value, 'number');
if (isBoolean(value))
return ctx.stylize('' + value, 'boolean');
// For some reason typeof null is "object", so special case here.
if (isNull(value))
return ctx.stylize('null', 'null');
}
function formatError(value) {
return '[' + Error.prototype.toString.call(value) + ']';
}
function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
var output = [];
for (var i = 0, l = value.length; i < l; ++i) {
if (hasOwnProperty(value, String(i))) {
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
String(i), true));
} else {
output.push('');
}
}
keys.forEach(function(key) {
if (!key.match(/^\d+$/)) {
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
key, true));
}
});
return output;
}
function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
var name, str, desc;
desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
if (desc.get) {
if (desc.set) {
str = ctx.stylize('[Getter/Setter]', 'special');
} else {
str = ctx.stylize('[Getter]', 'special');
}
} else {
if (desc.set) {
str = ctx.stylize('[Setter]', 'special');
}
}
if (!hasOwnProperty(visibleKeys, key)) {
name = '[' + key + ']';
}
if (!str) {
if (ctx.seen.indexOf(desc.value) < 0) {
if (isNull(recurseTimes)) {
str = formatValue(ctx, desc.value, null);
} else {
str = formatValue(ctx, desc.value, recurseTimes - 1);
}
if (str.indexOf('\n') > -1) {
if (array) {
str = str.split('\n').map(function(line) {
return ' ' + line;
}).join('\n').substr(2);
} else {
str = '\n' + str.split('\n').map(function(line) {
return ' ' + line;
}).join('\n');
}
}
} else {
str = ctx.stylize('[Circular]', 'special');
}
}
if (isUndefined(name)) {
if (array && key.match(/^\d+$/)) {
return str;
}
name = JSON.stringify('' + key);
if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
name = name.substr(1, name.length - 2);
name = ctx.stylize(name, 'name');
} else {
name = name.replace(/'/g, "\\'")
.replace(/\\"/g, '"')
.replace(/(^"|"$)/g, "'");
name = ctx.stylize(name, 'string');
}
}
return name + ': ' + str;
}
function reduceToSingleString(output, base, braces) {
var numLinesEst = 0;
var length = output.reduce(function(prev, cur) {
numLinesEst++;
if (cur.indexOf('\n') >= 0) numLinesEst++;
return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
}, 0);
if (length > 60) {
return braces[0] +
(base === '' ? '' : base + '\n ') +
' ' +
output.join(',\n ') +
' ' +
braces[1];
}
return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
}
// NOTE: These type checking functions intentionally don't use `instanceof`
// because it is fragile and can be easily faked with `Object.create()`.
function isArray(ar) {
return Array.isArray(ar);
}
exports.isArray = isArray;
function isBoolean(arg) {
return typeof arg === 'boolean';
}
exports.isBoolean = isBoolean;
function isNull(arg) {
return arg === null;
}
exports.isNull = isNull;
function isNullOrUndefined(arg) {
return arg == null;
}
exports.isNullOrUndefined = isNullOrUndefined;
function isNumber(arg) {
return typeof arg === 'number';
}
exports.isNumber = isNumber;
function isString(arg) {
return typeof arg === 'string';
}
exports.isString = isString;
function isSymbol(arg) {
return typeof arg === 'symbol';
}
exports.isSymbol = isSymbol;
function isUndefined(arg) {
return arg === void 0;
}
exports.isUndefined = isUndefined;
function isRegExp(re) {
return isObject(re) && objectToString(re) === '[object RegExp]';
}
exports.isRegExp = isRegExp;
function isObject(arg) {
return typeof arg === 'object' && arg !== null;
}
exports.isObject = isObject;
function isDate(d) {
return isObject(d) && objectToString(d) === '[object Date]';
}
exports.isDate = isDate;
function isError(e) {
return isObject(e) &&
(objectToString(e) === '[object Error]' || e instanceof Error);
}
exports.isError = isError;
function isFunction(arg) {
return typeof arg === 'function';
}
exports.isFunction = isFunction;
function isPrimitive(arg) {
return arg === null ||
typeof arg === 'boolean' ||
typeof arg === 'number' ||
typeof arg === 'string' ||
typeof arg === 'symbol' || // ES6 symbol
typeof arg === 'undefined';
}
exports.isPrimitive = isPrimitive;
exports.isBuffer = isBufferBrowser;
function objectToString(o) {
return Object.prototype.toString.call(o);
}
function pad(n) {
return n < 10 ? '0' + n.toString(10) : n.toString(10);
}
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
'Oct', 'Nov', 'Dec'];
// 26 Feb 16:19:34
function timestamp() {
var d = new Date();
var time = [pad(d.getHours()),
pad(d.getMinutes()),
pad(d.getSeconds())].join(':');
return [d.getDate(), months[d.getMonth()], time].join(' ');
}
// log is just a thin wrapper to console.log that prepends a timestamp
exports.log = function() {
console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
};
/**
* Inherit the prototype methods from one constructor into another.
*
* The Function.prototype.inherits from lang.js rewritten as a standalone
* function (not on Function.prototype). NOTE: If this file is to be loaded
* during bootstrapping this function needs to be rewritten using some native
* functions as prototype setup using normal JavaScript does not work as
* expected during bootstrapping (see mirror.js in r114903).
*
* @param {function} ctor Constructor function which needs to inherit the
* prototype.
* @param {function} superCtor Constructor function to inherit prototype from.
*/
exports.inherits = inherits_browser;
exports._extend = function(origin, add) {
// Don't do anything if add isn't an object
if (!add || !isObject(add)) return origin;
var keys = Object.keys(add);
var i = keys.length;
while (i--) {
origin[keys[i]] = add[keys[i]];
}
return origin;
};
function hasOwnProperty(obj, prop) {
return Object.prototype.hasOwnProperty.call(obj, prop);
}
});
var util_1 = util.format;
var util_2 = util.deprecate;
var util_3 = util.debuglog;
var util_4 = util.inspect;
var util_5 = util.isArray;
var util_6 = util.isBoolean;
var util_7 = util.isNull;
var util_8 = util.isNullOrUndefined;
var util_9 = util.isNumber;
var util_10 = util.isString;
var util_11 = util.isSymbol;
var util_12 = util.isUndefined;
var util_13 = util.isRegExp;
var util_14 = util.isObject;
var util_15 = util.isDate;
var util_16 = util.isError;
var util_17 = util.isFunction;
var util_18 = util.isPrimitive;
var util_19 = util.isBuffer;
var util_20 = util.log;
var util_21 = util.inherits;
var util_22 = util._extend;
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
function EventEmitter() {
this._events = this._events || {};
this._maxListeners = this._maxListeners || undefined;
}
var events = EventEmitter;
// Backwards-compat with node 0.10.x
EventEmitter.EventEmitter = EventEmitter;
EventEmitter.prototype._events = undefined;
EventEmitter.prototype._maxListeners = undefined;
// By default EventEmitters will print a warning if more than 10 listeners are
// added to it. This is a useful default which helps finding memory leaks.
EventEmitter.defaultMaxListeners = 10;
// Obviously not all Emitters should be limited to 10. This function allows
// that to be increased. Set to zero for unlimited.
EventEmitter.prototype.setMaxListeners = function(n) {
if (!isNumber$2(n) || n < 0 || isNaN(n))
throw TypeError('n must be a positive number');
this._maxListeners = n;
return this;
};
EventEmitter.prototype.emit = function(type) {
var er, handler, len, args, i, listeners;
if (!this._events)
this._events = {};
// If there is no 'error' event listener then throw.
if (type === 'error') {
if (!this._events.error ||
(isObject$2(this._events.error) && !this._events.error.length)) {
er = arguments[1];
if (er instanceof Error) {
throw er; // Unhandled 'error' event
} else {
// At least give some kind of context to the user
var err = new Error('Uncaught, unspecified "error" event. (' + er + ')');
err.context = er;
throw err;
}
}
}
handler = this._events[type];
if (isUndefined$2(handler))
return false;
if (isFunction$2(handler)) {
switch (arguments.length) {
// fast cases
case 1:
handler.call(this);
break;
case 2:
handler.call(this, arguments[1]);
break;
case 3:
handler.call(this, arguments[1], arguments[2]);
break;
// slower
default:
args = Array.prototype.slice.call(arguments, 1);
handler.apply(this, args);
}
} else if (isObject$2(handler)) {
args = Array.prototype.slice.call(arguments, 1);
listeners = handler.slice();
len = listeners.length;
for (i = 0; i < len; i++)
listeners[i].apply(this, args);
}
return true;
};
EventEmitter.prototype.addListener = function(type, listener) {
var m;
if (!isFunction$2(listener))
throw TypeError('listener must be a function');
if (!this._events)
this._events = {};
// To avoid recursion in the case that type === "newListener"! Before
// adding it to the listeners, first emit "newListener".
if (this._events.newListener)
this.emit('newListener', type,
isFunction$2(listener.listener) ?
listener.listener : listener);
if (!this._events[type])
// Optimize the case of one listener. Don't need the extra array object.
this._events[type] = listener;
else if (isObject$2(this._events[type]))
// If we've already got an array, just append.
this._events[type].push(listener);
else
// Adding the second element, need to change to array.
this._events[type] = [this._events[type], listener];
// Check for listener leak
if (isObject$2(this._events[type]) && !this._events[type].warned) {
if (!isUndefined$2(this._maxListeners)) {
m = this._maxListeners;
} else {
m = EventEmitter.defaultMaxListeners;
}
if (m && m > 0 && this._events[type].length > m) {
this._events[type].warned = true;
console.error('(node) warning: possible EventEmitter memory ' +
'leak detected. %d listeners added. ' +
'Use emitter.setMaxListeners() to increase limit.',
this._events[type].length);
if (typeof console.trace === 'function') {
// not supported in IE 10
console.trace();
}
}
}
return this;
};
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
EventEmitter.prototype.once = function(type, listener) {
if (!isFunction$2(listener))
throw TypeError('listener must be a function');
var fired = false;
function g() {
this.removeListener(type, g);
if (!fired) {
fired = true;
listener.apply(this, arguments);
}
}
g.listener = listener;
this.on(type, g);
return this;
};
// emits a 'removeListener' event iff the listener was removed
EventEmitter.prototype.removeListener = function(type, listener) {
var list, position, length, i;
if (!isFunction$2(listener))
throw TypeError('listener must be a function');
if (!this._events || !this._events[type])
return this;
list = this._events[type];
length = list.length;
position = -1;
if (list === listener ||
(isFunction$2(list.listener) && list.listener === listener)) {
delete this._events[type];
if (this._events.removeListener)
this.emit('removeListener', type, listener);
} else if (isObject$2(list)) {
for (i = length; i-- > 0;) {
if (list[i] === listener ||
(list[i].listener && list[i].listener === listener)) {
position = i;
break;
}
}
if (position < 0)
return this;
if (list.length === 1) {
list.length = 0;
delete this._events[type];
} else {
list.splice(position, 1);
}
if (this._events.removeListener)
this.emit('removeListener', type, listener);
}
return this;
};
EventEmitter.prototype.removeAllListeners = function(type) {
var key, listeners;
if (!this._events)
return this;
// not listening for removeListener, no need to emit
if (!this._events.removeListener) {
if (arguments.length === 0)
this._events = {};
else if (this._events[type])
delete this._events[type];
return this;
}
// emit removeListener for all listeners on all events
if (arguments.length === 0) {
for (key in this._events) {
if (key === 'removeListener') continue;
this.removeAllListeners(key);
}
this.removeAllListeners('removeListener');
this._events = {};
return this;
}
listeners = this._events[type];
if (isFunction$2(listeners)) {
this.removeListener(type, listeners);
} else if (listeners) {
// LIFO order
while (listeners.length)
this.removeListener(type, listeners[listeners.length - 1]);
}
delete this._events[type];
return this;
};
EventEmitter.prototype.listeners = function(type) {
var ret;
if (!this._events || !this._events[type])
ret = [];
else if (isFunction$2(this._events[type]))
ret = [this._events[type]];
else
ret = this._events[type].slice();
return ret;
};
EventEmitter.prototype.listenerCount = function(type) {
if (this._events) {
var evlistener = this._events[type];
if (isFunction$2(evlistener))
return 1;
else if (evlistener)
return evlistener.length;
}
return 0;
};
EventEmitter.listenerCount = function(emitter, type) {
return emitter.listenerCount(type);
};
function isFunction$2(arg) {
return typeof arg === 'function';
}
function isNumber$2(arg) {
return typeof arg === 'number';
}
function isObject$2(arg) {
return typeof arg === 'object' && arg !== null;
}
function isUndefined$2(arg) {
return arg === void 0;
}
/**
* A DerivedHelper is a way to create sub requests to
* Algolia from a main helper.
* @class
* @classdesc The DerivedHelper provides an event based interface for search callbacks:
* - search: when a search is triggered using the `search()` method.
* - result: when the response is retrieved from Algolia and is processed.
* This event contains a {@link SearchResults} object and the
* {@link SearchParameters} corresponding to this answer.
*/
function DerivedHelper(mainHelper, fn) {
this.main = mainHelper;
this.fn = fn;
this.lastResults = null;
}
util.inherits(DerivedHelper, events.EventEmitter);
/**
* Detach this helper from the main helper
* @return {undefined}
* @throws Error if the derived helper is already detached
*/
DerivedHelper.prototype.detach = function() {
this.removeAllListeners();
this.main.detachDerivedHelper(this);
};
DerivedHelper.prototype.getModifiedState = function(parameters) {
return this.fn(parameters);
};
var DerivedHelper_1 = DerivedHelper;
var requestBuilder = {
/**
* Get all the queries to send to the client, those queries can used directly
* with the Algolia client.
* @private
* @return {object[]} The queries
*/
_getQueries: function getQueries(index, state) {
var queries = [];
// One query for the hits
queries.push({
indexName: index,
params: requestBuilder._getHitsSearchParams(state)
});
// One for each disjunctive facets
forEach_1(state.getRefinedDisjunctiveFacets(), function(refinedFacet) {
queries.push({
indexName: index,
params: requestBuilder._getDisjunctiveFacetSearchParams(state, refinedFacet)
});
});
// maybe more to get the root level of hierarchical facets when activated
forEach_1(state.getRefinedHierarchicalFacets(), function(refinedFacet) {
var hierarchicalFacet = state.getHierarchicalFacetByName(refinedFacet);
var currentRefinement = state.getHierarchicalRefinement(refinedFacet);
// if we are deeper than level 0 (starting from `beer > IPA`)
// we want to get the root values
var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet);
if (currentRefinement.length > 0 && currentRefinement[0].split(separator).length > 1) {
queries.push({
indexName: index,
params: requestBuilder._getDisjunctiveFacetSearchParams(state, refinedFacet, true)
});
}
});
return queries;
},
/**
* Build search parameters used to fetch hits
* @private
* @return {object.<string, any>}
*/
_getHitsSearchParams: function(state) {
var facets = state.facets
.concat(state.disjunctiveFacets)
.concat(requestBuilder._getHitsHierarchicalFacetsAttributes(state));
var facetFilters = requestBuilder._getFacetFilters(state);
var numericFilters = requestBuilder._getNumericFilters(state);
var tagFilters = requestBuilder._getTagFilters(state);
var additionalParams = {
facets: facets,
tagFilters: tagFilters
};
if (facetFilters.length > 0) {
additionalParams.facetFilters = facetFilters;
}
if (numericFilters.length > 0) {
additionalParams.numericFilters = numericFilters;
}
return merge_1(state.getQueryParams(), additionalParams);
},
/**
* Build search parameters used to fetch a disjunctive facet
* @private
* @param {string} facet the associated facet name
* @param {boolean} hierarchicalRootLevel ?? FIXME
* @return {object}
*/
_getDisjunctiveFacetSearchParams: function(state, facet, hierarchicalRootLevel) {
var facetFilters = requestBuilder._getFacetFilters(state, facet, hierarchicalRootLevel);
var numericFilters = requestBuilder._getNumericFilters(state, facet);
var tagFilters = requestBuilder._getTagFilters(state);
var additionalParams = {
hitsPerPage: 1,
page: 0,
attributesToRetrieve: [],
attributesToHighlight: [],
attributesToSnippet: [],
tagFilters: tagFilters,
analytics: false
};
var hierarchicalFacet = state.getHierarchicalFacetByName(facet);
if (hierarchicalFacet) {
additionalParams.facets = requestBuilder._getDisjunctiveHierarchicalFacetAttribute(
state,
hierarchicalFacet,
hierarchicalRootLevel
);
} else {
additionalParams.facets = facet;
}
if (numericFilters.length > 0) {
additionalParams.numericFilters = numericFilters;
}
if (facetFilters.length > 0) {
additionalParams.facetFilters = facetFilters;
}
return merge_1(state.getQueryParams(), additionalParams);
},
/**
* Return the numeric filters in an algolia request fashion
* @private
* @param {string} [facetName] the name of the attribute for which the filters should be excluded
* @return {string[]} the numeric filters in the algolia format
*/
_getNumericFilters: function(state, facetName) {
if (state.numericFilters) {
return state.numericFilters;
}
var numericFilters = [];
forEach_1(state.numericRefinements, function(operators, attribute) {
forEach_1(operators, function(values, operator) {
if (facetName !== attribute) {
forEach_1(values, function(value) {
if (isArray_1(value)) {
var vs = map_1(value, function(v) {
return attribute + operator + v;
});
numericFilters.push(vs);
} else {
numericFilters.push(attribute + operator + value);
}
});
}
});
});
return numericFilters;
},
/**
* Return the tags filters depending
* @private
* @return {string}
*/
_getTagFilters: function(state) {
if (state.tagFilters) {
return state.tagFilters;
}
return state.tagRefinements.join(',');
},
/**
* Build facetFilters parameter based on current refinements. The array returned
* contains strings representing the facet filters in the algolia format.
* @private
* @param {string} [facet] if set, the current disjunctive facet
* @return {array.<string>}
*/
_getFacetFilters: function(state, facet, hierarchicalRootLevel) {
var facetFilters = [];
forEach_1(state.facetsRefinements, function(facetValues, facetName) {
forEach_1(facetValues, function(facetValue) {
facetFilters.push(facetName + ':' + facetValue);
});
});
forEach_1(state.facetsExcludes, function(facetValues, facetName) {
forEach_1(facetValues, function(facetValue) {
facetFilters.push(facetName + ':-' + facetValue);
});
});
forEach_1(state.disjunctiveFacetsRefinements, function(facetValues, facetName) {
if (facetName === facet || !facetValues || facetValues.length === 0) return;
var orFilters = [];
forEach_1(facetValues, function(facetValue) {
orFilters.push(facetName + ':' + facetValue);
});
facetFilters.push(orFilters);
});
forEach_1(state.hierarchicalFacetsRefinements, function(facetValues, facetName) {
var facetValue = facetValues[0];
if (facetValue === undefined) {
return;
}
var hierarchicalFacet = state.getHierarchicalFacetByName(facetName);
var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet);
var rootPath = state._getHierarchicalRootPath(hierarchicalFacet);
var attributeToRefine;
var attributesIndex;
// we ask for parent facet values only when the `facet` is the current hierarchical facet
if (facet === facetName) {
// if we are at the root level already, no need to ask for facet values, we get them from
// the hits query
if (facetValue.indexOf(separator) === -1 || (!rootPath && hierarchicalRootLevel === true) ||
(rootPath && rootPath.split(separator).length === facetValue.split(separator).length)) {
return;
}
if (!rootPath) {
attributesIndex = facetValue.split(separator).length - 2;
facetValue = facetValue.slice(0, facetValue.lastIndexOf(separator));
} else {
attributesIndex = rootPath.split(separator).length - 1;
facetValue = rootPath;
}
attributeToRefine = hierarchicalFacet.attributes[attributesIndex];
} else {
attributesIndex = facetValue.split(separator).length - 1;
attributeToRefine = hierarchicalFacet.attributes[attributesIndex];
}
if (attributeToRefine) {
facetFilters.push([attributeToRefine + ':' + facetValue]);
}
});
return facetFilters;
},
_getHitsHierarchicalFacetsAttributes: function(state) {
var out = [];
return reduce_1(
state.hierarchicalFacets,
// ask for as much levels as there's hierarchical refinements
function getHitsAttributesForHierarchicalFacet(allAttributes, hierarchicalFacet) {
var hierarchicalRefinement = state.getHierarchicalRefinement(hierarchicalFacet.name)[0];
// if no refinement, ask for root level
if (!hierarchicalRefinement) {
allAttributes.push(hierarchicalFacet.attributes[0]);
return allAttributes;
}
var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet);
var level = hierarchicalRefinement.split(separator).length;
var newAttributes = hierarchicalFacet.attributes.slice(0, level + 1);
return allAttributes.concat(newAttributes);
}, out);
},
_getDisjunctiveHierarchicalFacetAttribute: function(state, hierarchicalFacet, rootLevel) {
var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet);
if (rootLevel === true) {
var rootPath = state._getHierarchicalRootPath(hierarchicalFacet);
var attributeIndex = 0;
if (rootPath) {
attributeIndex = rootPath.split(separator).length;
}
return [hierarchicalFacet.attributes[attributeIndex]];
}
var hierarchicalRefinement = state.getHierarchicalRefinement(hierarchicalFacet.name)[0] || '';
// if refinement is 'beers > IPA > Flying dog',
// then we want `facets: ['beers > IPA']` as disjunctive facet (parent level values)
var parentLevel = hierarchicalRefinement.split(separator).length - 1;
return hierarchicalFacet.attributes.slice(0, parentLevel + 1);
},
getSearchForFacetQuery: function(facetName, query, maxFacetHits, state) {
var stateForSearchForFacetValues = state.isDisjunctiveFacet(facetName) ?
state.clearRefinements(facetName) :
state;
var searchForFacetSearchParameters = {
facetQuery: query,
facetName: facetName
};
if (typeof maxFacetHits === 'number') {
searchForFacetSearchParameters.maxFacetHits = maxFacetHits;
}
var queries = merge_1(requestBuilder._getHitsSearchParams(stateForSearchForFacetValues), searchForFacetSearchParameters);
return queries;
}
};
var requestBuilder_1 = requestBuilder;
/**
* The base implementation of `_.invert` and `_.invertBy` which inverts
* `object` with values transformed by `iteratee` and set by `setter`.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} setter The function to set `accumulator` values.
* @param {Function} iteratee The iteratee to transform values.
* @param {Object} accumulator The initial inverted object.
* @returns {Function} Returns `accumulator`.
*/
function baseInverter(object, setter, iteratee, accumulator) {
_baseForOwn(object, function(value, key, object) {
setter(accumulator, iteratee(value), key, object);
});
return accumulator;
}
var _baseInverter = baseInverter;
/**
* Creates a function like `_.invertBy`.
*
* @private
* @param {Function} setter The function to set accumulator values.
* @param {Function} toIteratee The function to resolve iteratees.
* @returns {Function} Returns the new inverter function.
*/
function createInverter(setter, toIteratee) {
return function(object, iteratee) {
return _baseInverter(object, setter, toIteratee(iteratee), {});
};
}
var _createInverter = createInverter;
/**
* Creates an object composed of the inverted keys and values of `object`.
* If `object` contains duplicate values, subsequent values overwrite
* property assignments of previous values.
*
* @static
* @memberOf _
* @since 0.7.0
* @category Object
* @param {Object} object The object to invert.
* @returns {Object} Returns the new inverted object.
* @example
*
* var object = { 'a': 1, 'b': 2, 'c': 1 };
*
* _.invert(object);
* // => { '1': 'c', '2': 'b' }
*/
var invert = _createInverter(function(result, value, key) {
result[value] = key;
}, constant_1(identity_1));
var invert_1 = invert;
var keys2Short = {
advancedSyntax: 'aS',
allowTyposOnNumericTokens: 'aTONT',
analyticsTags: 'aT',
analytics: 'a',
aroundLatLngViaIP: 'aLLVIP',
aroundLatLng: 'aLL',
aroundPrecision: 'aP',
aroundRadius: 'aR',
attributesToHighlight: 'aTH',
attributesToRetrieve: 'aTR',
attributesToSnippet: 'aTS',
disjunctiveFacetsRefinements: 'dFR',
disjunctiveFacets: 'dF',
distinct: 'd',
facetsExcludes: 'fE',
facetsRefinements: 'fR',
facets: 'f',
getRankingInfo: 'gRI',
hierarchicalFacetsRefinements: 'hFR',
hierarchicalFacets: 'hF',
highlightPostTag: 'hPoT',
highlightPreTag: 'hPrT',
hitsPerPage: 'hPP',
ignorePlurals: 'iP',
index: 'idx',
insideBoundingBox: 'iBB',
insidePolygon: 'iPg',
length: 'l',
maxValuesPerFacet: 'mVPF',
minimumAroundRadius: 'mAR',
minProximity: 'mP',
minWordSizefor1Typo: 'mWS1T',
minWordSizefor2Typos: 'mWS2T',
numericFilters: 'nF',
numericRefinements: 'nR',
offset: 'o',
optionalWords: 'oW',
page: 'p',
queryType: 'qT',
query: 'q',
removeWordsIfNoResults: 'rWINR',
replaceSynonymsInHighlight: 'rSIH',
restrictSearchableAttributes: 'rSA',
synonyms: 's',
tagFilters: 'tF',
tagRefinements: 'tR',
typoTolerance: 'tT',
optionalTagFilters: 'oTF',
optionalFacetFilters: 'oFF',
snippetEllipsisText: 'sET',
disableExactOnAttributes: 'dEOA',
enableExactOnSingleWordQuery: 'eEOSWQ'
};
var short2Keys = invert_1(keys2Short);
var shortener = {
/**
* All the keys of the state, encoded.
* @const
*/
ENCODED_PARAMETERS: keys_1(short2Keys),
/**
* Decode a shorten attribute
* @param {string} shortKey the shorten attribute
* @return {string} the decoded attribute, undefined otherwise
*/
decode: function(shortKey) {
return short2Keys[shortKey];
},
/**
* Encode an attribute into a short version
* @param {string} key the attribute
* @return {string} the shorten attribute
*/
encode: function(key) {
return keys2Short[key];
}
};
var utils = createCommonjsModule(function (module, exports) {
var has = Object.prototype.hasOwnProperty;
var hexTable = (function () {
var array = [];
for (var i = 0; i < 256; ++i) {
array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
}
return array;
}());
var compactQueue = function compactQueue(queue) {
var obj;
while (queue.length) {
var item = queue.pop();
obj = item.obj[item.prop];
if (Array.isArray(obj)) {
var compacted = [];
for (var j = 0; j < obj.length; ++j) {
if (typeof obj[j] !== 'undefined') {
compacted.push(obj[j]);
}
}
item.obj[item.prop] = compacted;
}
}
return obj;
};
exports.arrayToObject = function arrayToObject(source, options) {
var obj = options && options.plainObjects ? Object.create(null) : {};
for (var i = 0; i < source.length; ++i) {
if (typeof source[i] !== 'undefined') {
obj[i] = source[i];
}
}
return obj;
};
exports.merge = function merge(target, source, options) {
if (!source) {
return target;
}
if (typeof source !== 'object') {
if (Array.isArray(target)) {
target.push(source);
} else if (typeof target === 'object') {
if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) {
target[source] = true;
}
} else {
return [target, source];
}
return target;
}
if (typeof target !== 'object') {
return [target].concat(source);
}
var mergeTarget = target;
if (Array.isArray(target) && !Array.isArray(source)) {
mergeTarget = exports.arrayToObject(target, options);
}
if (Array.isArray(target) && Array.isArray(source)) {
source.forEach(function (item, i) {
if (has.call(target, i)) {
if (target[i] && typeof target[i] === 'object') {
target[i] = exports.merge(target[i], item, options);
} else {
target.push(item);
}
} else {
target[i] = item;
}
});
return target;
}
return Object.keys(source).reduce(function (acc, key) {
var value = source[key];
if (has.call(acc, key)) {
acc[key] = exports.merge(acc[key], value, options);
} else {
acc[key] = value;
}
return acc;
}, mergeTarget);
};
exports.assign = function assignSingleSource(target, source) {
return Object.keys(source).reduce(function (acc, key) {
acc[key] = source[key];
return acc;
}, target);
};
exports.decode = function (str) {
try {
return decodeURIComponent(str.replace(/\+/g, ' '));
} catch (e) {
return str;
}
};
exports.encode = function encode(str) {
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
// It has been adapted here for stricter adherence to RFC 3986
if (str.length === 0) {
return str;
}
var string = typeof str === 'string' ? str : String(str);
var out = '';
for (var i = 0; i < string.length; ++i) {
var c = string.charCodeAt(i);
if (
c === 0x2D // -
|| c === 0x2E // .
|| c === 0x5F // _
|| c === 0x7E // ~
|| (c >= 0x30 && c <= 0x39) // 0-9
|| (c >= 0x41 && c <= 0x5A) // a-z
|| (c >= 0x61 && c <= 0x7A) // A-Z
) {
out += string.charAt(i);
continue;
}
if (c < 0x80) {
out = out + hexTable[c];
continue;
}
if (c < 0x800) {
out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
continue;
}
if (c < 0xD800 || c >= 0xE000) {
out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
continue;
}
i += 1;
c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
out += hexTable[0xF0 | (c >> 18)]
+ hexTable[0x80 | ((c >> 12) & 0x3F)]
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
+ hexTable[0x80 | (c & 0x3F)];
}
return out;
};
exports.compact = function compact(value) {
var queue = [{ obj: { o: value }, prop: 'o' }];
var refs = [];
for (var i = 0; i < queue.length; ++i) {
var item = queue[i];
var obj = item.obj[item.prop];
var keys = Object.keys(obj);
for (var j = 0; j < keys.length; ++j) {
var key = keys[j];
var val = obj[key];
if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
queue.push({ obj: obj, prop: key });
refs.push(val);
}
}
}
return compactQueue(queue);
};
exports.isRegExp = function isRegExp(obj) {
return Object.prototype.toString.call(obj) === '[object RegExp]';
};
exports.isBuffer = function isBuffer(obj) {
if (obj === null || typeof obj === 'undefined') {
return false;
}
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
};
});
var utils_1 = utils.arrayToObject;
var utils_2 = utils.merge;
var utils_3 = utils.assign;
var utils_4 = utils.decode;
var utils_5 = utils.encode;
var utils_6 = utils.compact;
var utils_7 = utils.isRegExp;
var utils_8 = utils.isBuffer;
var replace = String.prototype.replace;
var percentTwenties = /%20/g;
var formats = {
'default': 'RFC3986',
formatters: {
RFC1738: function (value) {
return replace.call(value, percentTwenties, '+');
},
RFC3986: function (value) {
return value;
}
},
RFC1738: 'RFC1738',
RFC3986: 'RFC3986'
};
var arrayPrefixGenerators = {
brackets: function brackets(prefix) { // eslint-disable-line func-name-matching
return prefix + '[]';
},
indices: function indices(prefix, key) { // eslint-disable-line func-name-matching
return prefix + '[' + key + ']';
},
repeat: function repeat(prefix) { // eslint-disable-line func-name-matching
return prefix;
}
};
var toISO = Date.prototype.toISOString;
var defaults$3 = {
delimiter: '&',
encode: true,
encoder: utils.encode,
encodeValuesOnly: false,
serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching
return toISO.call(date);
},
skipNulls: false,
strictNullHandling: false
};
var stringify = function stringify( // eslint-disable-line func-name-matching
object,
prefix,
generateArrayPrefix,
strictNullHandling,
skipNulls,
encoder,
filter,
sort,
allowDots,
serializeDate,
formatter,
encodeValuesOnly
) {
var obj = object;
if (typeof filter === 'function') {
obj = filter(prefix, obj);
} else if (obj instanceof Date) {
obj = serializeDate(obj);
} else if (obj === null) {
if (strictNullHandling) {
return encoder && !encodeValuesOnly ? encoder(prefix, defaults$3.encoder) : prefix;
}
obj = '';
}
if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) {
if (encoder) {
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults$3.encoder);
return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults$3.encoder))];
}
return [formatter(prefix) + '=' + formatter(String(obj))];
}
var values = [];
if (typeof obj === 'undefined') {
return values;
}
var objKeys;
if (Array.isArray(filter)) {
objKeys = filter;
} else {
var keys = Object.keys(obj);
objKeys = sort ? keys.sort(sort) : keys;
}
for (var i = 0; i < objKeys.length; ++i) {
var key = objKeys[i];
if (skipNulls && obj[key] === null) {
continue;
}
if (Array.isArray(obj)) {
values = values.concat(stringify(
obj[key],
generateArrayPrefix(prefix, key),
generateArrayPrefix,
strictNullHandling,
skipNulls,
encoder,
filter,
sort,
allowDots,
serializeDate,
formatter,
encodeValuesOnly
));
} else {
values = values.concat(stringify(
obj[key],
prefix + (allowDots ? '.' + key : '[' + key + ']'),
generateArrayPrefix,
strictNullHandling,
skipNulls,
encoder,
filter,
sort,
allowDots,
serializeDate,
formatter,
encodeValuesOnly
));
}
}
return values;
};
var stringify_1 = function (object, opts) {
var obj = object;
var options = opts ? utils.assign({}, opts) : {};
if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {
throw new TypeError('Encoder has to be a function.');
}
var delimiter = typeof options.delimiter === 'undefined' ? defaults$3.delimiter : options.delimiter;
var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults$3.strictNullHandling;
var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults$3.skipNulls;
var encode = typeof options.encode === 'boolean' ? options.encode : defaults$3.encode;
var encoder = typeof options.encoder === 'function' ? options.encoder : defaults$3.encoder;
var sort = typeof options.sort === 'function' ? options.sort : null;
var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;
var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults$3.serializeDate;
var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults$3.encodeValuesOnly;
if (typeof options.format === 'undefined') {
options.format = formats['default'];
} else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) {
throw new TypeError('Unknown format option provided.');
}
var formatter = formats.formatters[options.format];
var objKeys;
var filter;
if (typeof options.filter === 'function') {
filter = options.filter;
obj = filter('', obj);
} else if (Array.isArray(options.filter)) {
filter = options.filter;
objKeys = filter;
}
var keys = [];
if (typeof obj !== 'object' || obj === null) {
return '';
}
var arrayFormat;
if (options.arrayFormat in arrayPrefixGenerators) {
arrayFormat = options.arrayFormat;
} else if ('indices' in options) {
arrayFormat = options.indices ? 'indices' : 'repeat';
} else {
arrayFormat = 'indices';
}
var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
if (!objKeys) {
objKeys = Object.keys(obj);
}
if (sort) {
objKeys.sort(sort);
}
for (var i = 0; i < objKeys.length; ++i) {
var key = objKeys[i];
if (skipNulls && obj[key] === null) {
continue;
}
keys = keys.concat(stringify(
obj[key],
key,
generateArrayPrefix,
strictNullHandling,
skipNulls,
encode ? encoder : null,
filter,
sort,
allowDots,
serializeDate,
formatter,
encodeValuesOnly
));
}
var joined = keys.join(delimiter);
var prefix = options.addQueryPrefix === true ? '?' : '';
return joined.length > 0 ? prefix + joined : '';
};
var has$1 = Object.prototype.hasOwnProperty;
var defaults$4 = {
allowDots: false,
allowPrototypes: false,
arrayLimit: 20,
decoder: utils.decode,
delimiter: '&',
depth: 5,
parameterLimit: 1000,
plainObjects: false,
strictNullHandling: false
};
var parseValues = function parseQueryStringValues(str, options) {
var obj = {};
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
var parts = cleanStr.split(options.delimiter, limit);
for (var i = 0; i < parts.length; ++i) {
var part = parts[i];
var bracketEqualsPos = part.indexOf(']=');
var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
var key, val;
if (pos === -1) {
key = options.decoder(part, defaults$4.decoder);
val = options.strictNullHandling ? null : '';
} else {
key = options.decoder(part.slice(0, pos), defaults$4.decoder);
val = options.decoder(part.slice(pos + 1), defaults$4.decoder);
}
if (has$1.call(obj, key)) {
obj[key] = [].concat(obj[key]).concat(val);
} else {
obj[key] = val;
}
}
return obj;
};
var parseObject = function (chain, val, options) {
var leaf = val;
for (var i = chain.length - 1; i >= 0; --i) {
var obj;
var root = chain[i];
if (root === '[]') {
obj = [];
obj = obj.concat(leaf);
} else {
obj = options.plainObjects ? Object.create(null) : {};
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
var index = parseInt(cleanRoot, 10);
if (
!isNaN(index)
&& root !== cleanRoot
&& String(index) === cleanRoot
&& index >= 0
&& (options.parseArrays && index <= options.arrayLimit)
) {
obj = [];
obj[index] = leaf;
} else {
obj[cleanRoot] = leaf;
}
}
leaf = obj;
}
return leaf;
};
var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
if (!givenKey) {
return;
}
// Transform dot notation to bracket notation
var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
// The regex chunks
var brackets = /(\[[^[\]]*])/;
var child = /(\[[^[\]]*])/g;
// Get the parent
var segment = brackets.exec(key);
var parent = segment ? key.slice(0, segment.index) : key;
// Stash the parent if it exists
var keys = [];
if (parent) {
// If we aren't using plain objects, optionally prefix keys
// that would overwrite object prototype properties
if (!options.plainObjects && has$1.call(Object.prototype, parent)) {
if (!options.allowPrototypes) {
return;
}
}
keys.push(parent);
}
// Loop through children appending to the array until we hit depth
var i = 0;
while ((segment = child.exec(key)) !== null && i < options.depth) {
i += 1;
if (!options.plainObjects && has$1.call(Object.prototype, segment[1].slice(1, -1))) {
if (!options.allowPrototypes) {
return;
}
}
keys.push(segment[1]);
}
// If there's a remainder, just add whatever is left
if (segment) {
keys.push('[' + key.slice(segment.index) + ']');
}
return parseObject(keys, val, options);
};
var parse = function (str, opts) {
var options = opts ? utils.assign({}, opts) : {};
if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {
throw new TypeError('Decoder has to be a function.');
}
options.ignoreQueryPrefix = options.ignoreQueryPrefix === true;
options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults$4.delimiter;
options.depth = typeof options.depth === 'number' ? options.depth : defaults$4.depth;
options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults$4.arrayLimit;
options.parseArrays = options.parseArrays !== false;
options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults$4.decoder;
options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults$4.allowDots;
options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults$4.plainObjects;
options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults$4.allowPrototypes;
options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults$4.parameterLimit;
options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults$4.strictNullHandling;
if (str === '' || str === null || typeof str === 'undefined') {
return options.plainObjects ? Object.create(null) : {};
}
var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
var obj = options.plainObjects ? Object.create(null) : {};
// Iterate over the keys and setup the new object
var keys = Object.keys(tempObj);
for (var i = 0; i < keys.length; ++i) {
var key = keys[i];
var newObj = parseKeys(key, tempObj[key], options);
obj = utils.merge(obj, newObj, options);
}
return utils.compact(obj);
};
var lib$1 = {
formats: formats,
parse: parse,
stringify: stringify_1
};
/** Used to compose bitmasks for function metadata. */
var WRAP_BIND_FLAG$7 = 1;
var WRAP_PARTIAL_FLAG$4 = 32;
/**
* Creates a function that invokes `func` with the `this` binding of `thisArg`
* and `partials` prepended to the arguments it receives.
*
* The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
* may be used as a placeholder for partially applied arguments.
*
* **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
* property of bound functions.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to bind.
* @param {*} thisArg The `this` binding of `func`.
* @param {...*} [partials] The arguments to be partially applied.
* @returns {Function} Returns the new bound function.
* @example
*
* function greet(greeting, punctuation) {
* return greeting + ' ' + this.user + punctuation;
* }
*
* var object = { 'user': 'fred' };
*
* var bound = _.bind(greet, object, 'hi');
* bound('!');
* // => 'hi fred!'
*
* // Bound with placeholders.
* var bound = _.bind(greet, object, _, '!');
* bound('hi');
* // => 'hi fred!'
*/
var bind = _baseRest(function(func, thisArg, partials) {
var bitmask = WRAP_BIND_FLAG$7;
if (partials.length) {
var holders = _replaceHolders(partials, _getHolder(bind));
bitmask |= WRAP_PARTIAL_FLAG$4;
}
return _createWrap(func, bitmask, thisArg, partials, holders);
});
// Assign default placeholders.
bind.placeholder = {};
var bind_1 = bind;
/**
* The base implementation of `_.pick` without support for individual
* property identifiers.
*
* @private
* @param {Object} object The source object.
* @param {string[]} paths The property paths to pick.
* @returns {Object} Returns the new object.
*/
function basePick(object, paths) {
return _basePickBy(object, paths, function(value, path) {
return hasIn_1(object, path);
});
}
var _basePick = basePick;
/**
* Creates an object composed of the picked `object` properties.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The source object.
* @param {...(string|string[])} [paths] The property paths to pick.
* @returns {Object} Returns the new object.
* @example
*
* var object = { 'a': 1, 'b': '2', 'c': 3 };
*
* _.pick(object, ['a', 'c']);
* // => { 'a': 1, 'c': 3 }
*/
var pick = _flatRest(function(object, paths) {
return object == null ? {} : _basePick(object, paths);
});
var pick_1 = pick;
/**
* The opposite of `_.mapValues`; this method creates an object with the
* same values as `object` and keys generated by running each own enumerable
* string keyed property of `object` thru `iteratee`. The iteratee is invoked
* with three arguments: (value, key, object).
*
* @static
* @memberOf _
* @since 3.8.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Object} Returns the new mapped object.
* @see _.mapValues
* @example
*
* _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
* return key + value;
* });
* // => { 'a1': 1, 'b2': 2 }
*/
function mapKeys(object, iteratee) {
var result = {};
iteratee = _baseIteratee(iteratee, 3);
_baseForOwn(object, function(value, key, object) {
_baseAssignValue(result, iteratee(value, key, object), value);
});
return result;
}
var mapKeys_1 = mapKeys;
/**
* Creates an object with the same keys as `object` and values generated
* by running each own enumerable string keyed property of `object` thru
* `iteratee`. The iteratee is invoked with three arguments:
* (value, key, object).
*
* @static
* @memberOf _
* @since 2.4.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Object} Returns the new mapped object.
* @see _.mapKeys
* @example
*
* var users = {
* 'fred': { 'user': 'fred', 'age': 40 },
* 'pebbles': { 'user': 'pebbles', 'age': 1 }
* };
*
* _.mapValues(users, function(o) { return o.age; });
* // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
*
* // The `_.property` iteratee shorthand.
* _.mapValues(users, 'age');
* // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
*/
function mapValues(object, iteratee) {
var result = {};
iteratee = _baseIteratee(iteratee, 3);
_baseForOwn(object, function(value, key, object) {
_baseAssignValue(result, key, iteratee(value, key, object));
});
return result;
}
var mapValues_1 = mapValues;
/**
* Module containing the functions to serialize and deserialize
* {SearchParameters} in the query string format
* @module algoliasearchHelper.url
*/
var encode = utils.encode;
function recursiveEncode(input) {
if (isPlainObject_1(input)) {
return mapValues_1(input, recursiveEncode);
}
if (isArray_1(input)) {
return map_1(input, recursiveEncode);
}
if (isString_1(input)) {
return encode(input);
}
return input;
}
var refinementsParameters = ['dFR', 'fR', 'nR', 'hFR', 'tR'];
var stateKeys = shortener.ENCODED_PARAMETERS;
function sortQueryStringValues(prefixRegexp, invertedMapping, a, b) {
if (prefixRegexp !== null) {
a = a.replace(prefixRegexp, '');
b = b.replace(prefixRegexp, '');
}
a = invertedMapping[a] || a;
b = invertedMapping[b] || b;
if (stateKeys.indexOf(a) !== -1 || stateKeys.indexOf(b) !== -1) {
if (a === 'q') return -1;
if (b === 'q') return 1;
var isARefinements = refinementsParameters.indexOf(a) !== -1;
var isBRefinements = refinementsParameters.indexOf(b) !== -1;
if (isARefinements && !isBRefinements) {
return 1;
} else if (isBRefinements && !isARefinements) {
return -1;
}
}
return a.localeCompare(b);
}
/**
* Read a query string and return an object containing the state
* @param {string} queryString the query string that will be decoded
* @param {object} [options] accepted options :
* - prefix : the prefix used for the saved attributes, you have to provide the
* same that was used for serialization
* - mapping : map short attributes to another value e.g. {q: 'query'}
* @return {object} partial search parameters object (same properties than in the
* SearchParameters but not exhaustive)
*/
var getStateFromQueryString = function(queryString, options) {
var prefixForParameters = options && options.prefix || '';
var mapping = options && options.mapping || {};
var invertedMapping = invert_1(mapping);
var partialStateWithPrefix = lib$1.parse(queryString);
var prefixRegexp = new RegExp('^' + prefixForParameters);
var partialState = mapKeys_1(
partialStateWithPrefix,
function(v, k) {
var hasPrefix = prefixForParameters && prefixRegexp.test(k);
var unprefixedKey = hasPrefix ? k.replace(prefixRegexp, '') : k;
var decodedKey = shortener.decode(invertedMapping[unprefixedKey] || unprefixedKey);
return decodedKey || unprefixedKey;
}
);
var partialStateWithParsedNumbers = SearchParameters_1._parseNumbers(partialState);
return pick_1(partialStateWithParsedNumbers, SearchParameters_1.PARAMETERS);
};
/**
* Retrieve an object of all the properties that are not understandable as helper
* parameters.
* @param {string} queryString the query string to read
* @param {object} [options] the options
* - prefixForParameters : prefix used for the helper configuration keys
* - mapping : map short attributes to another value e.g. {q: 'query'}
* @return {object} the object containing the parsed configuration that doesn't
* to the helper
*/
var getUnrecognizedParametersInQueryString = function(queryString, options) {
var prefixForParameters = options && options.prefix;
var mapping = options && options.mapping || {};
var invertedMapping = invert_1(mapping);
var foreignConfig = {};
var config = lib$1.parse(queryString);
if (prefixForParameters) {
var prefixRegexp = new RegExp('^' + prefixForParameters);
forEach_1(config, function(v, key) {
if (!prefixRegexp.test(key)) foreignConfig[key] = v;
});
} else {
forEach_1(config, function(v, key) {
if (!shortener.decode(invertedMapping[key] || key)) foreignConfig[key] = v;
});
}
return foreignConfig;
};
/**
* Generate a query string for the state passed according to the options
* @param {SearchParameters} state state to serialize
* @param {object} [options] May contain the following parameters :
* - prefix : prefix in front of the keys
* - mapping : map short attributes to another value e.g. {q: 'query'}
* - moreAttributes : more values to be added in the query string. Those values
* won't be prefixed.
* - safe : get safe urls for use in emails, chat apps or any application auto linking urls.
* All parameters and values will be encoded in a way that it's safe to share them.
* Default to false for legacy reasons ()
* @return {string} the query string
*/
var getQueryStringFromState = function(state, options) {
var moreAttributes = options && options.moreAttributes;
var prefixForParameters = options && options.prefix || '';
var mapping = options && options.mapping || {};
var safe = options && options.safe || false;
var invertedMapping = invert_1(mapping);
var stateForUrl = safe ? state : recursiveEncode(state);
var encodedState = mapKeys_1(
stateForUrl,
function(v, k) {
var shortK = shortener.encode(k);
return prefixForParameters + (mapping[shortK] || shortK);
}
);
var prefixRegexp = prefixForParameters === '' ? null : new RegExp('^' + prefixForParameters);
var sort = bind_1(sortQueryStringValues, null, prefixRegexp, invertedMapping);
if (!isEmpty_1(moreAttributes)) {
var stateQs = lib$1.stringify(encodedState, {encode: safe, sort: sort});
var moreQs = lib$1.stringify(moreAttributes, {encode: safe});
if (!stateQs) return moreQs;
return stateQs + '&' + moreQs;
}
return lib$1.stringify(encodedState, {encode: safe, sort: sort});
};
var url = {
getStateFromQueryString: getStateFromQueryString,
getUnrecognizedParametersInQueryString: getUnrecognizedParametersInQueryString,
getQueryStringFromState: getQueryStringFromState
};
var version$1 = '2.22.0';
/**
* Event triggered when a parameter is set or updated
* @event AlgoliaSearchHelper#event:change
* @property {SearchParameters} state the current parameters with the latest changes applied
* @property {SearchResults} lastResults the previous results received from Algolia. `null` before
* the first request
* @example
* helper.on('change', function(state, lastResults) {
* console.log('The parameters have changed');
* });
*/
/**
* Event triggered when a main search is sent to Algolia
* @event AlgoliaSearchHelper#event:search
* @property {SearchParameters} state the parameters used for this search
* @property {SearchResults} lastResults the results from the previous search. `null` if
* it is the first search.
* @example
* helper.on('search', function(state, lastResults) {
* console.log('Search sent');
* });
*/
/**
* Event triggered when a search using `searchForFacetValues` is sent to Algolia
* @event AlgoliaSearchHelper#event:searchForFacetValues
* @property {SearchParameters} state the parameters used for this search
* it is the first search.
* @property {string} facet the facet searched into
* @property {string} query the query used to search in the facets
* @example
* helper.on('searchForFacetValues', function(state, facet, query) {
* console.log('searchForFacetValues sent');
* });
*/
/**
* Event triggered when a search using `searchOnce` is sent to Algolia
* @event AlgoliaSearchHelper#event:searchOnce
* @property {SearchParameters} state the parameters used for this search
* it is the first search.
* @example
* helper.on('searchOnce', function(state) {
* console.log('searchOnce sent');
* });
*/
/**
* Event triggered when the results are retrieved from Algolia
* @event AlgoliaSearchHelper#event:result
* @property {SearchResults} results the results received from Algolia
* @property {SearchParameters} state the parameters used to query Algolia. Those might
* be different from the one in the helper instance (for example if the network is unreliable).
* @example
* helper.on('result', function(results, state) {
* console.log('Search results received');
* });
*/
/**
* Event triggered when Algolia sends back an error. For example, if an unknown parameter is
* used, the error can be caught using this event.
* @event AlgoliaSearchHelper#event:error
* @property {Error} error the error returned by the Algolia.
* @example
* helper.on('error', function(error) {
* console.log('Houston we got a problem.');
* });
*/
/**
* Event triggered when the queue of queries have been depleted (with any result or outdated queries)
* @event AlgoliaSearchHelper#event:searchQueueEmpty
* @example
* helper.on('searchQueueEmpty', function() {
* console.log('No more search pending');
* // This is received before the result event if we're not expecting new results
* });
*
* helper.search();
*/
/**
* Initialize a new AlgoliaSearchHelper
* @class
* @classdesc The AlgoliaSearchHelper is a class that ease the management of the
* search. It provides an event based interface for search callbacks:
* - change: when the internal search state is changed.
* This event contains a {@link SearchParameters} object and the
* {@link SearchResults} of the last result if any.
* - search: when a search is triggered using the `search()` method.
* - result: when the response is retrieved from Algolia and is processed.
* This event contains a {@link SearchResults} object and the
* {@link SearchParameters} corresponding to this answer.
* - error: when the response is an error. This event contains the error returned by the server.
* @param {AlgoliaSearch} client an AlgoliaSearch client
* @param {string} index the index name to query
* @param {SearchParameters | object} options an object defining the initial
* config of the search. It doesn't have to be a {SearchParameters},
* just an object containing the properties you need from it.
*/
function AlgoliaSearchHelper(client, index, options) {
if (!client.addAlgoliaAgent) console.log('Please upgrade to the newest version of the JS Client.'); // eslint-disable-line
else if (!doesClientAgentContainsHelper(client)) client.addAlgoliaAgent('JS Helper ' + version$1);
this.setClient(client);
var opts = options || {};
opts.index = index;
this.state = SearchParameters_1.make(opts);
this.lastResults = null;
this._queryId = 0;
this._lastQueryIdReceived = -1;
this.derivedHelpers = [];
this._currentNbQueries = 0;
}
util.inherits(AlgoliaSearchHelper, events.EventEmitter);
/**
* Start the search with the parameters set in the state. When the
* method is called, it triggers a `search` event. The results will
* be available through the `result` event. If an error occurs, an
* `error` will be fired instead.
* @return {AlgoliaSearchHelper}
* @fires search
* @fires result
* @fires error
* @chainable
*/
AlgoliaSearchHelper.prototype.search = function() {
this._search();
return this;
};
/**
* Gets the search query parameters that would be sent to the Algolia Client
* for the hits
* @return {object} Query Parameters
*/
AlgoliaSearchHelper.prototype.getQuery = function() {
var state = this.state;
return requestBuilder_1._getHitsSearchParams(state);
};
/**
* Start a search using a modified version of the current state. This method does
* not trigger the helper lifecycle and does not modify the state kept internally
* by the helper. This second aspect means that the next search call will be the
* same as a search call before calling searchOnce.
* @param {object} options can contain all the parameters that can be set to SearchParameters
* plus the index
* @param {function} [callback] optional callback executed when the response from the
* server is back.
* @return {promise|undefined} if a callback is passed the method returns undefined
* otherwise it returns a promise containing an object with two keys :
* - content with a SearchResults
* - state with the state used for the query as a SearchParameters
* @example
* // Changing the number of records returned per page to 1
* // This example uses the callback API
* var state = helper.searchOnce({hitsPerPage: 1},
* function(error, content, state) {
* // if an error occurred it will be passed in error, otherwise its value is null
* // content contains the results formatted as a SearchResults
* // state is the instance of SearchParameters used for this search
* });
* @example
* // Changing the number of records returned per page to 1
* // This example uses the promise API
* var state1 = helper.searchOnce({hitsPerPage: 1})
* .then(promiseHandler);
*
* function promiseHandler(res) {
* // res contains
* // {
* // content : SearchResults
* // state : SearchParameters (the one used for this specific search)
* // }
* }
*/
AlgoliaSearchHelper.prototype.searchOnce = function(options, cb) {
var tempState = !options ? this.state : this.state.setQueryParameters(options);
var queries = requestBuilder_1._getQueries(tempState.index, tempState);
var self = this;
this._currentNbQueries++;
this.emit('searchOnce', tempState);
if (cb) {
return this.client.search(
queries,
function(err, content) {
self._currentNbQueries--;
if (self._currentNbQueries === 0) self.emit('searchQueueEmpty');
if (err) cb(err, null, tempState);
else cb(err, new SearchResults_1(tempState, content.results), tempState);
}
);
}
return this.client.search(queries).then(function(content) {
self._currentNbQueries--;
if (self._currentNbQueries === 0) self.emit('searchQueueEmpty');
return {
content: new SearchResults_1(tempState, content.results),
state: tempState,
_originalResponse: content
};
}, function(e) {
self._currentNbQueries--;
if (self._currentNbQueries === 0) self.emit('searchQueueEmpty');
throw e;
});
};
/**
* Structure of each result when using
* [`searchForFacetValues()`](reference.html#AlgoliaSearchHelper#searchForFacetValues)
* @typedef FacetSearchHit
* @type {object}
* @property {string} value the facet value
* @property {string} highlighted the facet value highlighted with the query string
* @property {number} count number of occurrence of this facet value
* @property {boolean} isRefined true if the value is already refined
*/
/**
* Structure of the data resolved by the
* [`searchForFacetValues()`](reference.html#AlgoliaSearchHelper#searchForFacetValues)
* promise.
* @typedef FacetSearchResult
* @type {object}
* @property {FacetSearchHit} facetHits the results for this search for facet values
* @property {number} processingTimeMS time taken by the query inside the engine
*/
/**
* Search for facet values based on an query and the name of a faceted attribute. This
* triggers a search and will return a promise. On top of using the query, it also sends
* the parameters from the state so that the search is narrowed down to only the possible values.
*
* See the description of [FacetSearchResult](reference.html#FacetSearchResult)
* @param {string} facet the name of the faceted attribute
* @param {string} query the string query for the search
* @param {number} maxFacetHits the maximum number values returned. Should be > 0 and <= 100
* @return {promise<FacetSearchResult>} the results of the search
*/
AlgoliaSearchHelper.prototype.searchForFacetValues = function(facet, query, maxFacetHits) {
var state = this.state;
var index = this.client.initIndex(this.state.index);
var isDisjunctive = state.isDisjunctiveFacet(facet);
var algoliaQuery = requestBuilder_1.getSearchForFacetQuery(facet, query, maxFacetHits, this.state);
this._currentNbQueries++;
var self = this;
this.emit('searchForFacetValues', state, facet, query);
return index.searchForFacetValues(algoliaQuery).then(function addIsRefined(content) {
self._currentNbQueries--;
if (self._currentNbQueries === 0) self.emit('searchQueueEmpty');
content.facetHits = forEach_1(content.facetHits, function(f) {
f.isRefined = isDisjunctive ?
state.isDisjunctiveFacetRefined(facet, f.value) :
state.isFacetRefined(facet, f.value);
});
return content;
}, function(e) {
self._currentNbQueries--;
if (self._currentNbQueries === 0) self.emit('searchQueueEmpty');
throw e;
});
};
/**
* Sets the text query used for the search.
*
* This method resets the current page to 0.
* @param {string} q the user query
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/
AlgoliaSearchHelper.prototype.setQuery = function(q) {
this.state = this.state.setPage(0).setQuery(q);
this._change();
return this;
};
/**
* Remove all the types of refinements except tags. A string can be provided to remove
* only the refinements of a specific attribute. For more advanced use case, you can
* provide a function instead. This function should follow the
* [clearCallback definition](#SearchParameters.clearCallback).
*
* This method resets the current page to 0.
* @param {string} [name] optional name of the facet / attribute on which we want to remove all refinements
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
* @example
* // Removing all the refinements
* helper.clearRefinements().search();
* @example
* // Removing all the filters on a the category attribute.
* helper.clearRefinements('category').search();
* @example
* // Removing only the exclude filters on the category facet.
* helper.clearRefinements(function(value, attribute, type) {
* return type === 'exclude' && attribute === 'category';
* }).search();
*/
AlgoliaSearchHelper.prototype.clearRefinements = function(name) {
this.state = this.state.setPage(0).clearRefinements(name);
this._change();
return this;
};
/**
* Remove all the tag filters.
*
* This method resets the current page to 0.
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/
AlgoliaSearchHelper.prototype.clearTags = function() {
this.state = this.state.setPage(0).clearTags();
this._change();
return this;
};
/**
* Adds a disjunctive filter to a faceted attribute with the `value` provided. If the
* filter is already set, it doesn't change the filters.
*
* This method resets the current page to 0.
* @param {string} facet the facet to refine
* @param {string} value the associated value (will be converted to string)
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/
AlgoliaSearchHelper.prototype.addDisjunctiveFacetRefinement = function(facet, value) {
this.state = this.state.setPage(0).addDisjunctiveFacetRefinement(facet, value);
this._change();
return this;
};
/**
* @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#addDisjunctiveFacetRefinement}
*/
AlgoliaSearchHelper.prototype.addDisjunctiveRefine = function() {
return this.addDisjunctiveFacetRefinement.apply(this, arguments);
};
/**
* Adds a refinement on a hierarchical facet. It will throw
* an exception if the facet is not defined or if the facet
* is already refined.
*
* This method resets the current page to 0.
* @param {string} facet the facet name
* @param {string} path the hierarchical facet path
* @return {AlgoliaSearchHelper}
* @throws Error if the facet is not defined or if the facet is refined
* @chainable
* @fires change
*/
AlgoliaSearchHelper.prototype.addHierarchicalFacetRefinement = function(facet, value) {
this.state = this.state.setPage(0).addHierarchicalFacetRefinement(facet, value);
this._change();
return this;
};
/**
* Adds a an numeric filter to an attribute with the `operator` and `value` provided. If the
* filter is already set, it doesn't change the filters.
*
* This method resets the current page to 0.
* @param {string} attribute the attribute on which the numeric filter applies
* @param {string} operator the operator of the filter
* @param {number} value the value of the filter
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/
AlgoliaSearchHelper.prototype.addNumericRefinement = function(attribute, operator, value) {
this.state = this.state.setPage(0).addNumericRefinement(attribute, operator, value);
this._change();
return this;
};
/**
* Adds a filter to a faceted attribute with the `value` provided. If the
* filter is already set, it doesn't change the filters.
*
* This method resets the current page to 0.
* @param {string} facet the facet to refine
* @param {string} value the associated value (will be converted to string)
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/
AlgoliaSearchHelper.prototype.addFacetRefinement = function(facet, value) {
this.state = this.state.setPage(0).addFacetRefinement(facet, value);
this._change();
return this;
};
/**
* @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#addFacetRefinement}
*/
AlgoliaSearchHelper.prototype.addRefine = function() {
return this.addFacetRefinement.apply(this, arguments);
};
/**
* Adds a an exclusion filter to a faceted attribute with the `value` provided. If the
* filter is already set, it doesn't change the filters.
*
* This method resets the current page to 0.
* @param {string} facet the facet to refine
* @param {string} value the associated value (will be converted to string)
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/
AlgoliaSearchHelper.prototype.addFacetExclusion = function(facet, value) {
this.state = this.state.setPage(0).addExcludeRefinement(facet, value);
this._change();
return this;
};
/**
* @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#addFacetExclusion}
*/
AlgoliaSearchHelper.prototype.addExclude = function() {
return this.addFacetExclusion.apply(this, arguments);
};
/**
* Adds a tag filter with the `tag` provided. If the
* filter is already set, it doesn't change the filters.
*
* This method resets the current page to 0.
* @param {string} tag the tag to add to the filter
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/
AlgoliaSearchHelper.prototype.addTag = function(tag) {
this.state = this.state.setPage(0).addTagRefinement(tag);
this._change();
return this;
};
/**
* Removes an numeric filter to an attribute with the `operator` and `value` provided. If the
* filter is not set, it doesn't change the filters.
*
* Some parameters are optional, triggering different behavior:
* - if the value is not provided, then all the numeric value will be removed for the
* specified attribute/operator couple.
* - if the operator is not provided either, then all the numeric filter on this attribute
* will be removed.
*
* This method resets the current page to 0.
* @param {string} attribute the attribute on which the numeric filter applies
* @param {string} [operator] the operator of the filter
* @param {number} [value] the value of the filter
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/
AlgoliaSearchHelper.prototype.removeNumericRefinement = function(attribute, operator, value) {
this.state = this.state.setPage(0).removeNumericRefinement(attribute, operator, value);
this._change();
return this;
};
/**
* Removes a disjunctive filter to a faceted attribute with the `value` provided. If the
* filter is not set, it doesn't change the filters.
*
* If the value is omitted, then this method will remove all the filters for the
* attribute.
*
* This method resets the current page to 0.
* @param {string} facet the facet to refine
* @param {string} [value] the associated value
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/
AlgoliaSearchHelper.prototype.removeDisjunctiveFacetRefinement = function(facet, value) {
this.state = this.state.setPage(0).removeDisjunctiveFacetRefinement(facet, value);
this._change();
return this;
};
/**
* @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#removeDisjunctiveFacetRefinement}
*/
AlgoliaSearchHelper.prototype.removeDisjunctiveRefine = function() {
return this.removeDisjunctiveFacetRefinement.apply(this, arguments);
};
/**
* Removes the refinement set on a hierarchical facet.
* @param {string} facet the facet name
* @return {AlgoliaSearchHelper}
* @throws Error if the facet is not defined or if the facet is not refined
* @fires change
* @chainable
*/
AlgoliaSearchHelper.prototype.removeHierarchicalFacetRefinement = function(facet) {
this.state = this.state.setPage(0).removeHierarchicalFacetRefinement(facet);
this._change();
return this;
};
/**
* Removes a filter to a faceted attribute with the `value` provided. If the
* filter is not set, it doesn't change the filters.
*
* If the value is omitted, then this method will remove all the filters for the
* attribute.
*
* This method resets the current page to 0.
* @param {string} facet the facet to refine
* @param {string} [value] the associated value
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/
AlgoliaSearchHelper.prototype.removeFacetRefinement = function(facet, value) {
this.state = this.state.setPage(0).removeFacetRefinement(facet, value);
this._change();
return this;
};
/**
* @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#removeFacetRefinement}
*/
AlgoliaSearchHelper.prototype.removeRefine = function() {
return this.removeFacetRefinement.apply(this, arguments);
};
/**
* Removes an exclusion filter to a faceted attribute with the `value` provided. If the
* filter is not set, it doesn't change the filters.
*
* If the value is omitted, then this method will remove all the filters for the
* attribute.
*
* This method resets the current page to 0.
* @param {string} facet the facet to refine
* @param {string} [value] the associated value
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/
AlgoliaSearchHelper.prototype.removeFacetExclusion = function(facet, value) {
this.state = this.state.setPage(0).removeExcludeRefinement(facet, value);
this._change();
return this;
};
/**
* @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#removeFacetExclusion}
*/
AlgoliaSearchHelper.prototype.removeExclude = function() {
return this.removeFacetExclusion.apply(this, arguments);
};
/**
* Removes a tag filter with the `tag` provided. If the
* filter is not set, it doesn't change the filters.
*
* This method resets the current page to 0.
* @param {string} tag tag to remove from the filter
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/
AlgoliaSearchHelper.prototype.removeTag = function(tag) {
this.state = this.state.setPage(0).removeTagRefinement(tag);
this._change();
return this;
};
/**
* Adds or removes an exclusion filter to a faceted attribute with the `value` provided. If
* the value is set then it removes it, otherwise it adds the filter.
*
* This method resets the current page to 0.
* @param {string} facet the facet to refine
* @param {string} value the associated value
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/
AlgoliaSearchHelper.prototype.toggleFacetExclusion = function(facet, value) {
this.state = this.state.setPage(0).toggleExcludeFacetRefinement(facet, value);
this._change();
return this;
};
/**
* @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#toggleFacetExclusion}
*/
AlgoliaSearchHelper.prototype.toggleExclude = function() {
return this.toggleFacetExclusion.apply(this, arguments);
};
/**
* Adds or removes a filter to a faceted attribute with the `value` provided. If
* the value is set then it removes it, otherwise it adds the filter.
*
* This method can be used for conjunctive, disjunctive and hierarchical filters.
*
* This method resets the current page to 0.
* @param {string} facet the facet to refine
* @param {string} value the associated value
* @return {AlgoliaSearchHelper}
* @throws Error will throw an error if the facet is not declared in the settings of the helper
* @fires change
* @chainable
* @deprecated since version 2.19.0, see {@link AlgoliaSearchHelper#toggleFacetRefinement}
*/
AlgoliaSearchHelper.prototype.toggleRefinement = function(facet, value) {
return this.toggleFacetRefinement(facet, value);
};
/**
* Adds or removes a filter to a faceted attribute with the `value` provided. If
* the value is set then it removes it, otherwise it adds the filter.
*
* This method can be used for conjunctive, disjunctive and hierarchical filters.
*
* This method resets the current page to 0.
* @param {string} facet the facet to refine
* @param {string} value the associated value
* @return {AlgoliaSearchHelper}
* @throws Error will throw an error if the facet is not declared in the settings of the helper
* @fires change
* @chainable
*/
AlgoliaSearchHelper.prototype.toggleFacetRefinement = function(facet, value) {
this.state = this.state.setPage(0).toggleFacetRefinement(facet, value);
this._change();
return this;
};
/**
* @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#toggleFacetRefinement}
*/
AlgoliaSearchHelper.prototype.toggleRefine = function() {
return this.toggleFacetRefinement.apply(this, arguments);
};
/**
* Adds or removes a tag filter with the `value` provided. If
* the value is set then it removes it, otherwise it adds the filter.
*
* This method resets the current page to 0.
* @param {string} tag tag to remove or add
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/
AlgoliaSearchHelper.prototype.toggleTag = function(tag) {
this.state = this.state.setPage(0).toggleTagRefinement(tag);
this._change();
return this;
};
/**
* Increments the page number by one.
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
* @example
* helper.setPage(0).nextPage().getPage();
* // returns 1
*/
AlgoliaSearchHelper.prototype.nextPage = function() {
return this.setPage(this.state.page + 1);
};
/**
* Decrements the page number by one.
* @fires change
* @return {AlgoliaSearchHelper}
* @chainable
* @example
* helper.setPage(1).previousPage().getPage();
* // returns 0
*/
AlgoliaSearchHelper.prototype.previousPage = function() {
return this.setPage(this.state.page - 1);
};
/**
* @private
*/
function setCurrentPage(page) {
if (page < 0) throw new Error('Page requested below 0.');
this.state = this.state.setPage(page);
this._change();
return this;
}
/**
* Change the current page
* @deprecated
* @param {number} page The page number
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/
AlgoliaSearchHelper.prototype.setCurrentPage = setCurrentPage;
/**
* Updates the current page.
* @function
* @param {number} page The page number
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/
AlgoliaSearchHelper.prototype.setPage = setCurrentPage;
/**
* Updates the name of the index that will be targeted by the query.
*
* This method resets the current page to 0.
* @param {string} name the index name
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/
AlgoliaSearchHelper.prototype.setIndex = function(name) {
this.state = this.state.setPage(0).setIndex(name);
this._change();
return this;
};
/**
* Update a parameter of the search. This method reset the page
*
* The complete list of parameters is available on the
* [Algolia website](https://www.algolia.com/doc/rest#query-an-index).
* The most commonly used parameters have their own [shortcuts](#query-parameters-shortcuts)
* or benefit from higher-level APIs (all the kind of filters and facets have their own API)
*
* This method resets the current page to 0.
* @param {string} parameter name of the parameter to update
* @param {any} value new value of the parameter
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
* @example
* helper.setQueryParameter('hitsPerPage', 20).search();
*/
AlgoliaSearchHelper.prototype.setQueryParameter = function(parameter, value) {
var newState = this.state.setPage(0).setQueryParameter(parameter, value);
if (this.state === newState) return this;
this.state = newState;
this._change();
return this;
};
/**
* Set the whole state (warning: will erase previous state)
* @param {SearchParameters} newState the whole new state
* @return {AlgoliaSearchHelper}
* @fires change
* @chainable
*/
AlgoliaSearchHelper.prototype.setState = function(newState) {
this.state = SearchParameters_1.make(newState);
this._change();
return this;
};
/**
* Get the current search state stored in the helper. This object is immutable.
* @param {string[]} [filters] optional filters to retrieve only a subset of the state
* @return {SearchParameters|object} if filters is specified a plain object is
* returned containing only the requested fields, otherwise return the unfiltered
* state
* @example
* // Get the complete state as stored in the helper
* helper.getState();
* @example
* // Get a part of the state with all the refinements on attributes and the query
* helper.getState(['query', 'attribute:category']);
*/
AlgoliaSearchHelper.prototype.getState = function(filters) {
if (filters === undefined) return this.state;
return this.state.filter(filters);
};
/**
* DEPRECATED Get part of the state as a query string. By default, the output keys will not
* be prefixed and will only take the applied refinements and the query.
* @deprecated
* @param {object} [options] May contain the following parameters :
*
* **filters** : possible values are all the keys of the [SearchParameters](#searchparameters), `index` for
* the index, all the refinements with `attribute:*` or for some specific attributes with
* `attribute:theAttribute`
*
* **prefix** : prefix in front of the keys
*
* **moreAttributes** : more values to be added in the query string. Those values
* won't be prefixed.
* @return {string} the query string
*/
AlgoliaSearchHelper.prototype.getStateAsQueryString = function getStateAsQueryString(options) {
var filters = options && options.filters || ['query', 'attribute:*'];
var partialState = this.getState(filters);
return url.getQueryStringFromState(partialState, options);
};
/**
* DEPRECATED Read a query string and return an object containing the state. Use
* url module.
* @deprecated
* @static
* @param {string} queryString the query string that will be decoded
* @param {object} options accepted options :
* - prefix : the prefix used for the saved attributes, you have to provide the
* same that was used for serialization
* @return {object} partial search parameters object (same properties than in the
* SearchParameters but not exhaustive)
* @see {@link url#getStateFromQueryString}
*/
AlgoliaSearchHelper.getConfigurationFromQueryString = url.getStateFromQueryString;
/**
* DEPRECATED Retrieve an object of all the properties that are not understandable as helper
* parameters. Use url module.
* @deprecated
* @static
* @param {string} queryString the query string to read
* @param {object} options the options
* - prefixForParameters : prefix used for the helper configuration keys
* @return {object} the object containing the parsed configuration that doesn't
* to the helper
*/
AlgoliaSearchHelper.getForeignConfigurationInQueryString = url.getUnrecognizedParametersInQueryString;
/**
* DEPRECATED Overrides part of the state with the properties stored in the provided query
* string.
* @deprecated
* @param {string} queryString the query string containing the informations to url the state
* @param {object} options optional parameters :
* - prefix : prefix used for the algolia parameters
* - triggerChange : if set to true the state update will trigger a change event
*/
AlgoliaSearchHelper.prototype.setStateFromQueryString = function(queryString, options) {
var triggerChange = options && options.triggerChange || false;
var configuration = url.getStateFromQueryString(queryString, options);
var updatedState = this.state.setQueryParameters(configuration);
if (triggerChange) this.setState(updatedState);
else this.overrideStateWithoutTriggeringChangeEvent(updatedState);
};
/**
* Override the current state without triggering a change event.
* Do not use this method unless you know what you are doing. (see the example
* for a legit use case)
* @param {SearchParameters} newState the whole new state
* @return {AlgoliaSearchHelper}
* @example
* helper.on('change', function(state){
* // In this function you might want to find a way to store the state in the url/history
* updateYourURL(state)
* })
* window.onpopstate = function(event){
* // This is naive though as you should check if the state is really defined etc.
* helper.overrideStateWithoutTriggeringChangeEvent(event.state).search()
* }
* @chainable
*/
AlgoliaSearchHelper.prototype.overrideStateWithoutTriggeringChangeEvent = function(newState) {
this.state = new SearchParameters_1(newState);
return this;
};
/**
* @deprecated since 2.4.0, see {@link AlgoliaSearchHelper#hasRefinements}
*/
AlgoliaSearchHelper.prototype.isRefined = function(facet, value) {
if (this.state.isConjunctiveFacet(facet)) {
return this.state.isFacetRefined(facet, value);
} else if (this.state.isDisjunctiveFacet(facet)) {
return this.state.isDisjunctiveFacetRefined(facet, value);
}
throw new Error(facet +
' is not properly defined in this helper configuration' +
'(use the facets or disjunctiveFacets keys to configure it)');
};
/**
* Check if an attribute has any numeric, conjunctive, disjunctive or hierarchical filters.
* @param {string} attribute the name of the attribute
* @return {boolean} true if the attribute is filtered by at least one value
* @example
* // hasRefinements works with numeric, conjunctive, disjunctive and hierarchical filters
* helper.hasRefinements('price'); // false
* helper.addNumericRefinement('price', '>', 100);
* helper.hasRefinements('price'); // true
*
* helper.hasRefinements('color'); // false
* helper.addFacetRefinement('color', 'blue');
* helper.hasRefinements('color'); // true
*
* helper.hasRefinements('material'); // false
* helper.addDisjunctiveFacetRefinement('material', 'plastic');
* helper.hasRefinements('material'); // true
*
* helper.hasRefinements('categories'); // false
* helper.toggleFacetRefinement('categories', 'kitchen > knife');
* helper.hasRefinements('categories'); // true
*
*/
AlgoliaSearchHelper.prototype.hasRefinements = function(attribute) {
if (!isEmpty_1(this.state.getNumericRefinements(attribute))) {
return true;
} else if (this.state.isConjunctiveFacet(attribute)) {
return this.state.isFacetRefined(attribute);
} else if (this.state.isDisjunctiveFacet(attribute)) {
return this.state.isDisjunctiveFacetRefined(attribute);
} else if (this.state.isHierarchicalFacet(attribute)) {
return this.state.isHierarchicalFacetRefined(attribute);
}
// there's currently no way to know that the user did call `addNumericRefinement` at some point
// thus we cannot distinguish if there once was a numeric refinement that was cleared
// so we will return false in every other situations to be consistent
// while what we should do here is throw because we did not find the attribute in any type
// of refinement
return false;
};
/**
* Check if a value is excluded for a specific faceted attribute. If the value
* is omitted then the function checks if there is any excluding refinements.
*
* @param {string} facet name of the attribute for used for faceting
* @param {string} [value] optional value. If passed will test that this value
* is filtering the given facet.
* @return {boolean} true if refined
* @example
* helper.isExcludeRefined('color'); // false
* helper.isExcludeRefined('color', 'blue') // false
* helper.isExcludeRefined('color', 'red') // false
*
* helper.addFacetExclusion('color', 'red');
*
* helper.isExcludeRefined('color'); // true
* helper.isExcludeRefined('color', 'blue') // false
* helper.isExcludeRefined('color', 'red') // true
*/
AlgoliaSearchHelper.prototype.isExcluded = function(facet, value) {
return this.state.isExcludeRefined(facet, value);
};
/**
* @deprecated since 2.4.0, see {@link AlgoliaSearchHelper#hasRefinements}
*/
AlgoliaSearchHelper.prototype.isDisjunctiveRefined = function(facet, value) {
return this.state.isDisjunctiveFacetRefined(facet, value);
};
/**
* Check if the string is a currently filtering tag.
* @param {string} tag tag to check
* @return {boolean}
*/
AlgoliaSearchHelper.prototype.hasTag = function(tag) {
return this.state.isTagRefined(tag);
};
/**
* @deprecated since 2.4.0, see {@link AlgoliaSearchHelper#hasTag}
*/
AlgoliaSearchHelper.prototype.isTagRefined = function() {
return this.hasTagRefinements.apply(this, arguments);
};
/**
* Get the name of the currently used index.
* @return {string}
* @example
* helper.setIndex('highestPrice_products').getIndex();
* // returns 'highestPrice_products'
*/
AlgoliaSearchHelper.prototype.getIndex = function() {
return this.state.index;
};
function getCurrentPage() {
return this.state.page;
}
/**
* Get the currently selected page
* @deprecated
* @return {number} the current page
*/
AlgoliaSearchHelper.prototype.getCurrentPage = getCurrentPage;
/**
* Get the currently selected page
* @function
* @return {number} the current page
*/
AlgoliaSearchHelper.prototype.getPage = getCurrentPage;
/**
* Get all the tags currently set to filters the results.
*
* @return {string[]} The list of tags currently set.
*/
AlgoliaSearchHelper.prototype.getTags = function() {
return this.state.tagRefinements;
};
/**
* Get a parameter of the search by its name. It is possible that a parameter is directly
* defined in the index dashboard, but it will be undefined using this method.
*
* The complete list of parameters is
* available on the
* [Algolia website](https://www.algolia.com/doc/rest#query-an-index).
* The most commonly used parameters have their own [shortcuts](#query-parameters-shortcuts)
* or benefit from higher-level APIs (all the kind of filters have their own API)
* @param {string} parameterName the parameter name
* @return {any} the parameter value
* @example
* var hitsPerPage = helper.getQueryParameter('hitsPerPage');
*/
AlgoliaSearchHelper.prototype.getQueryParameter = function(parameterName) {
return this.state.getQueryParameter(parameterName);
};
/**
* Get the list of refinements for a given attribute. This method works with
* conjunctive, disjunctive, excluding and numerical filters.
*
* See also SearchResults#getRefinements
*
* @param {string} facetName attribute name used for faceting
* @return {Array.<FacetRefinement|NumericRefinement>} All Refinement are objects that contain a value, and
* a type. Numeric also contains an operator.
* @example
* helper.addNumericRefinement('price', '>', 100);
* helper.getRefinements('price');
* // [
* // {
* // "value": [
* // 100
* // ],
* // "operator": ">",
* // "type": "numeric"
* // }
* // ]
* @example
* helper.addFacetRefinement('color', 'blue');
* helper.addFacetExclusion('color', 'red');
* helper.getRefinements('color');
* // [
* // {
* // "value": "blue",
* // "type": "conjunctive"
* // },
* // {
* // "value": "red",
* // "type": "exclude"
* // }
* // ]
* @example
* helper.addDisjunctiveFacetRefinement('material', 'plastic');
* // [
* // {
* // "value": "plastic",
* // "type": "disjunctive"
* // }
* // ]
*/
AlgoliaSearchHelper.prototype.getRefinements = function(facetName) {
var refinements = [];
if (this.state.isConjunctiveFacet(facetName)) {
var conjRefinements = this.state.getConjunctiveRefinements(facetName);
forEach_1(conjRefinements, function(r) {
refinements.push({
value: r,
type: 'conjunctive'
});
});
var excludeRefinements = this.state.getExcludeRefinements(facetName);
forEach_1(excludeRefinements, function(r) {
refinements.push({
value: r,
type: 'exclude'
});
});
} else if (this.state.isDisjunctiveFacet(facetName)) {
var disjRefinements = this.state.getDisjunctiveRefinements(facetName);
forEach_1(disjRefinements, function(r) {
refinements.push({
value: r,
type: 'disjunctive'
});
});
}
var numericRefinements = this.state.getNumericRefinements(facetName);
forEach_1(numericRefinements, function(value, operator) {
refinements.push({
value: value,
operator: operator,
type: 'numeric'
});
});
return refinements;
};
/**
* Return the current refinement for the (attribute, operator)
* @param {string} attribute of the record
* @param {string} operator applied
* @return {number} value of the refinement
*/
AlgoliaSearchHelper.prototype.getNumericRefinement = function(attribute, operator) {
return this.state.getNumericRefinement(attribute, operator);
};
/**
* Get the current breadcrumb for a hierarchical facet, as an array
* @param {string} facetName Hierarchical facet name
* @return {array.<string>} the path as an array of string
*/
AlgoliaSearchHelper.prototype.getHierarchicalFacetBreadcrumb = function(facetName) {
return this.state.getHierarchicalFacetBreadcrumb(facetName);
};
// /////////// PRIVATE
/**
* Perform the underlying queries
* @private
* @return {undefined}
* @fires search
* @fires result
* @fires error
*/
AlgoliaSearchHelper.prototype._search = function() {
var state = this.state;
var mainQueries = requestBuilder_1._getQueries(state.index, state);
var states = [{
state: state,
queriesCount: mainQueries.length,
helper: this
}];
this.emit('search', state, this.lastResults);
var derivedQueries = map_1(this.derivedHelpers, function(derivedHelper) {
var derivedState = derivedHelper.getModifiedState(state);
var queries = requestBuilder_1._getQueries(derivedState.index, derivedState);
states.push({
state: derivedState,
queriesCount: queries.length,
helper: derivedHelper
});
derivedHelper.emit('search', derivedState, derivedHelper.lastResults);
return queries;
});
var queries = mainQueries.concat(flatten_1(derivedQueries));
var queryId = this._queryId++;
this._currentNbQueries++;
this.client.search(queries, this._dispatchAlgoliaResponse.bind(this, states, queryId));
};
/**
* Transform the responses as sent by the server and transform them into a user
* usable object that merge the results of all the batch requests. It will dispatch
* over the different helper + derived helpers (when there are some).
* @private
* @param {array.<{SearchParameters, AlgoliaQueries, AlgoliaSearchHelper}>}
* state state used for to generate the request
* @param {number} queryId id of the current request
* @param {Error} err error if any, null otherwise
* @param {object} content content of the response
* @return {undefined}
*/
AlgoliaSearchHelper.prototype._dispatchAlgoliaResponse = function(states, queryId, err, content) {
// FIXME remove the number of outdated queries discarded instead of just one
if (queryId < this._lastQueryIdReceived) {
// Outdated answer
return;
}
this._currentNbQueries -= (queryId - this._lastQueryIdReceived);
this._lastQueryIdReceived = queryId;
if (err) {
this.emit('error', err);
if (this._currentNbQueries === 0) this.emit('searchQueueEmpty');
} else {
if (this._currentNbQueries === 0) this.emit('searchQueueEmpty');
var results = content.results;
forEach_1(states, function(s) {
var state = s.state;
var queriesCount = s.queriesCount;
var helper = s.helper;
var specificResults = results.splice(0, queriesCount);
var formattedResponse = helper.lastResults = new SearchResults_1(state, specificResults);
helper.emit('result', formattedResponse, state);
});
}
};
AlgoliaSearchHelper.prototype.containsRefinement = function(query, facetFilters, numericFilters, tagFilters) {
return query ||
facetFilters.length !== 0 ||
numericFilters.length !== 0 ||
tagFilters.length !== 0;
};
/**
* Test if there are some disjunctive refinements on the facet
* @private
* @param {string} facet the attribute to test
* @return {boolean}
*/
AlgoliaSearchHelper.prototype._hasDisjunctiveRefinements = function(facet) {
return this.state.disjunctiveRefinements[facet] &&
this.state.disjunctiveRefinements[facet].length > 0;
};
AlgoliaSearchHelper.prototype._change = function() {
this.emit('change', this.state, this.lastResults);
};
/**
* Clears the cache of the underlying Algolia client.
* @return {AlgoliaSearchHelper}
*/
AlgoliaSearchHelper.prototype.clearCache = function() {
this.client.clearCache();
return this;
};
/**
* Updates the internal client instance. If the reference of the clients
* are equal then no update is actually done.
* @param {AlgoliaSearch} newClient an AlgoliaSearch client
* @return {AlgoliaSearchHelper}
*/
AlgoliaSearchHelper.prototype.setClient = function(newClient) {
if (this.client === newClient) return this;
if (newClient.addAlgoliaAgent && !doesClientAgentContainsHelper(newClient)) newClient.addAlgoliaAgent('JS Helper ' + version$1);
this.client = newClient;
return this;
};
/**
* Gets the instance of the currently used client.
* @return {AlgoliaSearch}
*/
AlgoliaSearchHelper.prototype.getClient = function() {
return this.client;
};
/**
* Creates an derived instance of the Helper. A derived helper
* is a way to request other indices synchronised with the lifecycle
* of the main Helper. This mechanism uses the multiqueries feature
* of Algolia to aggregate all the requests in a single network call.
*
* This method takes a function that is used to create a new SearchParameter
* that will be used to create requests to Algolia. Those new requests
* are created just before the `search` event. The signature of the function
* is `SearchParameters -> SearchParameters`.
*
* This method returns a new DerivedHelper which is an EventEmitter
* that fires the same `search`, `result` and `error` events. Those
* events, however, will receive data specific to this DerivedHelper
* and the SearchParameters that is returned by the call of the
* parameter function.
* @param {function} fn SearchParameters -> SearchParameters
* @return {DerivedHelper}
*/
AlgoliaSearchHelper.prototype.derive = function(fn) {
var derivedHelper = new DerivedHelper_1(this, fn);
this.derivedHelpers.push(derivedHelper);
return derivedHelper;
};
/**
* This method detaches a derived Helper from the main one. Prefer using the one from the
* derived helper itself, to remove the event listeners too.
* @private
* @return {undefined}
* @throws Error
*/
AlgoliaSearchHelper.prototype.detachDerivedHelper = function(derivedHelper) {
var pos = this.derivedHelpers.indexOf(derivedHelper);
if (pos === -1) throw new Error('Derived helper already detached');
this.derivedHelpers.splice(pos, 1);
};
/**
* This method returns true if there is currently at least one on-going search.
* @return {boolean} true if there is a search pending
*/
AlgoliaSearchHelper.prototype.hasPendingRequests = function() {
return this._currentNbQueries > 0;
};
/**
* @typedef AlgoliaSearchHelper.NumericRefinement
* @type {object}
* @property {number[]} value the numbers that are used for filtering this attribute with
* the operator specified.
* @property {string} operator the faceting data: value, number of entries
* @property {string} type will be 'numeric'
*/
/**
* @typedef AlgoliaSearchHelper.FacetRefinement
* @type {object}
* @property {string} value the string use to filter the attribute
* @property {string} type the type of filter: 'conjunctive', 'disjunctive', 'exclude'
*/
/*
* This function tests if the _ua parameter of the client
* already contains the JS Helper UA
*/
function doesClientAgentContainsHelper(client) {
// this relies on JS Client internal variable, this might break if implementation changes
var currentAgent = client._ua;
return !currentAgent ? false :
currentAgent.indexOf('JS Helper') !== -1;
}
var algoliasearch_helper = AlgoliaSearchHelper;
/**
* The algoliasearchHelper module is the function that will let its
* contains everything needed to use the Algoliasearch
* Helper. It is a also a function that instanciate the helper.
* To use the helper, you also need the Algolia JS client v3.
* @example
* //using the UMD build
* var client = algoliasearch('latency', '6be0576ff61c053d5f9a3225e2a90f76');
* var helper = algoliasearchHelper(client, 'bestbuy', {
* facets: ['shipping'],
* disjunctiveFacets: ['category']
* });
* helper.on('result', function(result) {
* console.log(result);
* });
* helper.toggleRefine('Movies & TV Shows')
* .toggleRefine('Free shipping')
* .search();
* @example
* // The helper is an event emitter using the node API
* helper.on('result', updateTheResults);
* helper.once('result', updateTheResults);
* helper.removeListener('result', updateTheResults);
* helper.removeAllListeners('result');
* @module algoliasearchHelper
* @param {AlgoliaSearch} client an AlgoliaSearch client
* @param {string} index the name of the index to query
* @param {SearchParameters|object} opts an object defining the initial config of the search. It doesn't have to be a {SearchParameters}, just an object containing the properties you need from it.
* @return {AlgoliaSearchHelper}
*/
function algoliasearchHelper(client, index, opts) {
return new algoliasearch_helper(client, index, opts);
}
/**
* The version currently used
* @member module:algoliasearchHelper.version
* @type {number}
*/
algoliasearchHelper.version = version$1;
/**
* Constructor for the Helper.
* @member module:algoliasearchHelper.AlgoliaSearchHelper
* @type {AlgoliaSearchHelper}
*/
algoliasearchHelper.AlgoliaSearchHelper = algoliasearch_helper;
/**
* Constructor for the object containing all the parameters of the search.
* @member module:algoliasearchHelper.SearchParameters
* @type {SearchParameters}
*/
algoliasearchHelper.SearchParameters = SearchParameters_1;
/**
* Constructor for the object containing the results of the search.
* @member module:algoliasearchHelper.SearchResults
* @type {SearchResults}
*/
algoliasearchHelper.SearchResults = SearchResults_1;
/**
* URL tools to generate query string and parse them from/into
* SearchParameters
* @member module:algoliasearchHelper.url
* @type {object} {@link url}
*
*/
algoliasearchHelper.url = url;
var algoliasearchHelper_1 = algoliasearchHelper;
var algoliasearchHelper_4 = algoliasearchHelper_1.SearchParameters;
var getId$1 = function getId(props) {
return props.attributes[0];
};
var namespace = 'hierarchicalMenu';
function getCurrentRefinement(props, searchState, context) {
return getCurrentRefinementValue(props, searchState, context, namespace + '.' + getId$1(props), null, function (currentRefinement) {
if (currentRefinement === '') {
return null;
}
return currentRefinement;
});
}
function getValue$2(path, props, searchState, context) {
var id = props.id,
attributes = props.attributes,
separator = props.separator,
rootPath = props.rootPath,
showParentLevel = props.showParentLevel;
var currentRefinement = getCurrentRefinement(props, searchState, context);
var nextRefinement = void 0;
if (currentRefinement === null) {
nextRefinement = path;
} else {
var tmpSearchParameters = new algoliasearchHelper_4({
hierarchicalFacets: [{
name: id,
attributes: attributes,
separator: separator,
rootPath: rootPath,
showParentLevel: showParentLevel
}]
});
nextRefinement = tmpSearchParameters.toggleHierarchicalFacetRefinement(id, currentRefinement).toggleHierarchicalFacetRefinement(id, path).getHierarchicalRefinement(id)[0];
}
return nextRefinement;
}
function transformValue(value, props, searchState, context) {
return value.map(function (v) {
return {
label: v.name,
value: getValue$2(v.path, props, searchState, context),
count: v.count,
isRefined: v.isRefined,
items: v.data && transformValue(v.data, props, searchState, context)
};
});
}
var truncate = function truncate() {
var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
return items.slice(0, limit).map(function () {
var item = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return Array.isArray(item.items) ? _extends({}, item, {
items: truncate(item.items, limit)
}) : item;
});
};
function _refine(props, searchState, nextRefinement, context) {
var id = getId$1(props);
var nextValue = defineProperty$2({}, id, nextRefinement || '');
var resetPage = true;
return refineValue(searchState, nextValue, context, resetPage, namespace);
}
function _cleanUp(props, searchState, context) {
return cleanUpValue(searchState, context, namespace + '.' + getId$1(props));
}
var sortBy = ['name:asc'];
/**
* connectHierarchicalMenu connector provides the logic to build a widget that will
* give the user the ability to explore a tree-like structure.
* This is commonly used for multi-level categorization of products on e-commerce
* websites. From a UX point of view, we suggest not displaying more than two levels deep.
* @name connectHierarchicalMenu
* @requirements To use this widget, your attributes must be formatted in a specific way.
* If you want for example to have a hiearchical menu of categories, objects in your index
* should be formatted this way:
*
* ```json
* {
* "categories.lvl0": "products",
* "categories.lvl1": "products > fruits",
* "categories.lvl2": "products > fruits > citrus"
* }
* ```
*
* It's also possible to provide more than one path for each level:
*
* ```json
* {
* "categories.lvl0": ["products", "goods"],
* "categories.lvl1": ["products > fruits", "goods > to eat"]
* }
* ```
*
* All attributes passed to the `attributes` prop must be present in "attributes for faceting"
* on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API.
*
* @kind connector
* @propType {string} attributes - List of attributes to use to generate the hierarchy of the menu. See the example for the convention to follow.
* @propType {string} [defaultRefinement] - the item value selected by default
* @propType {boolean} [showMore=false] - Flag to activate the show more button, for toggling the number of items between limitMin and limitMax.
* @propType {number} [limitMin=10] - The maximum number of items displayed.
* @propType {number} [limitMax=20] - The maximum number of items displayed when the user triggers the show more. Not considered if `showMore` is false.
* @propType {string} [separator='>'] - Specifies the level separator used in the data.
* @propType {string[]} [rootPath=null] - The already selected and hidden path.
* @propType {boolean} [showParentLevel=true] - Flag to set if the parent level should be displayed.
* @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return.
* @providedPropType {function} refine - a function to toggle a refinement
* @providedPropType {function} createURL - a function to generate a URL for the corresponding search state
* @providedPropType {string} currentRefinement - the refinement currently applied
* @providedPropType {array.<{items: object, count: number, isRefined: boolean, label: string, value: string}>} items - the list of items the HierarchicalMenu can display. items has the same shape as parent items.
*/
var connectHierarchicalMenu = createConnector({
displayName: 'AlgoliaHierarchicalMenu',
propTypes: {
attributes: function attributes(props, propName, componentName) {
var isNotString = function isNotString(val) {
return typeof val !== 'string';
};
if (!Array.isArray(props[propName]) || props[propName].some(isNotString) || props[propName].length < 1) {
return new Error('Invalid prop ' + propName + ' supplied to ' + componentName + '. Expected an Array of Strings');
}
return undefined;
},
separator: propTypes.string,
rootPath: propTypes.string,
showParentLevel: propTypes.bool,
defaultRefinement: propTypes.string,
showMore: propTypes.bool,
limitMin: propTypes.number,
limitMax: propTypes.number,
transformItems: propTypes.func
},
defaultProps: {
showMore: false,
limitMin: 10,
limitMax: 20,
separator: ' > ',
rootPath: null,
showParentLevel: true
},
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
var showMore = props.showMore,
limitMin = props.limitMin,
limitMax = props.limitMax;
var id = getId$1(props);
var results = getResults(searchResults, this.context);
var isFacetPresent = Boolean(results) && Boolean(results.getFacetByName(id));
if (!isFacetPresent) {
return {
items: [],
currentRefinement: getCurrentRefinement(props, searchState, this.context),
canRefine: false
};
}
var limit = showMore ? limitMax : limitMin;
var value = results.getFacetValues(id, { sortBy: sortBy });
var items = value.data ? transformValue(value.data, props, searchState, this.context) : [];
var transformedItems = props.transformItems ? props.transformItems(items) : items;
return {
items: truncate(transformedItems, limit),
currentRefinement: getCurrentRefinement(props, searchState, this.context),
canRefine: items.length > 0
};
},
refine: function refine(props, searchState, nextRefinement) {
return _refine(props, searchState, nextRefinement, this.context);
},
cleanUp: function cleanUp(props, searchState) {
return _cleanUp(props, searchState, this.context);
},
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
var attributes = props.attributes,
separator = props.separator,
rootPath = props.rootPath,
showParentLevel = props.showParentLevel,
showMore = props.showMore,
limitMin = props.limitMin,
limitMax = props.limitMax;
var id = getId$1(props);
var limit = showMore ? limitMax : limitMin;
searchParameters = searchParameters.addHierarchicalFacet({
name: id,
attributes: attributes,
separator: separator,
rootPath: rootPath,
showParentLevel: showParentLevel
}).setQueryParameters({
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, limit)
});
var currentRefinement = getCurrentRefinement(props, searchState, this.context);
if (currentRefinement !== null) {
searchParameters = searchParameters.toggleHierarchicalFacetRefinement(id, currentRefinement);
}
return searchParameters;
},
getMetadata: function getMetadata(props, searchState) {
var _this = this;
var rootAttribute = props.attributes[0];
var id = getId$1(props);
var currentRefinement = getCurrentRefinement(props, searchState, this.context);
return {
id: id,
index: getIndex(this.context),
items: !currentRefinement ? [] : [{
label: rootAttribute + ': ' + currentRefinement,
attributeName: rootAttribute,
value: function value(nextState) {
return _refine(props, nextState, '', _this.context);
},
currentRefinement: currentRefinement
}]
};
}
});
/**
* Find an highlighted attribute given an `attributeName` and an `highlightProperty`, parses it,
* and provided an array of objects with the string value and a boolean if this
* value is highlighted.
*
* In order to use this feature, highlight must be activated in the configuration of
* the index. The `preTag` and `postTag` attributes are respectively highlightPreTag and
* highligtPostTag in Algolia configuration.
*
* @param {string} preTag - string used to identify the start of an highlighted value
* @param {string} postTag - string used to identify the end of an highlighted value
* @param {string} highlightProperty - the property that contains the highlight structure in the results
* @param {string} attributeName - the highlighted attribute to look for
* @param {object} hit - the actual hit returned by Algolia.
* @return {object[]} - An array of {value: string, isHighlighted: boolean}.
*/
function parseAlgoliaHit(_ref) {
var _ref$preTag = _ref.preTag,
preTag = _ref$preTag === undefined ? '<em>' : _ref$preTag,
_ref$postTag = _ref.postTag,
postTag = _ref$postTag === undefined ? '</em>' : _ref$postTag,
highlightProperty = _ref.highlightProperty,
attributeName = _ref.attributeName,
hit = _ref.hit;
if (!hit) throw new Error('`hit`, the matching record, must be provided');
var highlightObject = get_1(hit[highlightProperty], attributeName, {});
if (Array.isArray(highlightObject)) {
return highlightObject.map(function (item) {
return parseHighlightedAttribute({
preTag: preTag,
postTag: postTag,
highlightedValue: item.value
});
});
}
return parseHighlightedAttribute({
preTag: preTag,
postTag: postTag,
highlightedValue: highlightObject.value
});
}
/**
* Parses an highlighted attribute into an array of objects with the string value, and
* a boolean that indicated if this part is highlighted.
*
* @param {string} preTag - string used to identify the start of an highlighted value
* @param {string} postTag - string used to identify the end of an highlighted value
* @param {string} highlightedValue - highlighted attribute as returned by Algolia highlight feature
* @return {object[]} - An array of {value: string, isDefined: boolean}.
*/
function parseHighlightedAttribute(_ref2) {
var preTag = _ref2.preTag,
postTag = _ref2.postTag,
_ref2$highlightedValu = _ref2.highlightedValue,
highlightedValue = _ref2$highlightedValu === undefined ? '' : _ref2$highlightedValu;
var splitByPreTag = highlightedValue.split(preTag);
var firstValue = splitByPreTag.shift();
var elements = firstValue === '' ? [] : [{ value: firstValue, isHighlighted: false }];
if (postTag === preTag) {
var isHighlighted = true;
splitByPreTag.forEach(function (split) {
elements.push({ value: split, isHighlighted: isHighlighted });
isHighlighted = !isHighlighted;
});
} else {
splitByPreTag.forEach(function (split) {
var splitByPostTag = split.split(postTag);
elements.push({
value: splitByPostTag[0],
isHighlighted: true
});
if (splitByPostTag[1] !== '') {
elements.push({
value: splitByPostTag[1],
isHighlighted: false
});
}
});
}
return elements;
}
var highlightTags = {
highlightPreTag: "<ais-highlight-0000000000>",
highlightPostTag: "</ais-highlight-0000000000>"
};
var highlight = function highlight(_ref) {
var attributeName = _ref.attributeName,
hit = _ref.hit,
highlightProperty = _ref.highlightProperty;
return parseAlgoliaHit({
attributeName: attributeName,
hit: hit,
preTag: highlightTags.highlightPreTag,
postTag: highlightTags.highlightPostTag,
highlightProperty: highlightProperty
});
};
/**
* connectHighlight connector provides the logic to create an highlighter
* component that will retrieve, parse and render an highlighted attribute
* from an Algolia hit.
* @name connectHighlight
* @kind connector
* @category connector
* @providedPropType {function} highlight - function to retrieve and parse an attribute from a hit. It takes a configuration object with 3 attributes: `highlightProperty` which is the property that contains the highlight structure from the records, `attributeName` which is the name of the attribute (it can be either a string or an array of strings) to look for and `hit` which is the hit from Algolia. It returns an array of objects `{value: string, isHighlighted: boolean}. If the element that corresponds to the attributeName is an array of strings, it will return a nested array of objects.
* @example
* import React from 'react';
* import { connectHighlight } from 'react-instantsearch/connectors';
* import { InstantSearch, Hits } from 'react-instantsearch/dom';
*
* const CustomHighlight = connectHighlight(
* ({ highlight, attributeName, hit, highlightProperty }) => {
* const parsedHit = highlight({ attributeName, hit, highlightProperty: '_highlightResult' });
* const highlightedHits = parsedHit.map(part => {
* if (part.isHighlighted) return <mark>{part.value}</mark>;
* return part.value;
* });
* return <div>{highlightedHits}</div>;
* }
* );
*
* const Hit = ({hit}) =>
* <p>
* <CustomHighlight attributeName="description" hit={hit} />
* </p>;
*
* export default function App() {
* return (
* <InstantSearch
* appId="latency"
* apiKey="6be0576ff61c053d5f9a3225e2a90f76"
* indexName="ikea">
* <Hits hitComponent={Hit} />
* </InstantSearch>
* );
* }
*/
var connectHighlight = createConnector({
displayName: 'AlgoliaHighlighter',
propTypes: {},
getProvidedProps: function getProvidedProps() {
return { highlight: highlight };
}
});
/**
* connectHits connector provides the logic to create connected
* components that will render the results retrieved from
* Algolia.
*
* To configure the number of hits retrieved, use [HitsPerPage widget](widgets/HitsPerPage.html),
* [connectHitsPerPage connector](connectors/connectHitsPerPage.html) or pass the hitsPerPage
* prop to a [Configure](guide/Search_parameters.html) widget.
*
* **Warning:** you will need to use the **objectID** property available on every hit as a key
* when iterating over them. This will ensure you have the best possible UI experience
* especially on slow networks.
* @name connectHits
* @kind connector
* @providedPropType {array.<object>} hits - the records that matched the search state
* @example
* import React from 'react';
*
* import { Highlight, InstantSearch } from 'react-instantsearch/dom';
* import { connectHits } from 'react-instantsearch/connectors';
* const CustomHits = connectHits(({ hits }) =>
* <div>
* {hits.map(hit =>
* <p key={hit.objectID}>
* <Highlight attributeName="description" hit={hit} />
* </p>
* )}
* </div>
* );
*
* export default function App() {
* return (
* <InstantSearch
* appId="latency"
* apiKey="6be0576ff61c053d5f9a3225e2a90f76"
* indexName="ikea"
* >
* <CustomHits />
* </InstantSearch>
* );
* }
*/
var connectHits = createConnector({
displayName: 'AlgoliaHits',
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
var results = getResults(searchResults, this.context);
var hits = results ? results.hits : [];
return { hits: hits };
},
/* Hits needs to be considered as a widget to trigger a search if no others widgets are used.
* To be considered as a widget you need either getSearchParameters, getMetadata or getTransitionState
* See createConnector.js
* */
getSearchParameters: function getSearchParameters(searchParameters) {
return searchParameters;
}
});
var getId$2 = function getId() {
return 'query';
};
function getCurrentRefinement$1(props, searchState, context) {
var id = getId$2();
return getCurrentRefinementValue(props, searchState, context, id, '', function (currentRefinement) {
if (currentRefinement) {
return currentRefinement;
}
return '';
});
}
function getHits(searchResults) {
if (searchResults.results) {
if (searchResults.results.hits && Array.isArray(searchResults.results.hits)) {
return searchResults.results.hits;
} else {
return Object.keys(searchResults.results).reduce(function (hits, index) {
return [].concat(toConsumableArray(hits), [{
index: index,
hits: searchResults.results[index].hits
}]);
}, []);
}
} else {
return [];
}
}
function _refine$1(props, searchState, nextRefinement, context) {
var id = getId$2();
var nextValue = defineProperty$2({}, id, nextRefinement);
var resetPage = true;
return refineValue(searchState, nextValue, context, resetPage);
}
function _cleanUp$1(props, searchState, context) {
return cleanUpValue(searchState, context, getId$2());
}
/**
* connectAutoComplete connector provides the logic to create connected
* components that will render the results retrieved from
* Algolia.
*
* To configure the number of hits retrieved, use [HitsPerPage widget](widgets/HitsPerPage.html),
* [connectHitsPerPage connector](connectors/connectHitsPerPage.html) or pass the hitsPerPage
* prop to a [Configure](guide/Search_parameters.html) widget.
* @name connectAutoComplete
* @kind connector
* @providedPropType {array.<object>} hits - the records that matched the search state.
* @providedPropType {function} refine - a function to change the query.
* @providedPropType {string} currentRefinement - the query to search for.
*/
var connectAutoComplete = createConnector({
displayName: 'AlgoliaAutoComplete',
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
return {
hits: getHits(searchResults),
currentRefinement: getCurrentRefinement$1(props, searchState, this.context)
};
},
refine: function refine(props, searchState, nextRefinement) {
return _refine$1(props, searchState, nextRefinement, this.context);
},
cleanUp: function cleanUp(props, searchState) {
return _cleanUp$1(props, searchState, this.context);
},
/* connectAutoComplete needs to be considered as a widget to trigger a search if no others widgets are used.
* To be considered as a widget you need either getSearchParameters, getMetadata or getTransitionState
* See createConnector.js
* */
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
return searchParameters.setQuery(getCurrentRefinement$1(props, searchState, this.context));
}
});
function getId$3() {
return 'hitsPerPage';
}
function getCurrentRefinement$2(props, searchState, context) {
var id = getId$3();
return getCurrentRefinementValue(props, searchState, context, id, null, function (currentRefinement) {
if (typeof currentRefinement === 'string') {
return parseInt(currentRefinement, 10);
}
return currentRefinement;
});
}
/**
* connectHitsPerPage connector provides the logic to create connected
* components that will allow a user to choose to display more or less results from Algolia.
* @name connectHitsPerPage
* @kind connector
* @propType {number} defaultRefinement - The number of items selected by default
* @propType {{value: number, label: string}[]} items - List of hits per page options.
* @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return.
* @providedPropType {function} refine - a function to remove a single filter
* @providedPropType {function} createURL - a function to generate a URL for the corresponding search state
* @providedPropType {string} currentRefinement - the refinement currently applied
* @providedPropType {array.<{isRefined: boolean, label?: string, value: number}>} items - the list of items the HitsPerPage can display. If no label provided, the value will be displayed.
*/
var connectHitsPerPage = createConnector({
displayName: 'AlgoliaHitsPerPage',
propTypes: {
defaultRefinement: propTypes.number.isRequired,
items: propTypes.arrayOf(propTypes.shape({
label: propTypes.string,
value: propTypes.number.isRequired
})).isRequired,
transformItems: propTypes.func
},
getProvidedProps: function getProvidedProps(props, searchState) {
var currentRefinement = getCurrentRefinement$2(props, searchState, this.context);
var items = props.items.map(function (item) {
return item.value === currentRefinement ? _extends({}, item, { isRefined: true }) : _extends({}, item, { isRefined: false });
});
return {
items: props.transformItems ? props.transformItems(items) : items,
currentRefinement: currentRefinement
};
},
refine: function refine(props, searchState, nextRefinement) {
var id = getId$3();
var nextValue = defineProperty$2({}, id, nextRefinement);
var resetPage = true;
return refineValue(searchState, nextValue, this.context, resetPage);
},
cleanUp: function cleanUp(props, searchState) {
return cleanUpValue(searchState, this.context, getId$3());
},
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
return searchParameters.setHitsPerPage(getCurrentRefinement$2(props, searchState, this.context));
},
getMetadata: function getMetadata() {
return { id: getId$3() };
}
});
function getId$4() {
return 'page';
}
function getCurrentRefinement$3(props, searchState, context) {
var id = getId$4();
var page = 1;
return getCurrentRefinementValue(props, searchState, context, id, page, function (currentRefinement) {
if (typeof currentRefinement === 'string') {
currentRefinement = parseInt(currentRefinement, 10);
}
return currentRefinement;
});
}
/**
* InfiniteHits connector provides the logic to create connected
* components that will render an continuous list of results retrieved from
* Algolia. This connector provides a function to load more results.
* @name connectInfiniteHits
* @kind connector
* @providedPropType {array.<object>} hits - the records that matched the search state
* @providedPropType {boolean} hasMore - indicates if there are more pages to load
* @providedPropType {function} refine - call to load more results
*/
var connectInfiniteHits = createConnector({
displayName: 'AlgoliaInfiniteHits',
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
var results = getResults(searchResults, this.context);
if (!results) {
this._allResults = [];
return {
hits: this._allResults,
hasMore: false
};
}
var hits = results.hits,
page = results.page,
nbPages = results.nbPages;
// If it is the same page we do not touch the page result list
if (page === 0) {
this._allResults = hits;
} else if (page > this.previousPage) {
this._allResults = [].concat(toConsumableArray(this._allResults), toConsumableArray(hits));
} else if (page < this.previousPage) {
this._allResults = hits;
}
var lastPageIndex = nbPages - 1;
var hasMore = page < lastPageIndex;
this.previousPage = page;
return {
hits: this._allResults,
hasMore: hasMore
};
},
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
return searchParameters.setQueryParameters({
page: getCurrentRefinement$3(props, searchState, this.context) - 1
});
},
refine: function refine(props, searchState) {
var id = getId$4();
var nextPage = getCurrentRefinement$3(props, searchState, this.context) + 1;
var nextValue = defineProperty$2({}, id, nextPage);
var resetPage = false;
return refineValue(searchState, nextValue, this.context, resetPage);
}
});
var namespace$1 = 'menu';
function getId$5(props) {
return props.attributeName;
}
function getCurrentRefinement$4(props, searchState, context) {
return getCurrentRefinementValue(props, searchState, context, namespace$1 + '.' + getId$5(props), null, function (currentRefinement) {
if (currentRefinement === '') {
return null;
}
return currentRefinement;
});
}
function getValue$3(name, props, searchState, context) {
var currentRefinement = getCurrentRefinement$4(props, searchState, context);
return name === currentRefinement ? '' : name;
}
function _refine$2(props, searchState, nextRefinement, context) {
var id = getId$5(props);
var nextValue = defineProperty$2({}, id, nextRefinement ? nextRefinement : '');
var resetPage = true;
return refineValue(searchState, nextValue, context, resetPage, namespace$1);
}
function _cleanUp$2(props, searchState, context) {
return cleanUpValue(searchState, context, namespace$1 + '.' + getId$5(props));
}
var sortBy$1 = ['count:desc', 'name:asc'];
/**
* connectMenu connector provides the logic to build a widget that will
* give the user the ability to choose a single value for a specific facet.
* @name connectMenu
* @requirements The attribute passed to the `attributeName` prop must be present in "attributes for faceting"
* on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API.
* @kind connector
* @propType {string} attributeName - the name of the attribute in the record
* @propType {boolean} [showMore=false] - true if the component should display a button that will expand the number of items
* @propType {number} [limitMin=10] - the minimum number of diplayed items
* @propType {number} [limitMax=20] - the maximun number of displayed items. Only used when showMore is set to `true`
* @propType {string} [defaultRefinement] - the value of the item selected by default
* @propType {boolean} [withSearchBox=false] - allow search inside values
* @providedPropType {function} refine - a function to toggle a refinement
* @providedPropType {function} createURL - a function to generate a URL for the corresponding search state
* @providedPropType {string} currentRefinement - the refinement currently applied
* @providedPropType {array.<{count: number, isRefined: boolean, label: string, value: string}>} items - the list of items the Menu can display.
* @providedPropType {function} searchForItems - a function to toggle a search inside items values
* @providedPropType {boolean} isFromSearch - a boolean that says if the `items` props contains facet values from the global search or from the search inside items.
*/
var connectMenu = createConnector({
displayName: 'AlgoliaMenu',
propTypes: {
attributeName: propTypes.string.isRequired,
showMore: propTypes.bool,
limitMin: propTypes.number,
limitMax: propTypes.number,
defaultRefinement: propTypes.string,
transformItems: propTypes.func,
withSearchBox: propTypes.bool,
searchForFacetValues: propTypes.bool // @deprecated
},
defaultProps: {
showMore: false,
limitMin: 10,
limitMax: 20
},
getProvidedProps: function getProvidedProps(props, searchState, searchResults, meta, searchForFacetValuesResults) {
var _this = this;
var attributeName = props.attributeName,
showMore = props.showMore,
limitMin = props.limitMin,
limitMax = props.limitMax;
var limit = showMore ? limitMax : limitMin;
var results = getResults(searchResults, this.context);
var canRefine = Boolean(results) && Boolean(results.getFacetByName(attributeName));
var isFromSearch = Boolean(searchForFacetValuesResults && searchForFacetValuesResults[attributeName] && searchForFacetValuesResults.query !== '');
var withSearchBox = props.withSearchBox || props.searchForFacetValues;
if (props.withSearchBox && this.context.multiIndexContext) {
throw new Error('react-instantsearch: searching in *List is not available when used inside a' + ' multi index context');
}
if (!canRefine) {
return {
items: [],
currentRefinement: getCurrentRefinement$4(props, searchState, this.context),
isFromSearch: isFromSearch,
withSearchBox: withSearchBox,
canRefine: canRefine
};
}
var items = isFromSearch ? searchForFacetValuesResults[attributeName].map(function (v) {
return {
label: v.value,
value: getValue$3(v.value, props, searchState, _this.context),
_highlightResult: { label: { value: v.highlighted } },
count: v.count,
isRefined: v.isRefined
};
}) : results.getFacetValues(attributeName, { sortBy: sortBy$1 }).map(function (v) {
return {
label: v.name,
value: getValue$3(v.name, props, searchState, _this.context),
count: v.count,
isRefined: v.isRefined
};
});
var sortedItems = withSearchBox && !isFromSearch ? orderBy_1(items, ['isRefined', 'count', 'label'], ['desc', 'desc', 'asc']) : items;
var transformedItems = props.transformItems ? props.transformItems(sortedItems) : sortedItems;
return {
items: transformedItems.slice(0, limit),
currentRefinement: getCurrentRefinement$4(props, searchState, this.context),
isFromSearch: isFromSearch,
withSearchBox: withSearchBox,
canRefine: items.length > 0
};
},
refine: function refine(props, searchState, nextRefinement) {
return _refine$2(props, searchState, nextRefinement, this.context);
},
searchForFacetValues: function searchForFacetValues(props, searchState, nextRefinement) {
return { facetName: props.attributeName, query: nextRefinement };
},
cleanUp: function cleanUp(props, searchState) {
return _cleanUp$2(props, searchState, this.context);
},
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
var attributeName = props.attributeName,
showMore = props.showMore,
limitMin = props.limitMin,
limitMax = props.limitMax;
var limit = showMore ? limitMax : limitMin;
searchParameters = searchParameters.setQueryParameters({
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, limit)
});
searchParameters = searchParameters.addDisjunctiveFacet(attributeName);
var currentRefinement = getCurrentRefinement$4(props, searchState, this.context);
if (currentRefinement !== null) {
searchParameters = searchParameters.addDisjunctiveFacetRefinement(attributeName, currentRefinement);
}
return searchParameters;
},
getMetadata: function getMetadata(props, searchState) {
var _this2 = this;
var id = getId$5(props);
var currentRefinement = getCurrentRefinement$4(props, searchState, this.context);
return {
id: id,
index: getIndex(this.context),
items: currentRefinement === null ? [] : [{
label: props.attributeName + ': ' + currentRefinement,
attributeName: props.attributeName,
value: function value(nextState) {
return _refine$2(props, nextState, '', _this2.context);
},
currentRefinement: currentRefinement
}]
};
}
});
function stringifyItem(item) {
if (typeof item.start === 'undefined' && typeof item.end === 'undefined') {
return '';
}
return (item.start ? item.start : '') + ':' + (item.end ? item.end : '');
}
function parseItem(value) {
if (value.length === 0) {
return { start: null, end: null };
}
var _value$split = value.split(':'),
_value$split2 = slicedToArray(_value$split, 2),
startStr = _value$split2[0],
endStr = _value$split2[1];
return {
start: startStr.length > 0 ? parseInt(startStr, 10) : null,
end: endStr.length > 0 ? parseInt(endStr, 10) : null
};
}
var namespace$2 = 'multiRange';
function getId$6(props) {
return props.attributeName;
}
function getCurrentRefinement$5(props, searchState, context) {
return getCurrentRefinementValue(props, searchState, context, namespace$2 + '.' + getId$6(props), '', function (currentRefinement) {
if (currentRefinement === '') {
return '';
}
return currentRefinement;
});
}
function isRefinementsRangeIncludesInsideItemRange(stats, start, end) {
return stats.min > start && stats.min < end || stats.max > start && stats.max < end;
}
function isItemRangeIncludedInsideRefinementsRange(stats, start, end) {
return start > stats.min && start < stats.max || end > stats.min && end < stats.max;
}
function itemHasRefinement(attributeName, results, value) {
var stats = results.getFacetByName(attributeName) ? results.getFacetStats(attributeName) : null;
var range = value.split(':');
var start = Number(range[0]) === 0 || value === '' ? Number.NEGATIVE_INFINITY : Number(range[0]);
var end = Number(range[1]) === 0 || value === '' ? Number.POSITIVE_INFINITY : Number(range[1]);
return !(Boolean(stats) && (isRefinementsRangeIncludesInsideItemRange(stats, start, end) || isItemRangeIncludedInsideRefinementsRange(stats, start, end)));
}
function _refine$3(props, searchState, nextRefinement, context) {
var nextValue = defineProperty$2({}, getId$6(props, searchState), nextRefinement);
var resetPage = true;
return refineValue(searchState, nextValue, context, resetPage, namespace$2);
}
function _cleanUp$3(props, searchState, context) {
return cleanUpValue(searchState, context, namespace$2 + '.' + getId$6(props));
}
/**
* connectMultiRange connector provides the logic to build a widget that will
* give the user the ability to select a range value for a numeric attribute.
* Ranges are defined statically.
* @name connectMultiRange
* @requirements The attribute passed to the `attributeName` prop must be holding numerical values.
* @kind connector
* @propType {string} attributeName - the name of the attribute in the records
* @propType {{label: string, start: number, end: number}[]} items - List of options. With a text label, and upper and lower bounds.
* @propType {string} [defaultRefinement] - the value of the item selected by default, follow the shape of a `string` with a pattern of `'{start}:{end}'`.
* @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return.
* @providedPropType {function} refine - a function to select a range.
* @providedPropType {function} createURL - a function to generate a URL for the corresponding search state
* @providedPropType {string} currentRefinement - the refinement currently applied. follow the shape of a `string` with a pattern of `'{start}:{end}'` which corresponds to the current selected item. For instance, when the selected item is `{start: 10, end: 20}`, the searchState of the widget is `'10:20'`. When `start` isn't defined, the searchState of the widget is `':{end}'`, and the same way around when `end` isn't defined. However, when neither `start` nor `end` are defined, the searchState is an empty string.
* @providedPropType {array.<{isRefined: boolean, label: string, value: string, isRefined: boolean, noRefinement: boolean}>} items - the list of ranges the MultiRange can display.
*/
var connectMultiRange = createConnector({
displayName: 'AlgoliaMultiRange',
propTypes: {
id: propTypes.string,
attributeName: propTypes.string.isRequired,
items: propTypes.arrayOf(propTypes.shape({
label: propTypes.node,
start: propTypes.number,
end: propTypes.number
})).isRequired,
transformItems: propTypes.func
},
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
var attributeName = props.attributeName;
var currentRefinement = getCurrentRefinement$5(props, searchState, this.context);
var results = getResults(searchResults, this.context);
var items = props.items.map(function (item) {
var value = stringifyItem(item);
return {
label: item.label,
value: value,
isRefined: value === currentRefinement,
noRefinement: results ? itemHasRefinement(getId$6(props), results, value) : false
};
});
var stats = results && results.getFacetByName(attributeName) ? results.getFacetStats(attributeName) : null;
var refinedItem = find_1(items, function (item) {
return item.isRefined === true;
});
if (!items.some(function (item) {
return item.value === '';
})) {
items.push({
value: '',
isRefined: isEmpty_1(refinedItem),
noRefinement: !stats,
label: 'All'
});
}
return {
items: props.transformItems ? props.transformItems(items) : items,
currentRefinement: currentRefinement,
canRefine: items.length > 0 && items.some(function (item) {
return item.noRefinement === false;
})
};
},
refine: function refine(props, searchState, nextRefinement) {
return _refine$3(props, searchState, nextRefinement, this.context);
},
cleanUp: function cleanUp(props, searchState) {
return _cleanUp$3(props, searchState, this.context);
},
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
var attributeName = props.attributeName;
var _parseItem = parseItem(getCurrentRefinement$5(props, searchState, this.context)),
start = _parseItem.start,
end = _parseItem.end;
searchParameters = searchParameters.addDisjunctiveFacet(attributeName);
if (start) {
searchParameters = searchParameters.addNumericRefinement(attributeName, '>=', start);
}
if (end) {
searchParameters = searchParameters.addNumericRefinement(attributeName, '<=', end);
}
return searchParameters;
},
getMetadata: function getMetadata(props, searchState) {
var _this = this;
var id = getId$6(props);
var value = getCurrentRefinement$5(props, searchState, this.context);
var items = [];
var index = getIndex(this.context);
if (value !== '') {
var _find2 = find_1(props.items, function (item) {
return stringifyItem(item) === value;
}),
label = _find2.label;
items.push({
label: props.attributeName + ': ' + label,
attributeName: props.attributeName,
currentRefinement: label,
value: function value(nextState) {
return _refine$3(props, nextState, '', _this.context);
}
});
}
return { id: id, index: index, items: items };
}
});
function getId$7() {
return 'page';
}
function getCurrentRefinement$6(props, searchState, context) {
var id = getId$7();
var page = 1;
return getCurrentRefinementValue(props, searchState, context, id, page, function (currentRefinement) {
if (typeof currentRefinement === 'string') {
return parseInt(currentRefinement, 10);
}
return currentRefinement;
});
}
function _refine$4(props, searchState, nextPage, context) {
var id = getId$7();
var nextValue = defineProperty$2({}, id, nextPage);
var resetPage = false;
return refineValue(searchState, nextValue, context, resetPage);
}
/**
* connectPagination connector provides the logic to build a widget that will
* let the user displays hits corresponding to a certain page.
* @name connectPagination
* @kind connector
* @propType {boolean} [showFirst=true] - Display the first page link.
* @propType {boolean} [showLast=false] - Display the last page link.
* @propType {boolean} [showPrevious=true] - Display the previous page link.
* @propType {boolean} [showNext=true] - Display the next page link.
* @propType {number} [pagesPadding=3] - How many page links to display around the current page.
* @propType {number} [maxPages=Infinity] - Maximum number of pages to display.
* @providedPropType {function} refine - a function to remove a single filter
* @providedPropType {function} createURL - a function to generate a URL for the corresponding search state
* @providedPropType {number} nbPages - the total of existing pages
* @providedPropType {number} currentRefinement - the page refinement currently applied
*/
var connectPagination = createConnector({
displayName: 'AlgoliaPagination',
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
var results = getResults(searchResults, this.context);
if (!results) {
return null;
}
var nbPages = results.nbPages;
return {
nbPages: nbPages,
currentRefinement: getCurrentRefinement$6(props, searchState, this.context),
canRefine: nbPages > 1
};
},
refine: function refine(props, searchState, nextPage) {
return _refine$4(props, searchState, nextPage, this.context);
},
cleanUp: function cleanUp(props, searchState) {
return cleanUpValue(searchState, this.context, getId$7());
},
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
return searchParameters.setPage(getCurrentRefinement$6(props, searchState, this.context) - 1);
},
getMetadata: function getMetadata() {
return { id: getId$7() };
}
});
/**
* connectPoweredBy connector provides the logic to build a widget that
* will display a link to algolia.
* @name connectPoweredBy
* @kind connector
* @providedPropType {string} url - the url to redirect to algolia
*/
var connectPoweredBy = createConnector({
displayName: 'AlgoliaPoweredBy',
propTypes: {},
getProvidedProps: function getProvidedProps(props) {
var url = 'https://www.algolia.com/?' + 'utm_source=react-instantsearch&' + 'utm_medium=website&' + ('utm_content=' + (props.canRender ? location.hostname : '') + '&') + 'utm_campaign=poweredby';
return { url: url };
}
});
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeIsFinite = _root.isFinite;
/**
* Checks if `value` is a finite primitive number.
*
* **Note:** This method is based on
* [`Number.isFinite`](https://mdn.io/Number/isFinite).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
* @example
*
* _.isFinite(3);
* // => true
*
* _.isFinite(Number.MIN_VALUE);
* // => true
*
* _.isFinite(Infinity);
* // => false
*
* _.isFinite('3');
* // => false
*/
function isFinite(value) {
return typeof value == 'number' && nativeIsFinite(value);
}
var _isFinite = isFinite;
/**
* connectRange connector provides the logic to create connected
* components that will give the ability for a user to refine results using
* a numeric range.
* @name connectRange
* @kind connector
* @requirements The attribute passed to the `attributeName` prop must be holding numerical values.
* @propType {string} attributeName - Name of the attribute for faceting
* @propType {{min: number, max: number}} [defaultRefinement] - Default searchState of the widget containing the start and the end of the range.
* @propType {number} [min] - Minimum value. When this isn't set, the minimum value will be automatically computed by Algolia using the data in the index.
* @propType {number} [max] - Maximum value. When this isn't set, the maximum value will be automatically computed by Algolia using the data in the index.
* @propType {number} [precision=2] - Number of digits after decimal point to use.
* @providedPropType {function} refine - a function to select a range.
* @providedPropType {function} createURL - a function to generate a URL for the corresponding search state
* @providedPropType {string} currentRefinement - the refinement currently applied
*/
function getId$8(props) {
return props.attributeName;
}
var namespace$3 = 'range';
function getCurrentRange(boundaries, stats, precision) {
var pow = Math.pow(10, precision);
var min = void 0;
if (_isFinite(boundaries.min)) {
min = boundaries.min;
} else if (_isFinite(stats.min)) {
min = stats.min;
} else {
min = undefined;
}
var max = void 0;
if (_isFinite(boundaries.max)) {
max = boundaries.max;
} else if (_isFinite(stats.max)) {
max = stats.max;
} else {
max = undefined;
}
return {
min: min !== undefined ? Math.floor(min * pow) / pow : min,
max: max !== undefined ? Math.ceil(max * pow) / pow : max
};
}
function getCurrentRefinement$7(props, searchState, currentRange, context) {
var refinement = getCurrentRefinementValue(props, searchState, context, namespace$3 + '.' + getId$8(props), {}, function (currentRefinement) {
var min = currentRefinement.min,
max = currentRefinement.max;
if (typeof min === 'string') {
min = parseInt(min, 10);
}
if (typeof max === 'string') {
max = parseInt(max, 10);
}
return { min: min, max: max };
});
var hasMinBound = props.min !== undefined;
var hasMaxBound = props.max !== undefined;
var hasMinRefinment = refinement.min !== undefined;
var hasMaxRefinment = refinement.max !== undefined;
if (hasMinBound && hasMinRefinment && refinement.min < currentRange.min) {
throw Error("You can't provide min value lower than range.");
}
if (hasMaxBound && hasMaxRefinment && refinement.max > currentRange.max) {
throw Error("You can't provide max value greater than range.");
}
if (hasMinBound && !hasMinRefinment) {
refinement.min = currentRange.min;
}
if (hasMaxBound && !hasMaxRefinment) {
refinement.max = currentRange.max;
}
return refinement;
}
function nextValueForRefinement(hasBound, isReset, range, value) {
var next = void 0;
if (!hasBound && range === value) {
next = undefined;
} else if (hasBound && isReset) {
next = range;
} else {
next = value;
}
return next;
}
function _refine$5(props, searchState, nextRefinement, currentRange, context) {
var nextMin = nextRefinement.min,
nextMax = nextRefinement.max;
var currentMinRange = currentRange.min,
currentMaxRange = currentRange.max;
var isMinReset = nextMin === undefined || nextMin === '';
var isMaxReset = nextMax === undefined || nextMax === '';
var nextMinAsNumber = !isMinReset ? parseFloat(nextMin) : undefined;
var nextMaxAsNumber = !isMaxReset ? parseFloat(nextMax) : undefined;
var isNextMinValid = isMinReset || _isFinite(nextMinAsNumber);
var isNextMaxValid = isMaxReset || _isFinite(nextMaxAsNumber);
if (!isNextMinValid || !isNextMaxValid) {
throw Error("You can't provide non finite values to the range connector.");
}
if (nextMinAsNumber < currentMinRange) {
throw Error("You can't provide min value lower than range.");
}
if (nextMaxAsNumber > currentMaxRange) {
throw Error("You can't provide max value greater than range.");
}
var id = getId$8(props);
var resetPage = true;
var nextValue = defineProperty$2({}, id, {
min: nextValueForRefinement(props.min !== undefined, isMinReset, currentMinRange, nextMinAsNumber),
max: nextValueForRefinement(props.max !== undefined, isMaxReset, currentMaxRange, nextMaxAsNumber)
});
return refineValue(searchState, nextValue, context, resetPage, namespace$3);
}
function _cleanUp$4(props, searchState, context) {
return cleanUpValue(searchState, context, namespace$3 + '.' + getId$8(props));
}
var connectRange = createConnector({
displayName: 'AlgoliaRange',
propTypes: {
id: propTypes.string,
attributeName: propTypes.string.isRequired,
defaultRefinement: propTypes.shape({
min: propTypes.number.isRequired,
max: propTypes.number.isRequired
}),
min: propTypes.number,
max: propTypes.number,
precision: propTypes.number
},
defaultProps: {
precision: 2
},
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
var attributeName = props.attributeName,
precision = props.precision,
minBound = props.min,
maxBound = props.max;
var results = getResults(searchResults, this.context);
var stats = results ? results.getFacetStats(attributeName) || {} : {};
var count = results ? results.getFacetValues(attributeName).map(function (v) {
return {
value: v.name,
count: v.count
};
}) : [];
var _getCurrentRange = getCurrentRange({ min: minBound, max: maxBound }, stats, precision),
rangeMin = _getCurrentRange.min,
rangeMax = _getCurrentRange.max;
// The searchState is not always in sync with the helper state. For example
// when we set boundaries on the first render the searchState don't have
// the correct refinement. If this behaviour change in the upcoming version
// we could store the range inside the searchState instead of rely on `this`.
this._currentRange = {
min: rangeMin,
max: rangeMax
};
var _getCurrentRefinement = getCurrentRefinement$7(props, searchState, this._currentRange, this.context),
valueMin = _getCurrentRefinement.min,
valueMax = _getCurrentRefinement.max;
return {
min: rangeMin,
max: rangeMax,
canRefine: count.length > 0,
currentRefinement: {
min: valueMin === undefined ? rangeMin : valueMin,
max: valueMax === undefined ? rangeMax : valueMax
},
count: count,
precision: precision
};
},
refine: function refine(props, searchState, nextRefinement) {
return _refine$5(props, searchState, nextRefinement, this._currentRange, this.context);
},
cleanUp: function cleanUp(props, searchState) {
return _cleanUp$4(props, searchState, this.context);
},
getSearchParameters: function getSearchParameters(params, props, searchState) {
var attributeName = props.attributeName;
var _getCurrentRefinement2 = getCurrentRefinement$7(props, searchState, this._currentRange, this.context),
min = _getCurrentRefinement2.min,
max = _getCurrentRefinement2.max;
params = params.addDisjunctiveFacet(attributeName);
if (min !== undefined) {
params = params.addNumericRefinement(attributeName, '>=', min);
}
if (max !== undefined) {
params = params.addNumericRefinement(attributeName, '<=', max);
}
return params;
},
getMetadata: function getMetadata(props, searchState) {
var _this = this;
var _currentRange = this._currentRange,
minRange = _currentRange.min,
maxRange = _currentRange.max;
var _getCurrentRefinement3 = getCurrentRefinement$7(props, searchState, this._currentRange, this.context),
minValue = _getCurrentRefinement3.min,
maxValue = _getCurrentRefinement3.max;
var items = [];
var hasMin = minValue !== undefined;
var hasMax = maxValue !== undefined;
var shouldDisplayMinLabel = hasMin && minValue !== minRange;
var shouldDisplayMaxLabel = hasMax && maxValue !== maxRange;
if (shouldDisplayMinLabel || shouldDisplayMaxLabel) {
var fragments = [hasMin ? minValue + ' <= ' : '', props.attributeName, hasMax ? ' <= ' + maxValue : ''];
items.push({
label: fragments.join(''),
attributeName: props.attributeName,
value: function value(nextState) {
return _refine$5(props, nextState, {}, _this._currentRange, _this.context);
},
currentRefinement: {
min: minValue,
max: maxValue
}
});
}
return {
id: getId$8(props),
index: getIndex(this.context),
items: items
};
}
});
var namespace$4 = 'refinementList';
function getId$9(props) {
return props.attributeName;
}
function getCurrentRefinement$8(props, searchState, context) {
return getCurrentRefinementValue(props, searchState, context, namespace$4 + '.' + getId$9(props), [], function (currentRefinement) {
if (typeof currentRefinement === 'string') {
// All items were unselected
if (currentRefinement === '') {
return [];
}
// Only one item was in the searchState but we know it should be an array
return [currentRefinement];
}
return currentRefinement;
});
}
function getValue$4(name, props, searchState, context) {
var currentRefinement = getCurrentRefinement$8(props, searchState, context);
var isAnewValue = currentRefinement.indexOf(name) === -1;
var nextRefinement = isAnewValue ? currentRefinement.concat([name]) // cannot use .push(), it mutates
: currentRefinement.filter(function (selectedValue) {
return selectedValue !== name;
}); // cannot use .splice(), it mutates
return nextRefinement;
}
function _refine$6(props, searchState, nextRefinement, context) {
var id = getId$9(props);
// Setting the value to an empty string ensures that it is persisted in
// the URL as an empty value.
// This is necessary in the case where `defaultRefinement` contains one
// item and we try to deselect it. `nextSelected` would be an empty array,
// which would not be persisted to the URL.
// {foo: ['bar']} => "foo[0]=bar"
// {foo: []} => ""
var nextValue = defineProperty$2({}, id, nextRefinement.length > 0 ? nextRefinement : '');
var resetPage = true;
return refineValue(searchState, nextValue, context, resetPage, namespace$4);
}
function _cleanUp$5(props, searchState, context) {
return cleanUpValue(searchState, context, namespace$4 + '.' + getId$9(props));
}
/**
* connectRefinementList connector provides the logic to build a widget that will
* give the user the ability to choose multiple values for a specific facet.
* @name connectRefinementList
* @kind connector
* @requirements The attribute passed to the `attributeName` prop must be present in "attributes for faceting"
* on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API.
* @propType {string} attributeName - the name of the attribute in the record
* @propType {boolean} [withSearchBox=false] - allow search inside values
* @propType {string} [operator=or] - How to apply the refinements. Possible values: 'or' or 'and'.
* @propType {boolean} [showMore=false] - true if the component should display a button that will expand the number of items
* @propType {number} [limitMin=10] - the minimum number of displayed items
* @propType {number} [limitMax=20] - the maximun number of displayed items. Only used when showMore is set to `true`
* @propType {string[]} defaultRefinement - the values of the items selected by default. The searchState of this widget takes the form of a list of `string`s, which correspond to the values of all selected refinements. However, when there are no refinements selected, the value of the searchState is an empty string.
* @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return.
* @providedPropType {function} refine - a function to toggle a refinement
* @providedPropType {function} createURL - a function to generate a URL for the corresponding search state
* @providedPropType {string[]} currentRefinement - the refinement currently applied
* @providedPropType {array.<{count: number, isRefined: boolean, label: string, value: string}>} items - the list of items the RefinementList can display.
* @providedPropType {function} searchForItems - a function to toggle a search inside items values
* @providedPropType {boolean} isFromSearch - a boolean that says if the `items` props contains facet values from the global search or from the search inside items.
*/
var sortBy$2 = ['isRefined', 'count:desc', 'name:asc'];
var connectRefinementList = createConnector({
displayName: 'AlgoliaRefinementList',
propTypes: {
id: propTypes.string,
attributeName: propTypes.string.isRequired,
operator: propTypes.oneOf(['and', 'or']),
showMore: propTypes.bool,
limitMin: propTypes.number,
limitMax: propTypes.number,
defaultRefinement: propTypes.arrayOf(propTypes.oneOfType([propTypes.string, propTypes.number])),
withSearchBox: propTypes.bool,
searchForFacetValues: propTypes.bool, // @deprecated
transformItems: propTypes.func
},
defaultProps: {
operator: 'or',
showMore: false,
limitMin: 10,
limitMax: 20
},
getProvidedProps: function getProvidedProps(props, searchState, searchResults, metadata, searchForFacetValuesResults) {
var _this = this;
var attributeName = props.attributeName,
showMore = props.showMore,
limitMin = props.limitMin,
limitMax = props.limitMax;
var limit = showMore ? limitMax : limitMin;
var results = getResults(searchResults, this.context);
var canRefine = Boolean(results) && Boolean(results.getFacetByName(attributeName));
var isFromSearch = Boolean(searchForFacetValuesResults && searchForFacetValuesResults[attributeName] && searchForFacetValuesResults.query !== '');
var withSearchBox = props.withSearchBox || props.searchForFacetValues;
if (props.withSearchBox && this.context.multiIndexContext) {
throw new Error('react-instantsearch: searching in *List is not available when used inside a' + ' multi index context');
}
if (!canRefine) {
return {
items: [],
currentRefinement: getCurrentRefinement$8(props, searchState, this.context),
canRefine: canRefine,
isFromSearch: isFromSearch,
withSearchBox: withSearchBox
};
}
var items = isFromSearch ? searchForFacetValuesResults[attributeName].map(function (v) {
return {
label: v.value,
value: getValue$4(v.value, props, searchState, _this.context),
_highlightResult: { label: { value: v.highlighted } },
count: v.count,
isRefined: v.isRefined
};
}) : results.getFacetValues(attributeName, { sortBy: sortBy$2 }).map(function (v) {
return {
label: v.name,
value: getValue$4(v.name, props, searchState, _this.context),
count: v.count,
isRefined: v.isRefined
};
});
var transformedItems = props.transformItems ? props.transformItems(items) : items;
return {
items: transformedItems.slice(0, limit),
currentRefinement: getCurrentRefinement$8(props, searchState, this.context),
isFromSearch: isFromSearch,
withSearchBox: withSearchBox,
canRefine: items.length > 0
};
},
refine: function refine(props, searchState, nextRefinement) {
return _refine$6(props, searchState, nextRefinement, this.context);
},
searchForFacetValues: function searchForFacetValues(props, searchState, nextRefinement) {
return { facetName: props.attributeName, query: nextRefinement };
},
cleanUp: function cleanUp(props, searchState) {
return _cleanUp$5(props, searchState, this.context);
},
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
var attributeName = props.attributeName,
operator = props.operator,
showMore = props.showMore,
limitMin = props.limitMin,
limitMax = props.limitMax;
var limit = showMore ? limitMax : limitMin;
var addKey = operator === 'and' ? 'addFacet' : 'addDisjunctiveFacet';
var addRefinementKey = addKey + 'Refinement';
searchParameters = searchParameters.setQueryParameters({
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, limit)
});
searchParameters = searchParameters[addKey](attributeName);
return getCurrentRefinement$8(props, searchState, this.context).reduce(function (res, val) {
return res[addRefinementKey](attributeName, val);
}, searchParameters);
},
getMetadata: function getMetadata(props, searchState) {
var id = getId$9(props);
var context = this.context;
return {
id: id,
index: getIndex(this.context),
items: getCurrentRefinement$8(props, searchState, context).length > 0 ? [{
attributeName: props.attributeName,
label: props.attributeName + ': ',
currentRefinement: getCurrentRefinement$8(props, searchState, context),
value: function value(nextState) {
return _refine$6(props, nextState, [], context);
},
items: getCurrentRefinement$8(props, searchState, context).map(function (item) {
return {
label: '' + item,
value: function value(nextState) {
var nextSelectedItems = getCurrentRefinement$8(props, nextState, context).filter(function (other) {
return other !== item;
});
return _refine$6(props, searchState, nextSelectedItems, context);
}
};
})
}] : []
};
}
});
/**
* connectScrollTo connector provides the logic to build a widget that will
* let the page scroll to a certain point.
* @name connectScrollTo
* @kind connector
* @propType {string} [scrollOn="page"] - Widget searchState key on which to listen for changes, default to the pagination widget.
* @providedPropType {any} value - the current refinement applied to the widget listened by scrollTo
* @providedPropType {boolean} hasNotChanged - indicates whether the refinement came from the scrollOn argument (for instance page by default)
*/
var connectScrollTo = createConnector({
displayName: 'AlgoliaScrollTo',
propTypes: {
scrollOn: propTypes.string
},
defaultProps: {
scrollOn: 'page'
},
getProvidedProps: function getProvidedProps(props, searchState) {
var id = props.scrollOn;
var value = getCurrentRefinementValue(props, searchState, this.context, id, null, function (currentRefinement) {
return currentRefinement;
});
if (!this._prevSearchState) {
this._prevSearchState = {};
}
/* Get the subpart of the state that interest us*/
if (hasMultipleIndex(this.context)) {
var index = getIndex(this.context);
searchState = searchState.indices ? searchState.indices[index] : {};
}
/*
if there is a change in the app that has been triggered by another element than
"props.scrollOn (id) or the Configure widget, we need to keep track of the search state to
know if there's a change in the app that was not triggered by the props.scrollOn (id)
or the Configure widget. This is useful when using ScrollTo in combination of Pagination.
As pagination can be change by every widget, we want to scroll only if it cames from the pagination
widget itself. We also remove the configure key from the search state to do this comparaison because for
now configure values are not present in the search state before a first refinement has been made
and will false the results.
See: https://github.com/algolia/react-instantsearch/issues/164
*/
var cleanedSearchState = omit_1(omit_1(searchState, 'configure'), id);
var hasNotChanged = shallowEqual(this._prevSearchState, cleanedSearchState);
this._prevSearchState = cleanedSearchState;
return { value: value, hasNotChanged: hasNotChanged };
}
});
var getId$10 = function getId(props) {
return props.attributes[0];
};
var namespace$5 = 'hierarchicalMenu';
function _refine$7(props, searchState, nextRefinement, context) {
var id = getId$10(props);
var nextValue = defineProperty$2({}, id, nextRefinement || '');
var resetPage = true;
return refineValue(searchState, nextValue, context, resetPage, namespace$5);
}
function transformValue$1(values) {
return values.reduce(function (acc, item) {
if (item.isRefined) {
acc.push({
label: item.name,
// If dealing with a nested "items", "value" is equal to the previous value concatenated with the current label
// If dealing with the first level, "value" is equal to the current label
value: item.path
});
// Create a variable in order to keep the same acc for the recursion, otherwise "reduce" returns a new one
if (item.data) {
acc = acc.concat(transformValue$1(item.data, acc));
}
}
return acc;
}, []);
}
/**
* The breadcrumb component is s a type of secondary navigation scheme that
* reveals the user’s location in a website or web application.
*
* @name connectBreadcrumb
* @requirements To use this widget, your attributes must be formatted in a specific way.
* If you want for example to have a Breadcrumb of categories, objects in your index
* should be formatted this way:
*
* ```json
* {
* "categories.lvl0": "products",
* "categories.lvl1": "products > fruits",
* "categories.lvl2": "products > fruits > citrus"
* }
* ```
*
* It's also possible to provide more than one path for each level:
*
* ```json
* {
* "categories.lvl0": ["products", "goods"],
* "categories.lvl1": ["products > fruits", "goods > to eat"]
* }
* ```
*
* All attributes passed to the `attributes` prop must be present in "attributes for faceting"
* on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API.
*
* @kind connector
* @propType {string} attributes - List of attributes to use to generate the hierarchy of the menu. See the example for the convention to follow.
* @propType {string} {React.Element} [separator=' > '] - Specifies the level separator used in the data.
* @propType {string} [rootURL=null] - The root element's URL (the originating page).
* @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return.
* @providedPropType {function} refine - a function to toggle a refinement
* @providedPropType {function} createURL - a function to generate a URL for the corresponding search state
* @providedPropType {array.<{items: object, count: number, isRefined: boolean, label: string, value: string}>} items - the list of items the Breadcrumb can display.
*/
var connectBreadcrumb = createConnector({
displayName: 'AlgoliaBreadcrumb',
propTypes: {
attributes: function attributes(props, propName, componentName) {
var isNotString = function isNotString(val) {
return typeof val !== 'string';
};
if (!Array.isArray(props[propName]) || props[propName].some(isNotString) || props[propName].length < 1) {
return new Error('Invalid prop ' + propName + ' supplied to ' + componentName + '. Expected an Array of Strings');
}
return undefined;
},
rootURL: propTypes.string,
separator: propTypes.oneOfType([propTypes.string, propTypes.element]),
transformItems: propTypes.func
},
defaultProps: {
rootURL: null,
separator: ' > '
},
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
var id = getId$10(props);
var results = getResults(searchResults, this.context);
var isFacetPresent = Boolean(results) && Boolean(results.getFacetByName(id));
if (!isFacetPresent) {
return {
items: [],
canRefine: false
};
}
var values = results.getFacetValues(id);
var items = values.data ? transformValue$1(values.data) : [];
var transformedItems = props.transformItems ? props.transformItems(items) : items;
return {
canRefine: transformedItems.length > 0,
items: transformedItems
};
},
refine: function refine(props, searchState, nextRefinement) {
return _refine$7(props, searchState, nextRefinement, this.context);
}
});
function getId$11() {
return 'query';
}
function getCurrentRefinement$9(props, searchState, context) {
var id = getId$11(props);
return getCurrentRefinementValue(props, searchState, context, id, '', function (currentRefinement) {
if (currentRefinement) {
return currentRefinement;
}
return '';
});
}
function _refine$8(props, searchState, nextRefinement, context) {
var id = getId$11();
var nextValue = defineProperty$2({}, id, nextRefinement);
var resetPage = true;
return refineValue(searchState, nextValue, context, resetPage);
}
function _cleanUp$6(props, searchState, context) {
return cleanUpValue(searchState, context, getId$11());
}
/**
* connectSearchBox connector provides the logic to build a widget that will
* let the user search for a query.
* @name connectSearchBox
* @kind connector
* @providedPropType {function} refine - a function to remove a single filter
* @providedPropType {function} createURL - a function to generate a URL for the corresponding search state
* @providedPropType {string} currentRefinement - the query to search for.
* @providedPropType {boolean} isSearchStalled - a flag that indicates if react-is has detected that searches are stalled.
*/
var connectSearchBox = createConnector({
displayName: 'AlgoliaSearchBox',
propTypes: {
defaultRefinement: propTypes.string
},
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
return {
currentRefinement: getCurrentRefinement$9(props, searchState, this.context),
isSearchStalled: searchResults.isSearchStalled
};
},
refine: function refine(props, searchState, nextRefinement) {
return _refine$8(props, searchState, nextRefinement, this.context);
},
cleanUp: function cleanUp(props, searchState) {
return _cleanUp$6(props, searchState, this.context);
},
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
return searchParameters.setQuery(getCurrentRefinement$9(props, searchState, this.context));
},
getMetadata: function getMetadata(props, searchState) {
var _this = this;
var id = getId$11(props);
var currentRefinement = getCurrentRefinement$9(props, searchState, this.context);
return {
id: id,
index: getIndex(this.context),
items: currentRefinement === null ? [] : [{
label: id + ': ' + currentRefinement,
value: function value(nextState) {
return _refine$8(props, nextState, '', _this.context);
},
currentRefinement: currentRefinement
}]
};
}
});
function getId$12() {
return 'sortBy';
}
function getCurrentRefinement$10(props, searchState, context) {
var id = getId$12(props);
return getCurrentRefinementValue(props, searchState, context, id, null, function (currentRefinement) {
if (currentRefinement) {
return currentRefinement;
}
return null;
});
}
/**
* The connectSortBy connector provides the logic to build a widget that will
* display a list of indices. This allows a user to change how the hits are being sorted.
* @name connectSortBy
* @requirements Algolia handles sorting by creating replica indices. [Read more about sorting](https://www.algolia.com/doc/guides/relevance/sorting/) on
* the Algolia website.
* @kind connector
* @propType {string} defaultRefinement - The default selected index.
* @propType {{value: string, label: string}[]} items - The list of indexes to search in.
* @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return.
* @providedPropType {function} refine - a function to remove a single filter
* @providedPropType {function} createURL - a function to generate a URL for the corresponding search state
* @providedPropType {string[]} currentRefinement - the refinement currently applied
* @providedPropType {array.<{isRefined: boolean, label?: string, value: string}>} items - the list of items the HitsPerPage can display. If no label provided, the value will be displayed.
*/
var connectSortBy = createConnector({
displayName: 'AlgoliaSortBy',
propTypes: {
defaultRefinement: propTypes.string,
items: propTypes.arrayOf(propTypes.shape({
label: propTypes.string,
value: propTypes.string.isRequired
})).isRequired,
transformItems: propTypes.func
},
getProvidedProps: function getProvidedProps(props, searchState) {
var currentRefinement = getCurrentRefinement$10(props, searchState, this.context);
var items = props.items.map(function (item) {
return item.value === currentRefinement ? _extends({}, item, { isRefined: true }) : _extends({}, item, { isRefined: false });
});
return {
items: props.transformItems ? props.transformItems(items) : items,
currentRefinement: currentRefinement
};
},
refine: function refine(props, searchState, nextRefinement) {
var id = getId$12();
var nextValue = defineProperty$2({}, id, nextRefinement);
var resetPage = true;
return refineValue(searchState, nextValue, this.context, resetPage);
},
cleanUp: function cleanUp(props, searchState) {
return cleanUpValue(searchState, this.context, getId$12());
},
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
var selectedIndex = getCurrentRefinement$10(props, searchState, this.context);
return searchParameters.setIndex(selectedIndex);
},
getMetadata: function getMetadata() {
return { id: getId$12() };
}
});
/**
* connectStats connector provides the logic to build a widget that will
* displays algolia search statistics (hits number and processing time).
* @name connectStats
* @kind connector
* @providedPropType {number} nbHits - number of hits returned by Algolia.
* @providedPropType {number} processingTimeMS - the time in ms took by Algolia to search for results.
*/
var connectStats = createConnector({
displayName: 'AlgoliaStats',
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
var results = getResults(searchResults, this.context);
if (!results) {
return null;
}
return {
nbHits: results.nbHits,
processingTimeMS: results.processingTimeMS
};
}
});
function getId$13(props) {
return props.attributeName;
}
var namespace$6 = 'toggle';
function getCurrentRefinement$11(props, searchState, context) {
return getCurrentRefinementValue(props, searchState, context, namespace$6 + '.' + getId$13(props), false, function (currentRefinement) {
if (currentRefinement) {
return currentRefinement;
}
return false;
});
}
function _refine$9(props, searchState, nextRefinement, context) {
var id = getId$13(props);
var nextValue = defineProperty$2({}, id, nextRefinement ? nextRefinement : false);
var resetPage = true;
return refineValue(searchState, nextValue, context, resetPage, namespace$6);
}
function _cleanUp$7(props, searchState, context) {
return cleanUpValue(searchState, context, namespace$6 + '.' + getId$13(props));
}
/**
* connectToggle connector provides the logic to build a widget that will
* provides an on/off filtering feature based on an attribute value. Note that if you provide an “off” option, it will be refined at initialization.
* @name connectToggle
* @kind connector
* @requirements To use this widget, you'll need an attribute to toggle on.
*
* You can't toggle on null or not-null values. If you want to address this particular use-case you'll need to compute an
* extra boolean attribute saying if the value exists or not. See this [thread](https://discourse.algolia.com/t/how-to-create-a-toggle-for-the-absence-of-a-string-attribute/2460) for more details.
*
* @propType {string} attributeName - Name of the attribute on which to apply the `value` refinement. Required when `value` is present.
* @propType {string} label - Label for the toggle.
* @propType {string} value - Value of the refinement to apply on `attributeName`.
* @propType {boolean} [defaultRefinement=false] - Default searchState of the widget. Should the toggle be checked by default?
* @providedPropType {function} refine - a function to toggle a refinement
* @providedPropType {function} createURL - a function to generate a URL for the corresponding search state
* @providedPropType {boolean} currentRefinement - the refinement currently applied
*/
var connectToggle = createConnector({
displayName: 'AlgoliaToggle',
propTypes: {
label: propTypes.string,
filter: propTypes.func,
attributeName: propTypes.string,
value: propTypes.any,
defaultRefinement: propTypes.bool
},
getProvidedProps: function getProvidedProps(props, searchState) {
var currentRefinement = getCurrentRefinement$11(props, searchState, this.context);
return { currentRefinement: currentRefinement };
},
refine: function refine(props, searchState, nextRefinement) {
return _refine$9(props, searchState, nextRefinement, this.context);
},
cleanUp: function cleanUp(props, searchState) {
return _cleanUp$7(props, searchState, this.context);
},
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
var attributeName = props.attributeName,
value = props.value,
filter = props.filter;
var checked = getCurrentRefinement$11(props, searchState, this.context);
if (checked) {
if (attributeName) {
searchParameters = searchParameters.addFacet(attributeName).addFacetRefinement(attributeName, value);
}
if (filter) {
searchParameters = filter(searchParameters);
}
}
return searchParameters;
},
getMetadata: function getMetadata(props, searchState) {
var _this = this;
var id = getId$13(props);
var checked = getCurrentRefinement$11(props, searchState, this.context);
var items = [];
var index = getIndex(this.context);
if (checked) {
items.push({
label: props.label,
currentRefinement: props.label,
attributeName: props.attributeName,
value: function value(nextState) {
return _refine$9(props, nextState, false, _this.context);
}
});
}
return { id: id, index: index, items: items };
}
});
/**
* The `connectStateResults` connector provides a way to access the `searchState` and the `searchResults`
* of InstantSearch.
* For instance this connector allows you to create results/noResults or query/noQuery pages.
* @name connectStateResults
* @kind connector
* @providedPropType {object} searchState - The search state of the instant search component. <br/><br/> See: [Search state structure](https://community.algolia.com/react-instantsearch/guide/Search_state.html)
* @providedPropType {object} searchResults - The search results. <br/><br/> In case of multiple indices: if used under `<Index>`, results will be those of the corresponding index otherwise it'll be those of the root index See: [Search results structure](https://community.algolia.com/algoliasearch-helper-js/reference.html#searchresults)
* @providedPropType {object} allSearchResults - In case of multiple indices you can retrieve all the results
* @providedPropType {string} error - If the search failed, the error will be logged here.
* @providedPropType {boolean} searching - If there is a search in progress.
* @providedPropType {boolean} searchingForFacetValues - If there is a search in a list in progress.
* @providedPropType {object} props - component props.
* @example
* import React from 'react';
*
* import { InstantSearch, Hits } from 'react-instantsearch/dom';
* import { connectStateResults } from 'react-instantsearch/connectors';
*
* const Content = connectStateResults(
* ({ searchState, searchResults }) =>
* searchResults && searchResults.nbHits !== 0
* ? <Hits/>
* : <div>
* No results has been found for {searchState.query}
* </div>
* );
*
* export default function App() {
* return (
* <InstantSearch
* appId="latency"
* apiKey="6be0576ff61c053d5f9a3225e2a90f76"
* indexName="ikea"
* >
* <Content />
* </InstantSearch>
* );
* }
*/
var connectStateResults = createConnector({
displayName: 'AlgoliaStateResults',
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
var results = getResults(searchResults, this.context);
return {
searchState: searchState,
searchResults: results,
allSearchResults: searchResults.results,
searching: searchResults.searching,
error: searchResults.error,
searchingForFacetValues: searchResults.searchingForFacetValues,
props: props
};
}
});
exports.connectConfigure = connectConfigure;
exports.connectCurrentRefinements = connectCurrentRefinements;
exports.connectHierarchicalMenu = connectHierarchicalMenu;
exports.connectHighlight = connectHighlight;
exports.connectHits = connectHits;
exports.connectAutoComplete = connectAutoComplete;
exports.connectHitsPerPage = connectHitsPerPage;
exports.connectInfiniteHits = connectInfiniteHits;
exports.connectMenu = connectMenu;
exports.connectMultiRange = connectMultiRange;
exports.connectPagination = connectPagination;
exports.connectPoweredBy = connectPoweredBy;
exports.connectRange = connectRange;
exports.connectRefinementList = connectRefinementList;
exports.connectScrollTo = connectScrollTo;
exports.connectBreadcrumb = connectBreadcrumb;
exports.connectSearchBox = connectSearchBox;
exports.connectSortBy = connectSortBy;
exports.connectStats = connectStats;
exports.connectToggle = connectToggle;
exports.connectStateResults = connectStateResults;
Object.defineProperty(exports, '__esModule', { value: true });
})));
//# sourceMappingURL=Connectors.js.map
|
apps/phx_web/web/static/js/containers/index.js
|
harmon25/roygbiv_cntrl
|
import React from 'react';
import App from '../components/app';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import { ApolloProvider } from 'react-apollo';
import createStore from '../store'
import client from '../sources/apollo'
const AppContainer = () => (
<MuiThemeProvider>
<ApolloProvider store={createStore()} client={client}>
<App />
</ApolloProvider>
</MuiThemeProvider>
);
export default AppContainer
|
ajax/libs/material-ui/5.0.0-alpha.7/es/BottomNavigation/BottomNavigation.js
|
cdnjs/cdnjs
|
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import * as React from 'react';
import { isFragment } from 'react-is';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import withStyles from '../styles/withStyles';
export const styles = theme => ({
/* Styles applied to the root element. */
root: {
display: 'flex',
justifyContent: 'center',
height: 56,
backgroundColor: theme.palette.background.paper
}
});
const BottomNavigation = /*#__PURE__*/React.forwardRef(function BottomNavigation(props, ref) {
const {
children,
classes,
className,
component: Component = 'div',
onChange,
showLabels = false,
value
} = props,
other = _objectWithoutPropertiesLoose(props, ["children", "classes", "className", "component", "onChange", "showLabels", "value"]);
return /*#__PURE__*/React.createElement(Component, _extends({
className: clsx(classes.root, className),
ref: ref
}, other), React.Children.map(children, (child, childIndex) => {
if (! /*#__PURE__*/React.isValidElement(child)) {
return null;
}
if (process.env.NODE_ENV !== 'production') {
if (isFragment(child)) {
console.error(["Material-UI: The BottomNavigation component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
}
}
const childValue = child.props.value === undefined ? childIndex : child.props.value;
return /*#__PURE__*/React.cloneElement(child, {
selected: childValue === value,
showLabel: child.props.showLabel !== undefined ? child.props.showLabel : showLabels,
value: childValue,
onChange
});
}));
});
process.env.NODE_ENV !== "production" ? BottomNavigation.propTypes = {
// ----------------------------- Warning --------------------------------
// | These PropTypes are generated from the TypeScript type definitions |
// | To update them edit the d.ts file and run "yarn proptypes" |
// ----------------------------------------------------------------------
/**
* The content of the component.
*/
children: PropTypes.node,
/**
* Override or extend the styles applied to the component.
* See [CSS API](#css) below for more details.
*/
classes: PropTypes.object,
/**
* @ignore
*/
className: PropTypes.string,
/**
* The component used for the root node.
* Either a string to use a HTML element or a component.
*/
component: PropTypes.elementType,
/**
* Callback fired when the value changes.
*
* @param {object} event The event source of the callback. **Warning**: This is a generic event not a change event.
* @param {any} value We default to the index of the child.
*/
onChange: PropTypes.func,
/**
* If `true`, all `BottomNavigationAction`s will show their labels.
* By default, only the selected `BottomNavigationAction` will show its label.
*/
showLabels: PropTypes.bool,
/**
* The value of the currently selected `BottomNavigationAction`.
*/
value: PropTypes.any
} : void 0;
export default withStyles(styles, {
name: 'MuiBottomNavigation'
})(BottomNavigation);
|
packages/material-ui-icons/src/RadioButtonUncheckedTwoTone.js
|
kybarg/material-ui
|
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" />
, 'RadioButtonUncheckedTwoTone');
|
ajax/libs/react-native-web/0.0.0-88ea3411/cjs/exports/YellowBox/index.min.js
|
cdnjs/cdnjs
|
"use strict";exports.__esModule=!0,exports.default=void 0;var _react=_interopRequireDefault(require("react")),_UnimplementedView=_interopRequireDefault(require("../../modules/UnimplementedView"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function YellowBox(e){return _react.default.createElement(_UnimplementedView.default,e)}YellowBox.ignoreWarnings=function(){};var _default=YellowBox;exports.default=_default,module.exports=exports.default;
|
src/components/MainHeader/__tests__/user-header-test.js
|
falmar/react-adm-lte
|
jest.unmock('../UserHeader')
import React from 'react'
import {shallow} from 'enzyme'
import UserHeader from '../UserHeader'
const props = {
imageUrl: '',
title: '',
description: ''
}
describe('MainHeader.Navbar.NavbarMenu.User.UserHeader', () => {
it('should have className "user-header"', () => {
const wrapper = shallow(<UserHeader {...props} />)
expect(
wrapper.hasClass('user-header')
).toBeTruthy()
})
it('should have <img> element with className "img-circle" by default', () => {
const wrapper = shallow(<UserHeader {...props} />)
expect(
wrapper.find('img').hasClass('img-circle')
).toBeTruthy()
})
it('should pass the prop imageUrl to <img> element', () => {
const wrapper = shallow(<UserHeader {...props} imageUrl='http://example.com' />)
expect(
wrapper.find('img').prop('src')
).toBe('http://example.com')
})
it('should have <p> element that contains the prop title', () => {
const wrapper = shallow(<UserHeader {...props} title='Alexander Pierce' />)
expect(
wrapper.find('p').contains('Alexander Pierce')
).toBeTruthy()
})
it('should have <small> element that contains the prop description', () => {
const wrapper = shallow(<UserHeader {...props} description='Web Developer' />)
expect(
wrapper.find('small').contains('Web Developer')
).toBeTruthy()
})
})
|
sites/all/libraries/ckeditor/_source/core/command.js
|
briancoffelt/small_town_project
|
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* Creates a command class instance.
* @class Represents a command that can be executed on an editor instance.
* @param {CKEDITOR.editor} editor The editor instance this command will be
* related to.
* @param {CKEDITOR.commandDefinition} commandDefinition The command
* definition.
* @augments CKEDITOR.event
* @example
* var command = new CKEDITOR.command( editor,
* {
* exec : function( editor )
* {
* alert( editor.document.getBody().getHtml() );
* }
* });
*/
CKEDITOR.command = function( editor, commandDefinition )
{
/**
* Lists UI items that are associated to this command. This list can be
* used to interact with the UI on command execution (by the execution code
* itself, for example).
* @type Array
* @example
* alert( 'Number of UI items associated to this command: ' + command.<b>uiItems</b>.length );
*/
this.uiItems = [];
/**
* Executes the command.
* @param {Object} [data] Any data to pass to the command. Depends on the
* command implementation and requirements.
* @returns {Boolean} A boolean indicating that the command has been
* successfully executed.
* @example
* command.<b>exec()</b>; // The command gets executed.
*/
this.exec = function( data )
{
if ( this.state == CKEDITOR.TRISTATE_DISABLED )
return false;
if ( this.editorFocus ) // Give editor focus if necessary (#4355).
editor.focus();
if ( this.fire( 'exec' ) === true )
return true;
return ( commandDefinition.exec.call( this, editor, data ) !== false );
};
/**
* Explicitly update the status of the command, by firing the {@link CKEDITOR.command#event:refresh} event,
* as well as invoke the {@link CKEDITOR.commandDefinition.prototype.refresh} method if defined, this method
* is to allow different parts of the editor code to contribute in command status resolution.
*/
this.refresh = function()
{
if ( this.fire( 'refresh' ) === true )
return true;
return ( commandDefinition.refresh && commandDefinition.refresh.apply( this, arguments ) !== false );
};
CKEDITOR.tools.extend( this, commandDefinition,
// Defaults
/** @lends CKEDITOR.command.prototype */
{
/**
* The editor modes within which the command can be executed. The
* execution will have no action if the current mode is not listed
* in this property.
* @type Object
* @default { wysiwyg : 1 }
* @see CKEDITOR.editor.prototype.mode
* @example
* // Enable the command in both WYSIWYG and Source modes.
* command.<b>modes</b> = { wysiwyg : 1, source : 1 };
* @example
* // Enable the command in Source mode only.
* command.<b>modes</b> = { source : 1 };
*/
modes : { wysiwyg : 1 },
/**
* Indicates that the editor will get the focus before executing
* the command.
* @type Boolean
* @default true
* @example
* // Do not force the editor to have focus when executing the command.
* command.<b>editorFocus</b> = false;
*/
editorFocus : 1,
/**
* Indicates the editor state. Possible values are:
* <ul>
* <li>{@link CKEDITOR.TRISTATE_DISABLED}: the command is
* disabled. It's execution will have no effect. Same as
* {@link disable}.</li>
* <li>{@link CKEDITOR.TRISTATE_ON}: the command is enabled
* and currently active in the editor (for context sensitive commands,
* for example).</li>
* <li>{@link CKEDITOR.TRISTATE_OFF}: the command is enabled
* and currently inactive in the editor (for context sensitive
* commands, for example).</li>
* </ul>
* Do not set this property directly, using the {@link #setState}
* method instead.
* @type Number
* @default {@link CKEDITOR.TRISTATE_OFF}
* @example
* if ( command.<b>state</b> == CKEDITOR.TRISTATE_DISABLED )
* alert( 'This command is disabled' );
*/
state : CKEDITOR.TRISTATE_OFF
});
// Call the CKEDITOR.event constructor to initialize this instance.
CKEDITOR.event.call( this );
};
CKEDITOR.command.prototype =
{
/**
* Enables the command for execution. The command state (see
* {@link CKEDITOR.command.prototype.state}) available before disabling it
* is restored.
* @example
* command.<b>enable()</b>;
* command.exec(); // Execute the command.
*/
enable : function()
{
if ( this.state == CKEDITOR.TRISTATE_DISABLED )
this.setState( ( !this.preserveState || ( typeof this.previousState == 'undefined' ) ) ? CKEDITOR.TRISTATE_OFF : this.previousState );
},
/**
* Disables the command for execution. The command state (see
* {@link CKEDITOR.command.prototype.state}) will be set to
* {@link CKEDITOR.TRISTATE_DISABLED}.
* @example
* command.<b>disable()</b>;
* command.exec(); // "false" - Nothing happens.
*/
disable : function()
{
this.setState( CKEDITOR.TRISTATE_DISABLED );
},
/**
* Sets the command state.
* @param {Number} newState The new state. See {@link #state}.
* @returns {Boolean} Returns "true" if the command state changed.
* @example
* command.<b>setState( CKEDITOR.TRISTATE_ON )</b>;
* command.exec(); // Execute the command.
* command.<b>setState( CKEDITOR.TRISTATE_DISABLED )</b>;
* command.exec(); // "false" - Nothing happens.
* command.<b>setState( CKEDITOR.TRISTATE_OFF )</b>;
* command.exec(); // Execute the command.
*/
setState : function( newState )
{
// Do nothing if there is no state change.
if ( this.state == newState )
return false;
this.previousState = this.state;
// Set the new state.
this.state = newState;
// Fire the "state" event, so other parts of the code can react to the
// change.
this.fire( 'state' );
return true;
},
/**
* Toggles the on/off (active/inactive) state of the command. This is
* mainly used internally by context sensitive commands.
* @example
* command.<b>toggleState()</b>;
*/
toggleState : function()
{
if ( this.state == CKEDITOR.TRISTATE_OFF )
this.setState( CKEDITOR.TRISTATE_ON );
else if ( this.state == CKEDITOR.TRISTATE_ON )
this.setState( CKEDITOR.TRISTATE_OFF );
}
};
CKEDITOR.event.implementOn( CKEDITOR.command.prototype, true );
/**
* Indicates the previous command state.
* @name CKEDITOR.command.prototype.previousState
* @type Number
* @see #state
* @example
* alert( command.<b>previousState</b> );
*/
/**
* Fired when the command state changes.
* @name CKEDITOR.command#state
* @event
* @example
* command.on( <b>'state'</b> , function( e )
* {
* // Alerts the new state.
* alert( this.state );
* });
*/
|
admin/client/App/elemental/Modal/body.js
|
dryna/keystone-twoje-urodziny
|
import React from 'react';
import { css, StyleSheet } from 'aphrodite/no-important';
import theme from '../../../theme';
function ModalBody ({
className,
...props
}) {
return (
<div
className={css(classes.body, className)}
{...props}
/>
);
};
const classes = StyleSheet.create({
body: {
paddingBottom: theme.modal.padding.body.vertical,
paddingLeft: theme.modal.padding.body.horizontal,
paddingRight: theme.modal.padding.body.horizontal,
paddingTop: theme.modal.padding.body.vertical,
},
});
module.exports = ModalBody;
|
billing-ui/src/index.js
|
CancerCollaboratory/billing
|
/*
* Copyright 2016(c) The Ontario Institute for Cancer Research. All rights reserved.
*
* This program and the accompanying materials are made available under the terms of the GNU Public
* License v3.0. You should have received a copy of the GNU General Public License along with this
* program. If not, see <http://www.gnu.org/licenses/>.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import React from 'react';
import ReactDOM from 'react-dom';
import { browserHistory } from 'react-router';
import './index.scss';
import {observe} from 'mobx';
import { AppContainer } from 'react-hot-loader';
import 'whatwg-fetch';
import user from '~/user';
import routes from './routes';
const postLoginRoute = '/';
observe(user, change => {
if (change.name === 'isLoggedIn' && change.oldValue === false && change.newValue === true) {
console.log('user just logged in. redirecting to ', postLoginRoute);
setTimeout(() => browserHistory.push(postLoginRoute));
}
if (change.name === 'isLoggedIn' && change.oldValue === true && change.newValue === false) {
console.log('user logged out. redirecting to /login');
window.location.href = '/login';
}
})
const rootEl = document.getElementById('root');
ReactDOM.render((
<AppContainer>
{routes}
</AppContainer>
), rootEl
);
if (module.hot) {
module.hot.accept('./routes', () => {
// If you use Webpack 2 in ES modules mode, you can
// use <App /> here rather than require() a <NextApp />.
const nextRoutes = require('./routes');
ReactDOM.render(
<AppContainer>
{nextRoutes}
</AppContainer>,
rootEl
);
});
}
|
Code/NoRain.WebMain/assets/global/plugins/fancybox/lib/jquery-1.8.2.min.js
|
DonnotRain/NoRainWeb
|
/*! jQuery v1.8.2 jquery.com | jquery.org/license */
(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d<e;d++)p.event.add(b,c,h[c][d])}g.data&&(g.data=p.extend({},g.data))}function bE(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?(b.parentNode&&(b.outerHTML=a.outerHTML),p.support.html5Clone&&a.innerHTML&&!p.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):c==="input"&&bv.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text),b.removeAttribute(p.expando)}function bF(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bG(a){bv.test(a.type)&&(a.defaultChecked=a.checked)}function bY(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=bW.length;while(e--){b=bW[e]+c;if(b in a)return b}return d}function bZ(a,b){return a=b||a,p.css(a,"display")==="none"||!p.contains(a.ownerDocument,a)}function b$(a,b){var c,d,e=[],f=0,g=a.length;for(;f<g;f++){c=a[f];if(!c.style)continue;e[f]=p._data(c,"olddisplay"),b?(!e[f]&&c.style.display==="none"&&(c.style.display=""),c.style.display===""&&bZ(c)&&(e[f]=p._data(c,"olddisplay",cc(c.nodeName)))):(d=bH(c,"display"),!e[f]&&d!=="none"&&p._data(c,"olddisplay",d))}for(f=0;f<g;f++){c=a[f];if(!c.style)continue;if(!b||c.style.display==="none"||c.style.display==="")c.style.display=b?e[f]||"":"none"}return a}function b_(a,b,c){var d=bP.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function ca(a,b,c,d){var e=c===(d?"border":"content")?4:b==="width"?1:0,f=0;for(;e<4;e+=2)c==="margin"&&(f+=p.css(a,c+bV[e],!0)),d?(c==="content"&&(f-=parseFloat(bH(a,"padding"+bV[e]))||0),c!=="margin"&&(f-=parseFloat(bH(a,"border"+bV[e]+"Width"))||0)):(f+=parseFloat(bH(a,"padding"+bV[e]))||0,c!=="padding"&&(f+=parseFloat(bH(a,"border"+bV[e]+"Width"))||0));return f}function cb(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=!0,f=p.support.boxSizing&&p.css(a,"boxSizing")==="border-box";if(d<=0||d==null){d=bH(a,b);if(d<0||d==null)d=a.style[b];if(bQ.test(d))return d;e=f&&(p.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return d+ca(a,b,c||(f?"border":"content"),e)+"px"}function cc(a){if(bS[a])return bS[a];var b=p("<"+a+">").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write("<!doctype html><html><body>"),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bS[a]=c,c}function ci(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||ce.test(a)?d(a,e):ci(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ci(a+"["+e+"]",b[e],c,d);else d(a,b)}function cz(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h<i;h++)d=g[h],f=/^\+/.test(d),f&&(d=d.substr(1)||"*"),e=a[d]=a[d]||[],e[f?"unshift":"push"](c)}}function cA(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h,i=a[f],j=0,k=i?i.length:0,l=a===cv;for(;j<k&&(l||!h);j++)h=i[j](c,d,e),typeof h=="string"&&(!l||g[h]?h=b:(c.dataTypes.unshift(h),h=cA(a,c,d,e,h,g)));return(l||!h)&&!g["*"]&&(h=cA(a,c,d,e,"*",g)),h}function cB(a,c){var d,e,f=p.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&p.extend(!0,a,e)}function cC(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(f in k)f in d&&(c[k[f]]=d[f]);while(j[0]==="*")j.shift(),e===b&&(e=a.mimeType||c.getResponseHeader("content-type"));if(e)for(f in i)if(i[f]&&i[f].test(e)){j.unshift(f);break}if(j[0]in d)g=j[0];else{for(f in d){if(!j[0]||a.converters[f+" "+j[0]]){g=f;break}h||(h=f)}g=g||h}if(g)return g!==j[0]&&j.unshift(g),d[g]}function cD(a,b){var c,d,e,f,g=a.dataTypes.slice(),h=g[0],i={},j=0;a.dataFilter&&(b=a.dataFilter(b,a.dataType));if(g[1])for(c in a.converters)i[c.toLowerCase()]=a.converters[c];for(;e=g[++j];)if(e!=="*"){if(h!=="*"&&h!==e){c=i[h+" "+e]||i["* "+e];if(!c)for(d in i){f=d.split(" ");if(f[1]===e){c=i[h+" "+f[0]]||i["* "+f[0]];if(c){c===!0?c=i[d]:i[d]!==!0&&(e=f[0],g.splice(j--,0,e));break}}}if(c!==!0)if(c&&a["throws"])b=c(b);else try{b=c(b)}catch(k){return{state:"parsererror",error:c?k:"No conversion from "+h+" to "+e}}}h=e}return{state:"success",data:b}}function cL(){try{return new a.XMLHttpRequest}catch(b){}}function cM(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cU(){return setTimeout(function(){cN=b},0),cN=p.now()}function cV(a,b){p.each(b,function(b,c){var d=(cT[b]||[]).concat(cT["*"]),e=0,f=d.length;for(;e<f;e++)if(d[e].call(a,b,c))return})}function cW(a,b,c){var d,e=0,f=0,g=cS.length,h=p.Deferred().always(function(){delete i.elem}),i=function(){var b=cN||cU(),c=Math.max(0,j.startTime+j.duration-b),d=1-(c/j.duration||0),e=0,f=j.tweens.length;for(;e<f;e++)j.tweens[e].run(d);return h.notifyWith(a,[j,d,c]),d<1&&f?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:p.extend({},b),opts:p.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:cN||cU(),duration:c.duration,tweens:[],createTween:function(b,c,d){var e=p.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(e),e},stop:function(b){var c=0,d=b?j.tweens.length:0;for(;c<d;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;cX(k,j.opts.specialEasing);for(;e<g;e++){d=cS[e].call(j,a,k,j.opts);if(d)return d}return cV(j,k),p.isFunction(j.opts.start)&&j.opts.start.call(a,j),p.fx.timer(p.extend(i,{anim:j,queue:j.opts.queue,elem:a})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function cX(a,b){var c,d,e,f,g;for(c in a){d=p.camelCase(c),e=b[d],f=a[c],p.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=p.cssHooks[d];if(g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}}function cY(a,b,c){var d,e,f,g,h,i,j,k,l=this,m=a.style,n={},o=[],q=a.nodeType&&bZ(a);c.queue||(j=p._queueHooks(a,"fx"),j.unqueued==null&&(j.unqueued=0,k=j.empty.fire,j.empty.fire=function(){j.unqueued||k()}),j.unqueued++,l.always(function(){l.always(function(){j.unqueued--,p.queue(a,"fx").length||j.empty.fire()})})),a.nodeType===1&&("height"in b||"width"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],p.css(a,"display")==="inline"&&p.css(a,"float")==="none"&&(!p.support.inlineBlockNeedsLayout||cc(a.nodeName)==="inline"?m.display="inline-block":m.zoom=1)),c.overflow&&(m.overflow="hidden",p.support.shrinkWrapBlocks||l.done(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b){f=b[d];if(cP.exec(f)){delete b[d];if(f===(q?"hide":"show"))continue;o.push(d)}}g=o.length;if(g){h=p._data(a,"fxshow")||p._data(a,"fxshow",{}),q?p(a).show():l.done(function(){p(a).hide()}),l.done(function(){var b;p.removeData(a,"fxshow",!0);for(b in n)p.style(a,b,n[b])});for(d=0;d<g;d++)e=o[d],i=l.createTween(e,q?h[e]:0),n[e]=h[e]||p.style(a,e),e in h||(h[e]=i.start,q&&(i.end=i.start,i.start=e==="width"||e==="height"?1:0))}}function cZ(a,b,c,d,e){return new cZ.prototype.init(a,b,c,d,e)}function c$(a,b){var c,d={height:a},e=0;b=b?1:0;for(;e<4;e+=2-b)c=bV[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function da(a){return p.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c,d,e=a.document,f=a.location,g=a.navigator,h=a.jQuery,i=a.$,j=Array.prototype.push,k=Array.prototype.slice,l=Array.prototype.indexOf,m=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=String.prototype.trim,p=function(a,b){return new p.fn.init(a,b,c)},q=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,r=/\S/,s=/\s+/,t=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,u=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.2",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i<j;i++)if((a=arguments[i])!=null)for(c in a){d=h[c],e=a[c];if(h===e)continue;k&&e&&(p.isPlainObject(e)||(f=p.isArray(e)))?(f?(f=!1,g=d&&p.isArray(d)?d:[]):g=d&&p.isPlainObject(d)?d:{},h[c]=p.extend(k,g,e)):e!==b&&(h[c]=e)}return h},p.extend({noConflict:function(b){return a.$===p&&(a.$=i),b&&a.jQuery===p&&(a.jQuery=h),p},isReady:!1,readyWait:1,holdReady:function(a){a?p.readyWait++:p.ready(!0)},ready:function(a){if(a===!0?--p.readyWait:p.isReady)return;if(!e.body)return setTimeout(p.ready,1);p.isReady=!0;if(a!==!0&&--p.readyWait>0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f<g;)if(c.apply(a[f++],d)===!1)break}else if(h){for(e in a)if(c.call(a[e],e,a[e])===!1)break}else for(;f<g;)if(c.call(a[f],f,a[f++])===!1)break;return a},trim:o&&!o.call(" ")?function(a){return a==null?"":o.call(a)}:function(a){return a==null?"":(a+"").replace(t,"")},makeArray:function(a,b){var c,d=b||[];return a!=null&&(c=p.type(a),a.length==null||c==="string"||c==="function"||c==="regexp"||p.isWindow(a)?j.call(d,a):p.merge(d,a)),d},inArray:function(a,b,c){var d;if(b){if(l)return l.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=c.length,e=a.length,f=0;if(typeof d=="number")for(;f<d;f++)a[e++]=c[f];else while(c[f]!==b)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;c=!!c;for(;f<g;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,c,d){var e,f,g=[],h=0,i=a.length,j=a instanceof p||i!==b&&typeof i=="number"&&(i>0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h<i;h++)e=c(a[h],h,d),e!=null&&(g[g.length]=e);else for(f in a)e=c(a[f],f,d),e!=null&&(g[g.length]=e);return g.concat.apply([],g)},guid:1,proxy:function(a,c){var d,e,f;return typeof c=="string"&&(d=a[c],c=a,a=d),p.isFunction(a)?(e=k.call(arguments,2),f=function(){return a.apply(c,e.concat(k.call(arguments)))},f.guid=a.guid=a.guid||p.guid++,f):b},access:function(a,c,d,e,f,g,h){var i,j=d==null,k=0,l=a.length;if(d&&typeof d=="object"){for(k in d)p.access(a,c,k,d[k],1,g,e);f=1}else if(e!==b){i=h===b&&p.isFunction(e),j&&(i?(i=c,c=function(a,b,c){return i.call(p(a),c)}):(c.call(a,e),c=null));if(c)for(;k<l;k++)c(a[k],d,i?e.call(a[k],k,c(a[k],d)):e,h);f=1}return f?a:j?c.call(a):l?c(a[0],d):g},now:function(){return(new Date).getTime()}}),p.ready.promise=function(b){if(!d){d=p.Deferred();if(e.readyState==="complete")setTimeout(p.ready,1);else if(e.addEventListener)e.addEventListener("DOMContentLoaded",D,!1),a.addEventListener("load",p.ready,!1);else{e.attachEvent("onreadystatechange",D),a.attachEvent("onload",p.ready);var c=!1;try{c=a.frameElement==null&&e.documentElement}catch(f){}c&&c.doScroll&&function g(){if(!p.isReady){try{c.doScroll("left")}catch(a){return setTimeout(g,50)}p.ready()}}()}}return d.promise(b)},p.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){E["[object "+b+"]"]=b.toLowerCase()}),c=p(e);var F={};p.Callbacks=function(a){a=typeof a=="string"?F[a]||G(a):p.extend({},a);var c,d,e,f,g,h,i=[],j=!a.once&&[],k=function(b){c=a.memory&&b,d=!0,h=f||0,f=0,g=i.length,e=!0;for(;i&&h<g;h++)if(i[h].apply(b[0],b[1])===!1&&a.stopOnFalse){c=!1;break}e=!1,i&&(j?j.length&&k(j.shift()):c?i=[]:l.disable())},l={add:function(){if(i){var b=i.length;(function d(b){p.each(b,function(b,c){var e=p.type(c);e==="function"&&(!a.unique||!l.has(c))?i.push(c):c&&c.length&&e!=="string"&&d(c)})})(arguments),e?g=i.length:c&&(f=b,k(c))}return this},remove:function(){return i&&p.each(arguments,function(a,b){var c;while((c=p.inArray(b,i,c))>-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return a!=null?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b<d;b++)c[b]&&p.isFunction(c[b].promise)?c[b].promise().done(g(b,j,c)).fail(f.reject).progress(g(b,i,h)):--e}return e||f.resolveWith(j,c),f.promise()}}),p.support=function(){var b,c,d,f,g,h,i,j,k,l,m,n=e.createElement("div");n.setAttribute("className","t"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="<div></div>",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||p.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e<f;e++)delete d[b[e]];if(!(c?K:p.isEmptyObject)(d))return}}if(!c){delete h[i].data;if(!K(h[i]))return}g?p.cleanData([a],!0):p.support.deleteExpando||h!=h.window?delete h[i]:h[i]=null},_data:function(a,b,c){return p.data(a,b,c,!0)},acceptData:function(a){var b=a.nodeName&&p.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),p.fn.extend({data:function(a,c){var d,e,f,g,h,i=this[0],j=0,k=null;if(a===b){if(this.length){k=p.data(i);if(i.nodeType===1&&!p._data(i,"parsedAttrs")){f=i.attributes;for(h=f.length;j<h;j++)g=f[j].name,g.indexOf("data-")||(g=p.camelCase(g.substring(5)),J(i,g,k[g]));p._data(i,"parsedAttrs",!0)}}return k}return typeof a=="object"?this.each(function(){p.data(this,a)}):(d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!",p.access(this,function(c){if(c===b)return k=this.triggerHandler("getData"+e,[d[0]]),k===b&&i&&(k=p.data(i,a),k=J(i,a,k)),k===b&&d[1]?this.data(d[0]):k;d[1]=c,this.each(function(){var b=p(this);b.triggerHandler("setData"+e,d),p.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.length,e=c.shift(),f=p._queueHooks(a,b),g=function(){p.dequeue(a,b)};e==="inprogress"&&(e=c.shift(),d--),e&&(b==="fx"&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length<d?p.queue(this[0],a):c===b?this:this.each(function(){var b=p.queue(this,a,c);p._queueHooks(this,a),a==="fx"&&b[0]!=="inprogress"&&p.dequeue(this,a)})},dequeue:function(a){return this.each(function(){p.dequeue(this,a)})},delay:function(a,b){return a=p.fx?p.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=p.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};typeof a!="string"&&(c=a,a=b),a=a||"fx";while(h--)d=p._data(g[h],a+"queueHooks"),d&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var L,M,N,O=/[\t\r\n]/g,P=/\r/g,Q=/^(?:button|input)$/i,R=/^(?:button|input|object|select|textarea)$/i,S=/^a(?:rea|)$/i,T=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,U=p.support.getSetAttribute;p.fn.extend({attr:function(a,b){return p.access(this,p.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{f=" "+e.className+" ";for(g=0,h=b.length;g<h;g++)f.indexOf(" "+b[g]+" ")<0&&(f+=b[g]+" ");e.className=p.trim(f)}}}return this},removeClass:function(a){var c,d,e,f,g,h,i;if(p.isFunction(a))return this.each(function(b){p(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(s);for(h=0,i=this.length;h<i;h++){e=this[h];if(e.nodeType===1&&e.className){d=(" "+e.className+" ").replace(O," ");for(f=0,g=c.length;f<g;f++)while(d.indexOf(" "+c[f]+" ")>=0)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(O," ").indexOf(b)>=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c<d;c++){e=h[c];if(e.selected&&(p.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!p.nodeName(e.parentNode,"optgroup"))){b=p(e).val();if(i)return b;g.push(b)}}return i&&!g.length&&h.length?p(h[f]).val():g},set:function(a,b){var c=p.makeArray(b);return p(a).find("option").each(function(){this.selected=p.inArray(p(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,d+""),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g<d.length;g++)e=d[g],e&&(c=p.propFix[e]||e,f=T.test(e),f||p.attr(a,e,""),a.removeAttribute(U?e:c),f&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(Q.test(a.nodeName)&&a.parentNode)p.error("type property can't be changed");else if(!p.support.radioValue&&b==="radio"&&p.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return L&&p.nodeName(a,"button")?L.get(a,b):b in a?a.value:null},set:function(a,b,c){if(L&&p.nodeName(a,"button"))return L.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(!a||h===3||h===8||h===2)return;return g=h!==1||!p.isXMLDoc(a),g&&(c=p.propFix[c]||c,f=p.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&(e=f.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):R.test(a.nodeName)||S.test(a.nodeName)&&a.href?0:b}}}}),M={get:function(a,c){var d,e=p.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?p.removeAttr(a,c):(d=p.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},U||(N={name:!0,id:!0,coords:!0},L=p.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(N[c]?d.value!=="":d.specified)?d.value:b},set:function(a,b,c){var d=a.getAttributeNode(c);return d||(d=e.createAttribute(c),a.setAttributeNode(d)),d.value=b+""}},p.each(["width","height"],function(a,b){p.attrHooks[b]=p.extend(p.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),p.attrHooks.contenteditable={get:L.get,set:function(a,b,c){b===""&&(b="false"),L.set(a,b,c)}}),p.support.hrefNormalized||p.each(["href","src","width","height"],function(a,c){p.attrHooks[c]=p.extend(p.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),p.support.style||(p.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=b+""}}),p.support.optSelected||(p.propHooks.selected=p.extend(p.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),p.support.enctype||(p.propFix.enctype="encoding"),p.support.checkOn||p.each(["radio","checkbox"],function(){p.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),p.each(["radio","checkbox"],function(){p.valHooks[this]=p.extend(p.valHooks[this],{set:function(a,b){if(p.isArray(b))return a.checked=p.inArray(p(a).val(),b)>=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j<c.length;j++){k=W.exec(c[j])||[],l=k[1],m=(k[2]||"").split(".").sort(),r=p.event.special[l]||{},l=(f?r.delegateType:r.bindType)||l,r=p.event.special[l]||{},n=p.extend({type:l,origType:k[1],data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&p.expr.match.needsContext.test(f),namespace:m.join(".")},o),q=i[l];if(!q){q=i[l]=[],q.delegateCount=0;if(!r.setup||r.setup.call(a,e,m,h)===!1)a.addEventListener?a.addEventListener(l,h,!1):a.attachEvent&&a.attachEvent("on"+l,h)}r.add&&(r.add.call(a,n),n.handler.guid||(n.handler.guid=d.guid)),f?q.splice(q.delegateCount++,0,n):q.push(n),p.event.global[l]=!0}a=null},global:{},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,q,r=p.hasData(a)&&p._data(a);if(!r||!(m=r.events))return;b=p.trim(_(b||"")).split(" ");for(f=0;f<b.length;f++){g=W.exec(b[f])||[],h=i=g[1],j=g[2];if(!h){for(h in m)p.event.remove(a,h+b[f],c,d,!0);continue}n=p.event.special[h]||{},h=(d?n.delegateType:n.bindType)||h,o=m[h]||[],k=o.length,j=j?new RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(l=0;l<o.length;l++)q=o[l],(e||i===q.origType)&&(!c||c.guid===q.guid)&&(!j||j.test(q.namespace))&&(!d||d===q.selector||d==="**"&&q.selector)&&(o.splice(l--,1),q.selector&&o.delegateCount--,n.remove&&n.remove.call(a,q));o.length===0&&k!==o.length&&((!n.teardown||n.teardown.call(a,j,r.handle)===!1)&&p.removeEvent(a,h,r.handle),delete m[h])}p.isEmptyObject(m)&&(delete r.handle,p.removeData(a,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,f,g){if(!f||f.nodeType!==3&&f.nodeType!==8){var h,i,j,k,l,m,n,o,q,r,s=c.type||c,t=[];if($.test(s+p.event.triggered))return;s.indexOf("!")>=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j<q.length&&!c.isPropagationStopped();j++)k=q[j][0],c.type=q[j][1],o=(p._data(k,"events")||{})[c.type]&&p._data(k,"handle"),o&&o.apply(k,d),o=m&&k[m],o&&p.acceptData(k)&&o.apply&&o.apply(k,d)===!1&&c.preventDefault();return c.type=s,!g&&!c.isDefaultPrevented()&&(!n._default||n._default.apply(f.ownerDocument,d)===!1)&&(s!=="click"||!p.nodeName(f,"a"))&&p.acceptData(f)&&m&&f[s]&&(s!=="focus"&&s!=="blur"||c.target.offsetWidth!==0)&&!p.isWindow(f)&&(l=f[m],l&&(f[m]=null),p.event.triggered=s,f[s](),p.event.triggered=b,l&&(f[m]=l)),c.result}return},dispatch:function(c){c=p.event.fix(c||a.event);var d,e,f,g,h,i,j,l,m,n,o=(p._data(this,"events")||{})[c.type]||[],q=o.delegateCount,r=k.call(arguments),s=!c.exclusive&&!c.namespace,t=p.event.special[c.type]||{},u=[];r[0]=c,c.delegateTarget=this;if(t.preDispatch&&t.preDispatch.call(this,c)===!1)return;if(q&&(!c.button||c.type!=="click"))for(f=c.target;f!=this;f=f.parentNode||this)if(f.disabled!==!0||c.type!=="click"){h={},j=[];for(d=0;d<q;d++)l=o[d],m=l.selector,h[m]===b&&(h[m]=l.needsContext?p(m,this).index(f)>=0:p.find(m,this,null,[f]).length),h[m]&&j.push(l);j.length&&u.push({elem:f,matches:j})}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d<u.length&&!c.isPropagationStopped();d++){i=u[d],c.currentTarget=i.elem;for(e=0;e<i.matches.length&&!c.isImmediatePropagationStopped();e++){l=i.matches[e];if(s||!c.namespace&&!l.namespace||c.namespace_re&&c.namespace_re.test(l.namespace))c.data=l.data,c.handleObj=l,g=((p.event.special[l.origType]||{}).handle||l.handler).apply(i.elem,r),g!==b&&(c.result=g,g===!1&&(c.preventDefault(),c.stopPropagation()))}}return t.postDispatch&&t.postDispatch.call(this,c),c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,f,g,h=c.button,i=c.fromElement;return a.pageX==null&&c.clientX!=null&&(d=a.target.ownerDocument||e,f=d.documentElement,g=d.body,a.pageX=c.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?c.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[p.expando])return a;var b,c,d=a,f=p.event.fixHooks[a.type]||{},g=f.props?this.props.concat(f.props):this.props;a=p.Event(d);for(b=g.length;b;)c=g[--b],a[c]=d[c];return a.target||(a.target=d.srcElement||e),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,f.filter?f.filter(a,d):a},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){p.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=p.extend(new p.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?p.event.trigger(e,null,b):p.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},p.event.handle=p.event.dispatch,p.removeEvent=e.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]=="undefined"&&(a[d]=null),a.detachEvent(d,c))},p.Event=function(a,b){if(this instanceof p.Event)a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?bb:ba):this.type=a,b&&p.extend(this,b),this.timeStamp=a&&a.timeStamp||p.now(),this[p.expando]=!0;else return new p.Event(a,b)},p.Event.prototype={preventDefault:function(){this.isDefaultPrevented=bb;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=bb;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()},isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba},p.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){p.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj,g=f.selector;if(!e||e!==d&&!p.contains(d,e))a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b;return c}}}),p.support.submitBubbles||(p.event.special.submit={setup:function(){if(p.nodeName(this,"form"))return!1;p.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=p.nodeName(c,"input")||p.nodeName(c,"button")?c.form:b;d&&!p._data(d,"_submit_attached")&&(p.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),p._data(d,"_submit_attached",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&p.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(p.nodeName(this,"form"))return!1;p.event.remove(this,"._submit")}}),p.support.changeBubbles||(p.event.special.change={setup:function(){if(V.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")p.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),p.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),p.event.simulate("change",this,a,!0)});return!1}p.event.add(this,"beforeactivate._change",function(a){var b=a.target;V.test(b.nodeName)&&!p._data(b,"_change_attached")&&(p.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&p.event.simulate("change",this.parentNode,a,!0)}),p._data(b,"_change_attached",!0))})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return p.event.remove(this,"._change"),!V.test(this.nodeName)}}),p.support.focusinBubbles||p.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){p.event.simulate(b,a.target,p.event.fix(a),!0)};p.event.special[b]={setup:function(){c++===0&&e.addEventListener(a,d,!0)},teardown:function(){--c===0&&e.removeEventListener(a,d,!0)}}}),p.fn.extend({on:function(a,c,d,e,f){var g,h;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(h in a)this.on(h,c,d,a[h],f);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=ba;else if(!e)return this;return f===1&&(g=e,e=function(a){return p().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=p.guid++)),this.each(function(){p.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,p(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if(typeof a=="object"){for(f in a)this.off(f,c,a[f]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=ba),this.each(function(){p.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return p(this.context).on(a,this.selector,b,c),this},die:function(a,b){return p(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length===1?this.off(a,"**"):this.off(b,a||"**",c)},trigger:function(a,b){return this.each(function(){p.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return p.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||p.guid++,d=0,e=function(c){var e=(p._data(this,"lastToggle"+a.guid)||0)%d;return p._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),p.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){p.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bc(a,b,c,d){c=c||[],b=b||r;var e,f,i,j,k=b.nodeType;if(!a||typeof a!="string")return c;if(k!==1&&k!==9)return[];i=g(b);if(!i&&!d)if(e=P.exec(a))if(j=e[1]){if(k===9){f=b.getElementById(j);if(!f||!f.parentNode)return c;if(f.id===j)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(j))&&h(b,f)&&f.id===j)return c.push(f),c}else{if(e[2])return w.apply(c,x.call(b.getElementsByTagName(a),0)),c;if((j=e[3])&&_&&b.getElementsByClassName)return w.apply(c,x.call(b.getElementsByClassName(j),0)),c}return bp(a.replace(L,"$1"),b,c,d,i)}function bd(a){return function(b){var c=b.nodeName.toLowerCase();return c==="input"&&b.type===a}}function be(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}}function bf(a){return z(function(b){return b=+b,z(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function bg(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}function bh(a,b){var c,d,f,g,h,i,j,k=C[o][a];if(k)return b?0:k.slice(0);h=a,i=[],j=e.preFilter;while(h){if(!c||(d=M.exec(h)))d&&(h=h.slice(d[0].length)),i.push(f=[]);c=!1;if(d=N.exec(h))f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=d[0].replace(L," ");for(g in e.filter)(d=W[g].exec(h))&&(!j[g]||(d=j[g](d,r,!0)))&&(f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=g,c.matches=d);if(!c)break}return b?h.length:h?bc.error(a):C(a,i).slice(0)}function bi(a,b,d){var e=b.dir,f=d&&b.dir==="parentNode",g=u++;return b.first?function(b,c,d){while(b=b[e])if(f||b.nodeType===1)return a(b,c,d)}:function(b,d,h){if(!h){var i,j=t+" "+g+" ",k=j+c;while(b=b[e])if(f||b.nodeType===1){if((i=b[o])===k)return b.sizset;if(typeof i=="string"&&i.indexOf(j)===0){if(b.sizset)return b}else{b[o]=k;if(a(b,d,h))return b.sizset=!0,b;b.sizset=!1}}}else while(b=b[e])if(f||b.nodeType===1)if(a(b,d,h))return b}}function bj(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function bk(a,b,c,d,e){var f,g=[],h=0,i=a.length,j=b!=null;for(;h<i;h++)if(f=a[h])if(!c||c(f,d,e))g.push(f),j&&b.push(h);return g}function bl(a,b,c,d,e,f){return d&&!d[o]&&(d=bl(d)),e&&!e[o]&&(e=bl(e,f)),z(function(f,g,h,i){if(f&&e)return;var j,k,l,m=[],n=[],o=g.length,p=f||bo(b||"*",h.nodeType?[h]:h,[],f),q=a&&(f||!b)?bk(p,m,a,h,i):p,r=c?e||(f?a:o||d)?[]:g:q;c&&c(q,r,h,i);if(d){l=bk(r,n),d(l,[],h,i),j=l.length;while(j--)if(k=l[j])r[n[j]]=!(q[n[j]]=k)}if(f){j=a&&r.length;while(j--)if(k=r[j])f[m[j]]=!(g[m[j]]=k)}else r=bk(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):w.apply(g,r)})}function bm(a){var b,c,d,f=a.length,g=e.relative[a[0].type],h=g||e.relative[" "],i=g?1:0,j=bi(function(a){return a===b},h,!0),k=bi(function(a){return y.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==l)||((b=c).nodeType?j(a,c,d):k(a,c,d))}];for(;i<f;i++)if(c=e.relative[a[i].type])m=[bi(bj(m),c)];else{c=e.filter[a[i].type].apply(null,a[i].matches);if(c[o]){d=++i;for(;d<f;d++)if(e.relative[a[d].type])break;return bl(i>1&&bj(m),i>1&&a.slice(0,i-1).join("").replace(L,"$1"),c,i<d&&bm(a.slice(i,d)),d<f&&bm(a=a.slice(d)),d<f&&a.join(""))}m.push(c)}return bj(m)}function bn(a,b){var d=b.length>0,f=a.length>0,g=function(h,i,j,k,m){var n,o,p,q=[],s=0,u="0",x=h&&[],y=m!=null,z=l,A=h||f&&e.find.TAG("*",m&&i.parentNode||i),B=t+=z==null?1:Math.E;y&&(l=i!==r&&i,c=g.el);for(;(n=A[u])!=null;u++){if(f&&n){for(o=0;p=a[o];o++)if(p(n,i,j)){k.push(n);break}y&&(t=B,c=++g.el)}d&&((n=!p&&n)&&s--,h&&x.push(n))}s+=u;if(d&&u!==s){for(o=0;p=b[o];o++)p(x,q,i,j);if(h){if(s>0)while(u--)!x[u]&&!q[u]&&(q[u]=v.call(k));q=bk(q)}w.apply(k,q),y&&!h&&q.length>0&&s+b.length>1&&bc.uniqueSort(k)}return y&&(t=B,l=z),x};return g.el=0,d?z(g):g}function bo(a,b,c,d){var e=0,f=b.length;for(;e<f;e++)bc(a,b[e],c,d);return c}function bp(a,b,c,d,f){var g,h,j,k,l,m=bh(a),n=m.length;if(!d&&m.length===1){h=m[0]=m[0].slice(0);if(h.length>2&&(j=h[0]).type==="ID"&&b.nodeType===9&&!f&&e.relative[h[1].type]){b=e.find.ID(j.matches[0].replace(V,""),b,f)[0];if(!b)return c;a=a.slice(h.shift().length)}for(g=W.POS.test(a)?-1:h.length-1;g>=0;g--){j=h[g];if(e.relative[k=j.type])break;if(l=e.find[k])if(d=l(j.matches[0].replace(V,""),R.test(h[0].type)&&b.parentNode||b,f)){h.splice(g,1),a=d.length&&h.join("");if(!a)return w.apply(c,x.call(d,0)),c;break}}}return i(a,m)(d,b,f,c,R.test(a)),c}function bq(){}var c,d,e,f,g,h,i,j,k,l,m=!0,n="undefined",o=("sizcache"+Math.random()).replace(".",""),q=String,r=a.document,s=r.documentElement,t=0,u=0,v=[].pop,w=[].push,x=[].slice,y=[].indexOf||function(a){var b=0,c=this.length;for(;b<c;b++)if(this[b]===a)return b;return-1},z=function(a,b){return a[o]=b==null||b,a},A=function(){var a={},b=[];return z(function(c,d){return b.push(c)>e.cacheLength&&delete a[b.shift()],a[c]=d},a)},B=A(),C=A(),D=A(),E="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",G=F.replace("w","w#"),H="([*^$|!~]?=)",I="\\["+E+"*("+F+")"+E+"*(?:"+H+E+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+G+")|)|)"+E+"*\\]",J=":("+F+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+I+")|[^:]|\\\\.)*|.*))\\)|)",K=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+E+"*((?:-\\d)?\\d*)"+E+"*\\)|)(?=[^-]|$)",L=new RegExp("^"+E+"+|((?:^|[^\\\\])(?:\\\\.)*)"+E+"+$","g"),M=new RegExp("^"+E+"*,"+E+"*"),N=new RegExp("^"+E+"*([\\x20\\t\\r\\n\\f>+~])"+E+"*"),O=new RegExp(J),P=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,Q=/^:not/,R=/[\x20\t\r\n\f]*[+~]/,S=/:not\($/,T=/h\d/i,U=/input|select|textarea|button/i,V=/\\(?!\\)/g,W={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),NAME:new RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:new RegExp("^("+F.replace("w","w*")+")"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+J),POS:new RegExp(K,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+E+"*(even|odd|(([+-]|)(\\d*)n|)"+E+"*(?:([+-]|)"+E+"*(\\d+)|))"+E+"*\\)|)","i"),needsContext:new RegExp("^"+E+"*[>+~]|"+K,"i")},X=function(a){var b=r.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}},Y=X(function(a){return a.appendChild(r.createComment("")),!a.getElementsByTagName("*").length}),Z=X(function(a){return a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!==n&&a.firstChild.getAttribute("href")==="#"}),$=X(function(a){a.innerHTML="<select></select>";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),_=X(function(a){return a.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!a.getElementsByClassName||!a.getElementsByClassName("e").length?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length===2)}),ba=X(function(a){a.id=o+0,a.innerHTML="<a name='"+o+"'></a><div name='"+o+"'></div>",s.insertBefore(a,s.firstChild);var b=r.getElementsByName&&r.getElementsByName(o).length===2+r.getElementsByName(o+0).length;return d=!r.getElementById(o),s.removeChild(a),b});try{x.call(s.childNodes,0)[0].nodeType}catch(bb){x=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}bc.matches=function(a,b){return bc(a,null,null,b)},bc.matchesSelector=function(a,b){return bc(b,null,null,[a]).length>0},f=bc.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=f(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=f(b);return c},g=bc.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},h=bc.contains=s.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:s.compareDocumentPosition?function(a,b){return b&&!!(a.compareDocumentPosition(b)&16)}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc.attr=function(a,b){var c,d=g(a);return d||(b=b.toLowerCase()),(c=e.attrHandle[b])?c(a):d||$?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},e=bc.selectors={cacheLength:50,createPseudo:z,match:W,attrHandle:Z?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},find:{ID:d?function(a,b,c){if(typeof b.getElementById!==n&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==n&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==n&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:Y?function(a,b){if(typeof b.getElementsByTagName!==n)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c},NAME:ba&&function(a,b){if(typeof b.getElementsByName!==n)return b.getElementsByName(name)},CLASS:_&&function(a,b,c){if(typeof b.getElementsByClassName!==n&&!c)return b.getElementsByClassName(a)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(V,""),a[3]=(a[4]||a[5]||"").replace(V,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||bc.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&bc.error(a[0]),a},PSEUDO:function(a){var b,c;if(W.CHILD.test(a[0]))return null;if(a[3])a[2]=a[3];else if(b=a[4])O.test(b)&&(c=bh(b,!0))&&(c=b.indexOf(")",b.length-c)-b.length)&&(b=b.slice(0,c),a[0]=a[0].slice(0,c)),a[2]=b;return a.slice(0,3)}},filter:{ID:d?function(a){return a=a.replace(V,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(V,""),function(b){var c=typeof b.getAttributeNode!==n&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(V,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=B[o][a];return b||(b=B(a,new RegExp("(^|"+E+")"+a+"("+E+"|$)"))),function(a){return b.test(a.className||typeof a.getAttribute!==n&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return function(d,e){var f=bc.attr(d,a);return f==null?b==="!=":b?(f+="",b==="="?f===c:b==="!="?f!==c:b==="^="?c&&f.indexOf(c)===0:b==="*="?c&&f.indexOf(c)>-1:b==="$="?c&&f.substr(f.length-c.length)===c:b==="~="?(" "+f+" ").indexOf(c)>-1:b==="|="?f===c||f.substr(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d){return a==="nth"?function(a){var b,e,f=a.parentNode;if(c===1&&d===0)return!0;if(f){e=0;for(b=f.firstChild;b;b=b.nextSibling)if(b.nodeType===1){e++;if(a===b)break}}return e-=d,e===c||e%c===0&&e/c>=0}:function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b){var c,d=e.pseudos[a]||e.setFilters[a.toLowerCase()]||bc.error("unsupported pseudo: "+a);return d[o]?d(b):d.length>1?(c=[a,a,"",b],e.setFilters.hasOwnProperty(a.toLowerCase())?z(function(a,c){var e,f=d(a,b),g=f.length;while(g--)e=y.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:z(function(a){var b=[],c=[],d=i(a.replace(L,"$1"));return d[o]?z(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)if(f=g[h])a[h]=!(b[h]=f)}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:z(function(a){return function(b){return bc(a,b).length>0}}),contains:z(function(a){return function(b){return(b.textContent||b.innerText||f(b)).indexOf(a)>-1}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!e.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},header:function(a){return T.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:bd("radio"),checkbox:bd("checkbox"),file:bd("file"),password:bd("password"),image:bd("image"),submit:be("submit"),reset:be("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return U.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement},first:bf(function(a,b,c){return[0]}),last:bf(function(a,b,c){return[b-1]}),eq:bf(function(a,b,c){return[c<0?c+b:c]}),even:bf(function(a,b,c){for(var d=0;d<b;d+=2)a.push(d);return a}),odd:bf(function(a,b,c){for(var d=1;d<b;d+=2)a.push(d);return a}),lt:bf(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:bf(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},j=s.compareDocumentPosition?function(a,b){return a===b?(k=!0,0):(!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition:a.compareDocumentPosition(b)&4)?-1:1}:function(a,b){if(a===b)return k=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,h=b.parentNode,i=g;if(g===h)return bg(a,b);if(!g)return-1;if(!h)return 1;while(i)e.unshift(i),i=i.parentNode;i=h;while(i)f.unshift(i),i=i.parentNode;c=e.length,d=f.length;for(var j=0;j<c&&j<d;j++)if(e[j]!==f[j])return bg(e[j],f[j]);return j===c?bg(a,f[j],-1):bg(e[j],b,1)},[0,0].sort(j),m=!k,bc.uniqueSort=function(a){var b,c=1;k=m,a.sort(j);if(k)for(;b=a[c];c++)b===a[c-1]&&a.splice(c--,1);return a},bc.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},i=bc.compile=function(a,b){var c,d=[],e=[],f=D[o][a];if(!f){b||(b=bh(a)),c=b.length;while(c--)f=bm(b[c]),f[o]?d.push(f):e.push(f);f=D(a,bn(e,d))}return f},r.querySelectorAll&&function(){var a,b=bp,c=/'|\\/g,d=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,e=[":focus"],f=[":active",":focus"],h=s.matchesSelector||s.mozMatchesSelector||s.webkitMatchesSelector||s.oMatchesSelector||s.msMatchesSelector;X(function(a){a.innerHTML="<select><option selected=''></option></select>",a.querySelectorAll("[selected]").length||e.push("\\["+E+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),X(function(a){a.innerHTML="<p test=''></p>",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+E+"*(?:\"\"|'')"),a.innerHTML="<input type='hidden'/>",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=new RegExp(e.join("|")),bp=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a))){var i,j,k=!0,l=o,m=d,n=d.nodeType===9&&a;if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){i=bh(a),(k=d.getAttribute("id"))?l=k.replace(c,"\\$&"):d.setAttribute("id",l),l="[id='"+l+"'] ",j=i.length;while(j--)i[j]=l+i[j].join("");m=R.test(a)&&d.parentNode||d,n=i.join(",")}if(n)try{return w.apply(f,x.call(m.querySelectorAll(n),0)),f}catch(p){}finally{k||d.removeAttribute("id")}}return b(a,d,f,g,h)},h&&(X(function(b){a=h.call(b,"div");try{h.call(b,"[test!='']:sizzle"),f.push("!=",J)}catch(c){}}),f=new RegExp(f.join("|")),bc.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!g(b)&&!f.test(c)&&(!e||!e.test(c)))try{var i=h.call(b,c);if(i||a||b.document&&b.document.nodeType!==11)return i}catch(j){}return bc(c,null,null,[b]).length>0})}(),e.pseudos.nth=e.pseudos.eq,e.filters=bq.prototype=e.pseudos,e.setFilters=new bq,bc.attr=p.attr,p.find=bc,p.expr=bc.selectors,p.expr[":"]=p.expr.pseudos,p.unique=bc.uniqueSort,p.text=bc.getText,p.isXMLDoc=bc.isXML,p.contains=bc.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b<c;b++)if(p.contains(h[b],this))return!0});g=this.pushStack("","find",a);for(b=0,c=this.length;b<c;b++){d=g.length,p.find(a,this[b],g);if(b>0)for(e=d;e<g.length;e++)for(f=0;f<d;f++)if(g[f]===g[e]){g.splice(e--,1);break}}return g},has:function(a){var b,c=p(a,this),d=c.length;return this.filter(function(){for(b=0;b<d;b++)if(p.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(bj(this,a,!1),"not",a)},filter:function(a){return this.pushStack(bj(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?bf.test(a)?p(a,this.context).index(this[0])>=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d<e;d++){c=this[d];while(c&&c.ownerDocument&&c!==b&&c.nodeType!==11){if(g?g.index(c)>-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/<tbody/i,br=/<|&#?\w+;/,bs=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,bu=new RegExp("<(?:"+bl+")[\\s/>]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,bz={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X<div>","</div>"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){return bh(this[0])?this.length?this.pushStack(p(p.isFunction(a)?a():a),"replaceWith",a):this:p.isFunction(a)?this.each(function(b){var c=p(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=p(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;p(this).remove(),b?p(b).before(a):p(c).append(a)}))},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){a=[].concat.apply([],a);var e,f,g,h,i=0,j=a[0],k=[],l=this.length;if(!p.support.checkClone&&l>1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i<l;i++)d.call(c&&p.nodeName(this[i],"table")?bC(this[i],"tbody"):this[i],i===h?g:p.clone(g,!0,!0))}g=f=null,k.length&&p.each(k,function(a,b){b.src?p.ajax?p.ajax({url:b.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):p.error("no ajax"):p.globalEval((b.text||b.textContent||b.innerHTML||"").replace(by,"")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),p.buildFragment=function(a,c,d){var f,g,h,i=a[0];return c=c||e,c=!c.nodeType&&c[0]||c,c=c.ownerDocument||c,a.length===1&&typeof i=="string"&&i.length<512&&c===e&&i.charAt(0)==="<"&&!bt.test(i)&&(p.support.checkClone||!bw.test(i))&&(p.support.html5Clone||!bu.test(i))&&(g=!0,f=p.fragments[i],h=f!==b),f||(f=c.createDocumentFragment(),p.clean(a,c,f,d),g&&(p.fragments[i]=h&&f)),{fragment:f,cacheable:g}},p.fragments={},p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){p.fn[a]=function(c){var d,e=0,f=[],g=p(c),h=g.length,i=this.length===1&&this[0].parentNode;if((i==null||i&&i.nodeType===11&&i.childNodes.length===1)&&h===1)return g[b](this[0]),this;for(;e<h;e++)d=(e>0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=b===e&&bA,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(f=0;(h=a[f])!=null;f++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{s=s||bk(b),l=b.createElement("div"),s.appendChild(l),h=h.replace(bo,"<$1></$2>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]==="<table>"&&!m?l.childNodes:[];for(g=n.length-1;g>=0;--g)p.nodeName(n[g],"tbody")&&!n[g].childNodes.length&&n[g].parentNode.removeChild(n[g])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l.parentNode.removeChild(l)}h.nodeType?t.push(h):p.merge(t,h)}l&&(h=l=s=null);if(!p.support.appendChecked)for(f=0;(h=t[f])!=null;f++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(f=0;(h=t[f])!=null;f++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[f+1,0].concat(r)),f+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.chrome?b.webkit=!0:b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^(none|table(?!-c[ea]).+)/,bO=/^margin/,bP=new RegExp("^("+q+")(.*)$","i"),bQ=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bR=new RegExp("^([-+])=("+q+")","i"),bS={},bT={position:"absolute",visibility:"hidden",display:"block"},bU={letterSpacing:0,fontWeight:400},bV=["Top","Right","Bottom","Left"],bW=["Webkit","O","Moz","ms"],bX=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return b$(this,!0)},hide:function(){return b$(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bX.apply(this,arguments):this.each(function(){(c?a:bZ(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bY(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bR.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bY(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bU&&(f=bU[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(b,c){var d,e,f,g,h=a.getComputedStyle(b,null),i=b.style;return h&&(d=h[c],d===""&&!p.contains(b.ownerDocument,b)&&(d=p.style(b,c)),bQ.test(d)&&bO.test(c)&&(e=i.width,f=i.minWidth,g=i.maxWidth,i.minWidth=i.maxWidth=i.width=d,d=h.width,i.width=e,i.minWidth=f,i.maxWidth=g)),d}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bQ.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth===0&&bN.test(bH(a,"display"))?p.swap(a,bT,function(){return cb(a,b,d)}):cb(a,b,d)},set:function(a,c,d){return b_(a,c,d?ca(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bQ.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bV[d]+b]=e[d]||e[d-2]||e[0];return f}},bO.test(a)||(p.cssHooks[a+b].set=b_)});var cd=/%20/g,ce=/\[\]$/,cf=/\r?\n/g,cg=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ch=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ch.test(this.nodeName)||cg.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(cf,"\r\n")}}):{name:b.name,value:c.replace(cf,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ci(d,a[d],c,f);return e.join("&").replace(cd,"+")};var cj,ck,cl=/#.*$/,cm=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,co=/^(?:GET|HEAD)$/,cp=/^\/\//,cq=/\?/,cr=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,cs=/([?&])_=[^&]*/,ct=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,cu=p.fn.load,cv={},cw={},cx=["*/"]+["*"];try{ck=f.href}catch(cy){ck=e.createElement("a"),ck.href="",ck=ck.href}cj=ct.exec(ck.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&cu)return cu.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):c&&typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("<div>").append(a.replace(cr,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cB(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cB(a,b),a},ajaxSettings:{url:ck,isLocal:cn.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cx},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cz(cv),ajaxTransport:cz(cw),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cC(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cD(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=(c||y)+"",k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cm.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(cl,"").replace(cp,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=ct.exec(l.url.toLowerCase())||!1,l.crossDomain=i&&i.join(":")+(i[3]?"":i[1]==="http:"?80:443)!==cj.join(":")+(cj[3]?"":cj[1]==="http:"?80:443)),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cA(cv,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!co.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cq.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cs,"$1_="+z);l.url=A+(A===l.url?(cq.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cx+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cA(cw,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cE=[],cF=/\?/,cG=/(=)\?(?=&|$)|\?\?/,cH=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cE.pop()||p.expando+"_"+cH++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cG.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cG.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cG,"$1"+f):m?c.data=i.replace(cG,"$1"+f):k&&(c.url+=(cF.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cE.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cI,cJ=a.ActiveXObject?function(){for(var a in cI)cI[a](0,1)}:!1,cK=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cL()||cM()}:cL,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cJ&&delete cI[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cK,cJ&&(cI||(cI={},p(a).unload(cJ)),cI[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cN,cO,cP=/^(?:toggle|show|hide)$/,cQ=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cR=/queueHooks$/,cS=[cY],cT={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=cQ.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){c=+f[2],d=f[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&h){h=p.css(e.elem,a,!0)||c||1;do i=i||".5",h=h/i,p.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&i!==1&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};p.Animation=p.extend(cW,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d<e;d++)c=a[d],cT[c]=cT[c]||[],cT[c].unshift(b)},prefilter:function(a,b){b?cS.unshift(a):cS.push(a)}}),p.Tween=cZ,cZ.prototype={constructor:cZ,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(p.cssNumber[c]?"":"px")},cur:function(){var a=cZ.propHooks[this.prop];return a&&a.get?a.get(this):cZ.propHooks._default.get(this)},run:function(a){var b,c=cZ.propHooks[this.prop];return this.options.duration?this.pos=b=p.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):cZ.propHooks._default.set(this),this}},cZ.prototype.init.prototype=cZ.prototype,cZ.propHooks={_default:{get:function(a){var b;return a.elem[a.prop]==null||!!a.elem.style&&a.elem.style[a.prop]!=null?(b=p.css(a.elem,a.prop,!1,""),!b||b==="auto"?0:b):a.elem[a.prop]},set:function(a){p.fx.step[a.prop]?p.fx.step[a.prop](a):a.elem.style&&(a.elem.style[p.cssProps[a.prop]]!=null||p.cssHooks[a.prop])?p.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},cZ.propHooks.scrollTop=cZ.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},p.each(["toggle","show","hide"],function(a,b){var c=p.fn[b];p.fn[b]=function(d,e,f){return d==null||typeof d=="boolean"||!a&&p.isFunction(d)&&p.isFunction(e)?c.apply(this,arguments):this.animate(c$(b,!0),d,e,f)}}),p.fn.extend({fadeTo:function(a,b,c,d){return this.filter(bZ).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=p.isEmptyObject(a),f=p.speed(b,c,d),g=function(){var b=cW(this,p.extend({},a),f);e&&b.stop(!0)};return e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=a!=null&&a+"queueHooks",f=p.timers,g=p._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&cR.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem===this&&(a==null||f[c].queue===a)&&(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&p.dequeue(this,a)})}}),p.each({slideDown:c$("show"),slideUp:c$("hide"),slideToggle:c$("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){p.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),p.speed=function(a,b,c){var d=a&&typeof a=="object"?p.extend({},a):{complete:c||!c&&b||p.isFunction(a)&&a,duration:a,easing:c&&b||b&&!p.isFunction(b)&&b};d.duration=p.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in p.fx.speeds?p.fx.speeds[d.duration]:p.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";return d.old=d.complete,d.complete=function(){p.isFunction(d.old)&&d.old.call(this),d.queue&&p.dequeue(this,d.queue)},d},p.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},p.timers=[],p.fx=cZ.prototype.init,p.fx.tick=function(){var a,b=p.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||p.fx.stop()},p.fx.timer=function(a){a()&&p.timers.push(a)&&!cO&&(cO=setInterval(p.fx.tick,p.fx.interval))},p.fx.interval=13,p.fx.stop=function(){clearInterval(cO),cO=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fx.step={},p.expr&&p.expr.filters&&(p.expr.filters.animated=function(a){return p.grep(p.timers,function(b){return a===b.elem}).length});var c_=/^(?:body|html)$/i;p.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){p.offset.setOffset(this,a,b)});var c,d,e,f,g,h,i,j={top:0,left:0},k=this[0],l=k&&k.ownerDocument;if(!l)return;return(d=l.body)===k?p.offset.bodyOffset(k):(c=l.documentElement,p.contains(c,k)?(typeof k.getBoundingClientRect!="undefined"&&(j=k.getBoundingClientRect()),e=da(l),f=c.clientTop||d.clientTop||0,g=c.clientLeft||d.clientLeft||0,h=e.pageYOffset||c.scrollTop,i=e.pageXOffset||c.scrollLeft,{top:j.top+h-f,left:j.left+i-g}):j)},p.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return p.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(p.css(a,"marginTop"))||0,c+=parseFloat(p.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=p.css(a,"position");d==="static"&&(a.style.position="relative");var e=p(a),f=e.offset(),g=p.css(a,"top"),h=p.css(a,"left"),i=(d==="absolute"||d==="fixed")&&p.inArray("auto",[g,h])>-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c_.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c_.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=da(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window);
|
src/containers/editorialWorkflow/EntryPageHOC.js
|
radekzz/netlify-cms-test
|
import React from 'react';
import { connect } from 'react-redux';
import { EDITORIAL_WORKFLOW } from '../../constants/publishModes';
import { selectUnpublishedEntry, selectEntry } from '../../reducers';
import { loadUnpublishedEntry, persistUnpublishedEntry } from '../../actions/editorialWorkflow';
export default function EntryPageHOC(EntryPage) {
class EntryPageHOC extends React.Component {
render() {
return <EntryPage {...this.props} />;
}
}
function mapStateToProps(state, ownProps) {
const { collections } = state;
const isEditorialWorkflow = (state.config.get('publish_mode') === EDITORIAL_WORKFLOW);
const returnObj = { isEditorialWorkflow };
if (isEditorialWorkflow) {
const slug = ownProps.params.slug;
const collection = collections.get(ownProps.params.name);
const unpublishedEntry = selectUnpublishedEntry(state, collection.get('name'), slug);
if (unpublishedEntry) {
returnObj.unpublishedEntry = true;
returnObj.entry = unpublishedEntry;
}
}
return returnObj;
}
function mergeProps(stateProps, dispatchProps, ownProps) {
const { isEditorialWorkflow, unpublishedEntry } = stateProps;
const { dispatch } = dispatchProps;
const returnObj = {};
if (isEditorialWorkflow) {
// Overwrite loadEntry to loadUnpublishedEntry
returnObj.loadEntry = (collection, slug) => {
dispatch(loadUnpublishedEntry(collection, slug));
};
// Overwrite persistEntry to persistUnpublishedEntry
returnObj.persistEntry = (collection) => {
dispatch(persistUnpublishedEntry(collection, unpublishedEntry));
};
}
return {
...ownProps,
...stateProps,
...returnObj,
};
}
return connect(mapStateToProps, null, mergeProps)(EntryPageHOC);
}
|
console/react/src/details/entityListTable.js
|
mgoulish/qpid-dispatch
|
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
import React from "react";
import {
sortable,
SortByDirection,
Table,
TableHeader,
TableBody,
TableVariant
} from "@patternfly/react-table";
import { Button, Pagination } from "@patternfly/react-core";
import { Redirect } from "react-router-dom";
import TableToolbar from "../common/tableToolbar";
import { dataMap, defaultData } from "./entityData";
import EmptyTable from "./emptyTablePage";
// If the breadcrumb on the detailsTablePage was used to return to this page,
// we will have saved state info in props.location.state
const propFromLocation = (props, which, defaultValue) => {
return props && props.detailsState && typeof props.detailsState[which] !== "undefined"
? props.detailsState[which]
: defaultValue;
};
class EntityListTable extends React.Component {
constructor(props) {
super(props);
this.state = {
sortBy: propFromLocation(props, "sortBy", {
index: 0,
direction: SortByDirection.asc
}),
filterBy: propFromLocation(props, "filterBy", {}),
perPage: propFromLocation(props, "perPage", 10),
total: 1,
page: propFromLocation(props, "page", 1),
allRows: [],
rows: [],
redirect: false,
redirectState: {},
action: null,
data: null
};
this.initDataSource();
this.columns = [];
}
componentDidMount = () => {
this.mounted = true;
this.setupFields();
this.timer = setInterval(this.update, 5000);
};
componentDidUpdate = prevProps => {
if (
prevProps.entity !== this.props.entity ||
prevProps.routerId !== this.props.routerId
) {
this.setupFields();
}
};
componentWillUnmount = () => {
this.mounted = false;
clearInterval(this.timer);
};
initDataSource = () => {
this.dataSource = dataMap[this.props.entity]
? new dataMap[this.props.entity](this.props.service, this.props.schema)
: new defaultData(this.props.service, this.props.schema);
this.dataSource.fields = [{ title: "Name", field: "name" }];
if (this.dataSource.typeFormatter) {
this.dataSource.fields.push({
title: "Type",
field: "type",
formatter: this.dataSource.typeFormatter
});
}
if (this.dataSource.extraFields) {
this.dataSource.fields.push(...this.dataSource.extraFields);
}
if (this.dataSource.actionColumn) {
this.dataSource.fields.push(this.dataSource.actionColumn);
}
};
setupFields = () => {
this.initDataSource();
this.columns = [];
// initialize the columns and get the data
this.dataSource.fields.forEach(f => {
f.transforms = [];
f.cellFormatters = [];
if (!f.noSort) f.transforms.push(sortable);
if (f.numeric) {
f.cellFormatters.push(this.prettier);
}
if (f.noWrap) {
f.cellFormatters.push(this.noWrap);
}
if (f.formatter) {
f.cellFormatters.push((value, extraInfo) =>
this.formatter(f.formatter, value, extraInfo)
);
}
});
// if the dataSource did not provide its own cell formatter for details
if (!this.dataSource.detailFormatter) {
this.dataSource.fields[0].cellFormatters.push(this.detailLink);
}
this.columns = this.dataSource.fields;
this.update();
};
update = () => {
if (this.props.entity && this.props.routerId) {
this.fetch(this.state.page, this.state.perPage);
}
};
fetch = (page, perPage) => {
// get the data. Note: The current page number might change if
// the number of rows is less than before
const routerId = this.props.routerId;
const entity = this.props.entity;
this.dataSource.doFetch(page, perPage, routerId, entity).then(results => {
const sliced = this.slice(results.data, results.page, results.perPage);
// if fetch was called and the component was unmounted before
// the results arrived, don't call setState
if (!this.mounted) return;
const { rows, page, total, allRows } = sliced;
allRows.forEach(row => {
const prevRow = this.state.allRows.find(r => r.data.name === row.data.name);
if (prevRow && prevRow.selected) {
row.selected = true;
}
});
this.setState({
rows,
page,
perPage,
total,
allRows
});
this.props.lastUpdated(new Date());
});
};
detailLink = (value, extraInfo) => {
if (value === null) {
value = `${this.props.entity}/${extraInfo.rowData.data.identity}`;
}
return (
<Button
data-testid={value}
className="link-button"
onClick={() => this.detailClick(value, extraInfo)}
>
{value}
</Button>
);
};
detailClick = (value, extraInfo) => {
const stateInfo = {
page: this.state.page,
perPage: this.state.perPage,
routerId: this.props.routerId,
entity: this.props.entity,
filterBy: this.state.filterBy
};
this.props.handleDetailClick(value, extraInfo, stateInfo);
};
// cell formatter
noWrap = (value, extraInfo) => {
return <span className="noWrap">{value}</span>;
};
// cell formatter
prettier = (value, extraInfo) => {
return typeof value === "undefined"
? "-"
: this.props.service.utilities.pretty(value);
};
// cell formatter, display a component instead of this cell's data
formatter = (Component, value, extraInfo) => {
return (
<Component
value={value}
extraInfo={extraInfo}
detailClick={this.detailClick}
notifyClick={this.notifyClick}
{...this.props}
/>
);
};
notifyClick = () => {
this.update();
};
onSort = (_event, index, direction) => {
this.setState({ sortBy: { index, direction } }, () => {
const { allRows, page, perPage } = this.state;
let rows = this.filter(allRows);
rows = this.sort(rows);
rows = this.page(rows, rows.length, page, perPage);
this.setState({ rows });
});
};
renderPagination(variant = "top") {
const { page, perPage, total } = this.state;
return (
<Pagination
itemCount={total}
page={page}
perPage={perPage}
onSetPage={(_evt, value) => this.onSetPage(value)}
onPerPageSelect={(_evt, value) => this.onPerPageSelect(value)}
variant={variant}
/>
);
}
onSetPage = value => {
this.fetch(value, this.state.perPage);
};
onPerPageSelect = value => {
this.fetch(1, value);
};
handleChangeFilterValue = (field, value) => {
this.setState({ filterBy: { field, value } }, this.update);
};
field2Row = field => ({
cells: this.dataSource.fields.map(f => field[f.field]),
data: field
});
cellIndex = field => {
return this.dataSource.fields.findIndex(f => {
return f.title === field;
});
};
filter = rows => {
const filterField = this.state.filterBy.field;
const filterValue = this.state.filterBy.value;
if (
typeof filterField !== "undefined" &&
typeof filterValue !== "undefined" &&
filterValue !== ""
) {
const cellIndex = this.cellIndex(filterField);
rows = rows.filter(r => {
if (this.dataSource.fields[cellIndex].filter) {
return this.dataSource.fields[cellIndex].filter(r.data, filterValue);
}
return r.cells[cellIndex].includes(filterValue);
});
}
return rows;
};
page = (rows, total, page, perPage) => {
const newPages = Math.ceil(total / perPage);
page = Math.min(page, newPages);
const start = perPage * (page - 1);
const end = Math.min(start + perPage, rows.length);
return rows.slice(start, end);
};
slice = (fields, page, perPage) => {
let allRows = fields.map(f => this.field2Row(f));
let rows = this.filter(allRows);
const total = rows.length;
rows = this.sort(rows);
rows = this.page(rows, total, page, perPage);
return { rows, page, total, allRows };
};
sort = rows => {
const { index, direction } = this.state.sortBy;
if (typeof index === "undefined" || typeof direction === "undefined") {
return rows;
}
const less = direction === SortByDirection.desc ? 1 : -1;
const more = -1 * less;
rows.sort((a, b) => {
if (a.cells[index] < b.cells[index]) return less;
if (a.cells[index] > b.cells[index]) return more;
// the values matched, sort by 1st column
if (index !== 0) {
if (a.cells[0] < b.cells[0]) return less;
if (a.cells[0] > b.cells[0]) return more;
}
return 0;
});
return rows;
};
onSelect = (event, isSelected, rowId) => {
let rows;
if (rowId === -1) {
rows = this.state.rows.map(oneRow => {
oneRow.selected = isSelected;
return oneRow;
});
} else {
rows = [...this.state.rows];
rows[rowId].selected = isSelected;
}
this.setState({
rows
});
};
// called from entitiesPage when a new entity is selected from the list.
// we need to reset the page, sortBy, and filterBy for the new entity
reset = () => {
this.setState(
{
page: 1,
sortBy: { index: 0, direction: SortByDirection.asc },
filterBy: {}
},
() => {
if (this.toolbarRef) {
this.toolbarRef.reset();
}
}
);
};
// an action was clicked on a row's kebab menu
handleAction = ({ action, rowData }) => {
if (action === "UPDATE") {
this.props.handleEntityAction(action, rowData.data);
} else {
this.setState({ action, data: rowData.data });
}
};
cancelledAction = () => {
this.setState({ action: null });
};
// show the confirmation modal for an action
doAction = () => {
const props = {
showNow: true,
cancelledAction: this.cancelledAction,
...this.props
};
return this.dataSource.actionButton({
action: this.state.action,
props: props,
click: this.didAction,
record: this.state.data,
i: 0,
asButton: false
});
};
// called by action modal after action is performed or cancelled
didAction = () => {
this.setState({ action: null, data: null }, this.update);
};
render() {
const tableProps = {
cells: this.columns,
rows: this.state.rows,
actions: this.dataSource.actionMenuItems(this.props.entity, this.handleAction),
"aria-label": this.props.entity,
sortBy: this.state.sortBy,
onSort: this.onSort,
variant: TableVariant.compact
};
if (this.state.redirect) {
return (
<Redirect
to={{
pathname: this.dataSource.detailPath || "/details",
state: this.state.redirectState
}}
/>
);
}
// map of actions to buttons for the table toolbar
const actionButtons = () => {
// don't show UPDATE or DELETE for the entire list of records
const actions = this.dataSource
.actions(this.props.entity)
.filter(action => action !== "UPDATE" && action !== "DELETE");
const buttons = {};
actions.forEach((action, i) => {
buttons[action] = this.dataSource.actionButton({
action,
props: this.props,
click: this.handleAction,
i,
asButton: true
});
});
return buttons;
};
return (
<React.Fragment>
<TableToolbar
ref={el => (this.toolbarRef = el)}
total={this.state.total}
page={this.state.page}
perPage={this.state.perPage}
onSetPage={this.onSetPage}
onPerPageSelect={this.onPerPageSelect}
fields={this.dataSource.fields}
filterBy={this.state.filterBy}
handleChangeFilterValue={this.handleChangeFilterValue}
hidePagination={true}
actionButtons={actionButtons()}
/>
{this.state.rows.length > 0 ? (
<React.Fragment>
<Table {...tableProps}>
<TableHeader />
<TableBody />
</Table>
{this.renderPagination("bottom")}
</React.Fragment>
) : (
<EmptyTable entity={this.props.entity} />
)}
{this.state.action && this.doAction()}
</React.Fragment>
);
}
}
export default EntityListTable;
|
packages/wix-style-react/src/Swatches/test/Swatches.visual.js
|
wix/wix-style-react
|
import React from 'react';
import { storiesOf } from '@storybook/react';
import Swatches from '../Swatches';
import Box from '../../Box';
const commonProps = {
colors: [
'#000',
'#fff',
'red',
'cyan',
'rgb(200, 100, 0)',
'turquoise',
'beige',
],
};
const tests = [
{
describe: 'sanity', // prop name (e.g. size)
its: [
{
it: 'works', // prop variation (e.g. small)
props: {},
},
],
},
{
describe: 'columns', // prop name (e.g. size)
its: [
{
it: '6 columns', // prop variation (e.g. small)
props: {
columns: 6,
},
},
{
it: '4 columns', // prop variation (e.g. small)
props: {
columns: 4,
},
},
{
it: '2 columns', // prop variation (e.g. small)
props: {
columns: 2,
},
},
],
},
{
describe: 'No Color', // prop name (e.g. size)
its: [
{
it: '6 columns', // prop variation (e.g. small)
props: {
showClear: true,
},
},
],
},
{
describe: 'No Color', // prop name (e.g. size)
its: [
{
it: 'no color swatch', // prop variation (e.g. small)
props: {
showClear: true,
},
},
],
},
{
describe: 'Add button', // prop name (e.g. size)
its: [
{
it: 'button', // prop variation (e.g. small)
props: {
showAddButton: true,
},
},
],
},
];
tests.forEach(({ describe, its }) => {
its.forEach(({ it, props }) => {
storiesOf(`Swatches${describe ? '/' + describe : ''}`, module).add(
it,
() => (
<Box width="204px">
<Swatches {...commonProps} {...props} />
</Box>
),
);
});
});
|
common/__test__/component/apimock/index.js
|
FFF-team/generator-earth
|
import React from 'react';
import request from './request';
class Index extends React.Component {
constructor(props) {
super(props);
this.state = {
addressList: []
}
}
componentDidMount() {
request.get('url')
.then((res) => {
if (res.rCode === 0) {
this.setState({
addressList: res.data
});
} else {
}
});
}
render() {
return (
<div className="apimock">
1
</div>
)
}
}
export default Index;
|
ajax/libs/redux-form/3.1.0/redux-form.js
|
iwdmb/cdnjs
|
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"));
else if(typeof define === 'function' && define.amd)
define(["react"], factory);
else if(typeof exports === 'object')
exports["ReduxForm"] = factory(require("react"));
else
root["ReduxForm"] = factory(root["React"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_24__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _react = __webpack_require__(24);
var _react2 = _interopRequireDefault(_react);
var _createAll2 = __webpack_require__(26);
var _createAll3 = _interopRequireDefault(_createAll2);
var _createAll = _createAll3['default'](false, _react2['default']);
var actionTypes = _createAll.actionTypes;
var blur = _createAll.blur;
var change = _createAll.change;
var destroy = _createAll.destroy;
var focus = _createAll.focus;
var reducer = _createAll.reducer;
var reduxForm = _createAll.reduxForm;
var initialize = _createAll.initialize;
var initializeWithKey = _createAll.initializeWithKey;
var reset = _createAll.reset;
var startAsyncValidation = _createAll.startAsyncValidation;
var startSubmit = _createAll.startSubmit;
var stopAsyncValidation = _createAll.stopAsyncValidation;
var stopSubmit = _createAll.stopSubmit;
var touch = _createAll.touch;
var untouch = _createAll.untouch;
exports.actionTypes = actionTypes;
exports.blur = blur;
exports.change = change;
exports.destroy = destroy;
exports.focus = focus;
exports.reducer = reducer;
exports.reduxForm = reduxForm;
exports.initialize = initialize;
exports.initializeWithKey = initializeWithKey;
exports.reset = reset;
exports.startAsyncValidation = startAsyncValidation;
exports.startSubmit = startSubmit;
exports.stopAsyncValidation = stopAsyncValidation;
exports.stopSubmit = stopSubmit;
exports.touch = touch;
exports.untouch = untouch;
/***/ },
/* 1 */
/***/ function(module, exports) {
'use strict';
exports.__esModule = true;
exports['default'] = isValid;
function isValid(error) {
if (Array.isArray(error)) {
return error.reduce(function (valid, errorValue) {
return valid && isValid(errorValue);
}, true);
}
if (error && typeof error === 'object') {
return Object.keys(error).reduce(function (valid, key) {
return valid && isValid(error[key]);
}, true);
}
return !error;
}
module.exports = exports['default'];
/***/ },
/* 2 */
/***/ function(module, exports) {
'use strict';
exports.__esModule = true;
var ADD_ARRAY_VALUE = 'redux-form/ADD_ARRAY_VALUE';
exports.ADD_ARRAY_VALUE = ADD_ARRAY_VALUE;
var BLUR = 'redux-form/BLUR';
exports.BLUR = BLUR;
var CHANGE = 'redux-form/CHANGE';
exports.CHANGE = CHANGE;
var DESTROY = 'redux-form/DESTROY';
exports.DESTROY = DESTROY;
var FOCUS = 'redux-form/FOCUS';
exports.FOCUS = FOCUS;
var INITIALIZE = 'redux-form/INITIALIZE';
exports.INITIALIZE = INITIALIZE;
var REMOVE_ARRAY_VALUE = 'redux-form/REMOVE_ARRAY_VALUE';
exports.REMOVE_ARRAY_VALUE = REMOVE_ARRAY_VALUE;
var RESET = 'redux-form/RESET';
exports.RESET = RESET;
var START_ASYNC_VALIDATION = 'redux-form/START_ASYNC_VALIDATION';
exports.START_ASYNC_VALIDATION = START_ASYNC_VALIDATION;
var START_SUBMIT = 'redux-form/START_SUBMIT';
exports.START_SUBMIT = START_SUBMIT;
var STOP_ASYNC_VALIDATION = 'redux-form/STOP_ASYNC_VALIDATION';
exports.STOP_ASYNC_VALIDATION = STOP_ASYNC_VALIDATION;
var STOP_SUBMIT = 'redux-form/STOP_SUBMIT';
exports.STOP_SUBMIT = STOP_SUBMIT;
var SUBMIT_FAILED = 'redux-form/SUBMIT_FAILED';
exports.SUBMIT_FAILED = SUBMIT_FAILED;
var TOUCH = 'redux-form/TOUCH';
exports.TOUCH = TOUCH;
var UNTOUCH = 'redux-form/UNTOUCH';
exports.UNTOUCH = UNTOUCH;
/***/ },
/* 3 */
/***/ function(module, exports) {
/**
* Maps all the values in the given object through the given function and saves them, by key, to a result object
*/
"use strict";
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
exports["default"] = mapValues;
function mapValues(obj, fn) {
return obj ? Object.keys(obj).reduce(function (accumulator, key) {
var _extends2;
return _extends({}, accumulator, (_extends2 = {}, _extends2[key] = fn(obj[key], key), _extends2));
}, {}) : obj;
}
module.exports = exports["default"];
/***/ },
/* 4 */
/***/ function(module, exports) {
module.exports = isPromise;
function isPromise(obj) {
return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
}
/***/ },
/* 5 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports.addArrayValue = addArrayValue;
exports.blur = blur;
exports.change = change;
exports.destroy = destroy;
exports.focus = focus;
exports.initialize = initialize;
exports.removeArrayValue = removeArrayValue;
exports.reset = reset;
exports.startAsyncValidation = startAsyncValidation;
exports.startSubmit = startSubmit;
exports.stopAsyncValidation = stopAsyncValidation;
exports.stopSubmit = stopSubmit;
exports.submitFailed = submitFailed;
exports.touch = touch;
exports.untouch = untouch;
var _actionTypes = __webpack_require__(2);
function addArrayValue(path, value, index) {
return { type: _actionTypes.ADD_ARRAY_VALUE, path: path, value: value, index: index };
}
function blur(field, value) {
return { type: _actionTypes.BLUR, field: field, value: value };
}
function change(field, value) {
return { type: _actionTypes.CHANGE, field: field, value: value };
}
function destroy() {
return { type: _actionTypes.DESTROY };
}
function focus(field) {
return { type: _actionTypes.FOCUS, field: field };
}
function initialize(data) {
return { type: _actionTypes.INITIALIZE, data: data };
}
function removeArrayValue(path, index) {
return { type: _actionTypes.REMOVE_ARRAY_VALUE, path: path, index: index };
}
function reset() {
return { type: _actionTypes.RESET };
}
function startAsyncValidation() {
return { type: _actionTypes.START_ASYNC_VALIDATION };
}
function startSubmit() {
return { type: _actionTypes.START_SUBMIT };
}
function stopAsyncValidation(errors) {
return { type: _actionTypes.STOP_ASYNC_VALIDATION, errors: errors };
}
function stopSubmit(errors) {
return { type: _actionTypes.STOP_SUBMIT, errors: errors };
}
function submitFailed() {
return { type: _actionTypes.SUBMIT_FAILED };
}
function touch() {
for (var _len = arguments.length, fields = Array(_len), _key = 0; _key < _len; _key++) {
fields[_key] = arguments[_key];
}
return { type: _actionTypes.TOUCH, fields: fields };
}
function untouch() {
for (var _len2 = arguments.length, fields = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
fields[_key2] = arguments[_key2];
}
return { type: _actionTypes.UNTOUCH, fields: fields };
}
/***/ },
/* 6 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
exports['default'] = bindActionData;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _mapValues = __webpack_require__(3);
var _mapValues2 = _interopRequireDefault(_mapValues);
/**
* Adds additional properties to the results of the function or map of functions passed
*/
function bindActionData(action, data) {
if (typeof action === 'function') {
return function () {
return _extends({}, action.apply(undefined, arguments), data);
};
}
if (typeof action === 'object') {
return _mapValues2['default'](action, function (value) {
return bindActionData(value, data);
});
}
return action;
}
module.exports = exports['default'];
/***/ },
/* 7 */
/***/ function(module, exports) {
'use strict';
exports.__esModule = true;
var dataKey = 'value';
exports.dataKey = dataKey;
var createOnDragStart = function createOnDragStart(name, getValue) {
return function (event) {
event.dataTransfer.setData(dataKey, getValue());
};
};
exports['default'] = createOnDragStart;
/***/ },
/* 8 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _isEvent = __webpack_require__(9);
var _isEvent2 = _interopRequireDefault(_isEvent);
var getSelectedValues = function getSelectedValues(options) {
var result = [];
if (options) {
for (var index = 0; index < options.length; index++) {
var option = options[index];
if (option.selected) {
result.push(option.value);
}
}
}
return result;
};
var getValue = function getValue(event, isReactNative) {
if (_isEvent2['default'](event)) {
if (!isReactNative && event.nativeEvent && event.nativeEvent.text !== undefined) {
return event.nativeEvent.text;
}
if (isReactNative && event.nativeEvent !== undefined) {
return event.nativeEvent.text;
}
var _event$target = event.target;
var type = _event$target.type;
var value = _event$target.value;
var checked = _event$target.checked;
var files = _event$target.files;
var dataTransfer = event.dataTransfer;
if (type === 'checkbox') {
return checked;
}
if (type === 'file') {
return files || dataTransfer && dataTransfer.files;
}
if (type === 'select-multiple') {
return getSelectedValues(event.target.options);
}
return value;
}
// not an event, so must be either our value or an object containing our value in the 'value' key
return event && typeof event === 'object' && event.value !== undefined ? event.value : // extract value from { value: value } structure. https://github.com/nikgraf/belle/issues/58
event;
};
exports['default'] = getValue;
module.exports = exports['default'];
/***/ },
/* 9 */
/***/ function(module, exports) {
"use strict";
exports.__esModule = true;
var isEvent = function isEvent(candidate) {
return !!(candidate && candidate.stopPropagation && candidate.preventDefault);
};
exports["default"] = isEvent;
module.exports = exports["default"];
/***/ },
/* 10 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _isEvent = __webpack_require__(9);
var _isEvent2 = _interopRequireDefault(_isEvent);
var silenceEvent = function silenceEvent(event) {
var is = _isEvent2['default'](event);
if (is) {
event.preventDefault();
}
return is;
};
exports['default'] = silenceEvent;
module.exports = exports['default'];
/***/ },
/* 11 */
/***/ function(module, exports) {
'use strict';
exports.__esModule = true;
exports['default'] = getDisplayName;
function getDisplayName(Comp) {
return Comp.displayName || Comp.name || 'Component';
}
module.exports = exports['default'];
/***/ },
/* 12 */
/***/ function(module, exports) {
'use strict';
exports.__esModule = true;
var getValue = function getValue(field, state, dest) {
var dotIndex = field.indexOf('.');
var openIndex = field.indexOf('[');
var closeIndex = field.indexOf(']');
if (openIndex > 0 && closeIndex !== openIndex + 1) {
throw new Error('found [ not followed by ]');
}
if (openIndex > 0 && (dotIndex < 0 || openIndex < dotIndex)) {
(function () {
// array field
var key = field.substring(0, openIndex);
var rest = field.substring(closeIndex + 1);
if (rest[0] === '.') {
rest = rest.substring(1);
}
var array = state && state[key] || [];
if (rest) {
if (!dest[key]) {
dest[key] = [];
}
array.forEach(function (item, index) {
if (!dest[key][index]) {
dest[key][index] = {};
}
getValue(rest, item, dest[key][index]);
});
} else {
dest[key] = array.map(function (item) {
return item.value;
});
}
})();
} else if (dotIndex > 0) {
// subobject field
var key = field.substring(0, dotIndex);
var rest = field.substring(dotIndex + 1);
if (!dest[key]) {
dest[key] = {};
}
getValue(rest, state && state[key] || {}, dest[key]);
} else {
dest[field] = state[field] && state[field].value;
}
};
var getValues = function getValues(fields, state) {
return fields.reduce(function (accumulator, field) {
getValue(field, state, accumulator);
return accumulator;
}, {});
};
exports['default'] = getValues;
module.exports = exports['default'];
/***/ },
/* 13 */
/***/ function(module, exports) {
/**
* Reads any potentially deep value from an object using dot and array syntax
*/
'use strict';
exports.__esModule = true;
var read = function read(_x, _x2) {
var _again = true;
_function: while (_again) {
var path = _x,
object = _x2;
_again = false;
if (!path || !object) {
return object;
}
var dotIndex = path.indexOf('.');
if (dotIndex === 0) {
_x = path.substring(1);
_x2 = object;
_again = true;
dotIndex = undefined;
continue _function;
}
var openIndex = path.indexOf('[');
var closeIndex = path.indexOf(']');
if (dotIndex >= 0 && (openIndex < 0 || dotIndex < openIndex)) {
_x = path.substring(dotIndex + 1);
_x2 = object[path.substring(0, dotIndex)];
_again = true;
dotIndex = openIndex = closeIndex = undefined;
continue _function;
}
if (openIndex >= 0 && (dotIndex < 0 || openIndex < dotIndex)) {
if (closeIndex < 0) {
throw new Error('found [ but no ]');
}
var key = path.substring(0, openIndex);
var index = path.substring(openIndex + 1, closeIndex);
if (openIndex === 0) {
_x = path.substring(closeIndex + 1);
_x2 = object[index];
_again = true;
dotIndex = openIndex = closeIndex = key = index = undefined;
continue _function;
}
if (!object[key]) {
return undefined;
}
_x = path.substring(closeIndex + 1);
_x2 = object[key][index];
_again = true;
dotIndex = openIndex = closeIndex = key = index = undefined;
continue _function;
}
return object[path];
}
};
exports['default'] = read;
module.exports = exports['default'];
/***/ },
/* 14 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _behaviors;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
var _actionTypes = __webpack_require__(2);
var _mapValues = __webpack_require__(3);
var _mapValues2 = _interopRequireDefault(_mapValues);
var _read = __webpack_require__(13);
var _read2 = _interopRequireDefault(_read);
var _write = __webpack_require__(15);
var _write2 = _interopRequireDefault(_write);
var initialState = {
_active: undefined,
_asyncValidating: false,
_error: undefined,
_submitting: false,
_submitFailed: false
};
exports.initialState = initialState;
var getValues = function getValues(state) {
return Object.keys(state).reduce(function (accumulator, name) {
if (name[0] !== '_') {
accumulator[name] = state[name].value;
}
return accumulator;
}, {});
};
exports.getValues = getValues;
var behaviors = (_behaviors = {}, _behaviors[_actionTypes.ADD_ARRAY_VALUE] = function (state, _ref) {
var path = _ref.path;
var index = _ref.index;
var value = _ref.value;
var array = _read2['default'](path, state);
var stateCopy = _extends({}, state);
var arrayCopy = array ? [].concat(array) : [];
var newValue = { value: value };
if (index === undefined) {
arrayCopy.push(newValue);
} else {
arrayCopy.splice(index, 0, newValue);
}
return _write2['default'](path, arrayCopy, stateCopy);
}, _behaviors[_actionTypes.BLUR] = function (state, _ref2) {
var field = _ref2.field;
var value = _ref2.value;
var touch = _ref2.touch;
// remove _active from state
var _active = state._active;
var stateCopy = _objectWithoutProperties(state, ['_active']);
// eslint-disable-line prefer-const
if (value !== undefined) {
stateCopy = _write2['default'](field + '.value', value, stateCopy);
}
if (touch) {
stateCopy = _write2['default'](field + '.touched', true, stateCopy);
}
return stateCopy;
}, _behaviors[_actionTypes.CHANGE] = function (state, _ref3) {
var field = _ref3.field;
var value = _ref3.value;
var touch = _ref3.touch;
var stateCopy = _extends({}, state);
stateCopy = _write2['default'](field + '.value', value, stateCopy);
if (touch) {
stateCopy = _write2['default'](field + '.touched', true, stateCopy);
}
delete stateCopy.asyncError;
delete stateCopy.submitError;
return stateCopy;
}, _behaviors[_actionTypes.DESTROY] = function () {
return undefined;
}, _behaviors[_actionTypes.FOCUS] = function (state, _ref4) {
var field = _ref4.field;
var stateCopy = _extends({}, state);
stateCopy = _write2['default'](field + '.visited', true, stateCopy);
stateCopy._active = field;
return stateCopy;
}, _behaviors[_actionTypes.INITIALIZE] = function (state, _ref5) {
var data = _ref5.data;
return _extends({}, _mapValues2['default'](data, function (value) {
return {
initial: value,
value: value
};
}), {
_asyncValidating: false,
_active: undefined,
_error: undefined,
_submitting: false,
_submitFailed: false
});
}, _behaviors[_actionTypes.REMOVE_ARRAY_VALUE] = function (state, _ref6) {
var path = _ref6.path;
var index = _ref6.index;
var array = _read2['default'](path, state);
var stateCopy = _extends({}, state);
var arrayCopy = array ? [].concat(array) : [];
if (index === undefined) {
arrayCopy.pop();
} else if (isNaN(index)) {
delete arrayCopy[index];
} else {
arrayCopy.splice(index, 1);
}
return _write2['default'](path, arrayCopy, stateCopy);
}, _behaviors[_actionTypes.RESET] = function (state) {
return _extends({}, _mapValues2['default'](state, function (field, name) {
return name[0] === '_' ? field : {
initial: field.initial,
value: field.initial
};
}), {
_active: undefined,
_asyncValidating: false,
_error: undefined,
_submitting: false,
_submitFailed: false
});
}, _behaviors[_actionTypes.START_ASYNC_VALIDATION] = function (state) {
return _extends({}, state, {
_asyncValidating: true
});
}, _behaviors[_actionTypes.START_SUBMIT] = function (state) {
return _extends({}, state, {
_submitting: true
});
}, _behaviors[_actionTypes.STOP_ASYNC_VALIDATION] = function (state, _ref7) {
var errors = _ref7.errors;
return _extends({}, _mapValues2['default'](state, function (value) {
return value && value.asyncError ? _extends({}, value, { asyncError: undefined }) : value;
}), _mapValues2['default'](errors, function (error, key) {
return _extends({}, state[key], {
asyncError: error
});
}), {
_asyncValidating: false,
_error: errors && errors._error
});
}, _behaviors[_actionTypes.STOP_SUBMIT] = function (state, _ref8) {
var errors = _ref8.errors;
return _extends({}, state, errors ? _mapValues2['default'](errors, function (error, key) {
return _extends({}, state[key], {
submitError: error
});
}) : {}, {
_error: errors && errors._error,
_submitting: false,
_submitFailed: !!(errors && Object.keys(errors).length)
});
}, _behaviors[_actionTypes.SUBMIT_FAILED] = function (state) {
return _extends({}, state, {
_submitFailed: true
});
}, _behaviors[_actionTypes.TOUCH] = function (state, _ref9) {
var fields = _ref9.fields;
return _extends({}, state, fields.reduce(function (accumulator, field) {
accumulator[field] = _extends({}, state[field], {
touched: true
});
return accumulator;
}, {}));
}, _behaviors[_actionTypes.UNTOUCH] = function (state, _ref10) {
var fields = _ref10.fields;
return _extends({}, state, fields.reduce(function (accumulator, field) {
accumulator[field] = _extends({}, state[field], {
touched: false
});
return accumulator;
}, {}));
}, _behaviors);
var reducer = function reducer() {
var state = arguments.length <= 0 || arguments[0] === undefined ? initialState : arguments[0];
var action = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
var behavior = behaviors[action.type];
return behavior ? behavior(state, action) : state;
};
function formReducer() {
var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var _extends7;
var action = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
var form = action.form;
var key = action.key;
var rest = _objectWithoutProperties(action, ['form', 'key']);
// eslint-disable-line no-redeclare
if (!form) {
return state;
}
if (key) {
var _extends4, _extends5;
if (action.type === _actionTypes.DESTROY) {
var _extends3;
return _extends({}, state, (_extends3 = {}, _extends3[form] = state[form] && Object.keys(state[form]).reduce(function (accumulator, stateKey) {
var _extends2;
return stateKey === key ? accumulator : _extends({}, accumulator, (_extends2 = {}, _extends2[stateKey] = state[form][stateKey], _extends2));
}, {}), _extends3));
}
return _extends({}, state, (_extends5 = {}, _extends5[form] = _extends({}, state[form], (_extends4 = {}, _extends4[key] = reducer((state[form] || {})[key], rest), _extends4)), _extends5));
}
if (action.type === _actionTypes.DESTROY) {
return Object.keys(state).reduce(function (accumulator, formName) {
var _extends6;
return formName === form ? accumulator : _extends({}, accumulator, (_extends6 = {}, _extends6[formName] = state[formName], _extends6));
}, {});
}
return _extends({}, state, (_extends7 = {}, _extends7[form] = reducer(state[form], rest), _extends7));
}
/**
* Adds additional functionality to the reducer
*/
function decorate(target) {
target.plugin = function plugin(reducers) {
var _this = this;
return decorate(function () {
var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var action = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
var result = _this(state, action);
return _extends({}, result, _mapValues2['default'](reducers, function (pluginReducer, key) {
return pluginReducer(result[key] || initialState, action);
}));
});
};
target.normalize = function normalize(normalizers) {
var _this2 = this;
return decorate(function () {
var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var action = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
var result = _this2(state, action);
return _extends({}, result, _mapValues2['default'](normalizers, function (formNormalizers, form) {
var previousValues = getValues(_extends({}, initialState, state[form]));
var formResult = _extends({}, initialState, result[form]);
return _extends({}, formResult, _mapValues2['default'](formNormalizers, function (fieldNormalizer, field) {
return _extends({}, formResult[field], {
value: fieldNormalizer(formResult[field] ? formResult[field].value : undefined, // value
state[form] && state[form][field] ? state[form][field].value : undefined, // previous value
getValues(formResult), // all field values
previousValues) // all previous field values
});
}));
}));
});
};
return target;
}
exports['default'] = decorate(formReducer);
/***/ },
/* 15 */
/***/ function(module, exports) {
/**
* Writes any potentially deep value from an object using dot and array syntax,
* and returns a new copy of the object.
*/
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var write = function write(_x, _x2, _x3) {
var _again = true;
_function: while (_again) {
var path = _x,
value = _x2,
object = _x3;
var _extends5;
_again = false;
var dotIndex = path.indexOf('.');
if (dotIndex === 0) {
_x = path.substring(1);
_x2 = value;
_x3 = object;
_again = true;
_extends5 = dotIndex = undefined;
continue _function;
}
var openIndex = path.indexOf('[');
var closeIndex = path.indexOf(']');
if (dotIndex >= 0 && (openIndex < 0 || dotIndex < openIndex)) {
var _extends2;
// is dot notation
var key = path.substring(0, dotIndex);
if (!object[key]) {
object[key] = {};
}
return _extends({}, object, (_extends2 = {}, _extends2[key] = write(path.substring(dotIndex + 1), value, object[key]), _extends2));
}
if (openIndex >= 0 && (dotIndex < 0 || openIndex < dotIndex)) {
var _extends4;
if (closeIndex < 0) {
throw new Error('found [ but no ]');
}
var key = path.substring(0, openIndex);
var index = path.substring(openIndex + 1, closeIndex);
var array = object[key] || [];
var rest = path.substring(closeIndex + 1);
if (rest.length) {
var _extends3;
var dest = array[index] || {};
var arrayCopy = [].concat(array);
arrayCopy[index] = write(rest, value, dest);
return _extends({}, object || {}, (_extends3 = {}, _extends3[key] = arrayCopy, _extends3));
}
if (openIndex === 0) {
// object is an array
var objectArrayCopy = [].concat(object);
objectArrayCopy[index] = write(rest, value, object[index]);
return objectArrayCopy;
}
var copy = [].concat(object[key] || []);
copy[index] = value;
return _extends({}, object || {}, (_extends4 = {}, _extends4[key] = copy, _extends4));
}
return _extends({}, object, (_extends5 = {}, _extends5[path] = value, _extends5));
}
};
exports['default'] = write;
module.exports = exports['default'];
/***/ },
/* 16 */
/***/ function(module, exports, __webpack_require__) {
var pSlice = Array.prototype.slice;
var objectKeys = __webpack_require__(44);
var isArguments = __webpack_require__(43);
var deepEqual = module.exports = function (actual, expected, opts) {
if (!opts) opts = {};
// 7.1. All identical values are equivalent, as determined by ===.
if (actual === expected) {
return true;
} else if (actual instanceof Date && expected instanceof Date) {
return actual.getTime() === expected.getTime();
// 7.3. Other pairs that do not both pass typeof value == 'object',
// equivalence is determined by ==.
} else if (!actual || !expected || typeof actual != 'object' && typeof expected != 'object') {
return opts.strict ? actual === expected : actual == expected;
// 7.4. For all other Object pairs, including Array objects, equivalence is
// determined by having the same number of owned properties (as verified
// with Object.prototype.hasOwnProperty.call), the same set of keys
// (although not necessarily the same order), equivalent values for every
// corresponding key, and an identical 'prototype' property. Note: this
// accounts for both named and indexed properties on Arrays.
} else {
return objEquiv(actual, expected, opts);
}
}
function isUndefinedOrNull(value) {
return value === null || value === undefined;
}
function isBuffer (x) {
if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false;
if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {
return false;
}
if (x.length > 0 && typeof x[0] !== 'number') return false;
return true;
}
function objEquiv(a, b, opts) {
var i, key;
if (isUndefinedOrNull(a) || isUndefinedOrNull(b))
return false;
// an identical 'prototype' property.
if (a.prototype !== b.prototype) return false;
//~~~I've managed to break Object.keys through screwy arguments passing.
// Converting to array solves the problem.
if (isArguments(a)) {
if (!isArguments(b)) {
return false;
}
a = pSlice.call(a);
b = pSlice.call(b);
return deepEqual(a, b, opts);
}
if (isBuffer(a)) {
if (!isBuffer(b)) {
return false;
}
if (a.length !== b.length) return false;
for (i = 0; i < a.length; i++) {
if (a[i] !== b[i]) return false;
}
return true;
}
try {
var ka = objectKeys(a),
kb = objectKeys(b);
} catch (e) {//happens when one is a string literal and the other isn't
return false;
}
// having the same number of owned properties (keys incorporates
// hasOwnProperty)
if (ka.length != kb.length)
return false;
//the same set of keys (although not necessarily the same order),
ka.sort();
kb.sort();
//~~~cheap key test
for (i = ka.length - 1; i >= 0; i--) {
if (ka[i] != kb[i])
return false;
}
//equivalent values for every corresponding key, and
//~~~possibly expensive deep test
for (i = ka.length - 1; i >= 0; i--) {
key = ka[i];
if (!deepEqual(a[key], b[key], opts)) return false;
}
return typeof a === typeof b;
}
/***/ },
/* 17 */
/***/ function(module, exports) {
/**
* Copyright 2015, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
'use strict';
var REACT_STATICS = {
childContextTypes: true,
contextTypes: true,
defaultProps: true,
displayName: true,
getDefaultProps: true,
mixins: true,
propTypes: true,
type: true
};
var KNOWN_STATICS = {
name: true,
length: true,
prototype: true,
caller: true,
arguments: true,
arity: true
};
module.exports = function hoistNonReactStatics(targetComponent, sourceComponent) {
var keys = Object.getOwnPropertyNames(sourceComponent);
for (var i=0; i<keys.length; ++i) {
if (!REACT_STATICS[keys[i]] && !KNOWN_STATICS[keys[i]]) {
targetComponent[keys[i]] = sourceComponent[keys[i]];
}
}
return targetComponent;
};
/***/ },
/* 18 */
/***/ function(module, exports) {
"use strict";
exports.__esModule = true;
exports["default"] = createStoreShape;
function createStoreShape(PropTypes) {
return PropTypes.shape({
subscribe: PropTypes.func.isRequired,
dispatch: PropTypes.func.isRequired,
getState: PropTypes.func.isRequired
});
}
module.exports = exports["default"];
/***/ },
/* 19 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports['default'] = createStore;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _utilsIsPlainObject = __webpack_require__(22);
var _utilsIsPlainObject2 = _interopRequireDefault(_utilsIsPlainObject);
/**
* These are private action types reserved by Redux.
* For any unknown actions, you must return the current state.
* If the current state is undefined, you must return the initial state.
* Do not reference these action types directly in your code.
*/
var ActionTypes = {
INIT: '@@redux/INIT'
};
exports.ActionTypes = ActionTypes;
/**
* Creates a Redux store that holds the state tree.
* The only way to change the data in the store is to call `dispatch()` on it.
*
* There should only be a single store in your app. To specify how different
* parts of the state tree respond to actions, you may combine several reducers
* into a single reducer function by using `combineReducers`.
*
* @param {Function} reducer A function that returns the next state tree, given
* the current state tree and the action to handle.
*
* @param {any} [initialState] The initial state. You may optionally specify it
* to hydrate the state from the server in universal apps, or to restore a
* previously serialized user session.
* If you use `combineReducers` to produce the root reducer function, this must be
* an object with the same shape as `combineReducers` keys.
*
* @returns {Store} A Redux store that lets you read the state, dispatch actions
* and subscribe to changes.
*/
function createStore(reducer, initialState) {
if (typeof reducer !== 'function') {
throw new Error('Expected the reducer to be a function.');
}
var currentReducer = reducer;
var currentState = initialState;
var listeners = [];
var isDispatching = false;
/**
* Reads the state tree managed by the store.
*
* @returns {any} The current state tree of your application.
*/
function getState() {
return currentState;
}
/**
* Adds a change listener. It will be called any time an action is dispatched,
* and some part of the state tree may potentially have changed. You may then
* call `getState()` to read the current state tree inside the callback.
*
* @param {Function} listener A callback to be invoked on every dispatch.
* @returns {Function} A function to remove this change listener.
*/
function subscribe(listener) {
listeners.push(listener);
var isSubscribed = true;
return function unsubscribe() {
if (!isSubscribed) {
return;
}
isSubscribed = false;
var index = listeners.indexOf(listener);
listeners.splice(index, 1);
};
}
/**
* Dispatches an action. It is the only way to trigger a state change.
*
* The `reducer` function, used to create the store, will be called with the
* current state tree and the given `action`. Its return value will
* be considered the **next** state of the tree, and the change listeners
* will be notified.
*
* The base implementation only supports plain object actions. If you want to
* dispatch a Promise, an Observable, a thunk, or something else, you need to
* wrap your store creating function into the corresponding middleware. For
* example, see the documentation for the `redux-thunk` package. Even the
* middleware will eventually dispatch plain object actions using this method.
*
* @param {Object} action A plain object representing “what changed”. It is
* a good idea to keep actions serializable so you can record and replay user
* sessions, or use the time travelling `redux-devtools`. An action must have
* a `type` property which may not be `undefined`. It is a good idea to use
* string constants for action types.
*
* @returns {Object} For convenience, the same action object you dispatched.
*
* Note that, if you use a custom middleware, it may wrap `dispatch()` to
* return something else (for example, a Promise you can await).
*/
function dispatch(action) {
if (!_utilsIsPlainObject2['default'](action)) {
throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
}
if (typeof action.type === 'undefined') {
throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
}
if (isDispatching) {
throw new Error('Reducers may not dispatch actions.');
}
try {
isDispatching = true;
currentState = currentReducer(currentState, action);
} finally {
isDispatching = false;
}
listeners.slice().forEach(function (listener) {
return listener();
});
return action;
}
/**
* Replaces the reducer currently used by the store to calculate the state.
*
* You might need this if your app implements code splitting and you want to
* load some of the reducers dynamically. You might also need this if you
* implement a hot reloading mechanism for Redux.
*
* @param {Function} nextReducer The reducer for the store to use instead.
* @returns {void}
*/
function replaceReducer(nextReducer) {
currentReducer = nextReducer;
dispatch({ type: ActionTypes.INIT });
}
// When a store is created, an "INIT" action is dispatched so that every
// reducer returns their initial state. This effectively populates
// the initial state tree.
dispatch({ type: ActionTypes.INIT });
return {
dispatch: dispatch,
subscribe: subscribe,
getState: getState,
replaceReducer: replaceReducer
};
}
/***/ },
/* 20 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _createStore = __webpack_require__(19);
var _createStore2 = _interopRequireDefault(_createStore);
var _utilsCombineReducers = __webpack_require__(57);
var _utilsCombineReducers2 = _interopRequireDefault(_utilsCombineReducers);
var _utilsBindActionCreators = __webpack_require__(56);
var _utilsBindActionCreators2 = _interopRequireDefault(_utilsBindActionCreators);
var _utilsApplyMiddleware = __webpack_require__(55);
var _utilsApplyMiddleware2 = _interopRequireDefault(_utilsApplyMiddleware);
var _utilsCompose = __webpack_require__(21);
var _utilsCompose2 = _interopRequireDefault(_utilsCompose);
exports.createStore = _createStore2['default'];
exports.combineReducers = _utilsCombineReducers2['default'];
exports.bindActionCreators = _utilsBindActionCreators2['default'];
exports.applyMiddleware = _utilsApplyMiddleware2['default'];
exports.compose = _utilsCompose2['default'];
/***/ },
/* 21 */
/***/ function(module, exports) {
/**
* Composes single-argument functions from right to left.
*
* @param {...Function} funcs The functions to compose.
* @returns {Function} A function obtained by composing functions from right to
* left. For example, compose(f, g, h) is identical to arg => f(g(h(arg))).
*/
"use strict";
exports.__esModule = true;
exports["default"] = compose;
function compose() {
for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
funcs[_key] = arguments[_key];
}
return function (arg) {
return funcs.reduceRight(function (composed, f) {
return f(composed);
}, arg);
};
}
module.exports = exports["default"];
/***/ },
/* 22 */
/***/ function(module, exports) {
'use strict';
exports.__esModule = true;
exports['default'] = isPlainObject;
var fnToString = function fnToString(fn) {
return Function.prototype.toString.call(fn);
};
/**
* @param {any} obj The object to inspect.
* @returns {boolean} True if the argument appears to be a plain object.
*/
function isPlainObject(obj) {
if (!obj || typeof obj !== 'object') {
return false;
}
var proto = typeof obj.constructor === 'function' ? Object.getPrototypeOf(obj) : Object.prototype;
if (proto === null) {
return true;
}
var constructor = proto.constructor;
return typeof constructor === 'function' && constructor instanceof constructor && fnToString(constructor) === fnToString(Object);
}
module.exports = exports['default'];
/***/ },
/* 23 */
/***/ function(module, exports) {
/**
* Applies a function to every key-value pair inside an object.
*
* @param {Object} obj The source object.
* @param {Function} fn The mapper function that receives the value and the key.
* @returns {Object} A new object that contains the mapped values for the keys.
*/
"use strict";
exports.__esModule = true;
exports["default"] = mapValues;
function mapValues(obj, fn) {
return Object.keys(obj).reduce(function (result, key) {
result[key] = fn(obj[key], key);
return result;
}, {});
}
module.exports = exports["default"];
/***/ },
/* 24 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_24__;
/***/ },
/* 25 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _isPromise = __webpack_require__(4);
var _isPromise2 = _interopRequireDefault(_isPromise);
var _isValid = __webpack_require__(1);
var _isValid2 = _interopRequireDefault(_isValid);
var asyncValidation = function asyncValidation(fn, start, stop) {
start();
var promise = fn();
if (!_isPromise2['default'](promise)) {
throw new Error('asyncValidate function passed to reduxForm must return a promise');
}
var handleErrors = function handleErrors(rejected) {
return function (errors) {
if (!_isValid2['default'](errors)) {
stop(errors);
return Promise.reject();
} else if (rejected) {
stop();
throw new Error('Asynchronous validation promise was rejected without errors.');
}
stop();
return Promise.resolve();
};
};
return promise.then(handleErrors(false), handleErrors(true));
};
exports['default'] = asyncValidation;
module.exports = exports['default'];
/***/ },
/* 26 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
exports['default'] = createAll;
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _reducer = __webpack_require__(14);
var _reducer2 = _interopRequireDefault(_reducer);
var _createReduxForm = __webpack_require__(28);
var _createReduxForm2 = _interopRequireDefault(_createReduxForm);
var _mapValues = __webpack_require__(3);
var _mapValues2 = _interopRequireDefault(_mapValues);
var _bindActionData = __webpack_require__(6);
var _bindActionData2 = _interopRequireDefault(_bindActionData);
var _actions = __webpack_require__(5);
var actions = _interopRequireWildcard(_actions);
var _actionTypes = __webpack_require__(2);
var actionTypes = _interopRequireWildcard(_actionTypes);
// bind form as first parameter of action creators
var boundActions = _extends({}, _mapValues2['default'](_extends({}, actions, {
initializeWithKey: function initializeWithKey(key, data) {
return _bindActionData2['default'](actions.initialize, { key: key })(data);
},
destroy: function destroy(key) {
return _bindActionData2['default'](actions.destroy, { key: key })();
}
}), function (action) {
return function (form) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return _bindActionData2['default'](action, { form: form }).apply(undefined, args);
};
}));
var blur = boundActions.blur;
var change = boundActions.change;
var destroy = boundActions.destroy;
var focus = boundActions.focus;
var initialize = boundActions.initialize;
var initializeWithKey = boundActions.initializeWithKey;
var reset = boundActions.reset;
var startAsyncValidation = boundActions.startAsyncValidation;
var startSubmit = boundActions.startSubmit;
var stopAsyncValidation = boundActions.stopAsyncValidation;
var stopSubmit = boundActions.stopSubmit;
var submitFailed = boundActions.submitFailed;
var touch = boundActions.touch;
var untouch = boundActions.untouch;
function createAll(isReactNative, React) {
return {
actionTypes: actionTypes,
blur: blur,
change: change,
destroy: destroy,
focus: focus,
reducer: _reducer2['default'],
initialize: initialize,
initializeWithKey: initializeWithKey,
reduxForm: _createReduxForm2['default'](isReactNative, React),
reset: reset,
startAsyncValidation: startAsyncValidation,
startSubmit: startSubmit,
stopAsyncValidation: stopAsyncValidation,
stopSubmit: stopSubmit,
submitFailed: submitFailed,
touch: touch,
untouch: untouch
};
}
module.exports = exports['default'];
/***/ },
/* 27 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _reactRedux = __webpack_require__(51);
var _actions = __webpack_require__(5);
var importedActions = _interopRequireWildcard(_actions);
var _getDisplayName = __webpack_require__(11);
var _getDisplayName2 = _interopRequireDefault(_getDisplayName);
var _reducer = __webpack_require__(14);
var _deepEqual = __webpack_require__(16);
var _deepEqual2 = _interopRequireDefault(_deepEqual);
var _bindActionData = __webpack_require__(6);
var _bindActionData2 = _interopRequireDefault(_bindActionData);
var _getValues = __webpack_require__(12);
var _getValues2 = _interopRequireDefault(_getValues);
var _isValid = __webpack_require__(1);
var _isValid2 = _interopRequireDefault(_isValid);
var _readFields = __webpack_require__(38);
var _readFields2 = _interopRequireDefault(_readFields);
var _handleSubmit2 = __webpack_require__(35);
var _handleSubmit3 = _interopRequireDefault(_handleSubmit2);
var _asyncValidation = __webpack_require__(25);
var _asyncValidation2 = _interopRequireDefault(_asyncValidation);
var _eventsSilenceEvents = __webpack_require__(34);
var _eventsSilenceEvents2 = _interopRequireDefault(_eventsSilenceEvents);
var _eventsSilenceEvent = __webpack_require__(10);
var _eventsSilenceEvent2 = _interopRequireDefault(_eventsSilenceEvent);
var _wrapMapDispatchToProps = __webpack_require__(41);
var _wrapMapDispatchToProps2 = _interopRequireDefault(_wrapMapDispatchToProps);
var _wrapMapStateToProps = __webpack_require__(42);
var _wrapMapStateToProps2 = _interopRequireDefault(_wrapMapStateToProps);
/**
* Creates a HOC that knows how to create redux-connected sub-components.
*/
var createHigherOrderComponent = function createHigherOrderComponent(config, isReactNative, React, WrappedComponent, mapStateToProps, mapDispatchToProps) {
var Component = React.Component;
var PropTypes = React.PropTypes;
return function (reduxMountPoint, formName, formKey, getFormState) {
var ReduxForm = (function (_Component) {
_inherits(ReduxForm, _Component);
function ReduxForm(props) {
_classCallCheck(this, ReduxForm);
_Component.call(this, props);
// bind functions
this.asyncValidate = this.asyncValidate.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
this.fields = _readFields2['default'](props, {}, this.asyncValidate, isReactNative);
}
ReduxForm.prototype.componentWillMount = function componentWillMount() {
var _props = this.props;
var initialize = _props.initialize;
var initialValues = _props.initialValues;
if (initialValues) {
initialize(initialValues);
}
};
ReduxForm.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
if (!_deepEqual2['default'](this.props.fields, nextProps.fields) || !_deepEqual2['default'](this.props.form, nextProps.form)) {
this.fields = _readFields2['default'](nextProps, this.fields, this.asyncValidate, isReactNative);
}
if (!_deepEqual2['default'](this.props.initialValues, nextProps.initialValues)) {
this.props.initialize(nextProps.initialValues);
}
};
ReduxForm.prototype.componentWillUnmount = function componentWillUnmount() {
if (config.destroyOnUnmount) {
this.props.destroy();
}
};
ReduxForm.prototype.asyncValidate = function asyncValidate(name, value) {
var _this = this;
var _props2 = this.props;
var asyncValidate = _props2.asyncValidate;
var dispatch = _props2.dispatch;
var fields = _props2.fields;
var form = _props2.form;
var startAsyncValidation = _props2.startAsyncValidation;
var stopAsyncValidation = _props2.stopAsyncValidation;
var validate = _props2.validate;
if (asyncValidate) {
var _ret = (function () {
var values = _getValues2['default'](fields, form);
if (name) {
values[name] = value;
}
var syncErrors = validate(values, _this.props);
// if blur validating, only run async validate if sync validation passes
if (!name || _isValid2['default'](syncErrors[name])) {
return {
v: _asyncValidation2['default'](function () {
return asyncValidate(values, dispatch, _this.props);
}, startAsyncValidation, stopAsyncValidation)
};
}
})();
if (typeof _ret === 'object') return _ret.v;
}
};
ReduxForm.prototype.handleSubmit = function handleSubmit(submitOrEvent) {
var _this2 = this;
var _props3 = this.props;
var onSubmit = _props3.onSubmit;
var fields = _props3.fields;
var form = _props3.form;
var check = function check(submit) {
if (!submit || typeof submit !== 'function') {
throw new Error('You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop');
}
return submit;
};
var values = _getValues2['default'](fields, form);
return !submitOrEvent || _eventsSilenceEvent2['default'](submitOrEvent) ?
// submitOrEvent is an event: fire submit
_handleSubmit3['default'](check(onSubmit), values, this.props, this.asyncValidate) :
// submitOrEvent is the submit function: return deferred submit thunk
_eventsSilenceEvents2['default'](function (event) {
_eventsSilenceEvent2['default'](event);
_handleSubmit3['default'](check(submitOrEvent), values, _this2.props, _this2.asyncValidate);
});
};
ReduxForm.prototype.render = function render() {
var _this3 = this;
var allFields = this.fields;
var _props4 = this.props;
var addArrayValue = _props4.addArrayValue;
var asyncBlurFields = _props4.asyncBlurFields;
var blur = _props4.blur;
var change = _props4.change;
var destroy = _props4.destroy;
var focus = _props4.focus;
var fields = _props4.fields;
var form = _props4.form;
var initialValues = _props4.initialValues;
var initialize = _props4.initialize;
var onSubmit = _props4.onSubmit;
var reset = _props4.reset;
var removeArrayValue = _props4.removeArrayValue;
var returnRejectedSubmitPromise = _props4.returnRejectedSubmitPromise;
var startAsyncValidation = _props4.startAsyncValidation;
var startSubmit = _props4.startSubmit;
var stopAsyncValidation = _props4.stopAsyncValidation;
var stopSubmit = _props4.stopSubmit;
var submitFailed = _props4.submitFailed;
var touch = _props4.touch;
var untouch = _props4.untouch;
var validate = _props4.validate;
var passableProps = _objectWithoutProperties(_props4, ['addArrayValue', 'asyncBlurFields', 'blur', 'change', 'destroy', 'focus', 'fields', 'form', 'initialValues', 'initialize', 'onSubmit', 'reset', 'removeArrayValue', 'returnRejectedSubmitPromise', 'startAsyncValidation', 'startSubmit', 'stopAsyncValidation', 'stopSubmit', 'submitFailed', 'touch', 'untouch', 'validate']);
// eslint-disable-line no-redeclare
var _allFields$_meta = allFields._meta;
var allPristine = _allFields$_meta.allPristine;
var allValid = _allFields$_meta.allValid;
var errors = _allFields$_meta.errors;
var formError = _allFields$_meta.formError;
var values = _allFields$_meta.values;
return React.createElement(WrappedComponent, _extends({}, passableProps, { // contains dispatch
// State:
active: form._active,
asyncValidating: form._asyncValidating,
dirty: !allPristine,
error: formError,
errors: errors,
fields: allFields,
formKey: formKey,
invalid: !allValid,
pristine: allPristine,
submitting: form._submitting,
submitFailed: form._submitFailed,
valid: allValid,
values: values,
// Actions:
asyncValidate: _eventsSilenceEvents2['default'](function () {
return _this3.asyncValidate();
}),
// ^ doesn't just pass this.asyncValidate to disallow values passing
destroyForm: _eventsSilenceEvents2['default'](destroy),
handleSubmit: this.handleSubmit,
initializeForm: _eventsSilenceEvents2['default'](initialize),
resetForm: _eventsSilenceEvents2['default'](reset),
touch: _eventsSilenceEvents2['default'](function () {
return touch.apply(undefined, arguments);
}),
touchAll: _eventsSilenceEvents2['default'](function () {
return touch.apply(undefined, fields);
}),
untouch: _eventsSilenceEvents2['default'](function () {
return untouch.apply(undefined, arguments);
}),
untouchAll: _eventsSilenceEvents2['default'](function () {
return untouch.apply(undefined, fields);
})
}));
};
return ReduxForm;
})(Component);
ReduxForm.displayName = 'ReduxForm(' + _getDisplayName2['default'](WrappedComponent) + ')';
ReduxForm.WrappedComponent = WrappedComponent;
ReduxForm.propTypes = {
// props:
asyncBlurFields: PropTypes.arrayOf(PropTypes.string),
asyncValidate: PropTypes.func,
dispatch: PropTypes.func.isRequired,
fields: PropTypes.arrayOf(PropTypes.string).isRequired,
form: PropTypes.object,
initialValues: PropTypes.any,
onSubmit: PropTypes.func,
validate: PropTypes.func,
readonly: PropTypes.bool,
returnRejectedSubmitPromise: PropTypes.bool,
// actions:
addArrayValue: PropTypes.func.isRequired,
blur: PropTypes.func.isRequired,
change: PropTypes.func.isRequired,
destroy: PropTypes.func.isRequired,
focus: PropTypes.func.isRequired,
initialize: PropTypes.func.isRequired,
removeArrayValue: PropTypes.func.isRequired,
reset: PropTypes.func.isRequired,
startAsyncValidation: PropTypes.func.isRequired,
startSubmit: PropTypes.func.isRequired,
stopAsyncValidation: PropTypes.func.isRequired,
stopSubmit: PropTypes.func.isRequired,
submitFailed: PropTypes.func.isRequired,
touch: PropTypes.func.isRequired,
untouch: PropTypes.func.isRequired
};
ReduxForm.defaultProps = {
asyncBlurFields: [],
form: _reducer.initialState,
readonly: false,
returnRejectedSubmitPromise: false,
validate: function validate() {
return {};
}
};
// bind touch flags to blur and change
var unboundActions = _extends({}, importedActions, {
blur: _bindActionData2['default'](importedActions.blur, {
touch: !!config.touchOnBlur
}),
change: _bindActionData2['default'](importedActions.change, {
touch: !!config.touchOnChange
})
});
// make redux connector with or without form key
var decorate = formKey !== undefined && formKey !== null ? _reactRedux.connect(_wrapMapStateToProps2['default'](mapStateToProps, function (state) {
var formState = getFormState(state, reduxMountPoint);
if (!formState) {
throw new Error('You need to mount the redux-form reducer at "' + reduxMountPoint + '"');
}
return formState && formState[formName] && formState[formName][formKey];
}), _wrapMapDispatchToProps2['default'](mapDispatchToProps, _bindActionData2['default'](unboundActions, { form: formName, key: formKey }))) : _reactRedux.connect(_wrapMapStateToProps2['default'](mapStateToProps, function (state) {
var formState = getFormState(state, reduxMountPoint);
if (!formState) {
throw new Error('You need to mount the redux-form reducer at "' + reduxMountPoint + '"');
}
return formState && formState[formName];
}), _wrapMapDispatchToProps2['default'](mapDispatchToProps, _bindActionData2['default'](unboundActions, { form: formName })));
return decorate(ReduxForm);
};
};
exports['default'] = createHigherOrderComponent;
module.exports = exports['default'];
/***/ },
/* 28 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _createReduxFormConnector = __webpack_require__(29);
var _createReduxFormConnector2 = _interopRequireDefault(_createReduxFormConnector);
var _hoistNonReactStatics = __webpack_require__(17);
var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
/**
* The decorator that is the main API to redux-form
*/
var createReduxForm = function createReduxForm(isReactNative, React) {
var Component = React.Component;
var reduxFormConnector = _createReduxFormConnector2['default'](isReactNative, React);
return function (config, mapStateToProps, mapDispatchToProps) {
return function (WrappedComponent) {
var ReduxFormConnector = reduxFormConnector(WrappedComponent, mapStateToProps, mapDispatchToProps);
var configWithDefaults = _extends({
touchOnBlur: true,
touchOnChange: false,
destroyOnUnmount: true
}, config);
var ConnectedForm = (function (_Component) {
_inherits(ConnectedForm, _Component);
function ConnectedForm() {
_classCallCheck(this, ConnectedForm);
_Component.apply(this, arguments);
}
ConnectedForm.prototype.render = function render() {
return React.createElement(ReduxFormConnector, _extends({}, configWithDefaults, this.props));
};
return ConnectedForm;
})(Component);
return _hoistNonReactStatics2['default'](ConnectedForm, WrappedComponent);
};
};
};
exports['default'] = createReduxForm;
module.exports = exports['default'];
/***/ },
/* 29 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _reactLazyCache = __webpack_require__(46);
var _reactLazyCache2 = _interopRequireDefault(_reactLazyCache);
var _getDisplayName = __webpack_require__(11);
var _getDisplayName2 = _interopRequireDefault(_getDisplayName);
var _createHigherOrderComponent = __webpack_require__(27);
var _createHigherOrderComponent2 = _interopRequireDefault(_createHigherOrderComponent);
/**
* This component tracks props that affect how the form is mounted to the store. Normally these should not change,
* but if they do, the connected components below it need to be redefined.
*/
var createReduxFormConnector = function createReduxFormConnector(isReactNative, React) {
return function (WrappedComponent, mapStateToProps, mapDispatchToProps) {
var Component = React.Component;
var PropTypes = React.PropTypes;
var ReduxFormConnector = (function (_Component) {
_inherits(ReduxFormConnector, _Component);
function ReduxFormConnector(props) {
_classCallCheck(this, ReduxFormConnector);
_Component.call(this, props);
this.cache = _reactLazyCache2['default'](this, {
ReduxForm: {
params: [
// props that effect how redux-form connects to the redux store
'reduxMountPoint', 'form', 'formKey', 'getFormState'],
fn: _createHigherOrderComponent2['default'](props, isReactNative, React, WrappedComponent, mapStateToProps, mapDispatchToProps)
}
});
}
ReduxFormConnector.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
this.cache.componentWillReceiveProps(nextProps);
};
ReduxFormConnector.prototype.render = function render() {
var ReduxForm = this.cache.ReduxForm;
// remove some redux-form config-only props
var _props = this.props;
var reduxMountPoint = _props.reduxMountPoint;
var destroyOnUnmount = _props.destroyOnUnmount;
var form = _props.form;
var getFormState = _props.getFormState;
var touchOnBlur = _props.touchOnBlur;
var touchOnChange = _props.touchOnChange;
var passableProps = _objectWithoutProperties(_props, ['reduxMountPoint', 'destroyOnUnmount', 'form', 'getFormState', 'touchOnBlur', 'touchOnChange']);
// eslint-disable-line no-redeclare
return React.createElement(ReduxForm, passableProps);
};
return ReduxFormConnector;
})(Component);
ReduxFormConnector.displayName = 'ReduxFormConnector(' + _getDisplayName2['default'](WrappedComponent) + ')';
ReduxFormConnector.WrappedComponent = WrappedComponent;
ReduxFormConnector.propTypes = {
destroyOnUnmount: PropTypes.bool,
reduxMountPoint: PropTypes.string,
form: PropTypes.string.isRequired,
formKey: PropTypes.string,
getFormState: PropTypes.func,
touchOnBlur: PropTypes.bool,
touchOnChange: PropTypes.bool
};
ReduxFormConnector.defaultProps = {
reduxMountPoint: 'form',
getFormState: function getFormState(state, reduxMountPoint) {
return state[reduxMountPoint];
}
};
return ReduxFormConnector;
};
};
exports['default'] = createReduxFormConnector;
module.exports = exports['default'];
/***/ },
/* 30 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _getValue = __webpack_require__(8);
var _getValue2 = _interopRequireDefault(_getValue);
var createOnBlur = function createOnBlur(name, blur, isReactNative, afterBlur) {
return function (event) {
var value = _getValue2['default'](event, isReactNative);
blur(name, value);
if (afterBlur) {
afterBlur(name, value);
}
};
};
exports['default'] = createOnBlur;
module.exports = exports['default'];
/***/ },
/* 31 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _getValue = __webpack_require__(8);
var _getValue2 = _interopRequireDefault(_getValue);
var createOnChange = function createOnChange(name, change, isReactNative) {
return function (event) {
return change(name, _getValue2['default'](event, isReactNative));
};
};
exports['default'] = createOnChange;
module.exports = exports['default'];
/***/ },
/* 32 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _createOnDragStart = __webpack_require__(7);
var createOnDrop = function createOnDrop(name, change) {
return function (event) {
change(name, event.dataTransfer.getData(_createOnDragStart.dataKey));
};
};
exports['default'] = createOnDrop;
module.exports = exports['default'];
/***/ },
/* 33 */
/***/ function(module, exports) {
"use strict";
exports.__esModule = true;
var createOnFocus = function createOnFocus(name, focus) {
return function () {
return focus(name);
};
};
exports["default"] = createOnFocus;
module.exports = exports["default"];
/***/ },
/* 34 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _silenceEvent = __webpack_require__(10);
var _silenceEvent2 = _interopRequireDefault(_silenceEvent);
var silenceEvents = function silenceEvents(fn) {
return function (event) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return _silenceEvent2['default'](event) ? fn.apply(undefined, args) : fn.apply(undefined, [event].concat(args));
};
};
exports['default'] = silenceEvents;
module.exports = exports['default'];
/***/ },
/* 35 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _isPromise = __webpack_require__(4);
var _isPromise2 = _interopRequireDefault(_isPromise);
var _isValid = __webpack_require__(1);
var _isValid2 = _interopRequireDefault(_isValid);
var handleSubmit = function handleSubmit(submit, values, props, asyncValidate) {
var dispatch = props.dispatch;
var fields = props.fields;
var startSubmit = props.startSubmit;
var stopSubmit = props.stopSubmit;
var submitFailed = props.submitFailed;
var returnRejectedSubmitPromise = props.returnRejectedSubmitPromise;
var touch = props.touch;
var validate = props.validate;
var syncErrors = validate(values, props);
touch.apply(undefined, fields); // touch all fields
if (_isValid2['default'](syncErrors)) {
var doSubmit = function doSubmit() {
var result = submit(values, dispatch);
if (_isPromise2['default'](result)) {
startSubmit();
return result.then(function (submitResult) {
stopSubmit();
return submitResult;
}, function (submitError) {
stopSubmit(submitError);
if (returnRejectedSubmitPromise) {
return Promise.reject(submitError);
}
});
}
return result;
};
var asyncValidateResult = asyncValidate();
return _isPromise2['default'](asyncValidateResult) ?
// asyncValidateResult will be rejected if async validation failed
asyncValidateResult.then(doSubmit, function () {
submitFailed();
return returnRejectedSubmitPromise ? Promise.reject() : Promise.resolve();
}) : doSubmit(); // no async validation, so submit
}
submitFailed();
};
exports['default'] = handleSubmit;
module.exports = exports['default'];
/***/ },
/* 36 */
/***/ function(module, exports) {
'use strict';
exports.__esModule = true;
exports['default'] = isPristine;
function isPristine(initial, data) {
if (initial === data) {
return true;
}
if (typeof initial === 'boolean' || typeof data === 'boolean') {
return initial === data;
} else if (initial instanceof Date && data instanceof Date) {
return initial.getDate() === data.getDate();
} else if (initial && typeof initial === 'object') {
if (!data || typeof data !== 'object') {
return false;
}
var initialKeys = Object.keys(initial);
var dataKeys = Object.keys(data);
if (initialKeys.length !== dataKeys.length) {
return false;
}
for (var index = 0; index < dataKeys.length; index++) {
var key = dataKeys[index];
if (!isPristine(initial[key], data[key])) {
return false;
}
}
} else if (initial || data) {
// allow '' to equate to undefined or null
return initial === data;
}
return true;
}
module.exports = exports['default'];
/***/ },
/* 37 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _eventsCreateOnBlur = __webpack_require__(30);
var _eventsCreateOnBlur2 = _interopRequireDefault(_eventsCreateOnBlur);
var _eventsCreateOnChange = __webpack_require__(31);
var _eventsCreateOnChange2 = _interopRequireDefault(_eventsCreateOnChange);
var _eventsCreateOnDragStart = __webpack_require__(7);
var _eventsCreateOnDragStart2 = _interopRequireDefault(_eventsCreateOnDragStart);
var _eventsCreateOnDrop = __webpack_require__(32);
var _eventsCreateOnDrop2 = _interopRequireDefault(_eventsCreateOnDrop);
var _eventsCreateOnFocus = __webpack_require__(33);
var _eventsCreateOnFocus2 = _interopRequireDefault(_eventsCreateOnFocus);
var _silencePromise = __webpack_require__(39);
var _silencePromise2 = _interopRequireDefault(_silencePromise);
var _read = __webpack_require__(13);
var _read2 = _interopRequireDefault(_read);
var _updateField = __webpack_require__(40);
var _updateField2 = _interopRequireDefault(_updateField);
var readField = function readField(_x, _x2, _x3, _x4, _x5, _x6, _x7, _x8) {
var _again = true;
_function: while (_again) {
var state = _x,
fieldName = _x2,
pathToHere = _x3,
fields = _x4,
syncErrors = _x5,
asyncValidate = _x6,
isReactNative = _x7,
props = _x8;
if (pathToHere === undefined) pathToHere = '';
_again = false;
var asyncBlurFields = props.asyncBlurFields;
var blur = props.blur;
var change = props.change;
var focus = props.focus;
var form = props.form;
var initialValues = props.initialValues;
var readonly = props.readonly;
var addArrayValue = props.addArrayValue;
var removeArrayValue = props.removeArrayValue;
var dotIndex = fieldName.indexOf('.');
var openIndex = fieldName.indexOf('[');
var closeIndex = fieldName.indexOf(']');
if (openIndex > 0 && closeIndex !== openIndex + 1) {
throw new Error('found [ not followed by ]');
}
if (openIndex > 0 && (dotIndex < 0 || openIndex < dotIndex)) {
var _ret = (function () {
// array field
var key = fieldName.substring(0, openIndex);
var rest = fieldName.substring(closeIndex + 1);
if (rest[0] === '.') {
rest = rest.substring(1);
}
var stateArray = state && state[key] || [];
if (!fields[key]) {
fields[key] = [];
fields[key].addField = function (value, index) {
addArrayValue(pathToHere + key, value, index);
};
fields[key].removeField = function (index) {
removeArrayValue(pathToHere + key, index);
};
}
var fieldArray = fields[key];
stateArray.forEach(function (fieldState, index) {
if (rest && !fieldArray[index]) {
fieldArray[index] = {};
}
var dest = rest ? fieldArray[index] : {};
var result = readField(fieldState, rest, '' + pathToHere + key + '[' + index + ']' + (rest ? '.' : ''), dest, syncErrors, asyncValidate, isReactNative, props);
if (!rest) {
// if nothing after [] in field name, assign directly to array
fieldArray[index] = result;
}
});
if (fieldArray.length > stateArray.length) {
// remove extra items that aren't in state array
fieldArray.splice(stateArray.length, fieldArray.length - stateArray.length);
}
return {
v: fieldArray
};
})();
if (typeof _ret === 'object') return _ret.v;
}
if (dotIndex > 0) {
// subobject field
var key = fieldName.substring(0, dotIndex);
var rest = fieldName.substring(dotIndex + 1);
if (!fields[key]) {
fields[key] = {};
}
_x = state[key] || {};
_x2 = rest;
_x3 = pathToHere + key + '.';
_x4 = fields[key];
_x5 = syncErrors;
_x6 = asyncValidate;
_x7 = isReactNative;
_x8 = props;
_again = true;
asyncBlurFields = blur = change = focus = form = initialValues = readonly = addArrayValue = removeArrayValue = dotIndex = openIndex = closeIndex = _ret = key = rest = undefined;
continue _function;
}
var name = pathToHere + fieldName;
var field = fields[fieldName] || {};
if (field.name !== name) {
var onChange = _eventsCreateOnChange2['default'](name, change, isReactNative);
var initialValue = _read2['default'](name, initialValues);
field.name = name;
field.defaultChecked = initialValue === true;
field.defaultValue = initialValue;
field.initialValue = initialValue;
if (!readonly) {
field.onBlur = _eventsCreateOnBlur2['default'](name, blur, isReactNative, ~asyncBlurFields.indexOf(name) && function (blurName, blurValue) {
return _silencePromise2['default'](asyncValidate(blurName, blurValue));
});
field.onChange = onChange;
field.onDragStart = _eventsCreateOnDragStart2['default'](name, function () {
return field.value;
});
field.onDrop = _eventsCreateOnDrop2['default'](name, change);
field.onFocus = _eventsCreateOnFocus2['default'](name, focus);
field.onUpdate = onChange; // alias to support belle. https://github.com/nikgraf/belle/issues/58
}
field.valid = true;
field.invalid = false;
}
var fieldState = (fieldName ? state[fieldName] : state) || {};
var syncError = _read2['default'](name, syncErrors);
var updated = _updateField2['default'](field, fieldState, name === form._active, syncError);
if (fieldName || fields[fieldName] !== updated) {
fields[fieldName] = updated;
}
return updated;
}
};
exports['default'] = readField;
module.exports = exports['default'];
/***/ },
/* 38 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _readField = __webpack_require__(37);
var _readField2 = _interopRequireDefault(_readField);
var _write = __webpack_require__(15);
var _write2 = _interopRequireDefault(_write);
var _getValues = __webpack_require__(12);
var _getValues2 = _interopRequireDefault(_getValues);
/**
* Reads props and generates (or updates) field structure
*/
var readFields = function readFields(props, myFields, asyncValidate, isReactNative) {
var fields = props.fields;
var form = props.form;
var validate = props.validate;
var values = _getValues2['default'](fields, form);
var syncErrors = validate(values, props);
var errors = {};
var formError = syncErrors._error || form._error;
var allValid = !formError;
var allPristine = true;
var fieldObjects = _extends({}, myFields);
fields.forEach(function (name) {
var result = _readField2['default'](form, name, undefined, fieldObjects, syncErrors, asyncValidate, isReactNative, props);
if (result.invalid) {
allValid = false;
}
if (result.dirty) {
allPristine = false;
}
if (result.error) {
errors = _write2['default'](name, result.error, errors);
}
});
Object.defineProperty(fieldObjects, '_meta', {
value: {
allPristine: allPristine,
allValid: allValid,
values: values,
errors: errors,
formError: formError
}
});
return fieldObjects;
};
exports['default'] = readFields;
module.exports = exports['default'];
/***/ },
/* 39 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _isPromise = __webpack_require__(4);
var _isPromise2 = _interopRequireDefault(_isPromise);
var noop = function noop() {
return undefined;
};
var silencePromise = function silencePromise(promise) {
return _isPromise2['default'](promise) ? promise.then(noop, noop) : promise;
};
exports['default'] = silencePromise;
module.exports = exports['default'];
/***/ },
/* 40 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _isPristine = __webpack_require__(36);
var _isPristine2 = _interopRequireDefault(_isPristine);
var _isValid = __webpack_require__(1);
var _isValid2 = _interopRequireDefault(_isValid);
/**
* Updates a field object from the store values
*/
var updateField = function updateField(field, formField, active, syncError) {
var diff = {};
// update field value
if (field.value !== formField.value) {
diff.value = formField.value;
diff.checked = typeof formField.value === 'boolean' ? formField.value : undefined;
}
// update dirty/pristine
var pristine = _isPristine2['default'](formField.value, formField.initial);
if (field.pristine !== pristine) {
diff.dirty = !pristine;
diff.pristine = pristine;
}
// update field error
var error = syncError || formField.submitError || formField.asyncError;
if (error !== field.error) {
diff.error = error;
}
var valid = _isValid2['default'](error);
if (field.valid !== valid) {
diff.invalid = !valid;
diff.valid = valid;
}
if (active !== field.active) {
diff.active = active;
}
var touched = !!formField.touched;
if (touched !== field.touched) {
diff.touched = touched;
}
var visited = !!formField.visited;
if (visited !== field.visited) {
diff.visited = visited;
}
return Object.keys(diff).length ? _extends({}, field, diff) : field;
};
exports['default'] = updateField;
module.exports = exports['default'];
/***/ },
/* 41 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _redux = __webpack_require__(20);
var wrapMapDispatchToProps = function wrapMapDispatchToProps(mapDispatchToProps, actionCreators) {
if (mapDispatchToProps) {
if (typeof mapDispatchToProps === 'function') {
if (mapDispatchToProps.length > 1) {
return function (dispatch, ownProps) {
return _extends({}, mapDispatchToProps(dispatch, ownProps), _redux.bindActionCreators(actionCreators, dispatch), {
dispatch: dispatch
});
};
}
return function (dispatch) {
return _extends({}, mapDispatchToProps(dispatch), _redux.bindActionCreators(actionCreators, dispatch), {
dispatch: dispatch
});
};
}
return function (dispatch) {
return _extends({}, _redux.bindActionCreators(mapDispatchToProps, dispatch), _redux.bindActionCreators(actionCreators, dispatch), {
dispatch: dispatch
});
};
}
return function (dispatch) {
return _extends({}, _redux.bindActionCreators(actionCreators, dispatch), {
dispatch: dispatch
});
};
};
exports['default'] = wrapMapDispatchToProps;
module.exports = exports['default'];
/***/ },
/* 42 */
/***/ function(module, exports) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var wrapMapStateToProps = function wrapMapStateToProps(mapStateToProps, getForm) {
if (mapStateToProps) {
if (typeof mapStateToProps !== 'function') {
throw new Error('mapStateToProps must be a function');
}
if (mapStateToProps.length > 1) {
return function (state, ownProps) {
return _extends({}, mapStateToProps(state, ownProps), {
form: getForm(state)
});
};
}
return function (state) {
return _extends({}, mapStateToProps(state), {
form: getForm(state)
});
};
}
return function (state) {
return {
form: getForm(state)
};
};
};
exports['default'] = wrapMapStateToProps;
module.exports = exports['default'];
/***/ },
/* 43 */
/***/ function(module, exports) {
var supportsArgumentsClass = (function(){
return Object.prototype.toString.call(arguments)
})() == '[object Arguments]';
exports = module.exports = supportsArgumentsClass ? supported : unsupported;
exports.supported = supported;
function supported(object) {
return Object.prototype.toString.call(object) == '[object Arguments]';
};
exports.unsupported = unsupported;
function unsupported(object){
return object &&
typeof object == 'object' &&
typeof object.length == 'number' &&
Object.prototype.hasOwnProperty.call(object, 'callee') &&
!Object.prototype.propertyIsEnumerable.call(object, 'callee') ||
false;
};
/***/ },
/* 44 */
/***/ function(module, exports) {
exports = module.exports = typeof Object.keys === 'function'
? Object.keys : shim;
exports.shim = shim;
function shim (obj) {
var keys = [];
for (var key in obj) keys.push(key);
return keys;
}
/***/ },
/* 45 */
/***/ function(module, exports, __webpack_require__) {
/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule invariant
*/
'use strict';
/**
* Use invariant() to assert state which your program assumes to be true.
*
* Provide sprintf-style format (only %s is supported) and arguments
* to provide information about what broke and what you were
* expecting.
*
* The invariant message will be stripped in production, but the invariant
* will remain to ensure logic does not differ in production.
*/
var invariant = function(condition, format, a, b, c, d, e, f) {
if (true) {
if (format === undefined) {
throw new Error('invariant requires an error message argument');
}
}
if (!condition) {
var error;
if (format === undefined) {
error = new Error(
'Minified exception occurred; use the non-minified dev environment ' +
'for the full error message and additional helpful warnings.'
);
} else {
var args = [a, b, c, d, e, f];
var argIndex = 0;
error = new Error(
'Invariant Violation: ' +
format.replace(/%s/g, function() { return args[argIndex++]; })
);
}
error.framesToPop = 1; // we don't care about invariant's own frame
throw error;
}
};
module.exports = invariant;
/***/ },
/* 46 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _lazyCache = __webpack_require__(47);
var _lazyCache2 = _interopRequireDefault(_lazyCache);
exports['default'] = _lazyCache2['default'];
module.exports = exports['default'];
/***/ },
/* 47 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports['default'] = lazyCache;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _deepEqual = __webpack_require__(16);
var _deepEqual2 = _interopRequireDefault(_deepEqual);
function lazyCache(component, calculators) {
var allProps = [];
var cache = {};
var api = {};
var uncache = function uncache(changedProp) {
Object.keys(cache).forEach(function (key) {
if (~cache[key].props.indexOf(changedProp)) {
delete cache[key].value;
uncache(key);
}
});
};
Object.keys(calculators).forEach(function (key) {
var fn = calculators[key].fn;
var props = calculators[key].params;
props.forEach(function (param) {
if (! ~allProps.indexOf(param)) {
allProps.push(param);
}
});
cache[key] = { props: props };
Object.defineProperty(api, key, {
get: function get() {
var cached = cache[key];
if (cached && cached.value !== undefined) {
return cached.value;
}
var params = props.map(function (prop) {
return component.props[prop] || api[prop];
});
var value = fn.apply(undefined, params);
cache[key] = { props: props, value: value };
return value;
}
});
});
api.componentWillReceiveProps = function (nextProps) {
var diffProps = [];
allProps.forEach(function (prop) {
if (!_deepEqual2['default'](component.props[prop], nextProps[prop])) {
diffProps.push(prop);
}
});
diffProps.forEach(uncache);
};
return api;
}
module.exports = exports['default'];
/***/ },
/* 48 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports['default'] = createAll;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _createProvider = __webpack_require__(50);
var _createProvider2 = _interopRequireDefault(_createProvider);
var _createConnect = __webpack_require__(49);
var _createConnect2 = _interopRequireDefault(_createConnect);
function createAll(React) {
var Provider = _createProvider2['default'](React);
var connect = _createConnect2['default'](React);
return { Provider: Provider, connect: connect };
}
module.exports = exports['default'];
/***/ },
/* 49 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
exports['default'] = createConnect;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _utilsCreateStoreShape = __webpack_require__(18);
var _utilsCreateStoreShape2 = _interopRequireDefault(_utilsCreateStoreShape);
var _utilsShallowEqual = __webpack_require__(53);
var _utilsShallowEqual2 = _interopRequireDefault(_utilsShallowEqual);
var _utilsIsPlainObject = __webpack_require__(52);
var _utilsIsPlainObject2 = _interopRequireDefault(_utilsIsPlainObject);
var _utilsWrapActionCreators = __webpack_require__(54);
var _utilsWrapActionCreators2 = _interopRequireDefault(_utilsWrapActionCreators);
var _hoistNonReactStatics = __webpack_require__(17);
var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
var _invariant = __webpack_require__(45);
var _invariant2 = _interopRequireDefault(_invariant);
var defaultMapStateToProps = function defaultMapStateToProps() {
return {};
};
var defaultMapDispatchToProps = function defaultMapDispatchToProps(dispatch) {
return { dispatch: dispatch };
};
var defaultMergeProps = function defaultMergeProps(stateProps, dispatchProps, parentProps) {
return _extends({}, parentProps, stateProps, dispatchProps);
};
function getDisplayName(Component) {
return Component.displayName || Component.name || 'Component';
}
// Helps track hot reloading.
var nextVersion = 0;
function createConnect(React) {
var Component = React.Component;
var PropTypes = React.PropTypes;
var storeShape = _utilsCreateStoreShape2['default'](PropTypes);
return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {
var options = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3];
var shouldSubscribe = Boolean(mapStateToProps);
var finalMapStateToProps = mapStateToProps || defaultMapStateToProps;
var finalMapDispatchToProps = _utilsIsPlainObject2['default'](mapDispatchToProps) ? _utilsWrapActionCreators2['default'](mapDispatchToProps) : mapDispatchToProps || defaultMapDispatchToProps;
var finalMergeProps = mergeProps || defaultMergeProps;
var shouldUpdateStateProps = finalMapStateToProps.length > 1;
var shouldUpdateDispatchProps = finalMapDispatchToProps.length > 1;
var _options$pure = options.pure;
var pure = _options$pure === undefined ? true : _options$pure;
// Helps track hot reloading.
var version = nextVersion++;
function computeStateProps(store, props) {
var state = store.getState();
var stateProps = shouldUpdateStateProps ? finalMapStateToProps(state, props) : finalMapStateToProps(state);
_invariant2['default'](_utilsIsPlainObject2['default'](stateProps), '`mapStateToProps` must return an object. Instead received %s.', stateProps);
return stateProps;
}
function computeDispatchProps(store, props) {
var dispatch = store.dispatch;
var dispatchProps = shouldUpdateDispatchProps ? finalMapDispatchToProps(dispatch, props) : finalMapDispatchToProps(dispatch);
_invariant2['default'](_utilsIsPlainObject2['default'](dispatchProps), '`mapDispatchToProps` must return an object. Instead received %s.', dispatchProps);
return dispatchProps;
}
function _computeNextState(stateProps, dispatchProps, parentProps) {
var mergedProps = finalMergeProps(stateProps, dispatchProps, parentProps);
_invariant2['default'](_utilsIsPlainObject2['default'](mergedProps), '`mergeProps` must return an object. Instead received %s.', mergedProps);
return mergedProps;
}
return function wrapWithConnect(WrappedComponent) {
var Connect = (function (_Component) {
_inherits(Connect, _Component);
Connect.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps, nextState) {
if (!pure) {
this.updateStateProps(nextProps);
this.updateDispatchProps(nextProps);
this.updateState(nextProps);
return true;
}
var storeChanged = nextState.storeState !== this.state.storeState;
var propsChanged = !_utilsShallowEqual2['default'](nextProps, this.props);
var mapStateProducedChange = false;
var dispatchPropsChanged = false;
if (storeChanged || propsChanged && shouldUpdateStateProps) {
mapStateProducedChange = this.updateStateProps(nextProps);
}
if (propsChanged && shouldUpdateDispatchProps) {
dispatchPropsChanged = this.updateDispatchProps(nextProps);
}
if (propsChanged || mapStateProducedChange || dispatchPropsChanged) {
this.updateState(nextProps);
return true;
}
return false;
};
function Connect(props, context) {
_classCallCheck(this, Connect);
_Component.call(this, props, context);
this.version = version;
this.store = props.store || context.store;
_invariant2['default'](this.store, 'Could not find "store" in either the context or ' + ('props of "' + this.constructor.displayName + '". ') + 'Either wrap the root component in a <Provider>, ' + ('or explicitly pass "store" as a prop to "' + this.constructor.displayName + '".'));
this.stateProps = computeStateProps(this.store, props);
this.dispatchProps = computeDispatchProps(this.store, props);
this.state = { storeState: null };
this.updateState();
}
Connect.prototype.computeNextState = function computeNextState() {
var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0];
return _computeNextState(this.stateProps, this.dispatchProps, props);
};
Connect.prototype.updateStateProps = function updateStateProps() {
var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0];
var nextStateProps = computeStateProps(this.store, props);
if (_utilsShallowEqual2['default'](nextStateProps, this.stateProps)) {
return false;
}
this.stateProps = nextStateProps;
return true;
};
Connect.prototype.updateDispatchProps = function updateDispatchProps() {
var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0];
var nextDispatchProps = computeDispatchProps(this.store, props);
if (_utilsShallowEqual2['default'](nextDispatchProps, this.dispatchProps)) {
return false;
}
this.dispatchProps = nextDispatchProps;
return true;
};
Connect.prototype.updateState = function updateState() {
var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0];
this.nextState = this.computeNextState(props);
};
Connect.prototype.isSubscribed = function isSubscribed() {
return typeof this.unsubscribe === 'function';
};
Connect.prototype.trySubscribe = function trySubscribe() {
if (shouldSubscribe && !this.unsubscribe) {
this.unsubscribe = this.store.subscribe(this.handleChange.bind(this));
this.handleChange();
}
};
Connect.prototype.tryUnsubscribe = function tryUnsubscribe() {
if (this.unsubscribe) {
this.unsubscribe();
this.unsubscribe = null;
}
};
Connect.prototype.componentDidMount = function componentDidMount() {
this.trySubscribe();
};
Connect.prototype.componentWillUnmount = function componentWillUnmount() {
this.tryUnsubscribe();
};
Connect.prototype.handleChange = function handleChange() {
if (!this.unsubscribe) {
return;
}
this.setState({
storeState: this.store.getState()
});
};
Connect.prototype.getWrappedInstance = function getWrappedInstance() {
return this.refs.wrappedInstance;
};
Connect.prototype.render = function render() {
return React.createElement(WrappedComponent, _extends({ ref: 'wrappedInstance'
}, this.nextState));
};
return Connect;
})(Component);
Connect.displayName = 'Connect(' + getDisplayName(WrappedComponent) + ')';
Connect.WrappedComponent = WrappedComponent;
Connect.contextTypes = {
store: storeShape
};
Connect.propTypes = {
store: storeShape
};
if (true) {
Connect.prototype.componentWillUpdate = function componentWillUpdate() {
if (this.version === version) {
return;
}
// We are hot reloading!
this.version = version;
// Update the state and bindings.
this.trySubscribe();
this.updateStateProps();
this.updateDispatchProps();
this.updateState();
};
}
return _hoistNonReactStatics2['default'](Connect, WrappedComponent);
};
};
}
module.exports = exports['default'];
/***/ },
/* 50 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports['default'] = createProvider;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _utilsCreateStoreShape = __webpack_require__(18);
var _utilsCreateStoreShape2 = _interopRequireDefault(_utilsCreateStoreShape);
function isUsingOwnerContext(React) {
var version = React.version;
if (typeof version !== 'string') {
return true;
}
var sections = version.split('.');
var major = parseInt(sections[0], 10);
var minor = parseInt(sections[1], 10);
return major === 0 && minor === 13;
}
function createProvider(React) {
var Component = React.Component;
var PropTypes = React.PropTypes;
var Children = React.Children;
var storeShape = _utilsCreateStoreShape2['default'](PropTypes);
var requireFunctionChild = isUsingOwnerContext(React);
var didWarnAboutChild = false;
function warnAboutFunctionChild() {
if (didWarnAboutChild || requireFunctionChild) {
return;
}
didWarnAboutChild = true;
console.error( // eslint-disable-line no-console
'With React 0.14 and later versions, you no longer need to ' + 'wrap <Provider> child into a function.');
}
function warnAboutElementChild() {
if (didWarnAboutChild || !requireFunctionChild) {
return;
}
didWarnAboutChild = true;
console.error( // eslint-disable-line no-console
'With React 0.13, you need to ' + 'wrap <Provider> child into a function. ' + 'This restriction will be removed with React 0.14.');
}
var didWarnAboutReceivingStore = false;
function warnAboutReceivingStore() {
if (didWarnAboutReceivingStore) {
return;
}
didWarnAboutReceivingStore = true;
console.error( // eslint-disable-line no-console
'<Provider> does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/rackt/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.');
}
var Provider = (function (_Component) {
_inherits(Provider, _Component);
Provider.prototype.getChildContext = function getChildContext() {
return { store: this.store };
};
function Provider(props, context) {
_classCallCheck(this, Provider);
_Component.call(this, props, context);
this.store = props.store;
}
Provider.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
var store = this.store;
var nextStore = nextProps.store;
if (store !== nextStore) {
warnAboutReceivingStore();
}
};
Provider.prototype.render = function render() {
var children = this.props.children;
if (typeof children === 'function') {
warnAboutFunctionChild();
children = children();
} else {
warnAboutElementChild();
}
return Children.only(children);
};
return Provider;
})(Component);
Provider.childContextTypes = {
store: storeShape.isRequired
};
Provider.propTypes = {
store: storeShape.isRequired,
children: (requireFunctionChild ? PropTypes.func : PropTypes.element).isRequired
};
return Provider;
}
module.exports = exports['default'];
/***/ },
/* 51 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _react = __webpack_require__(24);
var _react2 = _interopRequireDefault(_react);
var _componentsCreateAll = __webpack_require__(48);
var _componentsCreateAll2 = _interopRequireDefault(_componentsCreateAll);
var _createAll = _componentsCreateAll2['default'](_react2['default']);
var Provider = _createAll.Provider;
var connect = _createAll.connect;
exports.Provider = Provider;
exports.connect = connect;
/***/ },
/* 52 */
/***/ function(module, exports) {
'use strict';
exports.__esModule = true;
exports['default'] = isPlainObject;
var fnToString = function fnToString(fn) {
return Function.prototype.toString.call(fn);
};
/**
* @param {any} obj The object to inspect.
* @returns {boolean} True if the argument appears to be a plain object.
*/
function isPlainObject(obj) {
if (!obj || typeof obj !== 'object') {
return false;
}
var proto = typeof obj.constructor === 'function' ? Object.getPrototypeOf(obj) : Object.prototype;
if (proto === null) {
return true;
}
var constructor = proto.constructor;
return typeof constructor === 'function' && constructor instanceof constructor && fnToString(constructor) === fnToString(Object);
}
module.exports = exports['default'];
/***/ },
/* 53 */
/***/ function(module, exports) {
"use strict";
exports.__esModule = true;
exports["default"] = shallowEqual;
function shallowEqual(objA, objB) {
if (objA === objB) {
return true;
}
var keysA = Object.keys(objA);
var keysB = Object.keys(objB);
if (keysA.length !== keysB.length) {
return false;
}
// Test for A's keys different from B.
var hasOwn = Object.prototype.hasOwnProperty;
for (var i = 0; i < keysA.length; i++) {
if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) {
return false;
}
}
return true;
}
module.exports = exports["default"];
/***/ },
/* 54 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports['default'] = wrapActionCreators;
var _redux = __webpack_require__(20);
function wrapActionCreators(actionCreators) {
return function (dispatch) {
return _redux.bindActionCreators(actionCreators, dispatch);
};
}
module.exports = exports['default'];
/***/ },
/* 55 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
exports['default'] = applyMiddleware;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _compose = __webpack_require__(21);
var _compose2 = _interopRequireDefault(_compose);
/**
* Creates a store enhancer that applies middleware to the dispatch method
* of the Redux store. This is handy for a variety of tasks, such as expressing
* asynchronous actions in a concise manner, or logging every action payload.
*
* See `redux-thunk` package as an example of the Redux middleware.
*
* Because middleware is potentially asynchronous, this should be the first
* store enhancer in the composition chain.
*
* Note that each middleware will be given the `dispatch` and `getState` functions
* as named arguments.
*
* @param {...Function} middlewares The middleware chain to be applied.
* @returns {Function} A store enhancer applying the middleware.
*/
function applyMiddleware() {
for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {
middlewares[_key] = arguments[_key];
}
return function (next) {
return function (reducer, initialState) {
var store = next(reducer, initialState);
var _dispatch = store.dispatch;
var chain = [];
var middlewareAPI = {
getState: store.getState,
dispatch: function dispatch(action) {
return _dispatch(action);
}
};
chain = middlewares.map(function (middleware) {
return middleware(middlewareAPI);
});
_dispatch = _compose2['default'].apply(undefined, chain)(store.dispatch);
return _extends({}, store, {
dispatch: _dispatch
});
};
};
}
module.exports = exports['default'];
/***/ },
/* 56 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports['default'] = bindActionCreators;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _utilsMapValues = __webpack_require__(23);
var _utilsMapValues2 = _interopRequireDefault(_utilsMapValues);
function bindActionCreator(actionCreator, dispatch) {
return function () {
return dispatch(actionCreator.apply(undefined, arguments));
};
}
/**
* Turns an object whose values are action creators, into an object with the
* same keys, but with every function wrapped into a `dispatch` call so they
* may be invoked directly. This is just a convenience method, as you can call
* `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
*
* For convenience, you can also pass a single function as the first argument,
* and get a function in return.
*
* @param {Function|Object} actionCreators An object whose values are action
* creator functions. One handy way to obtain it is to use ES6 `import * as`
* syntax. You may also pass a single function.
*
* @param {Function} dispatch The `dispatch` function available on your Redux
* store.
*
* @returns {Function|Object} The object mimicking the original object, but with
* every action creator wrapped into the `dispatch` call. If you passed a
* function as `actionCreators`, the return value will also be a single
* function.
*/
function bindActionCreators(actionCreators, dispatch) {
if (typeof actionCreators === 'function') {
return bindActionCreator(actionCreators, dispatch);
}
if (typeof actionCreators !== 'object' || actionCreators === null || actionCreators === undefined) {
// eslint-disable-line no-eq-null
throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');
}
return _utilsMapValues2['default'](actionCreators, function (actionCreator) {
return bindActionCreator(actionCreator, dispatch);
});
}
module.exports = exports['default'];
/***/ },
/* 57 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports['default'] = combineReducers;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _createStore = __webpack_require__(19);
var _utilsIsPlainObject = __webpack_require__(22);
var _utilsIsPlainObject2 = _interopRequireDefault(_utilsIsPlainObject);
var _utilsMapValues = __webpack_require__(23);
var _utilsMapValues2 = _interopRequireDefault(_utilsMapValues);
var _utilsPick = __webpack_require__(58);
var _utilsPick2 = _interopRequireDefault(_utilsPick);
/* eslint-disable no-console */
function getUndefinedStateErrorMessage(key, action) {
var actionType = action && action.type;
var actionName = actionType && '"' + actionType.toString() + '"' || 'an action';
return 'Reducer "' + key + '" returned undefined handling ' + actionName + '. ' + 'To ignore an action, you must explicitly return the previous state.';
}
function getUnexpectedStateKeyWarningMessage(inputState, outputState, action) {
var reducerKeys = Object.keys(outputState);
var argumentName = action && action.type === _createStore.ActionTypes.INIT ? 'initialState argument passed to createStore' : 'previous state received by the reducer';
if (reducerKeys.length === 0) {
return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
}
if (!_utilsIsPlainObject2['default'](inputState)) {
return 'The ' + argumentName + ' has unexpected type of "' + ({}).toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"');
}
var unexpectedKeys = Object.keys(inputState).filter(function (key) {
return reducerKeys.indexOf(key) < 0;
});
if (unexpectedKeys.length > 0) {
return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.');
}
}
function assertReducerSanity(reducers) {
Object.keys(reducers).forEach(function (key) {
var reducer = reducers[key];
var initialState = reducer(undefined, { type: _createStore.ActionTypes.INIT });
if (typeof initialState === 'undefined') {
throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined.');
}
var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');
if (typeof reducer(undefined, { type: type }) === 'undefined') {
throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + _createStore.ActionTypes.INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined.');
}
});
}
/**
* Turns an object whose values are different reducer functions, into a single
* reducer function. It will call every child reducer, and gather their results
* into a single state object, whose keys correspond to the keys of the passed
* reducer functions.
*
* @param {Object} reducers An object whose values correspond to different
* reducer functions that need to be combined into one. One handy way to obtain
* it is to use ES6 `import * as reducers` syntax. The reducers may never return
* undefined for any action. Instead, they should return their initial state
* if the state passed to them was undefined, and the current state for any
* unrecognized action.
*
* @returns {Function} A reducer function that invokes every reducer inside the
* passed object, and builds a state object with the same shape.
*/
function combineReducers(reducers) {
var finalReducers = _utilsPick2['default'](reducers, function (val) {
return typeof val === 'function';
});
var sanityError;
try {
assertReducerSanity(finalReducers);
} catch (e) {
sanityError = e;
}
var defaultState = _utilsMapValues2['default'](finalReducers, function () {
return undefined;
});
return function combination(state, action) {
if (state === undefined) state = defaultState;
if (sanityError) {
throw sanityError;
}
var hasChanged = false;
var finalState = _utilsMapValues2['default'](finalReducers, function (reducer, key) {
var previousStateForKey = state[key];
var nextStateForKey = reducer(previousStateForKey, action);
if (typeof nextStateForKey === 'undefined') {
var errorMessage = getUndefinedStateErrorMessage(key, action);
throw new Error(errorMessage);
}
hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
return nextStateForKey;
});
if (true) {
var warningMessage = getUnexpectedStateKeyWarningMessage(state, finalState, action);
if (warningMessage) {
console.error(warningMessage);
}
}
return hasChanged ? finalState : state;
};
}
module.exports = exports['default'];
/***/ },
/* 58 */
/***/ function(module, exports) {
/**
* Picks key-value pairs from an object where values satisfy a predicate.
*
* @param {Object} obj The object to pick from.
* @param {Function} fn The predicate the values must satisfy to be copied.
* @returns {Object} The object with the values that satisfied the predicate.
*/
"use strict";
exports.__esModule = true;
exports["default"] = pick;
function pick(obj, fn) {
return Object.keys(obj).reduce(function (result, key) {
if (fn(obj[key])) {
result[key] = obj[key];
}
return result;
}, {});
}
module.exports = exports["default"];
/***/ }
/******/ ])
});
;
|
fixtures/dom/src/components/fixtures/input-change-events/index.js
|
leexiaosi/react
|
import React from 'react';
import FixtureSet from '../../FixtureSet';
import TestCase from '../../TestCase';
import RangeKeyboardFixture from './RangeKeyboardFixture';
import RadioClickFixture from './RadioClickFixture';
import RadioGroupFixture from './RadioGroupFixture';
import InputPlaceholderFixture from './InputPlaceholderFixture';
class InputChangeEvents extends React.Component {
render() {
return (
<FixtureSet
title="Input change events"
description="Tests proper behavior of the onChange event for inputs">
<TestCase
title="Range keyboard changes"
description={`
Range inputs should fire onChange events for keyboard events
`}>
<TestCase.Steps>
<li>Focus range input</li>
<li>change value via the keyboard arrow keys</li>
</TestCase.Steps>
<TestCase.ExpectedResult>
The <code>onKeyDown</code> call count should be equal to
the <code>onChange</code> call count.
</TestCase.ExpectedResult>
<RangeKeyboardFixture />
</TestCase>
<TestCase
title="Radio input clicks"
description={`
Radio inputs should only fire change events when the checked
state changes.
`}
resolvedIn="16.0.0">
<TestCase.Steps>
<li>Click on the Radio input (or label text)</li>
</TestCase.Steps>
<TestCase.ExpectedResult>
The <code>onChange</code> call count should remain at 0
</TestCase.ExpectedResult>
<RadioClickFixture />
</TestCase>
<TestCase
title="Uncontrolled radio groups"
description={`
Radio inputs should fire change events when the value moved to
another named input
`}
introducedIn="15.6.0">
<TestCase.Steps>
<li>Click on the "Radio 2"</li>
<li>Click back to "Radio 1"</li>
</TestCase.Steps>
<TestCase.ExpectedResult>
The <code>onChange</code> call count should equal 2
</TestCase.ExpectedResult>
<RadioGroupFixture />
</TestCase>
<TestCase
title="Inputs with placeholders"
description={`
Text inputs with placeholders should not trigger changes
when the placeholder is altered
`}
resolvedIn="15.0.0"
resolvedBy="#5004"
affectedBrowsers="IE9+">
<TestCase.Steps>
<li>Click on the Text input</li>
<li>Click on the "Change placeholder" button</li>
</TestCase.Steps>
<TestCase.ExpectedResult>
The <code>onChange</code> call count should remain at 0
</TestCase.ExpectedResult>
<InputPlaceholderFixture />
</TestCase>
</FixtureSet>
);
}
}
export default InputChangeEvents;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.