text
stringlengths 2
1.05M
|
|---|
export default `
area[name="Bordeaux"][admin_level="8"];
rel(pivot);
// print results
out body geom;
`
|
'use strict';
/**
* Returns a function that establishes the first prototype passed to it
* as the "source of truth" and patches its methods on subsequent invocations,
* also patching current and previous prototypes to forward calls to it.
*/
module.exports = function makeAssimilatePrototype() {
var storedPrototype,
knownPrototypes = [];
function wrapMethod(key) {
return function () {
if (storedPrototype[key]) {
return storedPrototype[key].apply(this, arguments);
}
};
}
function patchProperty(proto, key) {
proto[key] = storedPrototype[key];
if (typeof proto[key] !== 'function' ||
key === 'type' ||
key === 'constructor') {
return;
}
proto[key] = wrapMethod(key);
if (proto.__reactAutoBindMap && proto.__reactAutoBindMap[key]) {
proto.__reactAutoBindMap[key] = proto[key];
}
}
function updateStoredPrototype(freshPrototype) {
storedPrototype = {};
for (var key in freshPrototype) {
if (freshPrototype.hasOwnProperty(key)) {
storedPrototype[key] = freshPrototype[key];
}
}
}
function reconcileWithStoredPrototypes(freshPrototype) {
knownPrototypes.push(freshPrototype);
knownPrototypes.forEach(function (proto) {
for (var key in storedPrototype) {
patchProperty(proto, key);
}
});
}
return function assimilatePrototype(freshPrototype) {
if (freshPrototype.__isAssimilatedByReactHotAPI) {
return;
}
updateStoredPrototype(freshPrototype);
reconcileWithStoredPrototypes(freshPrototype);
freshPrototype.__isAssimilatedByReactHotAPI = true;
};
};
|
import styled from "styled-components";
export const ClockContainer = styled.div`
display: none;
@media (min-width: 28rem) {
font-family: "Roboto", sans-serif;
cursor: default;
display: flex;
align-items: center;
text-align: center;
justify-content: center;
height: 100%;
width: 7rem;
color: ${props => props.theme.textColor};
transition: color 0.2s ease-in-out;
&&:hover,
:focus {
background: ${props => props.theme.clockHover};
outline: none;
}
}
`;
|
import Base from 'ember-validations/validators/base';
import ibantools from 'npm:ibantools';
import _ from 'lodash/lodash';
export default Base.extend( {
call: function(){
if( !_.isEmpty( this.model.get( this.property ) ) && !ibantools.isValidIBAN( this.model.get( this.property ) ) ){
this.errors.pushObject( "Invalid IBAN" );
}
}
} );
|
import axios from 'axios';
import qs from 'qs';
import { Message } from '@alifd/next';
import { browserHistory } from 'react-router';
import { isPlainObject } from './nacosutil';
// import { SUCCESS_RESULT_CODE } from '../constants';
const API_GENERAL_ERROR_MESSAGE = 'Request error, please try again later!';
function goLogin() {
const url = window.location.href;
localStorage.removeItem('token');
const base_url = url.split('#')[0];
window.location.href = `${base_url}#/login`;
}
const request = () => {
const instance = axios.create();
instance.interceptors.request.use(
config => {
const { url, params, data, method, headers } = config;
if (!params) {
config.params = {};
}
if (!url.includes('auth/users/login')) {
let token = {};
try {
token = JSON.parse(localStorage.token);
} catch (e) {
console.log(e);
goLogin();
}
const { accessToken = '' } = token;
config.params.accessToken = accessToken;
config.headers = Object.assign({}, headers, { accessToken });
}
if (data && isPlainObject(data) && ['post', 'put'].includes(method)) {
config.data = qs.stringify(data);
if (!headers) {
config.headers = {};
}
config.headers['Content-Type'] = 'application/x-www-form-urlencoded';
}
return config;
},
error => Promise.reject(error)
);
instance.interceptors.response.use(
response => {
const { success, resultCode, resultMessage = API_GENERAL_ERROR_MESSAGE } = response.data;
// if (!success && resultCode !== SUCCESS_RESULT_CODE) {
// Message.error(resultMessage);
// return Promise.reject(new Error(resultMessage));
// }
return response.data;
},
error => {
if (error.response) {
const { data = {}, status } = error.response;
let message = `HTTP ERROR: ${status}`;
if (typeof data === 'string') {
message = data;
} else if (typeof data === 'object') {
message = data.message;
}
Message.error(message);
if (
[401, 403].includes(status) &&
['unknown user!', 'token invalid', 'token expired!'].includes(message)
) {
goLogin();
}
return Promise.reject(error.response);
}
Message.error(API_GENERAL_ERROR_MESSAGE);
return Promise.reject(error);
}
);
return instance;
};
export default request();
|
'use strict';
let assert = require('assert');
let utils = require('../utility/testUtils');
let _ = require('lodash');
describe('Test workshop endpoints', function () {
beforeEach(function (done) {
// Start the node server
utils.startServer(true, function () {
done();
});
});
it('should successfully return a workshop', function (done) {
utils.cloudPost('/engagement', {'name': 'test_engagement_1'}, null, function (err, engagement) {
// console.log('engagement:::');
// console.log(JSON.stringify(engagement));
assert.equal(engagement.name, 'test_engagement_1');
var params = {
'engagementId': engagement._id
}
utils.cloudGet('/workshops', params, null, function (err, workshops) {
console.log('workshops:::');
console.log(JSON.stringify(workshops));
assert.equal(workshops.length > 0, true, 'There should be at least 1 workshop');
assert.equal(workshops[0].status, 'NOT_STARTED', 'Status is incorrect');
done();
});
});
});
// TODO: Test the update route
});
|
(function () {
var touchScreen = (function () {
var result = null;
if ('maxTouchPoints' in navigator) {
result = navigator.maxTouchPoints > 0;
} else if (
window.matchMedia &&
window.matchMedia('(any-pointer:coarse),(any-pointer:fine),(any-pointer:none)').matches
) {
result = window.matchMedia('(any-pointer:coarse)').matches;
} else if ('msMaxTouchPoints' in navigator) {
result = navigator.msMaxTouchPoints > 0;
}
return result;
})(),
touchScreenDetectable = touchScreen !== null,
touch = touchScreenDetectable ? touchScreen : L.Browser.touch;
BR.Browser = {
touchScreen: touchScreen,
touchScreenDetectable: touchScreenDetectable,
touch: touch,
download: 'Blob' in window && 'createObjectURL' in URL && 'download' in document.createElement('a'),
};
})();
|
import Pagination from '../vc-pagination/locale/pt_BR'
import DatePicker from '../date-picker/locale/pt_BR'
import TimePicker from '../time-picker/locale/pt_BR'
import Calendar from '../calendar/locale/pt_BR'
export default {
locale: 'pt-br',
Pagination,
DatePicker,
TimePicker,
Calendar,
Table: {
filterTitle: 'Filtro',
filterConfirm: 'OK',
filterReset: 'Resetar',
emptyText: 'Não há dados',
selectAll: 'Selecionar página atual',
selectInvert: 'Inverter seleção',
},
Modal: {
okText: 'OK',
cancelText: 'Cancelar',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Cancelar',
},
Transfer: {
notFoundContent: 'Não encontrado',
searchPlaceholder: 'Procurar',
itemUnit: 'item',
itemsUnit: 'items',
},
Select: {
notFoundContent: 'Não encontrado',
},
Upload: {
uploading: 'Enviando...',
removeFile: 'Remover arquivo',
uploadError: 'Erro no envio',
previewFile: 'Visualizar arquivo',
},
}
|
describe("HTMLMediaElement", function() {
var player;
var element;
var parentNode;
var domElem;
var NETWORK_EMPTY = 0, NETWORK_IDLE = 1, NETWORK_LOADING = 2, NETWORK_NO_SOURCE = 3;
var HAVE_NOTHING = 0, HAVE_METADATA = 1, HAVE_CURRENT_DATA = 2, HAVE_FUTURE_DATA = 3, HAVE_ENOUGH_DATA = 4;
var METADATA_TIMEOUT = 500, ENOUGH_DATA_TIMEOUT = 1000;
beforeEach(function() {
});
afterEach(function() {
});
it("should be able to create and remove a player and clean up everything", function() {
runs(function() {
$('body').prepend('<video width="640" height="360" id="player1" poster="../media/echo-hereweare.jpg">' +
'<source type="video/mp4" src="../media/echo-hereweare.mp4" ></source>' +
'<source type="video/webm" src="../media/echo-hereweare.webm" ></source>' +
'</video>');
player = new MediaElementPlayer('#player1', {
enableAutosize: false,
success: function(mediaElement, domObject) {
element = mediaElement;
domElem = domObject;
parentNode = domObject.parentNode
}
});
});
waitsFor(function() {
return element !== null;
}, "MediaElement should have loaded", 5000);
runs(function() {
expect(element.pluginType).toEqual('native');
player.remove();
player = null;
element = null;
domElem = null;
// Issue #670: https://github.com/johndyer/mediaelement/issues/670
expect(Object.keys(mejs.players).length).toEqual(0);
});
});
});
|
/* globals KonchatNotification */
Blaze.registerHelper('pathFor', function(path, kw) {
return FlowRouter.path(path, kw.hash);
});
BlazeLayout.setRoot('body');
FlowRouter.subscriptions = function() {
Tracker.autorun(() => {
if (Meteor.userId()) {
this.register('userData', Meteor.subscribe('userData'));
this.register('activeUsers', Meteor.subscribe('activeUsers'));
}
});
};
FlowRouter.route('/', {
name: 'index',
action() {
BlazeLayout.render('main', { modal: RocketChat.Layout.isEmbedded(), center: 'loading' });
if (!Meteor.userId()) {
return FlowRouter.go('home');
}
Tracker.autorun(function(c) {
if (FlowRouter.subsReady() === true) {
Meteor.defer(function() {
if (Meteor.user() && Meteor.user().defaultRoom) {
const room = Meteor.user().defaultRoom.split('/');
FlowRouter.go(room[0], { name: room[1] }, FlowRouter.current().queryParams);
} else {
FlowRouter.go('home');
}
});
c.stop();
}
});
}
});
FlowRouter.route('/login', {
name: 'login',
action() {
FlowRouter.go('home');
}
});
FlowRouter.route('/home', {
name: 'home',
action(params, queryParams) {
KonchatNotification.getDesktopPermission();
if (queryParams.saml_idp_credentialToken !== undefined) {
Accounts.callLoginMethod({
methodArguments: [{
saml: true,
credentialToken: queryParams.saml_idp_credentialToken
}],
userCallback() { BlazeLayout.render('main', {center: 'home'}); }
});
} else {
BlazeLayout.render('main', {center: 'home'});
}
}
});
FlowRouter.route('/changeavatar', {
name: 'changeAvatar',
action() {
BlazeLayout.render('main', {center: 'avatarPrompt'});
}
});
FlowRouter.route('/account/:group?', {
name: 'account',
action(params) {
if (!params.group) {
params.group = 'Preferences';
}
params.group = _.capitalize(params.group, true);
BlazeLayout.render('main', { center: `account${ params.group }` });
}
});
FlowRouter.route('/history/private', {
name: 'privateHistory',
subscriptions(/*params, queryParams*/) {
this.register('privateHistory', Meteor.subscribe('privateHistory'));
},
action() {
Session.setDefault('historyFilter', '');
BlazeLayout.render('main', {center: 'privateHistory'});
}
});
FlowRouter.route('/terms-of-service', {
name: 'terms-of-service',
action() {
Session.set('cmsPage', 'Layout_Terms_of_Service');
BlazeLayout.render('cmsPage');
}
});
FlowRouter.route('/privacy-policy', {
name: 'privacy-policy',
action() {
Session.set('cmsPage', 'Layout_Privacy_Policy');
BlazeLayout.render('cmsPage');
}
});
FlowRouter.route('/room-not-found/:type/:name', {
name: 'room-not-found',
action(params) {
Session.set('roomNotFound', {type: params.type, name: params.name});
BlazeLayout.render('main', {center: 'roomNotFound'});
}
});
FlowRouter.route('/fxos', {
name: 'firefox-os-install',
action() {
BlazeLayout.render('fxOsInstallPrompt');
}
});
FlowRouter.route('/register/:hash', {
name: 'register-secret-url',
action(/*params*/) {
BlazeLayout.render('secretURL');
// if RocketChat.settings.get('Accounts_RegistrationForm') is 'Secret URL'
// Meteor.call 'checkRegistrationSecretURL', params.hash, (err, success) ->
// if success
// Session.set 'loginDefaultState', 'register'
// BlazeLayout.render 'main', {center: 'home'}
// KonchatNotification.getDesktopPermission()
// else
// BlazeLayout.render 'logoLayout', { render: 'invalidSecretURL' }
// else
// BlazeLayout.render 'logoLayout', { render: 'invalidSecretURL' }
}
});
|
/*
jQWidgets v4.5.2 (2017-May)
Copyright (c) 2011-2017 jQWidgets.
License: http://jqwidgets.com/license/
*/
!function(a){a.jqx.jqxWidget("jqxResponsivePanel","",{}),a.extend(a.jqx._jqxResponsivePanel.prototype,{defineInstance:function(){var b={width:null,height:null,collapseBreakpoint:1e3,collapseWidth:null,toggleButton:null,toggleButtonSize:30,animationType:"fade",animationDirection:"left",animationShowDelay:"fast",animationHideDelay:"fast",autoClose:!0,initContent:null,_collapsed:!1,_opened:!1,_init:!1,_ie7:a.jqx.browser.msie&&a.jqx.browser.version<8,events:["collapse","expand","open","close"]};return this===a.jqx._jqxResponsivePanel.prototype?b:(a.extend(!0,this,b),b)},createInstance:function(){var a=this;a.initContent&&a._init===!1&&(a.initContent(),a._init=!0),a._render(!0)},_render:function(b){var c=this;if(b===!0&&c.toggleButton){if(c._toggleButton=a(c.toggleButton),0===c._toggleButton.length)throw new Error('jqxResponsivePanel: Invalid toggleButton selector: "'+c.toggleButton+'".');var d=a('<div class="'+c.toThemeProperty("jqx-menu-minimized-button")+" "+c.toThemeProperty("jqx-responsive-panel-button-inner")+'"></div>');c._toggleButton.append(d)}c._setSize(),c._addClasses(),b===!1&&c._removeHandlers(),c._addHandlers(),c._checkWindowSize()},render:function(){this._render(!1)},refresh:function(a){a!==!0&&this._checkWindowSize()},destroy:function(a){var b=this;b._removeHandlers(),b.host.remove(),a!==!0&&b.toggleButton&&b._toggleButton.remove()},propertyChangedHandler:function(a,b,c,d){if(d!==c&&"toggleButton"!==b&&"initContent"!==b)switch(b){case"width":case"height":a.host.css(b,d);break;case"collapseBreakpoint":a._checkWindowSize();break;case"toggleButtonSize":a.toggleButton&&a._toggleButton.css({width:d,height:d});break;default:a.render()}},open:function(){function a(){b.host.show(),b._opened=!0,b._raiseEvent("2"),b.initContent&&b._init===!1&&(b.initContent(),b._init=!0)}var b=this;if(b._collapsed===!0&&b._opened===!1){if(b._ie7===!0)return void a();switch(b.animationType){case"fade":b.host.fadeIn(b.animationShowDelay,function(){b._raiseEvent("2"),b._opened=!0,b.initContent&&b._init===!1&&(b.initContent(),b._init=!0)});break;case"slide":var c=b.animationDirection;"top"===c?c="up":"bottom"===c&&(c="down"),b._slide(b.host,{mode:"show",direction:c,duration:b.animationShowDelay});break;case"none":a()}}},close:function(){var a=this;if(a._collapsed===!0&&a._opened===!0){if(a._ie7===!0)return a.host.hide(),a._opened=!1,void a._raiseEvent("3");switch(a.animationType){case"fade":a.host.fadeOut(a.animationHideDelay,function(){a._opened=!1,a._raiseEvent("3")});break;case"slide":var b=a.animationDirection;"top"===b?b="up":"bottom"===b&&(b="down"),a._slide(a.host,{mode:"hide",direction:b,duration:a.animationHideDelay});break;case"none":a.host.hide(),a._opened=!1,a._raiseEvent("3")}}},_raiseEvent:function(b,c){void 0===c&&(c={owner:null});var d=this.events[b];c.owner=this;var e=new a.Event(d);e.owner=this,e.args=c,e.preventDefault&&e.preventDefault();var f=this.host.trigger(e);return f},_setSize:function(){var a=this;a.host.css("width",a.width),a.host.css("height",a.height),a.toggleButton&&a._toggleButton.css({width:a.toggleButtonSize,height:a.toggleButtonSize})},_addClasses:function(){var a=this;a.host.addClass(a.toThemeProperty("jqx-responsive-panel")),a.host.addClass(a.toThemeProperty("jqx-widget")),a.host.addClass(a.toThemeProperty("jqx-widget-content")),a.host.addClass(a.toThemeProperty("jqx-rc-all")),a.toggleButton&&(a._toggleButton.addClass(a.toThemeProperty("jqx-responsive-panel-button")),a._toggleButton.addClass(a.toThemeProperty("jqx-fill-state-normal")),a._toggleButton.addClass(a.toThemeProperty("jqx-rc-all")))},isCollapsed:function(){return this._collapsed},isOpened:function(){return this._opened},_addHandlers:function(){var b=this,c=b.element.id;b.addHandler(b.host,"click.jqxResponsivePanel"+c,function(a){a.stopPropagation()}),b.addHandler(a(document),"click.jqxResponsivePanel"+c,function(){b._collapsed===!0&&b.autoClose===!0&&b.close()}),b.addHandler(a(window),"resize.jqxResponsivePanel"+c,function(){setTimeout(function(){b._checkWindowSize()},0)}),b.toggleButton&&(b.addHandler(b._toggleButton,"mouseenter.jqxResponsivePanel"+c,function(){b._toggleButton.addClass(b.toThemeProperty("jqx-fill-state-hover"))}),b.addHandler(b._toggleButton,"mouseleave.jqxResponsivePanel"+c,function(){b._toggleButton.removeClass(b.toThemeProperty("jqx-fill-state-hover"))}),b.addHandler(b._toggleButton,"mousedown.jqxResponsivePanel"+c,function(){b._toggleButton.addClass(b.toThemeProperty("jqx-fill-state-pressed"))}),b.addHandler(a(document),"mouseup.jqxResponsivePanel"+c,function(){b._toggleButton.removeClass(b.toThemeProperty("jqx-fill-state-pressed"))}),b.addHandler(b._toggleButton,"click.jqxResponsivePanel"+c,function(a){a.stopPropagation(),b._opened===!0?b.close():b.open()}))},_removeHandlers:function(){var b=this,c=b.element.id;b.removeHandler(b.host,"click.jqxResponsivePanel"+c),b.removeHandler(a(document),"click.jqxResponsivePanel"+c),b.removeHandler(a(window),"resize.jqxResponsivePanel"+c),b.toggleButton&&(b.removeHandler(b._toggleButton,"mouseenter.jqxResponsivePanel"+c),b.removeHandler(b._toggleButton,"mouseleave.jqxResponsivePanel"+c),b.removeHandler(b._toggleButton,"mousedown.jqxResponsivePanel"+c),b.removeHandler(a(document),"mouseup.jqxResponsivePanel"+c),b.removeHandler(b._toggleButton,"click.jqxResponsivePanel"+c))},_checkWindowSize:function(){var a=this,b=this.host.parent().width();a._collapsed===!1&&b<=a.collapseBreakpoint?(a.toggleButton&&a._toggleButton.show(),a._opened===!1&&a.host.hide(),a.host.removeClass(a.toThemeProperty("jqx-responsive-panel-expanded")),a.host.addClass(a.toThemeProperty("jqx-responsive-panel-collapsed")),a._collapsed=!0,a._raiseEvent("0"),a.collapseWidth&&a.host.width(a.collapseWidth),a.host.trigger("resize")):a._collapsed===!0&&b>a.collapseBreakpoint&&(a.collapseWidth&&a.host.width(a.width),a.toggleButton&&a._toggleButton.hide(),a._opened===!1&&a.host.show(),a.host.removeClass(a.toThemeProperty("jqx-responsive-panel-collapsed")),a.host.addClass(a.toThemeProperty("jqx-responsive-panel-expanded")),a._collapsed=!1,a._raiseEvent("1"),a.initContent&&a._init===!1&&(a.initContent(),a._init=!0),a.host.trigger("resize"))},_slide:function(b,c){var d=this;if(d.activeAnimations||(d.activeAnimations=[]),d.activeAnimations.length>0)for(var e=0;e<d.activeAnimations.length;e++)d.activeAnimations[e].clearQueue(),d.activeAnimations[e].finish();else b.clearQueue(),b.finish();var f,g="ui-effects-",h={save:function(a,b){for(var c=0;c<b.length;c++)null!==b[c]&&a.length>0&&a.data(g+b[c],a[0].style[b[c]])},restore:function(a,b){var c,d;for(d=0;d<b.length;d++)null!==b[d]&&(c=a.data(g+b[d]),void 0===c&&(c=""),a.css(b[d],c))},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0),float:b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:b.width(),height:b.height()},f=document.activeElement;try{f.id}catch(a){f=document.body}return b.wrap(d),(b[0]===f||a.contains(b[0],f))&&a(f).focus(),d=b.parent(),"static"===b.css("position")?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),b.css(e),d.css(c).show()},removeWrapper:function(b){var c=document.activeElement;return b.parent().is(".ui-effects-wrapper")&&(b.parent().replaceWith(b),(b[0]===c||a.contains(b[0],c))&&a(c).focus()),b}},i=["position","top","bottom","left","right","width","height"],j=c.mode,k="show"===j,l=c.direction||"left",m="up"===l||"down"===l?"top":"left",n="up"===l||"left"===l,o={};h.save(b,i),b.show(),f=c.distance||b["top"===m?"outerHeight":"outerWidth"](!0),h.createWrapper(b).css({overflow:"hidden"}),k&&b.css(m,n?isNaN(f)?"-"+f:-f:f),o[m]=(k?n?"+=":"-=":n?"-=":"+=")+f;var p=function(){b.clearQueue(),b.stop(!0,!0)};return d.activeAnimations.push(b),b.animate(o,{duration:c.duration,easing:c.easing,complete:function(){d.activeAnimations.pop(b),"show"===j?(d._opened=!0,d._raiseEvent("2"),d.initContent&&d._init===!1&&(d.initContent(),d._init=!0)):"hide"===j&&(b.hide(),d._opened=!1,d._raiseEvent("3")),h.restore(b,i),h.removeWrapper(b)}}),p}})}(jqxBaseFramework);
|
'use strict';
const ZongJi = require("zongji");
const ls = require('leo-streams');
const moment = require("moment");
const logger = require("leo-logger")("mysql").sub("binloglistener");
logger.configure(/mysql\.binloglistener/, {
info: true
});
let typeMap = {
writerows: 'update',
updaterows: 'update',
deleterows: 'delete'
};
ZongJi.prototype._fetchTableInfo = function(tableMapEvent, next) {
var self = this;
var sql = `SELECT COLUMN_NAME, COLLATION_NAME, CHARACTER_SET_NAME, COLUMN_COMMENT, COLUMN_TYPE, COLUMN_KEY
FROM information_schema.columns WHERE table_schema='${tableMapEvent.schemaName}'
AND table_name='${tableMapEvent.tableName}'`;
if (self.__ended) {
return;
}
this.ctrlConnection.query(sql, function(err, rows) {
if (err) {
// Errors should be emitted
self.emit('error', err);
// This is a fatal error, no additional binlog events will be
// processed since next() will never be called
return;
}
if (rows.length === 0) {
self.emit('error', new Error(
'Insufficient permissions to access: ' +
tableMapEvent.schemaName + '.' + tableMapEvent.tableName));
// This is a fatal error, no additional binlog events will be
// processed since next() will never be called
return;
}
self.tableMap[tableMapEvent.tableId] = {
columnSchemas: rows,
parentSchema: tableMapEvent.schemaName,
tableName: tableMapEvent.tableName,
primaryKey: rows.filter(r => r.COLUMN_KEY == "PRI").map(r => r.COLUMN_NAME)
};
next();
});
};
ZongJi.prototype.start = function(options) {
var self = this;
self.set(options);
let pass = ls.passthrough({
objectMode: true
});
// Pass along any errors from the connection
self.on("error", error => pass.emit("error", error));
let passEnd = pass.end;
pass.end = function() {
self.__ended = true;
self.connection.destroy();
logger.debug("Ending binglog stream");
self.ctrlConnection.query(
'KILL ' + self.connection.threadId,
function() {
if (self.ctrlConnectionOwner) {
self.ctrlConnection.destroy();
}
passEnd.call(pass);
}
);
};
var _start = function() {
self.connection._implyConnect();
if (self.options.binlogName) {
logger.log(`Starting from ${self.options.source} ${self.options.binlogName}::${self.options.binlogNextPos}`);
} else {
logger.log(`Starting from ${self.options.source} latest`);
}
self.connection._protocol._enqueue(new self.binlog(function(error, event) {
if (error) return self.emit('error', error);
// Do not emit events that have been filtered out
if (event === undefined || event._filtered === true) return;
let eventName = event.getTypeName().toLowerCase();
switch (eventName) {
case 'tablemap':
var tableMap = self.tableMap[event.tableId];
if (!tableMap) {
self.connection.pause();
self._fetchTableInfo(event, function() {
// merge the column info with metadata
event.updateColumnInfo();
self.connection.resume();
});
}
return;
break;
case 'rotate':
if (self.binlogName !== event.binlogName) {
self.binlogName = event.binlogName;
}
return;
break;
}
self.binlogNextPos = event.nextPosition;
let tableName = event.tableMap[event.tableId].tableName;
let schema = event.tableMap[event.tableId].parentSchema;
if (event.tableMap[event.tableId].primaryKey.length && !pass.write({
timestamp: Date.now(),
event_source_timestamp: event.timestamp,
correlation_id: {
source: self.options.source || 'system:mysql',
start: self.binlogName + "::" + event.nextPosition
},
payload: {
schema: schema,
tableName: tableName,
primaryKey: event.tableMap[event.tableId].primaryKey,
type: typeMap[eventName],
rows: event.rows
}
})) {
self.connection.pause();
pass.once('drain', () => {
self.connection.resume();
});
}
}));
};
if (this.ready) {
_start();
} else {
this.ctrlCallbacks.push(_start);
}
return pass;
};
module.exports = function(config, opts) {
opts = Object.assign({
server_id: 99999,
includeSchema: undefined,
excludeSchema: {
information_schema: true,
mysql: true,
performance_schema: true,
sys: true
},
fullEvent: false,
startAtEnd: true
}, opts || {});
let position = opts.position || {};
if (typeof position === "string") {
let [binlogName, binlogNextPos] = position.split("::");
position = {
binlogName,
binlogNextPos
}
}
let startParams = {
binlogName: position.binlogName,
binlogNextPos: parseInt(position.binlogNextPos || 0),
startAtEnd: opts.startAtEnd,
serverId: opts.server_id,
includeEvents: ['rotate', 'tablemap', 'writerows', 'updaterows', 'deleterows'],
includeSchema: opts.includeSchema,
excludeSchema: opts.excludeSchema,
source: opts.source
}
// Require a Starting location
if (!startParams.binlogName) {
throw new Error("opts.binlogName and opts.binlogNextPos are required");
}
let z = new ZongJi(config);
let stream = z.start(startParams);
let timeoutHandle;
if (opts.stopTime) {
timeoutHandle = setTimeout(() => stream.end(), Math.min(2147483647, moment(opts.stopTime) - moment()));
} else if (opts.duration) {
timeoutHandle = setTimeout(() => stream.end(), Math.min(2147483647, moment.duration(opts.duration).asMilliseconds()));
}
if (timeoutHandle) {
stream.on("finish", () => clearTimeout(timeoutHandle));
}
if (opts.fullEvent) {
return stream;
} else {
let groupP = null;
let units = 0;
return ls.pipeline(stream, ls.batch({
count: 1000,
size: 1024 * 1024 * 3,
time: {
milliseconds: 400
},
recordCount: p => p.rows ? p.rows.length : 0
}), ls.through((obj, done) => {
if (!obj.payload || !obj.payload.length) {
return done();
}
let event = {
timestamp: obj.timestamp,
event_source_timestamp: obj.event_source_timestamp,
correlation_id: obj.correlation_id,
payload: {}
};
let payload = event.payload;
event.correlation_id.units = 0;
obj.payload.map(o => {
let p = o.payload;
if (!(p.type in payload)) {
payload[p.type] = {};
}
if (!(p.schema in payload[p.type])) {
payload[p.type][p.schema] = {};
}
if (!(p.tableName in payload[p.type][p.schema])) {
payload[p.type][p.schema][p.tableName] = [];
}
event.correlation_id.units += p.rows.length;
let ids = payload[p.type][p.schema][p.tableName];
if (p.primaryKey.length == 1) {
p.rows.forEach(r => {
if ('after' in r) {
r = r.after;
}
ids.push(r[p.primaryKey[0]]);
});
} else {
p.rows.forEach(r => {
if ('after' in r) {
r = r.after;
}
ids.push(p.primaryKey.reduce((arr, key) => {
arr[key] = r[key];
return arr;
}, {}));
});
}
});
done(null, event);
}));
}
};
|
(function () {
'use strict';
angular
.module('packs')
.run(menuConfig);
menuConfig.$inject = ['menuService'];
function menuConfig(menuService) {
// Set top bar menu items
/*menuService.addMenuItem('topbar', {
title: 'Packs',
state: 'packs',
type: 'dropdown',
roles: ['admin']
});
// Add the dropdown list item
menuService.addSubMenuItem('topbar', 'packs', {
title: 'List Packs',
state: 'packs.list'
});
// Add the dropdown create item
menuService.addSubMenuItem('topbar', 'packs', {
title: 'Create Pack',
state: 'packs.create'
});*/
}
}());
|
Search.setIndex({docnames:["assembly-1","assembly-2","data/binning/index","data/qc-assembly/index","data/viral/index","index","mag","virify"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:54},filenames:["assembly-1.rst","assembly-2.rst","data/binning/index.rst","data/qc-assembly/index.rst","data/viral/index.rst","index.rst","mag.rst","virify.rst"],objects:{},objnames:{},objtypes:{},terms:{"100s":0,"150bp":0,"2nd":1,"4th":1,"50m":1,"case":0,"default":0,"export":[0,6],"final":[0,6],"function":1,"import":[6,7],"long":[0,1],"new":0,"public":1,"short":0,"try":[0,1],"while":[0,6],Are:0,For:[0,1,6],Has:0,KOs:1,Not:1,One:0,The:[0,1,6,7],There:[0,1,6],These:5,Use:0,Using:[0,1,7],With:0,abdfil:6,abl:[0,6],about:[0,1,6],abov:0,access:1,accord:6,account:[0,6],accuraci:[0,6],across:0,adaptor:0,added:6,addit:0,addition:6,advanc:6,advantag:0,after:6,again:6,against:0,aggreg:0,aim:6,algorithm:5,align:0,alik:0,all:[0,1,6],allow:[0,1],alreadi:[0,6],also:[0,6],altern:[0,1,6],alwai:0,amplicon:1,analys:[0,1,5],analysi:[0,5,6,7],ani:[0,1],annot:1,anoth:0,antismash:1,anyth:0,appear:1,appli:0,applic:[0,5],aquat:1,area:0,around:[0,6],assembl:5,assembly1:0,assembly2:0,assembly3:0,assembly_graph:0,assembly_graph_after_simplif:0,assembly_stat:0,assess:[0,6],assign:[1,6,7],associ:1,automat:0,avail:[0,1,6],axi:0,babraham:0,back:[0,6],background:0,bacteri:1,bacteria:0,bam:6,bandag:0,bar:1,base:[0,6],basic:0,becom:0,been:[0,1],befor:[0,6],believ:0,below:[0,1],berkeleylab:6,best:[0,6],better:0,between:[0,1,6],beyond:0,biata:[0,6],biata_2020:[0,6],bin:6,binpro:6,bins2000:6,bio:6,bioinformat:[0,5],biolog:1,biom:1,bitbucket:6,blank:6,blast:0,blue:0,both:[0,1],bottom:1,bowti:0,bowtie2:0,box:[0,1],boxwhisk:0,browser:[0,6],build:[0,6],bwa:6,calcul:[0,6],call:0,can:[0,1,6],captur:0,carri:5,cat:0,categori:1,categoris:0,caution:0,cegg:6,central:0,cgi:0,chang:0,characteris:1,chart:1,check:0,checkm:6,checkm_data:6,checkm_data_2015_01_16:6,checkm_output:6,chmod:[0,6],choos:[0,6],chromosom:0,circl:6,clade:6,classif:6,clean:0,clean_oth:0,clear:6,click:[0,1,6],close:0,cluster:1,coassembl:0,cocacola:6,code:1,colour:6,com:6,come:0,comma:0,command:[0,6],common:[0,1],commun:0,compar:[0,6],comparison:0,complet:[0,1,6],complex:0,composit:[0,1],comput:0,con:0,concaten:6,concoct:6,concord:0,confer:5,configur:6,consid:0,consider:0,constitu:1,constitut:0,constraint:6,construct:0,consult:0,contain:[0,6],contamin:[0,6],content:0,contig:[0,1,6],contingu:0,control:[1,5,6],convert:6,copi:6,correct:0,correspond:[0,6],could:1,cours:0,cov:1,cover:[0,1],coverag:6,cpu:0,creat:[0,6],crude:0,current:0,dai:[0,6],data:[1,5,6],databas:[0,6],datadir:[0,6],dataset:[0,1,6],decontamin:0,deem:0,degrad:0,degre:0,demonstr:0,dentocariosa:0,depend:0,deposit:0,depth:[1,6],derepl:[],describ:0,descript:[],desktop:6,detail:1,detect:[6,7],determin:6,did:[0,6],differ:[0,1,6],dir:6,directori:[0,6],displai:[0,6],distanc:0,distinct:0,divers:0,divid:0,dna:[0,1],docker:[0,6],document:0,doe:[0,1,6],done:[0,6],dovetail:0,down:[0,1],download:[0,6],drag:6,draw:0,drawn:0,drop:6,due:[0,6],duplic:0,each:[0,6],easi:0,easili:[0,6],ebi:[0,1,6],ebi_train:6,ecogenom:6,either:0,element:0,embl:[0,6],ena:0,end:0,entir:0,entri:1,environment:1,err011322_1:6,err011322_2:6,error:0,erz501066:1,essenti:[0,6],estim:0,etc:[1,6],eukaryot:1,even:0,evid:0,examin:1,exampl:[0,6],exclud:0,execut:0,exercis:[0,5,6],exist:1,experi:[0,6],explor:7,extend:0,facilit:1,factor:0,fairli:0,fall:[0,1],far:0,fasta:[0,6],faster:0,fastg:0,fastq:[0,6],fastqc:0,fastqc_fin:0,fastqc_result:0,featur:1,feel:6,few:6,field:1,fig:6,figtre:6,figur:[1,6],file:[5,6],filesystem:0,filter:[1,5],find:[0,6],first:0,flexibl:0,folder:[0,6],follow:[0,6],format:[0,6],forward:0,found:[0,1,6],fraction:[0,6],fragment:0,free:6,friendli:6,from:[0,1,5,6],front:1,ftp:[0,6],further:6,gca_000164695:0,gene:[1,6],gener:[0,5],genom:[0,1,5],gfa:0,github:6,given:0,going:0,good:0,gov:0,gram:0,graph:[0,1],grch38_chr10:0,grch38_phix:0,green:0,group:6,gui:0,guid:0,gunzip:0,gut:7,had:0,hand:5,handi:6,handl:1,has:[0,1,6],have:[0,1,6],head:0,header:1,help:0,here:0,heterogen:6,hierarchi:1,high:0,higher:0,highlight:6,histogram:0,historgram:0,hit:[0,1],hold:1,home:6,host:0,hour:0,how:[0,1,6],howev:0,html:0,htslib:6,http:[0,1,6],human:[0,7],human_genom:0,ibd_checkm_tre:6,icon:1,idba:0,ident:0,identifi:[0,1],image29:0,improv:0,includ:[0,1,6],index:[0,6],infer:6,infil:6,info:2,inform:[0,1],input:[0,6],insdc:0,insert:[],insid:0,instal:0,inter:0,interact:[0,6],interest:1,intermedi:0,interpro:1,interproscan:1,investig:[0,1],issu:0,itol:6,itol_clad:6,itol_ocircl:6,its:6,jgi_summarize_bam_contig_depth:6,json:0,junk:6,just:[0,6],kang:6,kegg:1,kneaddata:0,kneaddata_databas:0,kneaddata_read_count:0,kneaddata_read_count_t:0,krona:1,laptop:0,larg:[0,1],learn:[0,6],least:6,leav:0,left:[0,6],length:[0,1],lentic:1,less:0,let:[0,6],level:6,life:6,like:[0,6],limit:[0,6],line:0,lineage_wf:6,link:1,list:[0,1],load:[0,1],local:0,localhost:[0,6],log:6,login:6,longer:0,longest:[0,1],look:[0,1,6],lot:0,low:0,lower:0,lsu:1,mac:[0,6],mag:5,mags_checkm:6,mai:0,main:0,major:1,make:[0,6],mani:[0,1,6],map:6,marker:6,match:[0,1],mate:0,materi:5,matrix:0,maxbin:6,mean:0,measur:0,median:0,megahit:0,mem:6,member:0,memori:[0,6],merg:0,metabat2:6,metabat:6,metadata:1,metagenom:[0,1,5,7],metaspad:[0,6],metavelvet:0,method:0,mgnifi:[],mgnify_cours:[0,6],mgya00510849:1,mgys00003598:1,microb:0,microbiomeinformat:[0,6],might:[0,6],migmag:6,mincontig:6,minimum:0,minlen:0,minut:0,mkdir:[0,6],mode:0,modifi:0,modul:1,more:[0,1],most:[0,1,6],mount:0,mous:0,mouth:0,move:[0,6],much:0,multi:6,multipl:0,multiqc:0,multiqc_report:0,multiqc_result:0,n10:0,n50:0,n90:0,name:[1,6],navig:[0,1],ncbi:0,need:[0,6],net:6,newick:6,newick_util:6,next:0,nih:0,nlm:0,node:1,non:1,normal:0,note:0,novo:0,now:[0,1,6],nucleotid:0,number:[0,1,6],nw_renam:6,nwk:6,object:[0,6],obvious:6,off:0,often:0,onc:[0,6],one:[0,6],ones:[0,6],onli:[0,6],onlin:0,open:[0,6],opt:[0,6],option:[0,1,6],oral:0,oral_human_example_1_splitaa:0,oral_human_example_1_splitaa_fastqc:0,oral_human_example_1_splitaa_kneaddata_pair:0,oral_human_example_1_splitaa_kneaddata_paired_1:0,oral_human_example_1_splitaa_kneaddata_paired_2:0,oral_human_example_1_splitab_kneaddata_paired_1:0,oral_human_example_1_splitab_kneaddata_paired_2:0,oral_human_example_1_splitac_kneaddata_paired_1:0,oral_human_example_1_splitac_kneaddata_paired_2:0,oral_human_example_2_splitaa:0,orang:0,order:0,org:6,origin:6,orthologu:1,other:[0,6],otherwis:0,our:0,out:[0,1,5],outdir:0,outfil:6,output:[0,6],outputdepth:6,outsid:6,overal:6,overhead:0,overview:1,own:[0,6],page:[0,1],pair:0,pan:0,panel:0,paramet:0,part:[1,5],particular:0,pass:0,password:6,past:[0,6],path:0,pathwai:1,pcd:1,peerj:6,penelop:6,peptid:1,per:0,percent:0,perform:0,pfam:1,phix:0,phylogenet:6,phylogeni:6,phylum:[1,6],pictur:[],pie:1,pipelin:[1,5],place:6,placement:6,plai:6,platform:0,pleas:0,plo:0,plot:[0,1,6],plu:0,point:0,poor:0,portal:0,posit:0,possibl:0,potenti:6,practic:0,pre:0,predict:[1,6],prepar:6,prerequisit:5,presenc:0,present:[0,6],previou:0,previous:0,principl:0,prior:6,pro:0,problem:0,process:[0,1,6],produc:[0,6],program:[0,6],progress:0,project:[0,6],properti:1,proport:[1,6],protein:1,proteobacteria:1,provid:0,pub:[0,6],pull:[0,6],purpos:6,put:0,qualiti:[1,5,6],quartil:0,quick:[1,6],quicker:0,quickli:6,quit:0,quotat:0,rang:0,raw:[1,5],read:[0,1,6],reason:0,recommend:0,red:0,reduc:6,reduced_tre:6,refer:[0,6],reformat:6,region:1,relat:[0,1],relev:[0,1,6],remov:0,renam:6,rename_list:6,repeat:6,report:[0,1],repres:[0,6],resid:0,resourc:1,respiratori:0,rest:6,result:[0,1],revers:0,ribosom:1,right:6,rod:0,rothia:0,round:0,routin:0,rrna:[0,1],run:[0,6],sai:0,sam:6,same:[0,6],sampl:[0,1,6],samtool:6,sbu:6,scaffold:0,scope:0,score:[0,6],screen:0,script:0,scroll:[0,1],search:[0,1],section:[0,1],see:[0,1,6],seesion4:6,select:[0,1,6],sens:[0,6],sensit:0,separ:0,sequenc:[1,5,6,7],session1:0,session4:6,session:[0,1],set:0,setroot:6,shape:0,shortest:0,should:[0,1,6],show:[0,1],shown:[0,1],shtml:6,side:0,signific:0,simpl:0,simpli:0,sinc:6,singl:[0,6],site:0,size:0,slider:0,slidingwindow:0,small:[0,6],smaller:0,softwar:6,some:[0,1,6],someth:0,sort:6,sourceforg:6,spade:0,speci:[0,6],specif:6,specifi:0,spend:0,spike:0,staff:0,standbi:0,start:[0,1,6],stat:6,state:0,statist:[0,6],statu:0,step:[0,6],storag:6,store:[0,6],strain:[0,6],structur:6,studi:1,sub:1,subdirectori:6,submit:0,subsequ:0,subset:1,suggest:0,summari:[0,1],summaris:[0,6],support:1,sure:[0,6],surpris:0,synthetas:1,system:[0,1],tab:[1,6],tab_tabl:6,tabl:0,take:[0,6],tar:[0,6],tarbal:[0,6],target:6,tart:[],taxon:6,taxonom:[1,6,7],tell:0,term:[0,1],termin:0,text:1,tgz:[0,6],thei:[0,6],them:[0,1],themselv:6,thi:[0,1,6],thing:0,think:0,thread:0,three:0,through:0,thu:0,time:[0,6],tini:0,tip:6,tmp:[0,6],togeth:6,tool:[0,6],toolbar:6,top:[1,6],total:[0,1],toward:0,tract:0,train:0,transport:1,tre:6,tree:6,trimmomat:0,turn:0,tutori:[0,6],twice:0,two:[0,6],txt:[0,6],type:[0,1],uncompress:0,under:[0,6],uniform:0,unig:6,unix:[0,6],unknown:6,unless:0,upload:[0,6],upper:0,url:[],use:[0,6],used:[5,6],useful:0,user:6,uses:0,using:[0,1,5,6,7],util:6,valu:0,variou:1,veri:[0,6],view:[0,6],viewer:1,viral:7,virfind:7,virifi:5,virom:7,virsort:7,visual:6,visualis:[0,6],vollmer:0,wai:[0,1,6],want:[0,6],warn:0,wastewat:1,water:1,web:6,websit:0,welcom:[],well:1,were:0,wget:[0,6],what:[0,1,6],when:0,where:[0,1,6],which:[0,6],whisker:0,whole:6,why:[0,1],wiki:6,window:[0,6],winner:6,within:[0,1,6],work:[0,6],workflow:6,workshop:5,workspac:6,would:[0,6],wrap:6,wrapper:0,write:0,written:0,www:[0,1,6],x11:[0,6],xzvf:[0,6],yellow:0,yield:0,you:[0,1,6],younglululu:6,your:[0,6],yourself:6,yourselv:0,zoom:[0,1],zxvf:6},titles:["Assembling data","Assembly analysis","Binning","Quality control","Viral pipeline","MGnify-BiATA-2020","MAG generation","VIRify pipeline"],titleterms:{analysi:1,assembl:[0,1,6],biata:5,bin:2,brows:1,control:[0,3],data:0,document:[],exercis:1,file:0,filter:0,gener:6,genom:6,hand:1,indic:[],mag:6,metagenom:6,mgnifi:[1,5],part:0,pipelin:[4,7],prerequisit:[0,6],qualiti:[0,3],raw:0,sequenc:0,tabl:[],viral:4,virifi:7,welcom:[]}})
|
var structa4l__range =
[
[ "flags", "structa4l__range.html#a7504ba2a31c4c0dabd67f5f7a8b660b3", null ],
[ "max", "structa4l__range.html#ae6ae7be4195c43f3f56b312dd46c55a1", null ],
[ "min", "structa4l__range.html#a81c139fc8dda69559c9a4d2e4a9a3465", null ]
];
|
import Ember from 'ember';
export default Ember.Component.extend(Ember.Evented, {
layoutName: 'components/bs-modal',
classNames: ['modal'],
classNameBindings: ['fade', 'isVis:in'],
attributeBindings: ['role', 'aria-labelledby', 'isAriaHidden:aria-hidden', "ariaLabelledBy:aria-labelledby"],
isAriaHidden: (function() {
return "" + (this.get('isVisible'));
}).property('isVisible'),
modalBackdrop: '<div class="modal-backdrop fade in"></div>',
role: 'dialog',
footerViews: [],
backdrop: true,
title: null,
isVisible: false,
manual: false,
isVis: false,
fullSizeButtons: false,
fade: true,
didInsertElement: function() {
var name;
this._super();
this.setupBinders();
name = this.get('name');
Ember.assert("Modal name is required for modal view " + (this.get('elementId')), this.get('name'));
if (name == null) {
name = this.get('elementId');
}
this.ModalManager.add(name, this);
if (this.manual) {
return this.show();
}
},
becameVisible: function() {
Ember.$('body').addClass('modal-open');
if (this.get("backdrop")) {
return this.appendBackdrop();
}
},
becameHidden: function() {
Ember.$('body').removeClass('modal-open');
if (this._backdrop) {
return this._backdrop.remove();
}
},
appendBackdrop: function() {
var parentElement;
parentElement = this.$().parent();
return this._backdrop = Ember.$(this.modalBackdrop).appendTo(parentElement);
},
show: function() {
var current;
this.set('isVisible', true);
current = this;
Ember.run.later((function() {
current.set('isVis', true);
}), 15);
},
hide: function() {
var current;
this.set('isVis', false);
current = this;
this.$().one('webkitTransitionEnd', function() {
current.set('isVisible', false);
});
return false;
},
toggle: function() {
return this.toggleProperty('isVisible');
},
click: function(event) {
var target, targetDismiss;
target = event.target;
targetDismiss = target.getAttribute("data-dismiss");
if (targetDismiss === 'modal') {
return this.close();
}
},
keyPressed: function(event) {
if (event.keyCode === 27) {
return this.close(event);
}
},
close: function() {
var current;
this.set('isVis', false);
current = this;
this.$().one('webkitTransitionEnd', function() {
if (current.get('manual')) {
current.destroy();
} else {
current.hide();
}
});
return this.trigger('closed');
},
willDestroyElement: function() {
var name;
Ember.$('body').removeClass('modal-open');
this.removeHandlers();
name = this.get('name');
if (name == null) {
name = this.get('elementId');
}
this.ModalManager.remove(name, this);
if (this._backdrop) {
return this._backdrop.remove();
}
},
removeHandlers: function() {
return Ember.$(window.document).unbind("keyup", this._keyUpHandler);
},
setupBinders: function() {
var handler;
handler = (function(_this) {
return function(event) {
return _this.keyPressed(event);
};
})(this);
Ember.$(window.document).bind("keyup", handler);
return this._keyUpHandler = handler;
}
});
|
import React from "react"
import Layout from '../components/layout'
import Pic from '../images/profile_pic.jpeg'
export default function Home() {
return (
<Layout>
{/* <p>Hello World</p> */}
{/* <img src={Pic}alt="Profile Pic"></img> */}
<div>
</div>
</Layout>
)
}
|
var searchData=
[
['calctrl_2eh',['calctrl.h',['../calctrl_8h.html',1,'']]],
['caret_2eh',['caret.h',['../caret_8h.html',1,'']]],
['cat_5fclasses_2eh',['cat_classes.h',['../cat__classes_8h.html',1,'']]],
['changes_5fsince28_2eh',['changes_since28.h',['../changes__since28_8h.html',1,'']]],
['chartype_2eh',['chartype.h',['../chartype_8h.html',1,'']]],
['checkbox_2eh',['checkbox.h',['../checkbox_8h.html',1,'']]],
['checklst_2eh',['checklst.h',['../checklst_8h.html',1,'']]],
['choicdlg_2eh',['choicdlg.h',['../choicdlg_8h.html',1,'']]],
['choice_2eh',['choice.h',['../choice_8h.html',1,'']]],
['choicebk_2eh',['choicebk.h',['../choicebk_8h.html',1,'']]],
['class_2eh',['class.h',['../class_8h.html',1,'']]],
['class_5fappmanagement_2eh',['class_appmanagement.h',['../class__appmanagement_8h.html',1,'']]],
['class_5farchive_2eh',['class_archive.h',['../class__archive_8h.html',1,'']]],
['class_5faui_2eh',['class_aui.h',['../class__aui_8h.html',1,'']]],
['class_5fbookctrl_2eh',['class_bookctrl.h',['../class__bookctrl_8h.html',1,'']]],
['class_5fcfg_2eh',['class_cfg.h',['../class__cfg_8h.html',1,'']]],
['class_5fcmndlg_2eh',['class_cmndlg.h',['../class__cmndlg_8h.html',1,'']]],
['class_5fcontainers_2eh',['class_containers.h',['../class__containers_8h.html',1,'']]],
['class_5fconv_2eh',['class_conv.h',['../class__conv_8h.html',1,'']]],
['class_5fctrl_2eh',['class_ctrl.h',['../class__ctrl_8h.html',1,'']]],
['class_5fdata_2eh',['class_data.h',['../class__data_8h.html',1,'']]],
['class_5fdc_2eh',['class_dc.h',['../class__dc_8h.html',1,'']]],
['class_5fdebugging_2eh',['class_debugging.h',['../class__debugging_8h.html',1,'']]],
['class_5fdnd_2eh',['class_dnd.h',['../class__dnd_8h.html',1,'']]],
['class_5fdocview_2eh',['class_docview.h',['../class__docview_8h.html',1,'']]],
['class_5fdvc_2eh',['class_dvc.h',['../class__dvc_8h.html',1,'']]],
['class_5fevents_2eh',['class_events.h',['../class__events_8h.html',1,'']]],
['class_5ffile_2eh',['class_file.h',['../class__file_8h.html',1,'']]],
['class_5fgdi_2eh',['class_gdi.h',['../class__gdi_8h.html',1,'']]],
['class_5fgl_2eh',['class_gl.h',['../class__gl_8h.html',1,'']]],
['class_5fgrid_2eh',['class_grid.h',['../class__grid_8h.html',1,'']]],
['class_5fhelp_2eh',['class_help.h',['../class__help_8h.html',1,'']]],
['class_5fhtml_2eh',['class_html.h',['../class__html_8h.html',1,'']]],
['class_5fipc_2eh',['class_ipc.h',['../class__ipc_8h.html',1,'']]],
['class_5flogging_2eh',['class_logging.h',['../class__logging_8h.html',1,'']]],
['class_5fmanagedwnd_2eh',['class_managedwnd.h',['../class__managedwnd_8h.html',1,'']]],
['class_5fmedia_2eh',['class_media.h',['../class__media_8h.html',1,'']]],
['class_5fmenus_2eh',['class_menus.h',['../class__menus_8h.html',1,'']]],
['class_5fmisc_2eh',['class_misc.h',['../class__misc_8h.html',1,'']]],
['class_5fmiscwnd_2eh',['class_miscwnd.h',['../class__miscwnd_8h.html',1,'']]],
['class_5fnet_2eh',['class_net.h',['../class__net_8h.html',1,'']]],
['class_5fpickers_2eh',['class_pickers.h',['../class__pickers_8h.html',1,'']]],
['class_5fprinting_2eh',['class_printing.h',['../class__printing_8h.html',1,'']]],
['class_5fpropgrid_2eh',['class_propgrid.h',['../class__propgrid_8h.html',1,'']]],
['class_5fribbon_2eh',['class_ribbon.h',['../class__ribbon_8h.html',1,'']]],
['class_5frichtext_2eh',['class_richtext.h',['../class__richtext_8h.html',1,'']]],
['class_5frtti_2eh',['class_rtti.h',['../class__rtti_8h.html',1,'']]],
['class_5fsmartpointers_2eh',['class_smartpointers.h',['../class__smartpointers_8h.html',1,'']]],
['class_5fstc_2eh',['class_stc.h',['../class__stc_8h.html',1,'']]],
['class_5fstreams_2eh',['class_streams.h',['../class__streams_8h.html',1,'']]],
['class_5fthreading_2eh',['class_threading.h',['../class__threading_8h.html',1,'']]],
['class_5fvalidator_2eh',['class_validator.h',['../class__validator_8h.html',1,'']]],
['class_5fvfs_2eh',['class_vfs.h',['../class__vfs_8h.html',1,'']]],
['class_5fwebview_2eh',['class_webview.h',['../class__webview_8h.html',1,'']]],
['class_5fwinlayout_2eh',['class_winlayout.h',['../class__winlayout_8h.html',1,'']]],
['class_5fxml_2eh',['class_xml.h',['../class__xml_8h.html',1,'']]],
['class_5fxrc_2eh',['class_xrc.h',['../class__xrc_8h.html',1,'']]],
['clipbrd_2eh',['clipbrd.h',['../clipbrd_8h.html',1,'']]],
['clntdata_2eh',['clntdata.h',['../clntdata_8h.html',1,'']]],
['clrpicker_2eh',['clrpicker.h',['../clrpicker_8h.html',1,'']]],
['cmake_2emd',['cmake.md',['../cmake_8md.html',1,'']]],
['cmdline_2eh',['cmdline.h',['../cmdline_8h.html',1,'']]],
['cmdproc_2eh',['cmdproc.h',['../cmdproc_8h.html',1,'']]],
['cmndata_2eh',['cmndata.h',['../cmndata_8h.html',1,'']]],
['collheaderctrl_2eh',['collheaderctrl.h',['../collheaderctrl_8h.html',1,'']]],
['collpane_2eh',['collpane.h',['../collpane_8h.html',1,'']]],
['colordlg_2eh',['colordlg.h',['../colordlg_8h.html',1,'']]],
['colour_2eh',['colour.h',['../colour_8h.html',1,'']]],
['colourdata_2eh',['colourdata.h',['../colourdata_8h.html',1,'']]],
['combo_2eh',['combo.h',['../combo_8h.html',1,'']]],
['combobox_2eh',['combobox.h',['../combobox_8h.html',1,'']]],
['commandlinkbutton_2eh',['commandlinkbutton.h',['../commandlinkbutton_8h.html',1,'']]],
['commondialogs_2eh',['commondialogs.h',['../commondialogs_8h.html',1,'']]],
['config_2eh',['config.h',['../docs_2doxygen_2overviews_2config_8h.html',1,'(Global Namespace)'],['../interface_2wx_2config_8h.html',1,'(Global Namespace)']]],
['const_5fcpp_2eh',['const_cpp.h',['../const__cpp_8h.html',1,'']]],
['const_5fstdevtid_2eh',['const_stdevtid.h',['../const__stdevtid_8h.html',1,'']]],
['const_5fstockitems_2eh',['const_stockitems.h',['../const__stockitems_8h.html',1,'']]],
['const_5fwxusedef_2eh',['const_wxusedef.h',['../const__wxusedef_8h.html',1,'']]],
['constants_2eh',['constants.h',['../constants_8h.html',1,'']]],
['container_2eh',['container.h',['../container_8h.html',1,'']]],
['containr_2eh',['containr.h',['../containr_8h.html',1,'']]],
['control_2eh',['control.h',['../control_8h.html',1,'(Global Namespace)'],['../ribbon_2control_8h.html',1,'(Global Namespace)']]],
['convauto_2eh',['convauto.h',['../convauto_8h.html',1,'']]],
['copyright_2eh',['copyright.h',['../copyright_8h.html',1,'']]],
['cpp_2eh',['cpp.h',['../cpp_8h.html',1,'']]],
['cpprttidisabled_2eh',['cpprttidisabled.h',['../cpprttidisabled_8h.html',1,'']]],
['cshelp_2eh',['cshelp.h',['../cshelp_8h.html',1,'']]],
['ctrlsub_2eh',['ctrlsub.h',['../ctrlsub_8h.html',1,'']]],
['cursor_2eh',['cursor.h',['../cursor_8h.html',1,'']]],
['custombgwin_2eh',['custombgwin.h',['../custombgwin_8h.html',1,'']]],
['customwidgets_2eh',['customwidgets.h',['../customwidgets_8h.html',1,'']]]
];
|
import { value } from 'ember-cli-page-object';
export default {
scope: '.contact-info',
email: value('input[name=email]')
};
|
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: 'parityshift-site',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
|
/*
YUI 3.8.0pr1 (build 140)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("datatype-xml-parse",function(e,t){var n=e.Lang;e.mix(e.namespace("XML"),{parse:function(e){var t=null;if(n.isString(e))try{n.isUndefined(ActiveXObject)||(t=new ActiveXObject("Microsoft.XMLDOM"),t.async=!1,t.loadXML(e))}catch(r){try{n.isUndefined(DOMParser)||(t=(new DOMParser).parseFromString(e,"text/xml")),n.isUndefined(Windows.Data.Xml.Dom)||(t=new Windows.Data.Xml.Dom.XmlDocument,t.loadXml(e))}catch(i){}}return n.isNull(t)||n.isNull(t.documentElement)||t.documentElement.nodeName==="parsererror",t}}),e.namespace("Parsers").xml=e.XML.parse,e.namespace("DataType"),e.DataType.XML=e.XML},"3.8.0pr1");
|
// See http://brunch.io for documentation.
exports.files = {
javascripts: {
joinTo: {
'vendor.js': /^(?!app)/,
'app.js': /^app/
}
},
stylesheets: {joinTo: 'app.css'}
};
exports.npm = {
enabled: true,
styles: {
purecss: ['build/pure-min.css']
}
};
exports.plugins = {
babel: {
presets: ['latest', 'react']
},
replacer: {
dict: [
{
key: '__API_URL__',
value: 'http://localhost:5000'
},
{
key: '__WEBSOCKET_URL__',
value: 'ws://localhost:5001'
}
]
}
};
|
// $FlowIssue this is what mapbox/rehype-prism uses under the hood
const refract = require("refractor");
// NOTE: This highlights template-strings as strings of CSS
const styledHighlight = {
"styled-template-string": {
pattern: /(styled(\.\w+|\([^\)]*\))(\.\w+(\([^\)]*\))*)*|css|injectGlobal|createGlobalStyle|keyframes|\.extend|\.withComponent)`(?:\$\{[^}]+\}|\\\\|\\?[^\\])*?`/,
lookbehind: true,
greedy: true,
inside: {
interpolation: {
pattern: /\$\{[^}]+\}/,
inside: {
"interpolation-punctuation": {
pattern: /^\$\{|\}$/,
alias: "punctuation"
},
rest: refract.languages.jsx
}
},
string: {
pattern: /[^$;]+/,
inside: refract.languages.css,
alias: "language-css"
}
}
}
};
refract.languages.insertBefore("jsx", "template-string", styledHighlight);
refract.languages.insertBefore("js", "template-string", styledHighlight);
const withMDX = require("@next/mdx")({
extension: /\.mdx?$/,
options: {
// $FlowIssue
hastPlugins: [require("@mapbox/rehype-prism")]
}
});
const fs = require("fs");
const { join } = require("path");
const generateJsonFeed = require("./data/generate-json-feed");
const { promisify } = require("util");
const copyFile = promisify(fs.copyFile);
const staticFilesToCopy = ["favicon.ico"];
module.exports = withMDX({
pageExtensions: ["js", "jsx", "mdx", "md"],
exportPathMap: async function(
defaultPathMap,
{ dev, dir, outDir, distDir, buildId }
) {
if (dev) return defaultPathMap;
generateJsonFeed(outDir);
await Promise.all(
staticFilesToCopy.map(file =>
copyFile(join(dir, file), join(outDir, file))
)
);
return defaultPathMap;
},
webpack(config, options) {
config.module.rules.push({
test: /.svg$/,
use: [
{
loader: "@svgr/webpack",
options: {
icon: true
}
}
]
});
config.module.rules.push({
test: /.css$/,
use: "raw-loader"
});
return config;
}
});
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{"+6XX":function(t,e,r){var n=r("y1pI");t.exports=function(t){return n(this.__data__,t)>-1}},"/9aa":function(t,e,r){var n=r("NykK"),i=r("ExA7");t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==n(t)}},"/e88":function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},"0mN4":function(t,e,r){"use strict";r("OGtf")("fixed",(function(t){return function(){return t(this,"tt","","")}}))},"2gN3":function(t,e,r){var n=r("Kz5y")["__core-js_shared__"];t.exports=n},"3Fdi":function(t,e,r){r("a1Th"),r("h7Nl"),r("Btvt");var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(e){}try{return t+""}catch(e){}}return""}},"44Ds":function(t,e,r){var n=r("e4Nc");function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function r(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=t.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(i.Cache||n),r}i.Cache=n,t.exports=i},"4kuk":function(t,e,r){var n=r("SfRM"),i=r("Hvzi"),a=r("u8Dt"),o=r("ekgI"),u=r("JSQU");function s(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=o,s.prototype.set=u,t.exports=s},"4uTw":function(t,e,r){var n=r("Z0cm"),i=r("9ggG"),a=r("GNiM"),o=r("dt0z");t.exports=function(t,e){return n(t)?t:i(t,e)?[t]:a(o(t))}},"8+s/":function(t,e,r){"use strict";r("V+eJ"),r("bWfx"),r("f3/d"),r("hHhE"),r("HAE/");var n,i=r("q1tI"),a=(n=i)&&"object"==typeof n&&"default"in n?n.default:n;function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var u=!("undefined"==typeof window||!window.document||!window.document.createElement);t.exports=function(t,e,r){if("function"!=typeof t)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof e)throw new Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==r&&"function"!=typeof r)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(n){if("function"!=typeof n)throw new Error("Expected WrappedComponent to be a React component.");var s,c=[];function f(){s=t(c.map((function(t){return t.props}))),l.canUseDOM?e(s):r&&(s=r(s))}var l=function(t){var e,r;function i(){return t.apply(this,arguments)||this}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,i.peek=function(){return s},i.rewind=function(){if(i.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var t=s;return s=void 0,c=[],t};var o=i.prototype;return o.UNSAFE_componentWillMount=function(){c.push(this),f()},o.componentDidUpdate=function(){f()},o.componentWillUnmount=function(){var t=c.indexOf(this);c.splice(t,1),f()},o.render=function(){return a.createElement(n,this.props)},i}(i.PureComponent);return o(l,"displayName","SideEffect("+function(t){return t.displayName||t.name||"Component"}(n)+")"),o(l,"canUseDOM",u),l}}},"9Nap":function(t,e,r){var n=r("/9aa");t.exports=function(t){if("string"==typeof t||n(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},"9eSz":function(t,e,r){"use strict";r("rGqo"),r("yt8O"),r("Btvt"),r("XfO3"),r("EK0E"),r("INYr"),r("0mN4");var n=r("TqRt");e.__esModule=!0,e.default=void 0;var i,a=n(r("PJYZ")),o=n(r("VbXa")),u=n(r("8OQS")),s=n(r("pVnL")),c=n(r("q1tI")),f=n(r("17x9")),l=function(t){var e=(0,s.default)({},t),r=e.resolutions,n=e.sizes,i=e.critical;return r&&(e.fixed=r,delete e.resolutions),n&&(e.fluid=n,delete e.sizes),i&&(e.loading="eager"),e.fluid&&(e.fluid=T([].concat(e.fluid))),e.fixed&&(e.fixed=T([].concat(e.fixed))),e},d=function(t){var e=t.media;return!!e&&(m&&!!window.matchMedia(e).matches)},p=function(t){var e=t.fluid,r=t.fixed;return h(e||r).src},h=function(t){if(m&&function(t){return!!t&&Array.isArray(t)&&t.some((function(t){return void 0!==t.media}))}(t)){var e=t.findIndex(d);if(-1!==e)return t[e];var r=t.findIndex((function(t){return void 0===t.media}));if(-1!==r)return t[r]}return t[0]},g=Object.create({}),y=function(t){var e=l(t),r=p(e);return g[r]||!1},v="undefined"!=typeof HTMLImageElement&&"loading"in HTMLImageElement.prototype,m="undefined"!=typeof window,b=m&&window.IntersectionObserver,w=new WeakMap;function S(t){return t.map((function(t){var e=t.src,r=t.srcSet,n=t.srcSetWebp,i=t.media,a=t.sizes;return c.default.createElement(c.default.Fragment,{key:e},n&&c.default.createElement("source",{type:"image/webp",media:i,srcSet:n,sizes:a}),c.default.createElement("source",{media:i,srcSet:r,sizes:a}))}))}function T(t){var e=[],r=[];return t.forEach((function(t){return(t.media?e:r).push(t)})),[].concat(e,r)}function E(t){return t.map((function(t){var e=t.src,r=t.media,n=t.tracedSVG;return c.default.createElement("source",{key:e,media:r,srcSet:n})}))}function x(t){return t.map((function(t){var e=t.src,r=t.media,n=t.base64;return c.default.createElement("source",{key:e,media:r,srcSet:n})}))}function O(t,e){var r=t.srcSet,n=t.srcSetWebp,i=t.media,a=t.sizes;return"<source "+(e?"type='image/webp' ":"")+(i?'media="'+i+'" ':"")+'srcset="'+(e?n:r)+'" '+(a?'sizes="'+a+'" ':"")+"/>"}var _=function(t,e){var r=(void 0===i&&"undefined"!=typeof window&&window.IntersectionObserver&&(i=new window.IntersectionObserver((function(t){t.forEach((function(t){if(w.has(t.target)){var e=w.get(t.target);(t.isIntersecting||t.intersectionRatio>0)&&(i.unobserve(t.target),w.delete(t.target),e())}}))}),{rootMargin:"200px"})),i);return r&&(r.observe(t),w.set(t,e)),function(){r.unobserve(t),w.delete(t)}},C=function(t){var e=t.src?'src="'+t.src+'" ':'src="" ',r=t.sizes?'sizes="'+t.sizes+'" ':"",n=t.srcSet?'srcset="'+t.srcSet+'" ':"",i=t.title?'title="'+t.title+'" ':"",a=t.alt?'alt="'+t.alt+'" ':'alt="" ',o=t.width?'width="'+t.width+'" ':"",u=t.height?'height="'+t.height+'" ':"",s=t.crossOrigin?'crossorigin="'+t.crossOrigin+'" ':"",c=t.loading?'loading="'+t.loading+'" ':"",f=t.draggable?'draggable="'+t.draggable+'" ':"";return"<picture>"+t.imageVariants.map((function(t){return(t.srcSetWebp?O(t,!0):"")+O(t)})).join("")+"<img "+c+o+u+r+n+e+a+i+s+f+'style="position:absolute;top:0;left:0;opacity:1;width:100%;height:100%;object-fit:cover;object-position:center"/></picture>'},I=c.default.forwardRef((function(t,e){var r=t.src,n=t.imageVariants,i=t.generateSources,a=t.spreadProps,o=t.ariaHidden,u=c.default.createElement(A,(0,s.default)({ref:e,src:r},a,{ariaHidden:o}));return n.length>1?c.default.createElement("picture",null,i(n),u):u})),A=c.default.forwardRef((function(t,e){var r=t.sizes,n=t.srcSet,i=t.src,a=t.style,o=t.onLoad,f=t.onError,l=t.loading,d=t.draggable,p=t.ariaHidden,h=(0,u.default)(t,["sizes","srcSet","src","style","onLoad","onError","loading","draggable","ariaHidden"]);return c.default.createElement("img",(0,s.default)({"aria-hidden":p,sizes:r,srcSet:n,src:i},h,{onLoad:o,onError:f,ref:e,loading:l,draggable:d,style:(0,s.default)({position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"},a)}))}));A.propTypes={style:f.default.object,onError:f.default.func,onLoad:f.default.func};var j=function(t){function e(e){var r;(r=t.call(this,e)||this).seenBefore=m&&y(e),r.isCritical="eager"===e.loading||e.critical,r.addNoScript=!(r.isCritical&&!e.fadeIn),r.useIOSupport=!v&&b&&!r.isCritical&&!r.seenBefore;var n=r.isCritical||m&&(v||!r.useIOSupport);return r.state={isVisible:n,imgLoaded:!1,imgCached:!1,fadeIn:!r.seenBefore&&e.fadeIn},r.imageRef=c.default.createRef(),r.placeholderRef=e.placeholderRef||c.default.createRef(),r.handleImageLoaded=r.handleImageLoaded.bind((0,a.default)(r)),r.handleRef=r.handleRef.bind((0,a.default)(r)),r}(0,o.default)(e,t);var r=e.prototype;return r.componentDidMount=function(){if(this.state.isVisible&&"function"==typeof this.props.onStartLoad&&this.props.onStartLoad({wasCached:y(this.props)}),this.isCritical){var t=this.imageRef.current;t&&t.complete&&this.handleImageLoaded()}},r.componentWillUnmount=function(){this.cleanUpListeners&&this.cleanUpListeners()},r.handleRef=function(t){var e=this;this.useIOSupport&&t&&(this.cleanUpListeners=_(t,(function(){var t=y(e.props);e.state.isVisible||"function"!=typeof e.props.onStartLoad||e.props.onStartLoad({wasCached:t}),e.setState({isVisible:!0},(function(){e.setState({imgLoaded:t,imgCached:!(!e.imageRef.current||!e.imageRef.current.currentSrc)})}))})))},r.handleImageLoaded=function(){var t,e,r;t=this.props,e=l(t),r=p(e),g[r]=!0,this.setState({imgLoaded:!0}),this.props.onLoad&&this.props.onLoad()},r.render=function(){var t=l(this.props),e=t.title,r=t.alt,n=t.className,i=t.style,a=void 0===i?{}:i,o=t.imgStyle,u=void 0===o?{}:o,f=t.placeholderStyle,d=void 0===f?{}:f,p=t.placeholderClassName,g=t.fluid,y=t.fixed,v=t.backgroundColor,m=t.durationFadeIn,b=t.Tag,w=t.itemProp,T=t.loading,O=t.draggable,_=!1===this.state.fadeIn||this.state.imgLoaded,j=!0===this.state.fadeIn&&!this.state.imgCached,N=(0,s.default)({opacity:_?1:0,transition:j?"opacity "+m+"ms":"none"},u),k="boolean"==typeof v?"lightgray":v,L={transitionDelay:m+"ms"},P=(0,s.default)({opacity:this.state.imgLoaded?0:1},j&&L,u,d),R={title:e,alt:this.state.isVisible?"":r,style:P,className:p,itemProp:w};if(g){var z=g,M=h(g);return c.default.createElement(b,{className:(n||"")+" gatsby-image-wrapper",style:(0,s.default)({position:"relative",overflow:"hidden",maxWidth:M.maxWidth?M.maxWidth+"px":null,maxHeight:M.maxHeight?M.maxHeight+"px":null},a),ref:this.handleRef,key:"fluid-"+JSON.stringify(M.srcSet)},c.default.createElement(b,{"aria-hidden":!0,style:{width:"100%",paddingBottom:100/M.aspectRatio+"%"}}),k&&c.default.createElement(b,{"aria-hidden":!0,title:e,style:(0,s.default)({backgroundColor:k,position:"absolute",top:0,bottom:0,opacity:this.state.imgLoaded?0:1,right:0,left:0},j&&L)}),M.base64&&c.default.createElement(I,{ariaHidden:!0,ref:this.placeholderRef,src:M.base64,spreadProps:R,imageVariants:z,generateSources:x}),M.tracedSVG&&c.default.createElement(I,{ariaHidden:!0,ref:this.placeholderRef,src:M.tracedSVG,spreadProps:R,imageVariants:z,generateSources:E}),this.state.isVisible&&c.default.createElement("picture",null,S(z),c.default.createElement(A,{alt:r,title:e,sizes:M.sizes,src:M.src,crossOrigin:this.props.crossOrigin,srcSet:M.srcSet,style:N,ref:this.imageRef,onLoad:this.handleImageLoaded,onError:this.props.onError,itemProp:w,loading:T,draggable:O})),this.addNoScript&&c.default.createElement("noscript",{dangerouslySetInnerHTML:{__html:C((0,s.default)({alt:r,title:e,loading:T},M,{imageVariants:z}))}}))}if(y){var F=y,q=h(y),V=(0,s.default)({position:"relative",overflow:"hidden",display:"inline-block",width:q.width,height:q.height},a);return"inherit"===a.display&&delete V.display,c.default.createElement(b,{className:(n||"")+" gatsby-image-wrapper",style:V,ref:this.handleRef,key:"fixed-"+JSON.stringify(q.srcSet)},k&&c.default.createElement(b,{"aria-hidden":!0,title:e,style:(0,s.default)({backgroundColor:k,width:q.width,opacity:this.state.imgLoaded?0:1,height:q.height},j&&L)}),q.base64&&c.default.createElement(I,{ariaHidden:!0,ref:this.placeholderRef,src:q.base64,spreadProps:R,imageVariants:F,generateSources:x}),q.tracedSVG&&c.default.createElement(I,{ariaHidden:!0,ref:this.placeholderRef,src:q.tracedSVG,spreadProps:R,imageVariants:F,generateSources:E}),this.state.isVisible&&c.default.createElement("picture",null,S(F),c.default.createElement(A,{alt:r,title:e,width:q.width,height:q.height,sizes:q.sizes,src:q.src,crossOrigin:this.props.crossOrigin,srcSet:q.srcSet,style:N,ref:this.imageRef,onLoad:this.handleImageLoaded,onError:this.props.onError,itemProp:w,loading:T,draggable:O})),this.addNoScript&&c.default.createElement("noscript",{dangerouslySetInnerHTML:{__html:C((0,s.default)({alt:r,title:e,loading:T},q,{imageVariants:F}))}}))}return null},e}(c.default.Component);j.defaultProps={fadeIn:!0,durationFadeIn:500,alt:"",Tag:"div",loading:"lazy"};var N=f.default.shape({width:f.default.number.isRequired,height:f.default.number.isRequired,src:f.default.string.isRequired,srcSet:f.default.string.isRequired,base64:f.default.string,tracedSVG:f.default.string,srcWebp:f.default.string,srcSetWebp:f.default.string,media:f.default.string}),k=f.default.shape({aspectRatio:f.default.number.isRequired,src:f.default.string.isRequired,srcSet:f.default.string.isRequired,sizes:f.default.string.isRequired,base64:f.default.string,tracedSVG:f.default.string,srcWebp:f.default.string,srcSetWebp:f.default.string,media:f.default.string,maxWidth:f.default.number,maxHeight:f.default.number});j.propTypes={resolutions:N,sizes:k,fixed:f.default.oneOfType([N,f.default.arrayOf(N)]),fluid:f.default.oneOfType([k,f.default.arrayOf(k)]),fadeIn:f.default.bool,durationFadeIn:f.default.number,title:f.default.string,alt:f.default.string,className:f.default.oneOfType([f.default.string,f.default.object]),critical:f.default.bool,crossOrigin:f.default.oneOfType([f.default.string,f.default.bool]),style:f.default.object,imgStyle:f.default.object,placeholderStyle:f.default.object,placeholderClassName:f.default.string,backgroundColor:f.default.oneOfType([f.default.string,f.default.bool]),onLoad:f.default.func,onError:f.default.func,onStartLoad:f.default.func,Tag:f.default.string,itemProp:f.default.string,loading:f.default.oneOf(["auto","lazy","eager"]),draggable:f.default.bool};var L=j;e.default=L},"9ggG":function(t,e,r){var n=r("Z0cm"),i=r("/9aa"),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=function(t,e){if(n(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!i(t))||(o.test(t)||!a.test(t)||null!=e&&t in Object(e))}},AP2z:function(t,e,r){r("a1Th"),r("h7Nl"),r("Btvt");var n=r("nmnc"),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,u=n?n.toStringTag:void 0;t.exports=function(t){var e=a.call(t,u),r=t[u];try{t[u]=void 0;var n=!0}catch(s){}var i=o.call(t);return n&&(e?t[u]=r:delete t[u]),i}},Bl7J:function(t,e,r){"use strict";var n=r("q1tI"),i=r.n(n),a=(r("Dm0Y"),function(t){var e=t.children;return i.a.createElement("div",{style:{maxWidth:1180,margin:"0 auto"}},e)}),o=r("Wbzz"),u=r("T78C"),s=r.n(u),c=function(){return i.a.createElement("nav",{role:"navigation"},i.a.createElement("ul",{className:s.a.navigation},i.a.createElement("li",{className:s.a.navigationItem},i.a.createElement(o.a,{to:"/"},"Home")),i.a.createElement("li",{className:s.a.navigationItem},i.a.createElement(o.a,{to:"/blog/"},"Blog"))))};var f=function(t){var e,r;function n(){return t.apply(this,arguments)||this}return r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,n.prototype.render=function(){var t=this.props.children;return i.a.createElement(a,null,i.a.createElement(c,null),t)},n}(i.a.Component);e.a=f},Cwc5:function(t,e,r){var n=r("NKxu"),i=r("Npjl");t.exports=function(t,e){var r=i(t,e);return n(r)?r:void 0}},Dm0Y:function(t,e,r){},E2jh:function(t,e,r){r("rGqo"),r("yt8O"),r("Btvt");var n,i=r("2gN3"),a=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!a&&a in t}},EK0E:function(t,e,r){"use strict";var n,i=r("dyZX"),a=r("CkkT")(0),o=r("KroJ"),u=r("Z6vF"),s=r("czNK"),c=r("ZD67"),f=r("0/R4"),l=r("s5qY"),d=r("s5qY"),p=!i.ActiveXObject&&"ActiveXObject"in i,h=u.getWeak,g=Object.isExtensible,y=c.ufstore,v=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(t){if(f(t)){var e=h(t);return!0===e?y(l(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return c.def(l(this,"WeakMap"),t,e)}},b=t.exports=r("4LiD")("WeakMap",v,m,c,!0,!0);d&&p&&(s((n=c.getConstructor(v,"WeakMap")).prototype,m),u.NEED=!0,a(["delete","has","get","set"],(function(t){var e=b.prototype,r=e[t];o(e,t,(function(e,i){if(f(e)&&!g(e)){this._f||(this._f=new n);var a=this._f[t](e,i);return"set"==t?this:a}return r.call(this,e,i)}))})))},EpBk:function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},ExA7:function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},GNiM:function(t,e,r){r("pIFo");var n=r("I01J"),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=n((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,r,n,i){e.push(n?i.replace(a,"$1"):r||t)})),e}));t.exports=o},GoyQ:function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},H8j4:function(t,e,r){var n=r("QkVE");t.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},"HAE/":function(t,e,r){var n=r("XKFU");n(n.S+n.F*!r("nh4g"),"Object",{defineProperty:r("hswa").f})},Hvzi:function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},I01J:function(t,e,r){var n=r("44Ds");t.exports=function(t){var e=n(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}},INYr:function(t,e,r){"use strict";var n=r("XKFU"),i=r("CkkT")(6),a="findIndex",o=!0;a in[]&&Array(1)[a]((function(){o=!1})),n(n.P+n.F*o,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r("nGyu")(a)},JHgL:function(t,e,r){var n=r("QkVE");t.exports=function(t){return n(this,t).get(t)}},JSQU:function(t,e,r){var n=r("YESw");t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},KMkd:function(t,e){t.exports=function(){this.__data__=[],this.size=0}},KfNM:function(t,e,r){r("a1Th"),r("h7Nl"),r("Btvt");var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},Kz5y:function(t,e,r){var n=r("WFqU"),i="object"==typeof self&&self&&self.Object===Object&&self,a=n||i||Function("return this")();t.exports=a},NKxu:function(t,e,r){r("pIFo"),r("Oyvg"),r("a1Th"),r("h7Nl"),r("Btvt");var n=r("lSCD"),i=r("E2jh"),a=r("GoyQ"),o=r("3Fdi"),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,f=s.toString,l=c.hasOwnProperty,d=RegExp("^"+f.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!a(t)||i(t))&&(n(t)?d:u).test(o(t))}},Npjl:function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},NykK:function(t,e,r){var n=r("nmnc"),i=r("AP2z"),a=r("KfNM"),o=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?i(t):a(t)}},OGtf:function(t,e,r){var n=r("XKFU"),i=r("eeVq"),a=r("vhPU"),o=/"/g,u=function(t,e,r,n){var i=String(a(t)),u="<"+e;return""!==r&&(u+=" "+r+'="'+String(n).replace(o,""")+'"'),u+">"+i+"</"+e+">"};t.exports=function(t,e){var r={};r[t]=e(u),n(n.P+n.F*i((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3})),"String",r)}},Oyvg:function(t,e,r){var n=r("dyZX"),i=r("Xbzi"),a=r("hswa").f,o=r("kJMx").f,u=r("quPj"),s=r("C/va"),c=n.RegExp,f=c,l=c.prototype,d=/a/g,p=/a/g,h=new c(d)!==d;if(r("nh4g")&&(!h||r("eeVq")((function(){return p[r("K0xU")("match")]=!1,c(d)!=d||c(p)==p||"/a/i"!=c(d,"i")})))){c=function(t,e){var r=this instanceof c,n=u(t),a=void 0===e;return!r&&n&&t.constructor===c&&a?t:i(h?new f(n&&!a?t.source:t,e):f((n=t instanceof c)?t.source:t,n&&a?s.call(t):e),r?this:l,c)};for(var g=function(t){t in c||a(c,t,{configurable:!0,get:function(){return f[t]},set:function(e){f[t]=e}})},y=o(f),v=0;y.length>v;)g(y[v++]);l.constructor=c,c.prototype=l,r("KroJ")(n,"RegExp",c)}r("elZq")("RegExp")},QkVE:function(t,e,r){r("bWfx");var n=r("EpBk");t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},SfRM:function(t,e,r){var n=r("YESw");t.exports=function(){this.__data__=n?n(null):{},this.size=0}},T78C:function(t,e,r){t.exports={navigation:"navigation-module--navigation--_yI7y",navigationItem:"navigation-module--navigationItem--1plNx"}},WFqU:function(t,e,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(this,r("yLpj"))},Wbzz:function(t,e,r){"use strict";r("xfY5"),r("q1tI");var n=r("+ZDr"),i=r.n(n);r.d(e,"a",(function(){return i.a}));r("lw3w"),r("emEt").default.enqueue},Xi7e:function(t,e,r){var n=r("KMkd"),i=r("adU4"),a=r("tMB7"),o=r("+6XX"),u=r("Z8oC");function s(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=o,s.prototype.set=u,t.exports=s},YESw:function(t,e,r){var n=r("Cwc5")(Object,"create");t.exports=n},Z0cm:function(t,e,r){r("LK8F");var n=Array.isArray;t.exports=n},Z8oC:function(t,e,r){var n=r("y1pI");t.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},ZD67:function(t,e,r){"use strict";var n=r("3Lyj"),i=r("Z6vF").getWeak,a=r("y3w9"),o=r("0/R4"),u=r("9gX7"),s=r("SlkY"),c=r("CkkT"),f=r("aagx"),l=r("s5qY"),d=c(5),p=c(6),h=0,g=function(t){return t._l||(t._l=new y)},y=function(){this.a=[]},v=function(t,e){return d(t.a,(function(t){return t[0]===e}))};y.prototype={get:function(t){var e=v(this,t);if(e)return e[1]},has:function(t){return!!v(this,t)},set:function(t,e){var r=v(this,t);r?r[1]=e:this.a.push([t,e])},delete:function(t){var e=p(this.a,(function(e){return e[0]===t}));return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,r,a){var c=t((function(t,n){u(t,c,e,"_i"),t._t=e,t._i=h++,t._l=void 0,null!=n&&s(n,r,t[a],t)}));return n(c.prototype,{delete:function(t){if(!o(t))return!1;var r=i(t);return!0===r?g(l(this,e)).delete(t):r&&f(r,this._i)&&delete r[this._i]},has:function(t){if(!o(t))return!1;var r=i(t);return!0===r?g(l(this,e)).has(t):r&&f(r,this._i)}}),c},def:function(t,e,r){var n=i(a(e),!0);return!0===n?g(t).set(e,r):n[t._i]=r,t},ufstore:g}},ZWtO:function(t,e,r){var n=r("4uTw"),i=r("9Nap");t.exports=function(t,e){for(var r=0,a=(e=n(e,t)).length;null!=t&&r<a;)t=t[i(e[r++])];return r&&r==a?t:void 0}},adU4:function(t,e,r){var n=r("y1pI"),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0)&&(r==e.length-1?e.pop():i.call(e,r,1),--this.size,!0)}},bmMU:function(t,e,r){r("SRfc"),r("RW0V"),r("a1Th"),r("h7Nl"),r("OEbY"),r("Oyvg"),r("LK8F"),r("T39b"),r("rGqo"),r("yt8O"),r("Btvt"),r("XfO3"),r("9AAn");var n="undefined"!=typeof Element,i="function"==typeof Map,a="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;t.exports=function(t,e){try{return function t(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var u,s,c,f;if(Array.isArray(e)){if((u=e.length)!=r.length)return!1;for(s=u;0!=s--;)if(!t(e[s],r[s]))return!1;return!0}if(i&&e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(f=e.entries();!(s=f.next()).done;)if(!r.has(s.value[0]))return!1;for(f=e.entries();!(s=f.next()).done;)if(!t(s.value[1],r.get(s.value[0])))return!1;return!0}if(a&&e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(f=e.entries();!(s=f.next()).done;)if(!r.has(s.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(r)){if((u=e.length)!=r.length)return!1;for(s=u;0!=s--;)if(e[s]!==r[s])return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((u=(c=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(s=u;0!=s--;)if(!Object.prototype.hasOwnProperty.call(r,c[s]))return!1;if(n&&e instanceof Element)return!1;for(s=u;0!=s--;)if(("_owner"!==c[s]&&"__v"!==c[s]&&"__o"!==c[s]||!e.$$typeof)&&!t(e[c[s]],r[c[s]]))return!1;return!0}return e!=e&&r!=r}(t,e)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}}},"dZ+Y":function(t,e,r){"use strict";var n=r("XKFU"),i=r("CkkT")(3);n(n.P+n.F*!r("LyE8")([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},dt0z:function(t,e,r){var n=r("zoYe");t.exports=function(t){return null==t?"":n(t)}},e4Nc:function(t,e,r){var n=r("fGT3"),i=r("k+1r"),a=r("JHgL"),o=r("pSRY"),u=r("H8j4");function s(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=o,s.prototype.set=u,t.exports=s},eUgh:function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}},ebwN:function(t,e,r){var n=r("Cwc5")(r("Kz5y"),"Map");t.exports=n},ekgI:function(t,e,r){var n=r("YESw"),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:i.call(e,t)}},fGT3:function(t,e,r){var n=r("4kuk"),i=r("Xi7e"),a=r("ebwN");t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(a||i),string:new n}}},h7Nl:function(t,e,r){var n=Date.prototype,i=n.toString,a=n.getTime;new Date(NaN)+""!="Invalid Date"&&r("KroJ")(n,"toString",(function(){var t=a.call(this);return t==t?i.call(this):"Invalid Date"}))},"k+1r":function(t,e,r){var n=r("QkVE");t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},lSCD:function(t,e,r){var n=r("NykK"),i=r("GoyQ");t.exports=function(t){if(!i(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},ljhN:function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},lw3w:function(t,e,r){var n;t.exports=(n=r("rzlk"))&&n.default||n},mwIZ:function(t,e,r){var n=r("ZWtO");t.exports=function(t,e,r){var i=null==t?void 0:n(t,e);return void 0===i?r:i}},nmnc:function(t,e,r){var n=r("Kz5y").Symbol;t.exports=n},pSRY:function(t,e,r){var n=r("QkVE");t.exports=function(t){return n(this,t).has(t)}},qhky:function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return gt}));r("dZ+Y"),r("KKXr"),r("2Spj"),r("eM6i"),r("8+KV"),r("0l/t"),r("LK8F"),r("pIFo"),r("V+eJ"),r("/SS/"),r("hHhE"),r("91GP"),r("HAE/"),r("rE2o"),r("ioFf"),r("DNiP"),r("rGqo"),r("yt8O"),r("Btvt"),r("RW0V"),r("bWfx");var n,i,a,o,u=r("17x9"),s=r.n(u),c=r("8+s/"),f=r.n(c),l=r("bmMU"),d=r.n(l),p=r("q1tI"),h=r.n(p),g=r("MgzW"),y=r.n(g),v="bodyAttributes",m="htmlAttributes",b="titleAttributes",w={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},S=(Object.keys(w).map((function(t){return w[t]})),"charset"),T="cssText",E="href",x="http-equiv",O="innerHTML",_="itemprop",C="name",I="property",A="rel",j="src",N="target",k={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},L="defaultTitle",P="defer",R="encodeSpecialCharacters",z="onChangeClientState",M="titleTemplate",F=Object.keys(k).reduce((function(t,e){return t[k[e]]=e,t}),{}),q=[w.NOSCRIPT,w.SCRIPT,w.STYLE],V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},H=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},K=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),W=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Y=function(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r},B=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},U=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!1===e?String(t):String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},D=function(t){var e=$(t,w.TITLE),r=$(t,M);if(r&&e)return r.replace(/%s/g,(function(){return Array.isArray(e)?e.join(""):e}));var n=$(t,L);return e||n||void 0},G=function(t){return $(t,z)||function(){}},X=function(t,e){return e.filter((function(e){return void 0!==e[t]})).map((function(e){return e[t]})).reduce((function(t,e){return W({},t,e)}),{})},Z=function(t,e){return e.filter((function(t){return void 0!==t[w.BASE]})).map((function(t){return t[w.BASE]})).reverse().reduce((function(e,r){if(!e.length)for(var n=Object.keys(r),i=0;i<n.length;i++){var a=n[i].toLowerCase();if(-1!==t.indexOf(a)&&r[a])return e.concat(r)}return e}),[])},J=function(t,e,r){var n={};return r.filter((function(e){return!!Array.isArray(e[t])||(void 0!==e[t]&&nt("Helmet: "+t+' should be of type "Array". Instead found type "'+V(e[t])+'"'),!1)})).map((function(e){return e[t]})).reverse().reduce((function(t,r){var i={};r.filter((function(t){for(var r=void 0,a=Object.keys(t),o=0;o<a.length;o++){var u=a[o],s=u.toLowerCase();-1===e.indexOf(s)||r===A&&"canonical"===t[r].toLowerCase()||s===A&&"stylesheet"===t[s].toLowerCase()||(r=s),-1===e.indexOf(u)||u!==O&&u!==T&&u!==_||(r=u)}if(!r||!t[r])return!1;var c=t[r].toLowerCase();return n[r]||(n[r]={}),i[r]||(i[r]={}),!n[r][c]&&(i[r][c]=!0,!0)})).reverse().forEach((function(e){return t.push(e)}));for(var a=Object.keys(i),o=0;o<a.length;o++){var u=a[o],s=y()({},n[u],i[u]);n[u]=s}return t}),[]).reverse()},$=function(t,e){for(var r=t.length-1;r>=0;r--){var n=t[r];if(n.hasOwnProperty(e))return n[e]}return null},Q=(n=Date.now(),function(t){var e=Date.now();e-n>16?(n=e,t(e)):setTimeout((function(){Q(t)}),0)}),tt=function(t){return clearTimeout(t)},et="undefined"!=typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||Q:t.requestAnimationFrame||Q,rt="undefined"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||tt:t.cancelAnimationFrame||tt,nt=function(t){return console&&"function"==typeof console.warn&&console.warn(t)},it=null,at=function(t,e){var r=t.baseTag,n=t.bodyAttributes,i=t.htmlAttributes,a=t.linkTags,o=t.metaTags,u=t.noscriptTags,s=t.onChangeClientState,c=t.scriptTags,f=t.styleTags,l=t.title,d=t.titleAttributes;st(w.BODY,n),st(w.HTML,i),ut(l,d);var p={baseTag:ct(w.BASE,r),linkTags:ct(w.LINK,a),metaTags:ct(w.META,o),noscriptTags:ct(w.NOSCRIPT,u),scriptTags:ct(w.SCRIPT,c),styleTags:ct(w.STYLE,f)},h={},g={};Object.keys(p).forEach((function(t){var e=p[t],r=e.newTags,n=e.oldTags;r.length&&(h[t]=r),n.length&&(g[t]=p[t].oldTags)})),e&&e(),s(t,h,g)},ot=function(t){return Array.isArray(t)?t.join(""):t},ut=function(t,e){void 0!==t&&document.title!==t&&(document.title=ot(t)),st(w.TITLE,e)},st=function(t,e){var r=document.getElementsByTagName(t)[0];if(r){for(var n=r.getAttribute("data-react-helmet"),i=n?n.split(","):[],a=[].concat(i),o=Object.keys(e),u=0;u<o.length;u++){var s=o[u],c=e[s]||"";r.getAttribute(s)!==c&&r.setAttribute(s,c),-1===i.indexOf(s)&&i.push(s);var f=a.indexOf(s);-1!==f&&a.splice(f,1)}for(var l=a.length-1;l>=0;l--)r.removeAttribute(a[l]);i.length===a.length?r.removeAttribute("data-react-helmet"):r.getAttribute("data-react-helmet")!==o.join(",")&&r.setAttribute("data-react-helmet",o.join(","))}},ct=function(t,e){var r=document.head||document.querySelector(w.HEAD),n=r.querySelectorAll(t+"[data-react-helmet]"),i=Array.prototype.slice.call(n),a=[],o=void 0;return e&&e.length&&e.forEach((function(e){var r=document.createElement(t);for(var n in e)if(e.hasOwnProperty(n))if(n===O)r.innerHTML=e.innerHTML;else if(n===T)r.styleSheet?r.styleSheet.cssText=e.cssText:r.appendChild(document.createTextNode(e.cssText));else{var u=void 0===e[n]?"":e[n];r.setAttribute(n,u)}r.setAttribute("data-react-helmet","true"),i.some((function(t,e){return o=e,r.isEqualNode(t)}))?i.splice(o,1):a.push(r)})),i.forEach((function(t){return t.parentNode.removeChild(t)})),a.forEach((function(t){return r.appendChild(t)})),{oldTags:i,newTags:a}},ft=function(t){return Object.keys(t).reduce((function(e,r){var n=void 0!==t[r]?r+'="'+t[r]+'"':""+r;return e?e+" "+n:n}),"")},lt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce((function(e,r){return e[k[r]||r]=t[r],e}),e)},dt=function(t,e,r){switch(t){case w.TITLE:return{toComponent:function(){return t=e.title,r=e.titleAttributes,(n={key:t})["data-react-helmet"]=!0,i=lt(r,n),[h.a.createElement(w.TITLE,i,t)];var t,r,n,i},toString:function(){return function(t,e,r,n){var i=ft(r),a=ot(e);return i?"<"+t+' data-react-helmet="true" '+i+">"+U(a,n)+"</"+t+">":"<"+t+' data-react-helmet="true">'+U(a,n)+"</"+t+">"}(t,e.title,e.titleAttributes,r)}};case v:case m:return{toComponent:function(){return lt(e)},toString:function(){return ft(e)}};default:return{toComponent:function(){return function(t,e){return e.map((function(e,r){var n,i=((n={key:r})["data-react-helmet"]=!0,n);return Object.keys(e).forEach((function(t){var r=k[t]||t;if(r===O||r===T){var n=e.innerHTML||e.cssText;i.dangerouslySetInnerHTML={__html:n}}else i[r]=e[t]})),h.a.createElement(t,i)}))}(t,e)},toString:function(){return function(t,e,r){return e.reduce((function(e,n){var i=Object.keys(n).filter((function(t){return!(t===O||t===T)})).reduce((function(t,e){var i=void 0===n[e]?e:e+'="'+U(n[e],r)+'"';return t?t+" "+i:i}),""),a=n.innerHTML||n.cssText||"",o=-1===q.indexOf(t);return e+"<"+t+' data-react-helmet="true" '+i+(o?"/>":">"+a+"</"+t+">")}),"")}(t,e,r)}}}},pt=function(t){var e=t.baseTag,r=t.bodyAttributes,n=t.encode,i=t.htmlAttributes,a=t.linkTags,o=t.metaTags,u=t.noscriptTags,s=t.scriptTags,c=t.styleTags,f=t.title,l=void 0===f?"":f,d=t.titleAttributes;return{base:dt(w.BASE,e,n),bodyAttributes:dt(v,r,n),htmlAttributes:dt(m,i,n),link:dt(w.LINK,a,n),meta:dt(w.META,o,n),noscript:dt(w.NOSCRIPT,u,n),script:dt(w.SCRIPT,s,n),style:dt(w.STYLE,c,n),title:dt(w.TITLE,{title:l,titleAttributes:d},n)}},ht=f()((function(t){return{baseTag:Z([E,N],t),bodyAttributes:X(v,t),defer:$(t,P),encode:$(t,R),htmlAttributes:X(m,t),linkTags:J(w.LINK,[A,E],t),metaTags:J(w.META,[C,S,x,I,_],t),noscriptTags:J(w.NOSCRIPT,[O],t),onChangeClientState:G(t),scriptTags:J(w.SCRIPT,[j,O],t),styleTags:J(w.STYLE,[T],t),title:D(t),titleAttributes:X(b,t)}}),(function(t){it&&rt(it),t.defer?it=et((function(){at(t,(function(){it=null}))})):(at(t),it=null)}),pt)((function(){return null})),gt=(i=ht,o=a=function(t){function e(){return H(this,e),B(this,t.apply(this,arguments))}return 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=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.shouldComponentUpdate=function(t){return!d()(this.props,t)},e.prototype.mapNestedChildrenToProps=function(t,e){if(!e)return null;switch(t.type){case w.SCRIPT:case w.NOSCRIPT:return{innerHTML:e};case w.STYLE:return{cssText:e}}throw new Error("<"+t.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},e.prototype.flattenArrayTypeChildren=function(t){var e,r=t.child,n=t.arrayTypeChildren,i=t.newChildProps,a=t.nestedChildren;return W({},n,((e={})[r.type]=[].concat(n[r.type]||[],[W({},i,this.mapNestedChildrenToProps(r,a))]),e))},e.prototype.mapObjectTypeChildren=function(t){var e,r,n=t.child,i=t.newProps,a=t.newChildProps,o=t.nestedChildren;switch(n.type){case w.TITLE:return W({},i,((e={})[n.type]=o,e.titleAttributes=W({},a),e));case w.BODY:return W({},i,{bodyAttributes:W({},a)});case w.HTML:return W({},i,{htmlAttributes:W({},a)})}return W({},i,((r={})[n.type]=W({},a),r))},e.prototype.mapArrayTypeChildrenToProps=function(t,e){var r=W({},e);return Object.keys(t).forEach((function(e){var n;r=W({},r,((n={})[e]=t[e],n))})),r},e.prototype.warnOnInvalidChildren=function(t,e){return!0},e.prototype.mapChildrenToProps=function(t,e){var r=this,n={};return h.a.Children.forEach(t,(function(t){if(t&&t.props){var i=t.props,a=i.children,o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce((function(e,r){return e[F[r]||r]=t[r],e}),e)}(Y(i,["children"]));switch(r.warnOnInvalidChildren(t,a),t.type){case w.LINK:case w.META:case w.NOSCRIPT:case w.SCRIPT:case w.STYLE:n=r.flattenArrayTypeChildren({child:t,arrayTypeChildren:n,newChildProps:o,nestedChildren:a});break;default:e=r.mapObjectTypeChildren({child:t,newProps:e,newChildProps:o,nestedChildren:a})}}})),e=this.mapArrayTypeChildrenToProps(n,e)},e.prototype.render=function(){var t=this.props,e=t.children,r=Y(t,["children"]),n=W({},r);return e&&(n=this.mapChildrenToProps(e,n)),h.a.createElement(i,n)},K(e,null,[{key:"canUseDOM",set:function(t){i.canUseDOM=t}}]),e}(h.a.Component),a.propTypes={base:s.a.object,bodyAttributes:s.a.object,children:s.a.oneOfType([s.a.arrayOf(s.a.node),s.a.node]),defaultTitle:s.a.string,defer:s.a.bool,encodeSpecialCharacters:s.a.bool,htmlAttributes:s.a.object,link:s.a.arrayOf(s.a.object),meta:s.a.arrayOf(s.a.object),noscript:s.a.arrayOf(s.a.object),onChangeClientState:s.a.func,script:s.a.arrayOf(s.a.object),style:s.a.arrayOf(s.a.object),title:s.a.string,titleAttributes:s.a.object,titleTemplate:s.a.string},a.defaultProps={defer:!0,encodeSpecialCharacters:!0},a.peek=i.peek,a.rewind=function(){var t=i.rewind();return t||(t=pt({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),t},o);gt.renderStatic=gt.rewind}).call(this,r("yLpj"))},qncB:function(t,e,r){var n=r("XKFU"),i=r("vhPU"),a=r("eeVq"),o=r("/e88"),u="["+o+"]",s=RegExp("^"+u+u+"*"),c=RegExp(u+u+"*$"),f=function(t,e,r){var i={},u=a((function(){return!!o[t]()||"
"!="
"[t]()})),s=i[t]=u?e(l):o[t];r&&(i[r]=s),n(n.P+n.F*u,"String",i)},l=f.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(s,"")),2&e&&(t=t.replace(c,"")),t};t.exports=f},rzlk:function(t,e,r){"use strict";r.r(e);r("91GP");var n=r("q1tI"),i=r.n(n),a=r("IOVJ");e.default=function(t){var e=t.location,r=t.pageResources;return r?i.a.createElement(a.a,Object.assign({location:e,pageResources:r},r.json)):null}},tMB7:function(t,e,r){var n=r("y1pI");t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},u8Dt:function(t,e,r){var n=r("YESw"),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(e,t)?e[t]:void 0}},xfY5:function(t,e,r){"use strict";var n=r("dyZX"),i=r("aagx"),a=r("LZWt"),o=r("Xbzi"),u=r("apmT"),s=r("eeVq"),c=r("kJMx").f,f=r("EemH").f,l=r("hswa").f,d=r("qncB").trim,p=n.Number,h=p,g=p.prototype,y="Number"==a(r("Kuth")(g)),v="trim"in String.prototype,m=function(t){var e=u(t,!1);if("string"==typeof e&&e.length>2){var r,n,i,a=(e=v?e.trim():d(e,3)).charCodeAt(0);if(43===a||45===a){if(88===(r=e.charCodeAt(2))||120===r)return NaN}else if(48===a){switch(e.charCodeAt(1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+e}for(var o,s=e.slice(2),c=0,f=s.length;c<f;c++)if((o=s.charCodeAt(c))<48||o>i)return NaN;return parseInt(s,n)}}return+e};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof p&&(y?s((function(){g.valueOf.call(r)})):"Number"!=a(r))?o(new h(m(e)),r,p):m(e)};for(var b,w=r("nh4g")?c(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),S=0;w.length>S;S++)i(h,b=w[S])&&!i(p,b)&&l(p,b,f(h,b));p.prototype=g,g.constructor=p,r("KroJ")(n,"Number",p)}},y1pI:function(t,e,r){var n=r("ljhN");t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},yLpj:function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(n){"object"==typeof window&&(r=window)}t.exports=r},zoYe:function(t,e,r){r("a1Th"),r("h7Nl"),r("Btvt");var n=r("nmnc"),i=r("eUgh"),a=r("Z0cm"),o=r("/9aa"),u=n?n.prototype:void 0,s=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(a(e))return i(e,t)+"";if(o(e))return s?s.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}}}]);
//# sourceMappingURL=commons-239e127808ae8852e74b.js.map
|
'use strict';
// Production specific configuration
// =================================
module.exports = {
// Server IP
ip: process.env.OPENSHIFT_NODEJS_IP ||
process.env.IP ||
undefined,
// Server port
port: process.env.OPENSHIFT_NODEJS_PORT ||
process.env.PORT ||
8080,
// MongoDB connection options
mongo: {
uri: process.env.MONGOLAB_URI ||
process.env.MONGOHQ_URL ||
process.env.OPENSHIFT_MONGODB_DB_URL+process.env.OPENSHIFT_APP_NAME ||
'mongodb://localhost/sparksensor'
}
};
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
/**
* @file 双向链表节点类实现
* @author silverbulletlee
*/
const ListNode_1 = require("../LinkedList/ListNode");
class DoublyListNode extends ListNode_1.ListNode {
constructor(val) {
super(val);
this.prev = null;
this.next = null;
}
}
exports.DoublyListNode = DoublyListNode;
|
"use strict";
/* author:jimages
* date:jun 27 2013
* it is for login.
*/
//remove the label when the input focus.
$("#username").focus(function() {
$("#login label:first").css("display","none");
});
$("#password").focus(function() {
$("#login label:last").css("display","none");
});
$(document).ready(toggle_label);
$("#username").blur(toggle_label);
function toggle_label() {
var content = $("#username").val();
if (content != "")
{
$("#login label:first").css("display","none");
} else {
$("#login label:first").css("display","inline-block");
}
}
$("#password").blur(function() {
var content = $("#password").val();
if (content != "")
{
$("#login label:last").css("display","none");
} else {
$("#login label:last").css("display","inline-block");
}
});
//check the both username and password are not empty.
// when submit form.Use AJAX instead.
$("form").submit( function(event) {
event.preventDefault();
var username = $("#username").val();
var password = $("#password").val();
if (username == '' || password == '' ) {
if ($("#error").text() != "用户名或者密码不能为空!") {
$("#error").append("用户名或者密码不能为空!");
return false;
}
}
//Get username and password value.
//Then hash password twice.
var username = $('#username').val();
var password = md5(md5($('#password').val()));
//Start send login message。
$.post('http://www.yaoranqu.com/user/check_login/',
{username:username,
password:password},
send_success);
$('#error').html('');
});
//If login secceed.
function send_success(data) {
var code = data.code;
if ( 1 == code) {
var error = data.error;
switch(error) {
case 'E002':
alert('您的密码错误或者用户名错误');
break;
default:
alert('未知错误');
break;
}
return false;
}
//set token cookie
var cookie = 'token='+data.token+';path=/';
document.cookie = cookie;
//go to page.
var direct_path = data.go;
location.replace( direct_path);
}
|
var currentDate = new Date();
var day = currentDate.getDate();
var month = currentDate.getMonth() + 1;
var monthName;
var hours = currentDate.getHours();
var mins = currentDate.getMinutes();
var secs = currentDate.getSeconds();
var strToAppend;
if (hours >12 )
{
hours1 = "0" + (hours - 12);
strToAppend = "PM";
}
else if (hours <12)
{
hours1 = "0" + hours;
strToAppend = "AM";
}
else
{
hours1 = hours;
strToAppend = "PM";
}
if(mins<10)
mins = "0" + mins;
if (secs<10)
secs = "0" + secs;
switch (month)
{
case 1:
monthName = "January";
break;
case 2:
monthName = "February";
break;
case 3:
monthName = "March";
break;
case 4:
monthName = "April";
break;
case 5:
monthName = "May";
break;
case 6:
monthName = "June";
break;
case 7:
monthName = "July";
break;
case 8:
monthName = "August";
break;
case 9:
monthName = "September";
break;
case 10:
monthName = "October";
break;
case 11:
monthName = "November";
break;
case 12:
monthName = "December";
break;
}
var year = currentDate.getFullYear();
var myString;
myString = "Today is " + day + " - " + monthName + " - " + year + ".<br />Current time is " + hours1 + ":" + mins + ":" + secs + " " + strToAppend + ".";
document.write(myString);
|
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[61],{
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/sql/sql.js":
/*!**********************************************************************!*\
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/sql/sql.js ***!
\**********************************************************************/
/*! exports provided: conf, language */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
var conf = {
comments: {
lineComment: '--',
blockComment: ['/*', '*/']
},
brackets: [
['{', '}'],
['[', ']'],
['(', ')']
],
autoClosingPairs: [
{ open: '{', close: '}' },
{ open: '[', close: ']' },
{ open: '(', close: ')' },
{ open: '"', close: '"' },
{ open: "'", close: "'" }
],
surroundingPairs: [
{ open: '{', close: '}' },
{ open: '[', close: ']' },
{ open: '(', close: ')' },
{ open: '"', close: '"' },
{ open: "'", close: "'" }
]
};
var language = {
defaultToken: '',
tokenPostfix: '.sql',
ignoreCase: true,
brackets: [
{ open: '[', close: ']', token: 'delimiter.square' },
{ open: '(', close: ')', token: 'delimiter.parenthesis' }
],
keywords: [
'ABORT_AFTER_WAIT',
'ABSENT',
'ABSOLUTE',
'ACCENT_SENSITIVITY',
'ACTION',
'ACTIVATION',
'ACTIVE',
'ADD',
'ADDRESS',
'ADMIN',
'AES',
'AES_128',
'AES_192',
'AES_256',
'AFFINITY',
'AFTER',
'AGGREGATE',
'ALGORITHM',
'ALL_CONSTRAINTS',
'ALL_ERRORMSGS',
'ALL_INDEXES',
'ALL_LEVELS',
'ALL_SPARSE_COLUMNS',
'ALLOW_CONNECTIONS',
'ALLOW_MULTIPLE_EVENT_LOSS',
'ALLOW_PAGE_LOCKS',
'ALLOW_ROW_LOCKS',
'ALLOW_SINGLE_EVENT_LOSS',
'ALLOW_SNAPSHOT_ISOLATION',
'ALLOWED',
'ALTER',
'ANONYMOUS',
'ANSI_DEFAULTS',
'ANSI_NULL_DEFAULT',
'ANSI_NULL_DFLT_OFF',
'ANSI_NULL_DFLT_ON',
'ANSI_NULLS',
'ANSI_PADDING',
'ANSI_WARNINGS',
'APPEND',
'APPLICATION',
'APPLICATION_LOG',
'ARITHABORT',
'ARITHIGNORE',
'AS',
'ASC',
'ASSEMBLY',
'ASYMMETRIC',
'ASYNCHRONOUS_COMMIT',
'AT',
'ATOMIC',
'ATTACH',
'ATTACH_REBUILD_LOG',
'AUDIT',
'AUDIT_GUID',
'AUTHENTICATION',
'AUTHORIZATION',
'AUTO',
'AUTO_CLEANUP',
'AUTO_CLOSE',
'AUTO_CREATE_STATISTICS',
'AUTO_SHRINK',
'AUTO_UPDATE_STATISTICS',
'AUTO_UPDATE_STATISTICS_ASYNC',
'AUTOMATED_BACKUP_PREFERENCE',
'AUTOMATIC',
'AVAILABILITY',
'AVAILABILITY_MODE',
'BACKUP',
'BACKUP_PRIORITY',
'BASE64',
'BATCHSIZE',
'BEGIN',
'BEGIN_DIALOG',
'BIGINT',
'BINARY',
'BINDING',
'BIT',
'BLOCKERS',
'BLOCKSIZE',
'BOUNDING_BOX',
'BREAK',
'BROKER',
'BROKER_INSTANCE',
'BROWSE',
'BUCKET_COUNT',
'BUFFER',
'BUFFERCOUNT',
'BULK',
'BULK_LOGGED',
'BY',
'CACHE',
'CALL',
'CALLED',
'CALLER',
'CAP_CPU_PERCENT',
'CASCADE',
'CASE',
'CATALOG',
'CATCH',
'CELLS_PER_OBJECT',
'CERTIFICATE',
'CHANGE_RETENTION',
'CHANGE_TRACKING',
'CHANGES',
'CHAR',
'CHARACTER',
'CHECK',
'CHECK_CONSTRAINTS',
'CHECK_EXPIRATION',
'CHECK_POLICY',
'CHECKALLOC',
'CHECKCATALOG',
'CHECKCONSTRAINTS',
'CHECKDB',
'CHECKFILEGROUP',
'CHECKIDENT',
'CHECKPOINT',
'CHECKTABLE',
'CLASSIFIER_FUNCTION',
'CLEANTABLE',
'CLEANUP',
'CLEAR',
'CLOSE',
'CLUSTER',
'CLUSTERED',
'CODEPAGE',
'COLLATE',
'COLLECTION',
'COLUMN',
'COLUMN_SET',
'COLUMNS',
'COLUMNSTORE',
'COLUMNSTORE_ARCHIVE',
'COMMIT',
'COMMITTED',
'COMPATIBILITY_LEVEL',
'COMPRESSION',
'COMPUTE',
'CONCAT',
'CONCAT_NULL_YIELDS_NULL',
'CONFIGURATION',
'CONNECT',
'CONSTRAINT',
'CONTAINMENT',
'CONTENT',
'CONTEXT',
'CONTINUE',
'CONTINUE_AFTER_ERROR',
'CONTRACT',
'CONTRACT_NAME',
'CONTROL',
'CONVERSATION',
'COOKIE',
'COPY_ONLY',
'COUNTER',
'CPU',
'CREATE',
'CREATE_NEW',
'CREATION_DISPOSITION',
'CREDENTIAL',
'CRYPTOGRAPHIC',
'CUBE',
'CURRENT',
'CURRENT_DATE',
'CURSOR',
'CURSOR_CLOSE_ON_COMMIT',
'CURSOR_DEFAULT',
'CYCLE',
'DATA',
'DATA_COMPRESSION',
'DATA_PURITY',
'DATABASE',
'DATABASE_DEFAULT',
'DATABASE_MIRRORING',
'DATABASE_SNAPSHOT',
'DATAFILETYPE',
'DATE',
'DATE_CORRELATION_OPTIMIZATION',
'DATEFIRST',
'DATEFORMAT',
'DATETIME',
'DATETIME2',
'DATETIMEOFFSET',
'DAY',
'DAYOFYEAR',
'DAYS',
'DB_CHAINING',
'DBCC',
'DBREINDEX',
'DDL_DATABASE_LEVEL_EVENTS',
'DEADLOCK_PRIORITY',
'DEALLOCATE',
'DEC',
'DECIMAL',
'DECLARE',
'DECRYPTION',
'DEFAULT',
'DEFAULT_DATABASE',
'DEFAULT_FULLTEXT_LANGUAGE',
'DEFAULT_LANGUAGE',
'DEFAULT_SCHEMA',
'DEFINITION',
'DELAY',
'DELAYED_DURABILITY',
'DELETE',
'DELETED',
'DENSITY_VECTOR',
'DENY',
'DEPENDENTS',
'DES',
'DESC',
'DESCRIPTION',
'DESX',
'DHCP',
'DIAGNOSTICS',
'DIALOG',
'DIFFERENTIAL',
'DIRECTORY_NAME',
'DISABLE',
'DISABLE_BROKER',
'DISABLED',
'DISK',
'DISTINCT',
'DISTRIBUTED',
'DOCUMENT',
'DOUBLE',
'DROP',
'DROP_EXISTING',
'DROPCLEANBUFFERS',
'DUMP',
'DURABILITY',
'DYNAMIC',
'EDITION',
'ELEMENTS',
'ELSE',
'EMERGENCY',
'EMPTY',
'EMPTYFILE',
'ENABLE',
'ENABLE_BROKER',
'ENABLED',
'ENCRYPTION',
'END',
'ENDPOINT',
'ENDPOINT_URL',
'ERRLVL',
'ERROR',
'ERROR_BROKER_CONVERSATIONS',
'ERRORFILE',
'ESCAPE',
'ESTIMATEONLY',
'EVENT',
'EVENT_RETENTION_MODE',
'EXEC',
'EXECUTABLE',
'EXECUTE',
'EXIT',
'EXPAND',
'EXPIREDATE',
'EXPIRY_DATE',
'EXPLICIT',
'EXTENDED_LOGICAL_CHECKS',
'EXTENSION',
'EXTERNAL',
'EXTERNAL_ACCESS',
'FAIL_OPERATION',
'FAILOVER',
'FAILOVER_MODE',
'FAILURE_CONDITION_LEVEL',
'FALSE',
'FAN_IN',
'FAST',
'FAST_FORWARD',
'FETCH',
'FIELDTERMINATOR',
'FILE',
'FILEGROUP',
'FILEGROWTH',
'FILELISTONLY',
'FILENAME',
'FILEPATH',
'FILESTREAM',
'FILESTREAM_ON',
'FILETABLE_COLLATE_FILENAME',
'FILETABLE_DIRECTORY',
'FILETABLE_FULLPATH_UNIQUE_CONSTRAINT_NAME',
'FILETABLE_NAMESPACE',
'FILETABLE_PRIMARY_KEY_CONSTRAINT_NAME',
'FILETABLE_STREAMID_UNIQUE_CONSTRAINT_NAME',
'FILLFACTOR',
'FILTERING',
'FIRE_TRIGGERS',
'FIRST',
'FIRSTROW',
'FLOAT',
'FMTONLY',
'FOLLOWING',
'FOR',
'FORCE',
'FORCE_FAILOVER_ALLOW_DATA_LOSS',
'FORCE_SERVICE_ALLOW_DATA_LOSS',
'FORCED',
'FORCEPLAN',
'FORCESCAN',
'FORCESEEK',
'FOREIGN',
'FORMATFILE',
'FORMSOF',
'FORWARD_ONLY',
'FREE',
'FREEPROCCACHE',
'FREESESSIONCACHE',
'FREESYSTEMCACHE',
'FROM',
'FULL',
'FULLSCAN',
'FULLTEXT',
'FUNCTION',
'GB',
'GEOGRAPHY_AUTO_GRID',
'GEOGRAPHY_GRID',
'GEOMETRY_AUTO_GRID',
'GEOMETRY_GRID',
'GET',
'GLOBAL',
'GO',
'GOTO',
'GOVERNOR',
'GRANT',
'GRIDS',
'GROUP',
'GROUP_MAX_REQUESTS',
'HADR',
'HASH',
'HASHED',
'HAVING',
'HEADERONLY',
'HEALTH_CHECK_TIMEOUT',
'HELP',
'HIERARCHYID',
'HIGH',
'HINT',
'HISTOGRAM',
'HOLDLOCK',
'HONOR_BROKER_PRIORITY',
'HOUR',
'HOURS',
'IDENTITY',
'IDENTITY_INSERT',
'IDENTITY_VALUE',
'IDENTITYCOL',
'IF',
'IGNORE_CONSTRAINTS',
'IGNORE_DUP_KEY',
'IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX',
'IGNORE_TRIGGERS',
'IMAGE',
'IMMEDIATE',
'IMPERSONATE',
'IMPLICIT_TRANSACTIONS',
'IMPORTANCE',
'INCLUDE',
'INCREMENT',
'INCREMENTAL',
'INDEX',
'INDEXDEFRAG',
'INFINITE',
'INFLECTIONAL',
'INIT',
'INITIATOR',
'INPUT',
'INPUTBUFFER',
'INSENSITIVE',
'INSERT',
'INSERTED',
'INSTEAD',
'INT',
'INTEGER',
'INTO',
'IO',
'IP',
'ISABOUT',
'ISOLATION',
'JOB',
'KB',
'KEEP',
'KEEP_CDC',
'KEEP_NULLS',
'KEEP_REPLICATION',
'KEEPDEFAULTS',
'KEEPFIXED',
'KEEPIDENTITY',
'KEEPNULLS',
'KERBEROS',
'KEY',
'KEY_SOURCE',
'KEYS',
'KEYSET',
'KILL',
'KILOBYTES_PER_BATCH',
'LABELONLY',
'LANGUAGE',
'LAST',
'LASTROW',
'LEVEL',
'LEVEL_1',
'LEVEL_2',
'LEVEL_3',
'LEVEL_4',
'LIFETIME',
'LIMIT',
'LINENO',
'LIST',
'LISTENER',
'LISTENER_IP',
'LISTENER_PORT',
'LOAD',
'LOADHISTORY',
'LOB_COMPACTION',
'LOCAL',
'LOCAL_SERVICE_NAME',
'LOCK_ESCALATION',
'LOCK_TIMEOUT',
'LOGIN',
'LOGSPACE',
'LOOP',
'LOW',
'MANUAL',
'MARK',
'MARK_IN_USE_FOR_REMOVAL',
'MASTER',
'MAX_CPU_PERCENT',
'MAX_DISPATCH_LATENCY',
'MAX_DOP',
'MAX_DURATION',
'MAX_EVENT_SIZE',
'MAX_FILES',
'MAX_IOPS_PER_VOLUME',
'MAX_MEMORY',
'MAX_MEMORY_PERCENT',
'MAX_QUEUE_READERS',
'MAX_ROLLOVER_FILES',
'MAX_SIZE',
'MAXDOP',
'MAXERRORS',
'MAXLENGTH',
'MAXRECURSION',
'MAXSIZE',
'MAXTRANSFERSIZE',
'MAXVALUE',
'MB',
'MEDIADESCRIPTION',
'MEDIANAME',
'MEDIAPASSWORD',
'MEDIUM',
'MEMBER',
'MEMORY_OPTIMIZED',
'MEMORY_OPTIMIZED_DATA',
'MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT',
'MEMORY_PARTITION_MODE',
'MERGE',
'MESSAGE',
'MESSAGE_FORWARD_SIZE',
'MESSAGE_FORWARDING',
'MICROSECOND',
'MILLISECOND',
'MIN_CPU_PERCENT',
'MIN_IOPS_PER_VOLUME',
'MIN_MEMORY_PERCENT',
'MINUTE',
'MINUTES',
'MINVALUE',
'MIRROR',
'MIRROR_ADDRESS',
'MODIFY',
'MONEY',
'MONTH',
'MOVE',
'MULTI_USER',
'MUST_CHANGE',
'NAME',
'NANOSECOND',
'NATIONAL',
'NATIVE_COMPILATION',
'NCHAR',
'NEGOTIATE',
'NESTED_TRIGGERS',
'NEW_ACCOUNT',
'NEW_BROKER',
'NEW_PASSWORD',
'NEWNAME',
'NEXT',
'NO',
'NO_BROWSETABLE',
'NO_CHECKSUM',
'NO_COMPRESSION',
'NO_EVENT_LOSS',
'NO_INFOMSGS',
'NO_TRUNCATE',
'NO_WAIT',
'NOCHECK',
'NOCOUNT',
'NOEXEC',
'NOEXPAND',
'NOFORMAT',
'NOINDEX',
'NOINIT',
'NOLOCK',
'NON',
'NON_TRANSACTED_ACCESS',
'NONCLUSTERED',
'NONE',
'NORECOMPUTE',
'NORECOVERY',
'NORESEED',
'NORESET',
'NOREWIND',
'NORMAL',
'NOSKIP',
'NOTIFICATION',
'NOTRUNCATE',
'NOUNLOAD',
'NOWAIT',
'NTEXT',
'NTLM',
'NUMANODE',
'NUMERIC',
'NUMERIC_ROUNDABORT',
'NVARCHAR',
'OBJECT',
'OF',
'OFF',
'OFFLINE',
'OFFSET',
'OFFSETS',
'OLD_ACCOUNT',
'OLD_PASSWORD',
'ON',
'ON_FAILURE',
'ONLINE',
'ONLY',
'OPEN',
'OPEN_EXISTING',
'OPENTRAN',
'OPTIMISTIC',
'OPTIMIZE',
'OPTION',
'ORDER',
'OUT',
'OUTPUT',
'OUTPUTBUFFER',
'OVER',
'OVERRIDE',
'OWNER',
'OWNERSHIP',
'PAD_INDEX',
'PAGE',
'PAGE_VERIFY',
'PAGECOUNT',
'PAGLOCK',
'PARAMETERIZATION',
'PARSEONLY',
'PARTIAL',
'PARTITION',
'PARTITIONS',
'PARTNER',
'PASSWORD',
'PATH',
'PER_CPU',
'PER_NODE',
'PERCENT',
'PERMISSION_SET',
'PERSISTED',
'PHYSICAL_ONLY',
'PLAN',
'POISON_MESSAGE_HANDLING',
'POOL',
'POPULATION',
'PORT',
'PRECEDING',
'PRECISION',
'PRIMARY',
'PRIMARY_ROLE',
'PRINT',
'PRIOR',
'PRIORITY',
'PRIORITY_LEVEL',
'PRIVATE',
'PRIVILEGES',
'PROC',
'PROCCACHE',
'PROCEDURE',
'PROCEDURE_NAME',
'PROCESS',
'PROFILE',
'PROPERTY',
'PROPERTY_DESCRIPTION',
'PROPERTY_INT_ID',
'PROPERTY_SET_GUID',
'PROVIDER',
'PROVIDER_KEY_NAME',
'PUBLIC',
'PUT',
'QUARTER',
'QUERY',
'QUERY_GOVERNOR_COST_LIMIT',
'QUEUE',
'QUEUE_DELAY',
'QUOTED_IDENTIFIER',
'RAISERROR',
'RANGE',
'RAW',
'RC2',
'RC4',
'RC4_128',
'READ',
'READ_COMMITTED_SNAPSHOT',
'READ_ONLY',
'READ_ONLY_ROUTING_LIST',
'READ_ONLY_ROUTING_URL',
'READ_WRITE',
'READ_WRITE_FILEGROUPS',
'READCOMMITTED',
'READCOMMITTEDLOCK',
'READONLY',
'READPAST',
'READTEXT',
'READUNCOMMITTED',
'READWRITE',
'REAL',
'REBUILD',
'RECEIVE',
'RECOMPILE',
'RECONFIGURE',
'RECOVERY',
'RECURSIVE',
'RECURSIVE_TRIGGERS',
'REFERENCES',
'REGENERATE',
'RELATED_CONVERSATION',
'RELATED_CONVERSATION_GROUP',
'RELATIVE',
'REMOTE',
'REMOTE_PROC_TRANSACTIONS',
'REMOTE_SERVICE_NAME',
'REMOVE',
'REORGANIZE',
'REPAIR_ALLOW_DATA_LOSS',
'REPAIR_FAST',
'REPAIR_REBUILD',
'REPEATABLE',
'REPEATABLEREAD',
'REPLICA',
'REPLICATION',
'REQUEST_MAX_CPU_TIME_SEC',
'REQUEST_MAX_MEMORY_GRANT_PERCENT',
'REQUEST_MEMORY_GRANT_TIMEOUT_SEC',
'REQUIRED',
'RESAMPLE',
'RESEED',
'RESERVE_DISK_SPACE',
'RESET',
'RESOURCE',
'RESTART',
'RESTORE',
'RESTRICT',
'RESTRICTED_USER',
'RESULT',
'RESUME',
'RETAINDAYS',
'RETENTION',
'RETURN',
'RETURNS',
'REVERT',
'REVOKE',
'REWIND',
'REWINDONLY',
'ROBUST',
'ROLE',
'ROLLBACK',
'ROLLUP',
'ROOT',
'ROUTE',
'ROW',
'ROWCOUNT',
'ROWGUIDCOL',
'ROWLOCK',
'ROWS',
'ROWS_PER_BATCH',
'ROWTERMINATOR',
'ROWVERSION',
'RSA_1024',
'RSA_2048',
'RSA_512',
'RULE',
'SAFE',
'SAFETY',
'SAMPLE',
'SAVE',
'SCHEDULER',
'SCHEMA',
'SCHEMA_AND_DATA',
'SCHEMA_ONLY',
'SCHEMABINDING',
'SCHEME',
'SCROLL',
'SCROLL_LOCKS',
'SEARCH',
'SECOND',
'SECONDARY',
'SECONDARY_ONLY',
'SECONDARY_ROLE',
'SECONDS',
'SECRET',
'SECURITY_LOG',
'SECURITYAUDIT',
'SELECT',
'SELECTIVE',
'SELF',
'SEND',
'SENT',
'SEQUENCE',
'SERIALIZABLE',
'SERVER',
'SERVICE',
'SERVICE_BROKER',
'SERVICE_NAME',
'SESSION',
'SESSION_TIMEOUT',
'SET',
'SETS',
'SETUSER',
'SHOW_STATISTICS',
'SHOWCONTIG',
'SHOWPLAN',
'SHOWPLAN_ALL',
'SHOWPLAN_TEXT',
'SHOWPLAN_XML',
'SHRINKDATABASE',
'SHRINKFILE',
'SHUTDOWN',
'SID',
'SIGNATURE',
'SIMPLE',
'SINGLE_BLOB',
'SINGLE_CLOB',
'SINGLE_NCLOB',
'SINGLE_USER',
'SINGLETON',
'SIZE',
'SKIP',
'SMALLDATETIME',
'SMALLINT',
'SMALLMONEY',
'SNAPSHOT',
'SORT_IN_TEMPDB',
'SOURCE',
'SPARSE',
'SPATIAL',
'SPATIAL_WINDOW_MAX_CELLS',
'SPECIFICATION',
'SPLIT',
'SQL',
'SQL_VARIANT',
'SQLPERF',
'STANDBY',
'START',
'START_DATE',
'STARTED',
'STARTUP_STATE',
'STAT_HEADER',
'STATE',
'STATEMENT',
'STATIC',
'STATISTICAL_SEMANTICS',
'STATISTICS',
'STATISTICS_INCREMENTAL',
'STATISTICS_NORECOMPUTE',
'STATS',
'STATS_STREAM',
'STATUS',
'STATUSONLY',
'STOP',
'STOP_ON_ERROR',
'STOPAT',
'STOPATMARK',
'STOPBEFOREMARK',
'STOPLIST',
'STOPPED',
'SUBJECT',
'SUBSCRIPTION',
'SUPPORTED',
'SUSPEND',
'SWITCH',
'SYMMETRIC',
'SYNCHRONOUS_COMMIT',
'SYNONYM',
'SYSNAME',
'SYSTEM',
'TABLE',
'TABLERESULTS',
'TABLESAMPLE',
'TABLOCK',
'TABLOCKX',
'TAKE',
'TAPE',
'TARGET',
'TARGET_RECOVERY_TIME',
'TB',
'TCP',
'TEXT',
'TEXTIMAGE_ON',
'TEXTSIZE',
'THEN',
'THESAURUS',
'THROW',
'TIES',
'TIME',
'TIMEOUT',
'TIMER',
'TIMESTAMP',
'TINYINT',
'TO',
'TOP',
'TORN_PAGE_DETECTION',
'TRACEOFF',
'TRACEON',
'TRACESTATUS',
'TRACK_CAUSALITY',
'TRACK_COLUMNS_UPDATED',
'TRAN',
'TRANSACTION',
'TRANSFER',
'TRANSFORM_NOISE_WORDS',
'TRIGGER',
'TRIPLE_DES',
'TRIPLE_DES_3KEY',
'TRUE',
'TRUNCATE',
'TRUNCATEONLY',
'TRUSTWORTHY',
'TRY',
'TSQL',
'TWO_DIGIT_YEAR_CUTOFF',
'TYPE',
'TYPE_WARNING',
'UNBOUNDED',
'UNCHECKED',
'UNCOMMITTED',
'UNDEFINED',
'UNIQUE',
'UNIQUEIDENTIFIER',
'UNKNOWN',
'UNLIMITED',
'UNLOAD',
'UNSAFE',
'UPDATE',
'UPDATETEXT',
'UPDATEUSAGE',
'UPDLOCK',
'URL',
'USE',
'USED',
'USER',
'USEROPTIONS',
'USING',
'VALID_XML',
'VALIDATION',
'VALUE',
'VALUES',
'VARBINARY',
'VARCHAR',
'VARYING',
'VERIFYONLY',
'VERSION',
'VIEW',
'VIEW_METADATA',
'VIEWS',
'VISIBILITY',
'WAIT_AT_LOW_PRIORITY',
'WAITFOR',
'WEEK',
'WEIGHT',
'WELL_FORMED_XML',
'WHEN',
'WHERE',
'WHILE',
'WINDOWS',
'WITH',
'WITHIN',
'WITHOUT',
'WITNESS',
'WORK',
'WORKLOAD',
'WRITETEXT',
'XACT_ABORT',
'XLOCK',
'XMAX',
'XMIN',
'XML',
'XMLDATA',
'XMLNAMESPACES',
'XMLSCHEMA',
'XQUERY',
'XSINIL',
'YEAR',
'YMAX',
'YMIN'
],
operators: [
// Logical
'ALL',
'AND',
'ANY',
'BETWEEN',
'EXISTS',
'IN',
'LIKE',
'NOT',
'OR',
'SOME',
// Set
'EXCEPT',
'INTERSECT',
'UNION',
// Join
'APPLY',
'CROSS',
'FULL',
'INNER',
'JOIN',
'LEFT',
'OUTER',
'RIGHT',
// Predicates
'CONTAINS',
'FREETEXT',
'IS',
'NULL',
// Pivoting
'PIVOT',
'UNPIVOT',
// Merging
'MATCHED'
],
builtinFunctions: [
// Aggregate
'AVG',
'CHECKSUM_AGG',
'COUNT',
'COUNT_BIG',
'GROUPING',
'GROUPING_ID',
'MAX',
'MIN',
'SUM',
'STDEV',
'STDEVP',
'VAR',
'VARP',
// Analytic
'CUME_DIST',
'FIRST_VALUE',
'LAG',
'LAST_VALUE',
'LEAD',
'PERCENTILE_CONT',
'PERCENTILE_DISC',
'PERCENT_RANK',
// Collation
'COLLATE',
'COLLATIONPROPERTY',
'TERTIARY_WEIGHTS',
// Azure
'FEDERATION_FILTERING_VALUE',
// Conversion
'CAST',
'CONVERT',
'PARSE',
'TRY_CAST',
'TRY_CONVERT',
'TRY_PARSE',
// Cryptographic
'ASYMKEY_ID',
'ASYMKEYPROPERTY',
'CERTPROPERTY',
'CERT_ID',
'CRYPT_GEN_RANDOM',
'DECRYPTBYASYMKEY',
'DECRYPTBYCERT',
'DECRYPTBYKEY',
'DECRYPTBYKEYAUTOASYMKEY',
'DECRYPTBYKEYAUTOCERT',
'DECRYPTBYPASSPHRASE',
'ENCRYPTBYASYMKEY',
'ENCRYPTBYCERT',
'ENCRYPTBYKEY',
'ENCRYPTBYPASSPHRASE',
'HASHBYTES',
'IS_OBJECTSIGNED',
'KEY_GUID',
'KEY_ID',
'KEY_NAME',
'SIGNBYASYMKEY',
'SIGNBYCERT',
'SYMKEYPROPERTY',
'VERIFYSIGNEDBYCERT',
'VERIFYSIGNEDBYASYMKEY',
// Cursor
'CURSOR_STATUS',
// Datatype
'DATALENGTH',
'IDENT_CURRENT',
'IDENT_INCR',
'IDENT_SEED',
'IDENTITY',
'SQL_VARIANT_PROPERTY',
// Datetime
'CURRENT_TIMESTAMP',
'DATEADD',
'DATEDIFF',
'DATEFROMPARTS',
'DATENAME',
'DATEPART',
'DATETIME2FROMPARTS',
'DATETIMEFROMPARTS',
'DATETIMEOFFSETFROMPARTS',
'DAY',
'EOMONTH',
'GETDATE',
'GETUTCDATE',
'ISDATE',
'MONTH',
'SMALLDATETIMEFROMPARTS',
'SWITCHOFFSET',
'SYSDATETIME',
'SYSDATETIMEOFFSET',
'SYSUTCDATETIME',
'TIMEFROMPARTS',
'TODATETIMEOFFSET',
'YEAR',
// Logical
'CHOOSE',
'COALESCE',
'IIF',
'NULLIF',
// Mathematical
'ABS',
'ACOS',
'ASIN',
'ATAN',
'ATN2',
'CEILING',
'COS',
'COT',
'DEGREES',
'EXP',
'FLOOR',
'LOG',
'LOG10',
'PI',
'POWER',
'RADIANS',
'RAND',
'ROUND',
'SIGN',
'SIN',
'SQRT',
'SQUARE',
'TAN',
// Metadata
'APP_NAME',
'APPLOCK_MODE',
'APPLOCK_TEST',
'ASSEMBLYPROPERTY',
'COL_LENGTH',
'COL_NAME',
'COLUMNPROPERTY',
'DATABASE_PRINCIPAL_ID',
'DATABASEPROPERTYEX',
'DB_ID',
'DB_NAME',
'FILE_ID',
'FILE_IDEX',
'FILE_NAME',
'FILEGROUP_ID',
'FILEGROUP_NAME',
'FILEGROUPPROPERTY',
'FILEPROPERTY',
'FULLTEXTCATALOGPROPERTY',
'FULLTEXTSERVICEPROPERTY',
'INDEX_COL',
'INDEXKEY_PROPERTY',
'INDEXPROPERTY',
'OBJECT_DEFINITION',
'OBJECT_ID',
'OBJECT_NAME',
'OBJECT_SCHEMA_NAME',
'OBJECTPROPERTY',
'OBJECTPROPERTYEX',
'ORIGINAL_DB_NAME',
'PARSENAME',
'SCHEMA_ID',
'SCHEMA_NAME',
'SCOPE_IDENTITY',
'SERVERPROPERTY',
'STATS_DATE',
'TYPE_ID',
'TYPE_NAME',
'TYPEPROPERTY',
// Ranking
'DENSE_RANK',
'NTILE',
'RANK',
'ROW_NUMBER',
// Replication
'PUBLISHINGSERVERNAME',
// Rowset
'OPENDATASOURCE',
'OPENQUERY',
'OPENROWSET',
'OPENXML',
// Security
'CERTENCODED',
'CERTPRIVATEKEY',
'CURRENT_USER',
'HAS_DBACCESS',
'HAS_PERMS_BY_NAME',
'IS_MEMBER',
'IS_ROLEMEMBER',
'IS_SRVROLEMEMBER',
'LOGINPROPERTY',
'ORIGINAL_LOGIN',
'PERMISSIONS',
'PWDENCRYPT',
'PWDCOMPARE',
'SESSION_USER',
'SESSIONPROPERTY',
'SUSER_ID',
'SUSER_NAME',
'SUSER_SID',
'SUSER_SNAME',
'SYSTEM_USER',
'USER',
'USER_ID',
'USER_NAME',
// String
'ASCII',
'CHAR',
'CHARINDEX',
'CONCAT',
'DIFFERENCE',
'FORMAT',
'LEFT',
'LEN',
'LOWER',
'LTRIM',
'NCHAR',
'PATINDEX',
'QUOTENAME',
'REPLACE',
'REPLICATE',
'REVERSE',
'RIGHT',
'RTRIM',
'SOUNDEX',
'SPACE',
'STR',
'STUFF',
'SUBSTRING',
'UNICODE',
'UPPER',
// System
'BINARY_CHECKSUM',
'CHECKSUM',
'CONNECTIONPROPERTY',
'CONTEXT_INFO',
'CURRENT_REQUEST_ID',
'ERROR_LINE',
'ERROR_NUMBER',
'ERROR_MESSAGE',
'ERROR_PROCEDURE',
'ERROR_SEVERITY',
'ERROR_STATE',
'FORMATMESSAGE',
'GETANSINULL',
'GET_FILESTREAM_TRANSACTION_CONTEXT',
'HOST_ID',
'HOST_NAME',
'ISNULL',
'ISNUMERIC',
'MIN_ACTIVE_ROWVERSION',
'NEWID',
'NEWSEQUENTIALID',
'ROWCOUNT_BIG',
'XACT_STATE',
// TextImage
'TEXTPTR',
'TEXTVALID',
// Trigger
'COLUMNS_UPDATED',
'EVENTDATA',
'TRIGGER_NESTLEVEL',
'UPDATE',
// ChangeTracking
'CHANGETABLE',
'CHANGE_TRACKING_CONTEXT',
'CHANGE_TRACKING_CURRENT_VERSION',
'CHANGE_TRACKING_IS_COLUMN_IN_MASK',
'CHANGE_TRACKING_MIN_VALID_VERSION',
// FullTextSearch
'CONTAINSTABLE',
'FREETEXTTABLE',
// SemanticTextSearch
'SEMANTICKEYPHRASETABLE',
'SEMANTICSIMILARITYDETAILSTABLE',
'SEMANTICSIMILARITYTABLE',
// FileStream
'FILETABLEROOTPATH',
'GETFILENAMESPACEPATH',
'GETPATHLOCATOR',
'PATHNAME',
// ServiceBroker
'GET_TRANSMISSION_STATUS'
],
builtinVariables: [
// Configuration
'@@DATEFIRST',
'@@DBTS',
'@@LANGID',
'@@LANGUAGE',
'@@LOCK_TIMEOUT',
'@@MAX_CONNECTIONS',
'@@MAX_PRECISION',
'@@NESTLEVEL',
'@@OPTIONS',
'@@REMSERVER',
'@@SERVERNAME',
'@@SERVICENAME',
'@@SPID',
'@@TEXTSIZE',
'@@VERSION',
// Cursor
'@@CURSOR_ROWS',
'@@FETCH_STATUS',
// Datetime
'@@DATEFIRST',
// Metadata
'@@PROCID',
// System
'@@ERROR',
'@@IDENTITY',
'@@ROWCOUNT',
'@@TRANCOUNT',
// Stats
'@@CONNECTIONS',
'@@CPU_BUSY',
'@@IDLE',
'@@IO_BUSY',
'@@PACKET_ERRORS',
'@@PACK_RECEIVED',
'@@PACK_SENT',
'@@TIMETICKS',
'@@TOTAL_ERRORS',
'@@TOTAL_READ',
'@@TOTAL_WRITE'
],
pseudoColumns: ['$ACTION', '$IDENTITY', '$ROWGUID', '$PARTITION'],
tokenizer: {
root: [
{ include: '@comments' },
{ include: '@whitespace' },
{ include: '@pseudoColumns' },
{ include: '@numbers' },
{ include: '@strings' },
{ include: '@complexIdentifiers' },
{ include: '@scopes' },
[/[;,.]/, 'delimiter'],
[/[()]/, '@brackets'],
[
/[\w@#$]+/,
{
cases: {
'@keywords': 'keyword',
'@operators': 'operator',
'@builtinVariables': 'predefined',
'@builtinFunctions': 'predefined',
'@default': 'identifier'
}
}
],
[/[<>=!%&+\-*/|~^]/, 'operator']
],
whitespace: [[/\s+/, 'white']],
comments: [
[/--+.*/, 'comment'],
[/\/\*/, { token: 'comment.quote', next: '@comment' }]
],
comment: [
[/[^*/]+/, 'comment'],
// Not supporting nested comments, as nested comments seem to not be standard?
// i.e. http://stackoverflow.com/questions/728172/are-there-multiline-comment-delimiters-in-sql-that-are-vendor-agnostic
// [/\/\*/, { token: 'comment.quote', next: '@push' }], // nested comment not allowed :-(
[/\*\//, { token: 'comment.quote', next: '@pop' }],
[/./, 'comment']
],
pseudoColumns: [
[
/[$][A-Za-z_][\w@#$]*/,
{
cases: {
'@pseudoColumns': 'predefined',
'@default': 'identifier'
}
}
]
],
numbers: [
[/0[xX][0-9a-fA-F]*/, 'number'],
[/[$][+-]*\d*(\.\d*)?/, 'number'],
[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, 'number']
],
strings: [
[/N'/, { token: 'string', next: '@string' }],
[/'/, { token: 'string', next: '@string' }]
],
string: [
[/[^']+/, 'string'],
[/''/, 'string'],
[/'/, { token: 'string', next: '@pop' }]
],
complexIdentifiers: [
[/\[/, { token: 'identifier.quote', next: '@bracketedIdentifier' }],
[/"/, { token: 'identifier.quote', next: '@quotedIdentifier' }]
],
bracketedIdentifier: [
[/[^\]]+/, 'identifier'],
[/]]/, 'identifier'],
[/]/, { token: 'identifier.quote', next: '@pop' }]
],
quotedIdentifier: [
[/[^"]+/, 'identifier'],
[/""/, 'identifier'],
[/"/, { token: 'identifier.quote', next: '@pop' }]
],
scopes: [
[/BEGIN\s+(DISTRIBUTED\s+)?TRAN(SACTION)?\b/i, 'keyword'],
[/BEGIN\s+TRY\b/i, { token: 'keyword.try' }],
[/END\s+TRY\b/i, { token: 'keyword.try' }],
[/BEGIN\s+CATCH\b/i, { token: 'keyword.catch' }],
[/END\s+CATCH\b/i, { token: 'keyword.catch' }],
[/(BEGIN|CASE)\b/i, { token: 'keyword.block' }],
[/END\b/i, { token: 'keyword.block' }],
[/WHEN\b/i, { token: 'keyword.choice' }],
[/THEN\b/i, { token: 'keyword.choice' }]
]
}
};
/***/ })
}]);
//# sourceMappingURL=61.61.js.map
|
webpackJsonp([25],{"SG+P":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i,o,a,s,u,c,d,f,l,g,h,p,m,v,b,k,C,_,y=function(){function e(e){var t=this;this._defaults=e,this._worker=null,this._idleCheckInterval=setInterval(function(){return t._checkIfIdle()},3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return t._stopWorker()})}return e.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},e.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},e.prototype._checkIfIdle=function(){this._worker&&(Date.now()-this._lastUsedTime>12e4&&this._stopWorker())},e.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=monaco.editor.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client},e.prototype.getLanguageServiceWorker=function(){for(var e,t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return this._getClient().then(function(t){e=t}).then(function(e){return t._worker.withSyncedResources(n)}).then(function(t){return e})},e}();!function(e){e.create=function(e,t){return{line:e,character:t}},e.is=function(e){var t=e;return Q.objectLiteral(t)&&Q.number(t.line)&&Q.number(t.character)}}(r||(r={})),function(e){e.create=function(e,t,n,i){if(Q.number(e)&&Q.number(t)&&Q.number(n)&&Q.number(i))return{start:r.create(e,t),end:r.create(n,i)};if(r.is(e)&&r.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+i+"]")},e.is=function(e){var t=e;return Q.objectLiteral(t)&&r.is(t.start)&&r.is(t.end)}}(i||(i={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return Q.defined(t)&&i.is(t.range)&&(Q.string(t.uri)||Q.undefined(t.uri))}}(o||(o={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){var t=e;return Q.defined(t)&&i.is(t.targetRange)&&Q.string(t.targetUri)&&(i.is(t.targetSelectionRange)||Q.undefined(t.targetSelectionRange))&&(i.is(t.originSelectionRange)||Q.undefined(t.originSelectionRange))}}(a||(a={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){var t=e;return Q.number(t.red)&&Q.number(t.green)&&Q.number(t.blue)&&Q.number(t.alpha)}}(s||(s={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return i.is(t.range)&&s.is(t.color)}}(u||(u={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return Q.string(t.label)&&(Q.undefined(t.textEdit)||m.is(t))&&(Q.undefined(t.additionalTextEdits)||Q.typedArray(t.additionalTextEdits,m.is))}}(c||(c={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(d||(d={})),function(e){e.create=function(e,t,n,r,i){var o={startLine:e,endLine:t};return Q.defined(n)&&(o.startCharacter=n),Q.defined(r)&&(o.endCharacter=r),Q.defined(i)&&(o.kind=i),o},e.is=function(e){var t=e;return Q.number(t.startLine)&&Q.number(t.startLine)&&(Q.undefined(t.startCharacter)||Q.number(t.startCharacter))&&(Q.undefined(t.endCharacter)||Q.number(t.endCharacter))&&(Q.undefined(t.kind)||Q.string(t.kind))}}(f||(f={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return Q.defined(t)&&o.is(t.location)&&Q.string(t.message)}}(l||(l={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(g||(g={})),function(e){e.create=function(e,t,n,r,i,o){var a={range:e,message:t};return Q.defined(n)&&(a.severity=n),Q.defined(r)&&(a.code=r),Q.defined(i)&&(a.source=i),Q.defined(o)&&(a.relatedInformation=o),a},e.is=function(e){var t=e;return Q.defined(t)&&i.is(t.range)&&Q.string(t.message)&&(Q.number(t.severity)||Q.undefined(t.severity))&&(Q.number(t.code)||Q.string(t.code)||Q.undefined(t.code))&&(Q.string(t.source)||Q.undefined(t.source))&&(Q.undefined(t.relatedInformation)||Q.typedArray(t.relatedInformation,l.is))}}(h||(h={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={title:e,command:t};return Q.defined(n)&&n.length>0&&(i.arguments=n),i},e.is=function(e){var t=e;return Q.defined(t)&&Q.string(t.title)&&Q.string(t.command)}}(p||(p={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return Q.objectLiteral(t)&&Q.string(t.newText)&&i.is(t.range)}}(m||(m={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return Q.defined(t)&&E.is(t.textDocument)&&Array.isArray(t.edits)}}(v||(v={})),function(e){e.create=function(e,t){var n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),n},e.is=function(e){var t=e;return t&&"create"===t.kind&&Q.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Q.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Q.boolean(t.options.ignoreIfExists)))}}(b||(b={})),function(e){e.create=function(e,t,n){var r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),r},e.is=function(e){var t=e;return t&&"rename"===t.kind&&Q.string(t.oldUri)&&Q.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Q.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Q.boolean(t.options.ignoreIfExists)))}}(k||(k={})),function(e){e.create=function(e,t){var n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),n},e.is=function(e){var t=e;return t&&"delete"===t.kind&&Q.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Q.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Q.boolean(t.options.ignoreIfNotExists)))}}(C||(C={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(function(e){return Q.string(e.kind)?b.is(e)||k.is(e)||C.is(e):v.is(e)}))}}(_||(_={}));var w,E,x,S,I,A,T,M,P,R,F,j,D,L,O,W,N,U=function(){function e(e){this.edits=e}return e.prototype.insert=function(e,t){this.edits.push(m.insert(e,t))},e.prototype.replace=function(e,t){this.edits.push(m.replace(e,t))},e.prototype.delete=function(e){this.edits.push(m.del(e))},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e}();!function(){function e(e){var t=this;this._textEditChanges=Object.create(null),e&&(this._workspaceEdit=e,e.documentChanges?e.documentChanges.forEach(function(e){if(v.is(e)){var n=new U(e.edits);t._textEditChanges[e.textDocument.uri]=n}}):e.changes&&Object.keys(e.changes).forEach(function(n){var r=new U(e.changes[n]);t._textEditChanges[n]=r}))}Object.defineProperty(e.prototype,"edit",{get:function(){return this._workspaceEdit},enumerable:!0,configurable:!0}),e.prototype.getTextEditChange=function(e){if(E.is(e)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t=e;if(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new U(i),this._textEditChanges[t.uri]=r}return r}if(this._workspaceEdit||(this._workspaceEdit={changes:Object.create(null)}),!this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,r=new U(i),this._textEditChanges[e]=r}return r},e.prototype.createFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(b.create(e,t))},e.prototype.renameFile=function(e,t,n){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(k.create(e,t,n))},e.prototype.deleteFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(C.create(e,t))},e.prototype.checkDocumentChanges=function(){if(!this._workspaceEdit||!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.")}}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return Q.defined(t)&&Q.string(t.uri)}}(w||(w={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Q.defined(t)&&Q.string(t.uri)&&(null===t.version||Q.number(t.version))}}(E||(E={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return Q.defined(t)&&Q.string(t.uri)&&Q.string(t.languageId)&&Q.number(t.version)&&Q.string(t.text)}}(x||(x={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(S||(S={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(S||(S={})),function(e){e.is=function(e){var t=e;return Q.objectLiteral(e)&&S.is(t.kind)&&Q.string(t.value)}}(I||(I={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(A||(A={})),function(e){e.PlainText=1,e.Snippet=2}(T||(T={})),function(e){e.create=function(e){return{label:e}}}(M||(M={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(P||(P={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return Q.string(t)||Q.objectLiteral(t)&&Q.string(t.language)&&Q.string(t.value)}}(R||(R={})),function(e){e.is=function(e){var t=e;return!!t&&Q.objectLiteral(t)&&(I.is(t.contents)||R.is(t.contents)||Q.typedArray(t.contents,R.is))&&(void 0===e.range||i.is(e.range))}}(F||(F={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(j||(j={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={label:e};return Q.defined(t)&&(i.documentation=t),Q.defined(n)?i.parameters=n:i.parameters=[],i}}(D||(D={})),function(e){e.Text=1,e.Read=2,e.Write=3}(L||(L={})),function(e){e.create=function(e,t){var n={range:e};return Q.number(t)&&(n.kind=t),n}}(O||(O={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(W||(W={})),function(e){e.create=function(e,t,n,r,i){var o={name:e,kind:t,location:{uri:r,range:n}};return i&&(o.containerName=i),o}}(N||(N={}));var V,K,z,H,q,B=function(){return function(){}}();!function(e){e.create=function(e,t,n,r,i,o){var a={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==o&&(a.children=o),a},e.is=function(e){var t=e;return t&&Q.string(t.name)&&Q.number(t.kind)&&i.is(t.range)&&i.is(t.selectionRange)&&(void 0===t.detail||Q.string(t.detail))&&(void 0===t.deprecated||Q.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))}}(B||(B={})),function(e){e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports"}(V||(V={})),function(e){e.create=function(e,t){var n={diagnostics:e};return void 0!==t&&null!==t&&(n.only=t),n},e.is=function(e){var t=e;return Q.defined(t)&&Q.typedArray(t.diagnostics,h.is)&&(void 0===t.only||Q.typedArray(t.only,Q.string))}}(K||(K={})),function(e){e.create=function(e,t,n){var r={title:e};return p.is(t)?r.command=t:r.edit=t,void 0!==n&&(r.kind=n),r},e.is=function(e){var t=e;return t&&Q.string(t.title)&&(void 0===t.diagnostics||Q.typedArray(t.diagnostics,h.is))&&(void 0===t.kind||Q.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||p.is(t.command))&&(void 0===t.edit||_.is(t.edit))}}(z||(z={})),function(e){e.create=function(e,t){var n={range:e};return Q.defined(t)&&(n.data=t),n},e.is=function(e){var t=e;return Q.defined(t)&&i.is(t.range)&&(Q.undefined(t.command)||p.is(t.command))}}(H||(H={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){var t=e;return Q.defined(t)&&Q.number(t.tabSize)&&Q.boolean(t.insertSpaces)}}(q||(q={}));var $=function(){return function(){}}();!function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){var t=e;return Q.defined(t)&&i.is(t.range)&&(Q.undefined(t.target)||Q.string(t.target))}}($||($={}));var G,J;!function(e){e.create=function(e,t,n,r){return new X(e,t,n,r)},e.is=function(e){var t=e;return!!(Q.defined(t)&&Q.string(t.uri)&&(Q.undefined(t.languageId)||Q.string(t.languageId))&&Q.number(t.lineCount)&&Q.func(t.getText)&&Q.func(t.positionAt)&&Q.func(t.offsetAt))},e.applyEdits=function(e,t){for(var n=e.getText(),r=function e(t,n){if(t.length<=1)return t;var r=t.length/2|0,i=t.slice(0,r),o=t.slice(r);e(i,n),e(o,n);for(var a=0,s=0,u=0;a<i.length&&s<o.length;){var c=n(i[a],o[s]);t[u++]=c<=0?i[a++]:o[s++]}for(;a<i.length;)t[u++]=i[a++];for(;s<o.length;)t[u++]=o[s++];return t}(t,function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}),i=n.length,o=r.length-1;o>=0;o--){var a=r[o],s=e.offsetAt(a.range.start),u=e.offsetAt(a.range.end);if(!(u<=i))throw new Error("Overlapping edit");n=n.substring(0,s)+a.newText+n.substring(u,n.length),i=s}return n}}(G||(G={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(J||(J={}));var Q,X=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=null}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=null},e.prototype.getLineOffsets=function(){if(null===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r<t.length;r++){n&&(e.push(r),n=!1);var i=t.charAt(r);n="\r"===i||"\n"===i,"\r"===i&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return r.create(0,e);for(;n<i;){var o=Math.floor((n+i)/2);t[o]>e?i=o:n=o+1}var a=n-1;return r.create(a,e-t[a])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),e}();!function(e){var t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(Q||(Q={}));monaco.Uri;var Y=monaco.Range,Z=function(){function e(e,t,n){var r=this;this._languageId=e,this._worker=t,this._disposables=[],this._listener=Object.create(null);var i=function(e){var t,n=e.getModeId();n===r._languageId&&(r._listener[e.uri.toString()]=e.onDidChangeContent(function(){clearTimeout(t),t=setTimeout(function(){return r._doValidate(e.uri,n)},500)}),r._doValidate(e.uri,n))},o=function(e){monaco.editor.setModelMarkers(e,r._languageId,[]);var t=e.uri.toString(),n=r._listener[t];n&&(n.dispose(),delete r._listener[t])};this._disposables.push(monaco.editor.onDidCreateModel(i)),this._disposables.push(monaco.editor.onWillDisposeModel(function(e){o(e),r._resetSchema(e.uri)})),this._disposables.push(monaco.editor.onDidChangeModelLanguage(function(e){o(e.model),i(e.model),r._resetSchema(e.model.uri)})),this._disposables.push(n.onDidChange(function(e){monaco.editor.getModels().forEach(function(e){e.getModeId()===r._languageId&&(o(e),i(e))})})),this._disposables.push({dispose:function(){for(var e in monaco.editor.getModels().forEach(o),r._listener)r._listener[e].dispose()}}),monaco.editor.getModels().forEach(i)}return e.prototype.dispose=function(){this._disposables.forEach(function(e){return e&&e.dispose()}),this._disposables=[]},e.prototype._resetSchema=function(e){this._worker().then(function(t){t.resetSchema(e.toString())})},e.prototype._doValidate=function(e,t){this._worker(e).then(function(n){return n.doValidation(e.toString()).then(function(n){var r=n.map(function(e){return n="number"==typeof(t=e).code?String(t.code):t.code,{severity:function(e){switch(e){case g.Error:return monaco.MarkerSeverity.Error;case g.Warning:return monaco.MarkerSeverity.Warning;case g.Information:return monaco.MarkerSeverity.Info;case g.Hint:return monaco.MarkerSeverity.Hint;default:return monaco.MarkerSeverity.Info}}(t.severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message,code:n,source:t.source};var t,n}),i=monaco.editor.getModel(e);i&&i.getModeId()===t&&monaco.editor.setModelMarkers(i,t,r)})}).then(void 0,function(e){console.error(e)})},e}();function ee(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function te(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function ne(e){if(e)return new Y(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function re(e){if(e)return{range:ne(e.range),text:e.newText}}var ie=function(){function e(e){this._worker=e}return Object.defineProperty(e.prototype,"triggerCharacters",{get:function(){return[" ",":"]},enumerable:!0,configurable:!0}),e.prototype.provideCompletionItems=function(e,t,n,r){var i=e.uri;return this._worker(i).then(function(e){return e.doComplete(i.toString(),ee(t))}).then(function(n){if(n){var r=e.getWordUntilPosition(t),i=new Y(t.lineNumber,r.startColumn,t.lineNumber,r.endColumn),o=n.items.map(function(e){var t={label:e.label,insertText:e.insertText||e.label,sortText:e.sortText,filterText:e.filterText,documentation:e.documentation,detail:e.detail,range:i,kind:function(e){var t=monaco.languages.CompletionItemKind;switch(e){case A.Text:return t.Text;case A.Method:return t.Method;case A.Function:return t.Function;case A.Constructor:return t.Constructor;case A.Field:return t.Field;case A.Variable:return t.Variable;case A.Class:return t.Class;case A.Interface:return t.Interface;case A.Module:return t.Module;case A.Property:return t.Property;case A.Unit:return t.Unit;case A.Value:return t.Value;case A.Enum:return t.Enum;case A.Keyword:return t.Keyword;case A.Snippet:return t.Snippet;case A.Color:return t.Color;case A.File:return t.File;case A.Reference:return t.Reference}return t.Property}(e.kind)};return e.textEdit&&(t.range=ne(e.textEdit.range),t.insertText=e.textEdit.newText),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(re)),e.insertTextFormat===T.Snippet&&(t.insertTextRules=monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet),t});return{isIncomplete:n.isIncomplete,suggestions:o}}})},e}();function oe(e){return"string"==typeof e?{value:e}:(t=e)&&"object"==typeof t&&"string"==typeof t.kind?"plaintext"===e.kind?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+"\n"+e.value+"\n```\n"};var t}var ae=function(){function e(e){this._worker=e}return e.prototype.provideHover=function(e,t,n){var r=e.uri;return this._worker(r).then(function(e){return e.doHover(r.toString(),ee(t))}).then(function(e){if(e)return{range:ne(e.range),contents:function(e){if(e)return Array.isArray(e)?e.map(oe):[oe(e)]}(e.contents)}})},e}();var se=function(){function e(e){this._worker=e}return e.prototype.provideDocumentSymbols=function(e,t){var n=e.uri;return this._worker(n).then(function(e){return e.findDocumentSymbols(n.toString())}).then(function(e){if(e)return e.map(function(e){return{name:e.name,detail:"",containerName:e.containerName,kind:function(e){var t=monaco.languages.SymbolKind;switch(e){case W.File:return t.Array;case W.Module:return t.Module;case W.Namespace:return t.Namespace;case W.Package:return t.Package;case W.Class:return t.Class;case W.Method:return t.Method;case W.Property:return t.Property;case W.Field:return t.Field;case W.Constructor:return t.Constructor;case W.Enum:return t.Enum;case W.Interface:return t.Interface;case W.Function:return t.Function;case W.Variable:return t.Variable;case W.Constant:return t.Constant;case W.String:return t.String;case W.Number:return t.Number;case W.Boolean:return t.Boolean;case W.Array:return t.Array}return t.Function}(e.kind),range:ne(e.location.range),selectionRange:ne(e.location.range),tags:[]}})})},e}();function ue(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var ce,de=function(){function e(e){this._worker=e}return e.prototype.provideDocumentFormattingEdits=function(e,t,n){var r=e.uri;return this._worker(r).then(function(e){return e.format(r.toString(),null,ue(t)).then(function(e){if(e&&0!==e.length)return e.map(re)})})},e}(),fe=function(){function e(e){this._worker=e}return e.prototype.provideDocumentRangeFormattingEdits=function(e,t,n,r){var i=e.uri;return this._worker(i).then(function(e){return e.format(i.toString(),te(t),ue(n)).then(function(e){if(e&&0!==e.length)return e.map(re)})})},e}(),le=function(){function e(e){this._worker=e}return e.prototype.provideDocumentColors=function(e,t){var n=e.uri;return this._worker(n).then(function(e){return e.findDocumentColors(n.toString())}).then(function(e){if(e)return e.map(function(e){return{color:e.color,range:ne(e.range)}})})},e.prototype.provideColorPresentations=function(e,t,n){var r=e.uri;return this._worker(r).then(function(e){return e.getColorPresentations(r.toString(),t.color,te(t.range))}).then(function(e){if(e)return e.map(function(e){var t={label:e.label};return e.textEdit&&(t.textEdit=re(e.textEdit)),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(re)),t})})},e}(),ge=function(){function e(e){this._worker=e}return e.prototype.provideFoldingRanges=function(e,t,n){var r=e.uri;return this._worker(r).then(function(e){return e.provideFoldingRanges(r.toString(),t)}).then(function(e){if(e)return e.map(function(e){var t={start:e.startLine+1,end:e.endLine+1};return void 0!==e.kind&&(t.kind=function(e){switch(e){case d.Comment:return monaco.languages.FoldingRangeKind.Comment;case d.Imports:return monaco.languages.FoldingRangeKind.Imports;case d.Region:return monaco.languages.FoldingRangeKind.Region}return}(e.kind)),t})})},e}();function he(e,t){void 0===t&&(t=!1);var n=0,r=e.length,i="",o=0,a=16,s=0,u=0,c=0,d=0,f=0;function l(t,r){for(var i=0,o=0;i<t||!r;){var a=e.charCodeAt(n);if(a>=48&&a<=57)o=16*o+a-48;else if(a>=65&&a<=70)o=16*o+a-65+10;else{if(!(a>=97&&a<=102))break;o=16*o+a-97+10}n++,i++}return i<t&&(o=-1),o}function g(){if(i="",f=0,o=n,u=s,d=c,n>=r)return o=r,a=17;var t=e.charCodeAt(n);if(pe(t)){do{n++,i+=String.fromCharCode(t),t=e.charCodeAt(n)}while(pe(t));return a=15}if(me(t))return n++,i+=String.fromCharCode(t),13===t&&10===e.charCodeAt(n)&&(n++,i+="\n"),s++,c=n,a=14;switch(t){case 123:return n++,a=1;case 125:return n++,a=2;case 91:return n++,a=3;case 93:return n++,a=4;case 58:return n++,a=6;case 44:return n++,a=5;case 34:return n++,i=function(){for(var t="",i=n;;){if(n>=r){t+=e.substring(i,n),f=2;break}var o=e.charCodeAt(n);if(34===o){t+=e.substring(i,n),n++;break}if(92!==o){if(o>=0&&o<=31){if(me(o)){t+=e.substring(i,n),f=2;break}f=6}n++}else{if(t+=e.substring(i,n),++n>=r){f=2;break}switch(o=e.charCodeAt(n++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var a=l(4,!0);a>=0?t+=String.fromCharCode(a):f=4;break;default:f=5}i=n}}return t}(),a=10;case 47:var g=n-1;if(47===e.charCodeAt(n+1)){for(n+=2;n<r&&!me(e.charCodeAt(n));)n++;return i=e.substring(g,n),a=12}if(42===e.charCodeAt(n+1)){n+=2;for(var p=r-1,m=!1;n<p;){var v=e.charCodeAt(n);if(42===v&&47===e.charCodeAt(n+1)){n+=2,m=!0;break}n++,me(v)&&(13===v&&10===e.charCodeAt(n)&&n++,s++,c=n)}return m||(n++,f=1),i=e.substring(g,n),a=13}return i+=String.fromCharCode(t),n++,a=16;case 45:if(i+=String.fromCharCode(t),++n===r||!ve(e.charCodeAt(n)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=function(){var t=n;if(48===e.charCodeAt(n))n++;else for(n++;n<e.length&&ve(e.charCodeAt(n));)n++;if(n<e.length&&46===e.charCodeAt(n)){if(!(++n<e.length&&ve(e.charCodeAt(n))))return f=3,e.substring(t,n);for(n++;n<e.length&&ve(e.charCodeAt(n));)n++}var r=n;if(n<e.length&&(69===e.charCodeAt(n)||101===e.charCodeAt(n)))if((++n<e.length&&43===e.charCodeAt(n)||45===e.charCodeAt(n))&&n++,n<e.length&&ve(e.charCodeAt(n))){for(n++;n<e.length&&ve(e.charCodeAt(n));)n++;r=n}else f=3;return e.substring(t,r)}(),a=11;default:for(;n<r&&h(t);)n++,t=e.charCodeAt(n);if(o!==n){switch(i=e.substring(o,n)){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return i+=String.fromCharCode(t),n++,a=16}}function h(e){if(pe(e)||me(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){n=e,i="",o=0,a=16,f=0},getPosition:function(){return n},scan:t?function(){var e;do{e=g()}while(e>=12&&e<=15);return e}:g,getToken:function(){return a},getTokenValue:function(){return i},getTokenOffset:function(){return o},getTokenLength:function(){return n-o},getTokenStartLine:function(){return u},getTokenStartCharacter:function(){return o-d},getTokenError:function(){return f}}}function pe(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function me(e){return 10===e||13===e||8232===e||8233===e}function ve(e){return e>=48&&e<=57}!function(e){e.DEFAULT={allowTrailingComma:!1}}(ce||(ce={}));var be=he;function ke(e){return{getInitialState:function(){return new Pe(null,null,!1)},tokenize:function(t,n,r,i){return function(e,t,n,r,i){void 0===r&&(r=0);var o=0,a=!1;switch(n.scanError){case 2:t='"'+t,o=1;break;case 1:t="/*"+t,o=2}var s,u,c=be(t),d=n.lastWasColon;u={tokens:[],endState:n.clone()};for(;;){var f=r+c.getPosition(),l="";if(17===(s=c.scan()))break;if(f===r+c.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+t.substr(c.getPosition(),3));switch(a&&(f-=o),a=o>0,s){case 1:case 2:l=Ce,d=!1;break;case 3:case 4:l=_e,d=!1;break;case 6:l=ye,d=!0;break;case 5:l=we,d=!1;break;case 8:case 9:l=Ee,d=!1;break;case 7:l=xe,d=!1;break;case 10:l=d?Se:Ae,d=!1;break;case 11:l=Ie,d=!1}if(e)switch(s){case 12:l=Me;break;case 13:l=Te}u.endState=new Pe(n.getStateData(),c.getTokenError(),d),u.tokens.push({startIndex:f,scopes:l})}return u}(e,t,n,r)}}}var Ce="delimiter.bracket.json",_e="delimiter.array.json",ye="delimiter.colon.json",we="delimiter.comma.json",Ee="keyword.json",xe="keyword.json",Se="string.value.json",Ie="number.json",Ae="string.key.json",Te="comment.block.json",Me="comment.line.json",Pe=function(){function e(e,t,n){this._state=e,this.scanError=t,this.lastWasColon=n}return e.prototype.clone=function(){return new e(this._state,this.scanError,this.lastWasColon)},e.prototype.equals=function(t){return t===this||!!(t&&t instanceof e)&&(this.scanError===t.scanError&&this.lastWasColon===t.lastWasColon)},e.prototype.getStateData=function(){return this._state},e.prototype.setStateData=function(e){this._state=e},e}();function Re(e){return{dispose:function(){return Fe(e)}}}function Fe(e){for(;e.length;)e.pop().dispose()}t.setupMode=function(e){var t=[],n=[],r=new y(e);t.push(r);var i=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.getLanguageServiceWorker.apply(r,e)};function o(){var t=e.languageId,r=e.modeConfiguration;Fe(n),r.documentFormattingEdits&&n.push(monaco.languages.registerDocumentFormattingEditProvider(t,new de(i))),r.documentRangeFormattingEdits&&n.push(monaco.languages.registerDocumentRangeFormattingEditProvider(t,new fe(i))),r.completionItems&&n.push(monaco.languages.registerCompletionItemProvider(t,new ie(i))),r.hovers&&n.push(monaco.languages.registerHoverProvider(t,new ae(i))),r.documentSymbols&&n.push(monaco.languages.registerDocumentSymbolProvider(t,new se(i))),r.tokens&&n.push(monaco.languages.setTokensProvider(t,ke(!0))),r.colors&&n.push(monaco.languages.registerColorProvider(t,new le(i))),r.foldingRanges&&n.push(monaco.languages.registerFoldingRangeProvider(t,new ge(i))),r.diagnostics&&n.push(new Z(t,i,e))}o(),t.push(monaco.languages.setLanguageConfiguration(e.languageId,je));var a=e.modeConfiguration;return e.onDidChange(function(e){e.modeConfiguration!==a&&(a=e.modeConfiguration,o())}),t.push(Re(n)),Re(t)};var je={wordPattern:/(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}]}}});
|
import React, {Component} from 'react';
import KeyboardEventHandler from 'react-keyboard-event-handler';
import music from '../Music/music.mp3';
import onehour from '../Music/onehour.wav';
import itch from '../Music/itch.wav';
import testsubjects from '../Music/testsubjects.wav';
import difficult from '../Music/difficult.wav';
/**
* Ending Scene
*/
class Main extends Component {
constructor(){
super();
this.state = {paused:true,time:3600};
try{
this.song = new Audio(music);
this.song.addEventListener('ended', function() {
this.currentTime = 0;
this.play();
}, false);
this.song.volume = 0.2;
this.song.play();
} catch(error){
console.log(error);
}
}
componentWillUnmount(){
this.song.pause();
}
timer = () => {
if(this.state.time>0){
this.setState({time:this.state.time-1});
}
}
handleTimerToggle = ()=>{
if(this.state.paused){
this.timerInterval = setInterval(this.timer, 1000);
} else {
clearInterval(this.timerInterval);
}
this.setState({paused:!this.state.paused});
}
render() {
let date = new Date(null);
date.setSeconds(this.state.time);
return (
<div className="main">
<div className="timer">
<span id="time">
{date.toISOString().substr(11, 8)}
</span>
</div>
<div className="hint">
<textarea id="hint">
</textarea>
</div>
<KeyboardEventHandler handleKeys={['shift+space']} onKeyEvent={(key,e)=>this.handleTimerToggle()}/>
<KeyboardEventHandler handleKeys={['ctrl+shift+1']} onKeyEvent={(key,e)=>{let sound = new Audio(onehour);sound.play()}}/>
<KeyboardEventHandler handleKeys={['ctrl+shift+2']} onKeyEvent={(key,e)=>{let sound = new Audio(itch);sound.play()}}/>
<KeyboardEventHandler handleKeys={['ctrl+shift+3']} onKeyEvent={(key,e)=>{let sound = new Audio(testsubjects);sound.play()}}/>
<KeyboardEventHandler handleKeys={['ctrl+shift+4']} onKeyEvent={(key,e)=>{let sound = new Audio(difficult);sound.play()}}/>
</div>
)
}
};
export default Main;
|
import { html } from 'lit-htm'
import Document from '../components/Document.js'
import Head from '../components/Head.js'
export default function Home() {
const head = html`<${Head}>
<title>Page title</title>
<meta name="description" content="Page description" />
<!-- Any tags -->
<//>`
return html`<${Document} head=${head}>
<h1>Page content</h1>
<//>`
}
|
let url = "https://coolors.co/573ced-7b9fe9-e349c5-feb870-9aece0";
let pallete = [];
let cells, cols, rows;
let offset, margin;
let w, h;
let graphics, bc;
let pfc = -1;
function setup() {
createCanvas(800, 800);
colorMode(HSB, 360, 100, 100, 100);
angleMode(DEGREES);
randomSeed(random(10000));
}
function draw() {
init();
frameRate(1);
//noLoop();
}
function init() {
pallete = createPallete(url);
let bn = int(random(pallete.length));
bc = pallete[bn]
pallete.splice(bn, 1);
background(bc);
graphics = createGraphics(width, height);
graphics.colorMode(HSB, 360, 100, 100, 100);
drawNoiseBackground(100000, graphics);
cells = int(random(2, 8));
cols = cells;
rows = cells;
offset = width / cells / int(random(2, 4));
margin = offset / int(random(2, 4));
w = (width - offset * 2 - margin * (cols - 1)) / cols;
h = (height - offset * 2 - margin * (rows - 1)) / rows;
let d = (w + h) / 1.5;
for (let j = 0; j < rows; j++) {
for (let i = 0; i < cols; i++) {
let x = map(i, 0, cols - 1, offset, width - offset - w);
let y = map(j, 0, rows - 1, offset, height - offset - h);
x = x + w / 2;
y = y + h / 2;
drawCircleWithArc(x, y, d);
}
}
image(graphics, 0, 0);
}
function drawCircleWithArc(_cx, _cy, _diameter) {
let cx = _cx;
let cy = _cy;
let rate = 0.85;
push();
translate(cx, cy);
rotate(int(random(8)) * 360 / 8);
let angle = 0;
let separateAngle = int(random(3, 8));
let angleStep = 360 / separateAngle;
while (angle < 360) {
let diameterMax = _diameter * rate;
diameterMax = diameterMax / random(1, 2.5);
if (angle + angleStep > 360) {
angleStep = 360 - angle;
}
let separateDiameter = int(random(1, 8));
let diameterStep = diameterMax / separateDiameter;
let diameter = diameterMax;
while (diameter > 0) {
let fc = pfc;
while (fc == pfc) {
let cfn = int(random(pallete.length));
fc = pallete[cfn];
}
fill(fc);
noStroke();
arc(0, 0, diameter, diameter, angle, angle + angleStep, PIE);
diameter -= diameterStep;
pfc = fc;
}
angle += angleStep;
}
pop();
}
function createPallete(_url) {
let slash_index = _url.lastIndexOf('/');
let pallate_str = _url.slice(slash_index + 1);
let arr = pallate_str.split('-');
for (let i = 0; i < arr.length; i++) {
arr[i] = '#' + arr[i];
}
return arr;
}
function drawNoiseBackground(_n, _graphics) {
let c = color(0, 0, 100, 7);
for (let i = 0; i < _n; i++) {
let x = random(1) * width;
let y = random(1) * height;
let w = random(1, 2);
let h = random(1, 2);
_graphics.noStroke();
_graphics.fill(c);
_graphics.ellipse(x, y, w, h);
}
}
|
export {default} from './note'
|
define({
root: ({
addDistance: "Add Length Unit",
addArea: "Add Area Unit",
label: "Label",
abbr: "Abbreviation",
conversion: "Conversion",
actions: "Actions",
areaUnits: "Area Units",
distanceUnits: "Length Units",
kilometers: "Kilometers",
miles: "Miles",
meters: "Meters",
feet: "Feet",
yards: "Yards",
squareKilometers: "Square kilometers",
squareMiles: "Square miles",
acres: "Acres",
hectares: "Hectares",
squareMeters: "Square meters",
squareFeet: "Square feet",
squareYards: "Square yards",
distance: "Distances",
area: "Areas"
}),
"ar": 1,
"cs": 1,
"da": 1,
"de": 1,
"es": 1,
"et": 1,
"fi": 1,
"fr": 1,
"he": 1,
"it": 1,
"ja": 1,
"ko": 1,
"lt": 1,
"lv": 1,
"nb": 1,
"nl": 1,
"pl": 1,
"pt-br": 1,
"pt-pt": 1,
"ro": 1,
"ru": 1,
"sv": 1,
"th": 1,
"tr": 1,
"vi": 1,
"zh-cn": 1
});
|
(function() {
var CA, CAattrs, CAextensions, Forge, Promise, ServerAttrs, ServerExtensions, _, asterisksRe, fs, generateKeyPairAsync, ipAddressRe, path, pki;
_ = require("lodash");
fs = require("fs-extra");
path = require("path");
Forge = require("node-forge");
Promise = require("bluebird");
fs = Promise.promisifyAll(fs);
pki = Forge.pki;
generateKeyPairAsync = Promise.promisify(pki.rsa.generateKeyPair);
ipAddressRe = /^[\d\.]+$/;
asterisksRe = /\*/g;
CAattrs = [
{
name: "commonName",
value: "CypressProxyCA"
}, {
name: "countryName",
value: "Internet"
}, {
shortName: "ST",
value: "Internet"
}, {
name: "localityName",
value: "Internet"
}, {
name: "organizationName",
value: "Cypress.io"
}, {
shortName: "OU",
value: "CA"
}
];
CAextensions = [
{
name: "basicConstraints",
cA: true
}, {
name: "keyUsage",
keyCertSign: true,
digitalSignature: true,
nonRepudiation: true,
keyEncipherment: true,
dataEncipherment: true
}, {
name: "extKeyUsage",
serverAuth: true,
clientAuth: true,
codeSigning: true,
emailProtection: true,
timeStamping: true
}, {
name: "nsCertType",
client: true,
server: true,
email: true,
objsign: true,
sslCA: true,
emailCA: true,
objCA: true
}, {
name: "subjectKeyIdentifier"
}
];
ServerAttrs = [
{
name: "countryName",
value: "Internet"
}, {
shortName: "ST",
value: "Internet"
}, {
name: "localityName",
value: "Internet"
}, {
name: "organizationName",
value: "Cypress Proxy CA"
}, {
shortName: "OU",
value: "Cypress Proxy Server Certificate"
}
];
ServerExtensions = [
{
name: "basicConstraints",
cA: false
}, {
name: "keyUsage",
keyCertSign: false,
digitalSignature: true,
nonRepudiation: false,
keyEncipherment: true,
dataEncipherment: true
}, {
name: "extKeyUsage",
serverAuth: true,
clientAuth: true,
codeSigning: false,
emailProtection: false,
timeStamping: false
}, {
name: "nsCertType",
client: true,
server: true,
email: false,
objsign: false,
sslCA: false,
emailCA: false,
objCA: false
}, {
name: "subjectKeyIdentifier"
}
];
CA = (function() {
function CA() {}
CA.prototype.randomSerialNumber = function() {
var i, j, sn;
sn = "";
for (i = j = 1; j <= 4; i = ++j) {
sn += ("00000000" + Math.floor(Math.random() * Math.pow(256, 4)).toString(16)).slice(-8);
}
return sn;
};
CA.prototype.generateCA = function() {
return generateKeyPairAsync({
bits: 512
}).then((function(_this) {
return function(keys) {
var cert;
cert = pki.createCertificate();
cert.publicKey = keys.publicKey;
cert.serialNumber = _this.randomSerialNumber();
cert.validity.notBefore = new Date();
cert.validity.notAfter = new Date();
cert.validity.notAfter.setFullYear(cert.validity.notBefore.getFullYear() + 10);
cert.setSubject(CAattrs);
cert.setIssuer(CAattrs);
cert.setExtensions(CAextensions);
cert.sign(keys.privateKey, Forge.md.sha256.create());
_this.CAcert = cert;
_this.CAkeys = keys;
return Promise.all([fs.writeFileAsync(path.join(_this.certsFolder, "ca.pem"), pki.certificateToPem(cert)), fs.writeFileAsync(path.join(_this.keysFolder, "ca.private.key"), pki.privateKeyToPem(keys.privateKey)), fs.writeFileAsync(path.join(_this.keysFolder, "ca.public.key"), pki.publicKeyToPem(keys.publicKey))]);
};
})(this));
};
CA.prototype.loadCA = function() {
return Promise.props({
certPEM: fs.readFileAsync(path.join(this.certsFolder, "ca.pem"), "utf-8"),
keyPrivatePEM: fs.readFileAsync(path.join(this.keysFolder, "ca.private.key"), "utf-8"),
keyPublicPEM: fs.readFileAsync(path.join(this.keysFolder, "ca.public.key"), "utf-8")
}).then((function(_this) {
return function(results) {
_this.CAcert = pki.certificateFromPem(results.certPEM);
return _this.CAkeys = {
privateKey: pki.privateKeyFromPem(results.keyPrivatePEM),
publicKey: pki.publicKeyFromPem(results.keyPublicPEM)
};
};
})(this))["return"](void 0);
};
CA.prototype.generateServerCertificateKeys = function(hosts) {
var attrsServer, certPem, certServer, dest, keyPrivatePem, keyPublicPem, keysServer, mainHost;
hosts = [].concat(hosts);
mainHost = hosts[0];
keysServer = pki.rsa.generateKeyPair(1024);
certServer = pki.createCertificate();
certServer.publicKey = keysServer.publicKey;
certServer.serialNumber = this.randomSerialNumber();
certServer.validity.notBefore = new Date;
certServer.validity.notAfter = new Date;
certServer.validity.notAfter.setFullYear(certServer.validity.notBefore.getFullYear() + 2);
attrsServer = _.clone(ServerAttrs);
attrsServer.unshift({
name: "commonName",
value: mainHost
});
certServer.setSubject(attrsServer);
certServer.setIssuer(this.CAcert.issuer.attributes);
certServer.setExtensions(ServerExtensions.concat([
{
name: "subjectAltName",
altNames: hosts.map(function(host) {
if (host.match(ipAddressRe)) {
return {
type: 7,
ip: host
};
} else {
return {
type: 2,
value: host
};
}
})
}
]));
certServer.sign(this.CAkeys.privateKey, Forge.md.sha256.create());
certPem = pki.certificateToPem(certServer);
keyPrivatePem = pki.privateKeyToPem(keysServer.privateKey);
keyPublicPem = pki.publicKeyToPem(keysServer.publicKey);
dest = mainHost.replace(asterisksRe, "_");
return Promise.all([fs.writeFileAsync(path.join(this.certsFolder, dest + ".pem"), certPem), fs.writeFileAsync(path.join(this.keysFolder, dest + ".key"), keyPrivatePem), fs.writeFileAsync(path.join(this.keysFolder, dest + ".public.key"), keyPublicPem)])["return"]([certPem, keyPrivatePem]);
};
CA.prototype.getCertificateKeysForHostname = function(hostname) {
var dest;
dest = hostname.replace(asterisksRe, "_");
return Promise.all([fs.readFileAsync(path.join(this.certsFolder, dest + ".pem")), fs.readFileAsync(path.join(this.keysFolder, dest + ".key"))]);
};
CA.prototype.getCACertPath = function() {
return path.join(this.certsFolder, "ca.pem");
};
CA.create = function(caFolder) {
var ca;
ca = new CA;
ca.baseCAFolder = caFolder;
ca.certsFolder = path.join(ca.baseCAFolder, "certs");
ca.keysFolder = path.join(ca.baseCAFolder, "keys");
return Promise.all([fs.ensureDirAsync(ca.baseCAFolder), fs.ensureDirAsync(ca.certsFolder), fs.ensureDirAsync(ca.keysFolder)]).then(function() {
return fs.statAsync(path.join(ca.certsFolder, "ca.pem")).bind(ca).then(ca.loadCA)["catch"](ca.generateCA);
})["return"](ca);
};
return CA;
})();
module.exports = CA;
}).call(this);
|
import React from 'react'
import { mount } from 'enzyme'
import Avatar from '..'
import mountTest from '../../../../tests/shared/mountTest'
describe('Avatar Render', () => {
mountTest(Avatar)
let originOffsetWidth
beforeAll(() => {
// Mock offsetHeight
originOffsetWidth = Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'offsetWidth').get
Object.defineProperty(HTMLElement.prototype, 'offsetWidth', {
get() {
if (this.className === 'ant-avatar-string') {
return 100
}
return 80
},
})
})
afterAll(() => {
// Restore Mock offsetHeight
Object.defineProperty(HTMLElement.prototype, 'offsetWidth', {
get: originOffsetWidth,
})
})
it('Render long string correctly', () => {
const wrapper = mount(<Avatar>TestString</Avatar>)
const children = wrapper.find('.ant-avatar-string')
expect(children.length).toBe(1)
})
it('should render fallback string correctly', () => {
const div = global.document.createElement('div')
global.document.body.appendChild(div)
const wrapper = mount(<Avatar src="http://error.url">Fallback</Avatar>, { attachTo: div })
wrapper.instance().setScale = jest.fn(() => {
if (wrapper.state().scale === 0.5) {
return
}
wrapper.instance().setState({ scale: 0.5 })
})
wrapper.find('img').simulate('error')
const children = wrapper.find('.ant-avatar-string')
expect(children.length).toBe(1)
expect(children.text()).toBe('Fallback')
expect(wrapper.instance().setScale).toHaveBeenCalled()
expect(div.querySelector('.ant-avatar-string').style.transform).toContain('scale(0.5)')
wrapper.detach()
global.document.body.removeChild(div)
})
it('should handle onError correctly', () => {
const LOAD_FAILURE_SRC = 'http://error.url'
const LOAD_SUCCESS_SRC = 'https://img.ljcdn.com/beike/ked/1617095504422.png'
const div = global.document.createElement('div')
global.document.body.appendChild(div)
class Foo extends React.Component {
state = {
src: LOAD_FAILURE_SRC,
}
handleImgError = () => {
this.setState({
src: LOAD_SUCCESS_SRC,
})
return false
}
render() {
const { src } = this.state
return <Avatar src={src} onError={this.handleImgError} />
}
}
const wrapper = mount(<Foo />, { attachTo: div })
// mock img load Error, since jsdom do not load resource by default
// https://github.com/jsdom/jsdom/issues/1816
wrapper.find('img').simulate('error')
expect(wrapper.find(Avatar).instance().state.isImgExist).toBe(true)
expect(div.querySelector('img').getAttribute('src')).toBe(LOAD_SUCCESS_SRC)
wrapper.detach()
global.document.body.removeChild(div)
})
it('should show image on success after a failure state', () => {
const LOAD_FAILURE_SRC = 'http://error.url'
const LOAD_SUCCESS_SRC = 'https://img.ljcdn.com/beike/ked/1617095504422.png'
const div = global.document.createElement('div')
global.document.body.appendChild(div)
// simulate error src url
const wrapper = mount(<Avatar src={LOAD_FAILURE_SRC}>Fallback</Avatar>, { attachTo: div })
wrapper.find('img').simulate('error')
expect(wrapper.find(Avatar).instance().state.isImgExist).toBe(false)
expect(wrapper.find('.ant-avatar-string').length).toBe(1)
// simulate successful src url
wrapper.setProps({ src: LOAD_SUCCESS_SRC })
wrapper.update()
expect(wrapper.find(Avatar).instance().state.isImgExist).toBe(true)
expect(wrapper.find('.ant-avatar-image').length).toBe(1)
// cleanup
wrapper.detach()
global.document.body.removeChild(div)
})
it('should calculate scale of avatar children correctly', () => {
const wrapper = mount(<Avatar>Avatar</Avatar>)
expect(wrapper.state().scale).toBe(0.72)
Object.defineProperty(HTMLElement.prototype, 'offsetWidth', {
get() {
if (this.className === 'ant-avatar-string') {
return 100
}
return 40
},
})
wrapper.setProps({ children: 'xx' })
expect(wrapper.state().scale).toBe(0.32)
})
})
|
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{
/***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/App/pages/contact.vue?vue&type=script&lang=js&":
/*!*****************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/App/pages/contact.vue?vue&type=script&lang=js& ***!
\*****************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["default"] = ({
name: 'contact'
});
/***/ }),
/***/ "./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/App/pages/contact.vue?vue&type=style&index=0&id=10e06f39&scoped=true&lang=css&":
/*!************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader??ref--6-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-2!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/App/pages/contact.vue?vue&type=style&index=0&id=10e06f39&scoped=true&lang=css& ***!
\************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(/*! ../../../../node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(false);
// imports
// module
exports.push([module.i, "\n*[data-v-10e06f39]{\n padding: 0px;\n margin: 0px;\n font-family: 'Open Sans', sans-serif;\n}\n#contactInfo[data-v-10e06f39]{\n height: 504px;\n margin-top: 10px;\n padding-top: 10px;\n width: 95%;\n}\nform[data-v-10e06f39]{\n margin-top: 30px;\n}\ninput[data-v-10e06f39]{\n width: 95%;\n height: 39px;\n left: 773px;\n top: 332px;\n border-radius: 0px;\n background: #FFFFFF;\n border: 1px solid #000000;\n box-sizing: border-box;\n border: none;\n border-top: solid 1px black;\n border-left: solid 1px black;\n border-right: solid 1px black;\n}\ntextarea[data-v-10e06f39]{\n width: 95%;\n height: 125px;\n left: 773px;\n top: 408px;\n background: #FFFFFF;\n resize: none;\n border: 1px solid #000000;\n box-sizing: border-box;\n}\nh3[data-v-10e06f39]{\n font-size: 18px;\n line-height: 25px;\n}\n.socialMediaLink > a > img[data-v-10e06f39]{\n height: 27px;\n width: 27px;\n}\n#socialMediaLinkHolder[data-v-10e06f39]{\n min-width: 55px;\n max-width: 55px;\n width: auto;\n padding-top: 10px;\n position: relative;\n top: 10px;\n}\nh4[data-v-10e06f39]{\n font-family: 'Open Sans', sans-serif;\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n line-height: 19px;\n color: #000000;\n}\n#facebookLogo[data-v-10e06f39]{\n height: 21px;\n width: 21px;\n}\n@media screen and (max-width: 1140px){\n#Contacts[data-v-10e06f39]{\n height: 300px;\n}\ninput[data-v-10e06f39]{\n width: 60%;\n}\n}\n@media screen and (max-width: 575px){\n#contentArea[data-v-10e06f39]{\n padding-bottom: 10px;\n}\n#socialMediaLinkHolder[data-v-10e06f39]{\n width: 100%\n}\n}\n\n\n", ""]);
// exports
/***/ }),
/***/ "./node_modules/style-loader/index.js!./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/App/pages/contact.vue?vue&type=style&index=0&id=10e06f39&scoped=true&lang=css&":
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/style-loader!./node_modules/css-loader??ref--6-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-2!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/App/pages/contact.vue?vue&type=style&index=0&id=10e06f39&scoped=true&lang=css& ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(/*! !../../../../node_modules/css-loader??ref--6-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src??ref--6-2!../../../../node_modules/vue-loader/lib??vue-loader-options!./contact.vue?vue&type=style&index=0&id=10e06f39&scoped=true&lang=css& */ "./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/App/pages/contact.vue?vue&type=style&index=0&id=10e06f39&scoped=true&lang=css&");
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(/*! ../../../../node_modules/style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/App/pages/contact.vue?vue&type=template&id=10e06f39&scoped=true&":
/*!*********************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/App/pages/contact.vue?vue&type=template&id=10e06f39&scoped=true& ***!
\*********************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _vm._m(0)
}
var staticRenderFns = [
function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c("div", { staticClass: "row", attrs: { id: "contentArea" } }, [
_c("div", { staticClass: "col-xl-12", attrs: { id: "Contacts" } }, [
_c("div", { attrs: { id: "contactInfo" } }, [
_c("p", [
_vm._v("Located in Ljubljana, Slovenia. Available globally.")
]),
_vm._v(" "),
_c("br"),
_vm._v(" "),
_c("h2", [_vm._v("Phone")]),
_vm._v(" "),
_c("p", [_vm._v(" 00386 four zero 874 144")]),
_vm._v(" "),
_c("br"),
_vm._v(" "),
_c("h2", [_vm._v("Email")]),
_vm._v(" "),
_c("p", [_vm._v("nik.lavric@gmail.com")]),
_vm._v(" "),
_c(
"div",
{ staticClass: "row", attrs: { id: "socialMediaLinkHolder" } },
[
_c("div", { staticClass: "col-6 socialMediaLink" }, [
_c(
"a",
{ attrs: { href: "https://www.instagram.com/niklavric/" } },
[_c("img", { attrs: { src: "/storage/Instagram.png" } })]
)
]),
_vm._v(" "),
_c("div", { staticClass: "col-6 socialMediaLink" }, [
_c(
"a",
{ attrs: { href: "https://www.facebook.com/niklavric" } },
[
_c("img", {
attrs: {
src: "/storage/Facebook_Logo.png",
id: "facebookLogo"
}
})
]
)
])
]
)
])
])
])
}
]
render._withStripped = true
/***/ }),
/***/ "./resources/js/App/pages/contact.vue":
/*!********************************************!*\
!*** ./resources/js/App/pages/contact.vue ***!
\********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _contact_vue_vue_type_template_id_10e06f39_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./contact.vue?vue&type=template&id=10e06f39&scoped=true& */ "./resources/js/App/pages/contact.vue?vue&type=template&id=10e06f39&scoped=true&");
/* harmony import */ var _contact_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./contact.vue?vue&type=script&lang=js& */ "./resources/js/App/pages/contact.vue?vue&type=script&lang=js&");
/* empty/unused harmony star reexport *//* harmony import */ var _contact_vue_vue_type_style_index_0_id_10e06f39_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./contact.vue?vue&type=style&index=0&id=10e06f39&scoped=true&lang=css& */ "./resources/js/App/pages/contact.vue?vue&type=style&index=0&id=10e06f39&scoped=true&lang=css&");
/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
/* normalize component */
var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
_contact_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
_contact_vue_vue_type_template_id_10e06f39_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"],
_contact_vue_vue_type_template_id_10e06f39_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
false,
null,
"10e06f39",
null
)
/* hot reload */
if (false) { var api; }
component.options.__file = "resources/js/App/pages/contact.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);
/***/ }),
/***/ "./resources/js/App/pages/contact.vue?vue&type=script&lang=js&":
/*!*********************************************************************!*\
!*** ./resources/js/App/pages/contact.vue?vue&type=script&lang=js& ***!
\*********************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contact_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib??ref--4-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./contact.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/App/pages/contact.vue?vue&type=script&lang=js&");
/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contact_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]);
/***/ }),
/***/ "./resources/js/App/pages/contact.vue?vue&type=style&index=0&id=10e06f39&scoped=true&lang=css&":
/*!*****************************************************************************************************!*\
!*** ./resources/js/App/pages/contact.vue?vue&type=style&index=0&id=10e06f39&scoped=true&lang=css& ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_style_loader_index_js_node_modules_css_loader_index_js_ref_6_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_2_node_modules_vue_loader_lib_index_js_vue_loader_options_contact_vue_vue_type_style_index_0_id_10e06f39_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/style-loader!../../../../node_modules/css-loader??ref--6-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src??ref--6-2!../../../../node_modules/vue-loader/lib??vue-loader-options!./contact.vue?vue&type=style&index=0&id=10e06f39&scoped=true&lang=css& */ "./node_modules/style-loader/index.js!./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/App/pages/contact.vue?vue&type=style&index=0&id=10e06f39&scoped=true&lang=css&");
/* harmony import */ var _node_modules_style_loader_index_js_node_modules_css_loader_index_js_ref_6_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_2_node_modules_vue_loader_lib_index_js_vue_loader_options_contact_vue_vue_type_style_index_0_id_10e06f39_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_index_js_node_modules_css_loader_index_js_ref_6_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_2_node_modules_vue_loader_lib_index_js_vue_loader_options_contact_vue_vue_type_style_index_0_id_10e06f39_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_style_loader_index_js_node_modules_css_loader_index_js_ref_6_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_2_node_modules_vue_loader_lib_index_js_vue_loader_options_contact_vue_vue_type_style_index_0_id_10e06f39_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_style_loader_index_js_node_modules_css_loader_index_js_ref_6_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_2_node_modules_vue_loader_lib_index_js_vue_loader_options_contact_vue_vue_type_style_index_0_id_10e06f39_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony default export */ __webpack_exports__["default"] = (_node_modules_style_loader_index_js_node_modules_css_loader_index_js_ref_6_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_2_node_modules_vue_loader_lib_index_js_vue_loader_options_contact_vue_vue_type_style_index_0_id_10e06f39_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
/***/ }),
/***/ "./resources/js/App/pages/contact.vue?vue&type=template&id=10e06f39&scoped=true&":
/*!***************************************************************************************!*\
!*** ./resources/js/App/pages/contact.vue?vue&type=template&id=10e06f39&scoped=true& ***!
\***************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_contact_vue_vue_type_template_id_10e06f39_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/vue-loader/lib??vue-loader-options!./contact.vue?vue&type=template&id=10e06f39&scoped=true& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/App/pages/contact.vue?vue&type=template&id=10e06f39&scoped=true&");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_contact_vue_vue_type_template_id_10e06f39_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_contact_vue_vue_type_template_id_10e06f39_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
/***/ })
}]);
|
function Dataset (options) {
this.name = options.name;
this.rs = {};
return this;
}
Dataset.prototype.loadMeta = function () {
// includes details of available recordsets
var dataset = this;
d3.json(dataset.name+'/meta.json',function(error,json){
if (error) return console.warn(error);
dataset.meta = json;
dataset.plots = {};
//dataset.prepareFilters();
var elements = [];
if (json.hasOwnProperty('mainplot')){
if (json.mainplot.hasOwnProperty('x')){
dataset.loadRecordSet('x',json.mainplot.x.datatype);
elements.push('x');
}
if (json.mainplot.hasOwnProperty('y')){
dataset.loadRecordSet('y',json.mainplot.y.datatype);
elements.push('y');
}
if (json.mainplot.hasOwnProperty('series')){
dataset.loadRecordSet('series',json.mainplot.series.datatype);
elements.push('series');
}
dataset.plots['mainplot'] = json.mainplot
}
dataset.elements = elements;
dataset.preparePlot("mainplot");
})
return this;
}
Dataset.prototype.hexbin = function (plot) {
console.time('hexbin')
var dataset = this;
var color = d3.scale.log()
.domain([1, 100000])
.range(["#eeeeee", "steelblue"])
.interpolate(d3.interpolateLab);
var hexbin = d3.hexbin()
.size([500, 500])
.radius(20);
var svg = d3.select("body").append("svg")
.attr("width", 500)
.attr("height", 500);
var hexagon = svg.append("g")
.attr("class", "hexagons")
.selectAll("path")
.data(hexbin(plot.points))
.enter().append("path")
.attr("d", hexbin.hexagon(20))
.attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; })
.style("fill", function(d) { return color(d.length); });
console.timeEnd('hexbin')
return this;
}
Dataset.prototype.preparePlot = function (plotname) {
var dataset = this;
check(function(){
console.time('generate')
var plot = dataset.plots[plotname];
plot.x.data = dataset.rs.x.active;
plot.y.data = dataset.rs.y.active;
var randomX = d3.random.normal(d3.mean(dataset.rs.x.active), d3.deviation(dataset.rs.x.active)),
randomY = d3.random.normal(d3.mean(dataset.rs.y.active), d3.deviation(dataset.rs.y.active))
plot.x.data = d3.range(500000).map(function() { return Math.abs(randomX()); });
plot.y.data = d3.range(500000).map(function() { return Math.abs(randomY()); });
console.timeEnd('generate')
console.time('prepare')
plot.series.data = dataset.rs.series.active;
var xScale = plot.x.scale == 'log10' ? d3.scale.log() : plot.x.scale == 'sqrt' ? d3.scale.sqrt() : d3.scale.linear()
xScale.domain(plot.x.bounds).range([0,500]);
var yScale = plot.y.scale == 'log10' ? d3.scale.log() : plot.y.scale == 'sqrt' ? d3.scale.sqrt() : d3.scale.linear()
yScale.domain(plot.y.bounds).range([0,500]);
plot.points = plot.x.data.map(function(d,i){return [xScale(d),yScale(plot.y.data[i])]});
//plot.x.scaledData = plot.x.data.map(function(d){return xScale(d)});
//plot.y.scaledData = plot.y.data.map(function(d){return yScale(d)});
//plot.points = [];
//plot.x.scaledData.forEach(function (x,i) {
// plot.points.push([x,plot.y.scaledData[i]])
//})
console.timeEnd('prepare')
if (dataset.plots[plotname].type == 'hexbin'){
dataset.hexbin(plot);
}
});
function check(callback){
var ready = 1;
dataset.elements.forEach(function(el){
if (!dataset.rs.hasOwnProperty(el)){
ready = 0;
}
})
if (ready > 0){
setTimeout(callback.bind(null, null), 10);
}
else {
setTimeout(check.bind(null, callback), 10);
}
}
return this;
}
Dataset.prototype.loadRecordSet = function (id,arr) {
// includes details of available recordsets
var dataset = this;
var path = arr.join('/')
d3.json(dataset.name+'/'+path+'.json',function(error,json){
if (error) return console.warn(error);
dataset.rs[id] = new Recordset(id,dataset.meta.datatypes[arr[arr.length-1]],json)
})
return this;
}
/*
Dataset.prototype.addDatatypes = function () {
// includes details of available recordsets
var dataset = this;
Object.keys(dataset.meta.datatypes).forEach(function(datatype){
dataset.dt[datatype] = new Datatype(dataset.meta.datatypes[datatype])
dataset.dt[datatype].bindFunctions();
})
return this;
}
Dataset.prototype.loadProperties = function () {
// includes details of available recordsets
var dataset = this;
d3.json(dataset.name+'/properties.json',function(error,json){
if (error) return console.warn(error);
dataset.properties = json;
dataset.setProperties();
})
return this;
}
Dataset.prototype.setProperties = function () {
// includes details of available recordsets
var dataset = this;
if (dataset.properties){
dataset.datatypes = {};
Object.keys(dataset.properties).forEach(function(property){
if (dataset.properties[property].hasOwnProperty("isa")){
}
else {
dataset.datatypes[property] = new Datatype(dataset.properties[property])
console.log(dataset.datatypes[property].min())
}
})
}
else {
dataset.loadProperties();
}
return this;
}
*/
|
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2013 Matthew Christopher Kastor-Inare III, Atropa Inc. Intl
* All rights reserved.
*
* Contributed to Ajax.org under the BSD license.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Ajax.org B.V. nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* 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 AJAX.ORG B.V. 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.
*
* ***** END LICENSE BLOCK ***** */
define('ace/ext/settings_menu', ['require', 'exports', 'module' , 'ace/ext/menu_tools/generate_settings_menu', 'ace/ext/menu_tools/overlay_page', 'ace/editor'], function(require, exports, module) {
var generateSettingsMenu = require('./menu_tools/generate_settings_menu').generateSettingsMenu;
var overlayPage = require('./menu_tools/overlay_page').overlayPage;
function showSettingsMenu(editor) {
var sm = document.getElementById('ace_settingsmenu');
if (!sm)
overlayPage(editor, generateSettingsMenu(editor), '0', '0', '0');
}
module.exports.init = function(editor) {
var Editor = require("ace/editor").Editor;
Editor.prototype.showSettingsMenu = function() {
showSettingsMenu(this);
};
};
});
define('ace/ext/menu_tools/generate_settings_menu', ['require', 'exports', 'module' , 'ace/ext/menu_tools/element_generator', 'ace/ext/menu_tools/add_editor_menu_options', 'ace/ext/menu_tools/get_set_functions'], function(require, exports, module) {
var egen = require('./element_generator');
var addEditorMenuOptions = require('./add_editor_menu_options').addEditorMenuOptions;
var getSetFunctions = require('./get_set_functions').getSetFunctions;
module.exports.generateSettingsMenu = function generateSettingsMenu (editor) {
var elements = [];
function cleanupElementsList() {
elements.sort(function(a, b) {
var x = a.getAttribute('contains');
var y = b.getAttribute('contains');
return x.localeCompare(y);
});
}
function wrapElements() {
var topmenu = document.createElement('div');
topmenu.setAttribute('id', 'ace_settingsmenu');
elements.forEach(function(element) {
topmenu.appendChild(element);
});
return topmenu;
}
function createNewEntry(obj, clss, item, val) {
var el;
var div = document.createElement('div');
div.setAttribute('contains', item);
div.setAttribute('class', 'ace_optionsMenuEntry');
div.setAttribute('style', 'clear: both;');
div.appendChild(egen.createLabel(
item.replace(/^set/, '').replace(/([A-Z])/g, ' $1').trim(),
item
));
if (Array.isArray(val)) {
el = egen.createSelection(item, val, clss);
el.addEventListener('change', function(e) {
try{
editor.menuOptions[e.target.id].forEach(function(x) {
if(x.textContent !== e.target.textContent) {
delete x.selected;
}
});
obj[e.target.id](e.target.value);
} catch (err) {
throw new Error(err);
}
});
} else if(typeof val === 'boolean') {
el = egen.createCheckbox(item, val, clss);
el.addEventListener('change', function(e) {
try{
obj[e.target.id](!!e.target.checked);
} catch (err) {
throw new Error(err);
}
});
} else {
el = egen.createInput(item, val, clss);
el.addEventListener('change', function(e) {
try{
if(e.target.value === 'true') {
obj[e.target.id](true);
} else if(e.target.value === 'false') {
obj[e.target.id](false);
} else {
obj[e.target.id](e.target.value);
}
} catch (err) {
throw new Error(err);
}
});
}
el.style.cssText = 'float:right;';
div.appendChild(el);
return div;
}
function makeDropdown(item, esr, clss, fn) {
var val = editor.menuOptions[item];
var currentVal = esr[fn]();
if (typeof currentVal == 'object')
currentVal = currentVal.$id;
val.forEach(function(valuex) {
if (valuex.value === currentVal)
valuex.selected = 'selected';
});
return createNewEntry(esr, clss, item, val);
}
function handleSet(setObj) {
var item = setObj.functionName;
var esr = setObj.parentObj;
var clss = setObj.parentName;
var val;
var fn = item.replace(/^set/, 'get');
if(editor.menuOptions[item] !== undefined) {
elements.push(makeDropdown(item, esr, clss, fn));
} else if(typeof esr[fn] === 'function') {
try {
val = esr[fn]();
if(typeof val === 'object') {
val = val.$id;
}
elements.push(
createNewEntry(esr, clss, item, val)
);
} catch (e) {
}
}
}
addEditorMenuOptions(editor);
getSetFunctions(editor).forEach(function(setObj) {
handleSet(setObj);
});
cleanupElementsList();
return wrapElements();
};
});
define('ace/ext/menu_tools/element_generator', ['require', 'exports', 'module' ], function(require, exports, module) {
module.exports.createOption = function createOption (obj) {
var attribute;
var el = document.createElement('option');
for(attribute in obj) {
if(obj.hasOwnProperty(attribute)) {
if(attribute === 'selected') {
el.setAttribute(attribute, obj[attribute]);
} else {
el[attribute] = obj[attribute];
}
}
}
return el;
};
module.exports.createCheckbox = function createCheckbox (id, checked, clss) {
var el = document.createElement('input');
el.setAttribute('type', 'checkbox');
el.setAttribute('id', id);
el.setAttribute('name', id);
el.setAttribute('value', checked);
el.setAttribute('class', clss);
if(checked) {
el.setAttribute('checked', 'checked');
}
return el;
};
module.exports.createInput = function createInput (id, value, clss) {
var el = document.createElement('input');
el.setAttribute('type', 'text');
el.setAttribute('id', id);
el.setAttribute('name', id);
el.setAttribute('value', value);
el.setAttribute('class', clss);
return el;
};
module.exports.createLabel = function createLabel (text, labelFor) {
var el = document.createElement('label');
el.setAttribute('for', labelFor);
el.textContent = text;
return el;
};
module.exports.createSelection = function createSelection (id, values, clss) {
var el = document.createElement('select');
el.setAttribute('id', id);
el.setAttribute('name', id);
el.setAttribute('class', clss);
values.forEach(function(item) {
el.appendChild(module.exports.createOption(item));
});
return el;
};
});
define('ace/ext/menu_tools/add_editor_menu_options', ['require', 'exports', 'module' , 'ace/ext/modelist', 'ace/ext/themelist'], function(require, exports, module) {
module.exports.addEditorMenuOptions = function addEditorMenuOptions (editor) {
var modelist = require('../modelist');
var themelist = require('../themelist');
editor.menuOptions = {
"setNewLineMode" : [{
"textContent" : "unix",
"value" : "unix"
}, {
"textContent" : "windows",
"value" : "windows"
}, {
"textContent" : "auto",
"value" : "auto"
}],
"setTheme" : [],
"setMode" : [],
"setKeyboardHandler": [{
"textContent" : "ace",
"value" : ""
}, {
"textContent" : "vim",
"value" : "ace/keyboard/vim"
}, {
"textContent" : "emacs",
"value" : "ace/keyboard/emacs"
}]
};
editor.menuOptions.setTheme = themelist.themes.map(function(theme) {
return {
'textContent' : theme.desc,
'value' : theme.theme
};
});
editor.menuOptions.setMode = modelist.modes.map(function(mode) {
return {
'textContent' : mode.name,
'value' : mode.mode
};
});
};
});define('ace/ext/modelist', ['require', 'exports', 'module' ], function(require, exports, module) {
var modes = [];
function getModeForPath(path) {
var mode = modesByName.text;
var fileName = path.split(/[\/\\]/).pop();
for (var i = 0; i < modes.length; i++) {
if (modes[i].supportsFile(fileName)) {
mode = modes[i];
break;
}
}
return mode;
}
var Mode = function(name, caption, extensions) {
this.name = name;
this.caption = caption;
this.mode = "ace/mode/" + name;
this.extensions = extensions;
if (/\^/.test(extensions)) {
var re = extensions.replace(/\|(\^)?/g, function(a, b){
return "$|" + (b ? "^" : "^.*\\.");
}) + "$";
} else {
var re = "^.*\\.(" + extensions + ")$";
}
this.extRe = new RegExp(re, "gi");
};
Mode.prototype.supportsFile = function(filename) {
return filename.match(this.extRe);
};
var supportedModes = {
ABAP: ["abap"],
ADA: ["ada|adb"],
ActionScript:["as"],
AsciiDoc: ["asciidoc"],
Assembly_x86:["asm"],
AutoHotKey: ["ahk"],
BatchFile: ["bat|cmd"],
C9Search: ["c9search_results"],
C_Cpp: ["c|cc|cpp|cxx|h|hh|hpp"],
Clojure: ["clj"],
Cobol: ["^CBL|COB"],
coffee: ["^Cakefile|coffee|cf|cson"],
ColdFusion: ["cfm"],
CSharp: ["cs"],
CSS: ["css"],
Curly: ["curly"],
D: ["d|di"],
Dart: ["dart"],
Diff: ["diff|patch"],
Dot: ["dot"],
Erlang: ["erl|hrl"],
EJS: ["ejs"],
Forth: ["frt|fs|ldr"],
FTL: ["ftl"],
Glsl: ["glsl|frag|vert"],
golang: ["go"],
Groovy: ["groovy"],
HAML: ["haml"],
Haskell: ["hs"],
haXe: ["hx"],
HTML: ["htm|html|xhtml"],
HTML_Ruby: ["erb|rhtml|html.erb"],
Ini: ["Ini|conf"],
Jade: ["jade"],
Java: ["java"],
JavaScript: ["js"],
JSON: ["json"],
JSONiq: ["jq"],
JSP: ["jsp"],
JSX: ["jsx"],
Julia: ["jl"],
LaTeX: ["latex|tex|ltx|bib"],
LESS: ["less"],
Liquid: ["liquid"],
Lisp: ["lisp"],
LiveScript: ["ls"],
LogiQL: ["logic|lql"],
LSL: ["lsl"],
Lua: ["lua"],
LuaPage: ["lp"],
Lucene: ["lucene"],
Makefile: ["^GNUmakefile|^makefile|^Makefile|^OCamlMakefile|make"],
MATLAB: ["matlab"],
Markdown: ["md|markdown"],
MySQL: ["mysql"],
MUSHCode: ["mc|mush"],
ObjectiveC: ["m|mm"],
OCaml: ["ml|mli"],
Pascal: ["pas|p"],
Perl: ["pl|pm"],
pgSQL: ["pgsql"],
PHP: ["php|phtml"],
Powershell: ["ps1"],
Prolog: ["plg|prolog"],
Properties: ["properties"],
Python: ["py"],
R: ["r"],
RDoc: ["Rd"],
RHTML: ["Rhtml"],
Ruby: ["ru|gemspec|rake|rb"],
Rust: ["rs"],
SASS: ["sass"],
SCAD: ["scad"],
Scala: ["scala"],
Scheme: ["scm|rkt"],
SCSS: ["scss"],
SH: ["sh|bash"],
snippets: ["snippets"],
SQL: ["sql"],
Stylus: ["styl|stylus"],
SVG: ["svg"],
Tcl: ["tcl"],
Tex: ["tex"],
Text: ["txt"],
Textile: ["textile"],
Toml: ["toml"],
Twig: ["twig"],
Typescript: ["typescript|ts|str"],
VBScript: ["vbs"],
Velocity: ["vm"],
XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"],
XQuery: ["xq"],
YAML: ["yaml"]
};
var nameOverrides = {
ObjectiveC: "Objective-C",
CSharp: "C#",
golang: "Go",
C_Cpp: "C/C++",
coffee: "CoffeeScript",
HTML_Ruby: "HTML (Ruby)",
FTL: "FreeMarker"
};
var modesByName = {};
for (var name in supportedModes) {
var data = supportedModes[name];
var displayName = nameOverrides[name] || name;
var filename = name.toLowerCase();
var mode = new Mode(filename, displayName, data[0]);
modesByName[filename] = mode;
modes.push(mode);
}
module.exports = {
getModeForPath: getModeForPath,
modes: modes,
modesByName: modesByName
};
});
define('ace/ext/themelist', ['require', 'exports', 'module' , 'ace/ext/themelist_utils/themes'], function(require, exports, module) {
module.exports.themes = require('ace/ext/themelist_utils/themes').themes;
module.exports.ThemeDescription = function(name) {
this.name = name;
this.desc = name.split('_'
).map(
function(namePart) {
return namePart[0].toUpperCase() + namePart.slice(1);
}
).join(' ');
this.theme = "ace/theme/" + name;
};
module.exports.themesByName = {};
module.exports.themes = module.exports.themes.map(function(name) {
module.exports.themesByName[name] = new module.exports.ThemeDescription(name);
return module.exports.themesByName[name];
});
});
define('ace/ext/themelist_utils/themes', ['require', 'exports', 'module' ], function(require, exports, module) {
module.exports.themes = [
"ambiance",
"chaos",
"chrome",
"clouds",
"clouds_midnight",
"cobalt",
"crimson_editor",
"dawn",
"dreamweaver",
"eclipse",
"github",
"idle_fingers",
"kr_theme",
"merbivore",
"merbivore_soft",
"monokai",
"mono_industrial",
"pastel_on_dark",
"solarized_dark",
"solarized_light",
"terminal",
"textmate",
"tomorrow",
"tomorrow_night",
"tomorrow_night_blue",
"tomorrow_night_bright",
"tomorrow_night_eighties",
"twilight",
"vibrant_ink",
"xcode"
];
});
define('ace/ext/menu_tools/get_set_functions', ['require', 'exports', 'module' ], function(require, exports, module) {
module.exports.getSetFunctions = function getSetFunctions (editor) {
var out = [];
var my = {
'editor' : editor,
'session' : editor.session,
'renderer' : editor.renderer
};
var opts = [];
var skip = [
'setOption',
'setUndoManager',
'setDocument',
'setValue',
'setBreakpoints',
'setScrollTop',
'setScrollLeft',
'setSelectionStyle',
'setWrapLimitRange'
];
['renderer', 'session', 'editor'].forEach(function(esra) {
var esr = my[esra];
var clss = esra;
for(var fn in esr) {
if(skip.indexOf(fn) === -1) {
if(/^set/.test(fn) && opts.indexOf(fn) === -1) {
opts.push(fn);
out.push({
'functionName' : fn,
'parentObj' : esr,
'parentName' : clss
});
}
}
}
});
return out;
};
});
define('ace/ext/menu_tools/overlay_page', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
var dom = require("../../lib/dom");
var cssText = "#ace_settingsmenu, #kbshortcutmenu {\
background-color: #F7F7F7;\
color: black;\
box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\
padding: 1em 0.5em 2em 1em;\
overflow: auto;\
position: absolute;\
margin: 0;\
bottom: 0;\
right: 0;\
top: 0;\
z-index: 9991;\
cursor: default;\
}\
.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\
box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\
background-color: rgba(255, 255, 255, 0.6);\
color: black;\
}\
.ace_optionsMenuEntry:hover {\
background-color: rgba(100, 100, 100, 0.1);\
-webkit-transition: all 0.5s;\
transition: all 0.3s\
}\
.ace_closeButton {\
background: rgba(245, 146, 146, 0.5);\
border: 1px solid #F48A8A;\
border-radius: 50%;\
padding: 7px;\
position: absolute;\
right: -8px;\
top: -8px;\
z-index: 1000;\
}\
.ace_closeButton{\
background: rgba(245, 146, 146, 0.9);\
}\
.ace_optionsMenuKey {\
color: darkslateblue;\
font-weight: bold;\
}\
.ace_optionsMenuCommand {\
color: darkcyan;\
font-weight: normal;\
}";
dom.importCssString(cssText);
module.exports.overlayPage = function overlayPage(editor, contentElement, top, right, bottom, left) {
top = top ? 'top: ' + top + ';' : '';
bottom = bottom ? 'bottom: ' + bottom + ';' : '';
right = right ? 'right: ' + right + ';' : '';
left = left ? 'left: ' + left + ';' : '';
var closer = document.createElement('div');
var contentContainer = document.createElement('div');
function documentEscListener(e) {
if (e.keyCode === 27) {
closer.click();
}
}
closer.style.cssText = 'margin: 0; padding: 0; ' +
'position: fixed; top:0; bottom:0; left:0; right:0;' +
'z-index: 9990; ' +
'background-color: rgba(0, 0, 0, 0.3);';
closer.addEventListener('click', function() {
document.removeEventListener('keydown', documentEscListener);
closer.parentNode.removeChild(closer);
editor.focus();
closer = null;
});
document.addEventListener('keydown', documentEscListener);
contentContainer.style.cssText = top + right + bottom + left;
contentContainer.addEventListener('click', function(e) {
e.stopPropagation();
});
var wrapper = dom.createElement("div");
wrapper.style.position = "relative";
var closeButton = dom.createElement("div");
closeButton.className = "ace_closeButton";
closeButton.addEventListener('click', function() {
closer.click();
});
wrapper.appendChild(closeButton);
contentContainer.appendChild(wrapper);
contentContainer.appendChild(contentElement);
closer.appendChild(contentContainer);
document.body.appendChild(closer);
editor.blur();
};
});
|
import isObservable from 'is-observable'
import {type ComponentStyleType} from '../types'
const isObject = value =>
typeof value === 'object' && value !== null && !Array.isArray(value)
const separateStyles = (styles: Object): {
dynamicStyle?: ComponentStyleType,
staticStyle?: ComponentStyleType
} => {
const result = {}
const keys = Object.keys(styles)
for (let i = 0; i < keys.length; i++) {
const key = keys[i]
const value = styles[key]
const itemStyles = Object.create(null)
if (typeof value === 'function' || isObservable(value)) itemStyles.dynamicStyle = value
else if (isObject(value)) Object.assign(itemStyles, separateStyles(value))
else itemStyles.staticStyle = value
for (const styleType in itemStyles) {
result[styleType] = result[styleType] || {}
result[styleType][key] = itemStyles[styleType]
}
}
return result
}
/**
* Extracts static and dynamic styles objects separately
*/
const getSeparatedStyles = (...initialStyles: ComponentStyleType[]): {
dynamicStyle?: ComponentStyleType | (props: Object) => ?ComponentStyleType,
staticStyle?: ComponentStyleType,
} => {
const styles = {}
const fns = []
for (let i = 0; i < initialStyles.length; i++) {
const style = initialStyles[i]
if (typeof style === 'function') {
fns.push(style)
}
else {
Object.assign(styles, style)
}
}
const result = separateStyles(styles)
if (fns.length) {
const {dynamicStyle = {}} = result
result.dynamicStyle = (props) => {
const fnObjects = []
const dynamicResult = {}
for (let i = 0; i < fns.length; i++) {
fnObjects.push(fns[i](props))
}
const keys = Object.keys(dynamicStyle)
for (let i = 0; i < keys.length; i++) {
dynamicResult[keys[i]] = dynamicStyle[keys[i]](props)
}
return Object.assign(dynamicResult, ...fnObjects)
}
}
return result
}
export default getSeparatedStyles
|
module.exports = {
siteMetadata: {
title: `Julian Garcia`,
description: `Julian Garcia. Monash University. Computer Science. Cooperation.`,
author: `@gatsbyjs`,
},
plugins: [
`gatsby-plugin-react-helmet`,
`gatsby-plugin-netlify-cms`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`,
},
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "fonts",
path: `${__dirname}/static/fonts/`
}
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `pagesMarkdown`,
path: `${__dirname}/pagesMarkdown`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `blogPages`,
path: `${__dirname}/blog`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `publications-pdf`,
path: `${__dirname}/static/assets/publications-pdf`,
},
},
{
resolve: `gatsby-plugin-typography`,
options: {
pathToConfigModule: `${__dirname}/src/utils/typography.js`,
},
},
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [],
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `gatsby-starter-default`,
short_name: `starter`,
start_url: `/`,
background_color: `red`,
theme_color: `#663399`,
display: `minimal-ui`,
icon: `src/images/download.png`, // This path is relative to the root of the site.
},
},
{
resolve: `gatsby-plugin-google-analytics`,
options: {
// replace "UA-XXXXXXXXX-X" with your own Tracking ID
trackingId: "UA-179113723-1",
head: false,
},
},
],
}
|
/*
*@lhgcore - JavaScript Library v1.0.0 - Date : 2009-7-14
*@Copyright lhgcore.js (c) 2009 By LiHuiGang Reserved
*/
(function(){var g=window.lhgcore=window.J=function(a,d){return g.ret.init(a,d)};g.ret=g.prototype={init:function(a,d){a=(a=='body')?document.body:(a=='doc')?document:a;if('string'==typeof(a)){if(a.indexOf('#')==0){var b=(d||document).getElementById(a.substr(1));if(b)return b;else return null}var b=(d||document).getElementById(a);if(b)return g(b);else return null}else{this[0]=a;this.length=1;return this}},html:function(t){if(t){this[0].innerHTML=t;return this}else return this[0].innerHTML},isnl:function(){var v=this[0].value;return(v==''||v.length==0)?true:false},val:function(v){if(v){this[0].value=v;return this}else return this[0].value},acls:function(c,p){this[0].className=p?this[0].className+' '+c:c;return this},rcls:function(){var a=g.ie?'className':'class';this[0].removeAttribute(a,0);return this},crte:function(e){return this[0].createElement(e)},apch:function(c,y){switch(y){case'pr':return this[0].insertBefore(c,this[0].firstChild);break;case'be':return this[0].parentNode.insertBefore(c,this[0]);break;case'af':return this[0].parentNode.insertBefore(c,this[0].nextSibling);break;default:return this[0].appendChild(c);break}},stcs:function(d,s){if(typeof(d)=='object'){for(var n in d)this[0].style[n]=d[n];return this}else{this[0].style[d]=s;return this}},gtcs:function(p){if(g.ie)return this[0].currentStyle[p];else return this[0].ownerDocument.defaultView.getComputedStyle(this[0],'').getPropertyValue(p)},gtag:function(n){return this[0].getElementsByTagName(n)},attr:function(k,v){if(typeof(k)=='object'){for(var n in k)this[0][n]=k[n];return this}if(v){this[0].setAttribute(k,v,0);return this}else{var a=this[0].attributes[k];if(a==null||!a.specified)return'';return this[0].getAttribute(k,2)}},ratt:function(n){var a=this[0].attributes[n];if(a==null||!a.specified)return this;this[0].removeAttribute(n,0);return this},aevt:function(n,f){if(g.ie)this[0].attachEvent('on'+n,f);else this[0].addEventListener(n,f,false);return this},revt:function(n,f){if(g.ie)this[0].detachEvent('on'+n,f);else this[0].removeEventListener(n,f,false);return this},alnk:function(c){if(g.ie)return this[0].createStyleSheet(c).owningElement;else{var e=this[0].createElement('link');e.rel='stylesheet';e.type='text/css';e.href=c;this[0].getElementsByTagName('head')[0].appendChild(e);return e}}};g.ret.init.prototype=g.ret;g.exend=g.ret.exend=function(){var a=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(a.constructor==Boolean){deep=a;a=arguments[1]||{};i=2}if(typeof a!='object'&&typeof a!='function')a={};if(length==i){a=this;--i}for(;i<length;i++)if((options=arguments[i])!=null)for(var b in options){var c=a[b],copy=options[b];if(a===copy)continue;if(deep&©&&typeof copy=='object'&&!copy.nodeType)a[b]=g.extend(deep,c||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)a[b]=copy}return a};g.ret.exend({stopac:function(o){if(g.ie){o=Math.round(o*100);this[0].style.filter=(o>100?'':'alpha(opacity='+o+')')}else this[0].style.opacity=o},addentex:function(n,l,p){if(g.ie){var o={};o.source=this[0];o.params=p||[];o.listen=function(a){return l.apply(o.source,[a].concat(o.params))};if(g.clean)g.clean.items(null,function(){o.source=null;o.params=null});this[0].attachEvent('on'+n,o.listen);this[0]=null;p=null}else this[0].addEventListener(n,function(e){l.apply(this[0],[e].concat(p||[]))},false);return this},click:function(f){this[0].onclick=f;return this},blur:function(f){this[0].onblur=f;return this},focus:function(f){if(f)this[0].onfocus=f;else this[0].focus();return this},msdown:function(f){this[0].onmousedown=f;return this},msmove:function(f){this[0].onmousemove=f;return this},msover:function(f){this[0].onmouseover=f;return this},msout:function(f){this[0].onmouseout=f;return this},msup:function(f){this[0].onmouseup=f;return this},submit:function(f){if(f)this[0].onsubmit=f;else this[0].onsubmit();return this},cmenu:function(f){this[0].oncontextmenu=f;return this},hover:function(r,t){this[0].onmouseover=r;this[0].onmouseout=t;return this}});g.exend({build:'1.0.0',author:'LiHuiGang',path:function(t){t=t||'lhgcore.js';var a,len,sc=g('doc').gtag('script');for(var i=0;i<sc.length;i++){a=sc[i].src.substr(0,g.inde(sc[i].src.toLowerCase(),t));len=a.lastIndexOf('/');if(len>0)a=a.substr(0,len+1);if(a)break}if(g.ie&&g.inde(a,'../')!=-1){var b=window.location.href;b=b.substr(0,b.lastIndexOf('/'));while(g.inde(a,'../')>=0){a=a.substr(3);b=b.substr(0,b.lastIndexOf('/'))}return b+'/'+a}else return a},idtd:function(d){return('CSS1Compat'==(d.compatMode||'CSS1Compat'))},rech:function(c){if(c)return c.parentNode.removeChild(c)},gtev:function(){if(g.ie)return window.event;var a=this.gtev.caller;while(a!=null){var b=a.arguments[0];if(b&&(b+'').indexOf('Event')>=0)return b;a=a.caller}return null},trim:function(t){return(t||'').replace(/^\s+|\s+$/g,'')},inde:function(t,s){return t.indexOf(s)},edoc:function(a){return a.ownerDocument||a.document},ewin:function(a){return this.dwin(this.edoc(a))},dwin:function(d){if(g.sa&&!d.parentWindow)this.fixw(window.top);return d.parentWindow||d.defaultView},fixw:function(w){if(w.document)w.document.parentWindow=w;for(var i=0;i<w.frames.length;i++)g.fixw(w.frames[i])},vsiz:function(a){if(g.ie){var b,doc=a.document.documentElement;if(doc&&doc.clientWidth)b=doc;else b=a.document.body;if(b)return{w:b.clientWidth,h:b.clientHeight};else return{w:0,h:0}}else return{w:a.innerWidth,h:a.innerHeight}},spos:function(w){if(g.ie){var a=w.document;oPos={x:a.documentElement.scrollLeft,y:a.documentElement.scrollTop};if(oPos.x>0||oPos.y>0)return oPos;return{x:a.body.scrollLeft,y:a.body.scrollTop}}else return{x:w.pageXOffset,y:w.pageYOffset}},dpos:function(w,n){var x=0,y=0,cn=n,pn=null,cw=g.ewin(cn);while(cn&&!(cw==w&&(cn==w.document.body||cn==w.document.documentElement))){x+=cn.offsetLeft-cn.scrollLeft;y+=cn.offsetTop-cn.scrollTop;if(g.op){var a=pn;while(a&&a!=cn){x-=a.scrollLeft;y-=a.scrollTop;a=a.parentNode}}pn=cn;if(cn.offsetParent)cn=cn.offsetParent;else{if(cw!=w){cn=cw.frameElement;pn=null;if(cn)cw=cn.contentWindow.parent}else cn=null}}if(g(w.document.body).gtcs('position')!='static'||(g.ie&&g.gtan(n)==null)){x+=w.document.body.offsetLeft;y+=w.document.body.offsetTop}return{'x':x,'y':y}},gtan:function(e){var a=e;while(a!=g.edoc(a).documentElement){if(g(a).gtcs('position')!='static')return a;a=a.parentNode}return null},canc:function(e){if(g.ie)return false;else{if(e)e.preventDefault()}},empty:function(t){return(t==''||t.length==0)?true:false},dismn:function(e){var a=e||window.event,el=a.srcElement||a.target,tn=el.tagName;if(!((tn=='INPUT'&&el.type=='text')||tn=='TEXTAREA')){if(g.ie)return false;else{if(e)e.preventDefault()}}},nosel:function(o){if(g.ie){o.unselectable='on';var e,i=0;while((e=o.all[i++])){switch(e.tagName.toLowerCase()){case'iframe':case'textarea':case'input':case'select':break;default:e.unselectable='on'}}}else{if(g.mz)o.style.MozUserSelect='none';else if(g.sa)o.style.KhtmlUserSelect='none';else o.style.userSelect='none'}},gtvod:function(){if(g.ie)return(g.i7?'':'javascript:\'\'');return'javascript:void(0)'}});var j=navigator.userAgent.toLowerCase();g.exend({ie:/msie/.test(j)&&!/opera/.test(j),i7:(j.match(/msie (\d+)/)||[])[1]>=7&&!/opera/.test(j),ch:/chrome/.test(j),op:/opera/.test(j),sa:/webkit/.test(j)&&!/chrome/.test(j),mz:/mozilla/.test(j)&&!/(compatible|webkit)/.test(j)});g.exend({cleanup:function(){if(window._lhgcleanobj)this.citem=window._lhgcleanobj.citem;else{this.citem=[];window._lhgcleanobj=this;J(window).addentex('unload',this.lhg_clean)}}});g.exend(g.cleanup.prototype,{items:function(a,b){this.citem.push([a,b])},lhg_clean:function(){if(!this._lhgcleanobj)return;var a=this._lhgcleanobj.citem;while(a.length>0){var b=a.pop();if(b)b[1].call(b[0])}this._lhgcleanobj=null;g=null;if(CollectGarbage)CollectGarbage()}});if(g.ie)g.clean=new g.cleanup();J.exend({panel:function(b,w){this._win=window;var a,doc,r_win=[this._win];if(b){while(this._win.parent&&this._win.parent!=this._win){try{if(this._win.parent.document.domain!=document.domain)break}catch(e){break}this._win=this._win.parent;r_win.push(this._win)}}if(w){for(var i=0;i<w.length;i++)r_win.push(w[i])}a=this._ifrm=J(this._win.document).crte('iframe');J(a).attr({src:'javascript:void(0)',frameBorder:0,scrolling:'no'}).stcs({display:'none',position:'absolute',zIndex:19700});J(this._win.document.body).apch(a);doc=this._doc=a.contentWindow.document;if(J.ie)g.clean.items(this,this.p_clean);var c='';if(J.sa)c='<base href="'+window.document.location+'">';doc.open();doc.write('<html><head>'+c+'<\/head><body style="margin:0px;padding:0px;"><\/body><\/html>');doc.close();for(var i=0;i<r_win.length;i++)J(r_win[i].document).addentex('click',this.hide,this);J(doc).aevt('contextmenu',J.dismn);this._main=J(doc.body).apch(doc.createElement('div'));this._main.style.cssFloat='left'}});J.exend(J.panel.prototype,{applnk:function(l){J(this._doc).alnk(l)},show:function(x,y,e,w,h){var a=this._main,iw,ih;J(this._ifrm).stcs('display','block');J(a).stcs({width:w?w+'px':'',height:h?h+'px':''});iw=a.offsetWidth;ih=a.offsetHeight;if(!w)this._ifrm.style.width='1px';if(!h)this._ifrm.style.height='1px';iw=a.offsetWidth||a.firstChild.offsetWidth;var b=e.nodeType==9?J.idtd(e)?e.documentElement:e.body:e;var c=J.dpos(this._win,b);x+=c.x;y+=c.y;var d=J.vsiz(this._win),sp=J.spos(this._win),vh=d.h+sp.y,vw=d.w+sp.x;if((x+iw)>vw)x-=x+iw-vw;if((y+ih)>vh)y-=y+ih-vh;J(this._ifrm).stcs({left:x+'px',top:y+'px',width:iw+'px',height:ih+'px'})},hide:function(e,a){J(a._ifrm).stcs('display','none')},p_clean:function(){this._main=null;this._doc=null;this._ifrm=null;this._win=null}});g.ajax=g.A={geth:function(){try{return new ActiveXObject('Msxml2.XMLHTTP')}catch(e){}try{return new XMLHttpRequest()}catch(e){}return null},send:function(u,m,p,f,x){m=m?m.toLocaleUpperCase():'GET';x=x?x:0;p=p?p+'&uuid='+new Date().getTime():null;var a=(typeof(f)=='function'),ret;var b=this.geth();b.open(m,u,a);if(a){b.onreadystatechange=function(){if(b.readyState==4){ret=(x==0)?b.responseText:b.responseXML;f(ret);delete(b);return}else return false}}if(m=='GET')b.send(null);else{b.setRequestHeader('content-type','application/x-www-form-urlencoded');if(p)b.send(p);else return false}if(!a){if(b.readyState==4&&b.status==200){ret=(x==0)?b.responseText:b.responseXML;delete(b);return ret}else return false}}}})();
|
/*!
* Copyright 2020, 2021 Visulate LLC. All Rights Reserved.
*
* 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.
*/
const express = require('express');
const router = express.Router();
const fs = require('fs');
const sseUtils = require('./sse-util');
const appConfig = require('../resources/http-config');
const fileUtils = require('./file-utils');
/**
* List projects
*/
router.get('/projects', async (req, res) => {
const projects = await fileUtils.listProjectDirectories();
res.json({ projects: projects });
});
/**
* Create a project directory and copy the default config file to it
*/
router.post('/', async (req, res) => {
const validName = /^\w+$/;
const formValues = req.body;
const project = formValues['project'];
if (! project) {
res.status(400).send('Null project name');
return;
}
if (! validName.test(project)) {
res.status(400).send('Project name must be alphanumeric');
return;
}
if (await fileUtils.fileExists(`${appConfig.projectDirectory}/${project}/config/ora2pg-conf.json.enc`)) {
res.status(409).send(`Project ${project} already exists`);
return;
}
await fileUtils.createProjectDirectory(project);
await fileUtils.seedProjectConfigFile(project);
res.status(201).send('Created');
});
/**
* Retrieve project details
*/
router.get('/project/:project', async (req, res) => {
const project = req.params.project;
try {
if (! await fileUtils.fileExists(`${appConfig.projectDirectory}/${project}`)) {
res.status(404).send('Not Found');
return;
}
const configJson = await fileUtils.getConfigObject(project);
const projectFiles = await fileUtils.listProjectFiles(project);
res.json({ config: configJson, files: projectFiles });
} catch (err) {
console.log(err);
res.status(400).send('Project directory is invalid');
}
});
/**
* Save/update the config json file
*/
router.post('/project/:project', async (req, res) => {
const project = req.params.project;
const configObject = req.body;
if (! fileUtils.validKeys(configObject)){
res.status(400).send('Invalid configuration object');
} else {
await fileUtils.saveConfigJson(project, configObject);
res.status(201).send('Created');
}
});
/**
* Delete project directory and all of its files
*/
router.delete('/project/:project', async (req, res) => {
const project = req.params.project;
if (! await fileUtils.fileExists(`${appConfig.projectDirectory}/${project}`)) {
res.status(404).send('Project not found');
return;
}
try {
await fs.promises.rmdir(`${appConfig.projectDirectory}/${project}`, { recursive: true });
res.status(204).send('Deleted');
} catch (err) {
console.log(err);
res.status(400).send(err);
}
});
/**
* Run ora2pg
*/
router.get('/project/:project/exec', async (req, res) => {
const project = req.params.project;
if (! await fileUtils.fileExists(`${appConfig.projectDirectory}/${project}/config/ora2pg-conf.json.enc`)) {
res.status(404).send('Config file not found');
return;
}
try {
sseUtils.execOra2Pg(res, project);
} catch (err) {
console.log(err);
res.status(400).send(err);
}
});
/**
* Download file
*/
router.get('/project/:project/download/:file', async (req, res) => {
const project = req.params.project;
const file = req.params.file;
if (await fileUtils.fileExists(`${appConfig.projectDirectory}/${project}/${file}`)) {
const fileToDownload = `${appConfig.projectDirectory}/${project}/${file}`;
res.download(fileToDownload);
} else {
res.status(404).send('File not found');
}
});
module.exports = router;
|
import { Text, Guid, _SPKillSwitch, Validate } from '@microsoft/sp-core-library';
import TraceLogger from '../Trace/TraceLogger';
import QosLogger from './QosLogger';
import EngagementLogger from '../Engagement/EngagementLogger';
import DiagnosticsSettingsManager from '../../DiagnosticsSettingsManager';
var QosMonitor = (function () {
function QosMonitor(scenarioName, copyToEngagement) {
var _a;
if (copyToEngagement === void 0) { copyToEngagement = false; }
this._qosResultTypeValue = (_a = {},
_a[0 ] = 'Success',
_a[1 ] = 'Failure',
_a[2 ] = 'ExpectedFailure',
_a);
Validate.isNonemptyString(scenarioName, 'scenarioName');
this._id = Guid.newGuid().toString();
QosLogger.instance.startQosMonitor(this._id, { name: scenarioName });
this._scenarioName = scenarioName;
this._hasEnded = false;
this._copyToEngagement = copyToEngagement;
}
QosMonitor.startRealTimeProcessing = function () {
if (!QosLogger.instance.shouldProcessInRealTime) {
this._shouldProcessInRealTime(true);
}
};
QosMonitor._shouldProcessInRealTime = function (processInRealTime) {
QosLogger.instance.shouldProcessInRealTime = processInRealTime;
};
Object.defineProperty(QosMonitor.prototype, "name", {
get: function () {
return this._scenarioName;
},
enumerable: true,
configurable: true
});
Object.defineProperty(QosMonitor.prototype, "shortEventName", {
get: function () {
return 'Qos';
},
enumerable: true,
configurable: true
});
Object.defineProperty(QosMonitor.prototype, "resultCode", {
get: function () {
return this._endResultCode;
},
enumerable: true,
configurable: true
});
Object.defineProperty(QosMonitor.prototype, "resultType", {
get: function () {
return this._endResult;
},
enumerable: true,
configurable: true
});
Object.defineProperty(QosMonitor.prototype, "extraData", {
get: function () {
return this._endExtraData;
},
enumerable: true,
configurable: true
});
Object.defineProperty(QosMonitor.prototype, "hasEnded", {
get: function () {
return this._hasEnded;
},
enumerable: true,
configurable: true
});
QosMonitor.prototype.writeSuccess = function (extraData) {
this._writeQosEnd(0 , undefined, undefined, extraData);
};
QosMonitor.prototype.writeUnexpectedFailure = function (tagNameSuffix, ex, extraData) {
if (tagNameSuffix === void 0) { tagNameSuffix = 'DefaultUnexpected'; }
this._writeQosEnd(1 , tagNameSuffix, ex, extraData);
};
QosMonitor.prototype.writeExpectedFailure = function (tagNameSuffix, ex, extraData) {
if (tagNameSuffix === void 0) { tagNameSuffix = 'DefaultExpected'; }
this._writeQosEnd(2 , tagNameSuffix, ex, extraData);
};
QosMonitor.prototype._writeQosEnd = function (resultType, tagNameSuffix, ex, extraData) {
if (!this._shouldSkip(resultType)) {
if (!this._isLogCorrelationIdKillSwitchActive() &&
DiagnosticsSettingsManager.isInitialized &&
resultType !== 0 ) {
var correlationId = DiagnosticsSettingsManager.settings.correlationId;
if (!extraData) {
extraData = {};
}
extraData.CorrelationId = extraData.correlationId ||
extraData.CorrelationId ||
correlationId;
}
this._endResultCode = tagNameSuffix;
this._endExtraData = extraData;
this._endResult = resultType;
var endData = {
resultCode: this._endResultCode,
resultType: this._endResult,
error: ex ? ex.message : undefined,
extraData: this._endExtraData
};
QosLogger.instance.writeQosEndResult(this._id, endData);
this._writeToEngagement();
}
};
QosMonitor.prototype._isLogCorrelationIdKillSwitchActive = function () {
return _SPKillSwitch.isActivated(Guid.parse('e599b604-cf86-4274-a9c9-172adc97e1d2'), '5/22/2019', 'Log correlation Id if not specified already');
};
QosMonitor.prototype._shouldSkip = function (result) {
if (this._hasEnded && (this._endResult !== undefined)) {
var message = Text.format(QosMonitor.qosMonitorHasEndedErrorString, this.name, this._qosResultTypeValue[this._endResult], this._qosResultTypeValue[result]);
if (this._endResult !== result) {
TraceLogger.logError(QosMonitor.logSource, new Error(message));
}
if (DEBUG) {
TraceLogger.logVerbose(QosMonitor.logSource, message, 'skipEnd');
}
return true;
}
else {
this._hasEnded = true;
return false;
}
};
QosMonitor.prototype._writeToEngagement = function () {
if (this._shouldWriteToEngagement()) {
var engagementData = {
name: 'Spfx.Qos.ToEngagement',
extraData: this.extraData || {}
};
engagementData.extraData['qosName'] = this.name;
if (this.resultType) {
engagementData.extraData['qosResultType'] = this._qosResultTypeValue[this.resultType];
}
if (this.resultCode) {
engagementData.extraData['qosResultCode'] = this.resultCode;
}
EngagementLogger.log(engagementData);
}
};
QosMonitor.prototype._shouldWriteToEngagement = function () {
var shouldWriteEngagement = this._copyToEngagement;
return shouldWriteEngagement;
};
QosMonitor.logSource = {
id: 'QosMonitor'
};
QosMonitor.qosMonitorHasEndedErrorString = 'QoS monitor \'{0}\' has ended with \'{1}\' already. Ignoring \'{2}\' tag.';
return QosMonitor;
}());
export default QosMonitor;
|
// Copyright (c) 2020, Battelle Memorial Institute
// All rights reserved.
// 1. Battelle Memorial Institute (hereinafter Battelle) hereby grants
// permission to any person or entity lawfully obtaining a copy of this
// software and associated documentation files (hereinafter "the Software")
// to redistribute and use the Software in source and binary forms, with or
// without modification. Such person or entity may use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and
// may permit others to do so, subject to the following conditions:
// - Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimers.
// - Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// - Other than as used herein, neither the name Battelle Memorial Institute
// or Battelle may be used in any form whatsoever without the express
// written consent of Battelle.
// 2. 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 BATTELLE 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.
// The views and conclusions contained in the software and documentation are those
// of the authors and should not be interpreted as representing official policies,
// either expressed or implied, of the FreeBSD Project.
// This material was prepared as an account of work sponsored by an agency of the
// United States Government. Neither the United States Government nor the United
// States Department of Energy, nor Battelle, nor any of their employees, nor any
// jurisdiction or organization that has cooperated in the development of these
// materials, makes any warranty, express or implied, or assumes any legal
// liability or responsibility for the accuracy, completeness, or usefulness or
// any information, apparatus, product, software, or process disclosed, or
// represents that its use would not infringe privately owned rights.
// Reference herein to any specific commercial product, process, or service by
// trade name, trademark, manufacturer, or otherwise does not necessarily
// constitute or imply its endorsement, recommendation, or favoring by the
// United States Government or any agency thereof, or Battelle Memorial Institute.
// The views and opinions of authors expressed herein do not necessarily state or
// reflect those of the United States Government or any agency thereof.
// PACIFIC NORTHWEST NATIONAL LABORATORY
// operated by
// BATTELLE for the UNITED STATES DEPARTMENT OF ENERGY
// under Contract DE-AC05-76RL01830
import { withStyles } from "@material-ui/core/styles";
import React from "react";
import { connect } from "react-redux";
import { AutoSizer } from "react-virtualized";
import Chart from "routes/Visualization/Chart";
import Clock from "routes/Visualization/Clock";
import styles from "./styles";
class About extends React.Component {
render() {
// const { page } = this.props;
return (
// <Grid container alignContent="center" justify="center" spacing={2}>
// <Grid item xs={12}>
// <Typography variant="h5">{page.label}</Typography>
<div style={{ display: "flex", height: "100%" }}>
<div style={{ display: "inline-block", height: "100%" }}>
<Clock data={[]} size={200} />
</div>
<div
style={{
display: "inline-block",
flex: "1 1 auto",
width: "100%",
height: "100%",
}}
>
<AutoSizer>
{({ width, height }) => (
<Chart data={[]} width={width} height={height} />
)}
</AutoSizer>
</div>
</div>
// </Grid>
// </Grid>
);
}
}
const mapStateToProps = (state) => ({});
const mapActionToProps = {};
export default connect(
mapStateToProps,
mapActionToProps
)(withStyles(styles)(About));
|
/*!
* bcoin.js - a javascript bitcoin library.
* Copyright (c) 2014-2015, Fedor Indutny (MIT License).
* Copyright (c) 2014-2017, Christopher Jeffrey (MIT License).
* https://github.com/bcoin-org/bcoin
*/
/* eslint prefer-arrow-callback: "off" */
'use strict';
/**
* A bcoin "environment" which exposes all
* constructors for primitives, the blockchain,
* mempool, wallet, etc. It also exposes a
* global worker pool.
*
* @exports bcoin
* @type {Object}
*/
const bcoin = exports;
/**
* Define a module for lazy loading.
* @param {String} name
* @param {String} path
*/
bcoin.define = function define(name, path) {
let cache = null;
Object.defineProperty(bcoin, name, {
enumerable: true,
get() {
if (!cache)
cache = require(path);
return cache;
}
});
};
/**
* Set the default network.
* @param {String} network
*/
bcoin.set = function set(network) {
bcoin.Network.set(network);
return bcoin;
};
/*
* Expose
*/
// Blockchain
bcoin.define('blockchain', './blockchain');
bcoin.define('blockstore', './blockstore');
bcoin.define('Chain', './blockchain/chain');
bcoin.define('ChainEntry', './blockchain/chainentry');
// BTC
bcoin.define('btc', './btc');
bcoin.define('Amount', './btc/amount');
bcoin.define('URI', './btc/uri');
// Client
bcoin.define('client', './client');
bcoin.define('NodeClient', './client/node');
bcoin.define('WalletClient', './client/wallet');
// Coins
bcoin.define('coins', './coins');
bcoin.define('Coins', './coins/coins');
bcoin.define('CoinEntry', './coins/coinentry');
bcoin.define('CoinView', './coins/coinview');
// HD
bcoin.define('hd', './hd');
bcoin.define('HDPrivateKey', './hd/private');
bcoin.define('HDPublicKey', './hd/public');
bcoin.define('Mnemonic', './hd/mnemonic');
// Index
bcoin.define('indexer', './indexer');
bcoin.define('Indexer', './indexer/indexer');
bcoin.define('TXIndexer', './indexer/txindexer');
bcoin.define('AddrIndexer', './indexer/addrindexer');
// Mempool
bcoin.define('mempool', './mempool');
bcoin.define('Fees', './mempool/fees');
bcoin.define('Mempool', './mempool/mempool');
bcoin.define('MempoolEntry', './mempool/mempoolentry');
// Miner
bcoin.define('mining', './mining');
bcoin.define('Miner', './mining/miner');
// Net
bcoin.define('net', './net');
bcoin.define('packets', './net/packets');
bcoin.define('Peer', './net/peer');
bcoin.define('Pool', './net/pool');
// Node
bcoin.define('node', './node');
bcoin.define('Node', './node/node');
bcoin.define('FullNode', './node/fullnode');
bcoin.define('SPVNode', './node/spvnode');
// Primitives
bcoin.define('primitives', './primitives');
bcoin.define('Address', './primitives/address');
bcoin.define('Block', './primitives/block');
bcoin.define('Coin', './primitives/coin');
bcoin.define('Headers', './primitives/headers');
bcoin.define('Input', './primitives/input');
bcoin.define('InvItem', './primitives/invitem');
bcoin.define('KeyRing', './primitives/keyring');
bcoin.define('MerkleBlock', './primitives/merkleblock');
bcoin.define('MTX', './primitives/mtx');
bcoin.define('Outpoint', './primitives/outpoint');
bcoin.define('Output', './primitives/output');
bcoin.define('TX', './primitives/tx');
// Protocol
bcoin.define('protocol', './protocol');
bcoin.define('consensus', './protocol/consensus');
bcoin.define('Network', './protocol/network');
bcoin.define('networks', './protocol/networks');
bcoin.define('policy', './protocol/policy');
// Script
bcoin.define('script', './script');
bcoin.define('Opcode', './script/opcode');
bcoin.define('Script', './script/script');
bcoin.define('ScriptNum', './script/scriptnum');
bcoin.define('SigCache', './script/sigcache');
bcoin.define('Stack', './script/stack');
// Utils
bcoin.define('utils', './utils');
bcoin.define('util', './utils/util');
// Wallet
bcoin.define('wallet', './wallet');
bcoin.define('Path', './wallet/path');
bcoin.define('WalletKey', './wallet/walletkey');
bcoin.define('WalletDB', './wallet/walletdb');
// Workers
bcoin.define('workers', './workers');
bcoin.define('WorkerPool', './workers/workerpool');
// Package Info
bcoin.define('pkg', './pkg');
|
const initialViewState = {
questionText: '',
showOptions: false,
noOfAnswers: 0,
options: [],
answered:[],
};
export const showQuestion = (data, currentQuestion) => {
viewState.questionText = data.questions[currentQuestion].question;
viewState.noOfAnswers = data.questions[currentQuestion].answers.length,
viewState.answered = [];
}
export const hideQuestion = () => {
viewState.questionText = '';
}
export const showOptions = (data, currentQuestion) => {
viewState.showOptions = true;
const options = data.questions[currentQuestion].options;
viewState.options = options.map((option) => ({ key: option.text, text: `${option.letter}: ${option.text}`}));
}
export const disableOptions = () => {
viewState.showOptions = false;
}
export const answered = (player) => {
const exist = viewState.answered.findIndex((p) => p = player);
exist === -1 && viewState.answered.push(player);
};
export const getViewState = () => {
return viewState;
};
export const setIntitalState = () => {
viewState = JSON.parse(JSON.stringify(initialViewState));
}
export const resetGame = () => {
setIntitalState();
}
let viewState;
setIntitalState();
export default {
showQuestion,
showOptions,
disableOptions,
answered,
getViewState,
setIntitalState,
resetGame,
};
|
import Navbar from './components/Navbar';
import './App.css';
import { BrowserRouter as Router, Switch, Route, Redirect } from 'react-router-dom';
import axios from 'axios';
import useAuth from './hooks/auth';
import Home from './pages/Home';
import Signup from './pages/Signup';
import Login from './pages/Login';
function App() {
// Pull auth token from storage, in case you refresh the page
const { getToken, logout } = useAuth();
axios.defaults.headers.common.Authorization = `Bearer ${getToken()}`;
// A nice trick that if we EVER get back a 401, will pop the token off
axios.interceptors.response.use(response => {
// Any status code that lie within the range of 2xx cause this function to trigger
// Do something with response data
return response;
}, error => {
const { message } = error.toJSON();
// If we had time, we could write our own custom method to the auth middleware
// However, we are just gonna use their message.
if(message === 'Request failed with status code 401'){
logout();
}
// Any status codes that falls outside the range of 2xx cause this function to trigger
// Do something with response error
return Promise.reject(error);
});
return (
<Router>
<Navbar />
<Switch>
<Route exact path='/'>
<Home />
</Route>
<Route path='/signup'>
<Signup />
</Route>
<Route path='/login'>
<Login />
</Route>
</Switch>
</Router>
);
}
// Yanked straight from the react-router docs for redirects
function PrivateRoute({ children, ...rest }) {
const { isLoggedIn } = useAuth();
return (
<Route
{...rest}
render={({ location }) =>
isLoggedIn() ? (
children
) :
(
<Redirect
to={{
pathname: '/login',
state: { from: location }
}}
/>
)
}
/>
);
}
export default App;
|
let config = {
port: 3000,
host: 'localhost',
session: {
secret: 'huangxinzheng',
resave: true, //即使 session 没有被修改,也保存 session 值,默认为 true(!不添加报错,下同)
saveUninitialized: false, // 设置为 false,强制创建一个 session,即使用户未登录
cookie: {
maxAge: 1000 * 60 * 60 * 24 // 过期时间,过期后 cookie 中的 session id 自动删除
}
},
mongodb: 'mongodb://localhost:27017/myblog',
}
export default config
|
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const readLines_1 = __importDefault(require("../readLines"));
const path_1 = __importDefault(require("path"));
let seats = [];
let lastHash = '';
let rounds = 0;
let size = {
rows: 0,
cols: 0
};
const getAdjacentNum = (row, col) => {
let num = 0;
const prevRow = row > 0 ? row - 1 : row;
const nextRow = row === size.rows - 1 ? row : row + 1;
const prevCol = col > 0 ? col - 1 : col;
const nextCol = col === size.cols - 1 ? col : col + 1;
for (let r = prevRow; r <= nextRow; r++) {
for (let c = prevCol; c <= nextCol; c++) {
if (r !== row || c !== col) {
if (seats[r][c] === '#') {
num++;
}
}
}
}
return num;
};
const nextRound = () => {
let matrix = [];
for (let r = 0; r < size.rows; r++) {
const row = [];
for (let c = 0; c < size.cols; c++) {
const itemType = seats[r][c];
const adjacent = getAdjacentNum(r, c);
if (itemType === 'L') {
if (adjacent === 0) {
// Becomes occupied
row.push('#');
}
else {
row.push('L');
}
}
else if (itemType === '#') {
if (adjacent >= 4) {
row.push('L');
}
else {
row.push('#');
}
}
else {
row.push('.');
}
}
matrix.push(row);
}
const hash = getHash(matrix);
if (lastHash !== hash) {
lastHash = hash;
rounds++;
seats = matrix;
return true;
}
return false;
};
const countOccupied = (matrix) => {
return matrix.reduce((accum, item) => {
const m = item.join(',').match(/#/gm);
if (m) {
accum += m.length;
}
return accum;
}, 0);
};
const getHash = (matrix) => {
return matrix.reduce((accum, row) => {
accum += row.join(',') + ',';
return accum;
}, '');
};
const start = async () => {
const lines = await readLines_1.default(path_1.default.join(__dirname, 'input.txt'));
size.rows = lines.filter((l) => l.trim() !== '').length;
lines.forEach((line) => {
const row = line.trim().split('');
seats.push(row);
});
size.cols = lines[0].length;
let working = true;
while (working) {
working = nextRound();
}
return countOccupied(seats);
};
exports.default = start;
|
"use strict";
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); }
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SeatsService = void 0;
const common_1 = require("@nestjs/common");
const mongoose_1 = require("@nestjs/mongoose");
const mongoose_2 = require("mongoose");
let SeatsService = class SeatsService {
constructor(seatModel) {
this.seatModel = seatModel;
this.seats = [];
}
async insertSeat(Seat_No, user_id) {
const newSeat = new this.seatModel({
Seat_No,
user_id,
});
const result = await newSeat.save();
console.log(result);
return result.id;
}
async updateSeat(user_id, id) {
const updatedSeat = await this.findSeat(id);
if (user_id) {
updatedSeat.user_id = user_id;
updatedSeat.is_reset = true;
}
updatedSeat.save();
}
async resetTicket() {
const result = await this.checkReset();
return result;
}
async checkReset() {
let seat;
try {
seat = this.seatModel.updateMany({ is_reset: true }, { is_reset: false });
}
catch (error) {
throw new common_1.NotFoundException('Could not find details.');
}
return seat;
}
async getBookedSeats() {
const seats = await this.seatModel.find({ is_reset: true }).exec();
console.log(seats);
return seats.map((prod) => ({ id: prod.id, Seat_No: prod.Seat_No }));
}
async getUnBookedSeats() {
const seats = await this.seatModel.find({ is_reset: false }).exec();
console.log(seats);
return seats.map((prod) => ({ id: prod.id, Seat_No: prod.Seat_No }));
}
async getSingleTicket(Seat_No) {
const seat = await this.seatModel.find({ Seat_No: Seat_No }).exec();
return seat;
}
async findSeat(id) {
let seat;
try {
seat = await this.seatModel.findById(id).exec();
}
catch (error) {
throw new common_1.NotFoundException('Could not find seat.');
}
if (!seat) {
throw new common_1.NotFoundException('Could not find product (seats).');
}
else if (seat.length > 0) {
throw new common_1.NotFoundException('Already Booked (seats) .');
}
else
return seat;
}
};
SeatsService = __decorate([
common_1.Injectable(),
__param(0, mongoose_1.InjectModel('Seat')),
__metadata("design:paramtypes", [mongoose_2.Model])
], SeatsService);
exports.SeatsService = SeatsService;
//# sourceMappingURL=seats.services.js.map
|
const vote = require('../../controllers/Listing/vote');
const voteListing = async (req, res, next) => {
const username = req.session.user.username;
const { id, type } = req.params;
if (type !=='up' && type !=='down') {
return next();
}
try {
await vote(id, username, type);
return res.status(200).send({ msg: 'Successfully voted!' });
} catch(err) {
console.log(err);
return res.status(500).send({err: 'Could not vote'});
}
}
module.exports = voteListing;
|
import Spell from '../../models/Spell';
import Token from '../tokens';
import C from '../../models/Constants';
class StoneHeart extends Spell {
constructor(level) {
super({
name: 'Stone Heart',
code: 'stoneHeart',
type: C.HealSpell,
tier: C.Advanced,
element: C.Earth,
heal: 27,
onCast: 'You get a weakness token on your playfield.',
tokens: [Token.Weakness],
unlockAt: [
{ hero: C.VanRaven, level: C.Arena1 },
{ hero: C.Ray, level: C.Arena7 },
]
});
}
}
export default StoneHeart;
|
import request from '@/utils/request'
/*
权限管理相关的API请求函数
*/
const api_name = '/admin/acl/permission'
export default {
/*
获取权限(菜单/功能)列表
*/
getPermissionList() {
return request({
url: `${api_name}`,
method: 'get'
})
},
/*
删除一个权限项
*/
removePermission(id) {
return request({
url: `${api_name}/remove/${id}`,
method: "delete"
})
},
/*
保存一个权限项
*/
addPermission(permission) {
return request({
url: `${api_name}/save`,
method: "post",
data: permission
})
},
/*
更新一个权限项
*/
updatePermission(permission) {
return request({
url: `${api_name}/update`,
method: "put",
data: permission
})
},
/*
查看某个角色的权限列表
*/
toAssign(roleId) {
return request({
url: `${api_name}/toAssign/${roleId}`,
method: 'get'
})
},
/*
给某个角色授权
*/
doAssign(roleId, permissionId) {
return request({
url: `${api_name}/doAssign`,
method: "post",
params: {roleId, permissionId}
})
}
}
|
/*!
Parser-Lib
Copyright (c) 2009-2016 Nicholas C. Zakas. All rights reserved.
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.
*/
/* Version v1.1.0, Build time: 6-December-2016 10:31:29 */
var parserlib = (function () {
var require;
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
"use strict";
/* exported Colors */
var Colors = module.exports = {
__proto__ :null,
aliceblue :"#f0f8ff",
antiquewhite :"#faebd7",
aqua :"#00ffff",
aquamarine :"#7fffd4",
azure :"#f0ffff",
beige :"#f5f5dc",
bisque :"#ffe4c4",
black :"#000000",
blanchedalmond :"#ffebcd",
blue :"#0000ff",
blueviolet :"#8a2be2",
brown :"#a52a2a",
burlywood :"#deb887",
cadetblue :"#5f9ea0",
chartreuse :"#7fff00",
chocolate :"#d2691e",
coral :"#ff7f50",
cornflowerblue :"#6495ed",
cornsilk :"#fff8dc",
crimson :"#dc143c",
cyan :"#00ffff",
darkblue :"#00008b",
darkcyan :"#008b8b",
darkgoldenrod :"#b8860b",
darkgray :"#a9a9a9",
darkgrey :"#a9a9a9",
darkgreen :"#006400",
darkkhaki :"#bdb76b",
darkmagenta :"#8b008b",
darkolivegreen :"#556b2f",
darkorange :"#ff8c00",
darkorchid :"#9932cc",
darkred :"#8b0000",
darksalmon :"#e9967a",
darkseagreen :"#8fbc8f",
darkslateblue :"#483d8b",
darkslategray :"#2f4f4f",
darkslategrey :"#2f4f4f",
darkturquoise :"#00ced1",
darkviolet :"#9400d3",
deeppink :"#ff1493",
deepskyblue :"#00bfff",
dimgray :"#696969",
dimgrey :"#696969",
dodgerblue :"#1e90ff",
firebrick :"#b22222",
floralwhite :"#fffaf0",
forestgreen :"#228b22",
fuchsia :"#ff00ff",
gainsboro :"#dcdcdc",
ghostwhite :"#f8f8ff",
gold :"#ffd700",
goldenrod :"#daa520",
gray :"#808080",
grey :"#808080",
green :"#008000",
greenyellow :"#adff2f",
honeydew :"#f0fff0",
hotpink :"#ff69b4",
indianred :"#cd5c5c",
indigo :"#4b0082",
ivory :"#fffff0",
khaki :"#f0e68c",
lavender :"#e6e6fa",
lavenderblush :"#fff0f5",
lawngreen :"#7cfc00",
lemonchiffon :"#fffacd",
lightblue :"#add8e6",
lightcoral :"#f08080",
lightcyan :"#e0ffff",
lightgoldenrodyellow :"#fafad2",
lightgray :"#d3d3d3",
lightgrey :"#d3d3d3",
lightgreen :"#90ee90",
lightpink :"#ffb6c1",
lightsalmon :"#ffa07a",
lightseagreen :"#20b2aa",
lightskyblue :"#87cefa",
lightslategray :"#778899",
lightslategrey :"#778899",
lightsteelblue :"#b0c4de",
lightyellow :"#ffffe0",
lime :"#00ff00",
limegreen :"#32cd32",
linen :"#faf0e6",
magenta :"#ff00ff",
maroon :"#800000",
mediumaquamarine:"#66cdaa",
mediumblue :"#0000cd",
mediumorchid :"#ba55d3",
mediumpurple :"#9370d8",
mediumseagreen :"#3cb371",
mediumslateblue :"#7b68ee",
mediumspringgreen :"#00fa9a",
mediumturquoise :"#48d1cc",
mediumvioletred :"#c71585",
midnightblue :"#191970",
mintcream :"#f5fffa",
mistyrose :"#ffe4e1",
moccasin :"#ffe4b5",
navajowhite :"#ffdead",
navy :"#000080",
oldlace :"#fdf5e6",
olive :"#808000",
olivedrab :"#6b8e23",
orange :"#ffa500",
orangered :"#ff4500",
orchid :"#da70d6",
palegoldenrod :"#eee8aa",
palegreen :"#98fb98",
paleturquoise :"#afeeee",
palevioletred :"#d87093",
papayawhip :"#ffefd5",
peachpuff :"#ffdab9",
peru :"#cd853f",
pink :"#ffc0cb",
plum :"#dda0dd",
powderblue :"#b0e0e6",
purple :"#800080",
red :"#ff0000",
rosybrown :"#bc8f8f",
royalblue :"#4169e1",
saddlebrown :"#8b4513",
salmon :"#fa8072",
sandybrown :"#f4a460",
seagreen :"#2e8b57",
seashell :"#fff5ee",
sienna :"#a0522d",
silver :"#c0c0c0",
skyblue :"#87ceeb",
slateblue :"#6a5acd",
slategray :"#708090",
slategrey :"#708090",
snow :"#fffafa",
springgreen :"#00ff7f",
steelblue :"#4682b4",
tan :"#d2b48c",
teal :"#008080",
thistle :"#d8bfd8",
tomato :"#ff6347",
turquoise :"#40e0d0",
violet :"#ee82ee",
wheat :"#f5deb3",
white :"#ffffff",
whitesmoke :"#f5f5f5",
yellow :"#ffff00",
yellowgreen :"#9acd32",
//'currentColor' color keyword https://www.w3.org/TR/css3-color/#currentcolor
currentColor :"The value of the 'color' property.",
//CSS2 system colors https://www.w3.org/TR/css3-color/#css2-system
activeBorder :"Active window border.",
activecaption :"Active window caption.",
appworkspace :"Background color of multiple document interface.",
background :"Desktop background.",
buttonface :"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border.",
buttonhighlight :"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",
buttonshadow :"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",
buttontext :"Text on push buttons.",
captiontext :"Text in caption, size box, and scrollbar arrow box.",
graytext :"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.",
greytext :"Greyed (disabled) text. This color is set to #000 if the current display driver does not support a solid grey color.",
highlight :"Item(s) selected in a control.",
highlighttext :"Text of item(s) selected in a control.",
inactiveborder :"Inactive window border.",
inactivecaption :"Inactive window caption.",
inactivecaptiontext :"Color of text in an inactive caption.",
infobackground :"Background color for tooltip controls.",
infotext :"Text color for tooltip controls.",
menu :"Menu background.",
menutext :"Text in menus.",
scrollbar :"Scroll bar gray area.",
threeddarkshadow :"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",
threedface :"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",
threedhighlight :"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",
threedlightshadow :"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",
threedshadow :"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",
window :"Window background.",
windowframe :"Window frame.",
windowtext :"Text in windows."
};
},{}],2:[function(require,module,exports){
"use strict";
module.exports = Combinator;
var SyntaxUnit = require("../util/SyntaxUnit");
var Parser = require("./Parser");
/**
* Represents a selector combinator (whitespace, +, >).
* @namespace parserlib.css
* @class Combinator
* @extends parserlib.util.SyntaxUnit
* @constructor
* @param {String} text The text representation of the unit.
* @param {int} line The line of text on which the unit resides.
* @param {int} col The column of text on which the unit resides.
*/
function Combinator(text, line, col) {
SyntaxUnit.call(this, text, line, col, Parser.COMBINATOR_TYPE);
/**
* The type of modifier.
* @type String
* @property type
*/
this.type = "unknown";
//pretty simple
if (/^\s+$/.test(text)) {
this.type = "descendant";
} else if (text === ">") {
this.type = "child";
} else if (text === "+") {
this.type = "adjacent-sibling";
} else if (text === "~") {
this.type = "sibling";
}
}
Combinator.prototype = new SyntaxUnit();
Combinator.prototype.constructor = Combinator;
},{"../util/SyntaxUnit":26,"./Parser":6}],3:[function(require,module,exports){
"use strict";
module.exports = Matcher;
var StringReader = require("../util/StringReader");
var SyntaxError = require("../util/SyntaxError");
/**
* This class implements a combinator library for matcher functions.
* The combinators are described at:
* https://developer.mozilla.org/en-US/docs/Web/CSS/Value_definition_syntax#Component_value_combinators
*/
function Matcher(matchFunc, toString) {
this.match = function(expression) {
// Save/restore marks to ensure that failed matches always restore
// the original location in the expression.
var result;
expression.mark();
result = matchFunc(expression);
if (result) {
expression.drop();
} else {
expression.restore();
}
return result;
};
this.toString = typeof toString === "function" ? toString : function() {
return toString;
};
}
/** Precedence table of combinators. */
Matcher.prec = {
MOD: 5,
SEQ: 4,
ANDAND: 3,
OROR: 2,
ALT: 1
};
/** Simple recursive-descent grammar to build matchers from strings. */
Matcher.parse = function(str) {
var reader, eat, expr, oror, andand, seq, mod, term, result;
reader = new StringReader(str);
eat = function(matcher) {
var result = reader.readMatch(matcher);
if (result === null) {
throw new SyntaxError(
"Expected "+matcher, reader.getLine(), reader.getCol());
}
return result;
};
expr = function() {
// expr = oror (" | " oror)*
var m = [ oror() ];
while (reader.readMatch(" | ") !== null) {
m.push(oror());
}
return m.length === 1 ? m[0] : Matcher.alt.apply(Matcher, m);
};
oror = function() {
// oror = andand ( " || " andand)*
var m = [ andand() ];
while (reader.readMatch(" || ") !== null) {
m.push(andand());
}
return m.length === 1 ? m[0] : Matcher.oror.apply(Matcher, m);
};
andand = function() {
// andand = seq ( " && " seq)*
var m = [ seq() ];
while (reader.readMatch(" && ") !== null) {
m.push(seq());
}
return m.length === 1 ? m[0] : Matcher.andand.apply(Matcher, m);
};
seq = function() {
// seq = mod ( " " mod)*
var m = [ mod() ];
while (reader.readMatch(/^ (?![&|\]])/) !== null) {
m.push(mod());
}
return m.length === 1 ? m[0] : Matcher.seq.apply(Matcher, m);
};
mod = function() {
// mod = term ( "?" | "*" | "+" | "#" | "{<num>,<num>}" )?
var m = term();
if (reader.readMatch("?") !== null) {
return m.question();
} else if (reader.readMatch("*") !== null) {
return m.star();
} else if (reader.readMatch("+") !== null) {
return m.plus();
} else if (reader.readMatch("#") !== null) {
return m.hash();
} else if (reader.readMatch(/^\{\s*/) !== null) {
var min = eat(/^\d+/);
eat(/^\s*,\s*/);
var max = eat(/^\d+/);
eat(/^\s*\}/);
return m.braces(+min, +max);
}
return m;
};
term = function() {
// term = <nt> | literal | "[ " expression " ]"
if (reader.readMatch("[ ") !== null) {
var m = expr();
eat(" ]");
return m;
}
return Matcher.fromType(eat(/^[^ ?*+#{]+/));
};
result = expr();
if (!reader.eof()) {
throw new SyntaxError(
"Expected end of string", reader.getLine(), reader.getCol());
}
return result;
};
/**
* Convert a string to a matcher (parsing simple alternations),
* or do nothing if the argument is already a matcher.
*/
Matcher.cast = function(m) {
if (m instanceof Matcher) {
return m;
}
return Matcher.parse(m);
};
/**
* Create a matcher for a single type.
*/
Matcher.fromType = function(type) {
// Late require of ValidationTypes to break a dependency cycle.
var ValidationTypes = require("./ValidationTypes");
return new Matcher(function(expression) {
return expression.hasNext() && ValidationTypes.isType(expression, type);
}, type);
};
/**
* Create a matcher for one or more juxtaposed words, which all must
* occur, in the given order.
*/
Matcher.seq = function() {
var ms = Array.prototype.slice.call(arguments).map(Matcher.cast);
if (ms.length === 1) {
return ms[0];
}
return new Matcher(function(expression) {
var i, result = true;
for (i = 0; result && i < ms.length; i++) {
result = ms[i].match(expression);
}
return result;
}, function(prec) {
var p = Matcher.prec.SEQ;
var s = ms.map(function(m) {
return m.toString(p);
}).join(" ");
if (prec > p) {
s = "[ " + s + " ]";
}
return s;
});
};
/**
* Create a matcher for one or more alternatives, where exactly one
* must occur.
*/
Matcher.alt = function() {
var ms = Array.prototype.slice.call(arguments).map(Matcher.cast);
if (ms.length === 1) {
return ms[0];
}
return new Matcher(function(expression) {
var i, result = false;
for (i = 0; !result && i < ms.length; i++) {
result = ms[i].match(expression);
}
return result;
}, function(prec) {
var p = Matcher.prec.ALT;
var s = ms.map(function(m) {
return m.toString(p);
}).join(" | ");
if (prec > p) {
s = "[ " + s + " ]";
}
return s;
});
};
/**
* Create a matcher for two or more options. This implements the
* double bar (||) and double ampersand (&&) operators, as well as
* variants of && where some of the alternatives are optional.
* This will backtrack through even successful matches to try to
* maximize the number of items matched.
*/
Matcher.many = function(required) {
var ms = Array.prototype.slice.call(arguments, 1).reduce(function(acc, v) {
if (v.expand) {
// Insert all of the options for the given complex rule as
// individual options.
var ValidationTypes = require("./ValidationTypes");
acc.push.apply(acc, ValidationTypes.complex[v.expand].options);
} else {
acc.push(Matcher.cast(v));
}
return acc;
}, []);
if (required === true) {
required = ms.map(function() {
return true;
});
}
var result = new Matcher(function(expression) {
var seen = [], max = 0, pass = 0;
var success = function(matchCount) {
if (pass === 0) {
max = Math.max(matchCount, max);
return matchCount === ms.length;
} else {
return matchCount === max;
}
};
var tryMatch = function(matchCount) {
for (var i = 0; i < ms.length; i++) {
if (seen[i]) {
continue;
}
expression.mark();
if (ms[i].match(expression)) {
seen[i] = true;
// Increase matchCount iff this was a required element
// (or if all the elements are optional)
if (tryMatch(matchCount + ((required === false || required[i]) ? 1 : 0))) {
expression.drop();
return true;
}
// Backtrack: try *not* matching using this rule, and
// let's see if it leads to a better overall match.
expression.restore();
seen[i] = false;
} else {
expression.drop();
}
}
return success(matchCount);
};
if (!tryMatch(0)) {
// Couldn't get a complete match, retrace our steps to make the
// match with the maximum # of required elements.
pass++;
tryMatch(0);
}
if (required === false) {
return max > 0;
}
// Use finer-grained specification of which matchers are required.
for (var i = 0; i < ms.length; i++) {
if (required[i] && !seen[i]) {
return false;
}
}
return true;
}, function(prec) {
var p = required === false ? Matcher.prec.OROR : Matcher.prec.ANDAND;
var s = ms.map(function(m, i) {
if (required !== false && !required[i]) {
return m.toString(Matcher.prec.MOD) + "?";
}
return m.toString(p);
}).join(required === false ? " || " : " && ");
if (prec > p) {
s = "[ " + s + " ]";
}
return s;
});
result.options = ms;
return result;
};
/**
* Create a matcher for two or more options, where all options are
* mandatory but they may appear in any order.
*/
Matcher.andand = function() {
var args = Array.prototype.slice.call(arguments);
args.unshift(true);
return Matcher.many.apply(Matcher, args);
};
/**
* Create a matcher for two or more options, where options are
* optional and may appear in any order, but at least one must be
* present.
*/
Matcher.oror = function() {
var args = Array.prototype.slice.call(arguments);
args.unshift(false);
return Matcher.many.apply(Matcher, args);
};
/** Instance methods on Matchers. */
Matcher.prototype = {
constructor: Matcher,
// These are expected to be overridden in every instance.
match: function() { throw new Error("unimplemented"); },
toString: function() { throw new Error("unimplemented"); },
// This returns a standalone function to do the matching.
func: function() { return this.match.bind(this); },
// Basic combinators
then: function(m) { return Matcher.seq(this, m); },
or: function(m) { return Matcher.alt(this, m); },
andand: function(m) { return Matcher.many(true, this, m); },
oror: function(m) { return Matcher.many(false, this, m); },
// Component value multipliers
star: function() { return this.braces(0, Infinity, "*"); },
plus: function() { return this.braces(1, Infinity, "+"); },
question: function() { return this.braces(0, 1, "?"); },
hash: function() {
return this.braces(1, Infinity, "#", Matcher.cast(","));
},
braces: function(min, max, marker, optSep) {
var m1 = this, m2 = optSep ? optSep.then(this) : this;
if (!marker) {
marker = "{" + min + "," + max + "}";
}
return new Matcher(function(expression) {
var result = true, i;
for (i = 0; i < max; i++) {
if (i > 0 && optSep) {
result = m2.match(expression);
} else {
result = m1.match(expression);
}
if (!result) {
break;
}
}
return i >= min;
}, function() {
return m1.toString(Matcher.prec.MOD) + marker;
});
}
};
},{"../util/StringReader":24,"../util/SyntaxError":25,"./ValidationTypes":21}],4:[function(require,module,exports){
"use strict";
module.exports = MediaFeature;
var SyntaxUnit = require("../util/SyntaxUnit");
var Parser = require("./Parser");
/**
* Represents a media feature, such as max-width:500.
* @namespace parserlib.css
* @class MediaFeature
* @extends parserlib.util.SyntaxUnit
* @constructor
* @param {SyntaxUnit} name The name of the feature.
* @param {SyntaxUnit} value The value of the feature or null if none.
*/
function MediaFeature(name, value) {
SyntaxUnit.call(this, "(" + name + (value !== null ? ":" + value : "") + ")", name.startLine, name.startCol, Parser.MEDIA_FEATURE_TYPE);
/**
* The name of the media feature
* @type String
* @property name
*/
this.name = name;
/**
* The value for the feature or null if there is none.
* @type SyntaxUnit
* @property value
*/
this.value = value;
}
MediaFeature.prototype = new SyntaxUnit();
MediaFeature.prototype.constructor = MediaFeature;
},{"../util/SyntaxUnit":26,"./Parser":6}],5:[function(require,module,exports){
"use strict";
module.exports = MediaQuery;
var SyntaxUnit = require("../util/SyntaxUnit");
var Parser = require("./Parser");
/**
* Represents an individual media query.
* @namespace parserlib.css
* @class MediaQuery
* @extends parserlib.util.SyntaxUnit
* @constructor
* @param {String} modifier The modifier "not" or "only" (or null).
* @param {String} mediaType The type of media (i.e., "print").
* @param {Array} parts Array of selectors parts making up this selector.
* @param {int} line The line of text on which the unit resides.
* @param {int} col The column of text on which the unit resides.
*/
function MediaQuery(modifier, mediaType, features, line, col) {
SyntaxUnit.call(this, (modifier ? modifier + " ": "") + (mediaType ? mediaType : "") + (mediaType && features.length > 0 ? " and " : "") + features.join(" and "), line, col, Parser.MEDIA_QUERY_TYPE);
/**
* The media modifier ("not" or "only")
* @type String
* @property modifier
*/
this.modifier = modifier;
/**
* The mediaType (i.e., "print")
* @type String
* @property mediaType
*/
this.mediaType = mediaType;
/**
* The parts that make up the selector.
* @type Array
* @property features
*/
this.features = features;
}
MediaQuery.prototype = new SyntaxUnit();
MediaQuery.prototype.constructor = MediaQuery;
},{"../util/SyntaxUnit":26,"./Parser":6}],6:[function(require,module,exports){
"use strict";
module.exports = Parser;
var EventTarget = require("../util/EventTarget");
var SyntaxError = require("../util/SyntaxError");
var SyntaxUnit = require("../util/SyntaxUnit");
var Combinator = require("./Combinator");
var MediaFeature = require("./MediaFeature");
var MediaQuery = require("./MediaQuery");
var PropertyName = require("./PropertyName");
var PropertyValue = require("./PropertyValue");
var PropertyValuePart = require("./PropertyValuePart");
var Selector = require("./Selector");
var SelectorPart = require("./SelectorPart");
var SelectorSubPart = require("./SelectorSubPart");
var TokenStream = require("./TokenStream");
var Tokens = require("./Tokens");
var Validation = require("./Validation");
/**
* A CSS3 parser.
* @namespace parserlib.css
* @class Parser
* @constructor
* @param {Object} options (Optional) Various options for the parser:
* starHack (true|false) to allow IE6 star hack as valid,
* underscoreHack (true|false) to interpret leading underscores
* as IE6-7 targeting for known properties, ieFilters (true|false)
* to indicate that IE < 8 filters should be accepted and not throw
* syntax errors.
*/
function Parser(options) {
//inherit event functionality
EventTarget.call(this);
this.options = options || {};
this._tokenStream = null;
}
//Static constants
Parser.DEFAULT_TYPE = 0;
Parser.COMBINATOR_TYPE = 1;
Parser.MEDIA_FEATURE_TYPE = 2;
Parser.MEDIA_QUERY_TYPE = 3;
Parser.PROPERTY_NAME_TYPE = 4;
Parser.PROPERTY_VALUE_TYPE = 5;
Parser.PROPERTY_VALUE_PART_TYPE = 6;
Parser.SELECTOR_TYPE = 7;
Parser.SELECTOR_PART_TYPE = 8;
Parser.SELECTOR_SUB_PART_TYPE = 9;
Parser.prototype = function() {
var proto = new EventTarget(), //new prototype
prop,
additions = {
__proto__: null,
//restore constructor
constructor: Parser,
//instance constants - yuck
DEFAULT_TYPE : 0,
COMBINATOR_TYPE : 1,
MEDIA_FEATURE_TYPE : 2,
MEDIA_QUERY_TYPE : 3,
PROPERTY_NAME_TYPE : 4,
PROPERTY_VALUE_TYPE : 5,
PROPERTY_VALUE_PART_TYPE : 6,
SELECTOR_TYPE : 7,
SELECTOR_PART_TYPE : 8,
SELECTOR_SUB_PART_TYPE : 9,
//-----------------------------------------------------------------
// Grammar
//-----------------------------------------------------------------
_stylesheet: function() {
/*
* stylesheet
* : [ CHARSET_SYM S* STRING S* ';' ]?
* [S|CDO|CDC]* [ import [S|CDO|CDC]* ]*
* [ namespace [S|CDO|CDC]* ]*
* [ [ ruleset | media | page | font_face | keyframes_rule | supports_rule ] [S|CDO|CDC]* ]*
* ;
*/
var tokenStream = this._tokenStream,
count,
token,
tt;
this.fire("startstylesheet");
//try to read character set
this._charset();
this._skipCruft();
//try to read imports - may be more than one
while (tokenStream.peek() === Tokens.IMPORT_SYM) {
this._import();
this._skipCruft();
}
//try to read namespaces - may be more than one
while (tokenStream.peek() === Tokens.NAMESPACE_SYM) {
this._namespace();
this._skipCruft();
}
//get the next token
tt = tokenStream.peek();
//try to read the rest
while (tt > Tokens.EOF) {
try {
switch (tt) {
case Tokens.MEDIA_SYM:
this._media();
this._skipCruft();
break;
case Tokens.PAGE_SYM:
this._page();
this._skipCruft();
break;
case Tokens.FONT_FACE_SYM:
this._font_face();
this._skipCruft();
break;
case Tokens.KEYFRAMES_SYM:
this._keyframes();
this._skipCruft();
break;
case Tokens.VIEWPORT_SYM:
this._viewport();
this._skipCruft();
break;
case Tokens.DOCUMENT_SYM:
this._document();
this._skipCruft();
break;
case Tokens.SUPPORTS_SYM:
this._supports();
this._skipCruft();
break;
case Tokens.UNKNOWN_SYM: //unknown @ rule
tokenStream.get();
if (!this.options.strict) {
//fire error event
this.fire({
type: "error",
error: null,
message: "Unknown @ rule: " + tokenStream.LT(0).value + ".",
line: tokenStream.LT(0).startLine,
col: tokenStream.LT(0).startCol
});
//skip braces
count=0;
while (tokenStream.advance([Tokens.LBRACE, Tokens.RBRACE]) === Tokens.LBRACE) {
count++; //keep track of nesting depth
}
while (count) {
tokenStream.advance([Tokens.RBRACE]);
count--;
}
} else {
//not a syntax error, rethrow it
throw new SyntaxError("Unknown @ rule.", tokenStream.LT(0).startLine, tokenStream.LT(0).startCol);
}
break;
case Tokens.S:
this._readWhitespace();
break;
default:
if (!this._ruleset()) {
//error handling for known issues
switch (tt) {
case Tokens.CHARSET_SYM:
token = tokenStream.LT(1);
this._charset(false);
throw new SyntaxError("@charset not allowed here.", token.startLine, token.startCol);
case Tokens.IMPORT_SYM:
token = tokenStream.LT(1);
this._import(false);
throw new SyntaxError("@import not allowed here.", token.startLine, token.startCol);
case Tokens.NAMESPACE_SYM:
token = tokenStream.LT(1);
this._namespace(false);
throw new SyntaxError("@namespace not allowed here.", token.startLine, token.startCol);
default:
tokenStream.get(); //get the last token
this._unexpectedToken(tokenStream.token());
}
}
}
} catch (ex) {
if (ex instanceof SyntaxError && !this.options.strict) {
this.fire({
type: "error",
error: ex,
message: ex.message,
line: ex.line,
col: ex.col
});
} else {
throw ex;
}
}
tt = tokenStream.peek();
}
if (tt !== Tokens.EOF) {
this._unexpectedToken(tokenStream.token());
}
this.fire("endstylesheet");
},
_charset: function(emit) {
var tokenStream = this._tokenStream,
charset,
token,
line,
col;
if (tokenStream.match(Tokens.CHARSET_SYM)) {
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
this._readWhitespace();
tokenStream.mustMatch(Tokens.STRING);
token = tokenStream.token();
charset = token.value;
this._readWhitespace();
tokenStream.mustMatch(Tokens.SEMICOLON);
if (emit !== false) {
this.fire({
type: "charset",
charset:charset,
line: line,
col: col
});
}
}
},
_import: function(emit) {
/*
* import
* : IMPORT_SYM S*
* [STRING|URI] S* media_query_list? ';' S*
*/
var tokenStream = this._tokenStream,
uri,
importToken,
mediaList = [];
//read import symbol
tokenStream.mustMatch(Tokens.IMPORT_SYM);
importToken = tokenStream.token();
this._readWhitespace();
tokenStream.mustMatch([Tokens.STRING, Tokens.URI]);
//grab the URI value
uri = tokenStream.token().value.replace(/^(?:url\()?["']?([^"']+?)["']?\)?$/, "$1");
this._readWhitespace();
mediaList = this._media_query_list();
//must end with a semicolon
tokenStream.mustMatch(Tokens.SEMICOLON);
this._readWhitespace();
if (emit !== false) {
this.fire({
type: "import",
uri: uri,
media: mediaList,
line: importToken.startLine,
col: importToken.startCol
});
}
},
_namespace: function(emit) {
/*
* namespace
* : NAMESPACE_SYM S* [namespace_prefix S*]? [STRING|URI] S* ';' S*
*/
var tokenStream = this._tokenStream,
line,
col,
prefix,
uri;
//read import symbol
tokenStream.mustMatch(Tokens.NAMESPACE_SYM);
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
this._readWhitespace();
//it's a namespace prefix - no _namespace_prefix() method because it's just an IDENT
if (tokenStream.match(Tokens.IDENT)) {
prefix = tokenStream.token().value;
this._readWhitespace();
}
tokenStream.mustMatch([Tokens.STRING, Tokens.URI]);
/*if (!tokenStream.match(Tokens.STRING)){
tokenStream.mustMatch(Tokens.URI);
}*/
//grab the URI value
uri = tokenStream.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/, "$1");
this._readWhitespace();
//must end with a semicolon
tokenStream.mustMatch(Tokens.SEMICOLON);
this._readWhitespace();
if (emit !== false) {
this.fire({
type: "namespace",
prefix: prefix,
uri: uri,
line: line,
col: col
});
}
},
_supports: function(emit) {
/*
* supports_rule
* : SUPPORTS_SYM S* supports_condition S* group_rule_body
* ;
*/
var tokenStream = this._tokenStream,
line,
col;
if (tokenStream.match(Tokens.SUPPORTS_SYM)) {
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
this._readWhitespace();
this._supports_condition();
this._readWhitespace();
tokenStream.mustMatch(Tokens.LBRACE);
this._readWhitespace();
if (emit !== false) {
this.fire({
type: "startsupports",
line: line,
col: col
});
}
while (true) {
if (!this._ruleset()) {
break;
}
}
tokenStream.mustMatch(Tokens.RBRACE);
this._readWhitespace();
this.fire({
type: "endsupports",
line: line,
col: col
});
}
},
_supports_condition: function() {
/*
* supports_condition
* : supports_negation | supports_conjunction | supports_disjunction |
* supports_condition_in_parens
* ;
*/
var tokenStream = this._tokenStream,
ident;
if (tokenStream.match(Tokens.IDENT)) {
ident = tokenStream.token().value.toLowerCase();
if (ident === "not") {
tokenStream.mustMatch(Tokens.S);
this._supports_condition_in_parens();
} else {
tokenStream.unget();
}
} else {
this._supports_condition_in_parens();
this._readWhitespace();
while (tokenStream.peek() === Tokens.IDENT) {
ident = tokenStream.LT(1).value.toLowerCase();
if (ident === "and" || ident === "or") {
tokenStream.mustMatch(Tokens.IDENT);
this._readWhitespace();
this._supports_condition_in_parens();
this._readWhitespace();
}
}
}
},
_supports_condition_in_parens: function() {
/*
* supports_condition_in_parens
* : ( '(' S* supports_condition S* ')' ) | supports_declaration_condition |
* general_enclosed
* ;
*/
var tokenStream = this._tokenStream,
ident;
if (tokenStream.match(Tokens.LPAREN)) {
this._readWhitespace();
if (tokenStream.match(Tokens.IDENT)) {
// look ahead for not keyword, if not given, continue with declaration condition.
ident = tokenStream.token().value.toLowerCase();
if (ident === "not") {
this._readWhitespace();
this._supports_condition();
this._readWhitespace();
tokenStream.mustMatch(Tokens.RPAREN);
} else {
tokenStream.unget();
this._supports_declaration_condition(false);
}
} else {
this._supports_condition();
this._readWhitespace();
tokenStream.mustMatch(Tokens.RPAREN);
}
} else {
this._supports_declaration_condition();
}
},
_supports_declaration_condition: function(requireStartParen) {
/*
* supports_declaration_condition
* : '(' S* declaration ')'
* ;
*/
var tokenStream = this._tokenStream;
if (requireStartParen !== false) {
tokenStream.mustMatch(Tokens.LPAREN);
}
this._readWhitespace();
this._declaration();
tokenStream.mustMatch(Tokens.RPAREN);
},
_media: function() {
/*
* media
* : MEDIA_SYM S* media_query_list S* '{' S* ruleset* '}' S*
* ;
*/
var tokenStream = this._tokenStream,
line,
col,
mediaList;// = [];
//look for @media
tokenStream.mustMatch(Tokens.MEDIA_SYM);
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
this._readWhitespace();
mediaList = this._media_query_list();
tokenStream.mustMatch(Tokens.LBRACE);
this._readWhitespace();
this.fire({
type: "startmedia",
media: mediaList,
line: line,
col: col
});
while (true) {
if (tokenStream.peek() === Tokens.PAGE_SYM) {
this._page();
} else if (tokenStream.peek() === Tokens.FONT_FACE_SYM) {
this._font_face();
} else if (tokenStream.peek() === Tokens.VIEWPORT_SYM) {
this._viewport();
} else if (tokenStream.peek() === Tokens.DOCUMENT_SYM) {
this._document();
} else if (tokenStream.peek() === Tokens.SUPPORTS_SYM) {
this._supports();
} else if (tokenStream.peek() === Tokens.MEDIA_SYM) {
this._media();
} else if (!this._ruleset()) {
break;
}
}
tokenStream.mustMatch(Tokens.RBRACE);
this._readWhitespace();
this.fire({
type: "endmedia",
media: mediaList,
line: line,
col: col
});
},
//CSS3 Media Queries
_media_query_list: function() {
/*
* media_query_list
* : S* [media_query [ ',' S* media_query ]* ]?
* ;
*/
var tokenStream = this._tokenStream,
mediaList = [];
this._readWhitespace();
if (tokenStream.peek() === Tokens.IDENT || tokenStream.peek() === Tokens.LPAREN) {
mediaList.push(this._media_query());
}
while (tokenStream.match(Tokens.COMMA)) {
this._readWhitespace();
mediaList.push(this._media_query());
}
return mediaList;
},
/*
* Note: "expression" in the grammar maps to the _media_expression
* method.
*/
_media_query: function() {
/*
* media_query
* : [ONLY | NOT]? S* media_type S* [ AND S* expression ]*
* | expression [ AND S* expression ]*
* ;
*/
var tokenStream = this._tokenStream,
type = null,
ident = null,
token = null,
expressions = [];
if (tokenStream.match(Tokens.IDENT)) {
ident = tokenStream.token().value.toLowerCase();
//since there's no custom tokens for these, need to manually check
if (ident !== "only" && ident !== "not") {
tokenStream.unget();
ident = null;
} else {
token = tokenStream.token();
}
}
this._readWhitespace();
if (tokenStream.peek() === Tokens.IDENT) {
type = this._media_type();
if (token === null) {
token = tokenStream.token();
}
} else if (tokenStream.peek() === Tokens.LPAREN) {
if (token === null) {
token = tokenStream.LT(1);
}
expressions.push(this._media_expression());
}
if (type === null && expressions.length === 0) {
return null;
} else {
this._readWhitespace();
while (tokenStream.match(Tokens.IDENT)) {
if (tokenStream.token().value.toLowerCase() !== "and") {
this._unexpectedToken(tokenStream.token());
}
this._readWhitespace();
expressions.push(this._media_expression());
}
}
return new MediaQuery(ident, type, expressions, token.startLine, token.startCol);
},
//CSS3 Media Queries
_media_type: function() {
/*
* media_type
* : IDENT
* ;
*/
return this._media_feature();
},
/**
* Note: in CSS3 Media Queries, this is called "expression".
* Renamed here to avoid conflict with CSS3 Selectors
* definition of "expression". Also note that "expr" in the
* grammar now maps to "expression" from CSS3 selectors.
* @method _media_expression
* @private
*/
_media_expression: function() {
/*
* expression
* : '(' S* media_feature S* [ ':' S* expr ]? ')' S*
* ;
*/
var tokenStream = this._tokenStream,
feature = null,
token,
expression = null;
tokenStream.mustMatch(Tokens.LPAREN);
feature = this._media_feature();
this._readWhitespace();
if (tokenStream.match(Tokens.COLON)) {
this._readWhitespace();
token = tokenStream.LT(1);
expression = this._expression();
}
tokenStream.mustMatch(Tokens.RPAREN);
this._readWhitespace();
return new MediaFeature(feature, expression ? new SyntaxUnit(expression, token.startLine, token.startCol) : null);
},
//CSS3 Media Queries
_media_feature: function() {
/*
* media_feature
* : IDENT
* ;
*/
var tokenStream = this._tokenStream;
this._readWhitespace();
tokenStream.mustMatch(Tokens.IDENT);
return SyntaxUnit.fromToken(tokenStream.token());
},
//CSS3 Paged Media
_page: function() {
/*
* page:
* PAGE_SYM S* IDENT? pseudo_page? S*
* '{' S* [ declaration | margin ]? [ ';' S* [ declaration | margin ]? ]* '}' S*
* ;
*/
var tokenStream = this._tokenStream,
line,
col,
identifier = null,
pseudoPage = null;
//look for @page
tokenStream.mustMatch(Tokens.PAGE_SYM);
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
this._readWhitespace();
if (tokenStream.match(Tokens.IDENT)) {
identifier = tokenStream.token().value;
//The value 'auto' may not be used as a page name and MUST be treated as a syntax error.
if (identifier.toLowerCase() === "auto") {
this._unexpectedToken(tokenStream.token());
}
}
//see if there's a colon upcoming
if (tokenStream.peek() === Tokens.COLON) {
pseudoPage = this._pseudo_page();
}
this._readWhitespace();
this.fire({
type: "startpage",
id: identifier,
pseudo: pseudoPage,
line: line,
col: col
});
this._readDeclarations(true, true);
this.fire({
type: "endpage",
id: identifier,
pseudo: pseudoPage,
line: line,
col: col
});
},
//CSS3 Paged Media
_margin: function() {
/*
* margin :
* margin_sym S* '{' declaration [ ';' S* declaration? ]* '}' S*
* ;
*/
var tokenStream = this._tokenStream,
line,
col,
marginSym = this._margin_sym();
if (marginSym) {
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
this.fire({
type: "startpagemargin",
margin: marginSym,
line: line,
col: col
});
this._readDeclarations(true);
this.fire({
type: "endpagemargin",
margin: marginSym,
line: line,
col: col
});
return true;
} else {
return false;
}
},
//CSS3 Paged Media
_margin_sym: function() {
/*
* margin_sym :
* TOPLEFTCORNER_SYM |
* TOPLEFT_SYM |
* TOPCENTER_SYM |
* TOPRIGHT_SYM |
* TOPRIGHTCORNER_SYM |
* BOTTOMLEFTCORNER_SYM |
* BOTTOMLEFT_SYM |
* BOTTOMCENTER_SYM |
* BOTTOMRIGHT_SYM |
* BOTTOMRIGHTCORNER_SYM |
* LEFTTOP_SYM |
* LEFTMIDDLE_SYM |
* LEFTBOTTOM_SYM |
* RIGHTTOP_SYM |
* RIGHTMIDDLE_SYM |
* RIGHTBOTTOM_SYM
* ;
*/
var tokenStream = this._tokenStream;
if (tokenStream.match([Tokens.TOPLEFTCORNER_SYM, Tokens.TOPLEFT_SYM,
Tokens.TOPCENTER_SYM, Tokens.TOPRIGHT_SYM, Tokens.TOPRIGHTCORNER_SYM,
Tokens.BOTTOMLEFTCORNER_SYM, Tokens.BOTTOMLEFT_SYM,
Tokens.BOTTOMCENTER_SYM, Tokens.BOTTOMRIGHT_SYM,
Tokens.BOTTOMRIGHTCORNER_SYM, Tokens.LEFTTOP_SYM,
Tokens.LEFTMIDDLE_SYM, Tokens.LEFTBOTTOM_SYM, Tokens.RIGHTTOP_SYM,
Tokens.RIGHTMIDDLE_SYM, Tokens.RIGHTBOTTOM_SYM])) {
return SyntaxUnit.fromToken(tokenStream.token());
} else {
return null;
}
},
_pseudo_page: function() {
/*
* pseudo_page
* : ':' IDENT
* ;
*/
var tokenStream = this._tokenStream;
tokenStream.mustMatch(Tokens.COLON);
tokenStream.mustMatch(Tokens.IDENT);
//TODO: CSS3 Paged Media says only "left", "center", and "right" are allowed
return tokenStream.token().value;
},
_font_face: function() {
/*
* font_face
* : FONT_FACE_SYM S*
* '{' S* declaration [ ';' S* declaration ]* '}' S*
* ;
*/
var tokenStream = this._tokenStream,
line,
col;
//look for @page
tokenStream.mustMatch(Tokens.FONT_FACE_SYM);
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
this._readWhitespace();
this.fire({
type: "startfontface",
line: line,
col: col
});
this._readDeclarations(true);
this.fire({
type: "endfontface",
line: line,
col: col
});
},
_viewport: function() {
/*
* viewport
* : VIEWPORT_SYM S*
* '{' S* declaration? [ ';' S* declaration? ]* '}' S*
* ;
*/
var tokenStream = this._tokenStream,
line,
col;
tokenStream.mustMatch(Tokens.VIEWPORT_SYM);
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
this._readWhitespace();
this.fire({
type: "startviewport",
line: line,
col: col
});
this._readDeclarations(true);
this.fire({
type: "endviewport",
line: line,
col: col
});
},
_document: function() {
/*
* document
* : DOCUMENT_SYM S*
* _document_function [ ',' S* _document_function ]* S*
* '{' S* ruleset* '}'
* ;
*/
var tokenStream = this._tokenStream,
token,
functions = [],
prefix = "";
tokenStream.mustMatch(Tokens.DOCUMENT_SYM);
token = tokenStream.token();
if (/^@\-([^\-]+)\-/.test(token.value)) {
prefix = RegExp.$1;
}
this._readWhitespace();
functions.push(this._document_function());
while (tokenStream.match(Tokens.COMMA)) {
this._readWhitespace();
functions.push(this._document_function());
}
tokenStream.mustMatch(Tokens.LBRACE);
this._readWhitespace();
this.fire({
type: "startdocument",
functions: functions,
prefix: prefix,
line: token.startLine,
col: token.startCol
});
var ok = true;
while (ok) {
switch (tokenStream.peek()) {
case Tokens.PAGE_SYM:
this._page();
break;
case Tokens.FONT_FACE_SYM:
this._font_face();
break;
case Tokens.VIEWPORT_SYM:
this._viewport();
break;
case Tokens.MEDIA_SYM:
this._media();
break;
case Tokens.KEYFRAMES_SYM:
this._keyframes();
break;
case Tokens.DOCUMENT_SYM:
this._document();
break;
default:
ok = Boolean(this._ruleset());
}
}
tokenStream.mustMatch(Tokens.RBRACE);
token = tokenStream.token();
this._readWhitespace();
this.fire({
type: "enddocument",
functions: functions,
prefix: prefix,
line: token.startLine,
col: token.startCol
});
},
_document_function: function() {
/*
* document_function
* : function | URI S*
* ;
*/
var tokenStream = this._tokenStream,
value;
if (tokenStream.match(Tokens.URI)) {
value = tokenStream.token().value;
this._readWhitespace();
} else {
value = this._function();
}
return value;
},
_operator: function(inFunction) {
/*
* operator (outside function)
* : '/' S* | ',' S* | /( empty )/
* operator (inside function)
* : '/' S* | '+' S* | '*' S* | '-' S* /( empty )/
* ;
*/
var tokenStream = this._tokenStream,
token = null;
if (tokenStream.match([Tokens.SLASH, Tokens.COMMA]) ||
(inFunction && tokenStream.match([Tokens.PLUS, Tokens.STAR, Tokens.MINUS]))) {
token = tokenStream.token();
this._readWhitespace();
}
return token ? PropertyValuePart.fromToken(token) : null;
},
_combinator: function() {
/*
* combinator
* : PLUS S* | GREATER S* | TILDE S* | S+
* ;
*/
var tokenStream = this._tokenStream,
value = null,
token;
if (tokenStream.match([Tokens.PLUS, Tokens.GREATER, Tokens.TILDE])) {
token = tokenStream.token();
value = new Combinator(token.value, token.startLine, token.startCol);
this._readWhitespace();
}
return value;
},
_unary_operator: function() {
/*
* unary_operator
* : '-' | '+'
* ;
*/
var tokenStream = this._tokenStream;
if (tokenStream.match([Tokens.MINUS, Tokens.PLUS])) {
return tokenStream.token().value;
} else {
return null;
}
},
_property: function() {
/*
* property
* : IDENT S*
* ;
*/
var tokenStream = this._tokenStream,
value = null,
hack = null,
tokenValue,
token,
line,
col;
//check for star hack - throws error if not allowed
if (tokenStream.peek() === Tokens.STAR && this.options.starHack) {
tokenStream.get();
token = tokenStream.token();
hack = token.value;
line = token.startLine;
col = token.startCol;
}
if (tokenStream.match(Tokens.IDENT)) {
token = tokenStream.token();
tokenValue = token.value;
//check for underscore hack - no error if not allowed because it's valid CSS syntax
if (tokenValue.charAt(0) === "_" && this.options.underscoreHack) {
hack = "_";
tokenValue = tokenValue.substring(1);
}
value = new PropertyName(tokenValue, hack, (line||token.startLine), (col||token.startCol));
this._readWhitespace();
}
return value;
},
//Augmented with CSS3 Selectors
_ruleset: function() {
/*
* ruleset
* : selectors_group
* '{' S* declaration? [ ';' S* declaration? ]* '}' S*
* ;
*/
var tokenStream = this._tokenStream,
tt,
selectors;
/*
* Error Recovery: If even a single selector fails to parse,
* then the entire ruleset should be thrown away.
*/
try {
selectors = this._selectors_group();
} catch (ex) {
if (ex instanceof SyntaxError && !this.options.strict) {
//fire error event
this.fire({
type: "error",
error: ex,
message: ex.message,
line: ex.line,
col: ex.col
});
//skip over everything until closing brace
tt = tokenStream.advance([Tokens.RBRACE]);
if (tt === Tokens.RBRACE) {
//if there's a right brace, the rule is finished so don't do anything
} else {
//otherwise, rethrow the error because it wasn't handled properly
throw ex;
}
} else {
//not a syntax error, rethrow it
throw ex;
}
//trigger parser to continue
return true;
}
//if it got here, all selectors parsed
if (selectors) {
this.fire({
type: "startrule",
selectors: selectors,
line: selectors[0].line,
col: selectors[0].col
});
this._readDeclarations(true);
this.fire({
type: "endrule",
selectors: selectors,
line: selectors[0].line,
col: selectors[0].col
});
}
return selectors;
},
//CSS3 Selectors
_selectors_group: function() {
/*
* selectors_group
* : selector [ COMMA S* selector ]*
* ;
*/
var tokenStream = this._tokenStream,
selectors = [],
selector;
selector = this._selector();
if (selector !== null) {
selectors.push(selector);
while (tokenStream.match(Tokens.COMMA)) {
this._readWhitespace();
selector = this._selector();
if (selector !== null) {
selectors.push(selector);
} else {
this._unexpectedToken(tokenStream.LT(1));
}
}
}
return selectors.length ? selectors : null;
},
//CSS3 Selectors
_selector: function() {
/*
* selector
* : simple_selector_sequence [ combinator simple_selector_sequence ]*
* ;
*/
var tokenStream = this._tokenStream,
selector = [],
nextSelector = null,
combinator = null,
ws = null;
//if there's no simple selector, then there's no selector
nextSelector = this._simple_selector_sequence();
if (nextSelector === null) {
return null;
}
selector.push(nextSelector);
do {
//look for a combinator
combinator = this._combinator();
if (combinator !== null) {
selector.push(combinator);
nextSelector = this._simple_selector_sequence();
//there must be a next selector
if (nextSelector === null) {
this._unexpectedToken(tokenStream.LT(1));
} else {
//nextSelector is an instance of SelectorPart
selector.push(nextSelector);
}
} else {
//if there's not whitespace, we're done
if (this._readWhitespace()) {
//add whitespace separator
ws = new Combinator(tokenStream.token().value, tokenStream.token().startLine, tokenStream.token().startCol);
//combinator is not required
combinator = this._combinator();
//selector is required if there's a combinator
nextSelector = this._simple_selector_sequence();
if (nextSelector === null) {
if (combinator !== null) {
this._unexpectedToken(tokenStream.LT(1));
}
} else {
if (combinator !== null) {
selector.push(combinator);
} else {
selector.push(ws);
}
selector.push(nextSelector);
}
} else {
break;
}
}
} while (true);
return new Selector(selector, selector[0].line, selector[0].col);
},
//CSS3 Selectors
_simple_selector_sequence: function() {
/*
* simple_selector_sequence
* : [ type_selector | universal ]
* [ HASH | class | attrib | pseudo | negation ]*
* | [ HASH | class | attrib | pseudo | negation ]+
* ;
*/
var tokenStream = this._tokenStream,
//parts of a simple selector
elementName = null,
modifiers = [],
//complete selector text
selectorText= "",
//the different parts after the element name to search for
components = [
//HASH
function() {
return tokenStream.match(Tokens.HASH) ?
new SelectorSubPart(tokenStream.token().value, "id", tokenStream.token().startLine, tokenStream.token().startCol) :
null;
},
this._class,
this._attrib,
this._pseudo,
this._negation
],
i = 0,
len = components.length,
component = null,
line,
col;
//get starting line and column for the selector
line = tokenStream.LT(1).startLine;
col = tokenStream.LT(1).startCol;
elementName = this._type_selector();
if (!elementName) {
elementName = this._universal();
}
if (elementName !== null) {
selectorText += elementName;
}
while (true) {
//whitespace means we're done
if (tokenStream.peek() === Tokens.S) {
break;
}
//check for each component
while (i < len && component === null) {
component = components[i++].call(this);
}
if (component === null) {
//we don't have a selector
if (selectorText === "") {
return null;
} else {
break;
}
} else {
i = 0;
modifiers.push(component);
selectorText += component.toString();
component = null;
}
}
return selectorText !== "" ?
new SelectorPart(elementName, modifiers, selectorText, line, col) :
null;
},
//CSS3 Selectors
_type_selector: function() {
/*
* type_selector
* : [ namespace_prefix ]? element_name
* ;
*/
var tokenStream = this._tokenStream,
ns = this._namespace_prefix(),
elementName = this._element_name();
if (!elementName) {
/*
* Need to back out the namespace that was read due to both
* type_selector and universal reading namespace_prefix
* first. Kind of hacky, but only way I can figure out
* right now how to not change the grammar.
*/
if (ns) {
tokenStream.unget();
if (ns.length > 1) {
tokenStream.unget();
}
}
return null;
} else {
if (ns) {
elementName.text = ns + elementName.text;
elementName.col -= ns.length;
}
return elementName;
}
},
//CSS3 Selectors
_class: function() {
/*
* class
* : '.' IDENT
* ;
*/
var tokenStream = this._tokenStream,
token;
if (tokenStream.match(Tokens.DOT)) {
tokenStream.mustMatch(Tokens.IDENT);
token = tokenStream.token();
return new SelectorSubPart("." + token.value, "class", token.startLine, token.startCol - 1);
} else {
return null;
}
},
//CSS3 Selectors
_element_name: function() {
/*
* element_name
* : IDENT
* ;
*/
var tokenStream = this._tokenStream,
token;
if (tokenStream.match(Tokens.IDENT)) {
token = tokenStream.token();
return new SelectorSubPart(token.value, "elementName", token.startLine, token.startCol);
} else {
return null;
}
},
//CSS3 Selectors
_namespace_prefix: function() {
/*
* namespace_prefix
* : [ IDENT | '*' ]? '|'
* ;
*/
var tokenStream = this._tokenStream,
value = "";
//verify that this is a namespace prefix
if (tokenStream.LA(1) === Tokens.PIPE || tokenStream.LA(2) === Tokens.PIPE) {
if (tokenStream.match([Tokens.IDENT, Tokens.STAR])) {
value += tokenStream.token().value;
}
tokenStream.mustMatch(Tokens.PIPE);
value += "|";
}
return value.length ? value : null;
},
//CSS3 Selectors
_universal: function() {
/*
* universal
* : [ namespace_prefix ]? '*'
* ;
*/
var tokenStream = this._tokenStream,
value = "",
ns;
ns = this._namespace_prefix();
if (ns) {
value += ns;
}
if (tokenStream.match(Tokens.STAR)) {
value += "*";
}
return value.length ? value : null;
},
//CSS3 Selectors
_attrib: function() {
/*
* attrib
* : '[' S* [ namespace_prefix ]? IDENT S*
* [ [ PREFIXMATCH |
* SUFFIXMATCH |
* SUBSTRINGMATCH |
* '=' |
* INCLUDES |
* DASHMATCH ] S* [ IDENT | STRING ] S*
* ]? ']'
* ;
*/
var tokenStream = this._tokenStream,
value = null,
ns,
token;
if (tokenStream.match(Tokens.LBRACKET)) {
token = tokenStream.token();
value = token.value;
value += this._readWhitespace();
ns = this._namespace_prefix();
if (ns) {
value += ns;
}
tokenStream.mustMatch(Tokens.IDENT);
value += tokenStream.token().value;
value += this._readWhitespace();
if (tokenStream.match([Tokens.PREFIXMATCH, Tokens.SUFFIXMATCH, Tokens.SUBSTRINGMATCH,
Tokens.EQUALS, Tokens.INCLUDES, Tokens.DASHMATCH])) {
value += tokenStream.token().value;
value += this._readWhitespace();
tokenStream.mustMatch([Tokens.IDENT, Tokens.STRING]);
value += tokenStream.token().value;
value += this._readWhitespace();
}
tokenStream.mustMatch(Tokens.RBRACKET);
return new SelectorSubPart(value + "]", "attribute", token.startLine, token.startCol);
} else {
return null;
}
},
//CSS3 Selectors
_pseudo: function() {
/*
* pseudo
* : ':' ':'? [ IDENT | functional_pseudo ]
* ;
*/
var tokenStream = this._tokenStream,
pseudo = null,
colons = ":",
line,
col;
if (tokenStream.match(Tokens.COLON)) {
if (tokenStream.match(Tokens.COLON)) {
colons += ":";
}
if (tokenStream.match(Tokens.IDENT)) {
pseudo = tokenStream.token().value;
line = tokenStream.token().startLine;
col = tokenStream.token().startCol - colons.length;
} else if (tokenStream.peek() === Tokens.FUNCTION) {
line = tokenStream.LT(1).startLine;
col = tokenStream.LT(1).startCol - colons.length;
pseudo = this._functional_pseudo();
}
if (pseudo) {
pseudo = new SelectorSubPart(colons + pseudo, "pseudo", line, col);
} else {
var startLine = tokenStream.LT(1).startLine,
startCol = tokenStream.LT(0).startCol;
throw new SyntaxError("Expected a `FUNCTION` or `IDENT` after colon at line " + startLine + ", col " + startCol + ".", startLine, startCol);
}
}
return pseudo;
},
//CSS3 Selectors
_functional_pseudo: function() {
/*
* functional_pseudo
* : FUNCTION S* expression ')'
* ;
*/
var tokenStream = this._tokenStream,
value = null;
if (tokenStream.match(Tokens.FUNCTION)) {
value = tokenStream.token().value;
value += this._readWhitespace();
value += this._expression();
tokenStream.mustMatch(Tokens.RPAREN);
value += ")";
}
return value;
},
//CSS3 Selectors
_expression: function() {
/*
* expression
* : [ [ PLUS | '-' | DIMENSION | NUMBER | STRING | IDENT ] S* ]+
* ;
*/
var tokenStream = this._tokenStream,
value = "";
while (tokenStream.match([Tokens.PLUS, Tokens.MINUS, Tokens.DIMENSION,
Tokens.NUMBER, Tokens.STRING, Tokens.IDENT, Tokens.LENGTH,
Tokens.FREQ, Tokens.ANGLE, Tokens.TIME,
Tokens.RESOLUTION, Tokens.SLASH])) {
value += tokenStream.token().value;
value += this._readWhitespace();
}
return value.length ? value : null;
},
//CSS3 Selectors
_negation: function() {
/*
* negation
* : NOT S* negation_arg S* ')'
* ;
*/
var tokenStream = this._tokenStream,
line,
col,
value = "",
arg,
subpart = null;
if (tokenStream.match(Tokens.NOT)) {
value = tokenStream.token().value;
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
value += this._readWhitespace();
arg = this._negation_arg();
value += arg;
value += this._readWhitespace();
tokenStream.match(Tokens.RPAREN);
value += tokenStream.token().value;
subpart = new SelectorSubPart(value, "not", line, col);
subpart.args.push(arg);
}
return subpart;
},
//CSS3 Selectors
_negation_arg: function() {
/*
* negation_arg
* : type_selector | universal | HASH | class | attrib | pseudo
* ;
*/
var tokenStream = this._tokenStream,
args = [
this._type_selector,
this._universal,
function() {
return tokenStream.match(Tokens.HASH) ?
new SelectorSubPart(tokenStream.token().value, "id", tokenStream.token().startLine, tokenStream.token().startCol) :
null;
},
this._class,
this._attrib,
this._pseudo
],
arg = null,
i = 0,
len = args.length,
line,
col,
part;
line = tokenStream.LT(1).startLine;
col = tokenStream.LT(1).startCol;
while (i < len && arg === null) {
arg = args[i].call(this);
i++;
}
//must be a negation arg
if (arg === null) {
this._unexpectedToken(tokenStream.LT(1));
}
//it's an element name
if (arg.type === "elementName") {
part = new SelectorPart(arg, [], arg.toString(), line, col);
} else {
part = new SelectorPart(null, [arg], arg.toString(), line, col);
}
return part;
},
_declaration: function() {
/*
* declaration
* : property ':' S* expr prio?
* | /( empty )/
* ;
*/
var tokenStream = this._tokenStream,
property = null,
expr = null,
prio = null,
invalid = null,
propertyName= "";
property = this._property();
if (property !== null) {
tokenStream.mustMatch(Tokens.COLON);
this._readWhitespace();
expr = this._expr();
//if there's no parts for the value, it's an error
if (!expr || expr.length === 0) {
this._unexpectedToken(tokenStream.LT(1));
}
prio = this._prio();
/*
* If hacks should be allowed, then only check the root
* property. If hacks should not be allowed, treat
* _property or *property as invalid properties.
*/
propertyName = property.toString();
if (this.options.starHack && property.hack === "*" ||
this.options.underscoreHack && property.hack === "_") {
propertyName = property.text;
}
try {
this._validateProperty(propertyName, expr);
} catch (ex) {
invalid = ex;
}
this.fire({
type: "property",
property: property,
value: expr,
important: prio,
line: property.line,
col: property.col,
invalid: invalid
});
return true;
} else {
return false;
}
},
_prio: function() {
/*
* prio
* : IMPORTANT_SYM S*
* ;
*/
var tokenStream = this._tokenStream,
result = tokenStream.match(Tokens.IMPORTANT_SYM);
this._readWhitespace();
return result;
},
_expr: function(inFunction) {
/*
* expr
* : term [ operator term ]*
* ;
*/
var values = [],
//valueParts = [],
value = null,
operator = null;
value = this._term(inFunction);
if (value !== null) {
values.push(value);
do {
operator = this._operator(inFunction);
//if there's an operator, keep building up the value parts
if (operator) {
values.push(operator);
} /*else {
//if there's not an operator, you have a full value
values.push(new PropertyValue(valueParts, valueParts[0].line, valueParts[0].col));
valueParts = [];
}*/
value = this._term(inFunction);
if (value === null) {
break;
} else {
values.push(value);
}
} while (true);
}
//cleanup
/*if (valueParts.length) {
values.push(new PropertyValue(valueParts, valueParts[0].line, valueParts[0].col));
}*/
return values.length > 0 ? new PropertyValue(values, values[0].line, values[0].col) : null;
},
_term: function(inFunction) {
/*
* term
* : unary_operator?
* [ NUMBER S* | PERCENTAGE S* | LENGTH S* | ANGLE S* |
* TIME S* | FREQ S* | function | ie_function ]
* | STRING S* | IDENT S* | URI S* | UNICODERANGE S* | hexcolor
* ;
*/
var tokenStream = this._tokenStream,
unary = null,
value = null,
endChar = null,
part = null,
token,
line,
col;
//returns the operator or null
unary = this._unary_operator();
if (unary !== null) {
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
}
//exception for IE filters
if (tokenStream.peek() === Tokens.IE_FUNCTION && this.options.ieFilters) {
value = this._ie_function();
if (unary === null) {
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
}
//see if it's a simple block
} else if (inFunction && tokenStream.match([Tokens.LPAREN, Tokens.LBRACE, Tokens.LBRACKET])) {
token = tokenStream.token();
endChar = token.endChar;
value = token.value + this._expr(inFunction).text;
if (unary === null) {
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
}
tokenStream.mustMatch(Tokens.type(endChar));
value += endChar;
this._readWhitespace();
//see if there's a simple match
} else if (tokenStream.match([Tokens.NUMBER, Tokens.PERCENTAGE, Tokens.LENGTH,
Tokens.ANGLE, Tokens.TIME,
Tokens.FREQ, Tokens.STRING, Tokens.IDENT, Tokens.URI, Tokens.UNICODE_RANGE])) {
value = tokenStream.token().value;
if (unary === null) {
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
// Correct potentially-inaccurate IDENT parsing in
// PropertyValuePart constructor.
part = PropertyValuePart.fromToken(tokenStream.token());
}
this._readWhitespace();
} else {
//see if it's a color
token = this._hexcolor();
if (token === null) {
//if there's no unary, get the start of the next token for line/col info
if (unary === null) {
line = tokenStream.LT(1).startLine;
col = tokenStream.LT(1).startCol;
}
//has to be a function
if (value === null) {
/*
* This checks for alpha(opacity=0) style of IE
* functions. IE_FUNCTION only presents progid: style.
*/
if (tokenStream.LA(3) === Tokens.EQUALS && this.options.ieFilters) {
value = this._ie_function();
} else {
value = this._function();
}
}
/*if (value === null) {
return null;
//throw new Error("Expected identifier at line " + tokenStream.token().startLine + ", character " + tokenStream.token().startCol + ".");
}*/
} else {
value = token.value;
if (unary === null) {
line = token.startLine;
col = token.startCol;
}
}
}
return part !== null ? part : value !== null ?
new PropertyValuePart(unary !== null ? unary + value : value, line, col) :
null;
},
_function: function() {
/*
* function
* : FUNCTION S* expr ')' S*
* ;
*/
var tokenStream = this._tokenStream,
functionText = null,
expr = null,
lt;
if (tokenStream.match(Tokens.FUNCTION)) {
functionText = tokenStream.token().value;
this._readWhitespace();
expr = this._expr(true);
functionText += expr;
//START: Horrible hack in case it's an IE filter
if (this.options.ieFilters && tokenStream.peek() === Tokens.EQUALS) {
do {
if (this._readWhitespace()) {
functionText += tokenStream.token().value;
}
//might be second time in the loop
if (tokenStream.LA(0) === Tokens.COMMA) {
functionText += tokenStream.token().value;
}
tokenStream.match(Tokens.IDENT);
functionText += tokenStream.token().value;
tokenStream.match(Tokens.EQUALS);
functionText += tokenStream.token().value;
//functionText += this._term();
lt = tokenStream.peek();
while (lt !== Tokens.COMMA && lt !== Tokens.S && lt !== Tokens.RPAREN) {
tokenStream.get();
functionText += tokenStream.token().value;
lt = tokenStream.peek();
}
} while (tokenStream.match([Tokens.COMMA, Tokens.S]));
}
//END: Horrible Hack
tokenStream.match(Tokens.RPAREN);
functionText += ")";
this._readWhitespace();
}
return functionText;
},
_ie_function: function() {
/* (My own extension)
* ie_function
* : IE_FUNCTION S* IDENT '=' term [S* ','? IDENT '=' term]+ ')' S*
* ;
*/
var tokenStream = this._tokenStream,
functionText = null,
lt;
//IE function can begin like a regular function, too
if (tokenStream.match([Tokens.IE_FUNCTION, Tokens.FUNCTION])) {
functionText = tokenStream.token().value;
do {
if (this._readWhitespace()) {
functionText += tokenStream.token().value;
}
//might be second time in the loop
if (tokenStream.LA(0) === Tokens.COMMA) {
functionText += tokenStream.token().value;
}
tokenStream.match(Tokens.IDENT);
functionText += tokenStream.token().value;
tokenStream.match(Tokens.EQUALS);
functionText += tokenStream.token().value;
//functionText += this._term();
lt = tokenStream.peek();
while (lt !== Tokens.COMMA && lt !== Tokens.S && lt !== Tokens.RPAREN) {
tokenStream.get();
functionText += tokenStream.token().value;
lt = tokenStream.peek();
}
} while (tokenStream.match([Tokens.COMMA, Tokens.S]));
tokenStream.match(Tokens.RPAREN);
functionText += ")";
this._readWhitespace();
}
return functionText;
},
_hexcolor: function() {
/*
* There is a constraint on the color that it must
* have either 3 or 6 hex-digits (i.e., [0-9a-fA-F])
* after the "#"; e.g., "#000" is OK, but "#abcd" is not.
*
* hexcolor
* : HASH S*
* ;
*/
var tokenStream = this._tokenStream,
token = null,
color;
if (tokenStream.match(Tokens.HASH)) {
//need to do some validation here
token = tokenStream.token();
color = token.value;
if (!/#[a-f0-9]{3,6}/i.test(color)) {
throw new SyntaxError("Expected a hex color but found '" + color + "' at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol);
}
this._readWhitespace();
}
return token;
},
//-----------------------------------------------------------------
// Animations methods
//-----------------------------------------------------------------
_keyframes: function() {
/*
* keyframes:
* : KEYFRAMES_SYM S* keyframe_name S* '{' S* keyframe_rule* '}' {
* ;
*/
var tokenStream = this._tokenStream,
token,
tt,
name,
prefix = "";
tokenStream.mustMatch(Tokens.KEYFRAMES_SYM);
token = tokenStream.token();
if (/^@\-([^\-]+)\-/.test(token.value)) {
prefix = RegExp.$1;
}
this._readWhitespace();
name = this._keyframe_name();
this._readWhitespace();
tokenStream.mustMatch(Tokens.LBRACE);
this.fire({
type: "startkeyframes",
name: name,
prefix: prefix,
line: token.startLine,
col: token.startCol
});
this._readWhitespace();
tt = tokenStream.peek();
//check for key
while (tt === Tokens.IDENT || tt === Tokens.PERCENTAGE) {
this._keyframe_rule();
this._readWhitespace();
tt = tokenStream.peek();
}
this.fire({
type: "endkeyframes",
name: name,
prefix: prefix,
line: token.startLine,
col: token.startCol
});
this._readWhitespace();
tokenStream.mustMatch(Tokens.RBRACE);
this._readWhitespace();
},
_keyframe_name: function() {
/*
* keyframe_name:
* : IDENT
* | STRING
* ;
*/
var tokenStream = this._tokenStream;
tokenStream.mustMatch([Tokens.IDENT, Tokens.STRING]);
return SyntaxUnit.fromToken(tokenStream.token());
},
_keyframe_rule: function() {
/*
* keyframe_rule:
* : key_list S*
* '{' S* declaration [ ';' S* declaration ]* '}' S*
* ;
*/
var keyList = this._key_list();
this.fire({
type: "startkeyframerule",
keys: keyList,
line: keyList[0].line,
col: keyList[0].col
});
this._readDeclarations(true);
this.fire({
type: "endkeyframerule",
keys: keyList,
line: keyList[0].line,
col: keyList[0].col
});
},
_key_list: function() {
/*
* key_list:
* : key [ S* ',' S* key]*
* ;
*/
var tokenStream = this._tokenStream,
keyList = [];
//must be least one key
keyList.push(this._key());
this._readWhitespace();
while (tokenStream.match(Tokens.COMMA)) {
this._readWhitespace();
keyList.push(this._key());
this._readWhitespace();
}
return keyList;
},
_key: function() {
/*
* There is a restriction that IDENT can be only "from" or "to".
*
* key
* : PERCENTAGE
* | IDENT
* ;
*/
var tokenStream = this._tokenStream,
token;
if (tokenStream.match(Tokens.PERCENTAGE)) {
return SyntaxUnit.fromToken(tokenStream.token());
} else if (tokenStream.match(Tokens.IDENT)) {
token = tokenStream.token();
if (/from|to/i.test(token.value)) {
return SyntaxUnit.fromToken(token);
}
tokenStream.unget();
}
//if it gets here, there wasn't a valid token, so time to explode
this._unexpectedToken(tokenStream.LT(1));
},
//-----------------------------------------------------------------
// Helper methods
//-----------------------------------------------------------------
/**
* Not part of CSS grammar, but useful for skipping over
* combination of white space and HTML-style comments.
* @return {void}
* @method _skipCruft
* @private
*/
_skipCruft: function() {
while (this._tokenStream.match([Tokens.S, Tokens.CDO, Tokens.CDC])) {
//noop
}
},
/**
* Not part of CSS grammar, but this pattern occurs frequently
* in the official CSS grammar. Split out here to eliminate
* duplicate code.
* @param {Boolean} checkStart Indicates if the rule should check
* for the left brace at the beginning.
* @param {Boolean} readMargins Indicates if the rule should check
* for margin patterns.
* @return {void}
* @method _readDeclarations
* @private
*/
_readDeclarations: function(checkStart, readMargins) {
/*
* Reads the pattern
* S* '{' S* declaration [ ';' S* declaration ]* '}' S*
* or
* S* '{' S* [ declaration | margin ]? [ ';' S* [ declaration | margin ]? ]* '}' S*
* Note that this is how it is described in CSS3 Paged Media, but is actually incorrect.
* A semicolon is only necessary following a declaration if there's another declaration
* or margin afterwards.
*/
var tokenStream = this._tokenStream,
tt;
this._readWhitespace();
if (checkStart) {
tokenStream.mustMatch(Tokens.LBRACE);
}
this._readWhitespace();
try {
while (true) {
if (tokenStream.match(Tokens.SEMICOLON) || (readMargins && this._margin())) {
//noop
} else if (this._declaration()) {
if (!tokenStream.match(Tokens.SEMICOLON)) {
break;
}
} else {
break;
}
//if ((!this._margin() && !this._declaration()) || !tokenStream.match(Tokens.SEMICOLON)){
// break;
//}
this._readWhitespace();
}
tokenStream.mustMatch(Tokens.RBRACE);
this._readWhitespace();
} catch (ex) {
if (ex instanceof SyntaxError && !this.options.strict) {
//fire error event
this.fire({
type: "error",
error: ex,
message: ex.message,
line: ex.line,
col: ex.col
});
//see if there's another declaration
tt = tokenStream.advance([Tokens.SEMICOLON, Tokens.RBRACE]);
if (tt === Tokens.SEMICOLON) {
//if there's a semicolon, then there might be another declaration
this._readDeclarations(false, readMargins);
} else if (tt !== Tokens.RBRACE) {
//if there's a right brace, the rule is finished so don't do anything
//otherwise, rethrow the error because it wasn't handled properly
throw ex;
}
} else {
//not a syntax error, rethrow it
throw ex;
}
}
},
/**
* In some cases, you can end up with two white space tokens in a
* row. Instead of making a change in every function that looks for
* white space, this function is used to match as much white space
* as necessary.
* @method _readWhitespace
* @return {String} The white space if found, empty string if not.
* @private
*/
_readWhitespace: function() {
var tokenStream = this._tokenStream,
ws = "";
while (tokenStream.match(Tokens.S)) {
ws += tokenStream.token().value;
}
return ws;
},
/**
* Throws an error when an unexpected token is found.
* @param {Object} token The token that was found.
* @method _unexpectedToken
* @return {void}
* @private
*/
_unexpectedToken: function(token) {
throw new SyntaxError("Unexpected token '" + token.value + "' at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol);
},
/**
* Helper method used for parsing subparts of a style sheet.
* @return {void}
* @method _verifyEnd
* @private
*/
_verifyEnd: function() {
if (this._tokenStream.LA(1) !== Tokens.EOF) {
this._unexpectedToken(this._tokenStream.LT(1));
}
},
//-----------------------------------------------------------------
// Validation methods
//-----------------------------------------------------------------
_validateProperty: function(property, value) {
Validation.validate(property, value);
},
//-----------------------------------------------------------------
// Parsing methods
//-----------------------------------------------------------------
parse: function(input) {
this._tokenStream = new TokenStream(input, Tokens);
this._stylesheet();
},
parseStyleSheet: function(input) {
//just passthrough
return this.parse(input);
},
parseMediaQuery: function(input) {
this._tokenStream = new TokenStream(input, Tokens);
var result = this._media_query();
//if there's anything more, then it's an invalid selector
this._verifyEnd();
//otherwise return result
return result;
},
/**
* Parses a property value (everything after the semicolon).
* @return {parserlib.css.PropertyValue} The property value.
* @throws parserlib.util.SyntaxError If an unexpected token is found.
* @method parserPropertyValue
*/
parsePropertyValue: function(input) {
this._tokenStream = new TokenStream(input, Tokens);
this._readWhitespace();
var result = this._expr();
//okay to have a trailing white space
this._readWhitespace();
//if there's anything more, then it's an invalid selector
this._verifyEnd();
//otherwise return result
return result;
},
/**
* Parses a complete CSS rule, including selectors and
* properties.
* @param {String} input The text to parser.
* @return {Boolean} True if the parse completed successfully, false if not.
* @method parseRule
*/
parseRule: function(input) {
this._tokenStream = new TokenStream(input, Tokens);
//skip any leading white space
this._readWhitespace();
var result = this._ruleset();
//skip any trailing white space
this._readWhitespace();
//if there's anything more, then it's an invalid selector
this._verifyEnd();
//otherwise return result
return result;
},
/**
* Parses a single CSS selector (no comma)
* @param {String} input The text to parse as a CSS selector.
* @return {Selector} An object representing the selector.
* @throws parserlib.util.SyntaxError If an unexpected token is found.
* @method parseSelector
*/
parseSelector: function(input) {
this._tokenStream = new TokenStream(input, Tokens);
//skip any leading white space
this._readWhitespace();
var result = this._selector();
//skip any trailing white space
this._readWhitespace();
//if there's anything more, then it's an invalid selector
this._verifyEnd();
//otherwise return result
return result;
},
/**
* Parses an HTML style attribute: a set of CSS declarations
* separated by semicolons.
* @param {String} input The text to parse as a style attribute
* @return {void}
* @method parseStyleAttribute
*/
parseStyleAttribute: function(input) {
input += "}"; // for error recovery in _readDeclarations()
this._tokenStream = new TokenStream(input, Tokens);
this._readDeclarations();
}
};
//copy over onto prototype
for (prop in additions) {
if (Object.prototype.hasOwnProperty.call(additions, prop)) {
proto[prop] = additions[prop];
}
}
return proto;
}();
/*
nth
: S* [ ['-'|'+']? INTEGER? {N} [ S* ['-'|'+'] S* INTEGER ]? |
['-'|'+']? INTEGER | {O}{D}{D} | {E}{V}{E}{N} ] S*
;
*/
},{"../util/EventTarget":23,"../util/SyntaxError":25,"../util/SyntaxUnit":26,"./Combinator":2,"./MediaFeature":4,"./MediaQuery":5,"./PropertyName":8,"./PropertyValue":9,"./PropertyValuePart":11,"./Selector":13,"./SelectorPart":14,"./SelectorSubPart":15,"./TokenStream":17,"./Tokens":18,"./Validation":19}],7:[function(require,module,exports){
"use strict";
/* exported Properties */
var Properties = module.exports = {
__proto__: null,
//A
"align-items" : "flex-start | flex-end | center | baseline | stretch",
"align-content" : "flex-start | flex-end | center | space-between | space-around | stretch",
"align-self" : "auto | flex-start | flex-end | center | baseline | stretch",
"all" : "initial | inherit | unset",
"-webkit-align-items" : "flex-start | flex-end | center | baseline | stretch",
"-webkit-align-content" : "flex-start | flex-end | center | space-between | space-around | stretch",
"-webkit-align-self" : "auto | flex-start | flex-end | center | baseline | stretch",
"alignment-adjust" : "auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | <percentage> | <length>",
"alignment-baseline" : "auto | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
"animation" : 1,
"animation-delay" : "<time>#",
"animation-direction" : "<single-animation-direction>#",
"animation-duration" : "<time>#",
"animation-fill-mode" : "[ none | forwards | backwards | both ]#",
"animation-iteration-count" : "[ <number> | infinite ]#",
"animation-name" : "[ none | <single-animation-name> ]#",
"animation-play-state" : "[ running | paused ]#",
"animation-timing-function" : 1,
//vendor prefixed
"-moz-animation-delay" : "<time>#",
"-moz-animation-direction" : "[ normal | alternate ]#",
"-moz-animation-duration" : "<time>#",
"-moz-animation-iteration-count" : "[ <number> | infinite ]#",
"-moz-animation-name" : "[ none | <single-animation-name> ]#",
"-moz-animation-play-state" : "[ running | paused ]#",
"-ms-animation-delay" : "<time>#",
"-ms-animation-direction" : "[ normal | alternate ]#",
"-ms-animation-duration" : "<time>#",
"-ms-animation-iteration-count" : "[ <number> | infinite ]#",
"-ms-animation-name" : "[ none | <single-animation-name> ]#",
"-ms-animation-play-state" : "[ running | paused ]#",
"-webkit-animation-delay" : "<time>#",
"-webkit-animation-direction" : "[ normal | alternate ]#",
"-webkit-animation-duration" : "<time>#",
"-webkit-animation-fill-mode" : "[ none | forwards | backwards | both ]#",
"-webkit-animation-iteration-count" : "[ <number> | infinite ]#",
"-webkit-animation-name" : "[ none | <single-animation-name> ]#",
"-webkit-animation-play-state" : "[ running | paused ]#",
"-o-animation-delay" : "<time>#",
"-o-animation-direction" : "[ normal | alternate ]#",
"-o-animation-duration" : "<time>#",
"-o-animation-iteration-count" : "[ <number> | infinite ]#",
"-o-animation-name" : "[ none | <single-animation-name> ]#",
"-o-animation-play-state" : "[ running | paused ]#",
"appearance" : "none | auto",
"-moz-appearance" : "none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized",
"-ms-appearance" : "none | icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | radio | radio-button | checkbox | menu-item | tab | menu | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password | normal",
"-webkit-appearance" : "none | button | button-bevel | caps-lock-indicator | caret | checkbox | default-button | listbox | listitem | media-fullscreen-button | media-mute-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbargripper-horizontal | scrollbargripper-vertical | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical",
"-o-appearance" : "none | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | radio | radio-button | checkbox | menu-item | tab | menu | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password | normal",
"azimuth" : "<azimuth>",
//B
"backface-visibility" : "visible | hidden",
"background" : 1,
"background-attachment" : "<attachment>#",
"background-clip" : "<box>#",
"background-color" : "<color>",
"background-image" : "<bg-image>#",
"background-origin" : "<box>#",
"background-position" : "<bg-position>",
"background-repeat" : "<repeat-style>#",
"background-size" : "<bg-size>#",
"baseline-shift" : "baseline | sub | super | <percentage> | <length>",
"behavior" : 1,
"binding" : 1,
"bleed" : "<length>",
"bookmark-label" : "<content> | <attr> | <string>",
"bookmark-level" : "none | <integer>",
"bookmark-state" : "open | closed",
"bookmark-target" : "none | <uri> | <attr>",
"border" : "<border-width> || <border-style> || <color>",
"border-bottom" : "<border-width> || <border-style> || <color>",
"border-bottom-color" : "<color>",
"border-bottom-left-radius" : "<x-one-radius>",
"border-bottom-right-radius" : "<x-one-radius>",
"border-bottom-style" : "<border-style>",
"border-bottom-width" : "<border-width>",
"border-collapse" : "collapse | separate",
"border-color" : "<color>{1,4}",
"border-image" : 1,
"border-image-outset" : "[ <length> | <number> ]{1,4}",
"border-image-repeat" : "[ stretch | repeat | round ]{1,2}",
"border-image-slice" : "<border-image-slice>",
"border-image-source" : "<image> | none",
"border-image-width" : "[ <length> | <percentage> | <number> | auto ]{1,4}",
"border-left" : "<border-width> || <border-style> || <color>",
"border-left-color" : "<color>",
"border-left-style" : "<border-style>",
"border-left-width" : "<border-width>",
"border-radius" : "<border-radius>",
"border-right" : "<border-width> || <border-style> || <color>",
"border-right-color" : "<color>",
"border-right-style" : "<border-style>",
"border-right-width" : "<border-width>",
"border-spacing" : "<length>{1,2}",
"border-style" : "<border-style>{1,4}",
"border-top" : "<border-width> || <border-style> || <color>",
"border-top-color" : "<color>",
"border-top-left-radius" : "<x-one-radius>",
"border-top-right-radius" : "<x-one-radius>",
"border-top-style" : "<border-style>",
"border-top-width" : "<border-width>",
"border-width" : "<border-width>{1,4}",
"bottom" : "<margin-width>",
"-moz-box-align" : "start | end | center | baseline | stretch",
"-moz-box-decoration-break" : "slice | clone",
"-moz-box-direction" : "normal | reverse",
"-moz-box-flex" : "<number>",
"-moz-box-flex-group" : "<integer>",
"-moz-box-lines" : "single | multiple",
"-moz-box-ordinal-group" : "<integer>",
"-moz-box-orient" : "horizontal | vertical | inline-axis | block-axis",
"-moz-box-pack" : "start | end | center | justify",
"-o-box-decoration-break" : "slice | clone",
"-webkit-box-align" : "start | end | center | baseline | stretch",
"-webkit-box-decoration-break" : "slice | clone",
"-webkit-box-direction" : "normal | reverse",
"-webkit-box-flex" : "<number>",
"-webkit-box-flex-group" : "<integer>",
"-webkit-box-lines" : "single | multiple",
"-webkit-box-ordinal-group" : "<integer>",
"-webkit-box-orient" : "horizontal | vertical | inline-axis | block-axis",
"-webkit-box-pack" : "start | end | center | justify",
"box-decoration-break" : "slice | clone",
"box-shadow" : "<box-shadow>",
"box-sizing" : "content-box | border-box",
"break-after" : "auto | always | avoid | left | right | page | column | avoid-page | avoid-column",
"break-before" : "auto | always | avoid | left | right | page | column | avoid-page | avoid-column",
"break-inside" : "auto | avoid | avoid-page | avoid-column",
//C
"caption-side" : "top | bottom",
"clear" : "none | right | left | both",
"clip" : "<shape> | auto",
"-webkit-clip-path" : "<clip-source> | <clip-path> | none",
"clip-path" : "<clip-source> | <clip-path> | none",
"clip-rule" : "nonzero | evenodd",
"color" : "<color>",
"color-interpolation" : "auto | sRGB | linearRGB",
"color-interpolation-filters" : "auto | sRGB | linearRGB",
"color-profile" : 1,
"color-rendering" : "auto | optimizeSpeed | optimizeQuality",
"column-count" : "<integer> | auto", //https://www.w3.org/TR/css3-multicol/
"column-fill" : "auto | balance",
"column-gap" : "<length> | normal",
"column-rule" : "<border-width> || <border-style> || <color>",
"column-rule-color" : "<color>",
"column-rule-style" : "<border-style>",
"column-rule-width" : "<border-width>",
"column-span" : "none | all",
"column-width" : "<length> | auto",
"columns" : 1,
"content" : 1,
"counter-increment" : 1,
"counter-reset" : 1,
"crop" : "<shape> | auto",
"cue" : "cue-after | cue-before",
"cue-after" : 1,
"cue-before" : 1,
"cursor" : 1,
//D
"direction" : "ltr | rtl",
"display" : "inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | grid | inline-grid | run-in | ruby | ruby-base | ruby-text | ruby-base-container | ruby-text-container | contents | none | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker | -webkit-box | -webkit-inline-box | -ms-flexbox | -ms-inline-flexbox | flex | -webkit-flex | inline-flex | -webkit-inline-flex",
"dominant-baseline" : "auto | use-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical | central | middle | text-after-edge | text-before-edge",
"drop-initial-after-adjust" : "central | middle | after-edge | text-after-edge | ideographic | alphabetic | mathematical | <percentage> | <length>",
"drop-initial-after-align" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
"drop-initial-before-adjust" : "before-edge | text-before-edge | central | middle | hanging | mathematical | <percentage> | <length>",
"drop-initial-before-align" : "caps-height | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
"drop-initial-size" : "auto | line | <length> | <percentage>",
"drop-initial-value" : "<integer>",
//E
"elevation" : "<angle> | below | level | above | higher | lower",
"empty-cells" : "show | hide",
"enable-background" : 1,
//F
"fill" : "<paint>",
"fill-opacity" : "<opacity-value>",
"fill-rule" : "nonzero | evenodd",
"filter" : "<filter-function-list> | none",
"fit" : "fill | hidden | meet | slice",
"fit-position" : 1,
"flex" : "<flex>",
"flex-basis" : "<width>",
"flex-direction" : "row | row-reverse | column | column-reverse",
"flex-flow" : "<flex-direction> || <flex-wrap>",
"flex-grow" : "<number>",
"flex-shrink" : "<number>",
"flex-wrap" : "nowrap | wrap | wrap-reverse",
"-webkit-flex" : "<flex>",
"-webkit-flex-basis" : "<width>",
"-webkit-flex-direction" : "row | row-reverse | column | column-reverse",
"-webkit-flex-flow" : "<flex-direction> || <flex-wrap>",
"-webkit-flex-grow" : "<number>",
"-webkit-flex-shrink" : "<number>",
"-webkit-flex-wrap" : "nowrap | wrap | wrap-reverse",
"-ms-flex" : "<flex>",
"-ms-flex-align" : "start | end | center | stretch | baseline",
"-ms-flex-direction" : "row | row-reverse | column | column-reverse",
"-ms-flex-order" : "<number>",
"-ms-flex-pack" : "start | end | center | justify",
"-ms-flex-wrap" : "nowrap | wrap | wrap-reverse",
"float" : "left | right | none",
"float-offset" : 1,
"flood-color" : 1,
"flood-opacity" : "<opacity-value>",
"font" : "<font-shorthand> | caption | icon | menu | message-box | small-caption | status-bar",
"font-family" : "<font-family>",
"font-feature-settings" : "<feature-tag-value> | normal",
"font-kerning" : "auto | normal | none",
"font-size" : "<font-size>",
"font-size-adjust" : "<number> | none",
"font-stretch" : "<font-stretch>",
"font-style" : "<font-style>",
"font-variant" : "<font-variant> | normal | none",
"font-variant-alternates" : "<font-variant-alternates> | normal",
"font-variant-caps" : "<font-variant-caps> | normal",
"font-variant-east-asian" : "<font-variant-east-asian> | normal",
"font-variant-ligatures" : "<font-variant-ligatures> | normal | none",
"font-variant-numeric" : "<font-variant-numeric> | normal",
"font-variant-position" : "normal | sub | super",
"font-weight" : "<font-weight>",
//G
"glyph-orientation-horizontal" : "<glyph-angle>",
"glyph-orientation-vertical" : "auto | <glyph-angle>",
"grid" : 1,
"grid-area" : 1,
"grid-auto-columns" : 1,
"grid-auto-flow" : 1,
"grid-auto-position" : 1,
"grid-auto-rows" : 1,
"grid-cell-stacking" : "columns | rows | layer",
"grid-column" : 1,
"grid-columns" : 1,
"grid-column-align" : "start | end | center | stretch",
"grid-column-sizing" : 1,
"grid-column-start" : 1,
"grid-column-end" : 1,
"grid-column-span" : "<integer>",
"grid-flow" : "none | rows | columns",
"grid-layer" : "<integer>",
"grid-row" : 1,
"grid-rows" : 1,
"grid-row-align" : "start | end | center | stretch",
"grid-row-start" : 1,
"grid-row-end" : 1,
"grid-row-span" : "<integer>",
"grid-row-sizing" : 1,
"grid-template" : 1,
"grid-template-areas" : 1,
"grid-template-columns" : 1,
"grid-template-rows" : 1,
//H
"hanging-punctuation" : 1,
"height" : "<margin-width> | <content-sizing>",
"hyphenate-after" : "<integer> | auto",
"hyphenate-before" : "<integer> | auto",
"hyphenate-character" : "<string> | auto",
"hyphenate-lines" : "no-limit | <integer>",
"hyphenate-resource" : 1,
"hyphens" : "none | manual | auto",
//I
"icon" : 1,
"image-orientation" : "angle | auto",
"image-rendering" : "auto | optimizeSpeed | optimizeQuality",
"image-resolution" : 1,
"ime-mode" : "auto | normal | active | inactive | disabled",
"inline-box-align" : "last | <integer>",
//J
"justify-content" : "flex-start | flex-end | center | space-between | space-around",
"-webkit-justify-content" : "flex-start | flex-end | center | space-between | space-around",
//K
"kerning" : "auto | <length>",
//L
"left" : "<margin-width>",
"letter-spacing" : "<length> | normal",
"line-height" : "<line-height>",
"line-break" : "auto | loose | normal | strict",
"line-stacking" : 1,
"line-stacking-ruby" : "exclude-ruby | include-ruby",
"line-stacking-shift" : "consider-shifts | disregard-shifts",
"line-stacking-strategy" : "inline-line-height | block-line-height | max-height | grid-height",
"list-style" : 1,
"list-style-image" : "<uri> | none",
"list-style-position" : "inside | outside",
"list-style-type" : "disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | lower-alpha | upper-alpha | none",
//M
"margin" : "<margin-width>{1,4}",
"margin-bottom" : "<margin-width>",
"margin-left" : "<margin-width>",
"margin-right" : "<margin-width>",
"margin-top" : "<margin-width>",
"mark" : 1,
"mark-after" : 1,
"mark-before" : 1,
"marker" : 1,
"marker-end" : 1,
"marker-mid" : 1,
"marker-start" : 1,
"marks" : 1,
"marquee-direction" : 1,
"marquee-play-count" : 1,
"marquee-speed" : 1,
"marquee-style" : 1,
"mask" : 1,
"max-height" : "<length> | <percentage> | <content-sizing> | none",
"max-width" : "<length> | <percentage> | <content-sizing> | none",
"min-height" : "<length> | <percentage> | <content-sizing> | contain-floats | -moz-contain-floats | -webkit-contain-floats",
"min-width" : "<length> | <percentage> | <content-sizing> | contain-floats | -moz-contain-floats | -webkit-contain-floats",
"move-to" : 1,
//N
"nav-down" : 1,
"nav-index" : 1,
"nav-left" : 1,
"nav-right" : 1,
"nav-up" : 1,
//O
"object-fit" : "fill | contain | cover | none | scale-down",
"object-position" : "<position>",
"opacity" : "<opacity-value>",
"order" : "<integer>",
"-webkit-order" : "<integer>",
"orphans" : "<integer>",
"outline" : 1,
"outline-color" : "<color> | invert",
"outline-offset" : 1,
"outline-style" : "<border-style>",
"outline-width" : "<border-width>",
"overflow" : "visible | hidden | scroll | auto",
"overflow-style" : 1,
"overflow-wrap" : "normal | break-word",
"overflow-x" : 1,
"overflow-y" : 1,
//P
"padding" : "<padding-width>{1,4}",
"padding-bottom" : "<padding-width>",
"padding-left" : "<padding-width>",
"padding-right" : "<padding-width>",
"padding-top" : "<padding-width>",
"page" : 1,
"page-break-after" : "auto | always | avoid | left | right",
"page-break-before" : "auto | always | avoid | left | right",
"page-break-inside" : "auto | avoid",
"page-policy" : 1,
"pause" : 1,
"pause-after" : 1,
"pause-before" : 1,
"perspective" : 1,
"perspective-origin" : 1,
"phonemes" : 1,
"pitch" : 1,
"pitch-range" : 1,
"play-during" : 1,
"pointer-events" : "auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all",
"position" : "static | relative | absolute | fixed",
"presentation-level" : 1,
"punctuation-trim" : 1,
//Q
"quotes" : 1,
//R
"rendering-intent" : 1,
"resize" : 1,
"rest" : 1,
"rest-after" : 1,
"rest-before" : 1,
"richness" : 1,
"right" : "<margin-width>",
"rotation" : 1,
"rotation-point" : 1,
"ruby-align" : 1,
"ruby-overhang" : 1,
"ruby-position" : 1,
"ruby-span" : 1,
//S
"shape-rendering" : "auto | optimizeSpeed | crispEdges | geometricPrecision",
"size" : 1,
"speak" : "normal | none | spell-out",
"speak-header" : "once | always",
"speak-numeral" : "digits | continuous",
"speak-punctuation" : "code | none",
"speech-rate" : 1,
"src" : 1,
"stop-color" : 1,
"stop-opacity" : "<opacity-value>",
"stress" : 1,
"string-set" : 1,
"stroke" : "<paint>",
"stroke-dasharray" : "none | <dasharray>",
"stroke-dashoffset" : "<percentage> | <length>",
"stroke-linecap" : "butt | round | square",
"stroke-linejoin" : "miter | round | bevel",
"stroke-miterlimit" : "<miterlimit>",
"stroke-opacity" : "<opacity-value>",
"stroke-width" : "<percentage> | <length>",
"table-layout" : "auto | fixed",
"tab-size" : "<integer> | <length>",
"target" : 1,
"target-name" : 1,
"target-new" : 1,
"target-position" : 1,
"text-align" : "left | right | center | justify | match-parent | start | end",
"text-align-last" : 1,
"text-anchor" : "start | middle | end",
"text-decoration" : "<text-decoration-line> || <text-decoration-style> || <text-decoration-color>",
"text-decoration-color" : "<text-decoration-color>",
"text-decoration-line" : "<text-decoration-line>",
"text-decoration-style" : "<text-decoration-style>",
"text-emphasis" : 1,
"text-height" : 1,
"text-indent" : "<length> | <percentage>",
"text-justify" : "auto | none | inter-word | inter-ideograph | inter-cluster | distribute | kashida",
"text-outline" : 1,
"text-overflow" : 1,
"text-rendering" : "auto | optimizeSpeed | optimizeLegibility | geometricPrecision",
"text-shadow" : 1,
"text-transform" : "capitalize | uppercase | lowercase | none",
"text-wrap" : "normal | none | avoid",
"top" : "<margin-width>",
"-ms-touch-action" : "auto | none | pan-x | pan-y | pan-left | pan-right | pan-up | pan-down | manipulation",
"touch-action" : "auto | none | pan-x | pan-y | pan-left | pan-right | pan-up | pan-down | manipulation",
"transform" : 1,
"transform-origin" : 1,
"transform-style" : 1,
"transition" : 1,
"transition-delay" : 1,
"transition-duration" : 1,
"transition-property" : 1,
"transition-timing-function" : 1,
//U
"unicode-bidi" : "normal | embed | isolate | bidi-override | isolate-override | plaintext",
"user-modify" : "read-only | read-write | write-only",
"user-select" : "none | text | toggle | element | elements | all",
//V
"vertical-align" : "auto | use-script | baseline | sub | super | top | text-top | central | middle | bottom | text-bottom | <percentage> | <length>",
"visibility" : "visible | hidden | collapse",
"voice-balance" : 1,
"voice-duration" : 1,
"voice-family" : 1,
"voice-pitch" : 1,
"voice-pitch-range" : 1,
"voice-rate" : 1,
"voice-stress" : 1,
"voice-volume" : 1,
"volume" : 1,
//W
"white-space" : "normal | pre | nowrap | pre-wrap | pre-line | -pre-wrap | -o-pre-wrap | -moz-pre-wrap | -hp-pre-wrap", // https://perishablepress.com/wrapping-content/
"white-space-collapse" : 1,
"widows" : "<integer>",
"width" : "<length> | <percentage> | <content-sizing> | auto",
"will-change" : "<will-change>",
"word-break" : "normal | keep-all | break-all",
"word-spacing" : "<length> | normal",
"word-wrap" : "normal | break-word",
"writing-mode" : "horizontal-tb | vertical-rl | vertical-lr | lr-tb | rl-tb | tb-rl | bt-rl | tb-lr | bt-lr | lr-bt | rl-bt | lr | rl | tb",
//Z
"z-index" : "<integer> | auto",
"zoom" : "<number> | <percentage> | normal"
};
},{}],8:[function(require,module,exports){
"use strict";
module.exports = PropertyName;
var SyntaxUnit = require("../util/SyntaxUnit");
var Parser = require("./Parser");
/**
* Represents a selector combinator (whitespace, +, >).
* @namespace parserlib.css
* @class PropertyName
* @extends parserlib.util.SyntaxUnit
* @constructor
* @param {String} text The text representation of the unit.
* @param {String} hack The type of IE hack applied ("*", "_", or null).
* @param {int} line The line of text on which the unit resides.
* @param {int} col The column of text on which the unit resides.
*/
function PropertyName(text, hack, line, col) {
SyntaxUnit.call(this, text, line, col, Parser.PROPERTY_NAME_TYPE);
/**
* The type of IE hack applied ("*", "_", or null).
* @type String
* @property hack
*/
this.hack = hack;
}
PropertyName.prototype = new SyntaxUnit();
PropertyName.prototype.constructor = PropertyName;
PropertyName.prototype.toString = function() {
return (this.hack ? this.hack : "") + this.text;
};
},{"../util/SyntaxUnit":26,"./Parser":6}],9:[function(require,module,exports){
"use strict";
module.exports = PropertyValue;
var SyntaxUnit = require("../util/SyntaxUnit");
var Parser = require("./Parser");
/**
* Represents a single part of a CSS property value, meaning that it represents
* just everything single part between ":" and ";". If there are multiple values
* separated by commas, this type represents just one of the values.
* @param {String[]} parts An array of value parts making up this value.
* @param {int} line The line of text on which the unit resides.
* @param {int} col The column of text on which the unit resides.
* @namespace parserlib.css
* @class PropertyValue
* @extends parserlib.util.SyntaxUnit
* @constructor
*/
function PropertyValue(parts, line, col) {
SyntaxUnit.call(this, parts.join(" "), line, col, Parser.PROPERTY_VALUE_TYPE);
/**
* The parts that make up the selector.
* @type Array
* @property parts
*/
this.parts = parts;
}
PropertyValue.prototype = new SyntaxUnit();
PropertyValue.prototype.constructor = PropertyValue;
},{"../util/SyntaxUnit":26,"./Parser":6}],10:[function(require,module,exports){
"use strict";
module.exports = PropertyValueIterator;
/**
* A utility class that allows for easy iteration over the various parts of a
* property value.
* @param {parserlib.css.PropertyValue} value The property value to iterate over.
* @namespace parserlib.css
* @class PropertyValueIterator
* @constructor
*/
function PropertyValueIterator(value) {
/**
* Iterator value
* @type int
* @property _i
* @private
*/
this._i = 0;
/**
* The parts that make up the value.
* @type Array
* @property _parts
* @private
*/
this._parts = value.parts;
/**
* Keeps track of bookmarks along the way.
* @type Array
* @property _marks
* @private
*/
this._marks = [];
/**
* Holds the original property value.
* @type parserlib.css.PropertyValue
* @property value
*/
this.value = value;
}
/**
* Returns the total number of parts in the value.
* @return {int} The total number of parts in the value.
* @method count
*/
PropertyValueIterator.prototype.count = function() {
return this._parts.length;
};
/**
* Indicates if the iterator is positioned at the first item.
* @return {Boolean} True if positioned at first item, false if not.
* @method isFirst
*/
PropertyValueIterator.prototype.isFirst = function() {
return this._i === 0;
};
/**
* Indicates if there are more parts of the property value.
* @return {Boolean} True if there are more parts, false if not.
* @method hasNext
*/
PropertyValueIterator.prototype.hasNext = function() {
return this._i < this._parts.length;
};
/**
* Marks the current spot in the iteration so it can be restored to
* later on.
* @return {void}
* @method mark
*/
PropertyValueIterator.prototype.mark = function() {
this._marks.push(this._i);
};
/**
* Returns the next part of the property value or null if there is no next
* part. Does not move the internal counter forward.
* @return {parserlib.css.PropertyValuePart} The next part of the property value or null if there is no next
* part.
* @method peek
*/
PropertyValueIterator.prototype.peek = function(count) {
return this.hasNext() ? this._parts[this._i + (count || 0)] : null;
};
/**
* Returns the next part of the property value or null if there is no next
* part.
* @return {parserlib.css.PropertyValuePart} The next part of the property value or null if there is no next
* part.
* @method next
*/
PropertyValueIterator.prototype.next = function() {
return this.hasNext() ? this._parts[this._i++] : null;
};
/**
* Returns the previous part of the property value or null if there is no
* previous part.
* @return {parserlib.css.PropertyValuePart} The previous part of the
* property value or null if there is no previous part.
* @method previous
*/
PropertyValueIterator.prototype.previous = function() {
return this._i > 0 ? this._parts[--this._i] : null;
};
/**
* Restores the last saved bookmark.
* @return {void}
* @method restore
*/
PropertyValueIterator.prototype.restore = function() {
if (this._marks.length) {
this._i = this._marks.pop();
}
};
/**
* Drops the last saved bookmark.
* @return {void}
* @method drop
*/
PropertyValueIterator.prototype.drop = function() {
this._marks.pop();
};
},{}],11:[function(require,module,exports){
"use strict";
module.exports = PropertyValuePart;
var SyntaxUnit = require("../util/SyntaxUnit");
var Colors = require("./Colors");
var Parser = require("./Parser");
var Tokens = require("./Tokens");
/**
* Represents a single part of a CSS property value, meaning that it represents
* just one part of the data between ":" and ";".
* @param {String} text The text representation of the unit.
* @param {int} line The line of text on which the unit resides.
* @param {int} col The column of text on which the unit resides.
* @namespace parserlib.css
* @class PropertyValuePart
* @extends parserlib.util.SyntaxUnit
* @constructor
*/
function PropertyValuePart(text, line, col, optionalHint) {
var hint = optionalHint || {};
SyntaxUnit.call(this, text, line, col, Parser.PROPERTY_VALUE_PART_TYPE);
/**
* Indicates the type of value unit.
* @type String
* @property type
*/
this.type = "unknown";
//figure out what type of data it is
var temp;
//it is a measurement?
if (/^([+\-]?[\d\.]+)([a-z]+)$/i.test(text)) { //dimension
this.type = "dimension";
this.value = +RegExp.$1;
this.units = RegExp.$2;
//try to narrow down
switch (this.units.toLowerCase()) {
case "em":
case "rem":
case "ex":
case "px":
case "cm":
case "mm":
case "in":
case "pt":
case "pc":
case "ch":
case "vh":
case "vw":
case "vmax":
case "vmin":
this.type = "length";
break;
case "fr":
this.type = "grid";
break;
case "deg":
case "rad":
case "grad":
case "turn":
this.type = "angle";
break;
case "ms":
case "s":
this.type = "time";
break;
case "hz":
case "khz":
this.type = "frequency";
break;
case "dpi":
case "dpcm":
this.type = "resolution";
break;
//default
}
} else if (/^([+\-]?[\d\.]+)%$/i.test(text)) { //percentage
this.type = "percentage";
this.value = +RegExp.$1;
} else if (/^([+\-]?\d+)$/i.test(text)) { //integer
this.type = "integer";
this.value = +RegExp.$1;
} else if (/^([+\-]?[\d\.]+)$/i.test(text)) { //number
this.type = "number";
this.value = +RegExp.$1;
} else if (/^#([a-f0-9]{3,6})/i.test(text)) { //hexcolor
this.type = "color";
temp = RegExp.$1;
if (temp.length === 3) {
this.red = parseInt(temp.charAt(0)+temp.charAt(0), 16);
this.green = parseInt(temp.charAt(1)+temp.charAt(1), 16);
this.blue = parseInt(temp.charAt(2)+temp.charAt(2), 16);
} else {
this.red = parseInt(temp.substring(0, 2), 16);
this.green = parseInt(temp.substring(2, 4), 16);
this.blue = parseInt(temp.substring(4, 6), 16);
}
} else if (/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i.test(text)) { //rgb() color with absolute numbers
this.type = "color";
this.red = +RegExp.$1;
this.green = +RegExp.$2;
this.blue = +RegExp.$3;
} else if (/^rgb\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(text)) { //rgb() color with percentages
this.type = "color";
this.red = +RegExp.$1 * 255 / 100;
this.green = +RegExp.$2 * 255 / 100;
this.blue = +RegExp.$3 * 255 / 100;
} else if (/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d\.]+)\s*\)/i.test(text)) { //rgba() color with absolute numbers
this.type = "color";
this.red = +RegExp.$1;
this.green = +RegExp.$2;
this.blue = +RegExp.$3;
this.alpha = +RegExp.$4;
} else if (/^rgba\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(text)) { //rgba() color with percentages
this.type = "color";
this.red = +RegExp.$1 * 255 / 100;
this.green = +RegExp.$2 * 255 / 100;
this.blue = +RegExp.$3 * 255 / 100;
this.alpha = +RegExp.$4;
} else if (/^hsl\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(text)) { //hsl()
this.type = "color";
this.hue = +RegExp.$1;
this.saturation = +RegExp.$2 / 100;
this.lightness = +RegExp.$3 / 100;
} else if (/^hsla\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(text)) { //hsla() color with percentages
this.type = "color";
this.hue = +RegExp.$1;
this.saturation = +RegExp.$2 / 100;
this.lightness = +RegExp.$3 / 100;
this.alpha = +RegExp.$4;
} else if (/^url\(("([^\\"]|\\.)*")\)/i.test(text)) { //URI
// generated by TokenStream.readURI, so always double-quoted.
this.type = "uri";
this.uri = PropertyValuePart.parseString(RegExp.$1);
} else if (/^([^\(]+)\(/i.test(text)) {
this.type = "function";
this.name = RegExp.$1;
this.value = text;
} else if (/^"([^\n\r\f\\"]|\\\r\n|\\[^\r0-9a-f]|\\[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?)*"/i.test(text)) { //double-quoted string
this.type = "string";
this.value = PropertyValuePart.parseString(text);
} else if (/^'([^\n\r\f\\']|\\\r\n|\\[^\r0-9a-f]|\\[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?)*'/i.test(text)) { //single-quoted string
this.type = "string";
this.value = PropertyValuePart.parseString(text);
} else if (Colors[text.toLowerCase()]) { //named color
this.type = "color";
temp = Colors[text.toLowerCase()].substring(1);
this.red = parseInt(temp.substring(0, 2), 16);
this.green = parseInt(temp.substring(2, 4), 16);
this.blue = parseInt(temp.substring(4, 6), 16);
} else if (/^[,\/]$/.test(text)) {
this.type = "operator";
this.value = text;
} else if (/^-?[a-z_\u00A0-\uFFFF][a-z0-9\-_\u00A0-\uFFFF]*$/i.test(text)) {
this.type = "identifier";
this.value = text;
}
// There can be ambiguity with escape sequences in identifiers, as
// well as with "color" parts which are also "identifiers", so record
// an explicit hint when the token generating this PropertyValuePart
// was an identifier.
this.wasIdent = Boolean(hint.ident);
}
PropertyValuePart.prototype = new SyntaxUnit();
PropertyValuePart.prototype.constructor = PropertyValuePart;
/**
* Helper method to parse a CSS string.
*/
PropertyValuePart.parseString = function(str) {
str = str.slice(1, -1); // Strip surrounding single/double quotes
var replacer = function(match, esc) {
if (/^(\n|\r\n|\r|\f)$/.test(esc)) {
return "";
}
var m = /^[0-9a-f]{1,6}/i.exec(esc);
if (m) {
var codePoint = parseInt(m[0], 16);
if (String.fromCodePoint) {
return String.fromCodePoint(codePoint);
} else {
// XXX No support for surrogates on old JavaScript engines.
return String.fromCharCode(codePoint);
}
}
return esc;
};
return str.replace(/\\(\r\n|[^\r0-9a-f]|[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?)/ig,
replacer);
};
/**
* Helper method to serialize a CSS string.
*/
PropertyValuePart.serializeString = function(value) {
var replacer = function(match, c) {
if (c === "\"") {
return "\\" + c;
}
var cp = String.codePointAt ? String.codePointAt(0) :
// We only escape non-surrogate chars, so using charCodeAt
// is harmless here.
String.charCodeAt(0);
return "\\" + cp.toString(16) + " ";
};
return "\"" + value.replace(/["\r\n\f]/g, replacer) + "\"";
};
/**
* Create a new syntax unit based solely on the given token.
* Convenience method for creating a new syntax unit when
* it represents a single token instead of multiple.
* @param {Object} token The token object to represent.
* @return {parserlib.css.PropertyValuePart} The object representing the token.
* @static
* @method fromToken
*/
PropertyValuePart.fromToken = function(token) {
var part = new PropertyValuePart(token.value, token.startLine, token.startCol, {
// Tokens can have escaped characters that would fool the type
// identification in the PropertyValuePart constructor, so pass
// in a hint if this was an identifier.
ident: token.type === Tokens.IDENT
});
return part;
};
},{"../util/SyntaxUnit":26,"./Colors":1,"./Parser":6,"./Tokens":18}],12:[function(require,module,exports){
"use strict";
var Pseudos = module.exports = {
__proto__: null,
":first-letter": 1,
":first-line": 1,
":before": 1,
":after": 1
};
Pseudos.ELEMENT = 1;
Pseudos.CLASS = 2;
Pseudos.isElement = function(pseudo) {
return pseudo.indexOf("::") === 0 || Pseudos[pseudo.toLowerCase()] === Pseudos.ELEMENT;
};
},{}],13:[function(require,module,exports){
"use strict";
module.exports = Selector;
var SyntaxUnit = require("../util/SyntaxUnit");
var Parser = require("./Parser");
var Specificity = require("./Specificity");
/**
* Represents an entire single selector, including all parts but not
* including multiple selectors (those separated by commas).
* @namespace parserlib.css
* @class Selector
* @extends parserlib.util.SyntaxUnit
* @constructor
* @param {Array} parts Array of selectors parts making up this selector.
* @param {int} line The line of text on which the unit resides.
* @param {int} col The column of text on which the unit resides.
*/
function Selector(parts, line, col) {
SyntaxUnit.call(this, parts.join(" "), line, col, Parser.SELECTOR_TYPE);
/**
* The parts that make up the selector.
* @type Array
* @property parts
*/
this.parts = parts;
/**
* The specificity of the selector.
* @type parserlib.css.Specificity
* @property specificity
*/
this.specificity = Specificity.calculate(this);
}
Selector.prototype = new SyntaxUnit();
Selector.prototype.constructor = Selector;
},{"../util/SyntaxUnit":26,"./Parser":6,"./Specificity":16}],14:[function(require,module,exports){
"use strict";
module.exports = SelectorPart;
var SyntaxUnit = require("../util/SyntaxUnit");
var Parser = require("./Parser");
/**
* Represents a single part of a selector string, meaning a single set of
* element name and modifiers. This does not include combinators such as
* spaces, +, >, etc.
* @namespace parserlib.css
* @class SelectorPart
* @extends parserlib.util.SyntaxUnit
* @constructor
* @param {String} elementName The element name in the selector or null
* if there is no element name.
* @param {Array} modifiers Array of individual modifiers for the element.
* May be empty if there are none.
* @param {String} text The text representation of the unit.
* @param {int} line The line of text on which the unit resides.
* @param {int} col The column of text on which the unit resides.
*/
function SelectorPart(elementName, modifiers, text, line, col) {
SyntaxUnit.call(this, text, line, col, Parser.SELECTOR_PART_TYPE);
/**
* The tag name of the element to which this part
* of the selector affects.
* @type String
* @property elementName
*/
this.elementName = elementName;
/**
* The parts that come after the element name, such as class names, IDs,
* pseudo classes/elements, etc.
* @type Array
* @property modifiers
*/
this.modifiers = modifiers;
}
SelectorPart.prototype = new SyntaxUnit();
SelectorPart.prototype.constructor = SelectorPart;
},{"../util/SyntaxUnit":26,"./Parser":6}],15:[function(require,module,exports){
"use strict";
module.exports = SelectorSubPart;
var SyntaxUnit = require("../util/SyntaxUnit");
var Parser = require("./Parser");
/**
* Represents a selector modifier string, meaning a class name, element name,
* element ID, pseudo rule, etc.
* @namespace parserlib.css
* @class SelectorSubPart
* @extends parserlib.util.SyntaxUnit
* @constructor
* @param {String} text The text representation of the unit.
* @param {String} type The type of selector modifier.
* @param {int} line The line of text on which the unit resides.
* @param {int} col The column of text on which the unit resides.
*/
function SelectorSubPart(text, type, line, col) {
SyntaxUnit.call(this, text, line, col, Parser.SELECTOR_SUB_PART_TYPE);
/**
* The type of modifier.
* @type String
* @property type
*/
this.type = type;
/**
* Some subparts have arguments, this represents them.
* @type Array
* @property args
*/
this.args = [];
}
SelectorSubPart.prototype = new SyntaxUnit();
SelectorSubPart.prototype.constructor = SelectorSubPart;
},{"../util/SyntaxUnit":26,"./Parser":6}],16:[function(require,module,exports){
"use strict";
module.exports = Specificity;
var Pseudos = require("./Pseudos");
var SelectorPart = require("./SelectorPart");
/**
* Represents a selector's specificity.
* @namespace parserlib.css
* @class Specificity
* @constructor
* @param {int} a Should be 1 for inline styles, zero for stylesheet styles
* @param {int} b Number of ID selectors
* @param {int} c Number of classes and pseudo classes
* @param {int} d Number of element names and pseudo elements
*/
function Specificity(a, b, c, d) {
this.a = a;
this.b = b;
this.c = c;
this.d = d;
}
Specificity.prototype = {
constructor: Specificity,
/**
* Compare this specificity to another.
* @param {Specificity} other The other specificity to compare to.
* @return {int} -1 if the other specificity is larger, 1 if smaller, 0 if equal.
* @method compare
*/
compare: function(other) {
var comps = ["a", "b", "c", "d"],
i, len;
for (i=0, len=comps.length; i < len; i++) {
if (this[comps[i]] < other[comps[i]]) {
return -1;
} else if (this[comps[i]] > other[comps[i]]) {
return 1;
}
}
return 0;
},
/**
* Creates a numeric value for the specificity.
* @return {int} The numeric value for the specificity.
* @method valueOf
*/
valueOf: function() {
return (this.a * 1000) + (this.b * 100) + (this.c * 10) + this.d;
},
/**
* Returns a string representation for specificity.
* @return {String} The string representation of specificity.
* @method toString
*/
toString: function() {
return this.a + "," + this.b + "," + this.c + "," + this.d;
}
};
/**
* Calculates the specificity of the given selector.
* @param {parserlib.css.Selector} The selector to calculate specificity for.
* @return {parserlib.css.Specificity} The specificity of the selector.
* @static
* @method calculate
*/
Specificity.calculate = function(selector) {
var i, len,
part,
b=0, c=0, d=0;
function updateValues(part) {
var i, j, len, num,
elementName = part.elementName ? part.elementName.text : "",
modifier;
if (elementName && elementName.charAt(elementName.length-1) !== "*") {
d++;
}
for (i=0, len=part.modifiers.length; i < len; i++) {
modifier = part.modifiers[i];
switch (modifier.type) {
case "class":
case "attribute":
c++;
break;
case "id":
b++;
break;
case "pseudo":
if (Pseudos.isElement(modifier.text)) {
d++;
} else {
c++;
}
break;
case "not":
for (j=0, num=modifier.args.length; j < num; j++) {
updateValues(modifier.args[j]);
}
}
}
}
for (i=0, len=selector.parts.length; i < len; i++) {
part = selector.parts[i];
if (part instanceof SelectorPart) {
updateValues(part);
}
}
return new Specificity(0, b, c, d);
};
},{"./Pseudos":12,"./SelectorPart":14}],17:[function(require,module,exports){
"use strict";
module.exports = TokenStream;
var TokenStreamBase = require("../util/TokenStreamBase");
var PropertyValuePart = require("./PropertyValuePart");
var Tokens = require("./Tokens");
var h = /^[0-9a-fA-F]$/,
nonascii = /^[\u00A0-\uFFFF]$/,
nl = /\n|\r\n|\r|\f/,
whitespace = /\u0009|\u000a|\u000c|\u000d|\u0020/;
//-----------------------------------------------------------------------------
// Helper functions
//-----------------------------------------------------------------------------
function isHexDigit(c) {
return c !== null && h.test(c);
}
function isDigit(c) {
return c !== null && /\d/.test(c);
}
function isWhitespace(c) {
return c !== null && whitespace.test(c);
}
function isNewLine(c) {
return c !== null && nl.test(c);
}
function isNameStart(c) {
return c !== null && /[a-z_\u00A0-\uFFFF\\]/i.test(c);
}
function isNameChar(c) {
return c !== null && (isNameStart(c) || /[0-9\-\\]/.test(c));
}
function isIdentStart(c) {
return c !== null && (isNameStart(c) || /\-\\/.test(c));
}
function mix(receiver, supplier) {
for (var prop in supplier) {
if (Object.prototype.hasOwnProperty.call(supplier, prop)) {
receiver[prop] = supplier[prop];
}
}
return receiver;
}
//-----------------------------------------------------------------------------
// CSS Token Stream
//-----------------------------------------------------------------------------
/**
* A token stream that produces CSS tokens.
* @param {String|Reader} input The source of text to tokenize.
* @constructor
* @class TokenStream
* @namespace parserlib.css
*/
function TokenStream(input) {
TokenStreamBase.call(this, input, Tokens);
}
TokenStream.prototype = mix(new TokenStreamBase(), {
/**
* Overrides the TokenStreamBase method of the same name
* to produce CSS tokens.
* @return {Object} A token object representing the next token.
* @method _getToken
* @private
*/
_getToken: function() {
var c,
reader = this._reader,
token = null,
startLine = reader.getLine(),
startCol = reader.getCol();
c = reader.read();
while (c) {
switch (c) {
/*
* Potential tokens:
* - COMMENT
* - SLASH
* - CHAR
*/
case "/":
if (reader.peek() === "*") {
token = this.commentToken(c, startLine, startCol);
} else {
token = this.charToken(c, startLine, startCol);
}
break;
/*
* Potential tokens:
* - DASHMATCH
* - INCLUDES
* - PREFIXMATCH
* - SUFFIXMATCH
* - SUBSTRINGMATCH
* - CHAR
*/
case "|":
case "~":
case "^":
case "$":
case "*":
if (reader.peek() === "=") {
token = this.comparisonToken(c, startLine, startCol);
} else {
token = this.charToken(c, startLine, startCol);
}
break;
/*
* Potential tokens:
* - STRING
* - INVALID
*/
case "\"":
case "'":
token = this.stringToken(c, startLine, startCol);
break;
/*
* Potential tokens:
* - HASH
* - CHAR
*/
case "#":
if (isNameChar(reader.peek())) {
token = this.hashToken(c, startLine, startCol);
} else {
token = this.charToken(c, startLine, startCol);
}
break;
/*
* Potential tokens:
* - DOT
* - NUMBER
* - DIMENSION
* - PERCENTAGE
*/
case ".":
if (isDigit(reader.peek())) {
token = this.numberToken(c, startLine, startCol);
} else {
token = this.charToken(c, startLine, startCol);
}
break;
/*
* Potential tokens:
* - CDC
* - MINUS
* - NUMBER
* - DIMENSION
* - PERCENTAGE
*/
case "-":
if (reader.peek() === "-") { //could be closing HTML-style comment
token = this.htmlCommentEndToken(c, startLine, startCol);
} else if (isNameStart(reader.peek())) {
token = this.identOrFunctionToken(c, startLine, startCol);
} else {
token = this.charToken(c, startLine, startCol);
}
break;
/*
* Potential tokens:
* - IMPORTANT_SYM
* - CHAR
*/
case "!":
token = this.importantToken(c, startLine, startCol);
break;
/*
* Any at-keyword or CHAR
*/
case "@":
token = this.atRuleToken(c, startLine, startCol);
break;
/*
* Potential tokens:
* - NOT
* - CHAR
*/
case ":":
token = this.notToken(c, startLine, startCol);
break;
/*
* Potential tokens:
* - CDO
* - CHAR
*/
case "<":
token = this.htmlCommentStartToken(c, startLine, startCol);
break;
/*
* Potential tokens:
* - IDENT
* - CHAR
*/
case "\\":
if (/[^\r\n\f]/.test(reader.peek())) {
token = this.identOrFunctionToken(this.readEscape(c, true), startLine, startCol);
} else {
token = this.charToken(c, startLine, startCol);
}
break;
/*
* Potential tokens:
* - UNICODE_RANGE
* - URL
* - CHAR
*/
case "U":
case "u":
if (reader.peek() === "+") {
token = this.unicodeRangeToken(c, startLine, startCol);
break;
}
/* falls through */
default:
/*
* Potential tokens:
* - NUMBER
* - DIMENSION
* - LENGTH
* - FREQ
* - TIME
* - EMS
* - EXS
* - ANGLE
*/
if (isDigit(c)) {
token = this.numberToken(c, startLine, startCol);
} else
/*
* Potential tokens:
* - S
*/
if (isWhitespace(c)) {
token = this.whitespaceToken(c, startLine, startCol);
} else
/*
* Potential tokens:
* - IDENT
*/
if (isIdentStart(c)) {
token = this.identOrFunctionToken(c, startLine, startCol);
} else {
/*
* Potential tokens:
* - CHAR
* - PLUS
*/
token = this.charToken(c, startLine, startCol);
}
}
//make sure this token is wanted
//TODO: check channel
break;
}
if (!token && c === null) {
token = this.createToken(Tokens.EOF, null, startLine, startCol);
}
return token;
},
//-------------------------------------------------------------------------
// Methods to create tokens
//-------------------------------------------------------------------------
/**
* Produces a token based on available data and the current
* reader position information. This method is called by other
* private methods to create tokens and is never called directly.
* @param {int} tt The token type.
* @param {String} value The text value of the token.
* @param {int} startLine The beginning line for the character.
* @param {int} startCol The beginning column for the character.
* @param {Object} options (Optional) Specifies a channel property
* to indicate that a different channel should be scanned
* and/or a hide property indicating that the token should
* be hidden.
* @return {Object} A token object.
* @method createToken
*/
createToken: function(tt, value, startLine, startCol, options) {
var reader = this._reader;
options = options || {};
return {
value: value,
type: tt,
channel: options.channel,
endChar: options.endChar,
hide: options.hide || false,
startLine: startLine,
startCol: startCol,
endLine: reader.getLine(),
endCol: reader.getCol()
};
},
//-------------------------------------------------------------------------
// Methods to create specific tokens
//-------------------------------------------------------------------------
/**
* Produces a token for any at-rule. If the at-rule is unknown, then
* the token is for a single "@" character.
* @param {String} first The first character for the token.
* @param {int} startLine The beginning line for the character.
* @param {int} startCol The beginning column for the character.
* @return {Object} A token object.
* @method atRuleToken
*/
atRuleToken: function(first, startLine, startCol) {
var rule = first,
reader = this._reader,
tt = Tokens.CHAR,
ident;
/*
* First, mark where we are. There are only four @ rules,
* so anything else is really just an invalid token.
* Basically, if this doesn't match one of the known @
* rules, just return '@' as an unknown token and allow
* parsing to continue after that point.
*/
reader.mark();
//try to find the at-keyword
ident = this.readName();
rule = first + ident;
tt = Tokens.type(rule.toLowerCase());
//if it's not valid, use the first character only and reset the reader
if (tt === Tokens.CHAR || tt === Tokens.UNKNOWN) {
if (rule.length > 1) {
tt = Tokens.UNKNOWN_SYM;
} else {
tt = Tokens.CHAR;
rule = first;
reader.reset();
}
}
return this.createToken(tt, rule, startLine, startCol);
},
/**
* Produces a character token based on the given character
* and location in the stream. If there's a special (non-standard)
* token name, this is used; otherwise CHAR is used.
* @param {String} c The character for the token.
* @param {int} startLine The beginning line for the character.
* @param {int} startCol The beginning column for the character.
* @return {Object} A token object.
* @method charToken
*/
charToken: function(c, startLine, startCol) {
var tt = Tokens.type(c);
var opts = {};
if (tt === -1) {
tt = Tokens.CHAR;
} else {
opts.endChar = Tokens[tt].endChar;
}
return this.createToken(tt, c, startLine, startCol, opts);
},
/**
* Produces a character token based on the given character
* and location in the stream. If there's a special (non-standard)
* token name, this is used; otherwise CHAR is used.
* @param {String} first The first character for the token.
* @param {int} startLine The beginning line for the character.
* @param {int} startCol The beginning column for the character.
* @return {Object} A token object.
* @method commentToken
*/
commentToken: function(first, startLine, startCol) {
var comment = this.readComment(first);
return this.createToken(Tokens.COMMENT, comment, startLine, startCol);
},
/**
* Produces a comparison token based on the given character
* and location in the stream. The next character must be
* read and is already known to be an equals sign.
* @param {String} c The character for the token.
* @param {int} startLine The beginning line for the character.
* @param {int} startCol The beginning column for the character.
* @return {Object} A token object.
* @method comparisonToken
*/
comparisonToken: function(c, startLine, startCol) {
var reader = this._reader,
comparison = c + reader.read(),
tt = Tokens.type(comparison) || Tokens.CHAR;
return this.createToken(tt, comparison, startLine, startCol);
},
/**
* Produces a hash token based on the specified information. The
* first character provided is the pound sign (#) and then this
* method reads a name afterward.
* @param {String} first The first character (#) in the hash name.
* @param {int} startLine The beginning line for the character.
* @param {int} startCol The beginning column for the character.
* @return {Object} A token object.
* @method hashToken
*/
hashToken: function(first, startLine, startCol) {
var name = this.readName(first);
return this.createToken(Tokens.HASH, name, startLine, startCol);
},
/**
* Produces a CDO or CHAR token based on the specified information. The
* first character is provided and the rest is read by the function to determine
* the correct token to create.
* @param {String} first The first character in the token.
* @param {int} startLine The beginning line for the character.
* @param {int} startCol The beginning column for the character.
* @return {Object} A token object.
* @method htmlCommentStartToken
*/
htmlCommentStartToken: function(first, startLine, startCol) {
var reader = this._reader,
text = first;
reader.mark();
text += reader.readCount(3);
if (text === "<!--") {
return this.createToken(Tokens.CDO, text, startLine, startCol);
} else {
reader.reset();
return this.charToken(first, startLine, startCol);
}
},
/**
* Produces a CDC or CHAR token based on the specified information. The
* first character is provided and the rest is read by the function to determine
* the correct token to create.
* @param {String} first The first character in the token.
* @param {int} startLine The beginning line for the character.
* @param {int} startCol The beginning column for the character.
* @return {Object} A token object.
* @method htmlCommentEndToken
*/
htmlCommentEndToken: function(first, startLine, startCol) {
var reader = this._reader,
text = first;
reader.mark();
text += reader.readCount(2);
if (text === "-->") {
return this.createToken(Tokens.CDC, text, startLine, startCol);
} else {
reader.reset();
return this.charToken(first, startLine, startCol);
}
},
/**
* Produces an IDENT or FUNCTION token based on the specified information. The
* first character is provided and the rest is read by the function to determine
* the correct token to create.
* @param {String} first The first character in the identifier.
* @param {int} startLine The beginning line for the character.
* @param {int} startCol The beginning column for the character.
* @return {Object} A token object.
* @method identOrFunctionToken
*/
identOrFunctionToken: function(first, startLine, startCol) {
var reader = this._reader,
ident = this.readName(first),
tt = Tokens.IDENT,
uriFns = ["url(", "url-prefix(", "domain("],
uri;
//if there's a left paren immediately after, it's a URI or function
if (reader.peek() === "(") {
ident += reader.read();
if (uriFns.indexOf(ident.toLowerCase()) > -1) {
reader.mark();
uri = this.readURI(ident);
if (uri === null) {
//didn't find a valid URL or there's no closing paren
reader.reset();
tt = Tokens.FUNCTION;
} else {
tt = Tokens.URI;
ident = uri;
}
} else {
tt = Tokens.FUNCTION;
}
} else if (reader.peek() === ":") { //might be an IE function
//IE-specific functions always being with progid:
if (ident.toLowerCase() === "progid") {
ident += reader.readTo("(");
tt = Tokens.IE_FUNCTION;
}
}
return this.createToken(tt, ident, startLine, startCol);
},
/**
* Produces an IMPORTANT_SYM or CHAR token based on the specified information. The
* first character is provided and the rest is read by the function to determine
* the correct token to create.
* @param {String} first The first character in the token.
* @param {int} startLine The beginning line for the character.
* @param {int} startCol The beginning column for the character.
* @return {Object} A token object.
* @method importantToken
*/
importantToken: function(first, startLine, startCol) {
var reader = this._reader,
important = first,
tt = Tokens.CHAR,
temp,
c;
reader.mark();
c = reader.read();
while (c) {
//there can be a comment in here
if (c === "/") {
//if the next character isn't a star, then this isn't a valid !important token
if (reader.peek() !== "*") {
break;
} else {
temp = this.readComment(c);
if (temp === "") { //broken!
break;
}
}
} else if (isWhitespace(c)) {
important += c + this.readWhitespace();
} else if (/i/i.test(c)) {
temp = reader.readCount(8);
if (/mportant/i.test(temp)) {
important += c + temp;
tt = Tokens.IMPORTANT_SYM;
}
break; //we're done
} else {
break;
}
c = reader.read();
}
if (tt === Tokens.CHAR) {
reader.reset();
return this.charToken(first, startLine, startCol);
} else {
return this.createToken(tt, important, startLine, startCol);
}
},
/**
* Produces a NOT or CHAR token based on the specified information. The
* first character is provided and the rest is read by the function to determine
* the correct token to create.
* @param {String} first The first character in the token.
* @param {int} startLine The beginning line for the character.
* @param {int} startCol The beginning column for the character.
* @return {Object} A token object.
* @method notToken
*/
notToken: function(first, startLine, startCol) {
var reader = this._reader,
text = first;
reader.mark();
text += reader.readCount(4);
if (text.toLowerCase() === ":not(") {
return this.createToken(Tokens.NOT, text, startLine, startCol);
} else {
reader.reset();
return this.charToken(first, startLine, startCol);
}
},
/**
* Produces a number token based on the given character
* and location in the stream. This may return a token of
* NUMBER, EMS, EXS, LENGTH, ANGLE, TIME, FREQ, DIMENSION,
* or PERCENTAGE.
* @param {String} first The first character for the token.
* @param {int} startLine The beginning line for the character.
* @param {int} startCol The beginning column for the character.
* @return {Object} A token object.
* @method numberToken
*/
numberToken: function(first, startLine, startCol) {
var reader = this._reader,
value = this.readNumber(first),
ident,
tt = Tokens.NUMBER,
c = reader.peek();
if (isIdentStart(c)) {
ident = this.readName(reader.read());
value += ident;
if (/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vmax$|^vmin$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(ident)) {
tt = Tokens.LENGTH;
} else if (/^deg|^rad$|^grad$|^turn$/i.test(ident)) {
tt = Tokens.ANGLE;
} else if (/^ms$|^s$/i.test(ident)) {
tt = Tokens.TIME;
} else if (/^hz$|^khz$/i.test(ident)) {
tt = Tokens.FREQ;
} else if (/^dpi$|^dpcm$/i.test(ident)) {
tt = Tokens.RESOLUTION;
} else {
tt = Tokens.DIMENSION;
}
} else if (c === "%") {
value += reader.read();
tt = Tokens.PERCENTAGE;
}
return this.createToken(tt, value, startLine, startCol);
},
/**
* Produces a string token based on the given character
* and location in the stream. Since strings may be indicated
* by single or double quotes, a failure to match starting
* and ending quotes results in an INVALID token being generated.
* The first character in the string is passed in and then
* the rest are read up to and including the final quotation mark.
* @param {String} first The first character in the string.
* @param {int} startLine The beginning line for the character.
* @param {int} startCol The beginning column for the character.
* @return {Object} A token object.
* @method stringToken
*/
stringToken: function(first, startLine, startCol) {
var delim = first,
string = first,
reader = this._reader,
tt = Tokens.STRING,
c = reader.read(),
i;
while (c) {
string += c;
if (c === "\\") {
c = reader.read();
if (c === null) {
break; // premature EOF after backslash
} else if (/[^\r\n\f0-9a-f]/i.test(c)) {
// single-character escape
string += c;
} else {
// read up to six hex digits
for (i=0; isHexDigit(c) && i<6; i++) {
string += c;
c = reader.read();
}
// swallow trailing newline or space
if (c === "\r" && reader.peek() === "\n") {
string += c;
c = reader.read();
}
if (isWhitespace(c)) {
string += c;
} else {
// This character is null or not part of the escape;
// jump back to the top to process it.
continue;
}
}
} else if (c === delim) {
break; // delimiter found.
} else if (isNewLine(reader.peek())) {
// newline without an escapement: it's an invalid string
tt = Tokens.INVALID;
break;
}
c = reader.read();
}
//if c is null, that means we're out of input and the string was never closed
if (c === null) {
tt = Tokens.INVALID;
}
return this.createToken(tt, string, startLine, startCol);
},
unicodeRangeToken: function(first, startLine, startCol) {
var reader = this._reader,
value = first,
temp,
tt = Tokens.CHAR;
//then it should be a unicode range
if (reader.peek() === "+") {
reader.mark();
value += reader.read();
value += this.readUnicodeRangePart(true);
//ensure there's an actual unicode range here
if (value.length === 2) {
reader.reset();
} else {
tt = Tokens.UNICODE_RANGE;
//if there's a ? in the first part, there can't be a second part
if (value.indexOf("?") === -1) {
if (reader.peek() === "-") {
reader.mark();
temp = reader.read();
temp += this.readUnicodeRangePart(false);
//if there's not another value, back up and just take the first
if (temp.length === 1) {
reader.reset();
} else {
value += temp;
}
}
}
}
}
return this.createToken(tt, value, startLine, startCol);
},
/**
* Produces a S token based on the specified information. Since whitespace
* may have multiple characters, this consumes all whitespace characters
* into a single token.
* @param {String} first The first character in the token.
* @param {int} startLine The beginning line for the character.
* @param {int} startCol The beginning column for the character.
* @return {Object} A token object.
* @method whitespaceToken
*/
whitespaceToken: function(first, startLine, startCol) {
var value = first + this.readWhitespace();
return this.createToken(Tokens.S, value, startLine, startCol);
},
//-------------------------------------------------------------------------
// Methods to read values from the string stream
//-------------------------------------------------------------------------
readUnicodeRangePart: function(allowQuestionMark) {
var reader = this._reader,
part = "",
c = reader.peek();
//first read hex digits
while (isHexDigit(c) && part.length < 6) {
reader.read();
part += c;
c = reader.peek();
}
//then read question marks if allowed
if (allowQuestionMark) {
while (c === "?" && part.length < 6) {
reader.read();
part += c;
c = reader.peek();
}
}
//there can't be any other characters after this point
return part;
},
readWhitespace: function() {
var reader = this._reader,
whitespace = "",
c = reader.peek();
while (isWhitespace(c)) {
reader.read();
whitespace += c;
c = reader.peek();
}
return whitespace;
},
readNumber: function(first) {
var reader = this._reader,
number = first,
hasDot = (first === "."),
c = reader.peek();
while (c) {
if (isDigit(c)) {
number += reader.read();
} else if (c === ".") {
if (hasDot) {
break;
} else {
hasDot = true;
number += reader.read();
}
} else {
break;
}
c = reader.peek();
}
return number;
},
// returns null w/o resetting reader if string is invalid.
readString: function() {
var token = this.stringToken(this._reader.read(), 0, 0);
return token.type === Tokens.INVALID ? null : token.value;
},
// returns null w/o resetting reader if URI is invalid.
readURI: function(first) {
var reader = this._reader,
uri = first,
inner = "",
c = reader.peek();
//skip whitespace before
while (c && isWhitespace(c)) {
reader.read();
c = reader.peek();
}
//it's a string
if (c === "'" || c === "\"") {
inner = this.readString();
if (inner !== null) {
inner = PropertyValuePart.parseString(inner);
}
} else {
inner = this.readUnquotedURL();
}
c = reader.peek();
//skip whitespace after
while (c && isWhitespace(c)) {
reader.read();
c = reader.peek();
}
//if there was no inner value or the next character isn't closing paren, it's not a URI
if (inner === null || c !== ")") {
uri = null;
} else {
// Ensure argument to URL is always double-quoted
// (This simplifies later processing in PropertyValuePart.)
uri += PropertyValuePart.serializeString(inner) + reader.read();
}
return uri;
},
// This method never fails, although it may return an empty string.
readUnquotedURL: function(first) {
var reader = this._reader,
url = first || "",
c;
for (c = reader.peek(); c; c = reader.peek()) {
// Note that the grammar at
// https://www.w3.org/TR/CSS2/grammar.html#scanner
// incorrectly includes the backslash character in the
// `url` production, although it is correctly omitted in
// the `baduri1` production.
if (nonascii.test(c) || /^[\-!#$%&*-\[\]-~]$/.test(c)) {
url += c;
reader.read();
} else if (c === "\\") {
if (/^[^\r\n\f]$/.test(reader.peek(2))) {
url += this.readEscape(reader.read(), true);
} else {
break; // bad escape sequence.
}
} else {
break; // bad character
}
}
return url;
},
readName: function(first) {
var reader = this._reader,
ident = first || "",
c;
for (c = reader.peek(); c; c = reader.peek()) {
if (c === "\\") {
if (/^[^\r\n\f]$/.test(reader.peek(2))) {
ident += this.readEscape(reader.read(), true);
} else {
// Bad escape sequence.
break;
}
} else if (isNameChar(c)) {
ident += reader.read();
} else {
break;
}
}
return ident;
},
readEscape: function(first, unescape) {
var reader = this._reader,
cssEscape = first || "",
i = 0,
c = reader.peek();
if (isHexDigit(c)) {
do {
cssEscape += reader.read();
c = reader.peek();
} while (c && isHexDigit(c) && ++i < 6);
}
if (cssEscape.length === 1) {
if (/^[^\r\n\f0-9a-f]$/.test(c)) {
reader.read();
if (unescape) {
return c;
}
} else {
// We should never get here (readName won't call readEscape
// if the escape sequence is bad).
throw new Error("Bad escape sequence.");
}
} else if (c === "\r") {
reader.read();
if (reader.peek() === "\n") {
c += reader.read();
}
} else if (/^[ \t\n\f]$/.test(c)) {
reader.read();
} else {
c = "";
}
if (unescape) {
var cp = parseInt(cssEscape.slice(first.length), 16);
return String.fromCodePoint ? String.fromCodePoint(cp) :
String.fromCharCode(cp);
}
return cssEscape + c;
},
readComment: function(first) {
var reader = this._reader,
comment = first || "",
c = reader.read();
if (c === "*") {
while (c) {
comment += c;
//look for end of comment
if (comment.length > 2 && c === "*" && reader.peek() === "/") {
comment += reader.read();
break;
}
c = reader.read();
}
return comment;
} else {
return "";
}
}
});
},{"../util/TokenStreamBase":27,"./PropertyValuePart":11,"./Tokens":18}],18:[function(require,module,exports){
"use strict";
var Tokens = module.exports = [
/*
* The following token names are defined in CSS3 Grammar: https://www.w3.org/TR/css3-syntax/#lexical
*/
// HTML-style comments
{ name: "CDO" },
{ name: "CDC" },
// ignorables
{ name: "S", whitespace: true/*, channel: "ws"*/ },
{ name: "COMMENT", comment: true, hide: true, channel: "comment" },
// attribute equality
{ name: "INCLUDES", text: "~=" },
{ name: "DASHMATCH", text: "|=" },
{ name: "PREFIXMATCH", text: "^=" },
{ name: "SUFFIXMATCH", text: "$=" },
{ name: "SUBSTRINGMATCH", text: "*=" },
// identifier types
{ name: "STRING" },
{ name: "IDENT" },
{ name: "HASH" },
// at-keywords
{ name: "IMPORT_SYM", text: "@import" },
{ name: "PAGE_SYM", text: "@page" },
{ name: "MEDIA_SYM", text: "@media" },
{ name: "FONT_FACE_SYM", text: "@font-face" },
{ name: "CHARSET_SYM", text: "@charset" },
{ name: "NAMESPACE_SYM", text: "@namespace" },
{ name: "SUPPORTS_SYM", text: "@supports" },
{ name: "VIEWPORT_SYM", text: ["@viewport", "@-ms-viewport", "@-o-viewport"] },
{ name: "DOCUMENT_SYM", text: ["@document", "@-moz-document"] },
{ name: "UNKNOWN_SYM" },
//{ name: "ATKEYWORD"},
// CSS3 animations
{ name: "KEYFRAMES_SYM", text: [ "@keyframes", "@-webkit-keyframes", "@-moz-keyframes", "@-o-keyframes" ] },
// important symbol
{ name: "IMPORTANT_SYM" },
// measurements
{ name: "LENGTH" },
{ name: "ANGLE" },
{ name: "TIME" },
{ name: "FREQ" },
{ name: "DIMENSION" },
{ name: "PERCENTAGE" },
{ name: "NUMBER" },
// functions
{ name: "URI" },
{ name: "FUNCTION" },
// Unicode ranges
{ name: "UNICODE_RANGE" },
/*
* The following token names are defined in CSS3 Selectors: https://www.w3.org/TR/css3-selectors/#selector-syntax
*/
// invalid string
{ name: "INVALID" },
// combinators
{ name: "PLUS", text: "+" },
{ name: "GREATER", text: ">" },
{ name: "COMMA", text: "," },
{ name: "TILDE", text: "~" },
// modifier
{ name: "NOT" },
/*
* Defined in CSS3 Paged Media
*/
{ name: "TOPLEFTCORNER_SYM", text: "@top-left-corner" },
{ name: "TOPLEFT_SYM", text: "@top-left" },
{ name: "TOPCENTER_SYM", text: "@top-center" },
{ name: "TOPRIGHT_SYM", text: "@top-right" },
{ name: "TOPRIGHTCORNER_SYM", text: "@top-right-corner" },
{ name: "BOTTOMLEFTCORNER_SYM", text: "@bottom-left-corner" },
{ name: "BOTTOMLEFT_SYM", text: "@bottom-left" },
{ name: "BOTTOMCENTER_SYM", text: "@bottom-center" },
{ name: "BOTTOMRIGHT_SYM", text: "@bottom-right" },
{ name: "BOTTOMRIGHTCORNER_SYM", text: "@bottom-right-corner" },
{ name: "LEFTTOP_SYM", text: "@left-top" },
{ name: "LEFTMIDDLE_SYM", text: "@left-middle" },
{ name: "LEFTBOTTOM_SYM", text: "@left-bottom" },
{ name: "RIGHTTOP_SYM", text: "@right-top" },
{ name: "RIGHTMIDDLE_SYM", text: "@right-middle" },
{ name: "RIGHTBOTTOM_SYM", text: "@right-bottom" },
/*
* The following token names are defined in CSS3 Media Queries: https://www.w3.org/TR/css3-mediaqueries/#syntax
*/
/*{ name: "MEDIA_ONLY", state: "media"},
{ name: "MEDIA_NOT", state: "media"},
{ name: "MEDIA_AND", state: "media"},*/
{ name: "RESOLUTION", state: "media" },
/*
* The following token names are not defined in any CSS specification but are used by the lexer.
*/
// not a real token, but useful for stupid IE filters
{ name: "IE_FUNCTION" },
// part of CSS3 grammar but not the Flex code
{ name: "CHAR" },
// TODO: Needed?
// Not defined as tokens, but might as well be
{
name: "PIPE",
text: "|"
},
{
name: "SLASH",
text: "/"
},
{
name: "MINUS",
text: "-"
},
{
name: "STAR",
text: "*"
},
{
name: "LBRACE",
endChar: "}",
text: "{"
},
{
name: "RBRACE",
text: "}"
},
{
name: "LBRACKET",
endChar: "]",
text: "["
},
{
name: "RBRACKET",
text: "]"
},
{
name: "EQUALS",
text: "="
},
{
name: "COLON",
text: ":"
},
{
name: "SEMICOLON",
text: ";"
},
{
name: "LPAREN",
endChar: ")",
text: "("
},
{
name: "RPAREN",
text: ")"
},
{
name: "DOT",
text: "."
}
];
(function() {
var nameMap = [],
typeMap = Object.create(null);
Tokens.UNKNOWN = -1;
Tokens.unshift({ name:"EOF" });
for (var i=0, len = Tokens.length; i < len; i++) {
nameMap.push(Tokens[i].name);
Tokens[Tokens[i].name] = i;
if (Tokens[i].text) {
if (Tokens[i].text instanceof Array) {
for (var j=0; j < Tokens[i].text.length; j++) {
typeMap[Tokens[i].text[j]] = i;
}
} else {
typeMap[Tokens[i].text] = i;
}
}
}
Tokens.name = function(tt) {
return nameMap[tt];
};
Tokens.type = function(c) {
return typeMap[c] || -1;
};
})();
},{}],19:[function(require,module,exports){
"use strict";
/* exported Validation */
var Matcher = require("./Matcher");
var Properties = require("./Properties");
var ValidationTypes = require("./ValidationTypes");
var ValidationError = require("./ValidationError");
var PropertyValueIterator = require("./PropertyValueIterator");
var Validation = module.exports = {
validate: function(property, value) {
//normalize name
var name = property.toString().toLowerCase(),
expression = new PropertyValueIterator(value),
spec = Properties[name],
part;
if (!spec) {
if (name.indexOf("-") !== 0) { //vendor prefixed are ok
throw new ValidationError("Unknown property '" + property + "'.", property.line, property.col);
}
} else if (typeof spec !== "number") {
// All properties accept some CSS-wide values.
// https://drafts.csswg.org/css-values-3/#common-keywords
if (ValidationTypes.isAny(expression, "inherit | initial | unset")) {
if (expression.hasNext()) {
part = expression.next();
throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
}
return;
}
// Property-specific validation.
this.singleProperty(spec, expression);
}
},
singleProperty: function(types, expression) {
var result = false,
value = expression.value,
part;
result = Matcher.parse(types).match(expression);
if (!result) {
if (expression.hasNext() && !expression.isFirst()) {
part = expression.peek();
throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
} else {
throw new ValidationError("Expected (" + ValidationTypes.describe(types) + ") but found '" + value + "'.", value.line, value.col);
}
} else if (expression.hasNext()) {
part = expression.next();
throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
}
}
};
},{"./Matcher":3,"./Properties":7,"./PropertyValueIterator":10,"./ValidationError":20,"./ValidationTypes":21}],20:[function(require,module,exports){
"use strict";
module.exports = ValidationError;
/**
* Type to use when a validation error occurs.
* @class ValidationError
* @namespace parserlib.util
* @constructor
* @param {String} message The error message.
* @param {int} line The line at which the error occurred.
* @param {int} col The column at which the error occurred.
*/
function ValidationError(message, line, col) {
/**
* The column at which the error occurred.
* @type int
* @property col
*/
this.col = col;
/**
* The line at which the error occurred.
* @type int
* @property line
*/
this.line = line;
/**
* The text representation of the unit.
* @type String
* @property text
*/
this.message = message;
}
//inherit from Error
ValidationError.prototype = new Error();
},{}],21:[function(require,module,exports){
"use strict";
var ValidationTypes = module.exports;
var Matcher = require("./Matcher");
function copy(to, from) {
Object.keys(from).forEach(function(prop) {
to[prop] = from[prop];
});
}
copy(ValidationTypes, {
isLiteral: function (part, literals) {
var text = part.text.toString().toLowerCase(),
args = literals.split(" | "),
i, len, found = false;
for (i=0, len=args.length; i < len && !found; i++) {
if (args[i].charAt(0) === "<") {
found = this.simple[args[i]](part);
} else if (args[i].slice(-2) === "()") {
found = (part.type === "function" &&
part.name === args[i].slice(0, -2));
} else if (text === args[i].toLowerCase()) {
found = true;
}
}
return found;
},
isSimple: function(type) {
return Boolean(this.simple[type]);
},
isComplex: function(type) {
return Boolean(this.complex[type]);
},
describe: function(type) {
if (this.complex[type] instanceof Matcher) {
return this.complex[type].toString(0);
}
return type;
},
/**
* Determines if the next part(s) of the given expression
* are any of the given types.
*/
isAny: function (expression, types) {
var args = types.split(" | "),
i, len, found = false;
for (i=0, len=args.length; i < len && !found && expression.hasNext(); i++) {
found = this.isType(expression, args[i]);
}
return found;
},
/**
* Determines if the next part(s) of the given expression
* are one of a group.
*/
isAnyOfGroup: function(expression, types) {
var args = types.split(" || "),
i, len, found = false;
for (i=0, len=args.length; i < len && !found; i++) {
found = this.isType(expression, args[i]);
}
return found ? args[i-1] : false;
},
/**
* Determines if the next part(s) of the given expression
* are of a given type.
*/
isType: function (expression, type) {
var part = expression.peek(),
result = false;
if (type.charAt(0) !== "<") {
result = this.isLiteral(part, type);
if (result) {
expression.next();
}
} else if (this.simple[type]) {
result = this.simple[type](part);
if (result) {
expression.next();
}
} else if (this.complex[type] instanceof Matcher) {
result = this.complex[type].match(expression);
} else {
result = this.complex[type](expression);
}
return result;
},
simple: {
__proto__: null,
"<absolute-size>":
"xx-small | x-small | small | medium | large | x-large | xx-large",
"<animateable-feature>":
"scroll-position | contents | <animateable-feature-name>",
"<animateable-feature-name>": function(part) {
return this["<ident>"](part) &&
!/^(unset|initial|inherit|will-change|auto|scroll-position|contents)$/i.test(part);
},
"<angle>": function(part) {
return part.type === "angle";
},
"<attachment>": "scroll | fixed | local",
"<attr>": "attr()",
// inset() = inset( <shape-arg>{1,4} [round <border-radius>]? )
// circle() = circle( [<shape-radius>]? [at <position>]? )
// ellipse() = ellipse( [<shape-radius>{2}]? [at <position>]? )
// polygon() = polygon( [<fill-rule>,]? [<shape-arg> <shape-arg>]# )
"<basic-shape>": "inset() | circle() | ellipse() | polygon()",
"<bg-image>": "<image> | <gradient> | none",
"<border-style>":
"none | hidden | dotted | dashed | solid | double | groove | " +
"ridge | inset | outset",
"<border-width>": "<length> | thin | medium | thick",
"<box>": "padding-box | border-box | content-box",
"<clip-source>": "<uri>",
"<color>": function(part) {
return part.type === "color" || String(part) === "transparent" || String(part) === "currentColor";
},
// The SVG <color> spec doesn't include "currentColor" or "transparent" as a color.
"<color-svg>": function(part) {
return part.type === "color";
},
"<content>": "content()",
// https://www.w3.org/TR/css3-sizing/#width-height-keywords
"<content-sizing>":
"fill-available | -moz-available | -webkit-fill-available | " +
"max-content | -moz-max-content | -webkit-max-content | " +
"min-content | -moz-min-content | -webkit-min-content | " +
"fit-content | -moz-fit-content | -webkit-fit-content",
"<feature-tag-value>": function(part) {
return part.type === "function" && /^[A-Z0-9]{4}$/i.test(part);
},
// custom() isn't actually in the spec
"<filter-function>":
"blur() | brightness() | contrast() | custom() | " +
"drop-shadow() | grayscale() | hue-rotate() | invert() | " +
"opacity() | saturate() | sepia()",
"<flex-basis>": "<width>",
"<flex-direction>": "row | row-reverse | column | column-reverse",
"<flex-grow>": "<number>",
"<flex-shrink>": "<number>",
"<flex-wrap>": "nowrap | wrap | wrap-reverse",
"<font-size>":
"<absolute-size> | <relative-size> | <length> | <percentage>",
"<font-stretch>":
"normal | ultra-condensed | extra-condensed | condensed | " +
"semi-condensed | semi-expanded | expanded | extra-expanded | " +
"ultra-expanded",
"<font-style>": "normal | italic | oblique",
"<font-variant-caps>":
"small-caps | all-small-caps | petite-caps | all-petite-caps | " +
"unicase | titling-caps",
"<font-variant-css21>": "normal | small-caps",
"<font-weight>":
"normal | bold | bolder | lighter | " +
"100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900",
"<generic-family>":
"serif | sans-serif | cursive | fantasy | monospace",
"<geometry-box>": "<shape-box> | fill-box | stroke-box | view-box",
"<glyph-angle>": function(part) {
return part.type === "angle" && part.units === "deg";
},
"<gradient>": function(part) {
return part.type === "function" && /^(?:\-(?:ms|moz|o|webkit)\-)?(?:repeating\-)?(?:radial\-|linear\-)?gradient/i.test(part);
},
"<icccolor>":
"cielab() | cielch() | cielchab() | " +
"icc-color() | icc-named-color()",
//any identifier
"<ident>": function(part) {
return part.type === "identifier" || part.wasIdent;
},
"<ident-not-generic-family>": function(part) {
return this["<ident>"](part) && !this["<generic-family>"](part);
},
"<image>": "<uri>",
"<integer>": function(part) {
return part.type === "integer";
},
"<length>": function(part) {
if (part.type === "function" && /^(?:\-(?:ms|moz|o|webkit)\-)?calc/i.test(part)) {
return true;
} else {
return part.type === "length" || part.type === "number" || part.type === "integer" || String(part) === "0";
}
},
"<line>": function(part) {
return part.type === "integer";
},
"<line-height>": "<number> | <length> | <percentage> | normal",
"<margin-width>": "<length> | <percentage> | auto",
"<miterlimit>": function(part) {
return this["<number>"](part) && part.value >= 1;
},
"<nonnegative-length-or-percentage>": function(part) {
return (this["<length>"](part) || this["<percentage>"](part)) &&
(String(part) === "0" || part.type === "function" || (part.value) >= 0);
},
"<nonnegative-number-or-percentage>": function(part) {
return (this["<number>"](part) || this["<percentage>"](part)) &&
(String(part) === "0" || part.type === "function" || (part.value) >= 0);
},
"<number>": function(part) {
return part.type === "number" || this["<integer>"](part);
},
"<opacity-value>": function(part) {
return this["<number>"](part) && part.value >= 0 && part.value <= 1;
},
"<padding-width>": "<nonnegative-length-or-percentage>",
"<percentage>": function(part) {
return part.type === "percentage" || String(part) === "0";
},
"<relative-size>": "smaller | larger",
"<shape>": "rect() | inset-rect()",
"<shape-box>": "<box> | margin-box",
"<single-animation-direction>":
"normal | reverse | alternate | alternate-reverse",
"<single-animation-name>": function(part) {
return this["<ident>"](part) &&
/^-?[a-z_][-a-z0-9_]+$/i.test(part) &&
!/^(none|unset|initial|inherit)$/i.test(part);
},
"<string>": function(part) {
return part.type === "string";
},
"<time>": function(part) {
return part.type === "time";
},
"<uri>": function(part) {
return part.type === "uri";
},
"<width>": "<margin-width>"
},
complex: {
__proto__: null,
"<azimuth>":
"<angle>" +
" | " +
"[ [ left-side | far-left | left | center-left | center | " +
"center-right | right | far-right | right-side ] || behind ]" +
" | "+
"leftwards | rightwards",
"<bg-position>": "<position>#",
"<bg-size>":
"[ <length> | <percentage> | auto ]{1,2} | cover | contain",
"<border-image-slice>":
// [<number> | <percentage>]{1,4} && fill?
// *but* fill can appear between any of the numbers
Matcher.many([true /* first element is required */],
Matcher.cast("<nonnegative-number-or-percentage>"),
Matcher.cast("<nonnegative-number-or-percentage>"),
Matcher.cast("<nonnegative-number-or-percentage>"),
Matcher.cast("<nonnegative-number-or-percentage>"),
"fill"),
"<border-radius>":
"<nonnegative-length-or-percentage>{1,4} " +
"[ / <nonnegative-length-or-percentage>{1,4} ]?",
"<box-shadow>": "none | <shadow>#",
"<clip-path>": "<basic-shape> || <geometry-box>",
"<dasharray>":
// "list of comma and/or white space separated <length>s and
// <percentage>s". There is a non-negative constraint.
Matcher.cast("<nonnegative-length-or-percentage>")
.braces(1, Infinity, "#", Matcher.cast(",").question()),
"<family-name>":
// <string> | <IDENT>+
"<string> | <ident-not-generic-family> <ident>*",
"<filter-function-list>": "[ <filter-function> | <uri> ]+",
// https://www.w3.org/TR/2014/WD-css-flexbox-1-20140325/#flex-property
"<flex>":
"none | [ <flex-grow> <flex-shrink>? || <flex-basis> ]",
"<font-family>": "[ <generic-family> | <family-name> ]#",
"<font-shorthand>":
"[ <font-style> || <font-variant-css21> || " +
"<font-weight> || <font-stretch> ]? <font-size> " +
"[ / <line-height> ]? <font-family>",
"<font-variant-alternates>":
// stylistic(<feature-value-name>)
"stylistic() || " +
"historical-forms || " +
// styleset(<feature-value-name> #)
"styleset() || " +
// character-variant(<feature-value-name> #)
"character-variant() || " +
// swash(<feature-value-name>)
"swash() || " +
// ornaments(<feature-value-name>)
"ornaments() || " +
// annotation(<feature-value-name>)
"annotation()",
"<font-variant-ligatures>":
// <common-lig-values>
"[ common-ligatures | no-common-ligatures ] || " +
// <discretionary-lig-values>
"[ discretionary-ligatures | no-discretionary-ligatures ] || " +
// <historical-lig-values>
"[ historical-ligatures | no-historical-ligatures ] || " +
// <contextual-alt-values>
"[ contextual | no-contextual ]",
"<font-variant-numeric>":
// <numeric-figure-values>
"[ lining-nums | oldstyle-nums ] || " +
// <numeric-spacing-values>
"[ proportional-nums | tabular-nums ] || " +
// <numeric-fraction-values>
"[ diagonal-fractions | stacked-fractions ] || " +
"ordinal || slashed-zero",
"<font-variant-east-asian>":
// <east-asian-variant-values>
"[ jis78 | jis83 | jis90 | jis04 | simplified | traditional ] || " +
// <east-asian-width-values>
"[ full-width | proportional-width ] || " +
"ruby",
// Note that <color> here is "as defined in the SVG spec", which
// is more restrictive that the <color> defined in the CSS spec.
// none | currentColor | <color> [<icccolor>]? |
// <funciri> [ none | currentColor | <color> [<icccolor>]? ]?
"<paint>": "<paint-basic> | <uri> <paint-basic>?",
// Helper definition for <paint> above.
"<paint-basic>": "none | currentColor | <color-svg> <icccolor>?",
"<position>":
// Because our `alt` combinator is ordered, we need to test these
// in order from longest possible match to shortest.
"[ center | [ left | right ] [ <percentage> | <length> ]? ] && " +
"[ center | [ top | bottom ] [ <percentage> | <length> ]? ]" +
" | " +
"[ left | center | right | <percentage> | <length> ] " +
"[ top | center | bottom | <percentage> | <length> ]" +
" | " +
"[ left | center | right | top | bottom | <percentage> | <length> ]",
"<repeat-style>":
"repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2}",
"<shadow>":
//inset? && [ <length>{2,4} && <color>? ]
Matcher.many([true /* length is required */],
Matcher.cast("<length>").braces(2, 4), "inset", "<color>"),
"<text-decoration-color>":
"<color>",
"<text-decoration-line>":
"none | [ underline || overline || line-through || blink ]",
"<text-decoration-style>":
"solid | double | dotted | dashed | wavy",
"<will-change>":
"auto | <animateable-feature>#",
"<x-one-radius>":
//[ <length> | <percentage> ] [ <length> | <percentage> ]?
"[ <length> | <percentage> ]{1,2}"
}
});
Object.keys(ValidationTypes.simple).forEach(function(nt) {
var rule = ValidationTypes.simple[nt];
if (typeof rule === "string") {
ValidationTypes.simple[nt] = function(part) {
return ValidationTypes.isLiteral(part, rule);
};
}
});
Object.keys(ValidationTypes.complex).forEach(function(nt) {
var rule = ValidationTypes.complex[nt];
if (typeof rule === "string") {
ValidationTypes.complex[nt] = Matcher.parse(rule);
}
});
// Because this is defined relative to other complex validation types,
// we need to define it *after* the rest of the types are initialized.
ValidationTypes.complex["<font-variant>"] =
Matcher.oror({ expand: "<font-variant-ligatures>" },
{ expand: "<font-variant-alternates>" },
"<font-variant-caps>",
{ expand: "<font-variant-numeric>" },
{ expand: "<font-variant-east-asian>" });
},{"./Matcher":3}],22:[function(require,module,exports){
"use strict";
module.exports = {
Colors : require("./Colors"),
Combinator : require("./Combinator"),
Parser : require("./Parser"),
PropertyName : require("./PropertyName"),
PropertyValue : require("./PropertyValue"),
PropertyValuePart : require("./PropertyValuePart"),
Matcher : require("./Matcher"),
MediaFeature : require("./MediaFeature"),
MediaQuery : require("./MediaQuery"),
Selector : require("./Selector"),
SelectorPart : require("./SelectorPart"),
SelectorSubPart : require("./SelectorSubPart"),
Specificity : require("./Specificity"),
TokenStream : require("./TokenStream"),
Tokens : require("./Tokens"),
ValidationError : require("./ValidationError")
};
},{"./Colors":1,"./Combinator":2,"./Matcher":3,"./MediaFeature":4,"./MediaQuery":5,"./Parser":6,"./PropertyName":8,"./PropertyValue":9,"./PropertyValuePart":11,"./Selector":13,"./SelectorPart":14,"./SelectorSubPart":15,"./Specificity":16,"./TokenStream":17,"./Tokens":18,"./ValidationError":20}],23:[function(require,module,exports){
"use strict";
module.exports = EventTarget;
/**
* A generic base to inherit from for any object
* that needs event handling.
* @class EventTarget
* @constructor
*/
function EventTarget() {
/**
* The array of listeners for various events.
* @type Object
* @property _listeners
* @private
*/
this._listeners = Object.create(null);
}
EventTarget.prototype = {
//restore constructor
constructor: EventTarget,
/**
* Adds a listener for a given event type.
* @param {String} type The type of event to add a listener for.
* @param {Function} listener The function to call when the event occurs.
* @return {void}
* @method addListener
*/
addListener: function(type, listener) {
if (!this._listeners[type]) {
this._listeners[type] = [];
}
this._listeners[type].push(listener);
},
/**
* Fires an event based on the passed-in object.
* @param {Object|String} event An object with at least a 'type' attribute
* or a string indicating the event name.
* @return {void}
* @method fire
*/
fire: function(event) {
if (typeof event === "string") {
event = { type: event };
}
if (typeof event.target !== "undefined") {
event.target = this;
}
if (typeof event.type === "undefined") {
throw new Error("Event object missing 'type' property.");
}
if (this._listeners[event.type]) {
//create a copy of the array and use that so listeners can't chane
var listeners = this._listeners[event.type].concat();
for (var i=0, len=listeners.length; i < len; i++) {
listeners[i].call(this, event);
}
}
},
/**
* Removes a listener for a given event type.
* @param {String} type The type of event to remove a listener from.
* @param {Function} listener The function to remove from the event.
* @return {void}
* @method removeListener
*/
removeListener: function(type, listener) {
if (this._listeners[type]) {
var listeners = this._listeners[type];
for (var i=0, len=listeners.length; i < len; i++) {
if (listeners[i] === listener) {
listeners.splice(i, 1);
break;
}
}
}
}
};
},{}],24:[function(require,module,exports){
"use strict";
module.exports = StringReader;
/**
* Convenient way to read through strings.
* @namespace parserlib.util
* @class StringReader
* @constructor
* @param {String} text The text to read.
*/
function StringReader(text) {
/**
* The input text with line endings normalized.
* @property _input
* @type String
* @private
*/
this._input = text.replace(/(\r\n?|\n)/g, "\n");
/**
* The row for the character to be read next.
* @property _line
* @type int
* @private
*/
this._line = 1;
/**
* The column for the character to be read next.
* @property _col
* @type int
* @private
*/
this._col = 1;
/**
* The index of the character in the input to be read next.
* @property _cursor
* @type int
* @private
*/
this._cursor = 0;
}
StringReader.prototype = {
// restore constructor
constructor: StringReader,
//-------------------------------------------------------------------------
// Position info
//-------------------------------------------------------------------------
/**
* Returns the column of the character to be read next.
* @return {int} The column of the character to be read next.
* @method getCol
*/
getCol: function() {
return this._col;
},
/**
* Returns the row of the character to be read next.
* @return {int} The row of the character to be read next.
* @method getLine
*/
getLine: function() {
return this._line;
},
/**
* Determines if you're at the end of the input.
* @return {Boolean} True if there's no more input, false otherwise.
* @method eof
*/
eof: function() {
return this._cursor === this._input.length;
},
//-------------------------------------------------------------------------
// Basic reading
//-------------------------------------------------------------------------
/**
* Reads the next character without advancing the cursor.
* @param {int} count How many characters to look ahead (default is 1).
* @return {String} The next character or null if there is no next character.
* @method peek
*/
peek: function(count) {
var c = null;
count = typeof count === "undefined" ? 1 : count;
// if we're not at the end of the input...
if (this._cursor < this._input.length) {
// get character and increment cursor and column
c = this._input.charAt(this._cursor + count - 1);
}
return c;
},
/**
* Reads the next character from the input and adjusts the row and column
* accordingly.
* @return {String} The next character or null if there is no next character.
* @method read
*/
read: function() {
var c = null;
// if we're not at the end of the input...
if (this._cursor < this._input.length) {
// if the last character was a newline, increment row count
// and reset column count
if (this._input.charAt(this._cursor) === "\n") {
this._line++;
this._col=1;
} else {
this._col++;
}
// get character and increment cursor and column
c = this._input.charAt(this._cursor++);
}
return c;
},
//-------------------------------------------------------------------------
// Misc
//-------------------------------------------------------------------------
/**
* Saves the current location so it can be returned to later.
* @method mark
* @return {void}
*/
mark: function() {
this._bookmark = {
cursor: this._cursor,
line: this._line,
col: this._col
};
},
reset: function() {
if (this._bookmark) {
this._cursor = this._bookmark.cursor;
this._line = this._bookmark.line;
this._col = this._bookmark.col;
delete this._bookmark;
}
},
//-------------------------------------------------------------------------
// Advanced reading
//-------------------------------------------------------------------------
/**
* Reads up to and including the given string. Throws an error if that
* string is not found.
* @param {String} pattern The string to read.
* @return {String} The string when it is found.
* @throws Error when the string pattern is not found.
* @method readTo
*/
readTo: function(pattern) {
var buffer = "",
c;
/*
* First, buffer must be the same length as the pattern.
* Then, buffer must end with the pattern or else reach the
* end of the input.
*/
while (buffer.length < pattern.length || buffer.lastIndexOf(pattern) !== buffer.length - pattern.length) {
c = this.read();
if (c) {
buffer += c;
} else {
throw new Error("Expected \"" + pattern + "\" at line " + this._line + ", col " + this._col + ".");
}
}
return buffer;
},
/**
* Reads characters while each character causes the given
* filter function to return true. The function is passed
* in each character and either returns true to continue
* reading or false to stop.
* @param {Function} filter The function to read on each character.
* @return {String} The string made up of all characters that passed the
* filter check.
* @method readWhile
*/
readWhile: function(filter) {
var buffer = "",
c = this.peek();
while (c !== null && filter(c)) {
buffer += this.read();
c = this.peek();
}
return buffer;
},
/**
* Reads characters that match either text or a regular expression and
* returns those characters. If a match is found, the row and column
* are adjusted; if no match is found, the reader's state is unchanged.
* reading or false to stop.
* @param {String|RegExp} matcher If a string, then the literal string
* value is searched for. If a regular expression, then any string
* matching the pattern is search for.
* @return {String} The string made up of all characters that matched or
* null if there was no match.
* @method readMatch
*/
readMatch: function(matcher) {
var source = this._input.substring(this._cursor),
value = null;
// if it's a string, just do a straight match
if (typeof matcher === "string") {
if (source.slice(0, matcher.length) === matcher) {
value = this.readCount(matcher.length);
}
} else if (matcher instanceof RegExp) {
if (matcher.test(source)) {
value = this.readCount(RegExp.lastMatch.length);
}
}
return value;
},
/**
* Reads a given number of characters. If the end of the input is reached,
* it reads only the remaining characters and does not throw an error.
* @param {int} count The number of characters to read.
* @return {String} The string made up the read characters.
* @method readCount
*/
readCount: function(count) {
var buffer = "";
while (count--) {
buffer += this.read();
}
return buffer;
}
};
},{}],25:[function(require,module,exports){
"use strict";
module.exports = SyntaxError;
/**
* Type to use when a syntax error occurs.
* @class SyntaxError
* @namespace parserlib.util
* @constructor
* @param {String} message The error message.
* @param {int} line The line at which the error occurred.
* @param {int} col The column at which the error occurred.
*/
function SyntaxError(message, line, col) {
Error.call(this);
this.name = this.constructor.name;
/**
* The column at which the error occurred.
* @type int
* @property col
*/
this.col = col;
/**
* The line at which the error occurred.
* @type int
* @property line
*/
this.line = line;
/**
* The text representation of the unit.
* @type String
* @property text
*/
this.message = message;
}
//inherit from Error
SyntaxError.prototype = Object.create(Error.prototype); // jshint ignore:line
SyntaxError.prototype.constructor = SyntaxError; // jshint ignore:line
},{}],26:[function(require,module,exports){
"use strict";
module.exports = SyntaxUnit;
/**
* Base type to represent a single syntactic unit.
* @class SyntaxUnit
* @namespace parserlib.util
* @constructor
* @param {String} text The text of the unit.
* @param {int} line The line of text on which the unit resides.
* @param {int} col The column of text on which the unit resides.
*/
function SyntaxUnit(text, line, col, type) {
/**
* The column of text on which the unit resides.
* @type int
* @property col
*/
this.col = col;
/**
* The line of text on which the unit resides.
* @type int
* @property line
*/
this.line = line;
/**
* The text representation of the unit.
* @type String
* @property text
*/
this.text = text;
/**
* The type of syntax unit.
* @type int
* @property type
*/
this.type = type;
}
/**
* Create a new syntax unit based solely on the given token.
* Convenience method for creating a new syntax unit when
* it represents a single token instead of multiple.
* @param {Object} token The token object to represent.
* @return {parserlib.util.SyntaxUnit} The object representing the token.
* @static
* @method fromToken
*/
SyntaxUnit.fromToken = function(token) {
return new SyntaxUnit(token.value, token.startLine, token.startCol);
};
SyntaxUnit.prototype = {
//restore constructor
constructor: SyntaxUnit,
/**
* Returns the text representation of the unit.
* @return {String} The text representation of the unit.
* @method valueOf
*/
valueOf: function() {
return this.toString();
},
/**
* Returns the text representation of the unit.
* @return {String} The text representation of the unit.
* @method toString
*/
toString: function() {
return this.text;
}
};
},{}],27:[function(require,module,exports){
"use strict";
module.exports = TokenStreamBase;
var StringReader = require("./StringReader");
var SyntaxError = require("./SyntaxError");
/**
* Generic TokenStream providing base functionality.
* @class TokenStreamBase
* @namespace parserlib.util
* @constructor
* @param {String|StringReader} input The text to tokenize or a reader from
* which to read the input.
*/
function TokenStreamBase(input, tokenData) {
/**
* The string reader for easy access to the text.
* @type StringReader
* @property _reader
* @private
*/
this._reader = new StringReader(input ? input.toString() : "");
/**
* Token object for the last consumed token.
* @type Token
* @property _token
* @private
*/
this._token = null;
/**
* The array of token information.
* @type Array
* @property _tokenData
* @private
*/
this._tokenData = tokenData;
/**
* Lookahead token buffer.
* @type Array
* @property _lt
* @private
*/
this._lt = [];
/**
* Lookahead token buffer index.
* @type int
* @property _ltIndex
* @private
*/
this._ltIndex = 0;
this._ltIndexCache = [];
}
/**
* Accepts an array of token information and outputs
* an array of token data containing key-value mappings
* and matching functions that the TokenStream needs.
* @param {Array} tokens An array of token descriptors.
* @return {Array} An array of processed token data.
* @method createTokenData
* @static
*/
TokenStreamBase.createTokenData = function(tokens) {
var nameMap = [],
typeMap = Object.create(null),
tokenData = tokens.concat([]),
i = 0,
len = tokenData.length+1;
tokenData.UNKNOWN = -1;
tokenData.unshift({ name:"EOF" });
for (; i < len; i++) {
nameMap.push(tokenData[i].name);
tokenData[tokenData[i].name] = i;
if (tokenData[i].text) {
typeMap[tokenData[i].text] = i;
}
}
tokenData.name = function(tt) {
return nameMap[tt];
};
tokenData.type = function(c) {
return typeMap[c];
};
return tokenData;
};
TokenStreamBase.prototype = {
//restore constructor
constructor: TokenStreamBase,
//-------------------------------------------------------------------------
// Matching methods
//-------------------------------------------------------------------------
/**
* Determines if the next token matches the given token type.
* If so, that token is consumed; if not, the token is placed
* back onto the token stream. You can pass in any number of
* token types and this will return true if any of the token
* types is found.
* @param {int|int[]} tokenTypes Either a single token type or an array of
* token types that the next token might be. If an array is passed,
* it's assumed that the token can be any of these.
* @param {variant} channel (Optional) The channel to read from. If not
* provided, reads from the default (unnamed) channel.
* @return {Boolean} True if the token type matches, false if not.
* @method match
*/
match: function(tokenTypes, channel) {
//always convert to an array, makes things easier
if (!(tokenTypes instanceof Array)) {
tokenTypes = [tokenTypes];
}
var tt = this.get(channel),
i = 0,
len = tokenTypes.length;
while (i < len) {
if (tt === tokenTypes[i++]) {
return true;
}
}
//no match found, put the token back
this.unget();
return false;
},
/**
* Determines if the next token matches the given token type.
* If so, that token is consumed; if not, an error is thrown.
* @param {int|int[]} tokenTypes Either a single token type or an array of
* token types that the next token should be. If an array is passed,
* it's assumed that the token must be one of these.
* @return {void}
* @method mustMatch
*/
mustMatch: function(tokenTypes) {
var token;
//always convert to an array, makes things easier
if (!(tokenTypes instanceof Array)) {
tokenTypes = [tokenTypes];
}
if (!this.match.apply(this, arguments)) {
token = this.LT(1);
throw new SyntaxError("Expected " + this._tokenData[tokenTypes[0]].name +
" at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol);
}
},
//-------------------------------------------------------------------------
// Consuming methods
//-------------------------------------------------------------------------
/**
* Keeps reading from the token stream until either one of the specified
* token types is found or until the end of the input is reached.
* @param {int|int[]} tokenTypes Either a single token type or an array of
* token types that the next token should be. If an array is passed,
* it's assumed that the token must be one of these.
* @param {variant} channel (Optional) The channel to read from. If not
* provided, reads from the default (unnamed) channel.
* @return {void}
* @method advance
*/
advance: function(tokenTypes, channel) {
while (this.LA(0) !== 0 && !this.match(tokenTypes, channel)) {
this.get();
}
return this.LA(0);
},
/**
* Consumes the next token from the token stream.
* @return {int} The token type of the token that was just consumed.
* @method get
*/
get: function(channel) {
var tokenInfo = this._tokenData,
i =0,
token,
info;
//check the lookahead buffer first
if (this._lt.length && this._ltIndex >= 0 && this._ltIndex < this._lt.length) {
i++;
this._token = this._lt[this._ltIndex++];
info = tokenInfo[this._token.type];
//obey channels logic
while ((info.channel !== undefined && channel !== info.channel) &&
this._ltIndex < this._lt.length) {
this._token = this._lt[this._ltIndex++];
info = tokenInfo[this._token.type];
i++;
}
//here be dragons
if ((info.channel === undefined || channel === info.channel) &&
this._ltIndex <= this._lt.length) {
this._ltIndexCache.push(i);
return this._token.type;
}
}
//call token retriever method
token = this._getToken();
//if it should be hidden, don't save a token
if (token.type > -1 && !tokenInfo[token.type].hide) {
//apply token channel
token.channel = tokenInfo[token.type].channel;
//save for later
this._token = token;
this._lt.push(token);
//save space that will be moved (must be done before array is truncated)
this._ltIndexCache.push(this._lt.length - this._ltIndex + i);
//keep the buffer under 5 items
if (this._lt.length > 5) {
this._lt.shift();
}
//also keep the shift buffer under 5 items
if (this._ltIndexCache.length > 5) {
this._ltIndexCache.shift();
}
//update lookahead index
this._ltIndex = this._lt.length;
}
/*
* Skip to the next token if:
* 1. The token type is marked as hidden.
* 2. The token type has a channel specified and it isn't the current channel.
*/
info = tokenInfo[token.type];
if (info &&
(info.hide ||
(info.channel !== undefined && channel !== info.channel))) {
return this.get(channel);
} else {
//return just the type
return token.type;
}
},
/**
* Looks ahead a certain number of tokens and returns the token type at
* that position. This will throw an error if you lookahead past the
* end of input, past the size of the lookahead buffer, or back past
* the first token in the lookahead buffer.
* @param {int} The index of the token type to retrieve. 0 for the
* current token, 1 for the next, -1 for the previous, etc.
* @return {int} The token type of the token in the given position.
* @method LA
*/
LA: function(index) {
var total = index,
tt;
if (index > 0) {
//TODO: Store 5 somewhere
if (index > 5) {
throw new Error("Too much lookahead.");
}
//get all those tokens
while (total) {
tt = this.get();
total--;
}
//unget all those tokens
while (total < index) {
this.unget();
total++;
}
} else if (index < 0) {
if (this._lt[this._ltIndex+index]) {
tt = this._lt[this._ltIndex+index].type;
} else {
throw new Error("Too much lookbehind.");
}
} else {
tt = this._token.type;
}
return tt;
},
/**
* Looks ahead a certain number of tokens and returns the token at
* that position. This will throw an error if you lookahead past the
* end of input, past the size of the lookahead buffer, or back past
* the first token in the lookahead buffer.
* @param {int} The index of the token type to retrieve. 0 for the
* current token, 1 for the next, -1 for the previous, etc.
* @return {Object} The token of the token in the given position.
* @method LA
*/
LT: function(index) {
//lookahead first to prime the token buffer
this.LA(index);
//now find the token, subtract one because _ltIndex is already at the next index
return this._lt[this._ltIndex+index-1];
},
/**
* Returns the token type for the next token in the stream without
* consuming it.
* @return {int} The token type of the next token in the stream.
* @method peek
*/
peek: function() {
return this.LA(1);
},
/**
* Returns the actual token object for the last consumed token.
* @return {Token} The token object for the last consumed token.
* @method token
*/
token: function() {
return this._token;
},
/**
* Returns the name of the token for the given token type.
* @param {int} tokenType The type of token to get the name of.
* @return {String} The name of the token or "UNKNOWN_TOKEN" for any
* invalid token type.
* @method tokenName
*/
tokenName: function(tokenType) {
if (tokenType < 0 || tokenType > this._tokenData.length) {
return "UNKNOWN_TOKEN";
} else {
return this._tokenData[tokenType].name;
}
},
/**
* Returns the token type value for the given token name.
* @param {String} tokenName The name of the token whose value should be returned.
* @return {int} The token type value for the given token name or -1
* for an unknown token.
* @method tokenName
*/
tokenType: function(tokenName) {
return this._tokenData[tokenName] || -1;
},
/**
* Returns the last consumed token to the token stream.
* @method unget
*/
unget: function() {
//if (this._ltIndex > -1) {
if (this._ltIndexCache.length) {
this._ltIndex -= this._ltIndexCache.pop();//--;
this._token = this._lt[this._ltIndex - 1];
} else {
throw new Error("Too much lookahead.");
}
}
};
},{"./StringReader":24,"./SyntaxError":25}],28:[function(require,module,exports){
"use strict";
module.exports = {
StringReader : require("./StringReader"),
SyntaxError : require("./SyntaxError"),
SyntaxUnit : require("./SyntaxUnit"),
EventTarget : require("./EventTarget"),
TokenStreamBase : require("./TokenStreamBase")
};
},{"./EventTarget":23,"./StringReader":24,"./SyntaxError":25,"./SyntaxUnit":26,"./TokenStreamBase":27}],"parserlib":[function(require,module,exports){
"use strict";
module.exports = {
css : require("./css"),
util : require("./util")
};
},{"./css":22,"./util":28}]},{},[]);
return require('parserlib');
})();
|
import { actionEnums } from '../admin-action-enum'
import {
getSectionsServices,
postSectionServices,
deleteSectionsServices,
getfindIDServies,
updateSectionServices,
/**SUBJECT */
getSubjectFindIdServies,
getSubjectServies
} from '../../services/admin/section.services'
const sectionRequest = () => {
return {
type: actionEnums.GET_SECTiONS_REQUEST
}
}
const getSections = (isSuccess, data, error) => {
return {
type: actionEnums.FETCH_DATA_SECTIONS,
payload: {
isSuccess,
data,
error
}
}
}
const getSectionsFindId = (isSuccess, data, error) => {
return {
type: actionEnums.FETCH_ITEM_SECTION_FIND_ID,
payload: {
isSuccess,
data,
error
}
}
}
const createSection = (isSuccess, data) => {
return {
type: actionEnums.CREATE_DATA_SECTIONS,
payload: {
isSuccess,
data
}
}
}
const deleteSection = (isSuccess, id, message) => {
return {
type: actionEnums.DELETE_ITEM_SECTIONS,
payload: {
isSuccess,
id,
message
}
}
}
const updateSection = (isSuccess, dataUpdate, message) => {
return {
type: actionEnums.UPDATE_ITEM_SECTIONS,
payload: {
isSuccess,
dataUpdate,
message
}
}
}
const fetchDataSection = () => {
return async (dispatch) => {
dispatch(sectionRequest())
try {
const result = await getSectionsServices()
if (result) {
dispatch(getSections(true, result, null))
}
} catch (e) {
dispatch(getSections(false, null, e.response ? 'Error 1' : 'Error 2'))
}
}
}
const fetchDataFindID = (sections_id) => {
return async (dispatch) => {
dispatch(sectionRequest())
try {
const result = await getfindIDServies(sections_id)
if (result) {
dispatch(getSectionsFindId(true, result, null))
}
} catch (e) {
dispatch(getSectionsFindId(false, null, e.response ? 'Error 1' : 'Error 2'))
}
}
}
const createItemSection = (data) => async (dispatch) => {
try {
const result = await postSectionServices(data)
if (result.data) {
dispatch(createSection(true, result.data))
}
} catch (e) {
const error = e.response ? e.response.data : { message: "Network Error" }
dispatch(createSection(false, error))
}
}
const deleteItemSection = (data) => async (dispatch) => {
try {
const result = await deleteSectionsServices(data)
if (result) {
dispatch(deleteSection(true, result.data.data._id))
}
} catch (e) {
dispatch(deleteSection(false, null, e.response ? 'ERR 1' : 'ERR 2'))
}
}
const updateItemsSection = (data) => async (dispatch, reloading) => {
try {
const result = await updateSectionServices(data)
if (result) {
dispatch(updateSection(true, null))
dispatch(fetchDataSection(reloading().SectionsReducer))
dispatch(fetchDataSubject(reloading().SectionsReducer))
}
} catch (e) {
dispatch(updateSection(false, null, e.response ? 'Err 1' : 'Err 2'))
}
}
/**SUBJECT */
const subjectRequest = () => {
return {
type: actionEnums.SUBJECTS_REQUEST
}
}
const getSubject = (isSuccess, data, error) => {
return {
type: actionEnums.GET_SUBJECTS_DATA,
payload: {
isSuccess,
data,
error
}
}
}
const getSubjectFindId = (isSuccess, data, error) => {
return {
type: actionEnums.GET_SUBJECTS_DATA_FIND_ID,
payload: {
isSuccess,
data,
error
}
}
}
const fetchDataFindIdSubject = (subjects_id) => {
return async (dispatch) => {
dispatch(subjectRequest())
try {
const result = await getSubjectFindIdServies(subjects_id)
if (result) {
dispatch(getSubjectFindId(true, result, null))
}
} catch (e) {
dispatch(getSubjectFindId(false, null, e.response ? 'Error 1' : 'Error 2'))
}
}
}
const fetchDataSubject = () => {
return async (dispatch) => {
dispatch(subjectRequest())
try {
const result = await getSubjectServies()
if (result) {
dispatch(getSubject(true, result, null))
}
} catch (e) {
dispatch(getSubject(false, null, e.response ? 'Error 1' : 'Error 2'))
}
}
}
export const sectionsActions = {
fetchDataSection,
createItemSection,
deleteItemSection,
fetchDataFindID,
updateItemsSection,
/**SUBJECT */
fetchDataFindIdSubject,
fetchDataSubject
}
|
import React from 'react'
import { graphql } from 'gatsby'
import Img from 'gatsby-image'
import Layout from '../components/layout'
const ProductTemplate = ({ data: { contentfulProduct }, location }) => (
<Layout>
<div
style={{
marginLeft: '0 auto',
width: '100%',
textAlign: 'center',
}}
>
{/* Product Info */}
<h2>
{contentfulProduct.name} -{' '}
<span style={{ color: '#ccc' }}>
Added on {contentfulProduct.createdAt}
</span>
</h2>
<h4>${contentfulProduct.price}</h4>
<p>{contentfulProduct.description}</p>
<button
style={{
background: 'darkorange',
color: 'white',
padding: '0.3em',
borderRadius: '5px',
cursor: 'pointer',
}}
className="snipcart-add-item"
data-item-id={contentfulProduct.slug}
data-item-price={contentfulProduct.price}
data-item-image={contentfulProduct.image.file.url}
data-item-name={contentfulProduct.name}
data-item-url={location.pathname}
>
Add to cart
</button>
<Img
style={{
margin: '0 auto',
maxWidth: 600
}}
fluid={contentfulProduct.image.fluid}
/>
</div>
</Layout>
)
export default ProductTemplate
export const query = graphql`
query($slug: String!) {
contentfulProduct(slug: { eq: $slug }) {
slug
name
price
description
createdAt(formatString: "MMMM Do, YYYY, h:mm:ss a")
image {
fluid(maxWidth: 800) {
...GatsbyContentfulFluid
}
file {
url
}
}
}
}
`
export default ProductTemplate
|
export default (function CrappyStyleSheets() {
const prototype = {};
function property(name, value) {
return [name, ':', value, ';'].join('');
}
[
'accelerator',
'animation',
'azimuth',
'background',
'background-attachment',
'background-color',
'background-image',
'background-position',
'background-position-x',
'background-position-y',
'background-repeat',
'behavior',
'border',
'border-bottom',
'border-bottom-color',
'border-bottom-style',
'border-bottom-width',
'border-collapse',
'border-color',
'border-left',
'border-left-color',
'border-left-style',
'border-left-width',
'border-right',
'border-right-color',
'border-right-style',
'border-right-width',
'border-spacing',
'border-style',
'border-top',
'border-top-color',
'border-top-style',
'border-top-width',
'border-width',
'bottom',
'box-sizing',
'caption-side',
'clear',
'clip',
'color',
'content',
'counter-increment',
'counter-reset',
'cue',
'cue-after',
'cue-before',
'cursor',
'direction',
'display',
'elevation',
'empty-cells',
'filter',
'float',
'font',
'font-family',
'font-size',
'font-size-adjust',
'font-stretch',
'font-style',
'font-variant',
'font-weight',
'height',
'ime-mode',
'include-source',
'layer-background-color',
'layer-background-image',
'layout-flow',
'layout-grid',
'layout-grid-char',
'layout-grid-char-spacing',
'layout-grid-line',
'layout-grid-mode',
'layout-grid-type',
'left',
'letter-spacing',
'line-break',
'line-height',
'list-style',
'list-style-image',
'list-style-position',
'list-style-type',
'margin',
'margin-bottom',
'margin-left',
'margin-right',
'margin-top',
'marker-offset',
'marks',
'max-height',
'max-width',
'min-height',
'min-width',
'-moz-binding',
'-moz-border-radius',
'-moz-border-radius-topleft',
'-moz-border-radius-topright',
'-moz-border-radius-bottomright',
'-moz-border-radius-bottomleft',
'-moz-border-top-colors',
'-moz-border-right-colors',
'-moz-border-bottom-colors',
'-moz-border-left-colors',
'-moz-opacity',
'-moz-outline',
'-moz-outline-color',
'-moz-outline-style',
'-moz-outline-width',
'-moz-user-focus',
'-moz-user-input',
'-moz-user-modify',
'-moz-user-select',
'opacity',
'orphans',
'outline',
'outline-color',
'outline-style',
'outline-width',
'overflow',
'overflow-X',
'overflow-Y',
'padding',
'padding-bottom',
'padding-left',
'padding-right',
'padding-top',
'page',
'page-break-after',
'page-break-before',
'page-break-inside',
'pause',
'pause-after',
'pause-before',
'pitch',
'pitch-range',
'play-during',
'pointer-events',
'position',
'quotes',
'-replace',
'richness',
'right',
'ruby-align',
'ruby-overhang',
'ruby-position',
'-set-link-source',
'size',
'speak',
'speak-header',
'speak-numeral',
'speak-punctuation',
'speech-rate',
'stress',
'scrollbar-arrow-color',
'scrollbar-base-color',
'scrollbar-dark-shadow-color',
'scrollbar-face-color',
'scrollbar-highlight-color',
'scrollbar-shadow-color',
'scrollbar-3d-light-color',
'scrollbar-track-color',
'table-layout',
'text-align',
'text-align-last',
'text-decoration',
'text-indent',
'text-justify',
'text-overflow',
'text-shadow',
'text-transform',
'text-autospace',
'text-kashida-space',
'text-underline-position',
'top',
'transition',
'unicode-bidi',
'-use-link-source',
'vertical-align',
'visibility',
'voice-family',
'volume',
'white-space',
'widows',
'width',
'word-break',
'word-spacing',
'word-wrap',
'writing-mode',
'z-index',
'zoom',
'-webkit-transition',
'-webkit-animation',
].forEach(function add_to_prototype(_) {
let name = _.replace(/-/g, '_');
prototype[name] = function(value) {
return property(_, value);
}
});
const __css = {};
const next_name = (function generator() {
const letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
const max_position = letters.length - 1;
let position = 0;
let length = 1;
return function next() {
if(position === max_position) {
position = 0;
}
let result = "";
for(let i = 0; i < length; i++) {
result += letters[position];
position += 1;
}
return result;
}
}());
// Returns the class name.
function define(styles) {
const class_name = next_name();
__css[`.${class_name}`] = ['{', styles['_'].join('\n') ,'}\n'].join('\n');
delete styles['_'];
let selectors = Object.getOwnPropertyNames(styles);
selectors.forEach(function(_) {
let selector = `.${class_name} ${_}`;
__css[selector] = ['{', styles[_].join('\n') ,'}\n'].join('\n');
});
return class_name;
}
function define_keyframes(name, properties) {
__css[`@keyframes ${name}`] = properties;
__css[`@-webkit-keyframes ${name}`] = properties;
}
// returns the generated css.
function generate() {
classes = Object.getOwnPropertyNames(__css);
let the_css = "";
classes.forEach(function(_) {
let properties = __css[_];
the_css += `${_} ${properties}`
});
return html.style(undefined, the_css);
}
function style(element) {
return (function Styler() {
let constructor = function renderStyle() {
const class_name = next_name();
__css[`.${class_name}`] = ['{', element._style, '}\n'].join('\n');
element.className += ' ' + class_name;
};
element._style = '';
[ 'color',
'display',
'font_size',
'font_weight',
'padding',
'position',
'pointer_events',
'left',
'top',
'width',
'border',
'margin_bottom',
'box_sizing',
'border_bottom',
'height',
'opacity'
].forEach(function(_) {
constructor[_] = function(value) {
element._style += css[_](value);
return constructor;
}
});
return constructor;
}());
}
function style_state(element) {
return (function StateStyler() {
let styles = [];
let constructor = function compile() {
let class_name = element.className.trim().split(' ')[0];
styles.forEach(function add_css(_) {
__css[`.${class_name}:${_.pseudo}`] = [
'{',
_.properties.join(''),
'}\n'
].join('\n');
});
};
constructor.on = function On(pseudo_state) {
let pseudo_style = {
pseudo: pseudo_state
};
return {
style: function Style(...properties) {
pseudo_style.properties = properties;
styles.push(pseudo_style);
return constructor;
}
}
};
return constructor;
}());
}
function animate(element) {
return (function Animator() {
let transition = undefined;
let from_properties = undefined;
let to_properties = undefined;
let on_element = undefined;
let constructor = function compile() {
const class_name = next_name();
let selectors = [];
on_element.pseudo.forEach(function makeSelector(_) {
selectors.push(`.${class_name}:${_} ~ .${element.className.trim()}`);
});
if(from_properties) {
// Create the @key-frame structure.
const name = next_name();
__css[`@-webkit-keyframes ${name}`] = [
'{',
'from {',
from_properties,
'}',
'to {',
to_properties,
'}}\n'
].join('\n');
__css[`${selectors.join(',')}`] = [
'{',
css._webkit_animation(`${name} ${transition}`),
'}\n'].join('\n');
}
else {
element.style = css.transition(transition);
__css[`${selectors.join(',')}`] = ['{', to_properties, '}\n'].join('\n');
}
on_element.element.className = [on_element.element.className,
class_name].join(' ');
};
constructor.transition = function(value) {
transition = value;
return constructor;
};
constructor.from = function(...properties) {
from_properties = properties.join('');
return {
to: function(...properties) {
to_properties = properties.join('');
return constructor;
}
}
};
constructor.to = function(...properties) {
to_properties = properties.join('');
return constructor;
};
constructor.on = function(element, ...pseudo) {
on_element = {
'element': element,
'pseudo': pseudo
};
return constructor;
};
return constructor;
}());
}
prototype.define = define;
prototype.define_keyframes = define_keyframes;
prototype.generate = generate;
prototype.raw = function(_) { return _;};
prototype.style = style;
prototype.style_state = style_state;
prototype.animate = animate;
return Object.freeze(prototype);
}());
|
const Actions = {
days: document.getElementById("days"),
painter: document.getElementById("painter"),
scholl: document.getElementById("scholl"),
painterTwo: document.getElementById("painter2"),
schollTwo: document.getElementById("scholl2"),
redeemValues(){
return {
days: this.days.value,
painter: this.painter.value,
scholl: this.scholl.value,
painterTwo: this.painterTwo.value,
schollTwo: this.schollTwo.value
}
},
validation(){
let { days, painter, scholl, painterTwo, schollTwo }= this.redeemValues();
if(days === "" || painter === "" || scholl === "" || painterTwo === "" || schollTwo === "" ){
throw new Error("Preencha todos os campos");
}
days= parseInt(days);
painter= parseInt(painter);
scholl= parseInt(scholl);
painterTwo= parseInt(painterTwo);
schollTwo= parseInt(schollTwo);
return {
days, painter, scholl, painterTwo, schollTwo
}
},
calculation(){
const {days, painter, scholl, painterTwo, schollTwo }= this.validation();
const a = painter*schollTwo;
const b = painterTwo*scholl;
const c = b * days;
const result = c / a;
return result;
},
horse(event){
event.preventDefault();
try{
const result = this.calculation();
alert(result);
}catch(error){
alert(error.message)
}
},
simpleCalculation(){
}
}
const simpleAction ={
days: document.getElementById("days"),
painter: document.getElementById("painter"),
scholl: document.getElementById("scholl"),
rescueValues(){
return {
days: this.days.value,
painter: this.painter.value,
scholl: this.scholl.value,
}
},
validate(){
let { days, painter, scholl, painterTwo, schollTwo }= this.redeemValues();
if(days === "" || painter === "" || scholl === ""){
throw new Error("Preencha todos os campos");
}
days= parseInt(days);
painter= parseInt(painter);
scholl= parseInt(scholl);
return {
days, painter, scholl
}
},
calculate(){
const {days, painter, scholl}= this.validation();
const a = scholl * days;
const b = days * painter;
const c = b * days;
const result = c / a;
return result;
},
}
|
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define("@angular/compiler-cli/src/ngtsc/metadata", ["require", "exports", "@angular/compiler-cli/src/ngtsc/metadata/src/reflector", "@angular/compiler-cli/src/ngtsc/metadata/src/resolver"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/// <reference types="node" />
var reflector_1 = require("@angular/compiler-cli/src/ngtsc/metadata/src/reflector");
exports.TypeScriptReflectionHost = reflector_1.TypeScriptReflectionHost;
exports.filterToMembersWithDecorator = reflector_1.filterToMembersWithDecorator;
exports.findMember = reflector_1.findMember;
exports.reflectObjectLiteral = reflector_1.reflectObjectLiteral;
exports.reflectTypeEntityToDeclaration = reflector_1.reflectTypeEntityToDeclaration;
var resolver_1 = require("@angular/compiler-cli/src/ngtsc/metadata/src/resolver");
exports.AbsoluteReference = resolver_1.AbsoluteReference;
exports.EnumValue = resolver_1.EnumValue;
exports.ImportMode = resolver_1.ImportMode;
exports.Reference = resolver_1.Reference;
exports.ResolvedReference = resolver_1.ResolvedReference;
exports.isDynamicValue = resolver_1.isDynamicValue;
exports.staticallyResolve = resolver_1.staticallyResolve;
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9jb21waWxlci1jbGkvc3JjL25ndHNjL21ldGFkYXRhL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRzs7Ozs7Ozs7Ozs7O0lBRUgsOEJBQThCO0lBRTlCLG9GQUF5SjtJQUFqSiwrQ0FBQSx3QkFBd0IsQ0FBQTtJQUFFLG1EQUFBLDRCQUE0QixDQUFBO0lBQUUsaUNBQUEsVUFBVSxDQUFBO0lBQUUsMkNBQUEsb0JBQW9CLENBQUE7SUFBRSxxREFBQSw4QkFBOEIsQ0FBQTtJQUNoSSxrRkFBd0o7SUFBaEosdUNBQUEsaUJBQWlCLENBQUE7SUFBRSwrQkFBQSxTQUFTLENBQUE7SUFBRSxnQ0FBQSxVQUFVLENBQUE7SUFBRSwrQkFBQSxTQUFTLENBQUE7SUFBRSx1Q0FBQSxpQkFBaUIsQ0FBQTtJQUFpQixvQ0FBQSxjQUFjLENBQUE7SUFBRSx1Q0FBQSxpQkFBaUIsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBHb29nbGUgSW5jLiBBbGwgUmlnaHRzIFJlc2VydmVkLlxuICpcbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IGFuIE1JVC1zdHlsZSBsaWNlbnNlIHRoYXQgY2FuIGJlXG4gKiBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlIGF0IGh0dHBzOi8vYW5ndWxhci5pby9saWNlbnNlXG4gKi9cblxuLy8vIDxyZWZlcmVuY2UgdHlwZXM9XCJub2RlXCIgLz5cblxuZXhwb3J0IHtUeXBlU2NyaXB0UmVmbGVjdGlvbkhvc3QsIGZpbHRlclRvTWVtYmVyc1dpdGhEZWNvcmF0b3IsIGZpbmRNZW1iZXIsIHJlZmxlY3RPYmplY3RMaXRlcmFsLCByZWZsZWN0VHlwZUVudGl0eVRvRGVjbGFyYXRpb259IGZyb20gJy4vc3JjL3JlZmxlY3Rvcic7XG5leHBvcnQge0Fic29sdXRlUmVmZXJlbmNlLCBFbnVtVmFsdWUsIEltcG9ydE1vZGUsIFJlZmVyZW5jZSwgUmVzb2x2ZWRSZWZlcmVuY2UsIFJlc29sdmVkVmFsdWUsIGlzRHluYW1pY1ZhbHVlLCBzdGF0aWNhbGx5UmVzb2x2ZX0gZnJvbSAnLi9zcmMvcmVzb2x2ZXInO1xuIl19
|
setTimeout(function () {
$("#bigSlider").owlCarousel({
autoplay: true,
autoPlaySpeed: 2000,
autoPlayTimeout: 1000,
autoplayHoverPause: false,
responsive: {
// breakpoint from 0 up
0: {
autoWidth: false,
items: 2,
},
// breakpoint from 480 up
480: {
autoWidth: false,
items: 1,
},
300: {
autoWidth: false,
items: 1,
},
// breakpoint from 768 up
767: {
autoWidth: false,
items: 2,
}
}
});
$(".mobileSlider").owlCarousel({
autoWidth: true,
items: 1,
// autoplay: true,
});
$("#reviewSlider").owlCarousel({
autoWidth: true,
items: 2,
autoplay: true,
});
function hideMenufunction(obj) {
$(document).on('click', '.hideMenuClass', function () {
$(".hideMenuClass").removeClass("active hideMenuClass");
$(".hmbrgrMenuData ").hide();
});
}
$(document).on('click', '.hmbrgrMenu', function () {
$(this).addClass("active hideMenuClass");
$(".hmbrgrMenuData ").show();
hideMenufunction(this);
});
}, 1000)
|
/* ******************************************************************
***********************************
*** Natural: A remote desktop for embed systems.
*** By Alejandro Linarez Rangel.
*** Pure desktop event manager.
***********************************
****************************************************************** */
/***************************************************************************
Copyright 2016 Alejandro Linarez Rangel
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.
***************************************************************************/
var PureWindows = [];
var PureApplications = [];
var PureMaxZIndex = 2;
var PureWindowGWID = 10; // PIDs
var PureShowingMenu = false;
var PureMenuIndex = 0;
var PureWindow2Resize = null;
var PureResizeStart = []; // [x, y]
var PureResizeEnd = []; // [w, h]
var PureResizeAlign = []; // [ox, oy]
var PureResizeTimeout = false;
var PureGlobalAnimationDuration = 250;
var PureCanAnimatePanels = false;
var PureHidePanelsOnAction = false;
var PureDesktopNotifies = 0;
var PureDesktopNotifiesIndex = 0;
function PureMakeTextNode(text)
{
return document.createTextNode(text);
}
function PureEmitEvent(target, name, data)
{
var ev = new CustomEvent(name, data);
return target.dispatchEvent(ev);
}
function PureEmitEvents(targets, name, data)
{
var i = 0;
var j = targets.length;
for(i = 0; i < j; i++)
{
PureEmitEvent(targets[i], name, data);
}
}
function PureExecuteTemplate(template, args)
{
var tmp = document.importNode(template.content, true);
var t = $(tmp);
t.data("__pureTemplateConstructorDo", JSON.stringify(args));
var classes = t.find("*[data-template-class-insert]");
classes.each(function(index)
{
var node = $(this);
var a = node.data("templateClassInsert").split(",");
var i = 0;
var j = a.length;
for(i = 0; i < j; i++)
node.addClass(args[a[i]]);
});
var texts = t.find("*[data-template-text-insert]");
texts.each(function(index)
{
var node = $(this);
node.get(0).appendChild(PureMakeTextNode(args[node.data("templateTextInsert")]));
});
return t.children().get(0);
}
function PureHidePanels()
{
if(!$(".puredesktop-top-menubar").hasClass("puredesktop-panel-vhidden"))
{
$(".puredesktop-top-menubar").addClass("puredesktop-panel-vhidden");
}
if(!$(".puredesktop-left-menubar").hasClass("puredesktop-panel-hhidden"))
{
$(".puredesktop-left-menubar").addClass("puredesktop-panel-hhidden");
}
}
function PureShowPanels()
{
if($(".puredesktop-top-menubar").hasClass("puredesktop-panel-vhidden"))
{
$(".puredesktop-top-menubar").removeClass("puredesktop-panel-vhidden");
}
if($(".puredesktop-left-menubar").hasClass("puredesktop-panel-hhidden"))
{
$(".puredesktop-left-menubar").removeClass("puredesktop-panel-hhidden");
}
}
function PureStylePanels()
{
if(!PureCanAnimatePanels)
return;
PureShowPanels();
PureHidePanelsOnAction = false;
/* if($("body").width() > 400)
{
return;
} */
PureHidePanelsOnAction = true;
var allLMenuHiddens = true;
$(".puredesktop-left-menubar-menu").each(function(index)
{
allLMenuHiddens = allLMenuHiddens && $(this).hasClass("hidden");
});
if((PureWindows.length > 0) && (allLMenuHiddens))
{
// Remove transparency from the panels
// $(".puredesktop-top-menubar").removeClass("color-natural-white");
// $(".puredesktop-left-menubar").removeClass("color-natural-white");
PureHidePanels();
}
}
function PureMakeDefaultWindowLayout(name, args)
{
var win = PureExecuteTemplate(
$("#puredesktop-window").get(0),
args
);
var titlebar = $(win).find(".puredesktop-window-titlebar").get(0);
win.style.width = "300px";
win.style.height = "300px";
win.style.zIndex = 1;
PureWindowGWID += 1;
var pid = PureWindowGWID;
win.id = "window_" + name + "_" + pid;
$(win).data("clickX", 0);
$(win).data("clickY", 0);
$(win).data("mousedown", "false");
$(win).data("movable", "false");
$(win).data("focused", "false");
$(win).data("instantRemove", "true"); // Atom.InstantRemove
$(win).data("preventTitlebarMove", "false"); // Atom.PreventTitlebarMove
$(win).data("maximized", "false");
$(win).data("defaultTop", $(".puredesktop-top-menubar").height() + 2); // Atom.Top
$(win).data("defaultLeft", $(".puredesktop-left-menubar").width() + 2); // Atom.Left
$(win).data("defaultWidth", 300); // Atom.Width
$(win).data("defaultHeight", 300); // Atom.Height
$(win).data("title", args.title); // Atom.Title
$(win).data("pid", pid); // Atom.WinPID
$(win).data("animateResize", "false");
// titlebarcolor = bordercolor = Atom.TitlebarColor
var resize = function(win, to, setdef, animate, optfcn1)
{
optfcn1 = ((typeof optfcn1) === "undefined")? ((a, b) => a) : optfcn1;
if(!animate)
{
$(win).css({
width: to[0] + "px",
height: to[1] + "px",
maxWidth: to[0] + "px",
maxHeight: to[1] + "px"
}).find(".puredesktop-window-content")
.css({
width: to[0] + "px",
height: (to[1] - $(win).find(".puredesktop-window-titlebar").height()) + "px",
maxWidth: to[0] + "px",
maxHeight: (to[1] - $(win).find(".puredesktop-window-titlebar").height()) + "px"
})
.end();
}
else
{
$(win).animate(optfcn1({
width: to[0] + "px",
height: to[1] + "px",
maxWidth: to[0] + "px",
maxHeight: to[1] + "px"
}, 1), PureGlobalAnimationDuration, function()
{
$(win).css({
width: to[0] + "px",
height: to[1] + "px",
maxWidth: to[0] + "px",
maxHeight: to[1] + "px"
});
}).find(".puredesktop-window-content")
.animate(optfcn1({
width: to[0] + "px",
height: (to[1] - $(win).find(".puredesktop-window-titlebar").height()) + "px",
maxWidth: to[0] + "px",
maxHeight: (to[1] - $(win).find(".puredesktop-window-titlebar").height()) + "px"
}, 2), PureGlobalAnimationDuration, function()
{
$(win).find(".puredesktop-window-content")
.css({
width: to[0] + "px",
height: (to[1] - $(win).find(".puredesktop-window-titlebar").height()) + "px",
maxWidth: to[0] + "px",
maxHeight: (to[1] - $(win).find(".puredesktop-window-titlebar").height()) + "px"
});
});
}
if(setdef)
{
$(win).data("defaultWidth", to[0])
.data("defaultHeight", to[1]);
}
};
resize(win, [300, 300], true, false);
$(win).css({
"top": $(".puredesktop-top-menubar").height() + 2,
"left": $(".puredesktop-left-menubar").width() + 2
});
win.__pureResizeFcn = resize;
win.addEventListener("exit", function(ev)
{
if($(this).data("instantRemove") == "true")
{
PureEmitEvent(this, "__pure_exit", {});
}
});
win.addEventListener("__pure_exit", function(ev)
{
PureStylePanels();
PureSoundLibPlay("window-close");
PureMaxZIndex -= 1;
PureWindows.forEach(function(value, index, array)
{
if(value.id == win.id)
{
PureWindows.splice(index, 1);
return false;
}
});
$(this).remove();
});
win.addEventListener("opened", function(ev)
{
PureStylePanels();
PureMaxZIndex += 1;
});
var windowHideEvent = function(ev)
{
PureStylePanels();
PureSoundLibPlay("window-minimized");
$(this).addClass("hidden");
};
win.addEventListener("hide", (ev) => windowHideEvent(ev));
win.addEventListener("iconify", (ev) => windowHideEvent(ev));
var windowShowEvent = function(ev)
{
PureStylePanels();
PureSoundLibPlay("window-unminimized");
$(this).removeClass("hidden");
};
win.addEventListener("show", (ev) => windowShowEvent(ev));
win.addEventListener("deiconify", (ev) => windowShowEvent(ev));
win.addEventListener("windowPriorityChanged", function(ev)
{
var iz = parseInt(this.style.zIndex);
if(iz > 1)
{
this.style.zIndex = (iz - 1) + "";
$(this)
.children(".sw-0, .sw-c, .sw-1, .sw-2, .sw-3, .sw-4, .sw-5, .sw-6, .sw-7, .sw-8, .sw-9, .sw-10, .sw-11, .sw-12")
.each(function(index)
{
var oldZ = parseInt(this.style.zIndex);
this.style.zIndex = (oldZ - 1) + "";
});
}
$(this).data("focused", "false");
});
win.addEventListener("focus", function(ev)
{
if($(this).data("focused") == "false")
{
PureEmitEvents(PureWindows, "windowPriorityChanged", {
"from": this
});
this.style.zIndex = PureMaxZIndex;
$(this)
.children(".sw-0, .sw-c, .sw-1, .sw-2, .sw-3, .sw-4, .sw-5, .sw-6, .sw-7, .sw-8, .sw-9, .sw-10, .sw-11, .sw-12")
.each(function(index)
{
var oldZ = parseInt(this.style.zIndex);
this.style.zIndex = (oldZ + 1) + "";
});
$(this).data("focused", "true");
}
});
win.addEventListener("mousedown", function(ev)
{
NaturalLog("Window Mouse Down Event");
if($(this).data("focused") == "false")
{
PureSoundLibPlay("window-inactive-click");
PureEmitEvent(this, "focus", {});
}
if($(this).data("movable") == "true")
{
$(this).data("mousedown", "true");
$(this).data("clickX", (ev.clientX - $(this).offset().left));
$(this).data("clickY", (ev.clientY - $(this).offset().top));
ev.preventDefault();
ev.stopPropagation();
return false;
}
});
win.addEventListener("mouseup", function(ev)
{
NaturalLog("Window Mouse Up Event");
if($(this).data("movable") == "true")
{
$(this).data("mousedown", "false");
this.style.cursor = "auto";
ev.preventDefault();
ev.stopPropagation();
return false;
}
});
win.addEventListener("mousemove", function(ev)
{
NaturalLog("Window Mouse Move Event");
if(($(this).data("mousedown") == "true") && ($(this).data("movable") == "true"))
{
var left = $(this).data("clickX");
var top = $(this).data("clickY");
var topnavtp = $(".puredesktop-top-menubar").height() + 2;
var leftnavtp = $(".puredesktop-left-menubar").width() + 2;
$(this).data("defaultTop", Math.max(ev.clientY - top, topnavtp));
$(this).data("defaultLeft", Math.max(ev.clientX - left, leftnavtp));
this.style.top = Math.max(ev.clientY - top, topnavtp) + "px";
this.style.left = Math.max(ev.clientX - left, leftnavtp) + "px";
this.style.cursor = "move";
ev.preventDefault();
ev.stopPropagation();
return false;
}
});
win.addEventListener("click", function(ev)
{
NaturalLog("Window Mouse Click Event");
if($(this).data("focused") == "false")
{
PureSoundLibPlay("window-inactive-click");
PureEmitEvent(this, "focus", {});
ev.preventDefault();
ev.stopPropagation();
return false;
}
if($(this).data("movable") == "true")
{
ev.preventDefault();
ev.stopPropagation();
return false;
}
});
win.addEventListener("__pure_resize_to", function(ev)
{
PureSoundLibPlay("window-resize-end");
resize(this, PureResizeEnd, true, true);
});
titlebar.addEventListener("mousedown", function()
{
NaturalLog("Title Mouse Down Event");
if($(win).data("preventTitlebarMove") == "true")
return;
PureSoundLibPlay("window-move-start");
$(win).data("movable", "true");
$(win).data("mousedown", "true");
$(win).removeClass("puredesktop-can-select");
});
titlebar.addEventListener("mouseup", function()
{
NaturalLog("Title Mouse Up Event");
if($(win).data("preventTitlebarMove") == "true")
return;
PureSoundLibPlay("window-move-end");
$(win).data("movable", "false");
$(win).data("mousedown", "false");
$(win).addClass("puredesktop-can-select");
win.style.cursor = "auto";
});
$(titlebar).find(".puredesktop-btn-exit").get(0).addEventListener("click", function()
{
PureEmitEvent(win, "exit", {
"edata": "window.buttons.exit:clicked"
});
});
$(titlebar).find(".puredesktop-btn-move").get(0).addEventListener("mousedown", function(ev)
{
if($(win).data("movable") == "false")
{
PureSoundLibPlay("window-move-start");
$(this).addClass("color-light-grey");
$(win).data("movable", "true");
$(win).data("preventTitlebarMove", "true");
$(win).removeClass("puredesktop-can-select");
PureEmitEvent(win, "stackeable", {});
}
else
{
PureSoundLibPlay("window-move-end");
$(this).removeClass("color-light-grey");
$(win).data("movable", "false");
$(win).data("preventTitlebarMove", "false");
$(win).addClass("puredesktop-can-select");
PureEmitEvent(win, "fixeable", {});
}
});
$(titlebar).find(".puredesktop-btn-min").get(0).addEventListener("click", function(ev)
{
PureSoundLibPlay("window-resize-start");
PureWindow2Resize = win;
PureResizeStart = [$(win).position().left, $(win).position().top];
PureResizeAlign = [ev.clientX, ev.clientY];
ev.stopPropagation();
});
$(titlebar).find(".puredesktop-btn-max").get(0).addEventListener("click", function()
{
var isMaximized = $(win).data("maximized");
if(isMaximized == "false")
{
PureSoundLibPlay("window-maximized");
var topnavtp = $(".puredesktop-top-menubar").height() + 2;
var leftnavtp = $(".puredesktop-left-menubar").width() + 2;
// win.style.top = topnavtp + "px";
// win.style.left = leftnavtp + "px";
// $(win).animate({
// "top": topnavtp,
// "left": leftnavtp
// }, PureGlobalAnimationDuration);
resize(
win,
[
($(document.body).width() - leftnavtp),
($(document.body).height() - topnavtp)
],
false,
true,
function(obj, at)
{
if(at == 1)
{
obj["top"] = topnavtp + "px";
obj["left"] = leftnavtp + "px";
}
return obj;
});
$(win).data("maximized", "true");
$(win).data("preventTitlebarMove", "true");
PureEmitEvent(win, "maximized", {});
PureEmitEvent(win, "fixeable", {});
}
else
{
PureSoundLibPlay("window-unmaximized");
var dt = $(win).data("defaultTop");
var dl = $(win).data("defaultLeft");
var dw = $(win).data("defaultWidth");
var dh = $(win).data("defaultHeight");
// win.style.top = dt + "px";
// win.style.left = dl + "px";
// $(win).animate({
// "top": dt,
// "left": dl
// }, PureGlobalAnimationDuration);
// resize(win, [dw, dh], true, true);
resize(
win,
[
dw,
dh
],
false,
true,
function(obj, at)
{
if(at == 1)
{
obj["top"] = dt + "px";
obj["left"] = dl + "px";
}
return obj;
});
$(win).data("maximized", "false");
$(win).data("preventTitlebarMove", "false");
}
});
PureWindows.push(win);
return win;
}
function PureOpenWindow(window, args)
{
args = args || {
"preventFromTopbar": false
};
PureEmitEvent(window, "opened", {});
PureEmitEvent(window, "focus", {});
PureSoundLibPlay("window-new");
$(".puredesktop-main-content").get(0).appendChild(window);
if(!args.preventFromTopbar)
{
NaturalLog("Prevent From Topbar Disabled");
var tp = $(".puredesktop-windows-menu").get(0);
var item = PureExecuteTemplate(
$("#puredesktop-winitem").get(0),
{
"appname": $(window).data("title")
}
);
$(item).find(".puredesktop-label").click(function()
{
PureStylePanels();
if($(window).hasClass("hidden"))
{
$(window).removeClass("hidden");
PureEmitEvent(window, "focus", {});
PureEmitEvent(window, "deiconify", {});
}
else
{
$(window).addClass("hidden");
PureEmitEvents(PureWindows, "windowPriorityChanged", {
"from": window
});
PureEmitEvent(window, "iconify", {});
}
});
$(item).find(".puredesktop-btn-exit").click(function()
{
PureEmitEvent(window, "focus", {});
PureEmitEvent(window, "deiconify", {});
PureEmitEvent(window, "exit", {});
});
window.addEventListener("__pure_exit", function()
{
PureStylePanels();
$(item).remove();
});
tp.appendChild(item);
}
PureWindowSetFocus(window);
}
function PureGetWindowBody(window)
{
return $(window).find(".puredesktop-window-content").get(0);
}
function PureCreateApplication(name, title, handler)
{
return PureApplications.push({
"name": name,
"title": title,
"handler": handler
});
}
function PureOpenApplication(name, args)
{
var i = 0;
var j = PureApplications.length;
for(i = 0; i < j; i++)
{
if(PureApplications[i].name == name)
{
return PureApplications[i].handler(args);
}
}
return null;
}
function PureSetWindowTitle(window, title)
{
var ttl = $(window).find(".puredesktop-title-text").get(0);
while(ttl.firstChild)
ttl.removeChild(ttl.firstChild);
ttl.appendChild(PureMakeTextNode(title));
$(window).data("title", title);
}
function PureGetWindowTitle(window)
{
return $(window).data("title");
}
function PureSetWindowTitlebarColor(window, colorClass)
{
var ttl = $(window).find(".puredesktop-window-titlebar");
var bd = $(window).find(".puredesktop-window-content");
var dt = JSON.parse($(window).data("__pureTemplateConstructorDo"));
ttl.removeClass(dt["color"]).addClass(colorClass);
bd.removeClass(dt["border"]).addClass(colorClass);
dt["color"] = dt["border"] = colorClass;
$(window).data("__pureTemplateConstructorDo", JSON.stringify(dt));
}
function PureGetWindowTitlebarColor(window)
{
return JSON.parse($(window).data("__pureTemplateConstructorDo"))["color"];
}
function PureSetWindowSize(window, width, height, animate)
{
animate = ((typeof animate) === "undefined")? true : animate;
window.__pureResizeFcn(window, [width, height], true, animate);
}
function PureGetWindowSize(window)
{
return {
"width": parseInt($(window).data("defaultWidth")),
"height": parseInt($(window).data("defaultHeight"))
};
}
function PureSetWindowPosition(window, xpos, ypos, animate)
{
animate = ((typeof animate) === "undefined")? true : animate;
if(animate)
{
$(window).animate({
"top": $(".puredesktop-top-menubar").height() + 2 + ypos,
"left": $(".puredesktop-left-menubar").width() + 2 + xpos
}, PureGlobalAnimationDuration)
.data("defaultTop", $(".puredesktop-top-menubar").height() + 2 + ypos)
.data("defaultLeft", $(".puredesktop-left-menubar").width() + 2 + xpos);
}
else
{
$(window).css({
"top": $(".puredesktop-top-menubar").height() + 2 + ypos,
"left": $(".puredesktop-left-menubar").width() + 2 + xpos
})
.data("defaultTop", $(".puredesktop-top-menubar").height() + 2 + ypos)
.data("defaultLeft", $(".puredesktop-left-menubar").width() + 2 + xpos);
}
}
function PureGetWindowPosition(window)
{
return {
"top": parseInt($(window).data("defaultTop")),
"left": parseInt($(window).data("defaultLeft"))
};
}
function PureDestroyWindow(window, force)
{
force = ((typeof force) === "undefined")? true : force;
if(force)
{
$(window).data("instantRemove", "true");
}
PureEmitEvent(window, "exit", {});
}
function PureDestroyAllWindow(window)
{
PureEmitEvent(window, "__pure_exit", {});
}
function PureWindowSetFocus(window)
{
PureSoundLibPlay("window-attention-inactive");
PureEmitEvent(window, "focus", {});
}
function PureGetWindowAreaGeometry()
{
var topmenu = $(".puredesktop-top-menubar").position();
var leftmenu = $(".puredesktop-left-menubar").position();
var topmenuwd = $(".puredesktop-top-menubar").width();
var topmenuhg = $(".puredesktop-top-menubar").height();
var leftmenuwd = $(".puredesktop-left-menubar").width();
var leftmenuhg = $(".puredesktop-left-menubar").height();
var main = $(".puredesktop-main-content").position();
var mainwd = $(".puredesktop-main-content").width();
var mainhg = $(".puredesktop-main-content").height();
var geometry = {
"top": topmenu.top + topmenuhg + 2,
"left": leftmenu.left + leftmenuwd + 2,
"bottom": topmenu.top + topmenuhg + 2 + mainhg,
"right": leftmenu.left + leftmenuwd + 2 + mainwd,
"width": mainwd,
"height": mainhg
};
return geometry;
}
function PureGenerateID(window, id)
{
return window.id + "__" + id;
}
function PureGetPID()
{
PureWindowGWID += 1;
return PureWindowGWID;
}
function PureDesktopNotify(title, message, p)
{
var osd = document.createElement("div");
osd.className =
"user-cant-select puredesktop-notify-box box color-everblack padding-16 margin-16 overflow-auto sw-4";
osd.style.color = "#EE0";
osd.style.position = "absolute";
osd.style.right = "16px";
osd.style.bottom = "-30%";
osd.style.width = "20%";
osd.style.maxHeight = "20%";
osd.style.cursor = "pointer";
var titlebe = document.createElement("div");
titlebe.className = "box text-big no-margin padding-4";
titlebe.appendChild(document.createTextNode(title));
var msg = document.createElement("div");
msg.className =
"box no-margin padding-4 no-border";
msg.appendChild(document.createTextNode(message));
osd.appendChild(titlebe);
osd.appendChild(msg);
$(".puredesktop-main-content").get(0).appendChild(osd);
$(osd).show().animate({
"bottom": PureDesktopNotifies + "px"
}, PureGlobalAnimationDuration);
PureDesktopNotifies += $(osd).height() + 48;
PureDesktopNotifiesIndex += 1;
$(osd).data("puredesktopNotifyIndex", PureDesktopNotifiesIndex);
osd.addEventListener("click", function()
{
PureDesktopNotifiesIndex -= 1;
PureDesktopNotifies -= $(osd).height() + 48;
$(osd).animate({
"right": "-100%"
}, PureGlobalAnimationDuration);
$(".puredesktop-notify-box").each(function(index)
{
if(parseInt($(this).data("puredesktopNotifyIndex")) > parseInt($(osd).data("puredesktopNotifyIndex")))
{
var bt = $(osd).height() + 48;
$(this).animate({
"bottom": "-=" + bt + "px"
}, PureGlobalAnimationDuration);
}
});
});
}
function PureSetWindowAtom(window, name, value)
{
switch(name)
{
case "Atom.InstantRemove":
$(window).data("instantRemove", value.toString());
break;
case "Atom.Top":
return PureSetWindowPosition(window, parseInt(value), PureGetWindowPosition(window).top, true);
break;
case "Atom.Left":
return PureSetWindowPosition(window, PureGetWindowPosition(window).left, parseInt(value), true);
break;
case "Atom.Position":
return PureSetWindowPosition(window, parseInt(value.split(",")[0]), parseInt(value.split(",")[1]), true);
break;
case "Atom.Width":
return PureSetWindowSize(window, parseInt(value), PureGetWindowSize(window).height, true);
break;
case "Atom.Height":
return PureSetWindowSize(window, PureGetWindowSize(window).width, parseInt(value), true);
break;
case "Atom.Size":
case "Atom.Geometry":
return PureSetWindowSize(window, parseInt(value.split(",")[0]), parseInt(value.split(",")[1]), true);
break;
case "Atom.PreventTitlebarMove":
$(window).data("preventTitlebarMove", value.toString());
break;
case "Atom.TitlebarColor":
return PureSetWindowTitlebarColor(window, value.toString());
break;
case "Atom.Title":
return PureSetWindowTitle(window, value.toString());
break;
case "Atom.WinPID":
case "Atom.PID":
NaturalLogErr("PureDE error: Invalid attempt to set the window PID using PureSetWindowAtom");
return null;
break;
default:
$(window).data(name, value);
}
}
function PureGetWindowAtom(window, name)
{
var res = "";
switch(name)
{
case "Atom.InstantRemove":
res = "instantRemove";
break;
case "Atom.Top":
res = "defaultTop";
break;
case "Atom.Left":
res = "defaultLeft";
break;
case "Atom.Width":
res = "defaultWidth";
break;
case "Atom.Height":
res = "defaultHeight";
break;
case "Atom.PreventTitlebarMove":
res = "preventTitlebarMove";
break;
case "Atom.Title":
res = "title";
break;
case "Atom.WinPID":
case "Atom.PID":
res = "pid";
break;
case "Atom.Position":
return PureGetWindowPosition(window).left + "," + PureGetWindowPosition(window).top;
break;
case "Atom.Size":
case "Atom.Geometry":
return PureGetWindowSize(window).width + "," + PureGetWindowSize(window).height;
break;
case "Atom.TitlebarColor":
return PureGetWindowTitlebarColor(window);
break;
default:
res = name;
}
if($(window).data(res) === undefined)
{
return null;
}
return $(window).data(res);
}
// Animations
function PureSlideHMenu__Show(menu, callback, lm, lw, ox)
{
menu.removeClass("hidden")
.css({
"left": (lm.left + lw - ox + 2) + "px",
"opacity": "0"
})
.animate({
"left": (lm.left + lw + 2) + "px",
"opacity": "1"
}, 100, "linear")
.end();
callback(true);
}
function PureSlideHMenu__Hide(menu, callback, lm, lw, ox)
{
menu.css({
"left": (lm.left + lw + 2) + "px",
"opacity": "1"
})
.animate({
"left": (lm.left + lw + ox + 2) + "px",
"opacity": "0"
}, 100, "linear", () =>
{
menu.addClass("hidden");
callback(false);
})
.end();
}
function PureSlideHMenuRightShow(menu, callback)
{
var lm = $(".puredesktop-left-menubar").position();
var lw = $(".puredesktop-left-menubar").width();
var ox = $(menu).width() / 4;
PureSlideHMenu__Show(menu, callback, lm, lw, ox);
}
function PureSlideHMenuRightHide(menu, callback)
{
var lm = $(".puredesktop-left-menubar").position();
var lw = $(".puredesktop-left-menubar").width();
var ox = $(menu).width() / 4;
PureSlideHMenu__Hide(menu, callback, lm, lw, ox);
}
function PureSlideHMenuRight(menu, callback)
{
if(menu.hasClass("hidden"))
{
PureSlideHMenuRightShow(menu, callback);
}
else
{
PureSlideHMenuRightHide(menu, callback);
}
}
// NGraph Minimal API / Natural Universal Graphical API (NGraph)
function NGraphRequestPID(name, title)
{
return PureGetPID();
}
function NGraphCreateWindow(name, title)
{
var win = PureMakeDefaultWindowLayout(
name,
{
"color": "color-light-grey",
"title": title,
"bkgcolor": "color-natural-white",
"border": "bs-1",
"bdcolor": "border-color-dark-grey"
}
);
PureOpenWindow(win);
return win;
}
function NGraphGetWindowBody(window)
{
return PureGetWindowBody(window);
}
function NGraphDestroyWindow(window)
{
$(window).data("instantRemove", "true");
PureEmitEvent(window, "exit", {});
return null;
}
function NGraphWindowAddEventListener(window, eventname, handler)
{
return window.addEventListener(eventname, handler);
}
function NGraphCreateApplication(name, title, handler)
{
return PureCreateApplication(name, title, handler);
}
function NGraphOpenApplication(name, args)
{
return PureOpenApplication(name, args);
}
function NGraphStoreDataInWindow(window, key, value)
{
$(window).data(key, value);
return window;
}
function NGraphLoadDataFromWindow(window, key)
{
return $(window).data(key);
}
function NGraphWindowSetAtom(window, name, value)
{
return PureSetWindowAtom(window, name, value);
}
function NGraphWindowGetAtom(window, name)
{
return PureGetWindowAtom(window, name);
}
function NGraphWindowSetFocus(window)
{
return PureWindowSetFocus(window);
}
function NGraphDesktopNotify(title, message, priority)
{
return PureDesktopNotify(title, message, priority);
}
// End
|
import React from "react";
import PropTypes from "prop-types";
import styles, { _reviewTextStyle } from "./StarReview.style";
import { View, Text } from "react-native";
import NumberFormat from "react-number-format";
import Icon from "react-native-dynamic-vector-icons";
const StarReview = props => {
container = [];
const {
stars,
ratings,
reviews,
starSize,
starColor,
textColor,
reviewsText,
enableStars,
iconComponent,
reviewTextStyle,
enableParentheses
} = props;
function renderStars() {
for (let index = 1; index <= stars; index++) {
let starType = "star";
if (index > ratings) {
starType = "staro";
}
container.push(
iconComponent || (
<Icon
key={index}
name={starType}
size={starSize}
type="AntDesign"
color={starColor}
/>
)
);
}
return container;
}
function renderReview() {
return (
<NumberFormat
value={reviews}
defaultValue={1}
displayType={"text"}
thousandSeparator={true}
renderText={value => (
<Text style={reviewTextStyle || _reviewTextStyle(textColor)}>
{enableStars && parseFloat(ratings).toFixed(1)}{" "}
{enableParentheses ? `(${value})` : value}
</Text>
)}
/>
);
}
function renderReviewContainer() {
const { disableReview } = props;
if (disableReview) return null;
return (
<Text style={styles.textContainer}>
{renderReview()} <Text style={{ color: textColor }}>{reviewsText}</Text>
</Text>
);
}
return (
<View style={styles.container}>
<View style={styles.containerGlue}>
{renderStars()}
{renderReviewContainer()}
</View>
</View>
);
};
StarReview.propTypes = {
stars: PropTypes.number,
ratings: PropTypes.number,
reviews: PropTypes.number,
starSize: PropTypes.number,
textColor: PropTypes.string,
starColor: PropTypes.string,
enableStars: PropTypes.bool,
reviewsText: PropTypes.string,
disableReview: PropTypes.bool,
enableParentheses: PropTypes.bool
};
StarReview.defaultProps = {
stars: 5,
ratings: 0,
reviews: 0,
starSize: 16,
enableStars: false,
disableReview: false,
textColor: "#757575",
starColor: "#ffa114",
reviewsText: "reviews",
enableParentheses: true
};
export default StarReview;
|
import React from "react"
import PropTypes from "prop-types"
import { Select } from "antd"
const Option = Select.Option
const Cascader = props => {
return (
<div>
<label>{props.label}</label>
<Select
showArrow
allowClear
style={props.style}
placeholder={props.placeholder}
optionFilterProp="children"
onChange={props.handleChange}
onFocus={props.handleFocus}
onBlur={props.handleBlur}
filterOption={props.filterOptions}
defaultValue={props.defaultValue}
>
{props.optionArray ? (
props.optionArray.map((data, index) => {
return <Option value={data.value}>{data.name}</Option>
})
) : (
<Option value="noData" disabled>
No Data Found
</Option>
)}
</Select>
</div>
)
}
Cascader.defaultProps = {
optionArrray: [],
placeholder: "Select One",
style: { width: "100%" }
}
export default Cascader
|
const pi = Math.PI;
module.exports = {
diameter(radius) {
return 2 * radius;
},
circumference(radius) {
return pi * 2 * radius;
},
area(radius) {
return pi * radius * radius;
}
};
console.log(module);
|
const middlewareObj = {};
const TASK = require('../models/task');
const USER = require('../models/user');
const DB = require('../models');
middlewareObj.checkTaskOwner = (req, res, next) => {
DB.TASK.findById(req.params.taskID)
.then((task) => {
if(req.isAuthenticated() && task.author.id.equals(req.user._id)) {
res.json(task);
next();
}
})
.catch((err) => {
res.send(err);
})
}
middlewareObj.isLoggedIn = (req, res, next) => {
if(req.isAuthenticated()) {
return next();
}
res.redirect('/');
};
module.exports = middlewareObj;
|
/*==== result-chart =====*/
var ctx = document.getElementById('line-chart');
Chart.defaults.global.defaultFontFamily = 'Cabin';
Chart.defaults.global.defaultFontSize = 14;
Chart.defaults.global.defaultFontStyle = '500';
Chart.defaults.global.defaultFontColor = '#808996';
var chart = new Chart(ctx, {
// The type of chart we want to create
type: 'line',
// The data for our dataset
data: {
labels: ["May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
datasets: [{
label: "Result",
data: [0, 20, 5, 40, 15, 40, 20, 50],
backgroundColor: 'transparent',
borderColor: '#287dfa',
pointBorderColor: '#ffffff',
pointBackgroundColor: '#287dfa',
pointBorderWidth: 2,
pointRadius: 4
}, {
label: "Result 2",
data: [10, 40, 25, 15, 45, 25, 50, 30],
backgroundColor: 'transparent',
borderColor: '#28d5a7',
pointBorderColor: '#ffffff',
pointBackgroundColor: '#28d5a7',
pointBorderWidth: 2,
pointRadius: 4
}]
},
// Configuration options go here
options: {
tooltips: {
// xPadding: 12,
// yPadding: 12,
backgroundColor: '#1c2540'
},
legend: {
display: false
},
scales: {
xAxes: [{
display: true,
gridLines: {
offsetGridLines: false,
display: false
}
}],
yAxes: [{
display: true,
gridLines: {
color: '#eee',
},
ticks: {
fontSize: 14,
}
}]
}
}
});
|
import React, { Component } from 'react';
import { Redirect } from 'react-router-dom'
class ClickableComponent extends React.Component {
constructor(props) {
super(props);
this.state = {};
this.handleOnClick = this.handleOnClick.bind(this); // tells JavaScript to make the "this" variable within handleClick() to be ClickableComponent's "this" variable
}
componentDidMount() {
this.setState({});
}
componentWillUnmount() {
this.setState({});
}
handleOnClick = () => {
this.setState({redirect: true});
}
render() {
if (this.state.redirect) {
return <Redirect push to="/view-component" />;
}
return (
<div className="ClickableComponent" onClick={this.handleOnClick}>
Click to go to ViewComponent (the component set to route /view-component)
</div>
);
}
}
export default ClickableComponent;
|
/**
* @type App.ExWindow
*/
const exWindow = window;
const canShowSaveDialog = () => exWindow.showSaveDialog !== undefined;
const canShowOpenDialog = () => exWindow.showOpenDialog !== undefined;
/**
* Displays a modal Open Dialog box.
*
* This function is not available in server mode.
*
* @see https://www.electronjs.org/docs/api/dialog#dialogshowsavedialogbrowserwindow-options
* @param {Electron.OpenDialogOptions} options the dialog option
* @returns Promise<Electron.OpenDialogReturnValue|Error>
*/
const showOpenDialog = (options) => {
if (canShowOpenDialog()) {
return exWindow.showOpenDialog(options);
}
return Promise.reject(new Error('dialog not suppprted in browser'));
};
/**
* Displays a modal Save Dialog box.
*
* This function is not available in server mode.
*
* @see https://www.electronjs.org/docs/api/dialog#dialogshowsavedialogbrowserwindow-options
* @param {Electron.OpenDialogOptions} options the dialog option
* @returns Promise<Electron.OpenDialogReturnValue|Error>
*/
const showSaveDialog = (options) => {
if (canShowSaveDialog()) {
return exWindow.showSaveDialog(options);
}
return Promise.reject(new Error('dialog not suppprted in browser'));
};
export default {
canShowSaveDialog,
showSaveDialog,
canShowOpenDialog,
showOpenDialog
};
|
const Versions = require("../api/APIVersions.json");
const fs = require("fs");
const deprecatedVersions = Versions.deprecatedVersions || [];
const ValidateAPIVersion = (req, res, next) => {
try {
const checkVersion = fs.readdirSync(`./src/api/versions/v${req.params.version}`) || null;
if (checkVersion === null || isNaN(req.params.version)) {
res.status(404);
const error = new Error(`Invalid API Version!`);
next(error);
} else if (deprecatedVersions.find((foundVersion) => {return foundVersion === parseInt(req.params.version);})) {
res.status(404);
const error = new Error(`Deprecated API Version!`);
next(error);
} else {
next();
}
} catch {
if (deprecatedVersions.includes(parseInt(req.params.version))) {
res.status(404);
const error = new Error(`Deprecated API Version!`);
next(error);
return;
}
res.status(404);
const error = new Error(`Invalid API Version!`);
next(error);
}
}
module.exports = ValidateAPIVersion;
|
module.exports = function toReadable(number) {
//function toReadable(number) {
const ranks = ['zero', 'thousand', 'million', 'billion', 'trillion', 'quadrillion', 'quintillion', 'sextillion', 'septillion']; // Available digits
var result = [];
numberWithSpaces(number).reverse().forEach((element, index) => {
switch (index) { //Adding human digits to human numbers
case 0:
result.push(gotNumber(element));
break;
case 1:
result.push(gotNumber(element) + ' ' + ranks[1] + ' ');
break;
case 2:
result.push(gotNumber(element) + ' ' + ranks[2] + ' ');
break;
case 3:
result.push(gotNumber(element) + ' ' + ranks[3] + ' ');
break;
case 4:
result.push(gotNumber(element) + ' ' + ranks[4] + ' ');
break;
case 5:
result.push(gotNumber(element) + ' ' + ranks[5] + ' '); //Maximum with current input
break;
case 6:
result.push(gotNumber(element) + ' ' + ranks[6] + ' ');
break;
case 7:
result.push(gotNumber(element) + ' ' + ranks[7] + ' ');
break;
case 8:
result.push(gotNumber(element) + ' ' + ranks[8] + ' ');
break;
}
});
return result.reverse().join('').replace(/ zero/, '');
}
//Divide the number into digits in the array
function numberWithSpaces(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ").split(' ').map(i => Number(i)); //Faster method 358ms
}
// Convert a digital number to a human form
function gotNumber(x) {
const units = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen'];
const dozens = ['zero', 'ten', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety'];
if (x == 0) {
return 'zero';
} else if ((x / 100) >= 1) {
return units[Math.trunc(x / 100)] + ' hundred ' + ((x % 100 < 20) ? units[x % 100] : dozens[Math.trunc(x / 10) % 10] + ' ' + units[x % 10]);
} else return ((x % 100 < 20) ? units[x % 100] : dozens[Math.trunc(x / 10)] + ' ' + units[x % 10]);
}
//console.log(toReadable(11111111111264756));
|
const chai = require("chai");
const expect = chai.expect;
const chaiAsPromised = require("chai-as-promised");
chai.use(chaiAsPromised);
const Client = require("../../src/us_extract/Client");
const Lookup = require("../../src/us_extract/Lookup");
const Result = require("../../src/us_extract/Result");
const MockSender = require("../fixtures/mock_senders").MockSender;
const MockSenderWithResponse = require("../fixtures/mock_senders").MockSenderWithResponse;
const errors = require("../../src/Errors");
describe("A US Extract Client", function () {
it("throws an error if sending without a lookup.", function () {
let mockSender = new MockSender();
let client = new Client(mockSender);
expect(client.send).to.throw(errors.UndefinedLookupError);
});
it("correctly builds a payload for a text only lookup.", function () {
let mockSender = new MockSender();
let client = new Client(mockSender);
let mockText = "yump.";
let lookup = new Lookup(mockText);
let expectedPayload = mockText;
client.send(lookup);
expect(mockSender.request.payload).to.deep.equal(expectedPayload);
});
it("correctly builds a payload for a fully-populated lookup.", function () {
let mockSender = new MockSender();
let client = new Client(mockSender);
const mockText = "The flocculated scunge is subprime for human consumption.";
let lookup = new Lookup(mockText);
let expectedPayload = mockText;
client.send(lookup);
expect(mockSender.request.payload).to.deep.equal(expectedPayload);
});
it("correctly builds parameters for a lookup.", () => {
let mockSender = new MockSender();
let client = new Client(mockSender);
const mockText = "Picard is coming back. All power to the engines.";
let lookup = new Lookup(mockText);
lookup.html = 1;
lookup.aggressive = 2;
lookup.addressesHaveLineBreaks = 3;
lookup.addressesPerLine = 4;
let expectedParams = {
html: 1,
aggressive: 2,
addr_line_breaks: 3,
addr_per_line: 4,
};
client.send(lookup);
expect(mockSender.request.parameters).to.deep.equal(expectedParams);
});
it("rejects with an exception if the response comes back with an error.", function () {
let expectedError = new Error("I'm the error.");
let mockSender = new MockSenderWithResponse("", expectedError);
let client = new Client(mockSender);
let lookup = new Lookup("Shine on you crazy diamond.");
return expect(client.send(lookup)).to.eventually.be.rejectedWith(expectedError);
});
it("attaches result from a response to a lookup.", function () {
const responseData = {
"meta": {
"lines": 6,
"unicode": false,
"address_count": 1,
"verified_count": 1,
"bytes": 53,
"character_count": 53
},
"addresses": [
{
"text": "5732 Lincoln Drive Minneapolis MN",
"verified": true,
"line": 4,
"start": 16,
"end": 49,
"api_output": [
{
"candidate_index": 0,
"delivery_line_1": "5732 Lincoln Dr",
"last_line": "Minneapolis MN 55436-1608",
"delivery_point_barcode": "554361608327",
"components": {
"primary_number": "5732",
"street_name": "Lincoln",
"street_suffix": "Dr",
"city_name": "Minneapolis",
"state_abbreviation": "MN",
"zipcode": "55436",
"plus4_code": "1608",
"delivery_point": "32",
"delivery_point_check_digit": "7"
},
"metadata": {
"record_type": "S",
"zip_type": "Standard",
"county_fips": "27053",
"county_name": "Hennepin",
"carrier_route": "C009",
"congressional_district": "03",
"rdi": "Commercial",
"elot_sequence": "0035",
"elot_sort": "A",
"latitude": 44.90127,
"longitude": -93.40045,
"precision": "Zip9",
"time_zone": "Central",
"utc_offset": -6,
"dst": true
},
"analysis": {
"dpv_match_code": "Y",
"dpv_footnotes": "AABB",
"dpv_cmra": "N",
"dpv_vacant": "N",
"dpv_no_stat": "N",
"active": "Y",
"footnotes": "N#"
}
}
]
}
]
};
let mockSender = new MockSenderWithResponse(responseData);
let client = new Client(mockSender);
let lookup = new Lookup("Sometimes when you're testing this field doesn't matter too much.");
let expectedResult = new Result(responseData);
return client.send(lookup).then(response => {
expect(lookup.result).to.deep.equal(expectedResult);
});
})
});
|
const RobinhoodAPI = require('robinhood-api');
export default class {
constructor() {
this.api = new RobinhoodAPI();
this.context = this;
}
async connect(username, password, mfaCode) {
try {
if (typeof this.api.token === 'undefined' || this.api.token == null) {
if (mfaCode === '') {
await this.api.login({ username, password });
} else {
await this.api.mfaCode({ username, password, mfa_code: mfaCode });
}
}
return true;
} catch (e) {
throw e;
}
}
async getPortfolio(accountId) {
try {
return await this.api.getPortfolio(accountId);
} catch (e) {
throw e;
}
}
async getHistoricals(opts) {
try {
return await this.api.getHistoricals(opts);
} catch (e) {
throw e;
}
}
async getTickerHistoricals(opts) {
try {
return await this.api.getTickerHistoricals(opts);
} catch (e) {
throw e;
}
}
async getInstruments(opts) {
try {
return await this.api.getInstruments({ query: opts });
} catch (e) {
throw e;
}
}
async getPositions(resource) {
try {
let positionData = null;
const self = this;
if (typeof resource === 'undefined' || resource === null) {
positionData = await self.api.getPositions({ nonzero: true });
} else {
positionData = await self.api.getResource(resource);
}
positionData.quotes = [];
positionData.instruments = [];
const promises = [];
if (positionData.results.length > 0) {
for (const result of positionData.results) {
promises.push((async () => {
const instrument = await self.api.getResource(result.instrument);
positionData.instruments.push(instrument);
if ('quote' in instrument) {
positionData.quotes.push(await self.api.getResource(instrument.quote));
}
})());
}
}
await Promise.all(promises);
return positionData;
} catch (e) {
throw e;
}
}
async getRecentOrders(resource) {
try {
let orderData = null;
const self = this;
if (typeof resource === 'undefined' || resource === null) {
orderData = await self.api.getRecentOrders();
} else {
orderData = await self.api.getResource(resource);
}
const promises = [];
orderData.instruments = [];
if (orderData.results.length > 0) {
for (const result of orderData.results) {
promises.push((async () => {
orderData.instruments.push(await self.api.getResource(result.instrument));
})());
}
}
await Promise.all(promises);
return orderData;
} catch (e) {
throw e;
}
}
async getQuote(symbol) {
try {
const quote = await this.api.getQuote({ symbol });
quote.instruments = [];
if ('instrument' in quote) {
quote.instruments.push(await this.api.getResource(quote.instrument));
}
return quote;
} catch (e) {
throw e;
}
}
async getUser() {
try {
return await this.api.getUserData();
} catch (e) {
throw e;
}
}
async placeOrder(order) {
try {
return await this.api.placeOrder(order);
} catch (e) {
throw e;
}
}
async getQuotes(symbols) {
try {
return await this.api.getQuotes({ symbols });
} catch (e) {
throw e;
}
}
async getACHRelationships() {
try {
return await this.api.getACHRelationships();
} catch (e) {
throw e;
}
}
async getACHTransfers() {
try {
return await this.api.getACHTransfer();
} catch (e) {
throw e;
}
}
async getAutomaticACHTransfers() {
try {
return await this.api.getAutomaticACHTransfer();
} catch (e) {
throw e;
}
}
async ACHTransfer(transfer) {
try {
return await this.api.ACHTransfer(transfer);
} catch (e) {
throw e;
}
}
async automaticACHTransfer(transfer) {
try {
return await this.api.automaticACHTransfer(transfer);
} catch (e) {
throw e;
}
}
async getAccounts() {
try {
return await this.api.getAccounts();
} catch (e) {
throw e;
}
}
async postResource(resource) {
try {
return await this.api.postResource(resource);
} catch (e) {
throw e;
}
}
async getResource(resource) {
try {
return await this.api.getResource(resource);
} catch (e) {
throw e;
}
}
async getMarkets() {
try {
const markets = await this.api.getMarkets();
const promises = [];
for (const market of markets.results) {
if ('todays_hours' in market) {
promises.push((async () => {
market.todays_hours = await this.api.getResource(market.todays_hours);
})());
}
}
await Promise.all(promises);
return markets;
} catch (e) {
throw e;
}
}
async getWatchlists() {
try {
return await this.api.getWatchlists();
} catch (e) {
throw e;
}
}
async getWatchlist(url) {
try {
const watchlist = await this.api.getResource(url);
const promises = [];
const instruments = [];
const quotes = [];
for (const item of watchlist.results) {
promises.push((async () => {
const instrument = await this.api.getResource(item.instrument);
instruments.push(instrument);
quotes.push(await this.api.getResource(instrument.quote));
})());
}
await Promise.all(promises);
watchlist.instruments = instruments;
watchlist.quotes = quotes;
return watchlist;
} catch (e) {
throw e;
}
}
async reorderWatchlist(list) {
try {
return await this.api.reorderWatchlist(list);
} catch (e) {
throw e;
}
}
async getCards() {
try {
return await this.api.getCards();
} catch (e) {
throw e;
}
}
async dismissCard(card) {
try {
return await this.api.dismissCard({ id: card });
} catch (e) {
throw e;
}
}
}
|
// Copyright 2018 Google LLC
//
// 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
//
// https://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.
'use strict';
const gapicConfig = require('./intents_client_config');
const gax = require('google-gax');
const merge = require('lodash.merge');
const path = require('path');
const protobuf = require('protobufjs');
const VERSION = require('../../package.json').version;
/**
* An intent represents a mapping between input from a user and an action to
* be taken by your application. When you pass user input to the
* DetectIntent (or
* StreamingDetectIntent) method, the
* Dialogflow API analyzes the input and searches
* for a matching intent. If no match is found, the Dialogflow API returns a
* fallback intent (`is_fallback` = true).
*
* You can provide additional information for the Dialogflow API to use to
* match user input to an intent by adding the following to your intent.
*
* * **Contexts** - provide additional context for intent analysis. For
* example, if an intent is related to an object in your application that
* plays music, you can provide a context to determine when to match the
* intent if the user input is “turn it off”. You can include a context
* that matches the intent when there is previous user input of
* "play music", and not when there is previous user input of
* "turn on the light".
*
* * **Events** - allow for matching an intent by using an event name
* instead of user input. Your application can provide an event name and
* related parameters to the Dialogflow API to match an intent. For
* example, when your application starts, you can send a welcome event
* with a user name parameter to the Dialogflow API to match an intent with
* a personalized welcome message for the user.
*
* * **Training phrases** - provide examples of user input to train the
* Dialogflow API agent to better match intents.
*
* For more information about intents, see the
* [Dialogflow documentation](https://dialogflow.com/docs/intents).
*
* @class
* @memberof v2
*/
class IntentsClient {
/**
* Construct an instance of IntentsClient.
*
* @param {object} [options] - The configuration object. See the subsequent
* parameters for more details.
* @param {object} [options.credentials] - Credentials object.
* @param {string} [options.credentials.client_email]
* @param {string} [options.credentials.private_key]
* @param {string} [options.email] - Account email address. Required when
* using a .pem or .p12 keyFilename.
* @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
* .p12 key downloaded from the Google Developers Console. If you provide
* a path to a JSON file, the projectId option below is not necessary.
* NOTE: .pem and .p12 require you to specify options.email as well.
* @param {number} [options.port] - The port on which to connect to
* the remote host.
* @param {string} [options.projectId] - The project ID from the Google
* Developer's Console, e.g. 'grape-spaceship-123'. We will also check
* the environment variable GCLOUD_PROJECT for your project ID. If your
* app is running in an environment which supports
* {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
* your project ID will be detected automatically.
* @param {function} [options.promise] - Custom promise module to use instead
* of native Promises.
* @param {string} [options.servicePath] - The domain name of the
* API remote host.
*/
constructor(opts) {
this._descriptors = {};
// Ensure that options include the service address and port.
opts = Object.assign(
{
clientConfig: {},
port: this.constructor.port,
servicePath: this.constructor.servicePath,
},
opts
);
// Create a `gaxGrpc` object, with any grpc-specific options
// sent to the client.
opts.scopes = this.constructor.scopes;
var gaxGrpc = new gax.GrpcClient(opts);
// Save the auth object to the client, for use by other methods.
this.auth = gaxGrpc.auth;
// Determine the client header string.
var clientHeader = [
`gl-node/${process.version}`,
`grpc/${gaxGrpc.grpcVersion}`,
`gax/${gax.version}`,
`gapic/${VERSION}`,
];
if (opts.libName && opts.libVersion) {
clientHeader.push(`${opts.libName}/${opts.libVersion}`);
}
// Load the applicable protos.
var protos = merge(
{},
gaxGrpc.loadProto(
path.join(__dirname, '..', '..', 'protos'),
'google/cloud/dialogflow/v2/intent.proto'
)
);
// This API contains "path templates"; forward-slash-separated
// identifiers to uniquely identify resources within the API.
// Create useful helper objects for these.
this._pathTemplates = {
projectAgentPathTemplate: new gax.PathTemplate(
'projects/{project}/agent'
),
intentPathTemplate: new gax.PathTemplate(
'projects/{project}/agent/intents/{intent}'
),
agentPathTemplate: new gax.PathTemplate(
'projects/{project}/agents/{agent}'
),
};
// Some of the methods on this service return "paged" results,
// (e.g. 50 results at a time, with tokens to get subsequent
// pages). Denote the keys used for pagination and results.
this._descriptors.page = {
listIntents: new gax.PageDescriptor(
'pageToken',
'nextPageToken',
'intents'
),
};
var protoFilesRoot = new gax.GoogleProtoFilesRoot();
protoFilesRoot = protobuf.loadSync(
path.join(
__dirname,
'..',
'..',
'protos',
'google/cloud/dialogflow/v2/intent.proto'
),
protoFilesRoot
);
// This API contains "long-running operations", which return a
// an Operation object that allows for tracking of the operation,
// rather than holding a request open.
this.operationsClient = new gax.lro({
auth: gaxGrpc.auth,
grpc: gaxGrpc.grpc,
}).operationsClient(opts);
var batchUpdateIntentsResponse = protoFilesRoot.lookup(
'google.cloud.dialogflow.v2.BatchUpdateIntentsResponse'
);
var batchUpdateIntentsMetadata = protoFilesRoot.lookup(
'google.protobuf.Struct'
);
var batchDeleteIntentsResponse = protoFilesRoot.lookup(
'google.protobuf.Empty'
);
var batchDeleteIntentsMetadata = protoFilesRoot.lookup(
'google.protobuf.Struct'
);
this._descriptors.longrunning = {
batchUpdateIntents: new gax.LongrunningDescriptor(
this.operationsClient,
batchUpdateIntentsResponse.decode.bind(batchUpdateIntentsResponse),
batchUpdateIntentsMetadata.decode.bind(batchUpdateIntentsMetadata)
),
batchDeleteIntents: new gax.LongrunningDescriptor(
this.operationsClient,
batchDeleteIntentsResponse.decode.bind(batchDeleteIntentsResponse),
batchDeleteIntentsMetadata.decode.bind(batchDeleteIntentsMetadata)
),
};
// Put together the default options sent with requests.
var defaults = gaxGrpc.constructSettings(
'google.cloud.dialogflow.v2.Intents',
gapicConfig,
opts.clientConfig,
{'x-goog-api-client': clientHeader.join(' ')}
);
// Set up a dictionary of "inner API calls"; the core implementation
// of calling the API is handled in `google-gax`, with this code
// merely providing the destination and request information.
this._innerApiCalls = {};
// Put together the "service stub" for
// google.cloud.dialogflow.v2.Intents.
var intentsStub = gaxGrpc.createStub(
protos.google.cloud.dialogflow.v2.Intents,
opts
);
// Iterate over each of the methods that the service provides
// and create an API call method for each.
var intentsStubMethods = [
'listIntents',
'getIntent',
'createIntent',
'updateIntent',
'deleteIntent',
'batchUpdateIntents',
'batchDeleteIntents',
];
for (let methodName of intentsStubMethods) {
this._innerApiCalls[methodName] = gax.createApiCall(
intentsStub.then(
stub =>
function() {
var args = Array.prototype.slice.call(arguments, 0);
return stub[methodName].apply(stub, args);
}
),
defaults[methodName],
this._descriptors.page[methodName] ||
this._descriptors.longrunning[methodName]
);
}
}
/**
* The DNS address for this API service.
*/
static get servicePath() {
return 'dialogflow.googleapis.com';
}
/**
* The port for this API service.
*/
static get port() {
return 443;
}
/**
* The scopes needed to make gRPC calls for every method defined
* in this service.
*/
static get scopes() {
return ['https://www.googleapis.com/auth/cloud-platform'];
}
/**
* Return the project ID used by this class.
* @param {function(Error, string)} callback - the callback to
* be called with the current project Id.
*/
getProjectId(callback) {
return this.auth.getProjectId(callback);
}
// -------------------
// -- Service calls --
// -------------------
/**
* Returns the list of all intents in the specified agent.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The agent to list all intents from.
* Format: `projects/<Project ID>/agent`.
* @param {string} [request.languageCode]
* Optional. The language to list training phrases, parameters and rich
* messages for. If not specified, the agent's default language is used.
* [More than a dozen
* languages](https://dialogflow.com/docs/reference/language) are supported.
* Note: languages must be enabled in the agent before they can be used.
* @param {number} [request.intentView]
* Optional. The resource view to apply to the returned intent.
*
* The number should be among the values of [IntentView]{@link google.cloud.dialogflow.v2.IntentView}
* @param {number} [request.pageSize]
* The maximum number of resources contained in the underlying API
* response. If page streaming is performed per-resource, this
* parameter does not affect the return value. If page streaming is
* performed per-page, this determines the maximum number of
* resources in a page.
* @param {Object} [options]
* Optional parameters. You can override the default settings for this call, e.g, timeout,
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
* @param {function(?Error, ?Array, ?Object, ?Object)} [callback]
* The function which will be called with the result of the API call.
*
* The second parameter to the callback is Array of [Intent]{@link google.cloud.dialogflow.v2.Intent}.
*
* When autoPaginate: false is specified through options, it contains the result
* in a single response. If the response indicates the next page exists, the third
* parameter is set to be used for the next request object. The fourth parameter keeps
* the raw response object of an object representing [ListIntentsResponse]{@link google.cloud.dialogflow.v2.ListIntentsResponse}.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is Array of [Intent]{@link google.cloud.dialogflow.v2.Intent}.
*
* When autoPaginate: false is specified through options, the array has three elements.
* The first element is Array of [Intent]{@link google.cloud.dialogflow.v2.Intent} in a single response.
* The second element is the next request object if the response
* indicates the next page exists, or null. The third element is
* an object representing [ListIntentsResponse]{@link google.cloud.dialogflow.v2.ListIntentsResponse}.
*
* The promise has a method named "cancel" which cancels the ongoing API call.
*
* @example
*
* const dialogflow = require('dialogflow.v2');
*
* var client = new dialogflow.v2.IntentsClient({
* // optional auth parameters.
* });
*
* // Iterate over all elements.
* var formattedParent = client.projectAgentPath('[PROJECT]');
*
* client.listIntents({parent: formattedParent})
* .then(responses => {
* var resources = responses[0];
* for (let i = 0; i < resources.length; i += 1) {
* // doThingsWith(resources[i])
* }
* })
* .catch(err => {
* console.error(err);
* });
*
* // Or obtain the paged response.
* var formattedParent = client.projectAgentPath('[PROJECT]');
*
*
* var options = {autoPaginate: false};
* var callback = responses => {
* // The actual resources in a response.
* var resources = responses[0];
* // The next request if the response shows that there are more responses.
* var nextRequest = responses[1];
* // The actual response object, if necessary.
* // var rawResponse = responses[2];
* for (let i = 0; i < resources.length; i += 1) {
* // doThingsWith(resources[i]);
* }
* if (nextRequest) {
* // Fetch the next page.
* return client.listIntents(nextRequest, options).then(callback);
* }
* }
* client.listIntents({parent: formattedParent}, options)
* .then(callback)
* .catch(err => {
* console.error(err);
* });
*/
listIntents(request, options, callback) {
if (options instanceof Function && callback === undefined) {
callback = options;
options = {};
}
options = options || {};
return this._innerApiCalls.listIntents(request, options, callback);
}
/**
* Equivalent to {@link listIntents}, but returns a NodeJS Stream object.
*
* This fetches the paged responses for {@link listIntents} continuously
* and invokes the callback registered for 'data' event for each element in the
* responses.
*
* The returned object has 'end' method when no more elements are required.
*
* autoPaginate option will be ignored.
*
* @see {@link https://nodejs.org/api/stream.html}
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The agent to list all intents from.
* Format: `projects/<Project ID>/agent`.
* @param {string} [request.languageCode]
* Optional. The language to list training phrases, parameters and rich
* messages for. If not specified, the agent's default language is used.
* [More than a dozen
* languages](https://dialogflow.com/docs/reference/language) are supported.
* Note: languages must be enabled in the agent before they can be used.
* @param {number} [request.intentView]
* Optional. The resource view to apply to the returned intent.
*
* The number should be among the values of [IntentView]{@link google.cloud.dialogflow.v2.IntentView}
* @param {number} [request.pageSize]
* The maximum number of resources contained in the underlying API
* response. If page streaming is performed per-resource, this
* parameter does not affect the return value. If page streaming is
* performed per-page, this determines the maximum number of
* resources in a page.
* @param {Object} [options]
* Optional parameters. You can override the default settings for this call, e.g, timeout,
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
* @returns {Stream}
* An object stream which emits an object representing [Intent]{@link google.cloud.dialogflow.v2.Intent} on 'data' event.
*
* @example
*
* const dialogflow = require('dialogflow.v2');
*
* var client = new dialogflow.v2.IntentsClient({
* // optional auth parameters.
* });
*
* var formattedParent = client.projectAgentPath('[PROJECT]');
* client.listIntentsStream({parent: formattedParent})
* .on('data', element => {
* // doThingsWith(element)
* }).on('error', err => {
* console.log(err);
* });
*/
listIntentsStream(request, options) {
options = options || {};
return this._descriptors.page.listIntents.createStream(
this._innerApiCalls.listIntents,
request,
options
);
}
/**
* Retrieves the specified intent.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name of the intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
* @param {string} [request.languageCode]
* Optional. The language to retrieve training phrases, parameters and rich
* messages for. If not specified, the agent's default language is used.
* [More than a dozen
* languages](https://dialogflow.com/docs/reference/language) are supported.
* Note: languages must be enabled in the agent, before they can be used.
* @param {number} [request.intentView]
* Optional. The resource view to apply to the returned intent.
*
* The number should be among the values of [IntentView]{@link google.cloud.dialogflow.v2.IntentView}
* @param {Object} [options]
* Optional parameters. You can override the default settings for this call, e.g, timeout,
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
* @param {function(?Error, ?Object)} [callback]
* The function which will be called with the result of the API call.
*
* The second parameter to the callback is an object representing [Intent]{@link google.cloud.dialogflow.v2.Intent}.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing [Intent]{@link google.cloud.dialogflow.v2.Intent}.
* The promise has a method named "cancel" which cancels the ongoing API call.
*
* @example
*
* const dialogflow = require('dialogflow.v2');
*
* var client = new dialogflow.v2.IntentsClient({
* // optional auth parameters.
* });
*
* var formattedName = client.intentPath('[PROJECT]', '[INTENT]');
* client.getIntent({name: formattedName})
* .then(responses => {
* var response = responses[0];
* // doThingsWith(response)
* })
* .catch(err => {
* console.error(err);
* });
*/
getIntent(request, options, callback) {
if (options instanceof Function && callback === undefined) {
callback = options;
options = {};
}
options = options || {};
return this._innerApiCalls.getIntent(request, options, callback);
}
/**
* Creates an intent in the specified agent.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The agent to create a intent for.
* Format: `projects/<Project ID>/agent`.
* @param {Object} request.intent
* Required. The intent to create.
*
* This object should have the same structure as [Intent]{@link google.cloud.dialogflow.v2.Intent}
* @param {string} [request.languageCode]
* Optional. The language of training phrases, parameters and rich messages
* defined in `intent`. If not specified, the agent's default language is
* used. [More than a dozen
* languages](https://dialogflow.com/docs/reference/language) are supported.
* Note: languages must be enabled in the agent, before they can be used.
* @param {number} [request.intentView]
* Optional. The resource view to apply to the returned intent.
*
* The number should be among the values of [IntentView]{@link google.cloud.dialogflow.v2.IntentView}
* @param {Object} [options]
* Optional parameters. You can override the default settings for this call, e.g, timeout,
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
* @param {function(?Error, ?Object)} [callback]
* The function which will be called with the result of the API call.
*
* The second parameter to the callback is an object representing [Intent]{@link google.cloud.dialogflow.v2.Intent}.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing [Intent]{@link google.cloud.dialogflow.v2.Intent}.
* The promise has a method named "cancel" which cancels the ongoing API call.
*
* @example
*
* const dialogflow = require('dialogflow.v2');
*
* var client = new dialogflow.v2.IntentsClient({
* // optional auth parameters.
* });
*
* var formattedParent = client.projectAgentPath('[PROJECT]');
* var intent = {};
* var request = {
* parent: formattedParent,
* intent: intent,
* };
* client.createIntent(request)
* .then(responses => {
* var response = responses[0];
* // doThingsWith(response)
* })
* .catch(err => {
* console.error(err);
* });
*/
createIntent(request, options, callback) {
if (options instanceof Function && callback === undefined) {
callback = options;
options = {};
}
options = options || {};
return this._innerApiCalls.createIntent(request, options, callback);
}
/**
* Updates the specified intent.
*
* @param {Object} request
* The request object that will be sent.
* @param {Object} request.intent
* Required. The intent to update.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
* This object should have the same structure as [Intent]{@link google.cloud.dialogflow.v2.Intent}
* @param {string} request.languageCode
* Optional. The language of training phrases, parameters and rich messages
* defined in `intent`. If not specified, the agent's default language is
* used. [More than a dozen
* languages](https://dialogflow.com/docs/reference/language) are supported.
* Note: languages must be enabled in the agent, before they can be used.
* @param {Object} [request.updateMask]
* Optional. The mask to control which fields get updated.
*
* This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask}
* @param {number} [request.intentView]
* Optional. The resource view to apply to the returned intent.
*
* The number should be among the values of [IntentView]{@link google.cloud.dialogflow.v2.IntentView}
* @param {Object} [options]
* Optional parameters. You can override the default settings for this call, e.g, timeout,
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
* @param {function(?Error, ?Object)} [callback]
* The function which will be called with the result of the API call.
*
* The second parameter to the callback is an object representing [Intent]{@link google.cloud.dialogflow.v2.Intent}.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing [Intent]{@link google.cloud.dialogflow.v2.Intent}.
* The promise has a method named "cancel" which cancels the ongoing API call.
*
* @example
*
* const dialogflow = require('dialogflow.v2');
*
* var client = new dialogflow.v2.IntentsClient({
* // optional auth parameters.
* });
*
* var intent = {};
* var languageCode = '';
* var request = {
* intent: intent,
* languageCode: languageCode,
* };
* client.updateIntent(request)
* .then(responses => {
* var response = responses[0];
* // doThingsWith(response)
* })
* .catch(err => {
* console.error(err);
* });
*/
updateIntent(request, options, callback) {
if (options instanceof Function && callback === undefined) {
callback = options;
options = {};
}
options = options || {};
return this._innerApiCalls.updateIntent(request, options, callback);
}
/**
* Deletes the specified intent.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name of the intent to delete.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
* @param {Object} [options]
* Optional parameters. You can override the default settings for this call, e.g, timeout,
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
* @param {function(?Error)} [callback]
* The function which will be called with the result of the API call.
* @returns {Promise} - The promise which resolves when API call finishes.
* The promise has a method named "cancel" which cancels the ongoing API call.
*
* @example
*
* const dialogflow = require('dialogflow.v2');
*
* var client = new dialogflow.v2.IntentsClient({
* // optional auth parameters.
* });
*
* var formattedName = client.intentPath('[PROJECT]', '[INTENT]');
* client.deleteIntent({name: formattedName}).catch(err => {
* console.error(err);
* });
*/
deleteIntent(request, options, callback) {
if (options instanceof Function && callback === undefined) {
callback = options;
options = {};
}
options = options || {};
return this._innerApiCalls.deleteIntent(request, options, callback);
}
/**
* Updates/Creates multiple intents in the specified agent.
*
* Operation <response: BatchUpdateIntentsResponse>
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The name of the agent to update or create intents in.
* Format: `projects/<Project ID>/agent`.
* @param {string} request.languageCode
* Optional. The language of training phrases, parameters and rich messages
* defined in `intents`. If not specified, the agent's default language is
* used. [More than a dozen
* languages](https://dialogflow.com/docs/reference/language) are supported.
* Note: languages must be enabled in the agent, before they can be used.
* @param {string} [request.intentBatchUri]
* The URI to a Google Cloud Storage file containing intents to update or
* create. The file format can either be a serialized proto (of IntentBatch
* type) or JSON object. Note: The URI must start with "gs://".
* @param {Object} [request.intentBatchInline]
* The collection of intents to update or create.
*
* This object should have the same structure as [IntentBatch]{@link google.cloud.dialogflow.v2.IntentBatch}
* @param {Object} [request.updateMask]
* Optional. The mask to control which fields get updated.
*
* This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask}
* @param {number} [request.intentView]
* Optional. The resource view to apply to the returned intent.
*
* The number should be among the values of [IntentView]{@link google.cloud.dialogflow.v2.IntentView}
* @param {Object} [options]
* Optional parameters. You can override the default settings for this call, e.g, timeout,
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
* @param {function(?Error, ?Object)} [callback]
* The function which will be called with the result of the API call.
*
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
* The promise has a method named "cancel" which cancels the ongoing API call.
*
* @example
*
* const dialogflow = require('dialogflow.v2');
*
* var client = new dialogflow.v2.IntentsClient({
* // optional auth parameters.
* });
*
* var formattedParent = client.projectAgentPath('[PROJECT]');
* var languageCode = '';
* var request = {
* parent: formattedParent,
* languageCode: languageCode,
* };
*
* // Handle the operation using the promise pattern.
* client.batchUpdateIntents(request)
* .then(responses => {
* var operation = responses[0];
* var initialApiResponse = responses[1];
*
* // Operation#promise starts polling for the completion of the LRO.
* return operation.promise();
* })
* .then(responses => {
* // The final result of the operation.
* var result = responses[0];
*
* // The metadata value of the completed operation.
* var metadata = responses[1];
*
* // The response of the api call returning the complete operation.
* var finalApiResponse = responses[2];
* })
* .catch(err => {
* console.error(err);
* });
*
* var formattedParent = client.projectAgentPath('[PROJECT]');
* var languageCode = '';
* var request = {
* parent: formattedParent,
* languageCode: languageCode,
* };
*
* // Handle the operation using the event emitter pattern.
* client.batchUpdateIntents(request)
* .then(responses => {
* var operation = responses[0];
* var initialApiResponse = responses[1];
*
* // Adding a listener for the "complete" event starts polling for the
* // completion of the operation.
* operation.on('complete', (result, metadata, finalApiResponse) => {
* // doSomethingWith(result);
* });
*
* // Adding a listener for the "progress" event causes the callback to be
* // called on any change in metadata when the operation is polled.
* operation.on('progress', (metadata, apiResponse) => {
* // doSomethingWith(metadata)
* });
*
* // Adding a listener for the "error" event handles any errors found during polling.
* operation.on('error', err => {
* // throw(err);
* });
* })
* .catch(err => {
* console.error(err);
* });
*/
batchUpdateIntents(request, options, callback) {
if (options instanceof Function && callback === undefined) {
callback = options;
options = {};
}
options = options || {};
return this._innerApiCalls.batchUpdateIntents(request, options, callback);
}
/**
* Deletes intents in the specified agent.
*
* Operation <response: google.protobuf.Empty>
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The name of the agent to delete all entities types for. Format:
* `projects/<Project ID>/agent`.
* @param {Object[]} request.intents
* Required. The collection of intents to delete. Only intent `name` must be
* filled in.
*
* This object should have the same structure as [Intent]{@link google.cloud.dialogflow.v2.Intent}
* @param {Object} [options]
* Optional parameters. You can override the default settings for this call, e.g, timeout,
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
* @param {function(?Error, ?Object)} [callback]
* The function which will be called with the result of the API call.
*
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
* The promise has a method named "cancel" which cancels the ongoing API call.
*
* @example
*
* const dialogflow = require('dialogflow.v2');
*
* var client = new dialogflow.v2.IntentsClient({
* // optional auth parameters.
* });
*
* var formattedParent = client.projectAgentPath('[PROJECT]');
* var intents = [];
* var request = {
* parent: formattedParent,
* intents: intents,
* };
*
* // Handle the operation using the promise pattern.
* client.batchDeleteIntents(request)
* .then(responses => {
* var operation = responses[0];
* var initialApiResponse = responses[1];
*
* // Operation#promise starts polling for the completion of the LRO.
* return operation.promise();
* })
* .then(responses => {
* // The final result of the operation.
* var result = responses[0];
*
* // The metadata value of the completed operation.
* var metadata = responses[1];
*
* // The response of the api call returning the complete operation.
* var finalApiResponse = responses[2];
* })
* .catch(err => {
* console.error(err);
* });
*
* var formattedParent = client.projectAgentPath('[PROJECT]');
* var intents = [];
* var request = {
* parent: formattedParent,
* intents: intents,
* };
*
* // Handle the operation using the event emitter pattern.
* client.batchDeleteIntents(request)
* .then(responses => {
* var operation = responses[0];
* var initialApiResponse = responses[1];
*
* // Adding a listener for the "complete" event starts polling for the
* // completion of the operation.
* operation.on('complete', (result, metadata, finalApiResponse) => {
* // doSomethingWith(result);
* });
*
* // Adding a listener for the "progress" event causes the callback to be
* // called on any change in metadata when the operation is polled.
* operation.on('progress', (metadata, apiResponse) => {
* // doSomethingWith(metadata)
* });
*
* // Adding a listener for the "error" event handles any errors found during polling.
* operation.on('error', err => {
* // throw(err);
* });
* })
* .catch(err => {
* console.error(err);
* });
*/
batchDeleteIntents(request, options, callback) {
if (options instanceof Function && callback === undefined) {
callback = options;
options = {};
}
options = options || {};
return this._innerApiCalls.batchDeleteIntents(request, options, callback);
}
// --------------------
// -- Path templates --
// --------------------
/**
* Return a fully-qualified project_agent resource name string.
*
* @param {String} project
* @returns {String}
*/
projectAgentPath(project) {
return this._pathTemplates.projectAgentPathTemplate.render({
project: project,
});
}
/**
* Return a fully-qualified intent resource name string.
*
* @param {String} project
* @param {String} intent
* @returns {String}
*/
intentPath(project, intent) {
return this._pathTemplates.intentPathTemplate.render({
project: project,
intent: intent,
});
}
/**
* Return a fully-qualified agent resource name string.
*
* @param {String} project
* @param {String} agent
* @returns {String}
*/
agentPath(project, agent) {
return this._pathTemplates.agentPathTemplate.render({
project: project,
agent: agent,
});
}
/**
* Parse the projectAgentName from a project_agent resource.
*
* @param {String} projectAgentName
* A fully-qualified path representing a project_agent resources.
* @returns {String} - A string representing the project.
*/
matchProjectFromProjectAgentName(projectAgentName) {
return this._pathTemplates.projectAgentPathTemplate.match(projectAgentName)
.project;
}
/**
* Parse the intentName from a intent resource.
*
* @param {String} intentName
* A fully-qualified path representing a intent resources.
* @returns {String} - A string representing the project.
*/
matchProjectFromIntentName(intentName) {
return this._pathTemplates.intentPathTemplate.match(intentName).project;
}
/**
* Parse the intentName from a intent resource.
*
* @param {String} intentName
* A fully-qualified path representing a intent resources.
* @returns {String} - A string representing the intent.
*/
matchIntentFromIntentName(intentName) {
return this._pathTemplates.intentPathTemplate.match(intentName).intent;
}
/**
* Parse the agentName from a agent resource.
*
* @param {String} agentName
* A fully-qualified path representing a agent resources.
* @returns {String} - A string representing the project.
*/
matchProjectFromAgentName(agentName) {
return this._pathTemplates.agentPathTemplate.match(agentName).project;
}
/**
* Parse the agentName from a agent resource.
*
* @param {String} agentName
* A fully-qualified path representing a agent resources.
* @returns {String} - A string representing the agent.
*/
matchAgentFromAgentName(agentName) {
return this._pathTemplates.agentPathTemplate.match(agentName).agent;
}
}
module.exports = IntentsClient;
|
/*!
* Start Bootstrap - Grayscale Bootstrap Theme (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
// jQuery to collapse the navbar on scroll
// function collapseNavbar() {
// // if ($(".navbar").offset().top > 50) {
// // $(".navbar-fixed-top").addClass("top-nav-collapse");
// // } else {
// // $(".navbar-fixed-top").removeClass("top-nav-collapse");
// // }
// //FOR NOW NEVER COLLAPSE. BUT MAYBE TRY TO COLLAPSE ON HOME PAGE ONLY!
// // $(".navbar-fixed-top").addClass("top-nav-collapse");
// }
$(window).scroll(collapseNavbar);
$(document).ready(collapseNavbar);
// jQuery for page scrolling feature - requires jQuery Easing plugin
$(function() {
$('a.page-scroll').bind('click', function(event) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top
}, 1500, 'easeInOutExpo');
event.preventDefault();
});
});
// Closes the Responsive Menu on Menu Item Click
$('.navbar-collapse ul li a').click(function() {
if ($(this).attr('class') != 'dropdown-toggle active' && $(this).attr('class') != 'dropdown-toggle') {
$('.navbar-toggle:visible').click();
}
});
|
import {
GammaEncoding,
LinearEncoding,
RGBEEncoding,
RGBM7Encoding,
RGBM16Encoding,
RGBDEncoding,
sRGBEncoding
} from '../../../../build/three.module.js';
import { TempNode } from '../core/TempNode.js';
import { ConstNode } from '../core/ConstNode.js';
import { FloatNode } from '../inputs/FloatNode.js';
import { FunctionNode } from '../core/FunctionNode.js';
import { ExpressionNode } from '../core/ExpressionNode.js';
function ColorSpaceNode( input, method ) {
TempNode.call( this, 'v4' );
this.input = input;
this.method = method || ColorSpaceNode.LINEAR_TO_LINEAR;
}
ColorSpaceNode.Nodes = ( function () {
// For a discussion of what this is, please read this: http://lousodrome.net/blog/light/2013/05/26/gamma-correct-and-hdr-rendering-in-a-32-bits-buffer/
var LinearToLinear = new FunctionNode( [
'vec4 LinearToLinear( in vec4 value ) {',
' return value;',
'}'
].join( '\n' ) );
var GammaToLinear = new FunctionNode( [
'vec4 GammaToLinear( in vec4 value, in float gammaFactor ) {',
' return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );',
'}'
].join( '\n' ) );
var LinearToGamma = new FunctionNode( [
'vec4 LinearToGamma( in vec4 value, in float gammaFactor ) {',
' return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );',
'}'
].join( '\n' ) );
var sRGBToLinear = new FunctionNode( [
'vec4 sRGBToLinear( in vec4 value ) {',
' return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );',
'}'
].join( '\n' ) );
var LinearTosRGB = new FunctionNode( [
'vec4 LinearTosRGB( in vec4 value ) {',
' return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );',
'}'
].join( '\n' ) );
var RGBEToLinear = new FunctionNode( [
'vec4 RGBEToLinear( in vec4 value ) {',
' return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );',
'}'
].join( '\n' ) );
var LinearToRGBE = new FunctionNode( [
'vec4 LinearToRGBE( in vec4 value ) {',
' float maxComponent = max( max( value.r, value.g ), value.b );',
' float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );',
' return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );',
// return vec4( value.brg, ( 3.0 + 128.0 ) / 256.0 );
'}'
].join( '\n' ) );
// reference: http://iwasbeingirony.blogspot.ca/2010/06/difference-between-rgbm-and-rgbd.html
var RGBMToLinear = new FunctionNode( [
'vec3 RGBMToLinear( in vec4 value, in float maxRange ) {',
' return vec4( value.xyz * value.w * maxRange, 1.0 );',
'}'
].join( '\n' ) );
var LinearToRGBM = new FunctionNode( [
'vec3 LinearToRGBM( in vec4 value, in float maxRange ) {',
' float maxRGB = max( value.x, max( value.g, value.b ) );',
' float M = clamp( maxRGB / maxRange, 0.0, 1.0 );',
' M = ceil( M * 255.0 ) / 255.0;',
' return vec4( value.rgb / ( M * maxRange ), M );',
'}'
].join( '\n' ) );
// reference: http://iwasbeingirony.blogspot.ca/2010/06/difference-between-rgbm-and-rgbd.html
var RGBDToLinear = new FunctionNode( [
'vec3 RGBDToLinear( in vec4 value, in float maxRange ) {',
' return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );',
'}'
].join( '\n' ) );
var LinearToRGBD = new FunctionNode( [
'vec3 LinearToRGBD( in vec4 value, in float maxRange ) {',
' float maxRGB = max( value.x, max( value.g, value.b ) );',
' float D = max( maxRange / maxRGB, 1.0 );',
' D = clamp( floor( D ) / 255.0, 0.0, 1.0 );',
' return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );',
'}'
].join( '\n' ) );
// LogLuv reference: http://graphicrants.blogspot.ca/2009/04/rgbm-color-encoding.html
// M matrix, for encoding
var cLogLuvM = new ConstNode( 'const mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );' );
var LinearToLogLuv = new FunctionNode( [
'vec4 LinearToLogLuv( in vec4 value ) {',
' vec3 Xp_Y_XYZp = cLogLuvM * value.rgb;',
' Xp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));',
' vec4 vResult;',
' vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;',
' float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;',
' vResult.w = fract(Le);',
' vResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;',
' return vResult;',
'}'
].join( '\n' ), [ cLogLuvM ] );
// Inverse M matrix, for decoding
var cLogLuvInverseM = new ConstNode( 'const mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );' );
var LogLuvToLinear = new FunctionNode( [
'vec4 LogLuvToLinear( in vec4 value ) {',
' float Le = value.z * 255.0 + value.w;',
' vec3 Xp_Y_XYZp;',
' Xp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);',
' Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;',
' Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;',
' vec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;',
' return vec4( max(vRGB, 0.0), 1.0 );',
'}'
].join( '\n' ), [ cLogLuvInverseM ] );
return {
LinearToLinear: LinearToLinear,
GammaToLinear: GammaToLinear,
LinearToGamma: LinearToGamma,
sRGBToLinear: sRGBToLinear,
LinearTosRGB: LinearTosRGB,
RGBEToLinear: RGBEToLinear,
LinearToRGBE: LinearToRGBE,
RGBMToLinear: RGBMToLinear,
LinearToRGBM: LinearToRGBM,
RGBDToLinear: RGBDToLinear,
LinearToRGBD: LinearToRGBD,
cLogLuvM: cLogLuvM,
LinearToLogLuv: LinearToLogLuv,
cLogLuvInverseM: cLogLuvInverseM,
LogLuvToLinear: LogLuvToLinear
};
} )();
ColorSpaceNode.LINEAR_TO_LINEAR = 'LinearToLinear';
ColorSpaceNode.GAMMA_TO_LINEAR = 'GammaToLinear';
ColorSpaceNode.LINEAR_TO_GAMMA = 'LinearToGamma';
ColorSpaceNode.SRGB_TO_LINEAR = 'sRGBToLinear';
ColorSpaceNode.LINEAR_TO_SRGB = 'LinearTosRGB';
ColorSpaceNode.RGBE_TO_LINEAR = 'RGBEToLinear';
ColorSpaceNode.LINEAR_TO_RGBE = 'LinearToRGBE';
ColorSpaceNode.RGBM_TO_LINEAR = 'RGBMToLinear';
ColorSpaceNode.LINEAR_TO_RGBM = 'LinearToRGBM';
ColorSpaceNode.RGBD_TO_LINEAR = 'RGBDToLinear';
ColorSpaceNode.LINEAR_TO_RGBD = 'LinearToRGBD';
ColorSpaceNode.LINEAR_TO_LOG_LUV = 'LinearToLogLuv';
ColorSpaceNode.LOG_LUV_TO_LINEAR = 'LogLuvToLinear';
ColorSpaceNode.getEncodingComponents = function ( encoding ) {
switch ( encoding ) {
case LinearEncoding:
return [ 'Linear' ];
case sRGBEncoding:
return [ 'sRGB' ];
case RGBEEncoding:
return [ 'RGBE' ];
case RGBM7Encoding:
return [ 'RGBM', new FloatNode( 7.0 ).setReadonly( true ) ];
case RGBM16Encoding:
return [ 'RGBM', new FloatNode( 16.0 ).setReadonly( true ) ];
case RGBDEncoding:
return [ 'RGBD', new FloatNode( 256.0 ).setReadonly( true ) ];
case GammaEncoding:
return [ 'Gamma', new ExpressionNode( 'float( GAMMA_FACTOR )', 'f' ) ];
}
};
ColorSpaceNode.prototype = Object.create( TempNode.prototype );
ColorSpaceNode.prototype.constructor = ColorSpaceNode;
ColorSpaceNode.prototype.nodeType = 'ColorSpace';
ColorSpaceNode.prototype.hashProperties = [ 'method' ];
ColorSpaceNode.prototype.generate = function ( builder, output ) {
var input = this.input.build( builder, 'v4' );
var outputType = this.getType( builder );
var methodNode = ColorSpaceNode.Nodes[ this.method ];
var method = builder.include( methodNode );
if ( method === ColorSpaceNode.LINEAR_TO_LINEAR ) {
return builder.format( input, outputType, output );
} else {
if ( methodNode.inputs.length === 2 ) {
var factor = this.factor.build( builder, 'f' );
return builder.format( method + '( ' + input + ', ' + factor + ' )', outputType, output );
} else {
return builder.format( method + '( ' + input + ' )', outputType, output );
}
}
};
ColorSpaceNode.prototype.fromEncoding = function ( encoding ) {
var components = ColorSpaceNode.getEncodingComponents( encoding );
this.method = 'LinearTo' + components[ 0 ];
this.factor = components[ 1 ];
};
ColorSpaceNode.prototype.fromDecoding = function ( encoding ) {
var components = ColorSpaceNode.getEncodingComponents( encoding );
this.method = components[ 0 ] + 'ToLinear';
this.factor = components[ 1 ];
};
ColorSpaceNode.prototype.copy = function ( source ) {
TempNode.prototype.copy.call( this, source );
this.input = source.input;
this.method = source.method;
return this;
};
ColorSpaceNode.prototype.toJSON = function ( meta ) {
var data = this.getJSONNode( meta );
if ( ! data ) {
data = this.createJSONNode( meta );
data.input = this.input.toJSON( meta ).uuid;
data.method = this.method;
}
return data;
};
export { ColorSpaceNode };
|
import { describe, PropTypes } from 'react-desc';
import { getAvailableAtBadge, themeDocUtils } from '../../utils';
export const doc = MaskedInput => {
const DocumentedMaskedInput = describe(MaskedInput)
.availableAt(getAvailableAtBadge('MaskedInput'))
.description('An input field with formalized syntax.')
.usage(
`import { MaskedInput } from 'grommet';
<MaskedInput id='item' name='item' />`,
)
.intrinsicElement('input');
DocumentedMaskedInput.propTypes = {
id: PropTypes.string.description('The id attribute of the input.'),
name: PropTypes.string.description('The name attribute of the input.'),
onChange: PropTypes.func.description(
`Function that will be called when the user types or pastes text.`,
),
onBlur: PropTypes.func.description(
`Function that will be called when the user leaves the field.`,
),
mask: PropTypes.arrayOf(
PropTypes.shape({
length: PropTypes.oneOfType([
PropTypes.number,
PropTypes.arrayOf(PropTypes.number),
]),
fixed: PropTypes.string,
options: PropTypes.arrayOf(
PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
),
regexp: PropTypes.shape({}), // RegExp
}),
).description(
`Describes the structure of the mask. If a regexp is provided, it should
allow both the final full string element as well as partial strings
as the user types characters one by one.`,
),
size: PropTypes.oneOfType([
PropTypes.oneOf(['small', 'medium', 'large', 'xlarge']),
PropTypes.string,
]).description('The size of the text.'),
value: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
]).description(
`What text to put in the input. The caller should ensure that it
is initially valid with respect to the mask.`,
),
};
return DocumentedMaskedInput;
};
export const themeDoc = {
'global.hover.background': {
description: 'The background style when hovering.',
type: 'string | { color: string, opacity: string }',
defaultValue: "{ color: 'active', opacity: 'medium' }",
},
'global.hover.color': {
description: 'The text color when hovering.',
type: 'string | { dark: string, light: string }',
defaultValue: "{ dark: 'white', light: 'black' }",
},
'maskedInput.extend': {
description: 'Any additional style for MaskedInput.',
type: 'string | (props) => {}',
defaultValue: undefined,
},
'text.medium': {
description: 'The size of the text for MaskedInput.',
type: 'string',
defaultValue: '18px',
},
...themeDocUtils.focusStyle,
...themeDocUtils.placeholderStyle,
...themeDocUtils.inputStyle,
};
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
const path = require('path');
const webpack = require('webpack');
const webpackBaseConfig = require('../../webpackBaseConfig');
module.exports = {
...webpackBaseConfig,
entry: path.resolve(__dirname, 'index.js'),
mode: process.env.NODE_ENV || 'development',
optimization: {
// Helps debugging and build perf.
// Bundle size is irrelevant for local serving
minimize: false,
},
output: {
path: path.resolve(__dirname, './build'),
publicPath: '/',
filename: 'tests.js',
},
plugins: [
new HtmlWebpackPlugin({
template: path.resolve(__dirname, './template.html'),
}),
// Avoid bundling the whole @mui/icons-material package. x2 the bundling speed.
new webpack.IgnorePlugin({ resourceRegExp: /material-icons\/SearchIcons\.js/ }),
new webpack.ProvidePlugin({
// required by enzyme > cheerio > parse5 > util
process: 'process/browser',
}),
],
module: {
rules: [
{
test: /\.(js|ts|tsx)$/,
exclude: /node_modules/,
loader: 'babel-loader',
options: {
cacheDirectory: true,
configFile: path.resolve(__dirname, '../../babel.config.js'),
},
},
{
test: /\.md$/,
type: 'asset/source',
},
{
test: /\.(jpg|gif|png)$/,
type: 'asset/inline',
},
],
},
resolve: {
...webpackBaseConfig.resolve,
alias: {
...webpackBaseConfig.resolve.alias,
'@material-ui/core': path.resolve(__dirname, '../../packages/mui-material/src'),
'@material-ui/styles': path.resolve(__dirname, '../../packages/mui-styles/src'),
},
fallback: {
// needed by enzyme > cheerio
stream: false,
// required by enzyme > cheerio > parse5
util: require.resolve('util/'),
},
},
// TODO: 'browserslist:modern'
// See https://github.com/webpack/webpack/issues/14203
target: 'web',
};
|
/*! For license information please see 741.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([[741],{54:(t,e,n)=>{"use strict";n.d(e,{Z:()=>Lr});var i=Object.freeze({});function r(t){return null==t}function o(t){return null!=t}function a(t){return!0===t}function s(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function l(t){return null!==t&&"object"==typeof t}var u=Object.prototype.toString;function c(t){return"[object Object]"===u.call(t)}function h(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function p(t){return o(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function d(t){return null==t?"":Array.isArray(t)||c(t)&&t.toString===u?JSON.stringify(t,null,2):String(t)}function f(t){var e=parseFloat(t);return isNaN(e)?t:e}function g(t,e){for(var n=Object.create(null),i=t.split(","),r=0;r<i.length;r++)n[i[r]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}g("slot,component",!0);var v=g("key,ref,slot,slot-scope,is");function y(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)return t.splice(n,1)}}var m=Object.prototype.hasOwnProperty;function _(t,e){return m.call(t,e)}function x(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var b=/-(\w)/g,w=x((function(t){return t.replace(b,(function(t,e){return e?e.toUpperCase():""}))})),S=x((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),T=/\B([A-Z])/g,M=x((function(t){return t.replace(T,"-$1").toLowerCase()})),C=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var i=arguments.length;return i?i>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function k(t,e){e=e||0;for(var n=t.length-e,i=new Array(n);n--;)i[n]=t[n+e];return i}function A(t,e){for(var n in e)t[n]=e[n];return t}function I(t){for(var e={},n=0;n<t.length;n++)t[n]&&A(e,t[n]);return e}function D(t,e,n){}var P=function(t,e,n){return!1},O=function(t){return t};function L(t,e){if(t===e)return!0;var n=l(t),i=l(e);if(!n||!i)return!n&&!i&&String(t)===String(e);try{var r=Array.isArray(t),o=Array.isArray(e);if(r&&o)return t.length===e.length&&t.every((function(t,n){return L(t,e[n])}));if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(r||o)return!1;var a=Object.keys(t),s=Object.keys(e);return a.length===s.length&&a.every((function(n){return L(t[n],e[n])}))}catch(t){return!1}}function R(t,e){for(var n=0;n<t.length;n++)if(L(t[n],e))return n;return-1}function E(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}var Z="data-server-rendered",N=["component","directive","filter"],B=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],z={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:P,isReservedAttr:P,isUnknownElement:P,getTagNamespace:D,parsePlatformTagName:O,mustUseProp:P,async:!0,_lifecycleHooks:B};function F(t,e,n,i){Object.defineProperty(t,e,{value:n,enumerable:!!i,writable:!0,configurable:!0})}var W,V=new RegExp("[^"+/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/.source+".$_\\d]"),H="__proto__"in{},U="undefined"!=typeof window,G="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,X=G&&WXEnvironment.platform.toLowerCase(),Y=U&&window.navigator.userAgent.toLowerCase(),j=Y&&/msie|trident/.test(Y),$=Y&&Y.indexOf("msie 9.0")>0,q=Y&&Y.indexOf("edge/")>0,K=(Y&&Y.indexOf("android"),Y&&/iphone|ipad|ipod|ios/.test(Y)||"ios"===X),J=(Y&&/chrome\/\d+/.test(Y),Y&&/phantomjs/.test(Y),Y&&Y.match(/firefox\/(\d+)/)),Q={}.watch,tt=!1;if(U)try{var et={};Object.defineProperty(et,"passive",{get:function(){tt=!0}}),window.addEventListener("test-passive",null,et)}catch(t){}var nt=function(){return void 0===W&&(W=!U&&!G&&void 0!==n.g&&n.g.process&&"server"===n.g.process.env.VUE_ENV),W},it=U&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function rt(t){return"function"==typeof t&&/native code/.test(t.toString())}var ot,at="undefined"!=typeof Symbol&&rt(Symbol)&&"undefined"!=typeof Reflect&&rt(Reflect.ownKeys);ot="undefined"!=typeof Set&&rt(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var st=D,lt=0,ut=function(){this.id=lt++,this.subs=[]};ut.prototype.addSub=function(t){this.subs.push(t)},ut.prototype.removeSub=function(t){y(this.subs,t)},ut.prototype.depend=function(){ut.target&&ut.target.addDep(this)},ut.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;e<n;e++)t[e].update()},ut.target=null;var ct=[];function ht(t){ct.push(t),ut.target=t}function pt(){ct.pop(),ut.target=ct[ct.length-1]}var dt=function(t,e,n,i,r,o,a,s){this.tag=t,this.data=e,this.children=n,this.text=i,this.elm=r,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},ft={child:{configurable:!0}};ft.child.get=function(){return this.componentInstance},Object.defineProperties(dt.prototype,ft);var gt=function(t){void 0===t&&(t="");var e=new dt;return e.text=t,e.isComment=!0,e};function vt(t){return new dt(void 0,void 0,void 0,String(t))}function yt(t){var e=new dt(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}var mt=Array.prototype,_t=Object.create(mt);["push","pop","shift","unshift","splice","sort","reverse"].forEach((function(t){var e=mt[t];F(_t,t,(function(){for(var n=[],i=arguments.length;i--;)n[i]=arguments[i];var r,o=e.apply(this,n),a=this.__ob__;switch(t){case"push":case"unshift":r=n;break;case"splice":r=n.slice(2)}return r&&a.observeArray(r),a.dep.notify(),o}))}));var xt=Object.getOwnPropertyNames(_t),bt=!0;function wt(t){bt=t}var St=function(t){this.value=t,this.dep=new ut,this.vmCount=0,F(t,"__ob__",this),Array.isArray(t)?(H?function(t,e){t.__proto__=e}(t,_t):function(t,e,n){for(var i=0,r=n.length;i<r;i++){var o=n[i];F(t,o,e[o])}}(t,_t,xt),this.observeArray(t)):this.walk(t)};function Tt(t,e){var n;if(l(t)&&!(t instanceof dt))return _(t,"__ob__")&&t.__ob__ instanceof St?n=t.__ob__:bt&&!nt()&&(Array.isArray(t)||c(t))&&Object.isExtensible(t)&&!t._isVue&&(n=new St(t)),e&&n&&n.vmCount++,n}function Mt(t,e,n,i,r){var o=new ut,a=Object.getOwnPropertyDescriptor(t,e);if(!a||!1!==a.configurable){var s=a&&a.get,l=a&&a.set;s&&!l||2!==arguments.length||(n=t[e]);var u=!r&&Tt(n);Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){var e=s?s.call(t):n;return ut.target&&(o.depend(),u&&(u.dep.depend(),Array.isArray(e)&&At(e))),e},set:function(e){var i=s?s.call(t):n;e===i||e!=e&&i!=i||s&&!l||(l?l.call(t,e):n=e,u=!r&&Tt(e),o.notify())}})}}function Ct(t,e,n){if(Array.isArray(t)&&h(e))return t.length=Math.max(t.length,e),t.splice(e,1,n),n;if(e in t&&!(e in Object.prototype))return t[e]=n,n;var i=t.__ob__;return t._isVue||i&&i.vmCount?n:i?(Mt(i.value,e,n),i.dep.notify(),n):(t[e]=n,n)}function kt(t,e){if(Array.isArray(t)&&h(e))t.splice(e,1);else{var n=t.__ob__;t._isVue||n&&n.vmCount||_(t,e)&&(delete t[e],n&&n.dep.notify())}}function At(t){for(var e=void 0,n=0,i=t.length;n<i;n++)(e=t[n])&&e.__ob__&&e.__ob__.dep.depend(),Array.isArray(e)&&At(e)}St.prototype.walk=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)Mt(t,e[n])},St.prototype.observeArray=function(t){for(var e=0,n=t.length;e<n;e++)Tt(t[e])};var It=z.optionMergeStrategies;function Dt(t,e){if(!e)return t;for(var n,i,r,o=at?Reflect.ownKeys(e):Object.keys(e),a=0;a<o.length;a++)"__ob__"!==(n=o[a])&&(i=t[n],r=e[n],_(t,n)?i!==r&&c(i)&&c(r)&&Dt(i,r):Ct(t,n,r));return t}function Pt(t,e,n){return n?function(){var i="function"==typeof e?e.call(n,n):e,r="function"==typeof t?t.call(n,n):t;return i?Dt(i,r):r}:e?t?function(){return Dt("function"==typeof e?e.call(this,this):e,"function"==typeof t?t.call(this,this):t)}:e:t}function Ot(t,e){var n=e?t?t.concat(e):Array.isArray(e)?e:[e]:t;return n?function(t){for(var e=[],n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(n):n}function Lt(t,e,n,i){var r=Object.create(t||null);return e?A(r,e):r}It.data=function(t,e,n){return n?Pt(t,e,n):e&&"function"!=typeof e?t:Pt(t,e)},B.forEach((function(t){It[t]=Ot})),N.forEach((function(t){It[t+"s"]=Lt})),It.watch=function(t,e,n,i){if(t===Q&&(t=void 0),e===Q&&(e=void 0),!e)return Object.create(t||null);if(!t)return e;var r={};for(var o in A(r,t),e){var a=r[o],s=e[o];a&&!Array.isArray(a)&&(a=[a]),r[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return r},It.props=It.methods=It.inject=It.computed=function(t,e,n,i){if(!t)return e;var r=Object.create(null);return A(r,t),e&&A(r,e),r},It.provide=Pt;var Rt=function(t,e){return void 0===e?t:e};function Et(t,e,n){if("function"==typeof e&&(e=e.options),function(t,e){var n=t.props;if(n){var i,r,o={};if(Array.isArray(n))for(i=n.length;i--;)"string"==typeof(r=n[i])&&(o[w(r)]={type:null});else if(c(n))for(var a in n)r=n[a],o[w(a)]=c(r)?r:{type:r};t.props=o}}(e),function(t,e){var n=t.inject;if(n){var i=t.inject={};if(Array.isArray(n))for(var r=0;r<n.length;r++)i[n[r]]={from:n[r]};else if(c(n))for(var o in n){var a=n[o];i[o]=c(a)?A({from:o},a):{from:a}}}}(e),function(t){var e=t.directives;if(e)for(var n in e){var i=e[n];"function"==typeof i&&(e[n]={bind:i,update:i})}}(e),!e._base&&(e.extends&&(t=Et(t,e.extends,n)),e.mixins))for(var i=0,r=e.mixins.length;i<r;i++)t=Et(t,e.mixins[i],n);var o,a={};for(o in t)s(o);for(o in e)_(t,o)||s(o);function s(i){var r=It[i]||Rt;a[i]=r(t[i],e[i],n,i)}return a}function Zt(t,e,n,i){if("string"==typeof n){var r=t[e];if(_(r,n))return r[n];var o=w(n);if(_(r,o))return r[o];var a=S(o);return _(r,a)?r[a]:r[n]||r[o]||r[a]}}function Nt(t,e,n,i){var r=e[t],o=!_(n,t),a=n[t],s=Ft(Boolean,r.type);if(s>-1)if(o&&!_(r,"default"))a=!1;else if(""===a||a===M(t)){var l=Ft(String,r.type);(l<0||s<l)&&(a=!0)}if(void 0===a){a=function(t,e,n){if(_(e,"default")){var i=e.default;return t&&t.$options.propsData&&void 0===t.$options.propsData[n]&&void 0!==t._props[n]?t._props[n]:"function"==typeof i&&"Function"!==Bt(e.type)?i.call(t):i}}(i,r,t);var u=bt;wt(!0),Tt(a),wt(u)}return a}function Bt(t){var e=t&&t.toString().match(/^\s*function (\w+)/);return e?e[1]:""}function zt(t,e){return Bt(t)===Bt(e)}function Ft(t,e){if(!Array.isArray(e))return zt(e,t)?0:-1;for(var n=0,i=e.length;n<i;n++)if(zt(e[n],t))return n;return-1}function Wt(t,e,n){ht();try{if(e)for(var i=e;i=i.$parent;){var r=i.$options.errorCaptured;if(r)for(var o=0;o<r.length;o++)try{if(!1===r[o].call(i,t,e,n))return}catch(t){Ht(t,i,"errorCaptured hook")}}Ht(t,e,n)}finally{pt()}}function Vt(t,e,n,i,r){var o;try{(o=n?t.apply(e,n):t.call(e))&&!o._isVue&&p(o)&&!o._handled&&(o.catch((function(t){return Wt(t,i,r+" (Promise/async)")})),o._handled=!0)}catch(t){Wt(t,i,r)}return o}function Ht(t,e,n){if(z.errorHandler)try{return z.errorHandler.call(null,t,e,n)}catch(e){e!==t&&Ut(e)}Ut(t)}function Ut(t,e,n){if(!U&&!G||"undefined"==typeof console)throw t;console.error(t)}var Gt,Xt=!1,Yt=[],jt=!1;function $t(){jt=!1;var t=Yt.slice(0);Yt.length=0;for(var e=0;e<t.length;e++)t[e]()}if("undefined"!=typeof Promise&&rt(Promise)){var qt=Promise.resolve();Gt=function(){qt.then($t),K&&setTimeout(D)},Xt=!0}else if(j||"undefined"==typeof MutationObserver||!rt(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())Gt="undefined"!=typeof setImmediate&&rt(setImmediate)?function(){setImmediate($t)}:function(){setTimeout($t,0)};else{var Kt=1,Jt=new MutationObserver($t),Qt=document.createTextNode(String(Kt));Jt.observe(Qt,{characterData:!0}),Gt=function(){Kt=(Kt+1)%2,Qt.data=String(Kt)},Xt=!0}function te(t,e){var n;if(Yt.push((function(){if(t)try{t.call(e)}catch(t){Wt(t,e,"nextTick")}else n&&n(e)})),jt||(jt=!0,Gt()),!t&&"undefined"!=typeof Promise)return new Promise((function(t){n=t}))}var ee=new ot;function ne(t){ie(t,ee),ee.clear()}function ie(t,e){var n,i,r=Array.isArray(t);if(!(!r&&!l(t)||Object.isFrozen(t)||t instanceof dt)){if(t.__ob__){var o=t.__ob__.dep.id;if(e.has(o))return;e.add(o)}if(r)for(n=t.length;n--;)ie(t[n],e);else for(n=(i=Object.keys(t)).length;n--;)ie(t[i[n]],e)}}var re=x((function(t){var e="&"===t.charAt(0),n="~"===(t=e?t.slice(1):t).charAt(0),i="!"===(t=n?t.slice(1):t).charAt(0);return{name:t=i?t.slice(1):t,once:n,capture:i,passive:e}}));function oe(t,e){function n(){var t=arguments,i=n.fns;if(!Array.isArray(i))return Vt(i,null,arguments,e,"v-on handler");for(var r=i.slice(),o=0;o<r.length;o++)Vt(r[o],null,t,e,"v-on handler")}return n.fns=t,n}function ae(t,e,n,i,o,s){var l,u,c,h;for(l in t)u=t[l],c=e[l],h=re(l),r(u)||(r(c)?(r(u.fns)&&(u=t[l]=oe(u,s)),a(h.once)&&(u=t[l]=o(h.name,u,h.capture)),n(h.name,u,h.capture,h.passive,h.params)):u!==c&&(c.fns=u,t[l]=c));for(l in e)r(t[l])&&i((h=re(l)).name,e[l],h.capture)}function se(t,e,n){var i;t instanceof dt&&(t=t.data.hook||(t.data.hook={}));var s=t[e];function l(){n.apply(this,arguments),y(i.fns,l)}r(s)?i=oe([l]):o(s.fns)&&a(s.merged)?(i=s).fns.push(l):i=oe([s,l]),i.merged=!0,t[e]=i}function le(t,e,n,i,r){if(o(e)){if(_(e,n))return t[n]=e[n],r||delete e[n],!0;if(_(e,i))return t[n]=e[i],r||delete e[i],!0}return!1}function ue(t){return s(t)?[vt(t)]:Array.isArray(t)?he(t):void 0}function ce(t){return o(t)&&o(t.text)&&!1===t.isComment}function he(t,e){var n,i,l,u,c=[];for(n=0;n<t.length;n++)r(i=t[n])||"boolean"==typeof i||(u=c[l=c.length-1],Array.isArray(i)?i.length>0&&(ce((i=he(i,(e||"")+"_"+n))[0])&&ce(u)&&(c[l]=vt(u.text+i[0].text),i.shift()),c.push.apply(c,i)):s(i)?ce(u)?c[l]=vt(u.text+i):""!==i&&c.push(vt(i)):ce(i)&&ce(u)?c[l]=vt(u.text+i.text):(a(t._isVList)&&o(i.tag)&&r(i.key)&&o(e)&&(i.key="__vlist"+e+"_"+n+"__"),c.push(i)));return c}function pe(t,e){if(t){for(var n=Object.create(null),i=at?Reflect.ownKeys(t):Object.keys(t),r=0;r<i.length;r++){var o=i[r];if("__ob__"!==o){for(var a=t[o].from,s=e;s;){if(s._provided&&_(s._provided,a)){n[o]=s._provided[a];break}s=s.$parent}if(!s&&"default"in t[o]){var l=t[o].default;n[o]="function"==typeof l?l.call(e):l}}}return n}}function de(t,e){if(!t||!t.length)return{};for(var n={},i=0,r=t.length;i<r;i++){var o=t[i],a=o.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,o.context!==e&&o.fnContext!==e||!a||null==a.slot)(n.default||(n.default=[])).push(o);else{var s=a.slot,l=n[s]||(n[s]=[]);"template"===o.tag?l.push.apply(l,o.children||[]):l.push(o)}}for(var u in n)n[u].every(fe)&&delete n[u];return n}function fe(t){return t.isComment&&!t.asyncFactory||" "===t.text}function ge(t,e,n){var r,o=Object.keys(e).length>0,a=t?!!t.$stable:!o,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&n&&n!==i&&s===n.$key&&!o&&!n.$hasNormal)return n;for(var l in r={},t)t[l]&&"$"!==l[0]&&(r[l]=ve(e,l,t[l]))}else r={};for(var u in e)u in r||(r[u]=ye(e,u));return t&&Object.isExtensible(t)&&(t._normalized=r),F(r,"$stable",a),F(r,"$key",s),F(r,"$hasNormal",o),r}function ve(t,e,n){var i=function(){var t=arguments.length?n.apply(null,arguments):n({});return(t=t&&"object"==typeof t&&!Array.isArray(t)?[t]:ue(t))&&(0===t.length||1===t.length&&t[0].isComment)?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:i,enumerable:!0,configurable:!0}),i}function ye(t,e){return function(){return t[e]}}function me(t,e){var n,i,r,a,s;if(Array.isArray(t)||"string"==typeof t)for(n=new Array(t.length),i=0,r=t.length;i<r;i++)n[i]=e(t[i],i);else if("number"==typeof t)for(n=new Array(t),i=0;i<t;i++)n[i]=e(i+1,i);else if(l(t))if(at&&t[Symbol.iterator]){n=[];for(var u=t[Symbol.iterator](),c=u.next();!c.done;)n.push(e(c.value,n.length)),c=u.next()}else for(a=Object.keys(t),n=new Array(a.length),i=0,r=a.length;i<r;i++)s=a[i],n[i]=e(t[s],s,i);return o(n)||(n=[]),n._isVList=!0,n}function _e(t,e,n,i){var r,o=this.$scopedSlots[t];o?(n=n||{},i&&(n=A(A({},i),n)),r=o(n)||e):r=this.$slots[t]||e;var a=n&&n.slot;return a?this.$createElement("template",{slot:a},r):r}function xe(t){return Zt(this.$options,"filters",t)||O}function be(t,e){return Array.isArray(t)?-1===t.indexOf(e):t!==e}function we(t,e,n,i,r){var o=z.keyCodes[e]||n;return r&&i&&!z.keyCodes[e]?be(r,i):o?be(o,t):i?M(i)!==e:void 0}function Se(t,e,n,i,r){if(n&&l(n)){var o;Array.isArray(n)&&(n=I(n));var a=function(a){if("class"===a||"style"===a||v(a))o=t;else{var s=t.attrs&&t.attrs.type;o=i||z.mustUseProp(e,s,a)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}var l=w(a),u=M(a);l in o||u in o||(o[a]=n[a],r&&((t.on||(t.on={}))["update:"+a]=function(t){n[a]=t}))};for(var s in n)a(s)}return t}function Te(t,e){var n=this._staticTrees||(this._staticTrees=[]),i=n[t];return i&&!e||Ce(i=n[t]=this.$options.staticRenderFns[t].call(this._renderProxy,null,this),"__static__"+t,!1),i}function Me(t,e,n){return Ce(t,"__once__"+e+(n?"_"+n:""),!0),t}function Ce(t,e,n){if(Array.isArray(t))for(var i=0;i<t.length;i++)t[i]&&"string"!=typeof t[i]&&ke(t[i],e+"_"+i,n);else ke(t,e,n)}function ke(t,e,n){t.isStatic=!0,t.key=e,t.isOnce=n}function Ae(t,e){if(e&&c(e)){var n=t.on=t.on?A({},t.on):{};for(var i in e){var r=n[i],o=e[i];n[i]=r?[].concat(r,o):o}}return t}function Ie(t,e,n,i){e=e||{$stable:!n};for(var r=0;r<t.length;r++){var o=t[r];Array.isArray(o)?Ie(o,e,n):o&&(o.proxy&&(o.fn.proxy=!0),e[o.key]=o.fn)}return i&&(e.$key=i),e}function De(t,e){for(var n=0;n<e.length;n+=2){var i=e[n];"string"==typeof i&&i&&(t[e[n]]=e[n+1])}return t}function Pe(t,e){return"string"==typeof t?e+t:t}function Oe(t){t._o=Me,t._n=f,t._s=d,t._l=me,t._t=_e,t._q=L,t._i=R,t._m=Te,t._f=xe,t._k=we,t._b=Se,t._v=vt,t._e=gt,t._u=Ie,t._g=Ae,t._d=De,t._p=Pe}function Le(t,e,n,r,o){var s,l=this,u=o.options;_(r,"_uid")?(s=Object.create(r))._original=r:(s=r,r=r._original);var c=a(u._compiled),h=!c;this.data=t,this.props=e,this.children=n,this.parent=r,this.listeners=t.on||i,this.injections=pe(u.inject,r),this.slots=function(){return l.$slots||ge(t.scopedSlots,l.$slots=de(n,r)),l.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return ge(t.scopedSlots,this.slots())}}),c&&(this.$options=u,this.$slots=this.slots(),this.$scopedSlots=ge(t.scopedSlots,this.$slots)),u._scopeId?this._c=function(t,e,n,i){var o=Fe(s,t,e,n,i,h);return o&&!Array.isArray(o)&&(o.fnScopeId=u._scopeId,o.fnContext=r),o}:this._c=function(t,e,n,i){return Fe(s,t,e,n,i,h)}}function Re(t,e,n,i,r){var o=yt(t);return o.fnContext=n,o.fnOptions=i,e.slot&&((o.data||(o.data={})).slot=e.slot),o}function Ee(t,e){for(var n in e)t[w(n)]=e[n]}Oe(Le.prototype);var Ze={init:function(t,e){if(t.componentInstance&&!t.componentInstance._isDestroyed&&t.data.keepAlive){var n=t;Ze.prepatch(n,n)}else(t.componentInstance=function(t,e){var n={_isComponent:!0,_parentVnode:t,parent:e},i=t.data.inlineTemplate;return o(i)&&(n.render=i.render,n.staticRenderFns=i.staticRenderFns),new t.componentOptions.Ctor(n)}(t,Ke)).$mount(e?t.elm:void 0,e)},prepatch:function(t,e){var n=e.componentOptions;!function(t,e,n,r,o){var a=r.data.scopedSlots,s=t.$scopedSlots,l=!!(a&&!a.$stable||s!==i&&!s.$stable||a&&t.$scopedSlots.$key!==a.$key),u=!!(o||t.$options._renderChildren||l);if(t.$options._parentVnode=r,t.$vnode=r,t._vnode&&(t._vnode.parent=r),t.$options._renderChildren=o,t.$attrs=r.data.attrs||i,t.$listeners=n||i,e&&t.$options.props){wt(!1);for(var c=t._props,h=t.$options._propKeys||[],p=0;p<h.length;p++){var d=h[p],f=t.$options.props;c[d]=Nt(d,f,e,t)}wt(!0),t.$options.propsData=e}n=n||i;var g=t.$options._parentListeners;t.$options._parentListeners=n,qe(t,n,g),u&&(t.$slots=de(o,r.context),t.$forceUpdate())}(e.componentInstance=t.componentInstance,n.propsData,n.listeners,e,n.children)},insert:function(t){var e,n=t.context,i=t.componentInstance;i._isMounted||(i._isMounted=!0,nn(i,"mounted")),t.data.keepAlive&&(n._isMounted?((e=i)._inactive=!1,on.push(e)):tn(i,!0))},destroy:function(t){var e=t.componentInstance;e._isDestroyed||(t.data.keepAlive?en(e,!0):e.$destroy())}},Ne=Object.keys(Ze);function Be(t,e,n,s,u){if(!r(t)){var c=n.$options._base;if(l(t)&&(t=c.extend(t)),"function"==typeof t){var h;if(r(t.cid)&&void 0===(t=function(t,e){if(a(t.error)&&o(t.errorComp))return t.errorComp;if(o(t.resolved))return t.resolved;var n=He;if(n&&o(t.owners)&&-1===t.owners.indexOf(n)&&t.owners.push(n),a(t.loading)&&o(t.loadingComp))return t.loadingComp;if(n&&!o(t.owners)){var i=t.owners=[n],s=!0,u=null,c=null;n.$on("hook:destroyed",(function(){return y(i,n)}));var h=function(t){for(var e=0,n=i.length;e<n;e++)i[e].$forceUpdate();t&&(i.length=0,null!==u&&(clearTimeout(u),u=null),null!==c&&(clearTimeout(c),c=null))},d=E((function(n){t.resolved=Ue(n,e),s?i.length=0:h(!0)})),f=E((function(e){o(t.errorComp)&&(t.error=!0,h(!0))})),g=t(d,f);return l(g)&&(p(g)?r(t.resolved)&&g.then(d,f):p(g.component)&&(g.component.then(d,f),o(g.error)&&(t.errorComp=Ue(g.error,e)),o(g.loading)&&(t.loadingComp=Ue(g.loading,e),0===g.delay?t.loading=!0:u=setTimeout((function(){u=null,r(t.resolved)&&r(t.error)&&(t.loading=!0,h(!1))}),g.delay||200)),o(g.timeout)&&(c=setTimeout((function(){c=null,r(t.resolved)&&f(null)}),g.timeout)))),s=!1,t.loading?t.loadingComp:t.resolved}}(h=t,c)))return function(t,e,n,i,r){var o=gt();return o.asyncFactory=t,o.asyncMeta={data:e,context:n,children:i,tag:r},o}(h,e,n,s,u);e=e||{},Tn(t),o(e.model)&&function(t,e){var n=t.model&&t.model.prop||"value",i=t.model&&t.model.event||"input";(e.attrs||(e.attrs={}))[n]=e.model.value;var r=e.on||(e.on={}),a=r[i],s=e.model.callback;o(a)?(Array.isArray(a)?-1===a.indexOf(s):a!==s)&&(r[i]=[s].concat(a)):r[i]=s}(t.options,e);var d=function(t,e,n){var i=e.options.props;if(!r(i)){var a={},s=t.attrs,l=t.props;if(o(s)||o(l))for(var u in i){var c=M(u);le(a,l,u,c,!0)||le(a,s,u,c,!1)}return a}}(e,t);if(a(t.options.functional))return function(t,e,n,r,a){var s=t.options,l={},u=s.props;if(o(u))for(var c in u)l[c]=Nt(c,u,e||i);else o(n.attrs)&&Ee(l,n.attrs),o(n.props)&&Ee(l,n.props);var h=new Le(n,l,a,r,t),p=s.render.call(null,h._c,h);if(p instanceof dt)return Re(p,n,h.parent,s);if(Array.isArray(p)){for(var d=ue(p)||[],f=new Array(d.length),g=0;g<d.length;g++)f[g]=Re(d[g],n,h.parent,s);return f}}(t,d,e,n,s);var f=e.on;if(e.on=e.nativeOn,a(t.options.abstract)){var g=e.slot;e={},g&&(e.slot=g)}!function(t){for(var e=t.hook||(t.hook={}),n=0;n<Ne.length;n++){var i=Ne[n],r=e[i],o=Ze[i];r===o||r&&r._merged||(e[i]=r?ze(o,r):o)}}(e);var v=t.options.name||u;return new dt("vue-component-"+t.cid+(v?"-"+v:""),e,void 0,void 0,void 0,n,{Ctor:t,propsData:d,listeners:f,tag:u,children:s},h)}}}function ze(t,e){var n=function(n,i){t(n,i),e(n,i)};return n._merged=!0,n}function Fe(t,e,n,i,r,u){return(Array.isArray(n)||s(n))&&(r=i,i=n,n=void 0),a(u)&&(r=2),function(t,e,n,i,r){if(o(n)&&o(n.__ob__))return gt();if(o(n)&&o(n.is)&&(e=n.is),!e)return gt();var a,s,u;(Array.isArray(i)&&"function"==typeof i[0]&&((n=n||{}).scopedSlots={default:i[0]},i.length=0),2===r?i=ue(i):1===r&&(i=function(t){for(var e=0;e<t.length;e++)if(Array.isArray(t[e]))return Array.prototype.concat.apply([],t);return t}(i)),"string"==typeof e)?(s=t.$vnode&&t.$vnode.ns||z.getTagNamespace(e),a=z.isReservedTag(e)?new dt(z.parsePlatformTagName(e),n,i,void 0,void 0,t):n&&n.pre||!o(u=Zt(t.$options,"components",e))?new dt(e,n,i,void 0,void 0,t):Be(u,n,t,i,e)):a=Be(e,n,t,i);return Array.isArray(a)?a:o(a)?(o(s)&&We(a,s),o(n)&&function(t){l(t.style)&&ne(t.style),l(t.class)&&ne(t.class)}(n),a):gt()}(t,e,n,i,r)}function We(t,e,n){if(t.ns=e,"foreignObject"===t.tag&&(e=void 0,n=!0),o(t.children))for(var i=0,s=t.children.length;i<s;i++){var l=t.children[i];o(l.tag)&&(r(l.ns)||a(n)&&"svg"!==l.tag)&&We(l,e,n)}}var Ve,He=null;function Ue(t,e){return(t.__esModule||at&&"Module"===t[Symbol.toStringTag])&&(t=t.default),l(t)?e.extend(t):t}function Ge(t){return t.isComment&&t.asyncFactory}function Xe(t){if(Array.isArray(t))for(var e=0;e<t.length;e++){var n=t[e];if(o(n)&&(o(n.componentOptions)||Ge(n)))return n}}function Ye(t,e){Ve.$on(t,e)}function je(t,e){Ve.$off(t,e)}function $e(t,e){var n=Ve;return function i(){var r=e.apply(null,arguments);null!==r&&n.$off(t,i)}}function qe(t,e,n){Ve=t,ae(e,n||{},Ye,je,$e,t),Ve=void 0}var Ke=null;function Je(t){var e=Ke;return Ke=t,function(){Ke=e}}function Qe(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}function tn(t,e){if(e){if(t._directInactive=!1,Qe(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(var n=0;n<t.$children.length;n++)tn(t.$children[n]);nn(t,"activated")}}function en(t,e){if(!(e&&(t._directInactive=!0,Qe(t))||t._inactive)){t._inactive=!0;for(var n=0;n<t.$children.length;n++)en(t.$children[n]);nn(t,"deactivated")}}function nn(t,e){ht();var n=t.$options[e],i=e+" hook";if(n)for(var r=0,o=n.length;r<o;r++)Vt(n[r],t,null,t,i);t._hasHookEvent&&t.$emit("hook:"+e),pt()}var rn=[],on=[],an={},sn=!1,ln=!1,un=0,cn=0,hn=Date.now;if(U&&!j){var pn=window.performance;pn&&"function"==typeof pn.now&&hn()>document.createEvent("Event").timeStamp&&(hn=function(){return pn.now()})}function dn(){var t,e;for(cn=hn(),ln=!0,rn.sort((function(t,e){return t.id-e.id})),un=0;un<rn.length;un++)(t=rn[un]).before&&t.before(),e=t.id,an[e]=null,t.run();var n=on.slice(),i=rn.slice();un=rn.length=on.length=0,an={},sn=ln=!1,function(t){for(var e=0;e<t.length;e++)t[e]._inactive=!0,tn(t[e],!0)}(n),function(t){for(var e=t.length;e--;){var n=t[e],i=n.vm;i._watcher===n&&i._isMounted&&!i._isDestroyed&&nn(i,"updated")}}(i),it&&z.devtools&&it.emit("flush")}var fn=0,gn=function(t,e,n,i,r){this.vm=t,r&&(t._watcher=this),t._watchers.push(this),i?(this.deep=!!i.deep,this.user=!!i.user,this.lazy=!!i.lazy,this.sync=!!i.sync,this.before=i.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++fn,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ot,this.newDepIds=new ot,this.expression="","function"==typeof e?this.getter=e:(this.getter=function(t){if(!V.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}(e),this.getter||(this.getter=D)),this.value=this.lazy?void 0:this.get()};gn.prototype.get=function(){var t;ht(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(t){if(!this.user)throw t;Wt(t,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&ne(t),pt(),this.cleanupDeps()}return t},gn.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},gn.prototype.cleanupDeps=function(){for(var t=this.deps.length;t--;){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},gn.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(t){var e=t.id;if(null==an[e]){if(an[e]=!0,ln){for(var n=rn.length-1;n>un&&rn[n].id>t.id;)n--;rn.splice(n+1,0,t)}else rn.push(t);sn||(sn=!0,te(dn))}}(this)},gn.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||l(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){Wt(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},gn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},gn.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},gn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||y(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var vn={enumerable:!0,configurable:!0,get:D,set:D};function yn(t,e,n){vn.get=function(){return this[e][n]},vn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,vn)}var mn={lazy:!0};function _n(t,e,n){var i=!nt();"function"==typeof n?(vn.get=i?xn(e):bn(n),vn.set=D):(vn.get=n.get?i&&!1!==n.cache?xn(e):bn(n.get):D,vn.set=n.set||D),Object.defineProperty(t,e,vn)}function xn(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),ut.target&&e.depend(),e.value}}function bn(t){return function(){return t.call(this,this)}}function wn(t,e,n,i){return c(n)&&(i=n,n=n.handler),"string"==typeof n&&(n=t[n]),t.$watch(e,n,i)}var Sn=0;function Tn(t){var e=t.options;if(t.super){var n=Tn(t.super);if(n!==t.superOptions){t.superOptions=n;var i=function(t){var e,n=t.options,i=t.sealedOptions;for(var r in n)n[r]!==i[r]&&(e||(e={}),e[r]=n[r]);return e}(t);i&&A(t.extendOptions,i),(e=t.options=Et(n,t.extendOptions)).name&&(e.components[e.name]=t)}}return e}function Mn(t){this._init(t)}function Cn(t){return t&&(t.Ctor.options.name||t.tag)}function kn(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:(n=t,!("[object RegExp]"!==u.call(n))&&t.test(e));var n}function An(t,e){var n=t.cache,i=t.keys,r=t._vnode;for(var o in n){var a=n[o];if(a){var s=Cn(a.componentOptions);s&&!e(s)&&In(n,o,i,r)}}}function In(t,e,n,i){var r=t[e];!r||i&&r.tag===i.tag||r.componentInstance.$destroy(),t[e]=null,y(n,e)}!function(t){t.prototype._init=function(t){var e=this;e._uid=Sn++,e._isVue=!0,t&&t._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),i=e._parentVnode;n.parent=e.parent,n._parentVnode=i;var r=i.componentOptions;n.propsData=r.propsData,n._parentListeners=r.listeners,n._renderChildren=r.children,n._componentTag=r.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=Et(Tn(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&qe(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,n=t.$vnode=e._parentVnode,r=n&&n.context;t.$slots=de(e._renderChildren,r),t.$scopedSlots=i,t._c=function(e,n,i,r){return Fe(t,e,n,i,r,!1)},t.$createElement=function(e,n,i,r){return Fe(t,e,n,i,r,!0)};var o=n&&n.data;Mt(t,"$attrs",o&&o.attrs||i,null,!0),Mt(t,"$listeners",e._parentListeners||i,null,!0)}(e),nn(e,"beforeCreate"),function(t){var e=pe(t.$options.inject,t);e&&(wt(!1),Object.keys(e).forEach((function(n){Mt(t,n,e[n])})),wt(!0))}(e),function(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){var n=t.$options.propsData||{},i=t._props={},r=t.$options._propKeys=[];t.$parent&&wt(!1);var o=function(o){r.push(o);var a=Nt(o,e,n,t);Mt(i,o,a),o in t||yn(t,"_props",o)};for(var a in e)o(a);wt(!0)}(t,e.props),e.methods&&function(t,e){for(var n in t.$options.props,e)t[n]="function"!=typeof e[n]?D:C(e[n],t)}(t,e.methods),e.data?function(t){var e=t.$options.data;c(e=t._data="function"==typeof e?function(t,e){ht();try{return t.call(e,e)}catch(t){return Wt(t,e,"data()"),{}}finally{pt()}}(e,t):e||{})||(e={});for(var n,i=Object.keys(e),r=t.$options.props,o=(t.$options.methods,i.length);o--;){var a=i[o];r&&_(r,a)||(n=void 0,36===(n=(a+"").charCodeAt(0))||95===n)||yn(t,"_data",a)}Tt(e,!0)}(t):Tt(t._data={},!0),e.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),i=nt();for(var r in e){var o=e[r],a="function"==typeof o?o:o.get;i||(n[r]=new gn(t,a||D,D,mn)),r in t||_n(t,r,o)}}(t,e.computed),e.watch&&e.watch!==Q&&function(t,e){for(var n in e){var i=e[n];if(Array.isArray(i))for(var r=0;r<i.length;r++)wn(t,n,i[r]);else wn(t,n,i)}}(t,e.watch)}(e),function(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}(e),nn(e,"created"),e.$options.el&&e.$mount(e.$options.el)}}(Mn),function(t){Object.defineProperty(t.prototype,"$data",{get:function(){return this._data}}),Object.defineProperty(t.prototype,"$props",{get:function(){return this._props}}),t.prototype.$set=Ct,t.prototype.$delete=kt,t.prototype.$watch=function(t,e,n){var i=this;if(c(e))return wn(i,t,e,n);(n=n||{}).user=!0;var r=new gn(i,t,e,n);if(n.immediate)try{e.call(i,r.value)}catch(t){Wt(t,i,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}(Mn),function(t){var e=/^hook:/;t.prototype.$on=function(t,n){var i=this;if(Array.isArray(t))for(var r=0,o=t.length;r<o;r++)i.$on(t[r],n);else(i._events[t]||(i._events[t]=[])).push(n),e.test(t)&&(i._hasHookEvent=!0);return i},t.prototype.$once=function(t,e){var n=this;function i(){n.$off(t,i),e.apply(n,arguments)}return i.fn=e,n.$on(t,i),n},t.prototype.$off=function(t,e){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(t)){for(var i=0,r=t.length;i<r;i++)n.$off(t[i],e);return n}var o,a=n._events[t];if(!a)return n;if(!e)return n._events[t]=null,n;for(var s=a.length;s--;)if((o=a[s])===e||o.fn===e){a.splice(s,1);break}return n},t.prototype.$emit=function(t){var e=this,n=e._events[t];if(n){n=n.length>1?k(n):n;for(var i=k(arguments,1),r='event handler for "'+t+'"',o=0,a=n.length;o<a;o++)Vt(n[o],e,i,e,r)}return e}}(Mn),function(t){t.prototype._update=function(t,e){var n=this,i=n.$el,r=n._vnode,o=Je(n);n._vnode=t,n.$el=r?n.__patch__(r,t):n.__patch__(n.$el,t,e,!1),o(),i&&(i.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},t.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},t.prototype.$destroy=function(){var t=this;if(!t._isBeingDestroyed){nn(t,"beforeDestroy"),t._isBeingDestroyed=!0;var e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||y(e.$children,t),t._watcher&&t._watcher.teardown();for(var n=t._watchers.length;n--;)t._watchers[n].teardown();t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),nn(t,"destroyed"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}}(Mn),function(t){Oe(t.prototype),t.prototype.$nextTick=function(t){return te(t,this)},t.prototype._render=function(){var t,e=this,n=e.$options,i=n.render,r=n._parentVnode;r&&(e.$scopedSlots=ge(r.data.scopedSlots,e.$slots,e.$scopedSlots)),e.$vnode=r;try{He=e,t=i.call(e._renderProxy,e.$createElement)}catch(n){Wt(n,e,"render"),t=e._vnode}finally{He=null}return Array.isArray(t)&&1===t.length&&(t=t[0]),t instanceof dt||(t=gt()),t.parent=r,t}}(Mn);var Dn=[String,RegExp,Array],Pn={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:Dn,exclude:Dn,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)In(this.cache,t,this.keys)},mounted:function(){var t=this;this.$watch("include",(function(e){An(t,(function(t){return kn(e,t)}))})),this.$watch("exclude",(function(e){An(t,(function(t){return!kn(e,t)}))}))},render:function(){var t=this.$slots.default,e=Xe(t),n=e&&e.componentOptions;if(n){var i=Cn(n),r=this.include,o=this.exclude;if(r&&(!i||!kn(r,i))||o&&i&&kn(o,i))return e;var a=this.cache,s=this.keys,l=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;a[l]?(e.componentInstance=a[l].componentInstance,y(s,l),s.push(l)):(a[l]=e,s.push(l),this.max&&s.length>parseInt(this.max)&&In(a,s[0],s,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return z}};Object.defineProperty(t,"config",e),t.util={warn:st,extend:A,mergeOptions:Et,defineReactive:Mt},t.set=Ct,t.delete=kt,t.nextTick=te,t.observable=function(t){return Tt(t),t},t.options=Object.create(null),N.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,A(t.options.components,Pn),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=k(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Et(this.options,t),this}}(t),function(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,i=n.cid,r=t._Ctor||(t._Ctor={});if(r[i])return r[i];var o=t.name||n.options.name,a=function(t){this._init(t)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=e++,a.options=Et(n.options,t),a.super=n,a.options.props&&function(t){var e=t.options.props;for(var n in e)yn(t.prototype,"_props",n)}(a),a.options.computed&&function(t){var e=t.options.computed;for(var n in e)_n(t.prototype,n,e[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,N.forEach((function(t){a[t]=n[t]})),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=A({},a.options),r[i]=a,a}}(t),function(t){N.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&c(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(Mn),Object.defineProperty(Mn.prototype,"$isServer",{get:nt}),Object.defineProperty(Mn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Mn,"FunctionalRenderContext",{value:Le}),Mn.version="2.6.12";var On=g("style,class"),Ln=g("input,textarea,option,select,progress"),Rn=g("contenteditable,draggable,spellcheck"),En=g("events,caret,typing,plaintext-only"),Zn=g("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Nn="http://www.w3.org/1999/xlink",Bn=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},zn=function(t){return Bn(t)?t.slice(6,t.length):""},Fn=function(t){return null==t||!1===t};function Wn(t,e){return{staticClass:Vn(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function Vn(t,e){return t?e?t+" "+e:t:e||""}function Hn(t){return Array.isArray(t)?function(t){for(var e,n="",i=0,r=t.length;i<r;i++)o(e=Hn(t[i]))&&""!==e&&(n&&(n+=" "),n+=e);return n}(t):l(t)?function(t){var e="";for(var n in t)t[n]&&(e&&(e+=" "),e+=n);return e}(t):"string"==typeof t?t:""}var Un={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Gn=g("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Xn=g("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Yn=function(t){return Gn(t)||Xn(t)},jn=Object.create(null),$n=g("text,number,password,search,email,tel,url"),qn=Object.freeze({createElement:function(t,e){var n=document.createElement(t);return"select"!==t||e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(t,e){return document.createElementNS(Un[t],e)},createTextNode:function(t){return document.createTextNode(t)},createComment:function(t){return document.createComment(t)},insertBefore:function(t,e,n){t.insertBefore(e,n)},removeChild:function(t,e){t.removeChild(e)},appendChild:function(t,e){t.appendChild(e)},parentNode:function(t){return t.parentNode},nextSibling:function(t){return t.nextSibling},tagName:function(t){return t.tagName},setTextContent:function(t,e){t.textContent=e},setStyleScope:function(t,e){t.setAttribute(e,"")}}),Kn={create:function(t,e){Jn(e)},update:function(t,e){t.data.ref!==e.data.ref&&(Jn(t,!0),Jn(e))},destroy:function(t){Jn(t,!0)}};function Jn(t,e){var n=t.data.ref;if(o(n)){var i=t.context,r=t.componentInstance||t.elm,a=i.$refs;e?Array.isArray(a[n])?y(a[n],r):a[n]===r&&(a[n]=void 0):t.data.refInFor?Array.isArray(a[n])?a[n].indexOf(r)<0&&a[n].push(r):a[n]=[r]:a[n]=r}}var Qn=new dt("",{},[]),ti=["create","activate","update","remove","destroy"];function ei(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&o(t.data)===o(e.data)&&function(t,e){if("input"!==t.tag)return!0;var n,i=o(n=t.data)&&o(n=n.attrs)&&n.type,r=o(n=e.data)&&o(n=n.attrs)&&n.type;return i===r||$n(i)&&$n(r)}(t,e)||a(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&r(e.asyncFactory.error))}function ni(t,e,n){var i,r,a={};for(i=e;i<=n;++i)o(r=t[i].key)&&(a[r]=i);return a}var ii={create:ri,update:ri,destroy:function(t){ri(t,Qn)}};function ri(t,e){(t.data.directives||e.data.directives)&&function(t,e){var n,i,r,o=t===Qn,a=e===Qn,s=ai(t.data.directives,t.context),l=ai(e.data.directives,e.context),u=[],c=[];for(n in l)i=s[n],r=l[n],i?(r.oldValue=i.value,r.oldArg=i.arg,li(r,"update",e,t),r.def&&r.def.componentUpdated&&c.push(r)):(li(r,"bind",e,t),r.def&&r.def.inserted&&u.push(r));if(u.length){var h=function(){for(var n=0;n<u.length;n++)li(u[n],"inserted",e,t)};o?se(e,"insert",h):h()}if(c.length&&se(e,"postpatch",(function(){for(var n=0;n<c.length;n++)li(c[n],"componentUpdated",e,t)})),!o)for(n in s)l[n]||li(s[n],"unbind",t,t,a)}(t,e)}var oi=Object.create(null);function ai(t,e){var n,i,r=Object.create(null);if(!t)return r;for(n=0;n<t.length;n++)(i=t[n]).modifiers||(i.modifiers=oi),r[si(i)]=i,i.def=Zt(e.$options,"directives",i.name);return r}function si(t){return t.rawName||t.name+"."+Object.keys(t.modifiers||{}).join(".")}function li(t,e,n,i,r){var o=t.def&&t.def[e];if(o)try{o(n.elm,t,n,i,r)}catch(i){Wt(i,n.context,"directive "+t.name+" "+e+" hook")}}var ui=[Kn,ii];function ci(t,e){var n=e.componentOptions;if(!(o(n)&&!1===n.Ctor.options.inheritAttrs||r(t.data.attrs)&&r(e.data.attrs))){var i,a,s=e.elm,l=t.data.attrs||{},u=e.data.attrs||{};for(i in o(u.__ob__)&&(u=e.data.attrs=A({},u)),u)a=u[i],l[i]!==a&&hi(s,i,a);for(i in(j||q)&&u.value!==l.value&&hi(s,"value",u.value),l)r(u[i])&&(Bn(i)?s.removeAttributeNS(Nn,zn(i)):Rn(i)||s.removeAttribute(i))}}function hi(t,e,n){t.tagName.indexOf("-")>-1?pi(t,e,n):Zn(e)?Fn(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Rn(e)?t.setAttribute(e,function(t,e){return Fn(e)||"false"===e?"false":"contenteditable"===t&&En(e)?e:"true"}(e,n)):Bn(e)?Fn(n)?t.removeAttributeNS(Nn,zn(e)):t.setAttributeNS(Nn,e,n):pi(t,e,n)}function pi(t,e,n){if(Fn(n))t.removeAttribute(e);else{if(j&&!$&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var i=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",i)};t.addEventListener("input",i),t.__ieph=!0}t.setAttribute(e,n)}}var di={create:ci,update:ci};function fi(t,e){var n=e.elm,i=e.data,a=t.data;if(!(r(i.staticClass)&&r(i.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var s=function(t){for(var e=t.data,n=t,i=t;o(i.componentInstance);)(i=i.componentInstance._vnode)&&i.data&&(e=Wn(i.data,e));for(;o(n=n.parent);)n&&n.data&&(e=Wn(e,n.data));return r=e.staticClass,a=e.class,o(r)||o(a)?Vn(r,Hn(a)):"";var r,a}(e),l=n._transitionClasses;o(l)&&(s=Vn(s,Hn(l))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var gi,vi={create:fi,update:fi};function yi(t,e,n){var i=gi;return function r(){var o=e.apply(null,arguments);null!==o&&xi(t,r,n,i)}}var mi=Xt&&!(J&&Number(J[1])<=53);function _i(t,e,n,i){if(mi){var r=cn,o=e;e=o._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=r||t.timeStamp<=0||t.target.ownerDocument!==document)return o.apply(this,arguments)}}gi.addEventListener(t,e,tt?{capture:n,passive:i}:n)}function xi(t,e,n,i){(i||gi).removeEventListener(t,e._wrapper||e,n)}function bi(t,e){if(!r(t.data.on)||!r(e.data.on)){var n=e.data.on||{},i=t.data.on||{};gi=e.elm,function(t){if(o(t.__r)){var e=j?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}o(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(n),ae(n,i,_i,xi,yi,e.context),gi=void 0}}var wi,Si={create:bi,update:bi};function Ti(t,e){if(!r(t.data.domProps)||!r(e.data.domProps)){var n,i,a=e.elm,s=t.data.domProps||{},l=e.data.domProps||{};for(n in o(l.__ob__)&&(l=e.data.domProps=A({},l)),s)n in l||(a[n]="");for(n in l){if(i=l[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),i===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=i;var u=r(i)?"":String(i);Mi(a,u)&&(a.value=u)}else if("innerHTML"===n&&Xn(a.tagName)&&r(a.innerHTML)){(wi=wi||document.createElement("div")).innerHTML="<svg>"+i+"</svg>";for(var c=wi.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;c.firstChild;)a.appendChild(c.firstChild)}else if(i!==s[n])try{a[n]=i}catch(t){}}}}function Mi(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,i=t._vModifiers;if(o(i)){if(i.number)return f(n)!==f(e);if(i.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var Ci={create:Ti,update:Ti},ki=x((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var i=t.split(n);i.length>1&&(e[i[0].trim()]=i[1].trim())}})),e}));function Ai(t){var e=Ii(t.style);return t.staticStyle?A(t.staticStyle,e):e}function Ii(t){return Array.isArray(t)?I(t):"string"==typeof t?ki(t):t}var Di,Pi=/^--/,Oi=/\s*!important$/,Li=function(t,e,n){if(Pi.test(e))t.style.setProperty(e,n);else if(Oi.test(n))t.style.setProperty(M(e),n.replace(Oi,""),"important");else{var i=Ei(e);if(Array.isArray(n))for(var r=0,o=n.length;r<o;r++)t.style[i]=n[r];else t.style[i]=n}},Ri=["Webkit","Moz","ms"],Ei=x((function(t){if(Di=Di||document.createElement("div").style,"filter"!==(t=w(t))&&t in Di)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<Ri.length;n++){var i=Ri[n]+e;if(i in Di)return i}}));function Zi(t,e){var n=e.data,i=t.data;if(!(r(n.staticStyle)&&r(n.style)&&r(i.staticStyle)&&r(i.style))){var a,s,l=e.elm,u=i.staticStyle,c=i.normalizedStyle||i.style||{},h=u||c,p=Ii(e.data.style)||{};e.data.normalizedStyle=o(p.__ob__)?A({},p):p;var d=function(t,e){for(var n,i={},r=t;r.componentInstance;)(r=r.componentInstance._vnode)&&r.data&&(n=Ai(r.data))&&A(i,n);(n=Ai(t.data))&&A(i,n);for(var o=t;o=o.parent;)o.data&&(n=Ai(o.data))&&A(i,n);return i}(e);for(s in h)r(d[s])&&Li(l,s,"");for(s in d)(a=d[s])!==h[s]&&Li(l,s,null==a?"":a)}}var Ni={create:Zi,update:Zi},Bi=/\s+/;function zi(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(Bi).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function Fi(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(Bi).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",i=" "+e+" ";n.indexOf(i)>=0;)n=n.replace(i," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function Wi(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&A(e,Vi(t.name||"v")),A(e,t),e}return"string"==typeof t?Vi(t):void 0}}var Vi=x((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),Hi=U&&!$,Ui="transition",Gi="animation",Xi="transition",Yi="transitionend",ji="animation",$i="animationend";Hi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Xi="WebkitTransition",Yi="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(ji="WebkitAnimation",$i="webkitAnimationEnd"));var qi=U?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Ki(t){qi((function(){qi(t)}))}function Ji(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),zi(t,e))}function Qi(t,e){t._transitionClasses&&y(t._transitionClasses,e),Fi(t,e)}function tr(t,e,n){var i=nr(t,e),r=i.type,o=i.timeout,a=i.propCount;if(!r)return n();var s=r===Ui?Yi:$i,l=0,u=function(){t.removeEventListener(s,c),n()},c=function(e){e.target===t&&++l>=a&&u()};setTimeout((function(){l<a&&u()}),o+1),t.addEventListener(s,c)}var er=/\b(transform|all)(,|$)/;function nr(t,e){var n,i=window.getComputedStyle(t),r=(i[Xi+"Delay"]||"").split(", "),o=(i[Xi+"Duration"]||"").split(", "),a=ir(r,o),s=(i[ji+"Delay"]||"").split(", "),l=(i[ji+"Duration"]||"").split(", "),u=ir(s,l),c=0,h=0;return e===Ui?a>0&&(n=Ui,c=a,h=o.length):e===Gi?u>0&&(n=Gi,c=u,h=l.length):h=(n=(c=Math.max(a,u))>0?a>u?Ui:Gi:null)?n===Ui?o.length:l.length:0,{type:n,timeout:c,propCount:h,hasTransform:n===Ui&&er.test(i[Xi+"Property"])}}function ir(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.apply(null,e.map((function(e,n){return rr(e)+rr(t[n])})))}function rr(t){return 1e3*Number(t.slice(0,-1).replace(",","."))}function or(t,e){var n=t.elm;o(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var i=Wi(t.data.transition);if(!r(i)&&!o(n._enterCb)&&1===n.nodeType){for(var a=i.css,s=i.type,u=i.enterClass,c=i.enterToClass,h=i.enterActiveClass,p=i.appearClass,d=i.appearToClass,g=i.appearActiveClass,v=i.beforeEnter,y=i.enter,m=i.afterEnter,_=i.enterCancelled,x=i.beforeAppear,b=i.appear,w=i.afterAppear,S=i.appearCancelled,T=i.duration,M=Ke,C=Ke.$vnode;C&&C.parent;)M=C.context,C=C.parent;var k=!M._isMounted||!t.isRootInsert;if(!k||b||""===b){var A=k&&p?p:u,I=k&&g?g:h,D=k&&d?d:c,P=k&&x||v,O=k&&"function"==typeof b?b:y,L=k&&w||m,R=k&&S||_,Z=f(l(T)?T.enter:T),N=!1!==a&&!$,B=lr(O),z=n._enterCb=E((function(){N&&(Qi(n,D),Qi(n,I)),z.cancelled?(N&&Qi(n,A),R&&R(n)):L&&L(n),n._enterCb=null}));t.data.show||se(t,"insert",(function(){var e=n.parentNode,i=e&&e._pending&&e._pending[t.key];i&&i.tag===t.tag&&i.elm._leaveCb&&i.elm._leaveCb(),O&&O(n,z)})),P&&P(n),N&&(Ji(n,A),Ji(n,I),Ki((function(){Qi(n,A),z.cancelled||(Ji(n,D),B||(sr(Z)?setTimeout(z,Z):tr(n,s,z)))}))),t.data.show&&(e&&e(),O&&O(n,z)),N||B||z()}}}function ar(t,e){var n=t.elm;o(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var i=Wi(t.data.transition);if(r(i)||1!==n.nodeType)return e();if(!o(n._leaveCb)){var a=i.css,s=i.type,u=i.leaveClass,c=i.leaveToClass,h=i.leaveActiveClass,p=i.beforeLeave,d=i.leave,g=i.afterLeave,v=i.leaveCancelled,y=i.delayLeave,m=i.duration,_=!1!==a&&!$,x=lr(d),b=f(l(m)?m.leave:m),w=n._leaveCb=E((function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[t.key]=null),_&&(Qi(n,c),Qi(n,h)),w.cancelled?(_&&Qi(n,u),v&&v(n)):(e(),g&&g(n)),n._leaveCb=null}));y?y(S):S()}function S(){w.cancelled||(!t.data.show&&n.parentNode&&((n.parentNode._pending||(n.parentNode._pending={}))[t.key]=t),p&&p(n),_&&(Ji(n,u),Ji(n,h),Ki((function(){Qi(n,u),w.cancelled||(Ji(n,c),x||(sr(b)?setTimeout(w,b):tr(n,s,w)))}))),d&&d(n,w),_||x||w())}}function sr(t){return"number"==typeof t&&!isNaN(t)}function lr(t){if(r(t))return!1;var e=t.fns;return o(e)?lr(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function ur(t,e){!0!==e.data.show&&or(e)}var cr=function(t){var e,n,i={},l=t.modules,u=t.nodeOps;for(e=0;e<ti.length;++e)for(i[ti[e]]=[],n=0;n<l.length;++n)o(l[n][ti[e]])&&i[ti[e]].push(l[n][ti[e]]);function c(t){var e=u.parentNode(t);o(e)&&u.removeChild(e,t)}function h(t,e,n,r,s,l,c){if(o(t.elm)&&o(l)&&(t=l[c]=yt(t)),t.isRootInsert=!s,!function(t,e,n,r){var s=t.data;if(o(s)){var l=o(t.componentInstance)&&s.keepAlive;if(o(s=s.hook)&&o(s=s.init)&&s(t,!1),o(t.componentInstance))return p(t,e),d(n,t.elm,r),a(l)&&function(t,e,n,r){for(var a,s=t;s.componentInstance;)if(o(a=(s=s.componentInstance._vnode).data)&&o(a=a.transition)){for(a=0;a<i.activate.length;++a)i.activate[a](Qn,s);e.push(s);break}d(n,t.elm,r)}(t,e,n,r),!0}}(t,e,n,r)){var h=t.data,g=t.children,v=t.tag;o(v)?(t.elm=t.ns?u.createElementNS(t.ns,v):u.createElement(v,t),m(t),f(t,g,e),o(h)&&y(t,e),d(n,t.elm,r)):a(t.isComment)?(t.elm=u.createComment(t.text),d(n,t.elm,r)):(t.elm=u.createTextNode(t.text),d(n,t.elm,r))}}function p(t,e){o(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,v(t)?(y(t,e),m(t)):(Jn(t),e.push(t))}function d(t,e,n){o(t)&&(o(n)?u.parentNode(n)===t&&u.insertBefore(t,e,n):u.appendChild(t,e))}function f(t,e,n){if(Array.isArray(e))for(var i=0;i<e.length;++i)h(e[i],n,t.elm,null,!0,e,i);else s(t.text)&&u.appendChild(t.elm,u.createTextNode(String(t.text)))}function v(t){for(;t.componentInstance;)t=t.componentInstance._vnode;return o(t.tag)}function y(t,n){for(var r=0;r<i.create.length;++r)i.create[r](Qn,t);o(e=t.data.hook)&&(o(e.create)&&e.create(Qn,t),o(e.insert)&&n.push(t))}function m(t){var e;if(o(e=t.fnScopeId))u.setStyleScope(t.elm,e);else for(var n=t;n;)o(e=n.context)&&o(e=e.$options._scopeId)&&u.setStyleScope(t.elm,e),n=n.parent;o(e=Ke)&&e!==t.context&&e!==t.fnContext&&o(e=e.$options._scopeId)&&u.setStyleScope(t.elm,e)}function _(t,e,n,i,r,o){for(;i<=r;++i)h(n[i],o,t,e,!1,n,i)}function x(t){var e,n,r=t.data;if(o(r))for(o(e=r.hook)&&o(e=e.destroy)&&e(t),e=0;e<i.destroy.length;++e)i.destroy[e](t);if(o(e=t.children))for(n=0;n<t.children.length;++n)x(t.children[n])}function b(t,e,n){for(;e<=n;++e){var i=t[e];o(i)&&(o(i.tag)?(w(i),x(i)):c(i.elm))}}function w(t,e){if(o(e)||o(t.data)){var n,r=i.remove.length+1;for(o(e)?e.listeners+=r:e=function(t,e){function n(){0==--n.listeners&&c(t)}return n.listeners=e,n}(t.elm,r),o(n=t.componentInstance)&&o(n=n._vnode)&&o(n.data)&&w(n,e),n=0;n<i.remove.length;++n)i.remove[n](t,e);o(n=t.data.hook)&&o(n=n.remove)?n(t,e):e()}else c(t.elm)}function S(t,e,n,i){for(var r=n;r<i;r++){var a=e[r];if(o(a)&&ei(t,a))return r}}function T(t,e,n,s,l,c){if(t!==e){o(e.elm)&&o(s)&&(e=s[l]=yt(e));var p=e.elm=t.elm;if(a(t.isAsyncPlaceholder))o(e.asyncFactory.resolved)?k(t.elm,e,n):e.isAsyncPlaceholder=!0;else if(a(e.isStatic)&&a(t.isStatic)&&e.key===t.key&&(a(e.isCloned)||a(e.isOnce)))e.componentInstance=t.componentInstance;else{var d,f=e.data;o(f)&&o(d=f.hook)&&o(d=d.prepatch)&&d(t,e);var g=t.children,y=e.children;if(o(f)&&v(e)){for(d=0;d<i.update.length;++d)i.update[d](t,e);o(d=f.hook)&&o(d=d.update)&&d(t,e)}r(e.text)?o(g)&&o(y)?g!==y&&function(t,e,n,i,a){for(var s,l,c,p=0,d=0,f=e.length-1,g=e[0],v=e[f],y=n.length-1,m=n[0],x=n[y],w=!a;p<=f&&d<=y;)r(g)?g=e[++p]:r(v)?v=e[--f]:ei(g,m)?(T(g,m,i,n,d),g=e[++p],m=n[++d]):ei(v,x)?(T(v,x,i,n,y),v=e[--f],x=n[--y]):ei(g,x)?(T(g,x,i,n,y),w&&u.insertBefore(t,g.elm,u.nextSibling(v.elm)),g=e[++p],x=n[--y]):ei(v,m)?(T(v,m,i,n,d),w&&u.insertBefore(t,v.elm,g.elm),v=e[--f],m=n[++d]):(r(s)&&(s=ni(e,p,f)),r(l=o(m.key)?s[m.key]:S(m,e,p,f))?h(m,i,t,g.elm,!1,n,d):ei(c=e[l],m)?(T(c,m,i,n,d),e[l]=void 0,w&&u.insertBefore(t,c.elm,g.elm)):h(m,i,t,g.elm,!1,n,d),m=n[++d]);p>f?_(t,r(n[y+1])?null:n[y+1].elm,n,d,y,i):d>y&&b(e,p,f)}(p,g,y,n,c):o(y)?(o(t.text)&&u.setTextContent(p,""),_(p,null,y,0,y.length-1,n)):o(g)?b(g,0,g.length-1):o(t.text)&&u.setTextContent(p,""):t.text!==e.text&&u.setTextContent(p,e.text),o(f)&&o(d=f.hook)&&o(d=d.postpatch)&&d(t,e)}}}function M(t,e,n){if(a(n)&&o(t.parent))t.parent.data.pendingInsert=e;else for(var i=0;i<e.length;++i)e[i].data.hook.insert(e[i])}var C=g("attrs,class,staticClass,staticStyle,key");function k(t,e,n,i){var r,s=e.tag,l=e.data,u=e.children;if(i=i||l&&l.pre,e.elm=t,a(e.isComment)&&o(e.asyncFactory))return e.isAsyncPlaceholder=!0,!0;if(o(l)&&(o(r=l.hook)&&o(r=r.init)&&r(e,!0),o(r=e.componentInstance)))return p(e,n),!0;if(o(s)){if(o(u))if(t.hasChildNodes())if(o(r=l)&&o(r=r.domProps)&&o(r=r.innerHTML)){if(r!==t.innerHTML)return!1}else{for(var c=!0,h=t.firstChild,d=0;d<u.length;d++){if(!h||!k(h,u[d],n,i)){c=!1;break}h=h.nextSibling}if(!c||h)return!1}else f(e,u,n);if(o(l)){var g=!1;for(var v in l)if(!C(v)){g=!0,y(e,n);break}!g&&l.class&&ne(l.class)}}else t.data!==e.text&&(t.data=e.text);return!0}return function(t,e,n,s){if(!r(e)){var l,c=!1,p=[];if(r(t))c=!0,h(e,p);else{var d=o(t.nodeType);if(!d&&ei(t,e))T(t,e,p,null,null,s);else{if(d){if(1===t.nodeType&&t.hasAttribute(Z)&&(t.removeAttribute(Z),n=!0),a(n)&&k(t,e,p))return M(e,p,!0),t;l=t,t=new dt(u.tagName(l).toLowerCase(),{},[],void 0,l)}var f=t.elm,g=u.parentNode(f);if(h(e,p,f._leaveCb?null:g,u.nextSibling(f)),o(e.parent))for(var y=e.parent,m=v(e);y;){for(var _=0;_<i.destroy.length;++_)i.destroy[_](y);if(y.elm=e.elm,m){for(var w=0;w<i.create.length;++w)i.create[w](Qn,y);var S=y.data.hook.insert;if(S.merged)for(var C=1;C<S.fns.length;C++)S.fns[C]()}else Jn(y);y=y.parent}o(g)?b([t],0,0):o(t.tag)&&x(t)}}return M(e,p,c),e.elm}o(t)&&x(t)}}({nodeOps:qn,modules:[di,vi,Si,Ci,Ni,U?{create:ur,activate:ur,remove:function(t,e){!0!==t.data.show?ar(t,e):e()}}:{}].concat(ui)});$&&document.addEventListener("selectionchange",(function(){var t=document.activeElement;t&&t.vmodel&&mr(t,"input")}));var hr={inserted:function(t,e,n,i){"select"===n.tag?(i.elm&&!i.elm._vOptions?se(n,"postpatch",(function(){hr.componentUpdated(t,e,n)})):pr(t,e,n.context),t._vOptions=[].map.call(t.options,gr)):("textarea"===n.tag||$n(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",vr),t.addEventListener("compositionend",yr),t.addEventListener("change",yr),$&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){pr(t,e,n.context);var i=t._vOptions,r=t._vOptions=[].map.call(t.options,gr);r.some((function(t,e){return!L(t,i[e])}))&&(t.multiple?e.value.some((function(t){return fr(t,r)})):e.value!==e.oldValue&&fr(e.value,r))&&mr(t,"change")}}};function pr(t,e,n){dr(t,e),(j||q)&&setTimeout((function(){dr(t,e)}),0)}function dr(t,e,n){var i=e.value,r=t.multiple;if(!r||Array.isArray(i)){for(var o,a,s=0,l=t.options.length;s<l;s++)if(a=t.options[s],r)o=R(i,gr(a))>-1,a.selected!==o&&(a.selected=o);else if(L(gr(a),i))return void(t.selectedIndex!==s&&(t.selectedIndex=s));r||(t.selectedIndex=-1)}}function fr(t,e){return e.every((function(e){return!L(e,t)}))}function gr(t){return"_value"in t?t._value:t.value}function vr(t){t.target.composing=!0}function yr(t){t.target.composing&&(t.target.composing=!1,mr(t.target,"input"))}function mr(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function _r(t){return!t.componentInstance||t.data&&t.data.transition?t:_r(t.componentInstance._vnode)}var xr={model:hr,show:{bind:function(t,e,n){var i=e.value,r=(n=_r(n)).data&&n.data.transition,o=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;i&&r?(n.data.show=!0,or(n,(function(){t.style.display=o}))):t.style.display=i?o:"none"},update:function(t,e,n){var i=e.value;!i!=!e.oldValue&&((n=_r(n)).data&&n.data.transition?(n.data.show=!0,i?or(n,(function(){t.style.display=t.__vOriginalDisplay})):ar(n,(function(){t.style.display="none"}))):t.style.display=i?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,i,r){r||(t.style.display=t.__vOriginalDisplay)}}},br={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function wr(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?wr(Xe(e.children)):t}function Sr(t){var e={},n=t.$options;for(var i in n.propsData)e[i]=t[i];var r=n._parentListeners;for(var o in r)e[w(o)]=r[o];return e}function Tr(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var Mr=function(t){return t.tag||Ge(t)},Cr=function(t){return"show"===t.name},kr={name:"transition",props:br,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(Mr)).length){var i=this.mode,r=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return r;var o=wr(r);if(!o)return r;if(this._leaving)return Tr(t,r);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:s(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var l=(o.data||(o.data={})).transition=Sr(this),u=this._vnode,c=wr(u);if(o.data.directives&&o.data.directives.some(Cr)&&(o.data.show=!0),c&&c.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(o,c)&&!Ge(c)&&(!c.componentInstance||!c.componentInstance._vnode.isComment)){var h=c.data.transition=A({},l);if("out-in"===i)return this._leaving=!0,se(h,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),Tr(t,r);if("in-out"===i){if(Ge(o))return u;var p,d=function(){p()};se(l,"afterEnter",d),se(l,"enterCancelled",d),se(h,"delayLeave",(function(t){p=t}))}}return r}}},Ar=A({tag:String,moveClass:String},br);function Ir(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function Dr(t){t.data.newPos=t.elm.getBoundingClientRect()}function Pr(t){var e=t.data.pos,n=t.data.newPos,i=e.left-n.left,r=e.top-n.top;if(i||r){t.data.moved=!0;var o=t.elm.style;o.transform=o.WebkitTransform="translate("+i+"px,"+r+"px)",o.transitionDuration="0s"}}delete Ar.mode;var Or={Transition:kr,TransitionGroup:{props:Ar,beforeMount:function(){var t=this,e=this._update;this._update=function(n,i){var r=Je(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,r(),e.call(t,n,i)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),i=this.prevChildren=this.children,r=this.$slots.default||[],o=this.children=[],a=Sr(this),s=0;s<r.length;s++){var l=r[s];l.tag&&null!=l.key&&0!==String(l.key).indexOf("__vlist")&&(o.push(l),n[l.key]=l,(l.data||(l.data={})).transition=a)}if(i){for(var u=[],c=[],h=0;h<i.length;h++){var p=i[h];p.data.transition=a,p.data.pos=p.elm.getBoundingClientRect(),n[p.key]?u.push(p):c.push(p)}this.kept=t(e,null,u),this.removed=c}return t(e,null,o)},updated:function(){var t=this.prevChildren,e=this.moveClass||(this.name||"v")+"-move";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach(Ir),t.forEach(Dr),t.forEach(Pr),this._reflow=document.body.offsetHeight,t.forEach((function(t){if(t.data.moved){var n=t.elm,i=n.style;Ji(n,e),i.transform=i.WebkitTransform=i.transitionDuration="",n.addEventListener(Yi,n._moveCb=function t(i){i&&i.target!==n||i&&!/transform$/.test(i.propertyName)||(n.removeEventListener(Yi,t),n._moveCb=null,Qi(n,e))})}})))},methods:{hasMove:function(t,e){if(!Hi)return!1;if(this._hasMove)return this._hasMove;var n=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach((function(t){Fi(n,t)})),zi(n,e),n.style.display="none",this.$el.appendChild(n);var i=nr(n);return this.$el.removeChild(n),this._hasMove=i.hasTransform}}}};Mn.config.mustUseProp=function(t,e,n){return"value"===n&&Ln(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Mn.config.isReservedTag=Yn,Mn.config.isReservedAttr=On,Mn.config.getTagNamespace=function(t){return Xn(t)?"svg":"math"===t?"math":void 0},Mn.config.isUnknownElement=function(t){if(!U)return!0;if(Yn(t))return!1;if(t=t.toLowerCase(),null!=jn[t])return jn[t];var e=document.createElement(t);return t.indexOf("-")>-1?jn[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:jn[t]=/HTMLUnknownElement/.test(e.toString())},A(Mn.options.directives,xr),A(Mn.options.components,Or),Mn.prototype.__patch__=U?cr:D,Mn.prototype.$mount=function(t,e){return function(t,e,n){var i;return t.$el=e,t.$options.render||(t.$options.render=gt),nn(t,"beforeMount"),i=function(){t._update(t._render(),n)},new gn(t,i,D,{before:function(){t._isMounted&&!t._isDestroyed&&nn(t,"beforeUpdate")}},!0),n=!1,null==t.$vnode&&(t._isMounted=!0,nn(t,"mounted")),t}(this,t=t&&U?function(t){return"string"==typeof t?document.querySelector(t)||document.createElement("div"):t}(t):void 0,e)},U&&setTimeout((function(){z.devtools&&it&&it.emit("init",Mn)}),0);const Lr=Mn},3476:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(i)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(r[a]=!0)}for(var s=0;s<t.length;s++){var l=[].concat(t[s]);i&&r[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),e.push(l))}},e}},994:t=>{"use strict";function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}t.exports=function(t){var n,i,r=(i=4,function(t){if(Array.isArray(t))return t}(n=t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw o}}return n}}(n,i)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?e(t,n):void 0}}(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=r[1],a=r[3];if("function"==typeof btoa){var s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),u="/*# ".concat(l," */"),c=a.sources.map((function(t){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(t," */")}));return[o].concat(c).concat([u]).join("\n")}return[o].join("\n")}},4134:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(8778),r={};const o=function(){function t(){this._coordinateSystems=[]}return t.prototype.create=function(t,e){var n=[];i.S6(r,(function(i,r){var o=i.create(t,e);n=n.concat(o||[])})),this._coordinateSystems=n},t.prototype.update=function(t,e){i.S6(this._coordinateSystems,(function(n){n.update&&n.update(t,e)}))},t.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},t.register=function(t,e){r[t]=e},t.get=function(t){return r[t]},t}()},5831:(t,e,n)=>{"use strict";var i=n(8966),r=n(8778),o=n(3442),a=n(2746),s=n(3493),l=n(9312),u=n(9472);const c=function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return r.UI(this._dimList,(function(t){return this._axes[t]}),this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),r.hX(this.getAxes(),(function(e){return e.scale.type===t}))},t.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},t}();var h=n(561),p=n(213),d=["x","y"];function f(t){return"interval"===t.type||"time"===t.type}const g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=d,e}return(0,l.ZT)(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(f(t)&&f(e)){var n=t.getExtent(),i=e.getExtent(),r=this.dataToPoint([n[0],i[0]]),o=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(o[0]-r[0])/a,u=(o[1]-r[1])/s,c=r[0]-n[0]*l,p=r[1]-i[0]*u,d=this._transform=[l,0,0,u,c,p];this._invTransform=(0,h.U_)([],d)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.dataToPoint=function(t,e,n){n=n||[];var i=t[0],r=t[1];if(this._transform&&null!=i&&isFinite(i)&&null!=r&&isFinite(r))return(0,p.Ne)(n,t,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(i)),n[1]=a.toGlobalCoord(a.dataToCoord(r)),n},e.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),a=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),a),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),e},e.prototype.pointToData=function(t,e){if(e=e||[],this._invTransform)return(0,p.Ne)(e,t,this._invTransform);var n=this.getAxis("x"),i=this.getAxis("y");return e[0]=n.coordToData(n.toLocalCoord(t[0])),e[1]=i.coordToData(i.toLocalCoord(t[1])),e},e.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},e.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),n=Math.min(t[0],t[1]),i=Math.min(e[0],e[1]),r=Math.max(t[0],t[1])-n,o=Math.max(e[0],e[1])-i;return new u.Z(n,i,r,o)},e}(c);var v=n(9199),y=n(9356),m=n(5495),_=(0,m.Yf)();function x(t,e){var n,i,o=b(t,"labels"),a=(0,s.rk)(e);return w(o,a)||(r.mf(a)?n=M(t,a):(i="auto"===a?function(t){var e=_(t).autoInterval;return null!=e?e:_(t).autoInterval=t.calculateCategoryInterval()}(t):a,n=T(t,i)),S(o,a,{labels:n,labelCategoryInterval:i}))}function b(t,e){return _(t)[e]||(_(t)[e]=[])}function w(t,e){for(var n=0;n<t.length;n++)if(t[n].key===e)return t[n].value}function S(t,e,n){return t.push({key:e,value:n}),n}function T(t,e,n){var i=(0,s.J9)(t),r=t.scale,o=r.getExtent(),a=t.getLabelModel(),l=[],u=Math.max((e||0)+1,1),c=o[0],h=r.count();0!==c&&u>1&&h/u>2&&(c=Math.round(Math.ceil(c/u)*u));var p=(0,s.WY)(t),d=a.get("showMinLabel")||p,f=a.get("showMaxLabel")||p;d&&c!==o[0]&&v(o[0]);for(var g=c;g<=o[1];g+=u)v(g);function v(t){var e={value:t};l.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t})}return f&&g-u!==o[1]&&v(o[1]),l}function M(t,e,n){var i=t.scale,o=(0,s.J9)(t),a=[];return r.S6(i.getTicks(),(function(t){var r=i.getLabel(t),s=t.value;e(t.value,r)&&a.push(n?s:{formattedLabel:o(t),rawLabel:r,tickValue:s})})),a}var C=[0,1];function k(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}const A=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.index=0,a.type=r||"value",a.position=o||"bottom",a}return(0,l.ZT)(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setCategorySortInfo(t)},e}(function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return(0,v.M9)(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&k(n=n.slice(),i.count()),(0,v.NU)(t,C,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&k(n=n.slice(),i.count());var r=(0,v.NU)(t,n,C,e);return this.scale.scale(r)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=function(t,e){return"category"===t.type?function(t,e){var n,i,o=b(t,"ticks"),a=(0,s.rk)(e),l=w(o,a);if(l)return l;if(e.get("show")&&!t.scale.isBlank()||(n=[]),r.mf(a))n=M(t,a,!0);else if("auto"===a){var u=x(t,t.getLabelModel());i=u.labelCategoryInterval,n=r.UI(u.labels,(function(t){return t.tickValue}))}else n=T(t,i=a,!0);return S(o,a,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:r.UI(t.scale.getTicks(),(function(t){return t.value}))}}(this,e).ticks,i=(0,r.UI)(n,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawIndex(t):t),tickValue:t}}),this);return function(t,e,n,i){var o=e.length;if(t.onBand&&!n&&o){var a,s,l=t.getExtent();if(1===o)e[0].coord=l[0],a=e[1]={coord:l[0]};else{var u=e[o-1].tickValue-e[0].tickValue,c=(e[o-1].coord-e[0].coord)/u;(0,r.S6)(e,(function(t){t.coord-=c/2})),s=1+t.scale.getExtent()[1]-e[o-1].tickValue,a={coord:e[o-1].coord+c*s},e.push(a)}var h=l[0]>l[1];p(e[0].coord,l[0])&&(i?e[0].coord=l[0]:e.shift()),i&&p(l[0],e[0].coord)&&e.unshift({coord:l[0]}),p(l[1],a.coord)&&(i?a.coord=l[1]:e.pop()),i&&p(a.coord,l[1])&&e.push({coord:l[1]})}function p(t,e){return t=(0,v.NM)(t),e=(0,v.NM)(e),h?t>e:t<e}}(this,i,e.get("alignWithLabel"),t.clamp),i},t.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick").get("splitNumber");t>0&&t<100||(t=5);var e=this.scale.getMinorTicks(t);return(0,r.UI)(e,(function(t){return(0,r.UI)(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(){return(t=this,"category"===t.type?function(t){var e=t.getLabelModel(),n=x(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),n=(0,s.J9)(t);return{labels:r.UI(e,(function(e,i){return{formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e.value}}))}}(t)).labels;var t},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=(0,s.J9)(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,o=r.getExtent(),a=r.count();if(o[1]-o[0]<1)return 0;var l=1;a>40&&(l=Math.max(1,Math.floor(a/40)));for(var u=o[0],c=t.dataToCoord(u+1)-t.dataToCoord(u),h=Math.abs(c*Math.cos(i)),p=Math.abs(c*Math.sin(i)),d=0,f=0;u<=o[1];u+=l){var g,v,m=y.lP(n({value:u}),e.font,"center","top");g=1.3*m.width,v=1.3*m.height,d=Math.max(d,g,7),f=Math.max(f,v,7)}var x=d/h,b=f/p;isNaN(x)&&(x=1/0),isNaN(b)&&(b=1/0);var w=Math.max(0,Math.floor(Math.min(x,b))),S=_(t.model),T=t.getExtent(),M=S.lastAutoInterval,C=S.lastTickCount;return null!=M&&null!=C&&Math.abs(M-w)<=1&&Math.abs(C-a)<=1&&M>w&&S.axisExtent0===T[0]&&S.axisExtent1===T[1]?w=M:(S.lastTickCount=a,S.lastAutoInterval=w,S.axisExtent0=T[0],S.axisExtent1=T[1]),w}(this)},t}());var I=n(4134),D=n(8395),P=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=d,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),(0,r.S6)(n.x,(function(t){(0,s.Jk)(t.scale,t.model)})),(0,r.S6)(n.y,(function(t){(0,s.Jk)(t.scale,t.model)}));var i={};(0,r.S6)(n.x,(function(t){L(n,"y",t,i)})),(0,r.S6)(n.y,(function(t){L(n,"x",t,i)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),o=!n&&t.get("containLabel"),l=(0,a.ME)(i,{width:e.getWidth(),height:e.getHeight()});this._rect=l;var u=this._axesList;function c(){(0,r.S6)(u,(function(t){var e=t.isHorizontal(),n=e?[0,l.width]:[0,l.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?l.x:l.y)}))}c(),o&&((0,r.S6)(u,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=(0,s.Do)(t);if(e){var n=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]);l[n]-=e[n]+i,"top"===t.position?l.y+=e.height+i:"left"===t.position&&(l.x+=e.width+i)}}})),c()),(0,r.S6)(this._coordsList,(function(t){t.calcAffineTransform()}))},t.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n)return n[e||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}(0,r.Kn)(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,o=this._coordsList;i<o.length;i++)if(o[i].getAxis("x").index===t||o[i].getAxis("y").index===e)return o[i]},t.prototype.getCartesians=function(){return this._coordsList.slice()},t.prototype.convertToPixel=function(t,e,n){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},t.prototype.convertFromPixel=function(t,e,n){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},t.prototype._findConvertTarget=function(t){var e,n,i=t.seriesModel,o=t.xAxisModel||i&&i.getReferringComponents("xAxis",m.C6).models[0],a=t.yAxisModel||i&&i.getReferringComponents("yAxis",m.C6).models[0],s=t.gridModel,l=this._coordsList;return i?(e=i.coordinateSystem,(0,r.cq)(l,e)<0&&(e=null)):o&&a?e=this.getCartesian(o.componentIndex,a.componentIndex):o?n=this.getAxis("x",o.componentIndex):a?n=this.getAxis("y",a.componentIndex):s&&s.coordinateSystem===this&&(e=this._coordsList[0]),{cartesian:e,axis:n}},t.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},t.prototype._initCartesian=function(t,e,n){var i=this,o=this,a={left:!1,right:!1,top:!1,bottom:!1},l={x:{},y:{}},u={x:0,y:0};if(e.eachComponent("xAxis",c("x"),this),e.eachComponent("yAxis",c("y"),this),!u.x||!u.y)return this._axesMap={},void(this._axesList=[]);function c(e){return function(n,i){if(O(n,t)){var r=n.get("position");"x"===e?"top"!==r&&"bottom"!==r&&(r=a.bottom?"top":"bottom"):"left"!==r&&"right"!==r&&(r=a.left?"right":"left"),a[r]=!0;var c=new A(e,(0,s.aG)(n),[0,0],n.get("type"),r),h="category"===c.type;c.onBand=h&&n.get("boundaryGap"),c.inverse=n.get("inverse"),n.axis=c,c.model=n,c.grid=o,c.index=i,o._axesList.push(c),l[e][i]=c,u[e]++}}}this._axesMap=l,(0,r.S6)(l.x,(function(e,n){(0,r.S6)(l.y,(function(r,o){var a="x"+n+"y"+o,s=new g(a);s.master=i,s.model=t,i._coordsMap[a]=s,i._coordsList.push(s),s.addAxis(e),s.addAxis(r)}))}))},t.prototype._updateScale=function(t,e){function n(t,e){(0,r.S6)((0,s.PY)(t,e.dim),(function(n){e.scale.unionExtentFromData(t,n)}))}(0,r.S6)(this._axesList,(function(t){if(t.scale.setExtent(1/0,-1/0),"category"===t.type){var e=t.model.get("categorySortInfo");t.scale.setCategorySortInfo(e)}})),t.eachSeries((function(t){if((0,D.Yh)(t)){var i=(0,D.Mk)(t),r=i.xAxisModel,o=i.yAxisModel;if(!O(r,e)||!O(o,e))return;var a=this.getCartesian(r.componentIndex,o.componentIndex),s=t.getData(),l=a.getAxis("x"),u=a.getAxis("y");"list"===s.type&&(n(s,l),n(s,u))}}),this)},t.prototype.getTooltipAxes=function(t){var e=[],n=[];return(0,r.S6)(this.getCartesians(),(function(i){var o=null!=t&&"auto"!==t?i.getAxis(t):i.getBaseAxis(),a=i.getOtherAxis(o);(0,r.cq)(e,o)<0&&e.push(o),(0,r.cq)(n,a)<0&&n.push(a)})),{baseAxes:e,otherAxes:n}},t.create=function(e,n){var i=[];return e.eachComponent("grid",(function(r,o){var a=new t(r,e,n);a.name="grid_"+o,a.resize(r,n,!0),r.coordinateSystem=a,i.push(a)})),e.eachSeries((function(t){if((0,D.Yh)(t)){var e=(0,D.Mk)(t),n=e.xAxisModel,i=e.yAxisModel,r=n.getCoordSysModel().coordinateSystem;t.coordinateSystem=r.getCartesian(n.componentIndex,i.componentIndex)}})),i},t.dimensions=d,t}();function O(t,e){return t.getCoordSysModel()===e}function L(t,e,n,i){n.getAxesOnZeroOf=function(){return r?[r]:[]};var r,o=t[e],a=n.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)R(o[l])&&(r=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&R(o[u])&&!i[c(o[u])]){r=o[u];break}r&&(i[c(r)]=!0)}function c(t){return t.dim+"_"+t.index}}function R(t){return t&&"category"!==t.type&&"time"!==t.type&&(0,s.Yb)(t)}I.Z.register("cartesian2d",P);var E=n(4689),Z=n(2069),N=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,l.ZT)(e,t),e.prototype.getInitialData=function(t,e){return(0,Z.Z)(this.getSource(),this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t){var e=this.coordinateSystem;if(e){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),r=i.getLayout("offset"),o=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=r+o/2,n}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(E.Z);E.Z.registerClass(N);const B=N;var z=n(4053),F=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,l.ZT)(e,t),e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=(0,z.ZL)(B.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(B);E.Z.registerClass(F);var W=n(391),V=n(6454),H=n(3696),U=n(1563),G=n(106),X=n(5628),Y=n(4013),j=n(823),$=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0};const q=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return(0,l.ZT)(e,t),e.prototype.getDefaultShape=function(){return new $},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,c=e.clockwise,h=Math.cos(l),p=Math.sin(l),d=Math.cos(u),f=Math.sin(u);(c?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(h*r+n,p*r+i),t.arc(h*s+n,p*s+i,a,-Math.PI+l,l,!c)),t.arc(n,i,o,l,u,!c),t.moveTo(d*o+n,f*o+i),t.arc(d*s+n,f*s+i,a,u-2*Math.PI,u-Math.PI,!c),0!==r&&(t.arc(n,i,r,u,l,c),t.moveTo(h*r+n,f*r+i)),t.closePath()},e}(H.Path);var K=n(2916),J=n(5320),Q=n(4510),tt=["itemStyle","borderWidth"],et=["itemStyle","borderRadius"],nt=[0,0],it=Math.max,rt=Math.min,ot=function(t){function e(){var n=t.call(this)||this;return n.type=e.type,n._isFirstFrame=!0,n}return(0,l.ZT)(e,t),e.prototype.render=function(t,e,n,i){this._model=t,this.removeOnRenderedListener(n),this._updateDrawMode(t);var r=t.get("coordinateSystem");("cartesian2d"===r||"polar"===r)&&(this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n,i))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,e){this._incrementalRenderLarge(t,e)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t,e,n,i){var r,o=this,a=this.group,s=t.getData(),l=this._data,u=t.coordinateSystem,c=u.getBaseAxis();"cartesian2d"===u.type?r=c.isHorizontal():"polar"===u.type&&(r="angle"===c.dim);var h=t.isAnimationEnabled()?t:null,p=c.model,d=t.get("realtimeSort");if(d&&s.count()){if(this._isFirstFrame)return this._initSort(s,r,c,n),void(this._isFirstFrame=!1);this._onRendered=function(){o._updateSort(s,(function(t){var e=s.getItemGraphicEl(t);if(e){var n=e.shape;return(r?n.y+n.height:n.x+n.width)||0}return 0}),c,n)},n.getZr().on("rendered",this._onRendered)}var f=t.get("clip",!0)||d,g=function(t,e){var n=t.getArea&&t.getArea();if((0,J.H)(t,"cartesian2d")){var i=t.getBaseAxis();if("category"!==i.type||!i.onBand){var r=e.getLayout("bandWidth");i.isHorizontal()?(n.x-=r,n.width+=2*r):(n.y-=r,n.height+=2*r)}}return n}(u,s);a.removeClipPath();var v=t.get("roundCap",!0),y=t.get("showBackground",!0),m=t.getModel("backgroundStyle"),_=m.get("borderRadius")||0,x=[],b=this._backgroundEls,w=i&&i.isInitSort,S=i&&"changeAxisOrder"===i.type;function T(t){var e=ut[u.type](s,t),n=function(t,e,n){return new("polar"===t.type?H.Sector:H.Rect)({shape:gt(e,n,t),silent:!0,z2:0})}(u,r,e);return n.useStyle(m.getItemStyle()),"cartesian2d"===u.type&&n.setShape("r",_),x[t]=n,n}s.diff(l).add((function(e){var n=s.getItemModel(e),i=ut[u.type](s,e,n);if(y&&T(e),s.hasValue(e)){var o=!1;f&&(o=at[u.type](g,i));var l=st[u.type](t,s,e,i,r,h,c.model,!1,v);ct(l,s,e,n,i,t,r,"polar"===u.type),w?l.attr({shape:i}):d?lt(t,p,h,l,i,e,r,!1,!1):(0,H.initProps)(l,{shape:i},t,e),s.setItemGraphicEl(e,l),a.add(l),l.ignore=o}})).update((function(e,n){var i=s.getItemModel(e),o=ut[u.type](s,e,i);if(y){var M=void 0;0===b.length?M=T(n):((M=b[n]).useStyle(m.getItemStyle()),"cartesian2d"===u.type&&M.setShape("r",_),x[e]=M);var C=ut[u.type](s,e),k=gt(r,C,u);(0,H.updateProps)(M,{shape:k},h,e)}var A=l.getItemGraphicEl(n);if(!s.hasValue(e))return a.remove(A),void(A=null);var I=!1;f&&(I=at[u.type](g,o))&&a.remove(A),A||(A=st[u.type](t,s,e,o,r,h,c.model,!!A,v)),S||ct(A,s,e,i,o,t,r,"polar"===u.type),w?A.attr({shape:o}):d?lt(t,p,h,A,o,e,r,!0,S):(0,H.updateProps)(A,{shape:o},t,e,null),s.setItemGraphicEl(e,A),A.ignore=I,a.add(A)})).remove((function(e){var n=l.getItemGraphicEl(e);n&&(0,H.removeElementWithFadeOut)(n,t,e)})).execute();var M=this._backgroundGroup||(this._backgroundGroup=new V.Z);M.removeAll();for(var C=0;C<x.length;++C)M.add(x[C]);a.add(M),this._backgroundEls=x,this._data=s},e.prototype._renderLarge=function(t,e,n){this._clear(),dt(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,e){this._removeBackground(),dt(e,this.group,!0)},e.prototype._updateLargeClip=function(t){var e=t.get("clip",!0)?(0,j.lQ)(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._dataSort=function(t,e){var n=[];t.each((function(t){n.push({mappedValue:e(t),ordinalNumber:t,beforeSortIndex:null})})),n.sort((function(t,e){return e.mappedValue-t.mappedValue}));for(var i=0;i<n.length;++i)n[n[i].ordinalNumber].beforeSortIndex=i;return(0,r.UI)(n,(function(t){return{ordinalNumber:t.ordinalNumber,beforeSortIndex:t.beforeSortIndex}}))},e.prototype._isDataOrderChanged=function(t,e,n){if((n?n.length:0)!==t.count())return!0;for(var i=Number.MAX_VALUE,r=0;r<n.length;++r){var o=e(n[r].ordinalNumber);if(o>i)return!0;i=o}return!1},e.prototype._updateSort=function(t,e,n,i){var r=n.scale.getCategorySortInfo();if(this._isDataOrderChanged(t,e,r))for(var o=this._dataSort(t,e),a=n.scale.getExtent(),s=a[0];s<a[1];++s)if(!r[s]||r[s].ordinalNumber!==o[s].ordinalNumber){this.removeOnRenderedListener(i);var l={type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o};i.dispatchAction(l);break}},e.prototype._initSort=function(t,e,n,i){var r={type:"changeAxisOrder",componentType:n.dim+"Axis",isInitSort:!0,axisId:n.index,sortInfo:this._dataSort(t,(function(n){return parseFloat(t.get(e?"y":"x",n))||0}))};i.dispatchAction(r)},e.prototype.remove=function(t,e){this._clear(this._model),this.removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this.removeOnRenderedListener(e)},e.prototype.removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){(0,H.removeElementWithFadeOut)(e,t,(0,U.A)(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(K.Z),at={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=it(e.x,t.x),o=rt(e.x+e.width,t.x+t.width),a=it(e.y,t.y),s=rt(e.y+e.height,t.y+t.height);e.x=r,e.y=a,e.width=o-r,e.height=s-a;var l=e.width<0||e.height<0;return n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),l},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=rt(e.r,t.r),o=it(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;return n<0&&(i=e.r,e.r=e.r0,e.r0=i),a}},st={cartesian2d:function(t,e,n,i,o,a,s,l,u){var c=new H.Rect({shape:(0,r.l7)({},i),z2:1});return c.__dataIndex=n,c.name="item",a&&(c.shape[o?"height":"width"]=0),c},polar:function(t,e,n,i,o,a,s,l,u){var c=i.startAngle<i.endAngle,h=new(!o&&u?q:H.Sector)({shape:(0,r.ce)({clockwise:c},i),z2:1});if(h.name="item",a){var p=o?"r":"endAngle",d={};h.shape[p]=o?0:i.startAngle,d[p]=i[p],(l?H.updateProps:H.initProps)(h,{shape:d},a)}return h}};function lt(t,e,n,i,r,o,a,s,l){if(n||e){var u=void 0,c=void 0;a?(c={x:r.x,width:r.width},u={y:r.y,height:r.height}):(c={y:r.y,height:r.height},u={x:r.x,width:r.width}),l||(s?H.updateProps:H.initProps)(i,{shape:u},t,o,null),(s?H.updateProps:H.initProps)(i,{shape:c},e,o)}}var ut={cartesian2d:function(t,e,n){var i=t.getItemLayout(e),r=n?function(t,e){var n=t.get(tt)||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),r=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,r)}(n,i):0,o=i.width>0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}};function ct(t,e,n,i,o,a,s,l){var u=e.getItemVisual(n,"style");l||t.setShape("r",i.get(et)||0),t.useStyle(u);var c=i.getShallow("cursor");if(c&&t.attr("cursor",c),!l){var h=s?o.height>0?"bottom":"top":o.width>0?"left":"right",p=(0,X.k3)(i);(0,X.ni)(t,p,{labelFetcher:a,labelDataIndex:n,defaultText:(0,Q.H)(a.getData(),n),inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:h});var d=t.getTextContent();(0,X.pe)(d,p,a.getRawValue(n),(function(t){return(0,Q.O)(e,t)}))}var f=i.getModel(["emphasis"]);(0,G.vF)(t,f.get("focus"),f.get("blurScope")),(0,G.WO)(t,i),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(o)&&(t.style.fill="none",t.style.stroke="none",(0,r.S6)(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var ht=function(){},pt=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return(0,l.ZT)(e,t),e.prototype.getDefaultShape=function(){return new ht},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.__startPoint,r=this.__baseDimIdx,o=0;o<n.length;o+=2)i[r]=n[o+r],t.moveTo(i[0],i[1]),t.lineTo(n[o],n[o+1])},e}(W.ZP);function dt(t,e,n){var i=t.getData(),o=[],a=i.getLayout("valueAxisHorizontal")?1:0;o[1-a]=i.getLayout("valueAxisStart");var s=i.getLayout("largeDataIndices"),l=i.getLayout("barWidth"),u=t.getModel("backgroundStyle");if(t.get("showBackground",!0)){var c=i.getLayout("largeBackgroundPoints"),h=[];h[1-a]=i.getLayout("backgroundStart");var p=new pt({shape:{points:c},incremental:!!n,silent:!0,z2:0});p.__startPoint=h,p.__baseDimIdx=a,p.__largeDataIndices=s,p.__barWidth=l,function(t,e,n){var i=e.get("borderColor")||e.get("color"),r=e.getItemStyle();t.useStyle(r),t.style.fill=null,t.style.stroke=i,t.style.lineWidth=n.getLayout("barWidth")}(p,u,i),e.add(p)}var d=new pt({shape:{points:i.getLayout("largePoints")},incremental:!!n});d.__startPoint=o,d.__baseDimIdx=a,d.__largeDataIndices=s,d.__barWidth=l,e.add(d),function(t,e,n){var i=n.getVisual("style");t.useStyle((0,r.l7)({},i)),t.style.fill=null,t.style.stroke=i.fill,t.style.lineWidth=n.getLayout("barWidth")}(d,0,i),(0,U.A)(d).seriesIndex=t.seriesIndex,t.get("silent")||(d.on("mousedown",ft),d.on("mousemove",ft))}var ft=(0,Y.P2)((function(t){var e=function(t,e,n){var i=t.__baseDimIdx,r=1-i,o=t.shape.points,a=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[r];nt[0]=e,nt[1]=n;for(var u=nt[i],c=nt[1-i],h=u-s,p=u+s,d=0,f=o.length/2;d<f;d++){var g=2*d,v=o[g+i],y=o[g+r];if(v>=h&&v<=p&&(l<=y?c>=l&&c<=y:c>=y&&c<=l))return a[d]}return-1}(this,t.offsetX,t.offsetY);(0,U.A)(this).dataIndex=e>=0?e:null}),30,!1);function gt(t,e,n){if((0,J.H)(n,"cartesian2d")){var i=e,r=n.getArea();return{x:t?i.x:r.x,y:t?r.y:i.y,width:t?i.width:r.width,height:t?r.height:i.height}}var o=e;return{cx:(r=n.getArea()).cx,cy:r.cy,r0:t?r.r0:o.r0,r:t?r.r:o.r,startAngle:t?o.startAngle:0,endAngle:t?o.endAngle:2*Math.PI}}K.Z.registerClass(ot),i.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},(function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},(function(e){t.sortInfo&&e.axis.setCategorySortInfo(t.sortInfo)}))})),n(5826);var vt=n(6774);i.registerLayout(i.PRIORITY.VISUAL.LAYOUT,r.WA(o.bK,"bar")),i.registerLayout(i.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,o.kY),i.registerVisual({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}}),i.registerProcessor(i.PRIORITY.PROCESSOR.STATISTIC,(0,vt.Z)("bar"))},823:(t,e,n)=>{"use strict";n.d(e,{ID:()=>o,X0:()=>a,lQ:()=>s});var i=n(3696),r=n(9199);function o(t,e,n,r,o){var a=t.getArea(),s=a.x,l=a.y,u=a.width,c=a.height,h=n.get(["lineStyle","width"])||2;s-=h/2,l-=h/2,u+=h,c+=h,s=Math.floor(s),u=Math.round(u);var p=new i.Rect({shape:{x:s,y:l,width:u,height:c}});if(e){var d=t.getBaseAxis(),f=d.isHorizontal(),g=d.inverse;f?(g&&(p.shape.x+=u),p.shape.width=0):(g||(p.shape.y+=c),p.shape.height=0);var v="function"==typeof o?function(t){o(t,p)}:null;i.initProps(p,{shape:{width:u,height:c,x:s,y:l}},n,null,r,v)}return p}function a(t,e,n){var o=t.getArea(),a=(0,r.NM)(o.r0,1),s=(0,r.NM)(o.r,1),l=new i.Sector({shape:{cx:(0,r.NM)(t.cx,1),cy:(0,r.NM)(t.cy,1),r0:a,r:s,startAngle:o.startAngle,endAngle:o.endAngle,clockwise:o.clockwise}});return e&&("angle"===t.getBaseAxis().dim?l.shape.endAngle=o.startAngle:l.shape.r=a,i.initProps(l,{shape:{endAngle:o.endAngle,r:s}},n)),l}function s(t,e,n,i,r){return t?"polar"===t.type?a(t,e,n):"cartesian2d"===t.type?o(t,e,n,i,r):null:null}},2069:(t,e,n)=>{"use strict";n.d(e,{Z:()=>X});var i=n(8778),r=n(4708),o=n(7586),a=n(1245),s=n(7252);function l(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}const u=function(t){this.otherDims={},null!=t&&i.l7(this,t)};var c,h,p,d,f,g,v,y,m,_,x,b,w,S,T=n(5495),M=n(1563),C=n(5294),k=n(7158),A=Math.floor,I=i.Kn,D=i.UI,P="undefined",O={float:typeof Float64Array===P?Array:Float64Array,int:typeof Int32Array===P?Array:Int32Array,ordinal:Array,number:Array,time:Array},L=typeof Uint32Array===P?Array:Uint32Array,R=typeof Int32Array===P?Array:Int32Array,E=typeof Uint16Array===P?Array:Uint16Array,Z=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx","_nameRepeatCount"],N=["_extent","_approximateExtent","_rawExtent"];const B=function(){function t(t,e){this.type="list",this._count=0,this._rawCount=0,this._storage={},this._storageArr=[],this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._rawExtent={},this._extent={},this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!0,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"],this.getRawIndex=f,t=t||["x","y"];for(var n={},r=[],o={},a=0;a<t.length;a++){var c=t[a],h=i.HD(c)?new u({name:c}):c instanceof u?c:new u(c),p=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=p,h.coordDimIndex=0);var d=h.otherDims=h.otherDims||{};r.push(p),n[p]=h,h.index=a,h.createInvertedIndices&&(o[p]=[]),0===d.itemName&&(this._nameDimIdx=a,this._nameOrdinalMeta=h.ordinalMeta),0===d.itemId&&(this._idDimIdx=a,this._idOrdinalMeta=h.ordinalMeta)}this.dimensions=r,this._dimensionInfos=n,this.hostModel=e,this._dimensionsSummary=function(t){var e={},n=e.encode={},r=(0,i.kW)(),o=[],a=[],u=e.userOutput={dimensionNames:t.dimensions.slice(),encode:{}};(0,i.S6)(t.dimensions,(function(e){var i,c=t.getDimensionInfo(e),h=c.coordDim;if(h){var p=c.coordDimIndex;l(n,h)[p]=e,c.isExtraCoord||(r.set(h,1),"ordinal"!==(i=c.type)&&"time"!==i&&(o[0]=e),l(u.encode,h)[p]=c.index),c.defaultTooltip&&a.push(e)}s.f7.each((function(t,e){var i=l(n,e),r=c.otherDims[e];null!=r&&!1!==r&&(i[r]=c.name)}))}));var c=[],h={};r.each((function(t,e){var i=n[e];h[e]=i[0],c=c.concat(i)})),e.dataDimsOnCoord=c,e.encodeFirstDimNotExtra=h;var p=n.label;p&&p.length&&(o=p.slice());var d=n.tooltip;return d&&d.length?a=d.slice():a.length||(a=o.slice()),n.defaultedLabel=o,n.defaultedTooltip=a,e}(this),this._invertedIndicesMap=o,this.userOutput=this._dimensionsSummary.userOutput}return t.prototype.getDimension=function(t){return"number"!=typeof t&&(isNaN(t)||this._dimensionInfos.hasOwnProperty(t))||(t=this.dimensions[t]),t},t.prototype.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},t.prototype.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(t,e){var n=this._dimensionsSummary;if(null==e)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return i?i[e]:null},t.prototype.mapDimensionsAll=function(t){return(this._dimensionsSummary.encode[t]||[]).slice()},t.prototype.initData=function(t,e,n){var r=(0,k.Ld)(t)||i.zG(t)?new a.Pl(t,this.dimensions.length):t;this._rawData=r;var o=r.getSource().sourceFormat;this._storage={},this._indices=null,this._dontMakeIdFromName=null!=this._idDimIdx||o===s.J5||!!r.fillStorage,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},n||(this.hasItemOption=!1),this.defaultDimValueGetter=c[o],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._dimValueGetterArrayRows=c.arrayRows,this._rawExtent={},this._initDataFromProvider(0,r.count()),r.pure&&(this.hasItemOption=!1)},t.prototype.getProvider=function(){return this._rawData},t.prototype.appendData=function(t){var e=this._rawData,n=this.count();e.appendData(t);var i=e.count();e.persistent||(i+=n),this._initDataFromProvider(n,i,!0)},t.prototype.appendValues=function(t,e){for(var n=this._storage,i=this.dimensions,r=i.length,o=this._rawExtent,a=this.count(),s=a+Math.max(t.length,e?e.length:0),l=0;l<r;l++){var u=i[l];o[u]||(o[u]=b()),d(n,this._dimensionInfos[u],s,!0)}for(var c=D(i,(function(t){return o[t]})),p=this._storageArr=D(i,(function(t){return n[t]})),f=[],g=a;g<s;g++){for(var v=g-a,y=0;y<r;y++){u=i[y];var _=this._dimValueGetterArrayRows(t[v]||f,u,v,y);p[y][g]=_;var x=c[y];_<x[0]&&(x[0]=_),_>x[1]&&(x[1]=_)}e&&(this._nameList[g]=e[v],this._dontMakeIdFromName||m(this,g))}this._rawCount=this._count=s,this._extent={},h(this)},t.prototype._initDataFromProvider=function(t,e,n){if(!(t>=e)){for(var i=this._rawData,r=this._storage,o=this.dimensions,a=o.length,l=this._dimensionInfos,u=this._nameList,c=this._idList,p=this._rawExtent,f=i.getSource().sourceFormat===s.cy,g=0;g<a;g++){var v=o[g];p[v]||(p[v]=b()),d(r,l[v],e,n)}var y=this._storageArr=D(o,(function(t){return r[t]})),_=D(o,(function(t){return p[t]}));if(i.fillStorage)i.fillStorage(t,e,y,_);else for(var x=[],w=t;w<e;w++){x=i.getItem(w,x);for(var S=0;S<a;S++){v=o[S];var M=y[S],C=this._dimValueGetter(x,v,w,S);M[w]=C;var k=_[S];C<k[0]&&(k[0]=C),C>k[1]&&(k[1]=C)}if(f&&!i.pure&&x){var A=x.name;null==u[w]&&null!=A&&(u[w]=(0,T.U5)(A,null));var I=x.id;null==c[w]&&null!=I&&(c[w]=(0,T.U5)(I,null))}this._dontMakeIdFromName||m(this,w)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent={},h(this)}},t.prototype.count=function(){return this._count},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var r=0;r<i;r++)t[r]=e[r]}else t=new n(e.buffer,0,i)}else for(t=new(n=p(this))(this.count()),r=0;r<t.length;r++)t[r]=r;return t},t.prototype.getByDimIdx=function(t,e){if(!(e>=0&&e<this._count))return NaN;var n=this._storageArr[t];return n?n[this.getRawIndex(e)]:NaN},t.prototype.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var n=this._storage[t];return n?n[this.getRawIndex(e)]:NaN},t.prototype.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var n=this._storage[t];return n?n[e]:NaN},t.prototype.getValues=function(t,e){var n=[];i.kJ(t)||(e=t,t=this.dimensions);for(var r=0,o=t.length;r<o;r++)n.push(this.get(t[r],e));return n},t.prototype.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,n=0,i=e.length;n<i;n++)if(isNaN(this.get(e[n],t)))return!1;return!0},t.prototype.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],n=b();if(!e)return n;var i,r=this.count();if(!this._indices)return this._rawExtent[t].slice();if(i=this._extent[t])return i.slice();for(var o=(i=n)[0],a=i[1],s=0;s<r;s++){var l=e[this.getRawIndex(s)];l<o&&(o=l),l>a&&(a=l)}return i=[o,a],this._extent[t]=i,i},t.prototype.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},t.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},t.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},t.prototype.setCalculationInfo=function(t,e){I(t)?i.l7(this._calculationInfo,t):this._calculationInfo[t]=e},t.prototype.getSum=function(t){var e=0;if(this._storage[t])for(var n=0,i=this.count();n<i;n++){var r=this.get(t,n);isNaN(r)||(e+=r)}return e},t.prototype.getMedian=function(t){var e=[];this.each(t,(function(t){isNaN(t)||e.push(t)}));var n=e.sort((function(t,e){return t-e})),i=this.count();return 0===i?0:i%2==1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},t.prototype.rawIndexOf=function(t,e){var n=(t&&this._invertedIndicesMap[t])[e];return null==n||isNaN(n)?-1:n},t.prototype.indexOfName=function(t){for(var e=0,n=this.count();e<n;e++)if(this.getName(e)===t)return e;return-1},t.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&n<this._count&&n===t)return t;for(var i=0,r=this._count-1;i<=r;){var o=(i+r)/2|0;if(e[o]<t)i=o+1;else{if(!(e[o]>t))return o;r=o-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var i=this._storage[t],r=[];if(!i)return r;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l<u;l++){var c=e-i[this.getRawIndex(l)],h=Math.abs(c);h<=n&&((h<o||h===o&&c>=0&&a<0)&&(o=h,a=c,s=0),c===a&&(r[s++]=l))}return r.length=s,r},t.prototype.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n<this.dimensions.length;n++){var i=this.dimensions[n];e.push(this.get(i,t))}return e},t.prototype.getName=function(t){var e=this.getRawIndex(t),n=this._nameList[e];return null==n&&null!=this._nameDimIdx&&(n=y(this,this._nameDimIdx,this._nameOrdinalMeta,e)),null==n&&(n=""),n},t.prototype.getId=function(t){return v(this,this.getRawIndex(t))},t.prototype.each=function(t,e,n,i){var r=this;if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]);for(var o=n||i||this,a=D(_(t),this.getDimension,this),s=a.length,l=D(a,(function(t){return r._dimensionInfos[t].index})),u=this._storageArr,c=0,h=this.count();c<h;c++){var p=this.getRawIndex(c);switch(s){case 0:e.call(o,c);break;case 1:e.call(o,u[l[0]][p],c);break;case 2:e.call(o,u[l[0]][p],u[l[1]][p],c);break;default:for(var d=0,f=[];d<s;d++)f[d]=u[l[d]][p];f[d]=c,e.apply(o,f)}}}},t.prototype.filterSelf=function(t,e,n,i){var r=this;if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]);for(var o=n||i||this,a=D(_(t),this.getDimension,this),s=this.count(),l=new(p(this))(s),u=[],c=a.length,h=0,d=D(a,(function(t){return r._dimensionInfos[t].index})),v=d[0],y=this._storageArr,m=0;m<s;m++){var x=void 0,b=this.getRawIndex(m);if(0===c)x=e.call(o,m);else if(1===c){var w=y[v][b];x=e.call(o,w,m)}else{for(var S=0;S<c;S++)u[S]=y[d[S]][b];u[S]=m,x=e.apply(o,u)}x&&(l[h++]=b)}return h<s&&(this._indices=l),this._count=h,this._extent={},this.getRawIndex=this._indices?g:f,this}},t.prototype.selectRange=function(t){var e=this,n=this._count;if(n){var i=[];for(var r in t)t.hasOwnProperty(r)&&i.push(r);var o=i.length;if(o){var a=this.count(),s=new(p(this))(a),l=0,u=i[0],c=D(i,(function(t){return e._dimensionInfos[t].index})),h=t[u][0],d=t[u][1],v=this._storageArr,y=!1;if(!this._indices){var m=0;if(1===o){for(var _=v[c[0]],x=0;x<n;x++)((T=_[x])>=h&&T<=d||isNaN(T))&&(s[l++]=m),m++;y=!0}else if(2===o){_=v[c[0]];var b=v[c[1]],w=t[i[1]][0],S=t[i[1]][1];for(x=0;x<n;x++){var T=_[x],M=b[x];(T>=h&&T<=d||isNaN(T))&&(M>=w&&M<=S||isNaN(M))&&(s[l++]=m),m++}y=!0}}if(!y)if(1===o)for(x=0;x<a;x++){var C=this.getRawIndex(x);((T=v[c[0]][C])>=h&&T<=d||isNaN(T))&&(s[l++]=C)}else for(x=0;x<a;x++){for(var k=!0,A=(C=this.getRawIndex(x),0);A<o;A++){var I=i[A];((T=v[c[A]][C])<t[I][0]||T>t[I][1])&&(k=!1)}k&&(s[l++]=this.getRawIndex(x))}return l<a&&(this._indices=s),this._count=l,this._extent={},this.getRawIndex=this._indices?g:f,this}}},t.prototype.mapArray=function(t,e,n,i){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this;var r=[];return this.each(t,(function(){r.push(e&&e.apply(this,arguments))}),n),r},t.prototype.map=function(t,e,n,i){var r=n||i||this,o=D(_(t),this.getDimension,this),a=x(this,o),s=a._storage;a._indices=this._indices,a.getRawIndex=a._indices?g:f;for(var l=[],u=o.length,c=this.count(),h=[],p=a._rawExtent,d=0;d<c;d++){for(var v=0;v<u;v++)h[v]=this.get(o[v],d);h[u]=d;var y=e&&e.apply(r,h);if(null!=y){"object"!=typeof y&&(l[0]=y,y=l);for(var m=this.getRawIndex(d),b=0;b<y.length;b++){var w=o[b],S=y[b],T=p[w],M=s[w];M&&(M[m]=S),S<T[0]&&(T[0]=S),S>T[1]&&(T[1]=S)}}}return a},t.prototype.downSample=function(t,e,n,i){for(var r=x(this,[t]),o=r._storage,a=[],s=A(1/e),l=o[t],u=this.count(),c=r._rawExtent[t],h=new(p(this))(u),d=0,f=0;f<u;f+=s){s>u-f&&(s=u-f,a.length=s);for(var v=0;v<s;v++){var y=this.getRawIndex(f+v);a[v]=l[y]}var m=n(a),_=this.getRawIndex(Math.min(f+i(a,m)||0,u-1));l[_]=m,m<c[0]&&(c[0]=m),m>c[1]&&(c[1]=m),h[d++]=_}return r._count=d,r._indices=h,r.getRawIndex=g,r},t.prototype.lttbDownSample=function(t,e){var n,i,r,o=x(this,[]),a=o._storage[t],s=this.count(),l=new(p(this))(s),u=0,c=A(1/e),h=this.getRawIndex(0);l[u++]=h;for(var d=1;d<s-1;d+=c){for(var f=Math.min(d+c,s-1),v=Math.min(d+2*c,s),y=(v+f)/2,m=0,_=f;_<v;_++){var b=a[C=this.getRawIndex(_)];isNaN(b)||(m+=b)}m/=v-f;var w=d,S=Math.min(d+c,s),T=d-1,M=a[h];for(n=-1,r=w,_=w;_<S;_++){var C;b=a[C=this.getRawIndex(_)],isNaN(b)||(i=Math.abs((T-y)*(b-M)-(T-_)*(m-M)))>n&&(n=i,r=C)}l[u++]=r,h=r}return l[u++]=this.getRawIndex(s-1),o._count=u,o._indices=l,o.getRawIndex=g,o},t.prototype.getItemModel=function(t){var e=this.hostModel,n=this.getRawDataItem(t);return new r.Z(n,e,e&&e.ecModel)},t.prototype.diff=function(t){var e=this;return new o.Z(t?t.getIndices():[],this.getIndices(),(function(e){return v(t,e)}),(function(t){return v(e,t)}))},t.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},t.prototype.setVisual=function(t,e){this._visual=this._visual||{},I(t)?i.l7(this._visual,t):this._visual[t]=e},t.prototype.getItemVisual=function(t,e){var n=this._itemVisuals[t],i=n&&n[e];return null==i?this.getVisual(e):i},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,r=n[t];r||(r=n[t]={});var o=r[e];return null==o&&(o=this.getVisual(e),i.kJ(o)?o=o.slice():I(o)&&(o=i.l7({},o)),r[e]=o),o},t.prototype.setItemVisual=function(t,e,n){var r=this._itemVisuals[t]||{};this._itemVisuals[t]=r,I(e)?i.l7(r,e):r[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){if(I(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?i.l7(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel;if(e){var i=(0,M.A)(e);i.dataIndex=t,i.dataType=this.dataType,i.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(w,e)}this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){i.S6(this._graphicEls,(function(n,i){n&&t&&t.call(e,n,i)}))},t.prototype.cloneShallow=function(e){if(e||(e=new t(D(this.dimensions,this.getDimensionInfo,this),this.hostModel)),e._storage=this._storage,e._storageArr=this._storageArr,S(e,this),this._indices){var n=this._indices.constructor;if(n===Array){var i=this._indices.length;e._indices=new n(i);for(var r=0;r<i;r++)e._indices[r]=this._indices[r]}else e._indices=new n(this._indices)}else e._indices=null;return e.getRawIndex=e._indices?g:f,e},t.prototype.wrapMethod=function(t,e){var n=this[t];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(i.tP(arguments)))})},t.internalField=function(){function e(t,e,n,i){return(0,C.yQ)(t[i],this._dimensionInfos[e])}c={arrayRows:e,objectRows:function(t,e,n,i){return(0,C.yQ)(t[e],this._dimensionInfos[e])},keyedColumns:e,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return!this._rawData.pure&&(0,T.Co)(t)&&(this.hasItemOption=!0),(0,C.yQ)(r instanceof Array?r[i]:r,this._dimensionInfos[e])},typedArray:function(t,e,n,i){return t[i]}},h=function(t){var e=t._invertedIndicesMap;i.S6(e,(function(n,i){var r=t._dimensionInfos[i].ordinalMeta;if(r){n=e[i]=new R(r.categories.length);for(var o=0;o<n.length;o++)n[o]=-1;for(o=0;o<t._count;o++)n[t.get(i,o)]=o}}))},y=function(t,e,n,i){var r,o=t._storageArr[e];return o&&(r=o[i],n&&n.categories.length&&(r=n.categories[r])),(0,T.U5)(r,null)},p=function(t){return t._rawCount>65535?L:E},d=function(t,e,n,i){var r=O[e.type],o=e.name;if(i){var a=t[o],s=a&&a.length;if(s!==n){for(var l=new r(n),u=0;u<s;u++)l[u]=a[u];t[o]=l}}else t[o]=new r(n)},f=function(t){return t},g=function(t){return t<this._count&&t>=0?this._indices[t]:-1},v=function(t,e){var n=t._idList[e];return null==n&&null!=t._idDimIdx&&(n=y(t,t._idDimIdx,t._idOrdinalMeta,e)),null==n&&(n="e\0\0"+e),n},_=function(t){return i.kJ(t)||(t=null!=t?[t]:[]),t},x=function(e,n){var r=e.dimensions,o=new t(D(r,e.getDimensionInfo,e),e.hostModel);S(o,e);for(var a,s,l=o._storage={},u=e._storage,c=o._storageArr=[],h=0;h<r.length;h++){var p=r[h];u[p]&&(i.cq(n,p)>=0?(l[p]=(s=void 0,(s=(a=u[p]).constructor)===Array?a.slice():new s(a)),o._rawExtent[p]=b(),o._extent[p]=null):l[p]=u[p],c.push(l[p]))}return o},b=function(){return[1/0,-1/0]},w=function(t){var e=(0,M.A)(t),n=(0,M.A)(this);e.seriesIndex=n.seriesIndex,e.dataIndex=n.dataIndex,e.dataType=n.dataType},S=function(t,e){i.S6(Z.concat(e.__wrappedMethods||[]),(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t.__wrappedMethods=e.__wrappedMethods,i.S6(N,(function(n){t[n]=i.d9(e[n])})),t._calculationInfo=i.l7({},e._calculationInfo)},m=function(t,e){var n=t._nameList,i=t._idList,r=t._nameDimIdx,o=t._idDimIdx,a=n[e],s=i[e];if(null==a&&null!=r&&(n[e]=a=y(t,r,t._nameOrdinalMeta,e)),null==s&&null!=o&&(i[e]=s=y(t,o,t._idOrdinalMeta,e)),null==s&&null!=a){var l=t._nameRepeatCount,u=l[a]=(l[a]||0)+1;s=a,u>1&&(s+="__ec__"+u),i[e]=s}}}(),t}();var z=n(6203);function F(t,e,n){if(n||null!=e.get(t)){for(var i=0;null!=e.get(t+i);)i++;t+=i}return e.set(t,!0),t}var W=n(4134),V=function(t){this.coordSysDims=[],this.axisMap=(0,i.kW)(),this.categoryAxisMap=(0,i.kW)(),this.coordSysName=t},H={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis",T.C6).models[0],o=t.getReferringComponents("yAxis",T.C6).models[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),U(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),U(o)&&(i.set("y",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis",T.C6).models[0];e.coordSysDims=["single"],n.set("single",r),U(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar",T.C6).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),U(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),U(a)&&(i.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,r){var o=t.ecModel,a=o.getComponent("parallel",t.get("parallelIndex")),s=e.coordSysDims=a.dimensions.slice();(0,i.S6)(a.parallelAxisIndex,(function(t,i){var a=o.getComponent("parallelAxis",t),l=s[i];n.set(l,a),U(a)&&(r.set(l,a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=i))}))}};function U(t){return"category"===t.get("type")}var G=n(816);const X=function(t,e,n){n=n||{},(0,k.Ld)(t)||(t=(0,k.nx)(t));var r,o=e.get("coordinateSystem"),a=W.Z.get(o),l=function(t){var e=t.get("coordinateSystem"),n=new V(e),i=H[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}(e);l&&l.coordSysDims&&(r=i.UI(l.coordSysDims,(function(t){var e={name:t},n=l.axisMap.get(t);if(n){var i=n.get("type");e.type=function(t){return"category"===t?"ordinal":"time"===t?"time":"float"}(i)}return e}))),r||(r=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var c,h,p=n.useEncodeDefaulter,d=function(t,e){return function(t,e,n){(0,k.Ld)(e)||(e=(0,k.nx)(e)),n=n||{},t=(t||[]).slice();for(var r=(n.dimsDef||[]).slice(),o=(0,i.kW)(),a=(0,i.kW)(),l=[],c=function(t,e,n,r){var o=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,r||0);return(0,i.S6)(e,(function(t){var e;(0,i.Kn)(t)&&(e=t.dimsDef)&&(o=Math.max(o,e.length))})),o}(e,t,r,n.dimCount),h=0;h<c;h++){var p=r[h],d=r[h]=(0,i.l7)({},(0,i.Kn)(p)?p:{name:p}),f=d.name,g=l[h]=new u;null!=f&&null==o.get(f)&&(g.name=g.displayName=f,o.set(f,h)),null!=d.type&&(g.type=d.type),null!=d.displayName&&(g.displayName=d.displayName)}var v=n.encodeDef;!v&&n.encodeDefaulter&&(v=n.encodeDefaulter(e,c));var y=(0,i.kW)(v);y.each((function(t,e){var n=(0,T.kF)(t).slice();if(1===n.length&&!(0,i.HD)(n[0])&&n[0]<0)y.set(e,!1);else{var r=y.set(e,[]);(0,i.S6)(n,(function(t,n){var a=(0,i.HD)(t)?o.get(t):t;null!=a&&a<c&&(r[n]=a,_(l[a],e,n))}))}}));var m=0;function _(t,e,n){null!=s.f7.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,a.set(e,!0))}(0,i.S6)(t,(function(t){var e,n,r,o;if((0,i.HD)(t))e=t,o={};else{e=(o=t).name;var a=o.ordinalMeta;o.ordinalMeta=null,(o=(0,i.d9)(o)).ordinalMeta=a,n=o.dimsDef,r=o.otherDims,o.name=o.coordDim=o.coordDimIndex=o.dimsDef=o.otherDims=null}var s=y.get(e);if(!1!==s){if(!(s=(0,T.kF)(s)).length)for(var u=0;u<(n&&n.length||1);u++){for(;m<l.length&&null!=l[m].coordDim;)m++;m<l.length&&s.push(m++)}(0,i.S6)(s,(function(t,a){var s=l[t];if(_((0,i.ce)(s,o),e,a),null==s.name&&n){var u=n[a];!(0,i.Kn)(u)&&(u={name:u}),s.name=s.displayName=u.name,s.defaultTooltip=u.defaultTooltip}r&&(0,i.ce)(s.otherDims,r)}))}}));var x=n.generateCoord,b=n.generateCoordCount,w=null!=b;b=x?b||1:0;for(var S=x||"value",M=0;M<c;M++)null==(g=l[M]=l[M]||new u).coordDim&&(g.coordDim=F(S,a,w),g.coordDimIndex=0,(!x||b<=0)&&(g.isExtraCoord=!0),b--),null==g.name&&(g.name=F(g.coordDim,o,!1)),null!=g.type||(0,z.u7)(e,M)!==z.Dq.Must&&(!g.isExtraCoord||null==g.otherDims.itemName&&null==g.otherDims.seriesName)||(g.type="ordinal");return l}((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})}(t,{coordDimensions:r,generateCoord:n.generateCoord,encodeDefaulter:i.mf(p)?p:p?i.WA(z.pY,r,e):null});l&&i.S6(d,(function(t,e){var n=t.coordDim,i=l.categoryAxisMap.get(n);i&&(null==c&&(c=e),t.ordinalMeta=i.getOrdinalMeta()),null!=t.otherDims.itemName&&(h=!0)})),h||null==c||(d[c].otherDims.itemName=0);var f=(0,G.BM)(e,d),g=new B(d,e);g.setCalculationInfo(f);var v=null!=c&&function(t){if(t.sourceFormat===s.cy){var e=function(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=e&&!i.kJ((0,T.C4)(e))}}(t)?function(t,e,n,i){return i===c?n:this.defaultDimValueGetter(t,e,n,i)}:null;return g.hasItemOption=!1,g.initData(t,null,v),g}},760:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(5495);function r(){var t=(0,i.Yf)();return function(e){var n=t(e),i=e.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}},4510:(t,e,n)=>{"use strict";n.d(e,{H:()=>o,O:()=>a});var i=n(1245),r=n(8778);function o(t,e){var n=t.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r)return(0,i.hk)(t,e,n[0]);if(r){for(var o=[],a=0;a<n.length;a++)o.push((0,i.hk)(t,e,n[a]));return o.join(" ")}}function a(t,e){var n=t.mapDimensionsAll("defaultedLabel");if(!(0,r.kJ)(e))return e+"";for(var i=[],o=0;o<n.length;o++){var a=t.getDimensionInfo(n[o]);a&&i.push(e[a.index])}return i.join(" ")}},9894:(t,e,n)=>{"use strict";var i=n(8966),r=n(9312),o=n(2069),a=n(4689),s=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.legendSymbol="line",n}return(0,r.ZT)(e,t),e.prototype.getInitialData=function(t){return(0,o.Z)(this.getSource(),this,{useEncodeDefaulter:!0})},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={zlevel:0,z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0,lineStyle:{width:"bolder"}},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0},e}(a.Z);a.Z.registerClass(s);var l=n(8778),u=n(3696),c=n(3111),h=n(1563),p=n(106),d=n(9199),f=n(4510),g=n(5628),v=n(6781);function y(t,e){this.parent.drift(t,e)}const m=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.updateData(e,n,i,r),o}return(0,r.ZT)(e,t),e.prototype._createSymbol=function(t,e,n,i,r){this.removeAll();var o=(0,c.t)(t,-1,-1,2,2,null,r);o.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),o.drift=y,this._symbolType=t,this.add(o)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){(0,p.fD)(this.childAt(0))},e.prototype.downplay=function(){(0,p.Mh)(this.childAt(0))},e.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},e.prototype.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},e.prototype.updateData=function(t,n,i,r){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",a=t.hostModel,s=e.getSymbolSize(t,n),l=o!==this._symbolType,c=r&&r.disableAnimation;if(l){var h=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,s,h)}else{(d=this.childAt(0)).silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};c?d.attr(p):u.updateProps(d,p,a,n)}if(this._updateCommon(t,n,s,i,r),l){var d=this.childAt(0);c||(p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}},d.scaleX=d.scaleY=0,d.style.opacity=0,u.initProps(d,p,a,n))}c&&this.childAt(0).stopAnimation("remove"),this._seriesModel=a},e.prototype._updateCommon=function(t,e,n,i,r){var o,a,s,u,c,h,y,m,_,x=this.childAt(0),b=t.hostModel;if(i&&(o=i.emphasisItemStyle,a=i.blurItemStyle,s=i.selectItemStyle,u=i.focus,c=i.blurScope,h=i.symbolOffset,y=i.labelStatesModels,m=i.hoverScale,_=i.cursorStyle),!i||t.hasItemOption){var w=i&&i.itemModel?i.itemModel:t.getItemModel(e),S=w.getModel("emphasis");o=S.getModel("itemStyle").getItemStyle(),s=w.getModel(["select","itemStyle"]).getItemStyle(),a=w.getModel(["blur","itemStyle"]).getItemStyle(),u=S.get("focus"),c=S.get("blurScope"),h=w.getShallow("symbolOffset"),y=(0,g.k3)(w),m=S.getShallow("scale"),_=w.getShallow("cursor")}var T=t.getItemVisual(e,"symbolRotate");x.attr("rotation",(T||0)*Math.PI/180||0),h&&(x.x=(0,d.GM)(h[0],n[0]),x.y=(0,d.GM)(h[1],n[1])),_&&x.attr("cursor",_);var M=t.getItemVisual(e,"style"),C=M.fill;if(x instanceof v.ZP){var k=x.style;x.useStyle((0,l.l7)({image:k.image,x:k.x,y:k.y,width:k.width,height:k.height},M))}else x.__isEmptyBrush?x.useStyle((0,l.l7)({},M)):x.useStyle(M),x.style.decal=null,x.setColor(C,r&&r.symbolInnerColor),x.style.strokeNoScale=!0;var A=t.getItemVisual(e,"liftZ"),I=this._z2;null!=A?null==I&&(this._z2=x.z2,x.z2+=A):null!=I&&(x.z2=I,this._z2=null);var D=r&&r.useNameLabel;(0,g.ni)(x,y,{labelFetcher:b,labelDataIndex:e,defaultText:function(e){return D?t.getName(e):(0,f.H)(t,e)},inheritColor:C,defaultOpacity:M.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var P=x.ensureState("emphasis");if(P.style=o,x.ensureState("select").style=s,x.ensureState("blur").style=a,m){var O=Math.max(1.1,3/this._sizeY);P.scaleX=this._sizeX*O,P.scaleY=this._sizeY*O}this.setSymbolScale(1),(0,p.vF)(this,u,c)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,e){var n=this.childAt(0),i=this._seriesModel,r=(0,h.A)(this).dataIndex,o=e&&e.animation;if(this.silent=n.silent=!0,e&&e.fadeLabel){var a=n.getTextContent();a&&u.removeElement(a,{style:{opacity:0}},i,{dataIndex:r,removeOpt:o,cb:function(){n.removeTextContent()}})}else n.removeTextContent();u.removeElement(n,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:r,cb:t,removeOpt:o})},e.getSymbolSize=function(t,e){var n=t.getItemVisual(e,"symbolSize");return n instanceof Array?n.slice():[+n,+n]},e}(u.Group);function _(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function x(t){return null==t||(0,l.Kn)(t)||(t={isIgnore:t}),t||{}}function b(t){var e=t.hostModel,n=e.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverScale:n.get("scale"),labelStatesModels:(0,g.k3)(e),cursorStyle:e.get("cursor")}}const w=function(){function t(t){this.group=new u.Group,this._SymbolCtor=t||m}return t.prototype.updateData=function(t,e){e=x(e);var n=this.group,i=t.hostModel,r=this._data,o=this._SymbolCtor,a=e.disableAnimation,s=b(t),l={disableAnimation:a},c=e.getSymbolPoint||function(e){return t.getItemLayout(e)};r||n.removeAll(),t.diff(r).add((function(i){var r=c(i);if(_(t,r,i,e)){var a=new o(t,i,s,l);a.setPosition(r),t.setItemGraphicEl(i,a),n.add(a)}})).update((function(h,p){var d=r.getItemGraphicEl(p),f=c(h);if(_(t,f,h,e)){if(d){d.updateData(t,h,s,l);var g={x:f[0],y:f[1]};a?d.attr(g):u.updateProps(d,g,i)}else(d=new o(t,h)).setPosition(f);n.add(d),t.setItemGraphicEl(h,d)}else n.remove(d)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut((function(){n.remove(e)}))})).execute(),this._getSymbolPoint=c,this._data=t},t.prototype.isPersistent=function(){return!0},t.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl((function(e,n){var i=t._getSymbolPoint(n);e.setPosition(i),e.markRedraw()}))},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=b(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}n=x(n);for(var r=t.start;r<t.end;r++){var o=e.getItemLayout(r);if(_(e,o,r,n)){var a=new this._SymbolCtor(e,r,this._seriesScope);a.traverse(i),a.setPosition(o),this.group.add(a),e.setItemGraphicEl(r,a)}}},t.prototype.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl((function(t){t.fadeOut((function(){e.remove(t)}))})):e.removeAll()},t}();var S=n(816);function T(t,e,n){var i=t.getBaseAxis(),r=t.getOtherAxis(i),o=function(t,e){var n=0,i=t.scale.getExtent();return"start"===e?n=i[0]:"end"===e?n=i[1]:i[0]>0?n=i[0]:i[1]<0&&(n=i[1]),n}(r,n),a=i.dim,s=r.dim,u=e.mapDimension(s),c=e.mapDimension(a),h="x"===s||"radius"===s?1:0,p=(0,l.UI)(t.dimensions,(function(t){return e.mapDimension(t)})),d=!1,f=e.getCalculationInfo("stackResultDimension");return(0,S.M)(e,p[0])&&(d=!0,p[0]=f),(0,S.M)(e,p[1])&&(d=!0,p[1]=f),{dataDimsForPoint:p,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!d,valueDim:u,baseDim:c,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function M(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}var C="undefined"!=typeof Float32Array,k=C?Float32Array:Array;function A(t){return(0,l.kJ)(t)?C?new Float32Array(t):t:new k(t)}var I=n(5495),D=n(391),P=n(2397),O=n(3475),L=Math.min,R=Math.max;function E(t,e){return isNaN(t)||isNaN(e)}function Z(t,e,n,i,r,o,a,s,l){for(var u,c,h,p,d,f,g=n,v=0;v<i;v++){var y=e[2*g],m=e[2*g+1];if(g>=r||g<0)break;if(E(y,m)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](y,m),h=y,p=m;else{var _=y-u,x=m-c;if(_*_+x*x<.5){g+=o;continue}if(a>0){var b=g+o,w=e[2*b],S=e[2*b+1],T=v+1;if(l)for(;E(w,S)&&T<i;)T++,w=e[2*(b+=o)],S=e[2*b+1];var M=.5,C=0,k=0,A=void 0,I=void 0;if(T>=i||E(w,S))d=y,f=m;else{C=w-u,k=S-c;var D=y-u,P=w-y,O=m-c,Z=S-m,N=void 0,B=void 0;"x"===s?(N=Math.abs(D),B=Math.abs(P),d=y-N*a,f=m,A=y+N*a,I=m):"y"===s?(N=Math.abs(O),B=Math.abs(Z),d=y,f=m-N*a,A=y,I=m+N*a):(N=Math.sqrt(D*D+O*O),d=y-C*a*(1-(M=(B=Math.sqrt(P*P+Z*Z))/(B+N))),f=m-k*a*(1-M),I=m+k*a*M,A=L(A=y+C*a*M,R(w,y)),I=L(I,R(S,m)),A=R(A,L(w,y)),f=m-(k=(I=R(I,L(S,m)))-m)*N/B,d=L(d=y-(C=A-y)*N/B,R(u,y)),f=L(f,R(c,m)),A=y+(C=y-(d=R(d,L(u,y))))*B/N,I=m+(k=m-(f=R(f,L(c,m))))*B/N)}t.bezierCurveTo(h,p,d,f,y,m),h=A,p=I}else t.lineTo(y,m)}u=y,c=m,g+=o}return v}var N=function(){this.smooth=0,this.smoothConstraint=!0},B=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return(0,r.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new N},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0&&E(n[2*r-2],n[2*r-1]);r--);for(;i<r&&E(n[2*i],n[2*i+1]);i++);}for(;i<r;)i+=Z(t,n,i,r,r,1,e.smooth,e.smoothMonotone,e.connectNulls)+1},e.prototype.getPointOn=function(t,e){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,i,r=this.path.data,o=P.Z.CMD,a="x"===e,s=[],l=0;l<r.length;){var u=void 0,c=void 0,h=void 0,p=void 0,d=void 0,f=void 0,g=void 0;switch(r[l++]){case o.M:n=r[l++],i=r[l++];break;case o.L:if(u=r[l++],c=r[l++],(g=a?(t-n)/(u-n):(t-i)/(c-i))<=1&&g>=0){var v=a?(c-i)*g+i:(u-n)*g+n;return a?[t,v]:[v,t]}n=u,i=c;break;case o.C:u=r[l++],c=r[l++],h=r[l++],p=r[l++],d=r[l++],f=r[l++];var y=a?(0,O.kD)(n,u,h,d,t,s):(0,O.kD)(i,c,p,f,t,s);if(y>0)for(var m=0;m<y;m++){var _=s[m];if(_<=1&&_>=0)return v=a?(0,O.af)(i,c,p,f,_):(0,O.af)(n,u,h,d,_),a?[t,v]:[v,t]}n=d,i=f}}},e}(D.ZP),z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e}(N),F=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return(0,r.ZT)(e,t),e.prototype.getDefaultShape=function(){return new z},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0&&E(n[2*o-2],n[2*o-1]);o--);for(;r<o&&E(n[2*r],n[2*r+1]);r++);}for(;r<o;){var s=Z(t,n,r,o,o,1,e.smooth,a,e.connectNulls);Z(t,i,r+s-1,s,o,-1,e.stackedOnSmooth,a,e.connectNulls),r+=s+1,t.closePath()}},e}(D.ZP),W=n(2916),V=n(823),H=n(5320);function U(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++)if(t[n]!==e[n])return;return!0}}function G(t){for(var e=1/0,n=1/0,i=-1/0,r=-1/0,o=0;o<t.length;){var a=t[o++],s=t[o++];isNaN(a)||(e=Math.min(a,e),i=Math.max(a,i)),isNaN(s)||(n=Math.min(s,n),r=Math.max(s,r))}return[[e,n],[i,r]]}function X(t,e){var n=G(t),i=n[0],r=n[1],o=G(e),a=o[0],s=o[1];return Math.max(Math.abs(i[0]-a[0]),Math.abs(i[1]-a[1]),Math.abs(r[0]-s[0]),Math.abs(r[1]-s[1]))}function Y(t){return"number"==typeof t?t:t?.5:0}function j(t,e,n){for(var i=e.getBaseAxis(),r="x"===i.dim||"radius"===i.dim?0:1,o=[],a=0,s=[],l=[],u=[];a<t.length-2;a+=2)switch(u[0]=t[a+2],u[1]=t[a+3],l[0]=t[a],l[1]=t[a+1],o.push(l[0],l[1]),n){case"end":s[r]=u[r],s[1-r]=l[1-r],o.push(s[0],s[1]);break;case"middle":var c=(l[r]+u[r])/2,h=[];s[r]=h[r]=c,s[1-r]=l[1-r],h[1-r]=u[1-r],o.push(s[0],s[1]),o.push(h[0],h[1]);break;default:s[r]=l[r],s[1-r]=u[1-r],o.push(s[0],s[1])}return o.push(t[a++],t[a++]),o}function $(t,e){return[t[2*e],t[2*e+1]]}function q(t,e,n,i){if((0,H.H)(e,"cartesian2d")){var r=i.getModel("endLabel"),o=r.get("show"),a=r.get("valueAnimation"),s=i.getData(),l={lastFrameIndex:0},u=o?function(n,i){t._endLabelOnDuring(n,i,s,l,a,r,e)}:null,c=e.getBaseAxis().isHorizontal(),h=(0,V.ID)(e,n,i,(function(){var e=t._endLabel;e&&n&&null!=l.originalX&&e.attr({x:l.originalX,y:l.originalY})}),u);if(!i.get("clip",!0)){var p=h.shape,d=Math.max(p.width,p.height);c?(p.y-=d,p.height+=2*d):(p.x-=d,p.width+=2*d)}return u&&u(1,h),h}return(0,V.X0)(e,n,i)}var K=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.init=function(){var t=new u.Group,e=new w;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},e.prototype.render=function(t,e,n){var i=this,r=t.coordinateSystem,o=this.group,a=t.getData(),s=t.getModel("lineStyle"),c=t.getModel("areaStyle"),d=a.getLayout("points")||[],f="polar"===r.type,g=this._coordSys,v=this._symbolDraw,y=this._polyline,_=this._polygon,x=this._lineGroup,b=t.get("animation"),w=!c.isEmpty(),S=c.get("origin"),C=T(r,a,S),k=w&&function(t,e,n){if(!n.valueDim)return[];for(var i=e.count(),r=A(2*i),o=0;o<i;o++){var a=M(n,t,e,o);r[2*o]=a[0],r[2*o+1]=a[1]}return r}(r,a,C),I=t.get("showSymbol"),D=I&&!f&&function(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var o=n.getAxesByScale("ordinal")[0];if(o&&(!r||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),o=Math.max(1,Math.round(r/5)),a=0;a<r;a+=o)if(1.5*m.getSymbolSize(e,a)[t.isHorizontal()?1:0]>i)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return l.S6(o.getViewLabels(),(function(t){s[t.tickValue]=1})),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}(t,a,r),P=this._data;P&&P.eachItemGraphicEl((function(t,e){t.__temp&&(o.remove(t),P.setItemGraphicEl(e,null))})),I||v.remove(),o.add(x);var O,L=!f&&t.get("step");r&&r.getArea&&t.get("clip",!0)&&(null!=(O=r.getArea()).width?(O.x-=.1,O.y-=.1,O.width+=.2,O.height+=.2):O.r0&&(O.r0-=.5,O.r+=.5)),this._clipShapeForSymbol=O,y&&g.type===r.type&&L===this._step?(w&&!_?_=this._newPolygon(d,k):_&&!w&&(x.remove(_),_=this._polygon=null),f||this._initOrUpdateEndLabel(t,r),x.setClipPath(q(this,r,!1,t)),I&&v.updateData(a,{isIgnore:D,clipShape:O,disableAnimation:!0,getSymbolPoint:function(t){return[d[2*t],d[2*t+1]]}}),U(this._stackedOnPoints,k)&&U(this._points,d)||(b?this._doUpdateAnimation(a,k,r,n,L,S):(L&&(d=j(d,r,L),k&&(k=j(k,r,L))),y.setShape({points:d}),_&&_.setShape({points:d,stackedOnPoints:k})))):(I&&v.updateData(a,{isIgnore:D,clipShape:O,disableAnimation:!0,getSymbolPoint:function(t){return[d[2*t],d[2*t+1]]}}),b&&this._initSymbolLabelAnimation(a,r,O),L&&(d=j(d,r,L),k&&(k=j(k,r,L))),y=this._newPolyline(d),w&&(_=this._newPolygon(d,k)),f||this._initOrUpdateEndLabel(t,r),x.setClipPath(q(this,r,!0,t)));var R=function(t,e){var n=t.getVisual("visualMeta");if(n&&n.length&&t.count()&&"cartesian2d"===e.type){for(var i,r,o=n.length-1;o>=0;o--){var a=n[o].dimension,s=t.dimensions[a],c=t.getDimensionInfo(s);if("x"===(i=c&&c.coordDim)||"y"===i){r=n[o];break}}if(r){var h=e.getAxis(i),p=l.UI(r.stops,(function(t){return{offset:0,coord:h.toGlobalCoord(h.dataToCoord(t.value)),color:t.color}})),d=p.length,f=r.outerColors.slice();d&&p[0].coord>p[d-1].coord&&(p.reverse(),f.reverse());var g=p[0].coord-10,v=p[d-1].coord+10,y=v-g;if(y<.001)return"transparent";l.S6(p,(function(t){t.offset=(t.coord-g)/y})),p.push({offset:d?p[d-1].offset:.5,color:f[1]||"transparent"}),p.unshift({offset:d?p[0].offset:.5,color:f[0]||"transparent"});var m=new u.LinearGradient(0,0,0,0,p,!0);return m[i]=g,m[i+"2"]=v,m}}}(a,r)||a.getVisual("style")[a.getVisual("drawType")],E=t.get(["emphasis","focus"]),Z=t.get(["emphasis","blurScope"]);y.useStyle(l.ce(s.getLineStyle(),{fill:"none",stroke:R,lineJoin:"bevel"})),(0,p.WO)(y,t,"lineStyle"),y.style.lineWidth>0&&"bolder"===t.get(["emphasis","lineStyle","width"])&&(y.getState("emphasis").style.lineWidth=y.style.lineWidth+1),(0,h.A)(y).seriesIndex=t.seriesIndex,(0,p.vF)(y,E,Z);var N=Y(t.get("smooth")),B=t.get("smoothMonotone"),z=t.get("connectNulls");if(y.setShape({smooth:N,smoothMonotone:B,connectNulls:z}),_){var F=a.getCalculationInfo("stackedOnSeries"),W=0;_.useStyle(l.ce(c.getAreaStyle(),{fill:R,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),F&&(W=Y(F.get("smooth"))),_.setShape({smooth:N,stackedOnSmooth:W,smoothMonotone:B,connectNulls:z}),(0,p.WO)(_,t,"areaStyle"),(0,h.A)(_).seriesIndex=t.seriesIndex,(0,p.vF)(_,E,Z)}var V=function(t){i._changePolyState(t)};a.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=V)})),this._polyline.onHoverStateChange=V,this._data=a,this._coordSys=r,this._stackedOnPoints=k,this._points=d,this._step=L,this._valueOrigin=S},e.prototype.dispose=function(){},e.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=I.gO(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;(s=new m(r,o)).x=l,s.y=u,s.setZ(t.get("zlevel"),t.get("z")),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else W.Z.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getData(),o=I.gO(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else W.Z.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;(0,p.Gl)(this._polyline,t),e&&(0,p.Gl)(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new B({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new F({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,r,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");"function"==typeof l&&(l=l(null));var u=s.get("animationDelay")||0,c="function"==typeof u?u(null):u;t.eachItemGraphicEl((function(t,o){var s=t;if(s){var h=[t.x,t.y],p=void 0,d=void 0,f=void 0;if(r){var g=n,v=e.pointToCoord(h);i?(p=g.startAngle,d=g.endAngle,f=-v[1]/180*Math.PI):(p=g.r0,d=g.r,f=v[0])}else{var y=n;i?(p=y.x,d=y.x+y.width,f=t.x):(p=y.y+y.height,d=y.y,f=t.y)}var m=d===p?0:(f-p)/(d-p);a&&(m=1-m);var _="function"==typeof u?u(o):l*m+c,x=s.getSymbolPath(),b=x.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,delay:_}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:_}),x.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e){var n=t.getModel("endLabel");if(n.get("show")){var i=t.getData(),r=this._polyline,o=this._endLabel;o||((o=this._endLabel=new u.Text({z2:200})).ignoreClip=!0,r.setTextContent(this._endLabel),r.disableLabelAnimation=!0);var a=function(t){for(var e,n,i=t.length/2;i>0&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}(i.getLayout("points"));a>=0&&(0,g.ni)(o,(0,g.k3)(t,"endLabel"),{labelFetcher:t,labelDataIndex:a,defaultText:function(t,e,n){return n?(0,f.O)(i,n):(0,f.H)(i,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),r=n.inverse,o=i?r?"right":"left":"center",a=i?"middle":r?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a,padding:t.get("distance")||0}}}(n,e))}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,h=c.get("connectNulls"),p=o.get("precision"),d=a.getBaseAxis(),f=d.isHorizontal(),v=d.inverse,y=e.shape,m=v?f?y.x:y.y+y.height:f?y.x+y.width:y.y,_=f?"x":"y",x=function(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u<o;u++)if(r=t[2*u+a],!isNaN(r)&&!isNaN(t[2*u+1-a]))if(0!==u){if(i<=e&&r>=e||i>=e&&r<=e){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}(u,m,_),b=x.range,w=b[1]-b[0],S=void 0;if(w>=1){if(w>1&&!h){var T=$(u,b[0]);s.attr({x:T[0],y:T[1]}),r&&(S=c.getRawValue(b[0]))}else{(T=l.getPointOn(m,_))&&s.attr({x:T[0],y:T[1]});var M=c.getRawValue(b[0]),C=c.getRawValue(b[1]);r&&(S=I.pk(n,p,M,C,x.t))}i.lastFrameIndex=b[0]}else{var k=1===t||i.lastFrameIndex>0?b[0]:0;T=$(u,k),r&&(S=c.getRawValue(k)),s.attr({x:T[0],y:T[1]})}r&&(0,g.qA)(s).setLabelText(S)}},e.prototype._doUpdateAnimation=function(t,e,n,i,r,o){var a=this._polyline,s=this._polygon,l=t.hostModel,c=function(t,e,n,i,r,o,a,s){for(var l=function(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}(t,e),u=[],c=[],h=[],p=[],d=[],f=[],g=[],v=T(r,e,a),y=T(o,t,s),m=t.getLayout("points")||[],_=e.getLayout("points")||[],x=0;x<l.length;x++){var b=l[x],w=!0,S=void 0,C=void 0;switch(b.cmd){case"=":S=2*b.idx,C=2*b.idx1;var k=m[S],I=m[S+1],D=_[C],P=_[C+1];(isNaN(k)||isNaN(I))&&(k=D,I=P),u.push(k,I),c.push(D,P),h.push(n[S],n[S+1]),p.push(i[C],i[C+1]),g.push(e.getRawIndex(b.idx1));break;case"+":var O=b.idx,L=v.dataDimsForPoint,R=r.dataToPoint([e.get(L[0],O),e.get(L[1],O)]);C=2*O,u.push(R[0],R[1]),c.push(_[C],_[C+1]);var E=M(v,r,e,O);h.push(E[0],E[1]),p.push(i[C],i[C+1]),g.push(e.getRawIndex(O));break;case"-":var Z=b.idx,N=t.getRawIndex(Z),B=y.dataDimsForPoint;if(S=2*Z,N!==Z){var z=o.dataToPoint([t.get(B[0],Z),t.get(B[1],Z)]),F=M(y,o,t,Z);u.push(m[S],m[S+1]),c.push(z[0],z[1]),h.push(n[S],n[S+1]),p.push(F[0],F[1]),g.push(N)}else w=!1}w&&(d.push(b),f.push(f.length))}f.sort((function(t,e){return g[t]-g[e]}));var W=u.length,V=A(W),H=A(W),U=A(W),G=A(W),X=[];for(x=0;x<f.length;x++){var Y=f[x],j=2*x,$=2*Y;V[j]=u[$],V[j+1]=u[$+1],H[j]=c[$],H[j+1]=c[$+1],U[j]=h[$],U[j+1]=h[$+1],G[j]=p[$],G[j+1]=p[$+1],X[x]=d[Y]}return{current:V,next:H,stackedOnCurrent:U,stackedOnNext:G,status:X}}(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,o),h=c.current,p=c.stackedOnCurrent,d=c.next,f=c.stackedOnNext;if(r&&(h=j(c.current,n,r),p=j(c.stackedOnCurrent,n,r),d=j(c.next,n,r),f=j(c.stackedOnNext,n,r)),X(h,d)>3e3||s&&X(p,f)>3e3)return a.setShape({points:d}),void(s&&s.setShape({points:d,stackedOnPoints:f}));a.shape.__points=c.current,a.shape.points=h;var g={shape:{points:d}};c.current!==h&&(g.shape.__points=c.next),a.stopAnimation(),u.updateProps(a,g,l),s&&(s.setShape({points:h,stackedOnPoints:p}),s.stopAnimation(),u.updateProps(s,{shape:{stackedOnPoints:f}},l),a.shape.points!==s.shape.points&&(s.shape.points=a.shape.points));for(var v=[],y=c.status,m=0;m<y.length;m++)if("="===y[m].cmd){var _=t.getItemGraphicEl(y[m].idx1);_&&v.push({el:_,ptIdx:m})}a.animators&&a.animators.length&&a.animators[0].during((function(){s&&s.dirtyShape();for(var t=a.shape.__points,e=0;e<v.length;e++){var n=v[e].el,i=2*v[e].ptIdx;n.x=t[i],n.y=t[i+1],n.markRedraw()}}))},e.prototype.remove=function(t){var e=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl((function(t,i){t.__temp&&(e.remove(t),n.setItemGraphicEl(i,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(W.Z);W.Z.registerClass(K);var J=n(760),Q=n(6774);n(5826),i.registerLayout((!0,{seriesType:"line",plan:(0,J.Z)(),reset:function(t){var e=t.getData(),n=t.coordinateSystem;t.pipelineContext;if(n){var i=(0,l.UI)(n.dimensions,(function(t){return e.mapDimension(t)})).slice(0,2),r=i.length,o=e.getCalculationInfo("stackResultDimension");(0,S.M)(e,i[0])&&(i[0]=o),(0,S.M)(e,i[1])&&(i[1]=o);var a=e.getDimensionInfo(i[0]),s=e.getDimensionInfo(i[1]),u=a&&a.index,c=s&&s.index;return r&&{progress:function(t,e){for(var i=A((t.end-t.start)*r),o=[],a=[],s=t.start,l=0;s<t.end;s++){var h=void 0;if(1===r){var p=e.getByDimIdx(u,s);h=n.dataToPoint(p,null,a)}else o[0]=e.getByDimIdx(u,s),o[1]=e.getByDimIdx(c,s),h=n.dataToPoint(o,null,a);i[l++]=h[0],i[l++]=h[1]}e.setLayout("points",i)}}}}})),i.registerProcessor(i.PRIORITY.PROCESSOR.STATISTIC,(0,Q.Z)("line"))},4566:(t,e,n)=>{"use strict";n.d(e,{KM:()=>o,iG:()=>s,r:()=>l,np:()=>u,zm:()=>h});var i=n(4708),r=n(8778);function o(t,e){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,n){var o=e.getComponent("tooltip"),s=e.getComponent("axisPointer"),l=s.get("link",!0)||[],u=[];(0,r.S6)(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var p=h(n.model),d=t.coordSysAxesInfo[p]={};t.coordSysMap[p]=n;var f=n.model.getModel("tooltip",o);if((0,r.S6)(n.getAxes(),(0,r.WA)(m,!1,null)),n.getTooltipAxes&&o&&f.get("show")){var g="axis"===f.get("trigger"),v="cross"===f.get(["axisPointer","type"]),y=n.getTooltipAxes(f.get(["axisPointer","axis"]));(g||v)&&(0,r.S6)(y.baseAxes,(0,r.WA)(m,!v||"cross",g)),v&&(0,r.S6)(y.otherAxes,(0,r.WA)(m,"cross",!1))}}function m(o,p,g){var v=g.model.getModel("axisPointer",s),y=v.get("show");if(y&&("auto"!==y||o||c(v))){null==p&&(p=v.get("triggerTooltip"));var m=(v=o?function(t,e,n,o,a,s){var l=e.getModel("axisPointer"),u={};(0,r.S6)(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(t){u[t]=(0,r.d9)(l.get(t))})),u.snap="category"!==t.type&&!!s,"cross"===l.get("type")&&(u.type="line");var c=u.label||(u.label={});if(null==c.show&&(c.show=!1),"cross"===a){var h=l.get(["label","show"]);if(c.show=null==h||h,!s){var p=u.lineStyle=l.get("crossStyle");p&&(0,r.ce)(c,p.textStyle)}}return t.model.getModel("axisPointer",new i.Z(u,n,o))}(g,f,s,e,o,p):v).get("snap"),_=h(g.model),x=p||m||"category"===g.type,b=t.axesInfo[_]={key:_,axis:g,coordSys:n,axisPointerModel:v,triggerTooltip:p,involveSeries:x,snap:m,useHandle:c(v),seriesModels:[],linkGroup:null};d[_]=b,t.seriesInvolved=t.seriesInvolved||x;var w=function(t,e){for(var n=e.model,i=e.dim,r=0;r<t.length;r++){var o=t[r]||{};if(a(o[i+"AxisId"],n.id)||a(o[i+"AxisIndex"],n.componentIndex)||a(o[i+"AxisName"],n.name))return r}}(l,g);if(null!=w){var S=u[w]||(u[w]={axesInfo:{}});S.axesInfo[_]=b,S.mapper=l[w].mapper,b.linkGroup=S}}}}))}(n,t,e),n.seriesInvolved&&function(t,e){e.eachSeries((function(e){var n=e.coordinateSystem,i=e.get(["tooltip","trigger"],!0),o=e.get(["tooltip","show"],!0);n&&"none"!==i&&!1!==i&&"item"!==i&&!1!==o&&!1!==e.get(["axisPointer","show"],!0)&&(0,r.S6)(t.coordSysAxesInfo[h(n.model)],(function(t){var i=t.axis;n.getAxis(i.dim)===i&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())}))}))}(n,t),n}function a(t,e){return"all"===t||(0,r.kJ)(t)&&(0,r.cq)(t,e)>=0||t===e}function s(t){var e=l(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=c(n);null==o&&(r.status=s?"show":"hide");var u=i.getExtent().slice();u[0]>u[1]&&u.reverse(),(null==a||a>u[1])&&(a=u[1]),a<u[0]&&(a=u[0]),r.value=a,s&&(r.status=e.axis.scale.isBlank()?"hide":"show")}}function l(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[h(t)]}function u(t){var e=l(t);return e&&e.axisPointerModel}function c(t){return!!t.get(["handle","show"])}function h(t){return t.type+"||"+t.id}},8637:(t,e,n)=>{"use strict";n.d(e,{Z:()=>x});var i=n(8778),r=n(3696),o=n(1563),a=n(5628),s=n(4708),l=n(9199),u=n(3111),c=n(561),h=n(213),p=n(3493),d=Math.PI,f=function(){function t(t,e){this.group=new r.Group,this.opt=e,this.axisModel=t,(0,i.ce)(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new r.Group({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(t){return!!g[t]},t.prototype.add=function(t){g[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,n){var i,r,o=(0,l.wW)(e-t);return(0,l.mW)(o)?(r=n>0?"top":"bottom",i="center"):(0,l.mW)(o-d)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o<d?n>0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),g={axisLine:function(t,e,n,o){var a=e.get(["axisLine","show"]);if("auto"===a&&t.handleAutoShown&&(a=t.handleAutoShown("axisLine")),a){var s=e.axis.getExtent(),l=o.transform,c=[s[0],0],p=[s[1],0];l&&((0,h.Ne)(c,c,l),(0,h.Ne)(p,p,l));var d=(0,i.l7)({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),f=new r.Line({subPixelOptimize:!0,shape:{x1:c[0],y1:c[1],x2:p[0],y2:p[1]},style:d,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});f.anid="line",n.add(f);var g=e.get(["axisLine","symbol"]),v=e.get(["axisLine","symbolSize"]),y=e.get(["axisLine","symbolOffset"])||0;if("number"==typeof y&&(y=[y,y]),null!=g){"string"==typeof g&&(g=[g,g]),"string"!=typeof v&&"number"!=typeof v||(v=[v,v]);var m=v[0],_=v[1];(0,i.S6)([{rotate:t.rotation+Math.PI/2,offset:y[0],r:0},{rotate:t.rotation-Math.PI/2,offset:y[1],r:Math.sqrt((c[0]-p[0])*(c[0]-p[0])+(c[1]-p[1])*(c[1]-p[1]))}],(function(e,i){if("none"!==g[i]&&null!=g[i]){var r=(0,u.t)(g[i],-m/2,-_/2,m,_,d.stroke,!0),o=e.r+e.offset;r.attr({rotation:e.rotate,x:c[0]+o*Math.cos(t.rotation),y:c[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}}))}}},axisTickLabel:function(t,e,n,l){var u=function(t,e,n,r){var o=n.axis,a=n.getModel("axisTick"),s=a.get("show");if("auto"===s&&r.handleAutoShown&&(s=r.handleAutoShown("axisTick")),s&&!o.scale.isBlank()){for(var l=a.getModel("lineStyle"),u=r.tickDirection*a.get("length"),c=_(o.getTicksCoords(),e.transform,u,(0,i.ce)(l.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;h<c.length;h++)t.add(c[h]);return c}}(n,l,e,t),c=function(t,e,n,l){var u=n.axis;if((0,i.Jv)(l.axisLabelShow,n.get(["axisLabel","show"]))&&!u.scale.isBlank()){var c=n.getModel("axisLabel"),h=c.get("margin"),p=u.getViewLabels(),g=((0,i.Jv)(l.labelRotate,c.get("rotate"))||0)*d/180,v=f.innerTextLayout(l.rotation,g,l.labelDirection),y=n.getCategories&&n.getCategories(!0),m=[],_=f.isLabelSilent(n),x=n.get("triggerEvent");return(0,i.S6)(p,(function(p,d){var g="ordinal"===u.scale.type?u.scale.getRawIndex(p.tickValue):p.tickValue,b=p.formattedLabel,w=p.rawLabel,S=c;if(y&&y[g]){var T=y[g];(0,i.Kn)(T)&&T.textStyle&&(S=new s.Z(T.textStyle,c,n.ecModel))}var M=S.getTextColor()||n.get(["axisLine","lineStyle","color"]),C=u.dataToCoord(g),k=new r.Text({x:C,y:l.labelOffset+l.labelDirection*h,rotation:v.rotation,silent:_,z2:10,style:(0,a.Lr)(S,{text:b,align:S.getShallow("align",!0)||v.textAlign,verticalAlign:S.getShallow("verticalAlign",!0)||S.getShallow("baseline",!0)||v.textVerticalAlign,fill:"function"==typeof M?M("category"===u.type?w:"value"===u.type?g+"":g,d):M})});if(k.anid="label_"+g,x){var A=f.makeAxisEventDataBase(n);A.targetType="axisLabel",A.value=w,(0,o.A)(k).eventData=A}e.add(k),k.updateTransform(),m.push(k),t.add(k),k.decomposeTransform()})),m}}(n,l,e,t);!function(t,e,n){if(!(0,p.WY)(t.axis)){var i=t.get(["axisLabel","showMinLabel"]),r=t.get(["axisLabel","showMaxLabel"]);n=n||[];var o=(e=e||[])[0],a=e[1],s=e[e.length-1],l=e[e.length-2],u=n[0],c=n[1],h=n[n.length-1],d=n[n.length-2];!1===i?(v(o),v(u)):y(o,a)&&(i?(v(a),v(c)):(v(o),v(u))),!1===r?(v(s),v(h)):y(l,s)&&(r?(v(l),v(d)):(v(s),v(h)))}}(e,c,u),function(t,e,n,r){var o=n.axis,a=n.getModel("minorTick");if(a.get("show")&&!o.scale.isBlank()){var s=o.getMinorTicksCoords();if(s.length)for(var l=a.getModel("lineStyle"),u=r*a.get("length"),c=(0,i.ce)(l.getLineStyle(),(0,i.ce)(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),h=0;h<s.length;h++)for(var p=_(s[h],e.transform,u,c,"minorticks_"+h),d=0;d<p.length;d++)t.add(p[d])}}(n,l,e,t.tickDirection)},axisName:function(t,e,n,s){var u=(0,i.Jv)(t.axisName,e.get("name"));if(u){var c,h,p=e.get("nameLocation"),g=t.nameDirection,v=e.getModel("nameTextStyle"),y=e.get("nameGap")||0,_=e.axis.getExtent(),x=_[0]>_[1]?-1:1,b=["start"===p?_[0]-x*y:"end"===p?_[1]+x*y:(_[0]+_[1])/2,m(p)?t.labelOffset+g*y:0],w=e.get("nameRotate");null!=w&&(w=w*d/180),m(p)?c=f.innerTextLayout(t.rotation,null!=w?w:t.rotation,g):(c=function(t,e,n,i){var r,o,a=(0,l.wW)(n-t),s=i[0]>i[1],u="start"===e&&!s||"start"!==e&&s;return(0,l.mW)(a-d/2)?(o=u?"bottom":"top",r="center"):(0,l.mW)(a-1.5*d)?(o=u?"top":"bottom",r="center"):(o="middle",r=a<1.5*d&&a>d/2?u?"left":"right":u?"right":"left"),{rotation:a,textAlign:r,textVerticalAlign:o}}(t.rotation,p,w||0,_),null!=(h=t.axisNameAvailableWidth)&&(h=Math.abs(h/Math.sin(c.rotation)),!isFinite(h)&&(h=null)));var S=v.getFont(),T=e.get("nameTruncate",!0)||{},M=T.ellipsis,C=(0,i.Jv)(t.nameTruncateMaxWidth,T.maxWidth,h),k=e.get("tooltip",!0),A=e.mainType,I={componentType:A,name:u,$vars:["name"]};I[A+"Index"]=e.componentIndex;var D=new r.Text({x:b[0],y:b[1],rotation:c.rotation,silent:f.isLabelSilent(e),style:(0,a.Lr)(v,{text:u,font:S,overflow:"truncate",width:C,ellipsis:M,fill:v.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:v.get("align")||c.textAlign,verticalAlign:v.get("verticalAlign")||c.textVerticalAlign}),z2:1});if(D.tooltip=k&&k.show?(0,i.l7)({content:u,formatter:function(){return u},formatterParams:I},k):null,D.__fullText=u,D.anid="name",e.get("triggerEvent")){var P=f.makeAxisEventDataBase(e);P.targetType="axisName",P.name=u,(0,o.A)(D).eventData=P}s.add(D),D.updateTransform(),n.add(D),D.decomposeTransform()}}};function v(t){t&&(t.ignore=!0)}function y(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=c.yR([]);return c.U1(r,r,-t.rotation),n.applyTransform(c.dC([],r,t.getLocalTransform())),i.applyTransform(c.dC([],r,e.getLocalTransform())),n.intersect(i)}}function m(t){return"middle"===t||"center"===t}function _(t,e,n,i,o){for(var a=[],s=[],l=[],u=0;u<t.length;u++){var c=t[u].coord;s[0]=c,s[1]=0,l[0]=c,l[1]=n,e&&((0,h.Ne)(s,s,e),(0,h.Ne)(l,l,e));var p=new r.Line({subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:i,z2:2,autoBatch:!0,silent:!0});p.anid=o+"_"+t[u].tickValue,a.push(p)}return a}const x=f},7774:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(9312),r=n(4566),o=n(8278),a={};const s=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.prototype.render=function(e,n,i,o){this.axisPointerClass&&r.iG(e),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,i,!0)},e.prototype.updateAxisPointer=function(t,e,n,i){this._doUpdateAxisPointerClass(t,n,!1)},e.prototype.remove=function(t,e){var n=this._axisPointer;n&&n.remove(e)},e.prototype.dispose=function(e,n){this._disposeAxisPointer(n),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,n,i){var o=e.getAxisPointerClass(this.axisPointerClass);if(o){var a=r.np(t);a?(this._axisPointer||(this._axisPointer=new o)).render(t,a,n,i):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,e){a[t]=e},e.getAxisPointerClass=function(t){return t&&a[t]},e.type="axis",e}(o.Z)},5826:(t,e,n)=>{"use strict";var i=n(9312),r=n(8966),o=n(8778),a=n(3696),s=n(2822),l={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},u=o.TS({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},l),c=o.TS({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},l);const h={category:u,value:c,time:o.TS({scale:!0,splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},c),log:o.ce({scale:!0,logBase:10},c)};var p=n(2746),d=n(1214),f={value:1,category:1,time:1,log:1};function g(t,e,n){o.S6(f,(function(r,a){var l=o.TS(o.TS({},h[a],!0),n,!0),u=function(e){function n(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var r=e.apply(this,n)||this;return r.type=t+"Axis."+a,r}return(0,i.ZT)(n,e),n.prototype.mergeDefaultAndTheme=function(t,e){var n=(0,p.YD)(this),i=n?(0,p.tE)(t):{},r=e.getTheme();o.TS(t,r.get(a+"Axis")),o.TS(t,this.getDefaultOption()),t.type=v(t),n&&(0,p.dt)(t,i,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=d.Z.createByAxisModel(this))},n.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=t+"Axis."+a,n.defaultOption=l,n}(e);s.Z.registerClass(u)})),s.Z.registerSubTypeDefaulter(t+"Axis",v)}function v(t){return t.type||(t.data?"category":"value")}var y=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}(),m=n(5495),_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",m.C6).models[0]},e.type="cartesian2dAxis",e}(s.Z);o.jB(_,y);var x={offset:0,categorySortInfo:[]};g("x",_,x),g("y",_,x);var b=n(8637),w=n(7774),S=n(8395),T=(0,m.Yf)(),M=n(8278),C=["axisLine","axisTickLabel","axisName"],k=["splitArea","splitLine","minorSplitLine"],A=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="CartesianAxisPointer",n}return(0,i.ZT)(e,t),e.prototype.render=function(e,n,i,r){this.group.removeAll();var s=this._axisGroup;if(this._axisGroup=new a.Group,this.group.add(this._axisGroup),e.get("show")){var l=e.getCoordSysModel(),u=S.bK(l,e),c=new b.Z(e,o.l7({handleAutoShown:function(t){for(var n=l.coordinateSystem.getCartesians(),i=0;i<n.length;i++){var r=n[i].getOtherAxis(e.axis).type;if("value"===r||"log"===r)return!0}return!1}},u));o.S6(C,c.add,c),this._axisGroup.add(c.getGroup()),o.S6(k,(function(t){e.get([t,"show"])&&I[t](this,this._axisGroup,e,l)}),this),a.groupTransition(s,this._axisGroup,e),t.prototype.render.call(this,e,n,i,r)}},e.prototype.remove=function(){T(this).splitAreaColors=null},e.type="cartesianAxis",e}(w.Z),I={splitLine:function(t,e,n,i){var r=n.axis;if(!r.scale.isBlank()){var s=n.getModel("splitLine"),l=s.getModel("lineStyle"),u=l.get("color");u=o.kJ(u)?u:[u];for(var c=i.coordinateSystem.getRect(),h=r.isHorizontal(),p=0,d=r.getTicksCoords({tickModel:s}),f=[],g=[],v=l.getLineStyle(),y=0;y<d.length;y++){var m=r.toGlobalCoord(d[y].coord);h?(f[0]=m,f[1]=c.y,g[0]=m,g[1]=c.y+c.height):(f[0]=c.x,f[1]=m,g[0]=c.x+c.width,g[1]=m);var _=p++%u.length,x=d[y].tickValue;e.add(new a.Line({anid:null!=x?"line_"+d[y].tickValue:null,subPixelOptimize:!0,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:g[0],y2:g[1]},style:o.ce({stroke:u[_]},v),silent:!0}))}}},minorSplitLine:function(t,e,n,i){var r=n.axis,o=n.getModel("minorSplitLine").getModel("lineStyle"),s=i.coordinateSystem.getRect(),l=r.isHorizontal(),u=r.getMinorTicksCoords();if(u.length)for(var c=[],h=[],p=o.getLineStyle(),d=0;d<u.length;d++)for(var f=0;f<u[d].length;f++){var g=r.toGlobalCoord(u[d][f].coord);l?(c[0]=g,c[1]=s.y,h[0]=g,h[1]=s.y+s.height):(c[0]=s.x,c[1]=g,h[0]=s.x+s.width,h[1]=g),e.add(new a.Line({anid:"minor_line_"+u[d][f].tickValue,subPixelOptimize:!0,autoBatch:!0,shape:{x1:c[0],y1:c[1],x2:h[0],y2:h[1]},style:p,silent:!0}))}},splitArea:function(t,e,n,i){!function(t,e,n,i){var r=n.axis;if(!r.scale.isBlank()){var s=n.getModel("splitArea"),l=s.getModel("areaStyle"),u=l.get("color"),c=i.coordinateSystem.getRect(),h=r.getTicksCoords({tickModel:s,clamp:!0});if(h.length){var p=u.length,d=T(t).splitAreaColors,f=o.kW(),g=0;if(d)for(var v=0;v<h.length;v++){var y=d.get(h[v].tickValue);if(null!=y){g=(y+(p-1)*v)%p;break}}var m=r.toGlobalCoord(h[0].coord),_=l.getAreaStyle();for(u=o.kJ(u)?u:[u],v=1;v<h.length;v++){var x=r.toGlobalCoord(h[v].coord),b=void 0,w=void 0,S=void 0,M=void 0;r.isHorizontal()?(b=m,w=c.y,S=x-b,M=c.height,m=b+S):(b=c.x,w=m,S=c.width,m=w+(M=x-w));var C=h[v-1].tickValue;null!=C&&f.set(C,g),e.add(new a.Rect({anid:null!=C?"area_"+C:null,shape:{x:b,y:w,width:S,height:M},style:o.ce({fill:u[g]},_),autoBatch:!0,silent:!0})),g=(g+1)%p}T(t).splitAreaColors=f}}}(t,e,n,i)}},D=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.type="xAxis",e}(A),P=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=D.type,e}return(0,i.ZT)(e,t),e.type="yAxis",e}(A);M.Z.registerClass(D),M.Z.registerClass(P);var O=n(3493),L=n(9820);function R(t,e){return t.get(e.uid)||t.set(e.uid,{condExtent:[1/0,-1/0]})}function E(t,e){e<t[0]&&(t[0]=e),e>t[1]&&(t[1]=e)}r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER+10,{getTargetSeries:function(t){var e=(0,o.kW)();return t.eachSeries((function(t){(0,S.Yh)(t)&&e.set(t.uid,t)})),e},overallReset:function(t,e){var n=[],i=(0,o.kW)();!function(t,e,n){t.eachSeries((function(t){if((0,S.Yh)(t)){var i=(0,S.Mk)(t),r=i.xAxisModel,o=i.yAxisModel,a=r.axis,s=o.axis,l=a.scale.rawExtentInfo,u=s.scale.rawExtentInfo,c=t.getData();l&&l.frozen||u&&u.frozen||(n.push({seriesModel:t,xAxisModel:r,yAxisModel:o}),(0,O.AH)(R(e,r).condExtent,c,a.dim),(0,O.AH)(R(e,o).condExtent,c,s.dim))}}))}(t,i,n),function(t,e){(0,o.S6)(e,(function(e){var n=e.xAxisModel,i=e.yAxisModel,r=n.axis,a=i.axis,s=R(t,n),l=R(t,i);s.rawExtentInfo=(0,L.Qw)(r.scale,n,s.condExtent),l.rawExtentInfo=(0,L.Qw)(a.scale,i,l.condExtent),s.rawExtentResult=s.rawExtentInfo.calculate(),l.rawExtentResult=l.rawExtentInfo.calculate();var u,c,h=e.seriesModel.getData(),p={},d={};function f(t,e){var n=e.condExtent,i=e.rawExtentResult;"category"===t.type&&(n[0]<i.min||i.max<n[1])&&(0,o.S6)((0,O.PY)(h,t.dim),(function(e){(0,o.RI)(p,e)||(p[e]=!0,u=t)}))}function g(t,e){var n=e.rawExtentResult;"category"===t.type||n.minFixed&&n.maxFixed||(0,o.S6)((0,O.PY)(h,t.dim),(function(t){(0,o.RI)(p,t)||(0,o.RI)(d,t)||(d[t]=!0,c=e)}))}f(r,s),f(a,l),g(r,s),g(a,l);var v=(0,o.XP)(p),y=(0,o.XP)(d),m=(0,o.UI)(y,(function(){return[1/0,-1/0]})),_=v.length,x=y.length;if(_&&x){var b=1===_?v[0]:null,w=1===x?y[0]:null,S=h.count();if(b&&w)for(var T=0;T<S;T++){var M=h.get(b,T);u.scale.isInExtentRange(M)&&E(m[0],h.get(w,T))}else for(T=0;T<S;T++)for(var C=0;C<_;C++)if(M=h.get(v[C],T),u.scale.isInExtentRange(M)){for(var k=0;k<x;k++)E(m[k],h.get(y[k],T));break}(0,o.S6)(m,(function(t,e){var n=y[e];h.setApproximateExtent(t,n);var i=c.tarExtent=c.tarExtent||[1/0,-1/0];E(i,t[0]),E(i,t[1])}))}}))}(i,n),function(t){t.each((function(t){var e=t.tarExtent;if(e){var n=t.rawExtentResult,i=t.rawExtentInfo;!n.minFixed&&e[0]>n.min&&i.modifyDataMinMax("min",e[0]),!n.maxFixed&&e[1]<n.max&&i.modifyDataMinMax("max",e[1])}}))}(i)}});const Z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(s.Z);var N=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e}return(0,i.ZT)(e,t),e.prototype.render=function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new a.Rect({shape:t.coordinateSystem.getRect(),style:o.ce({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(M.Z);M.Z.registerClass(N),s.Z.registerClass(Z),r.registerPreprocessor((function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}))},5966:(t,e,n)=>{"use strict";n.d(e,{b:()=>a,l:()=>s});var i=n(2746),r=n(349),o=n(3696);function a(t,e,n){var r=e.getBoxLayoutParams(),o=e.get("padding"),a={width:n.getWidth(),height:n.getHeight()},s=(0,i.ME)(r,a,o);(0,i.BZ)(e.get("orient"),t,e.get("itemGap"),s.width,s.height),(0,i.p$)(t,r,a,o)}function s(t,e){var n=r.MY(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),new o.Rect({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}},6009:(t,e,n)=>{"use strict";var i=n(8966),r=n(9312),o=n(8778),a=n(4708),s=n(5495),l=n(2822),u=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return(0,r.ZT)(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),this._updateSelector(e)},e.prototype._updateSelector=function(t){var e=t.selector,n=this.ecModel;!0===e&&(e=t.selector=["all","inverse"]),o.kJ(e)&&o.S6(e,(function(t,i){o.HD(t)&&(t={type:t}),e[i]=o.TS(t,function(t,e){return"all"===e?{type:"all",title:t.getLocale(["legend","selector","all"])}:"inverse"===e?{type:"inverse",title:t.getLocale(["legend","selector","inverse"])}:void 0}(n,t.type))}))},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n<t.length;n++){var i=t[n].get("name");if(this.isSelected(i)){this.select(i),e=!0;break}}!e&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var e=[],n=[];t.eachRawSeries((function(i){var r,o=i.name;if(n.push(o),i.legendVisualProvider){var a=i.legendVisualProvider.getAllNames();t.isSeriesFiltered(i)||(n=n.concat(a)),a.length?e=e.concat(a):r=!0}else r=!0;r&&(0,s.yu)(i)&&e.push(i.name)})),this._availableNames=n;var i=this.get("data")||e,r=o.UI(i,(function(t){return"string"!=typeof t&&"number"!=typeof t||(t={name:t}),new a.Z(t,this,this.ecModel)}),this);this._data=r},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var e=this.option.selected;if("single"===this.get("selectedMode")){var n=this._data;o.S6(n,(function(t){e[t.get("name")]=!1}))}e[t]=!0},e.prototype.unSelect=function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,e=this.option.selected;o.S6(t,(function(t){e[t.get("name",!0)]=!0}))},e.prototype.inverseSelect=function(){var t=this._data,e=this.option.selected;o.S6(t,(function(t){var n=t.get("name",!0);e.hasOwnProperty(n)||(e[n]=!0),e[n]=!e[n]}))},e.prototype.isSelected=function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&o.cq(this._availableNames,t)>=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(l.Z);function c(t,e,n){var i,r={},a="toggleSelected"===t;return n.eachComponent("legend",(function(n){a&&null!=i?n[i?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?n[t]():(n[t](e.name),i=n.isSelected(e.name));var s=n.getData();o.S6(s,(function(t){var e=t.get("name");if("\n"!==e&&""!==e){var i=n.isSelected(e);r.hasOwnProperty(e)?r[e]=r[e]&&i:r[e]=i}}))})),"allSelect"===t||"inverseSelect"===t?{selected:r}:{name:e.name,selected:r}}l.Z.registerClass(u),i.registerAction("legendToggleSelect","legendselectchanged",o.WA(c,"toggleSelected")),i.registerAction("legendAllSelect","legendselectall",o.WA(c,"allSelect")),i.registerAction("legendInverseSelect","legendinverseselect",o.WA(c,"inverseSelect")),i.registerAction("legendSelect","legendselected",o.WA(c,"select")),i.registerAction("legendUnSelect","legendunselected",o.WA(c,"unSelect"));var h=n(3111),p=n(3696),d=n(106),f=n(5628),g=n(5966),v=n(2746),y=n(8278),m=n(1756),_=o.WA,x=o.S6,b=p.Group,w=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.newlineDisabled=!1,n}return(0,r.ZT)(e,t),e.prototype.init=function(){this.group.add(this._contentGroup=new b),this.group.add(this._selectorGroup=new b),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,e,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var r=t.get("align"),a=t.get("orient");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===a?"right":"left");var s=t.get("selector",!0),l=t.get("selectorPosition",!0);!s||l&&"auto"!==l||(l="horizontal"===a?"end":"start"),this.renderInner(r,t,e,n,s,a,l);var u=t.getBoxLayoutParams(),c={width:n.getWidth(),height:n.getHeight()},h=t.get("padding"),p=v.ME(u,c,h),d=this.layoutInner(t,r,p,i,s,l),f=v.ME(o.ce({width:d.width,height:d.height},u),c,h);this.group.x=f.x-d.x,this.group.y=f.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=(0,g.l)(d,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,e,n,i,r,a,s){var l=this.getContentGroup(),u=o.kW(),c=e.get("selectedMode"),h=[];n.eachRawSeries((function(t){!t.get("legendHoverLink")&&h.push(t.id)})),x(e.getData(),(function(r,o){var a=r.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var s=new b;return s.newline=!0,void l.add(s)}var p=n.getSeriesByName(a)[0];if(!u.get(a))if(p){var d=p.getData(),f=d.getVisual("style"),g=f[d.getVisual("drawType")]||f.fill,v=f.stroke,y=f.decal,x=d.getVisual("legendSymbol")||"roundRect",w=d.getVisual("symbol");this._createItem(a,o,r,e,x,w,t,g,v,y,c).on("click",_(T,a,null,i,h)).on("mouseover",_(C,p.name,null,i,h)).on("mouseout",_(k,p.name,null,i,h)),u.set(a,!0)}else n.eachRawSeries((function(n){if(!u.get(a)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(a))return;var l=s.indexOfName(a),p=s.getItemVisual(l,"style"),d=p.stroke,f=p.decal,g=p.fill,v=(0,m.Qc)(p.fill);v&&0===v[3]&&(v[3]=.2,g=(0,m.Pz)(v,"rgba")),this._createItem(a,o,r,e,"roundRect",null,t,g,d,f,c).on("click",_(T,null,a,i,h)).on("mouseover",_(C,null,a,i,h)).on("mouseout",_(k,null,a,i,h)),u.set(a,!0)}}),this)}),this),r&&this._createSelector(r,e,i,a,s)},e.prototype._createSelector=function(t,e,n,i,r){var o=this.getSelectorGroup();x(t,(function(t){var i=t.type,r=new p.Text({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});o.add(r);var a=e.getModel("selectorLabel"),s=e.getModel(["emphasis","selectorLabel"]);(0,f.ni)(r,{normal:a,emphasis:s},{defaultText:t.title}),(0,d.vF)(r)}))},e.prototype._createItem=function(t,e,n,i,r,a,s,l,u,c,g){var v=i.get("itemWidth"),y=i.get("itemHeight"),m=i.get("inactiveColor"),_=i.get("inactiveBorderColor"),x=i.get("symbolKeepAspect"),w=i.getModel("itemStyle"),T=i.isSelected(t),M=new b,C=n.getModel("textStyle"),k=n.get("icon"),A=n.getModel("tooltip"),I=A.parentModel;r=k||r;var D=(0,h.t)(r,0,0,v,y,T?l:m,null==x||x);if(M.add(S(D,r,w,u,_,c,T)),!k&&a&&(a!==r||"none"===a)){var P=.8*y;"none"===a&&(a="circle");var O=(0,h.t)(a,(v-P)/2,(y-P)/2,P,P,T?l:m,null==x||x);M.add(S(O,a,w,u,_,c,T))}var L="left"===s?v+5:-5,R=s,E=i.get("formatter"),Z=t;"string"==typeof E&&E?Z=E.replace("{name}",null!=t?t:""):"function"==typeof E&&(Z=E(t)),M.add(new p.Text({style:(0,f.Lr)(C,{text:Z,x:L,y:y/2,fill:T?C.getTextColor():m,align:R,verticalAlign:"middle"})}));var N=new p.Rect({shape:M.getBoundingRect(),invisible:!0});if(A.get("show")){var B={componentType:"legend",legendIndex:i.componentIndex,name:t,$vars:["name"]};N.tooltip=o.l7({content:t,formatter:I.get("formatter",!0)||function(t){return t.name},formatterParams:B},A.option)}return M.add(N),M.eachChild((function(t){t.silent=!0})),N.silent=!g,this.getContentGroup().add(M),(0,d.vF)(M),M.__legendDataIndex=e,M},e.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();v.BZ(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),r){v.BZ("horizontal",s,t.get("selectorItemGap",!0));var c=s.getBoundingRect(),h=[-c.x,-c.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,f=0===d?"width":"height",g=0===d?"height":"width",y=0===d?"y":"x";"end"===o?h[d]+=l[f]+p:u[d]+=c[f]+p,h[1-d]+=l[g]/2-c[g]/2,s.x=h[0],s.y=h[1],a.x=u[0],a.y=u[1];var m={x:0,y:0};return m[f]=l[f]+p+c[f],m[g]=Math.max(l[g],c[g]),m[y]=Math.min(0,c[y]+h[1-d]),m}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(y.Z);function S(t,e,n,i,r,o,a){var s;return"line"!==e&&e.indexOf("empty")<0?(s=n.getItemStyle(),t.style.stroke=i,t.style.decal=o,a||(s.stroke=r)):s=n.getItemStyle(["borderWidth","borderColor"]),t.setStyle(s),t}function T(t,e,n,i){k(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),C(t,e,n,i)}function M(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,r=n.length;i<r&&!(e=n[i].states.emphasis);)i++;return e&&e.hoverLayer}function C(t,e,n,i){M(n)||n.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:i})}function k(t,e,n,i){M(n)||n.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:i})}y.Z.registerClass(w),i.registerProcessor(i.PRIORITY.PROCESSOR.SERIES_FILTER,(function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries((function(t){for(var n=0;n<e.length;n++)if(!e[n].isSelected(t.name))return!1;return!0}))})),l.Z.registerSubTypeDefaulter("legend",(function(){return"plain"}))},9045:(t,e,n)=>{"use strict";var i=n(9312),r=n(8778),o=n(3696),a=n(1563),s=n(5628),l=n(2746),u=n(2822),c=n(8278),h=n(349),p=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return(0,i.ZT)(e,t),e.type="title",e.defaultOption={zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(u.Z);u.Z.registerClass(p);var d=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,u=t.getModel("textStyle"),c=t.getModel("subtextStyle"),p=t.get("textAlign"),d=r.pD(t.get("textBaseline"),t.get("textVerticalAlign")),f=new o.Text({style:(0,s.Lr)(u,{text:t.get("text"),fill:u.getTextColor()},{disableBox:!0}),z2:10}),g=f.getBoundingRect(),v=t.get("subtext"),y=new o.Text({style:(0,s.Lr)(c,{text:v,fill:c.getTextColor(),y:g.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),m=t.get("link"),_=t.get("sublink"),x=t.get("triggerEvent",!0);f.silent=!m&&!x,y.silent=!_&&!x,m&&f.on("click",(function(){(0,h.MI)(m,"_"+t.get("target"))})),_&&y.on("click",(function(){(0,h.MI)(_,"_"+t.get("subtarget"))})),(0,a.A)(f).eventData=(0,a.A)(y).eventData=x?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(f),v&&i.add(y);var b=i.getBoundingRect(),w=t.getBoxLayoutParams();w.width=b.width,w.height=b.height;var S=(0,l.ME)(w,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));p||("middle"===(p=t.get("left")||t.get("right"))&&(p="center"),"right"===p?S.x+=S.width:"center"===p&&(S.x+=S.width/2)),d||("center"===(d=t.get("top")||t.get("bottom"))&&(d="middle"),"bottom"===d?S.y+=S.height:"middle"===d&&(S.y+=S.height/2),d=d||"top"),i.x=S.x,i.y=S.y,i.markRedraw();var T={align:p,verticalAlign:d};f.setStyle(T),y.setStyle(T),b=i.getBoundingRect();var M=S.margin,C=t.getItemStyle(["color","opacity"]);C.fill=t.get("backgroundColor");var k=new o.Rect({shape:{x:b.x-M[3],y:b.y-M[0],width:b.width+M[1]+M[3],height:b.height+M[0]+M[2],r:t.get("borderRadius")},style:C,subPixelOptimize:!0,silent:!0});i.add(k)}},e.type="title",e}(c.Z);c.Z.registerClass(d)},2124:(t,e,n)=>{"use strict";var i=n(9312),r=n(8778),o=function(){},a={};function s(t,e){a[t]=e}function l(t){return a[t]}var u=n(2822),c=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;r.S6(this.option.feature,(function(t,n){var i=l(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),r.TS(t,i.defaultOption))}))},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}},e}(u.Z);u.Z.registerClass(c);var h=n(9356),p=n(3696),d=n(106),f=n(4708),g=n(7586),v=n(5966),y=n(8278),m=n(4053),_=n(4239),x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.render=function(t,e,n,i){var a=this.group;if(a.removeAll(),t.get("show")){var s=+t.get("itemSize"),u=t.get("feature")||{},c=this._features||(this._features={}),y=[];r.S6(u,(function(t,e){y.push(e)})),new g.Z(this._featureNames||[],y).add(x).update(x).remove(r.WA(x,null)).execute(),this._featureNames=y,v.b(a,t,n),a.add(v.l(a.getBoundingRect(),t)),a.eachChild((function(t){var e=t.__title,i=t.ensureState("emphasis"),o=i.textConfig||(i.textConfig={}),l=t.getTextContent(),u=l&&l.states.emphasis;if(u&&!r.mf(u)&&e){var c=u.style||(u.style={}),p=h.lP(e,_.ZP.makeFont(c)),d=t.x+a.x,f=!1;t.y+a.y+s+p.height>n.getHeight()&&(o.position="top",f=!0);var g=f?-5-p.height:s+8;d+p.width/2>n.getWidth()?(o.position=["100%",g],c.align="right"):d-p.width/2<0&&(o.position=[0,g],c.align="left")}}))}function x(h,g){var v,x=y[h],b=y[g],w=u[x],S=new f.Z(w,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===x&&(w.title=i.newTitle),x&&!b){if(function(t){return 0===t.indexOf("my")}(x))v={onclick:S.option.onclick,featureName:x};else{var T=l(x);if(!T)return;v=new T}c[x]=v}else if(!(v=c[b]))return;if(v.uid=(0,m.Kr)("toolbox-feature"),v.model=S,v.ecModel=e,v.api=n,v instanceof o){if(!x&&b)return void(v.dispose&&v.dispose(e,n));if(!S.get("show")||v.unusable)return void(v.remove&&v.remove(e,n))}!function(i,l,u){var c,h,f=i.getModel("iconStyle"),g=i.getModel(["emphasis","iconStyle"]),v=l instanceof o&&l.getIcons?l.getIcons():i.get("icon"),y=i.get("title")||{};"string"==typeof v?(c={})[u]=v:c=v,"string"==typeof y?(h={})[u]=y:h=y;var m=i.iconPaths={};r.S6(c,(function(o,u){var c=p.createIcon(o,{},{x:-s/2,y:-s/2,width:s,height:s});c.setStyle(f.getItemStyle()),c.ensureState("emphasis").style=g.getItemStyle();var v=new _.ZP({style:{text:h[u],align:g.get("textAlign"),borderRadius:g.get("textBorderRadius"),padding:g.get("textPadding"),fill:null},ignore:!0});c.setTextContent(v);var y=t.getModel("tooltip");y&&y.get("show")&&(c.tooltip=r.l7({content:h[u],formatter:y.get("formatter",!0)||function(){return h[u]},formatterParams:{componentType:"toolbox",name:u,title:h[u],$vars:["name","title"]},position:y.get("position",!0)||"bottom"},y.option)),c.__title=h[u],c.on("mouseover",(function(){var e=g.getItemStyle(),n="vertical"===t.get("orient")?null==t.get("right")?"right":"left":null==t.get("bottom")?"bottom":"top";v.setStyle({fill:g.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:g.get("textBackgroundColor")}),c.setTextConfig({position:g.get("textPosition")||n}),v.ignore=!t.get("showTitle"),(0,d.fD)(this)})).on("mouseout",(function(){"emphasis"!==i.get(["iconStatus",u])&&(0,d.Mh)(this),v.hide()})),("emphasis"===i.get(["iconStatus",u])?d.fD:d.Mh)(c),a.add(c),c.on("click",r.ak(l.onclick,l,e,n,u)),m[u]=c}))}(S,v,x),S.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?d.fD:d.Mh)(i[t])},v instanceof o&&v.render&&v.render(S,e,n,i)}},e.prototype.updateView=function(t,e,n,i){r.S6(this._features,(function(t){t instanceof o&&t.updateView&&t.updateView(t.model,e,n,i)}))},e.prototype.remove=function(t,e){r.S6(this._features,(function(n){n instanceof o&&n.remove&&n.remove(t,e)})),this.group.removeAll()},e.prototype.dispose=function(t,e){r.S6(this._features,(function(n){n instanceof o&&n.dispose&&n.dispose(t,e)}))},e.type="toolbox",e}(y.Z);y.Z.registerClass(x);var b=n(8781),w=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r="svg"===e.getZr().painter.getType()?"svg":n.get("type",!0)||"png",o=e.getConnectedDataURL({type:r,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!=typeof MouseEvent||b.Z.browser.ie||b.Z.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var a=atob(o.split(",")[1]),s=a.length,l=new Uint8Array(s);s--;)l[s]=a.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,i+"."+r)}else{var c=n.get("lang"),h='<body style="margin:0;"><img src="'+o+'" style="max-width:100%;" title="'+(c&&c[0]||"")+'" /></body>';window.open().document.write(h)}else{var p=document.createElement("a");p.download=i+"."+r,p.target="_blank",p.href=o;var d=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});p.dispatchEvent(d)}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocale(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:t.getLocale(["toolbox","saveAsImage","lang"])}},e}(o);w.prototype.unusable=!b.Z.canvasSupported,s("saveAsImage",w);var S=n(8966),T=n(5495),M="__ec_magicType_stack__",C=[["line","bar"],["stack"]],k=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return r.S6(t.get("type"),(function(t){e[t]&&(n[t]=e[t])})),n},e.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocale(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,o=i.get(["seriesIndex",n]);if(A[n]){var a,s={series:[]};r.S6(C,(function(t){r.cq(t,n)>=0&&r.S6(t,(function(t){i.setIconStatus(t,"normal")}))})),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},(function(t){var e=t.subType,o=t.id,a=A[n](e,o,t,i);a&&(r.ce(a,t.option),s.series.push(a));var l=t.coordinateSystem;if(l&&"cartesian2d"===l.type&&("line"===n||"bar"===n)){var u=l.getAxesByScale("ordinal")[0];if(u){var c=u.dim+"Axis",h=t.getReferringComponents(c,T.C6).models[0].componentIndex;s[c]=s[c]||[];for(var p=0;p<=h;p++)s[c][h]=s[c][h]||{};s[c][h].boundaryGap="bar"===n}}})),"stack"===n&&(a=r.TS({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title)),e.dispatchAction({type:"changeMagicType",currentType:n,newOption:s,newTitle:a,featureName:"magicType"})}},e}(o),A={line:function(t,e,n,i){if("bar"===t)return r.TS({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return r.TS({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var o=n.get("stack")===M;if("line"===t||"bar"===t)return i.setIconStatus("stack",o?"normal":"emphasis"),r.TS({id:e,stack:o?"":M},i.get(["option","stack"])||{},!0)}};S.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)})),s("magicType",k);var I=n(3837),D=new Array(60).join("-"),P="\t";function O(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var L=new RegExp("[\t]+","g");function R(t,e){return r.UI(t,(function(t,n){var i=e&&e[n];if(r.Kn(i)&&!r.kJ(i)){r.Kn(t)&&!r.kJ(t)||(t={value:t});var o=null!=i.name&&null==t.name;return t=r.ce(t,i),o&&delete t.name,t}return t}))}s("dataView",function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.onclick=function(t,e){var n=e.getDom(),i=this.model;this._dom&&n.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=i.get("backgroundColor")||"#fff";var a=document.createElement("h4"),s=i.get("lang")||[];a.innerHTML=s[0]||i.get("title"),a.style.cssText="margin: 10px 20px;",a.style.color=i.get("textColor");var l=document.createElement("div"),u=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var c=i.get("optionToContent"),h=i.get("contentToOption"),p=function(t){var e,n,i,o=function(t){var e={},n=[],i=[];return t.eachRawSeries((function(t){var r=t.coordinateSystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)n.push(t);else{var o=r.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;e[a]||(e[a]={categoryAxis:o,valueAxis:r.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),e[a].series.push(t)}else n.push(t)}})),{seriesGroupByCategoryAxis:e,other:n,meta:i}}(t);return{value:r.hX([(n=o.seriesGroupByCategoryAxis,i=[],r.S6(n,(function(t,e){var n=t.categoryAxis,o=t.valueAxis.dim,a=[" "].concat(r.UI(t.series,(function(t){return t.name}))),s=[n.model.getCategories()];r.S6(t.series,(function(t){var e=t.getRawData();s.push(t.getRawData().mapArray(e.mapDimension(o),(function(t){return t})))}));for(var l=[a.join(P)],u=0;u<s[0].length;u++){for(var c=[],h=0;h<s.length;h++)c.push(s[h][u]);l.push(c.join(P))}i.push(l.join("\n"))})),i.join("\n\n"+D+"\n\n")),(e=o.other,r.UI(e,(function(t){var e=t.getRawData(),n=[t.name],i=[];return e.each(e.dimensions,(function(){for(var t=arguments.length,r=arguments[t-1],o=e.getName(r),a=0;a<t-1;a++)i[a]=arguments[a];n.push((o?o+P:"")+i.join(P))})),n.join("\n")})).join("\n\n"+D+"\n\n"))],(function(t){return!!t.replace(/[\n\t\s]/g,"")})).join("\n\n"+D+"\n\n"),meta:o.meta}}(t);if("function"==typeof c){var d=c(e.getOption());"string"==typeof d?l.innerHTML=d:r.Mh(d)&&l.appendChild(d)}else l.appendChild(u),u.readOnly=i.get("readOnly"),u.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=i.get("textColor"),u.style.borderColor=i.get("textareaBorderColor"),u.style.backgroundColor=i.get("textareaColor"),u.value=p.value;var f=p.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:0;left:0;right:0;";var v="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",y=document.createElement("div"),m=document.createElement("div");v+=";background-color:"+i.get("buttonColor"),v+=";color:"+i.get("buttonTextColor");var _=this;function x(){n.removeChild(o),_._dom=null}(0,I.Oo)(y,"click",x),(0,I.Oo)(m,"click",(function(){if(null==h&&null!=c||null!=h&&null==c)x();else{var t;try{t="function"==typeof h?h(l,e.getOption()):function(t,e){var n=t.split(new RegExp("\n*"+D+"\n*","g")),i={series:[]};return r.S6(n,(function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(P)>=0)return!0}(t)){var o=function(t){for(var e=t.split(/\n+/g),n=O(e.shift()).split(L),i=[],o=r.UI(n,(function(t){return{name:t,data:[]}})),a=0;a<e.length;a++){var s=O(e[a]).split(L);i.push(s.shift());for(var l=0;l<s.length;l++)o[l]&&(o[l].data[a]=s[l])}return{series:o,categories:i}}(t),a=e[n],s=a.axisDim+"Axis";a&&(i[s]=i[s]||[],i[s][a.axisIndex]={data:o.categories},i.series=i.series.concat(o.series))}else o=function(t){for(var e=t.split(/\n+/g),n=O(e.shift()),i=[],r=0;r<e.length;r++){var o=O(e[r]);if(o){var a=o.split(L),s="",l=void 0,u=!1;isNaN(a[0])?(u=!0,s=a[0],a=a.slice(1),i[r]={name:s,value:[]},l=i[r].value):l=i[r]=[];for(var c=0;c<a.length;c++)l.push(+a[c]);1===l.length&&(u?i[r].value=l[0]:i[r]=l[0])}}return{name:n,data:i}}(t),i.series.push(o)})),i}(u.value,f)}catch(t){throw x(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),x()}})),y.innerHTML=s[1],m.innerHTML=s[2],m.style.cssText=v,y.style.cssText=v,!i.get("readOnly")&&g.appendChild(m),g.appendChild(y),o.appendChild(a),o.appendChild(l),o.appendChild(g),l.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},e.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.getDefaultOption=function(t){return{show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:t.getLocale(["toolbox","dataView","title"]),lang:t.getLocale(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"}},e}(o)),S.registerAction({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},(function(t,e){var n=[];r.S6(t.newOption.series,(function(t){var i=e.getSeriesByName(t.name)[0];if(i){var o=i.get("data");n.push({name:t.name,data:R(t.data,o)})}else n.push(r.l7({type:"scatter"},t))})),e.mergeOption(r.ce({series:n},t.newOption))}));var E=n(444),Z="\0_ec_interaction_mutex";function N(t){return t[Z]||(t[Z]={})}S.registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){}));var B=!0,z=Math.min,F=Math.max,W=Math.pow,V={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},H={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},U={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},G=0,X=function(t){function e(e){var n=t.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=e,n.group=new p.Group,n._uid="brushController_"+G++,(0,r.S6)(_t,(function(t,e){this._handlers[e]=(0,r.ak)(t,this)}),n),n}return(0,i.ZT)(e,t),e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var e=this._zr;this._enableGlobalPan||function(t,e,n){N(t).globalPan=n}(e,0,this._uid),(0,r.S6)(this._handlers,(function(t,n){e.on(n,t)})),this._brushType=t.brushType,this._brushOption=(0,r.TS)((0,r.d9)(U),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;!function(t,e,n){var i=N(t);i.globalPan===n&&(i.globalPan=null)}(t,0,this._uid),(0,r.S6)(this._handlers,(function(e,n){t.off(n,e)})),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var e=this._panels={};(0,r.S6)(t,(function(t){e[t.panelId]=(0,r.d9)(t)}))}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=e.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=(0,r.UI)(t,(function(t){return(0,r.TS)((0,r.d9)(U),t,!0)}));var e=this._covers,n=this._covers=[],i=this,o=this._creatingCover;return new g.Z(e,t,(function(t,e){return a(t.__brushOption,e)}),a).add(s).update(s).remove((function(t){e[t]!==o&&i.group.remove(e[t])})).execute(),this;function a(t,e){return(null!=t.id?t.id:"\0-brush-index-"+e)+"-"+t.brushType}function s(r,a){var s=t[r];if(null!=a&&e[a]===o)n[r]=e[a];else{var l=n[r]=null!=a?(e[a].__brushOption=s,e[a]):j(i,Y(i,s));K(i,l)}}},e.prototype.unmount=function(){return this.enableBrush(!1),et(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(E.Z);function Y(t,e){var n=bt[e.brushType].createCover(t,e);return n.__brushOption=e,q(n,e),t.group.add(n),n}function j(t,e){var n=J(e);return n.endCreating&&(n.endCreating(t,e),q(e,e.__brushOption)),e}function $(t,e){var n=e.__brushOption;J(e).updateCoverShape(t,e,n.range,n)}function q(t,e){var n=e.z;null==n&&(n=1e4),t.traverse((function(t){t.z=n,t.z2=n}))}function K(t,e){J(e).updateCommon(t,e),$(t,e)}function J(t){return bt[t.__brushOption.brushType]}function Q(t,e,n){var i,o=t._panels;if(!o)return B;var a=t._transform;return(0,r.S6)(o,(function(t){t.isTargetByCursor(e,n,a)&&(i=t)})),i}function tt(t,e){var n=t._panels;if(!n)return B;var i=e.__brushOption.panelId;return null!=i?n[i]:B}function et(t){var e=t._covers,n=e.length;return(0,r.S6)(e,(function(e){t.group.remove(e)}),t),e.length=0,!!n}function nt(t,e){var n=(0,r.UI)(t._covers,(function(t){var e=t.__brushOption,n=(0,r.d9)(e.range);return{brushType:e.brushType,panelId:e.panelId,range:n}}));t.trigger("brush",{areas:n,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function it(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function rt(t,e,n,i){var o=new p.Group;return o.add(new p.Rect({name:"main",style:lt(n),silent:!0,draggable:!0,cursor:"move",drift:(0,r.WA)(ht,t,e,o,["n","s","w","e"]),ondragend:(0,r.WA)(nt,e,{isEnd:!0})})),(0,r.S6)(i,(function(n){o.add(new p.Rect({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:(0,r.WA)(ht,t,e,o,n),ondragend:(0,r.WA)(nt,e,{isEnd:!0})}))})),o}function ot(t,e,n,i){var r=i.brushStyle.lineWidth||0,o=F(r,6),a=n[0][0],s=n[1][0],l=a-r/2,u=s-r/2,c=n[0][1],h=n[1][1],p=c-o+r/2,d=h-o+r/2,f=c-a,g=h-s,v=f+r,y=g+r;st(t,e,"main",a,s,f,g),i.transformable&&(st(t,e,"w",l,u,o,y),st(t,e,"e",p,u,o,y),st(t,e,"n",l,u,v,o),st(t,e,"s",l,d,v,o),st(t,e,"nw",l,u,o,o),st(t,e,"ne",p,u,o,o),st(t,e,"sw",l,d,o,o),st(t,e,"se",p,d,o,o))}function at(t,e){var n=e.__brushOption,i=n.transformable,o=e.childAt(0);o.useStyle(lt(n)),o.attr({silent:!i,cursor:i?"move":"default"}),(0,r.S6)([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],(function(n){var r=e.childOfName(n.join("")),o=1===n.length?ct(t,n[0]):function(t,e){var n=[ct(t,e[0]),ct(t,e[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}(t,n);r&&r.attr({silent:!i,invisible:!i,cursor:i?H[o]+"-resize":null})}))}function st(t,e,n,i,r,o,a){var s,l,u,c=e.childOfName(n);c&&c.setShape((s=ft(t,e,[[i,r],[i+o,r+a]]),{x:l=z(s[0][0],s[1][0]),y:u=z(s[0][1],s[1][1]),width:F(s[0][0],s[1][0])-l,height:F(s[0][1],s[1][1])-u}))}function lt(t){return(0,r.ce)({strokeNoScale:!0},t.brushStyle)}function ut(t,e,n,i){var r=[z(t,n),z(e,i)],o=[F(t,n),F(e,i)];return[[r[0],o[0]],[r[1],o[1]]]}function ct(t,e){return{left:"w",right:"e",top:"n",bottom:"s"}[p.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[e],function(t){return p.getTransform(t.group)}(t))]}function ht(t,e,n,i,o,a){var s=n.__brushOption,l=t.toRectRange(s.range),u=dt(e,o,a);(0,r.S6)(i,(function(t){var e=V[t];l[e[0]][e[1]]+=u[e[0]]})),s.range=t.fromRectRange(ut(l[0][0],l[1][0],l[0][1],l[1][1])),K(e,n),nt(e,{isEnd:!1})}function pt(t,e,n,i){var o=e.__brushOption.range,a=dt(t,n,i);(0,r.S6)(o,(function(t){t[0]+=a[0],t[1]+=a[1]})),K(t,e),nt(t,{isEnd:!1})}function dt(t,e,n){var i=t.group,r=i.transformCoordToLocal(e,n),o=i.transformCoordToLocal(0,0);return[r[0]-o[0],r[1]-o[1]]}function ft(t,e,n){var i=tt(t,e);return i&&i!==B?i.clipPath(n,t._transform):(0,r.d9)(n)}function gt(t){var e=t.event;e.preventDefault&&e.preventDefault()}function vt(t,e,n){return t.childOfName("main").contain(e,n)}function yt(t,e,n,i){var o,a=t._creatingCover,s=t._creatingPanel,l=t._brushOption;if(t._track.push(n.slice()),function(t){var e=t._track;if(!e.length)return!1;var n=e[e.length-1],i=e[0],r=n[0]-i[0],o=n[1]-i[1];return W(r*r+o*o,.5)>6}(t)||a){if(s&&!a){"single"===l.brushMode&&et(t);var u=(0,r.d9)(l);u.brushType=mt(u.brushType,s),u.panelId=s===B?null:s.panelId,a=t._creatingCover=Y(t,u),t._covers.push(a)}if(a){var c=bt[mt(t._brushType,s)];a.__brushOption.range=c.getCreatingRange(ft(t,a,t._track)),i&&(j(t,a),c.updateCommon(t,a)),$(t,a),o={isEnd:i}}}else i&&"single"===l.brushMode&&l.removeOnClick&&Q(t,e,n)&&et(t)&&(o={isEnd:i,removeOnClick:!0});return o}function mt(t,e){return"auto"===t?e.defaultBrushType:t}var _t={mousedown:function(t){if(this._dragging)xt(this,t);else if(!t.target||!t.target.draggable){gt(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=Q(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,r=t._covers,o=Q(t,e,n);if(!t._dragging)for(var a=0;a<r.length;a++){var s=r[a].__brushOption;if(o&&(o===B||s.panelId===o.panelId)&&bt[s.brushType].contain(r[a],n[0],n[1]))return}o&&i.setCursorStyle("crosshair")}}(this,t,i),this._dragging){gt(t);var r=yt(this,t,i,!1);r&&nt(this,r)}},mouseup:function(t){xt(this,t)}};function xt(t,e){if(t._dragging){gt(e);var n=e.offsetX,i=e.offsetY,r=t.group.transformCoordToLocal(n,i),o=yt(t,e,r,!0);t._dragging=!1,t._track=[],t._creatingCover=null,o&&nt(t,o)}}var bt={lineX:wt(0),lineY:wt(1),rect:{createCover:function(t,e){function n(t){return t}return rt({toRectRange:n,fromRectRange:n},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){var e=it(t);return ut(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,n,i){ot(t,e,n,i)},updateCommon:at,contain:vt},polygon:{createCover:function(t,e){var n=new p.Group;return n.add(new p.Polyline({name:"main",style:lt(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new p.Polygon({name:"main",draggable:!0,drift:(0,r.WA)(pt,t,e),ondragend:(0,r.WA)(nt,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n,i){e.childAt(0).setShape({points:ft(t,e,n)})},updateCommon:at,contain:vt}};function wt(t){return{createCover:function(e,n){return rt({toRectRange:function(e){var n=[e,[0,100]];return t&&n.reverse(),n},fromRectRange:function(e){return e[t]}},e,n,[[["w"],["e"]],[["n"],["s"]]][t])},getCreatingRange:function(e){var n=it(e);return[z(n[0][t],n[1][t]),F(n[0][t],n[1][t])]},updateCoverShape:function(e,n,i,r){var o,a=tt(e,n);if(a!==B&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(t);else{var s=e._zr;o=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[i,o];t&&l.reverse(),ot(e,n,l,r)},updateCommon:at,contain:vt}}const St=X;var Tt=n(9472),Mt={axisPointer:1,tooltip:1,brush:1};function Ct(t){return t=It(t),function(e){return p.clipPointsByRect(e,t)}}function kt(t,e){return t=It(t),function(n){var i=null!=e?e:n,r=i?t.width:t.height,o=i?t.x:t.y;return[o,o+(r||0)]}}function At(t,e,n){var i=It(t);return function(t,r){return i.contain(r[0],r[1])&&!function(t,e,n){var i=e.getComponentByElement(t.topTarget),r=i&&i.coordinateSystem;return i&&i!==n&&!Mt.hasOwnProperty(i.mainType)&&r&&r.model!==n}(t,e,n)}}function It(t){return Tt.Z.create(t)}var Dt=["dataToPoint","pointToData"],Pt=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Ot=function(){function t(t,e,n){var i=this;this._targetInfoList=[];var o=Rt(e,t);(0,r.S6)(Et,(function(t,e){(!n||!n.include||(0,r.cq)(n.include,e)>=0)&&t(o,i._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,(function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=Bt[t.brushType](0,n,e);t.__rangeOffset={offset:Ft[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,e,n){(0,r.S6)(t,(function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&(0,r.S6)(i.coordSyses,(function(i){var r=Bt[t.brushType](1,i,t.range);n(t,r.values,i,e)}))}),this)},t.prototype.setInputRanges=function(t,e){(0,r.S6)(t,(function(t){var n,i,r,o,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=Bt[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?Ft[t.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,r=Vt(n),o=Vt(i),a=[r[0]/o[0],r[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},t.prototype.makePanelOpts=function(t,e){return(0,r.UI)(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:Ct(i),isTargetByCursor:At(i,t,n.coordSysModel),getLinearBrushOtherExtent:kt(i)}}))},t.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&(0,r.cq)(i.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=Rt(e,t),r=0;r<n.length;r++){var o=n[r],a=t.panelId;if(a){if(o.panelId===a)return o}else for(var s=0;s<Zt.length;s++)if(Zt[s](i,o))return o}return!0},t}();function Lt(t){return t[0]>t[1]&&t.reverse(),t}function Rt(t,e){return(0,T.pm)(t,e,{includeMainTypes:Pt})}var Et={grid:function(t,e){var n=t.xAxisModels,i=t.yAxisModels,o=t.gridModels,a=(0,r.kW)(),s={},l={};(n||i||o)&&((0,r.S6)(n,(function(t){var e=t.axis.grid.model;a.set(e.id,e),s[e.id]=!0})),(0,r.S6)(i,(function(t){var e=t.axis.grid.model;a.set(e.id,e),l[e.id]=!0})),(0,r.S6)(o,(function(t){a.set(t.id,t),s[t.id]=!0,l[t.id]=!0})),a.each((function(t){var o=t.coordinateSystem,a=[];(0,r.S6)(o.getCartesians(),(function(t,e){((0,r.cq)(n,t.getAxis("x").model)>=0||(0,r.cq)(i,t.getAxis("y").model)>=0)&&a.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:a[0],coordSyses:a,getPanelRect:Nt.grid,xAxisDeclared:s[t.id],yAxisDeclared:l[t.id]})})))},geo:function(t,e){(0,r.S6)(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:Nt.geo})}))}},Zt=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],Nt={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(p.getTransform(t)),e}},Bt={lineX:(0,r.WA)(zt,0),lineY:(0,r.WA)(zt,1),rect:function(t,e,n){var i=e[Dt[t]]([n[0][0],n[1][0]]),r=e[Dt[t]]([n[0][1],n[1][1]]),o=[Lt([i[0],r[0]]),Lt([i[1],r[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,n){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:(0,r.UI)(n,(function(n){var r=e[Dt[t]](n);return i[0][0]=Math.min(i[0][0],r[0]),i[1][0]=Math.min(i[1][0],r[1]),i[0][1]=Math.max(i[0][1],r[0]),i[1][1]=Math.max(i[1][1],r[1]),r})),xyMinMax:i}}};function zt(t,e,n,i){var o=n.getAxis(["x","y"][t]),a=Lt((0,r.UI)([0,1],(function(t){return e?o.coordToData(o.toLocalCoord(i[t])):o.toGlobalCoord(o.dataToCoord(i[t]))}))),s=[];return s[t]=a,s[1-t]=[NaN,NaN],{values:a,xyMinMax:s}}var Ft={lineX:(0,r.WA)(Wt,0),lineY:(0,r.WA)(Wt,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return(0,r.UI)(t,(function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]}))}};function Wt(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function Vt(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}const Ht=Ot;var Ut=r.S6,Gt=(0,T.Yf)();function Xt(t){var e=Gt(t);return e.snapshots||(e.snapshots=[{}]),e.snapshots}function Yt(t,e,n,i,r,o){t=t||0;var a=n[1]-n[0];if(null!=r&&(r=$t(r,[0,a])),null!=o&&(o=Math.max(o,null!=r?r:0)),"all"===i){var s=Math.abs(e[1]-e[0]);s=$t(s,[0,a]),r=o=$t(s,[r,o]),i=0}e[0]=$t(e[0],n),e[1]=$t(e[1],n);var l=jt(e,i);e[i]+=t;var u,c=r||0,h=n.slice();return l.sign<0?h[0]+=c:h[1]-=c,e[i]=$t(e[i],h),u=jt(e,i),null!=r&&(u.sign!==l.sign||u.span<r)&&(e[1-i]=e[i]+l.sign*r),u=jt(e,i),null!=o&&u.span>o&&(e[1-i]=e[i]+u.sign*o),e}function jt(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function $t(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}u.Z.registerSubTypeDefaulter("dataZoom",(function(){return"slider"}));var qt=["x","y","radius","angle","single"],Kt=["cartesian2d","polar","singleAxis"];function Jt(t){return t+"Axis"}var Qt=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}();function te(t){var e={};return(0,r.S6)(["start","end","startValue","endValue","throttle"],(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}const ee=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n){var i=te(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=te(t);(0,r.TS)(this.option,t,!0),(0,r.TS)(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;(0,r.S6)([["start","startValue"],["end","endValue"]],(function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)}),this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=(0,r.kW)();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return(0,r.S6)(qt,(function(n){var i=this.getReferringComponents(Jt(n),T.iP);if(i.specified){e=!0;var o=new Qt;(0,r.S6)(i.models,(function(t){o.add(t.componentIndex)})),t.set(n,o)}}),this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var o="vertical"===e?"y":"x";a(n.findComponents({mainType:o+"Axis"}),o)}function a(e,n){var o=e[0];if(o){var a=new Qt;if(a.add(o.componentIndex),t.set(n,a),i=!1,"x"===n||"y"===n){var s=o.getReferringComponents("grid",T.C6).models[0];s&&(0,r.S6)(e,(function(t){o.componentIndex!==t.componentIndex&&s===t.getReferringComponents("grid",T.C6).models[0]&&a.add(t.componentIndex)}))}}}i&&a(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single"),i&&(0,r.S6)(qt,(function(e){if(i){var r=n.findComponents({mainType:Jt(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new Qt;o.add(r[0].componentIndex),t.set(e,o),i=!1}}}),this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");(0,r.S6)([["start","startValue"],["end","endValue"]],(function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")}))},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(e,n){null==t&&(t=this.ecModel.getComponent(Jt(e),n))}),this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each((function(n,i){(0,r.S6)(n.indexList,(function(n){t.call(e,i,n)}))}))},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(Jt(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;(0,r.S6)([["start","startValue"],["end","endValue"]],(function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])}),this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;(0,r.S6)(["start","startValue","end","endValue"],(function(n){e[n]=t[n]}))},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i<n.length;i++)for(var r=n[i],o=this._targetAxisInfoMap.get(r),a=0;a<o.indexList.length;a++){var s=this.getAxisProxy(r,o.indexList[a]);if(s.hostedBy(this))return s;e||(e=s)}return e},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={zlevel:0,z:4,filterMode:"filter",start:0,end:100},e}(u.Z);var ne=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.prototype.render=function(t,e,n,i){this.dataZoomModel=t,this.ecModel=e,this.api=n},e.type="dataZoom",e}(y.Z);y.Z.registerClass(ne);const ie=ne;var re=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.type="dataZoom.select",e}(ee);u.Z.registerClass(re);var oe=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.type="dataZoom.select",e}(ie);y.Z.registerClass(oe);var ae=n(9199),se=n(3493),le=n(9820),ue=r.S6,ce=ae.dt;const he=function(){function t(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}return t.prototype.hostedBy=function(t){return this._dataZoomModel===t},t.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},t.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},t.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries((function(e){if(function(t){var e=t.get("coordinateSystem");return(0,r.cq)(Kt,e)>=0}(e)){var n=Jt(this._dimName),i=e.getReferringComponents(n,T.C6).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return r.d9(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];ue(["start","end"],(function(l,u){var c=t[l],h=t[l+"Value"];"percent"===r[u]?(null==c&&(c=o[u]),h=i.parse(ae.NU(c,o,n))):(e=!0,h=null==h?n[u]:i.parse(h),c=ae.NU(h,n,o)),s[u]=h,a[u]=c})),ce(s),ce(a);var l=this._minMaxSpan;function u(t,e,n,r,o){var a=o?"Span":"ValueSpan";Yt(0,t,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=ae.NU(t[s],n,r,!0),o&&(e[s]=i.parse(e[s]))}return e?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var i=[1/0,-1/0];ue(n,(function(t){(0,se.AH)(i,t.getData(),e)}));var r=t.getAxisModel(),o=(0,le.Qw)(r.axis.scale,r,i).calculate();return[o.min,o.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow;"none"!==r&&ue(i,(function(t){var e=t.getData(),i=e.mapDimensionsAll(n);i.length&&("weakFilter"===r?e.filterSelf((function(t){for(var n,r,a,s=0;s<i.length;s++){var l=e.get(i[s],t),u=!isNaN(l),c=l<o[0],h=l>o[1];if(u&&!c&&!h)return!0;u&&(a=!0),c&&(n=!0),h&&(r=!0)}return a&&n&&r})):ue(i,(function(n){if("empty"===r)t.setData(e=e.map(n,(function(t){return function(t){return t>=o[0]&&t<=o[1]}(t)?t:NaN})));else{var i={};i[n]=o,e.selectRange(i)}})),ue(i,(function(t){e.setApproximateExtent(o,t)})))}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;ue(["min","max"],(function(i){var r=e.get(i+"Span"),o=e.get(i+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?r=ae.NU(n[0]+o,n,[0,100],!0):null!=r&&(o=ae.NU(r,[0,100],n,!0)-n[0]),t[i+"Span"]=r,t[i+"ValueSpan"]=o}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=ae.M9(n,[0,500]);i=Math.min(i,20);var r=t.axis.scale.rawExtentInfo;0!==e[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},t}();S.registerProcessor(S.PRIORITY.PROCESSOR.FILTER,{getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(i,r){var o=t.getComponent(Jt(i),r);e(i,r,o,n)}))}))}e((function(t,e,n,i){n.__dzAxisProxy=null}));var n=[];e((function(e,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new he(e,i,o,t),n.push(r.__dzAxisProxy))}));var i=(0,r.kW)();return(0,r.S6)(n,(function(t){(0,r.S6)(t.getTargetSeriesModels(),(function(t){i.set(t.uid,t)}))})),i},overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(e,n){t.getAxisProxy(e,n).reset(t)})),t.eachTargetAxis((function(n,i){t.getAxisProxy(n,i).filterData(t,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}}))}}),S.registerAction("dataZoom",(function(t,e){var n=function(t,e){var n,i=(0,r.kW)(),o=[],a=(0,r.kW)();t.eachComponent({mainType:"dataZoom",query:e},(function(t){a.get(t.uid)||l(t)}));do{n=!1,t.eachComponent("dataZoom",s)}while(n);function s(t){!a.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis((function(t,n){var r=i.get(t);r&&r[n]&&(e=!0)})),e}(t)&&(l(t),n=!0)}function l(t){a.set(t.uid,!0),o.push(t),t.eachTargetAxis((function(t,e){(i.get(t)||i.set(t,[]))[e]=!0}))}return o}(e,t);r.S6(n,(function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}));var pe=n(4841),de=r.S6,fe=(0,T.g0)("toolbox-dataZoom_"),ge=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.render=function(t,e,n,i){this.brushController||(this.brushController=new St(n.getZr()),this.brushController.on("brush",r.ak(this._onBrush,this)).mount()),function(t,e,n,i,r){var o=n.isZoomActive;i&&"takeGlobalCursor"===i.type&&(o="dataZoomSelect"===i.key&&i.dataZoomSelectActive),n.isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new Ht(ye(t),e,{include:["grid"]}).makePanelOpts(r,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}));n.brushController.setPanels(a).enableBrush(!(!o||!a.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,i,n),function(t,e){t.setIconStatus("back",function(t){return Xt(t).length}(e)>1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){ve[n].call(this)},e.prototype.remove=function(t,e){this.brushController.unmount()},e.prototype.dispose=function(t,e){this.brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},i=this.ecModel;this.brushController.updateCovers([]),new Ht(ye(this.model),i,{include:["grid"]}).matchOutputRanges(e,i,(function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(r("x",n,e[0]),r("y",n,e[1])):r({lineX:"x",lineY:"y"}[i],n,e)}})),function(t,e){var n=Xt(t);Ut(e,(function(e,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var a=o.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}})),n.push(e)}(i,n),this._dispatchZoomAction(n)}function r(t,e,r){var o=e.getAxis(t),a=o.model,s=function(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)})),i}(t,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(r=Yt(0,r.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];de(t,(function(t,n){e.push(r.d9(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocale(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(o),ve={zoom:function(){var t=!this.isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=Xt(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return Ut(n,(function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}})),i}(this.ecModel))}};function ye(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}s("dataZoom",ge),(0,pe.f)("dataZoom",(function(t){var e=t.getComponent("toolbox",0);if(e){var n=e.getModel(["feature","dataZoom"]),i=[],r=ye(n),o=(0,T.pm)(t,r);return de(o.xAxisModels,(function(t){return a(t,"xAxis","xAxisIndex")})),de(o.yAxisModels,(function(t){return a(t,"yAxis","yAxisIndex")})),i}function a(t,e,r){var o=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:fe+e+o};a[r]=o,i.push(a)}})),s("restore",function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.onclick=function(t,e){!function(t){Gt(t).snapshots=null}(t),e.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){return{show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocale(["toolbox","restore","title"])}},e}(o)),S.registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(t,e){e.resetOption("recreate")}))},3121:(t,e,n)=>{"use strict";var i=n(8966),r=n(8778),o=n(4566),a=n(5495);function s(t,e){var n,i=[],o=t.seriesIndex;if(null==o||!(n=e.getSeriesByIndex(o)))return{point:[]};var s=n.getData(),l=a.gO(s,t);if(null==l||l<0||r.kJ(l))return{point:[]};var u=s.getItemGraphicEl(l),c=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(l)||[];else if(c&&c.dataToPoint)if(t.isStacked){var h=c.getBaseAxis(),p=c.getOtherAxis(h).dim,d=h.dim,f="x"===p||"radius"===p?1:0,g=s.mapDimension(d),v=[];v[f]=s.get(g,l),v[1-f]=s.get(s.getCalculationInfo("stackResultDimension"),l),i=c.dataToPoint(v)||[]}else i=c.dataToPoint(s.getValues(r.UI(c.dimensions,(function(t){return s.mapDimension(t)})),l))||[];else if(u){var y=u.getBoundingRect().clone();y.applyTransform(u.transform),i=[y.x+y.width/2,y.y+y.height/2]}return{point:i,el:u}}var l=(0,a.Yf)();function u(t,e,n,i,o){var a=t.axis;if(!a.scale.isBlank()&&a.containData(e))if(t.involveSeries){var s=function(t,e){var n=e.axis,i=n.dim,o=t,a=[],s=Number.MAX_VALUE,l=-1;return(0,r.S6)(e.seriesModels,(function(e,u){var c,h,p=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(p,t,n);h=d.dataIndices,c=d.nestestValue}else{if(!(h=e.getData().indicesOfNearest(p[0],t,"category"===n.type?.5:null)).length)return;c=e.getData().get(p[0],h[0])}if(null!=c&&isFinite(c)){var f=t-c,g=Math.abs(f);g<=s&&((g<s||f>=0&&l<0)&&(s=g,l=f,o=c,a.length=0),(0,r.S6)(h,(function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:a,snapToValue:o}}(e,t),l=s.payloadBatch,u=s.snapToValue;l[0]&&null==o.seriesIndex&&(0,r.l7)(o,l[0]),!i&&t.snap&&a.containData(u)&&null!=u&&(e=u),n.showPointer(t,e,l),n.showTooltip(t,s,u)}else n.showPointer(t,e)}function c(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function h(t,e,n,i){var r=n.payloadBatch,a=e.axis,s=a.model,l=e.axisPointerModel;if(e.triggerTooltip&&r.length){var u=e.coordSys.model,c=o.zm(u),h=t.map[c];h||(h=t.map[c]={coordSysId:u.id,coordSysIndex:u.componentIndex,coordSysType:u.type,coordSysMainType:u.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:a.dim,axisIndex:s.componentIndex,axisType:s.type,axisId:s.id,value:i,valueLabelOpt:{precision:l.get(["label","precision"]),formatter:l.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function p(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function d(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}var f=n(9312),g=n(8781),v=(0,a.Yf)(),y=r.S6;function m(t,e,n){if(!g.Z.node){var i=e.getZr();v(i).records||(v(i).records={}),function(t,e){function n(n,i){t.on(n,(function(n){var r=function(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}(e);y(v(t).records,(function(t){t&&i(t,n,r.dispatchAction)})),function(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}(r.pendings,e)}))}v(t).initialized||(v(t).initialized=!0,n("click",r.WA(x,"click")),n("mousemove",r.WA(x,"mousemove")),n("globalout",_))}(i,e),(v(i).records[t]||(v(i).records[t]={})).handler=n}}function _(t,e,n){t.handler("leave",null,n)}function x(t,e,n,i){e.handler(t,n,i)}function b(t,e){if(!g.Z.node){var n=e.getZr();(v(n).records||{})[t]&&(v(n).records[t]=null)}}var w=n(8278),S=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,f.ZT)(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";m("axisPointer",n,(function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},e.prototype.remove=function(t,e){b("axisPointer",e)},e.prototype.dispose=function(t,e){b("axisPointer",e)},e.type="axisPointer",e}(w.Z);w.Z.registerClass(S);var T=n(3696),M=n(3837),C=n(4013),k=(0,a.Yf)(),A=r.d9,I=r.ak;function D(t,e,n,i){P(k(n).lastProp,i)||(k(n).lastProp=i,e?T.updateProps(n,i,t):(n.stopAnimation(),n.attr(i)))}function P(t,e){if(r.Kn(t)&&r.Kn(e)){var n=!0;return r.S6(e,(function(e,i){n=n&&P(t[i],e)})),!!n}return t===e}function O(t,e){t[e.get(["label","show"])?"show":"hide"]()}function L(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function R(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)}))}const E=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(t,e,n,i){var o=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==o||this._lastStatus!==a){this._lastValue=o,this._lastStatus=a;var s=this._group,l=this._handle;if(!a||"hide"===a)return s&&s.hide(),void(l&&l.hide());s&&s.show(),l&&l.show();var u={};this.makeElOption(u,o,t,e,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var h=this._moveAnimation=this.determineAnimation(t,e);if(s){var p=r.WA(D,e,h);this.updatePointerEl(s,u,p),this.updateLabelEl(s,u,p,e)}else s=this._group=new T.Group,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),n.getZr().add(s);R(s,e,!0),this._renderHandle(o)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,a=e.get("snap");if(!a&&!r)return!1;if("auto"===n||null==n){var s=this.animationThreshold;if(r&&i.getBandWidth()>s)return!0;if(a){var l=o.r(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,r){},t.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;if(r){var o=k(t).pointerEl=new T[r.type](A(e.pointer));t.add(o)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=k(t).labelEl=new T.Text(A(e.label));t.add(r),O(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=k(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=k(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),O(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),o=this._handle,a=n.getModel("handle"),s=n.get("status");if(!a.get("show")||!s||"hide"===s)return o&&i.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=T.createIcon(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){M.sT(t.event)},onmousedown:I(this._onHandleDragMove,this,0,0),drift:I(this._onHandleDragMove,this),ondragend:I(this._onHandleDragEnd,this)}),i.add(o)),R(o,n,!1),o.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");r.kJ(l)||(l=[l,l]),o.scaleX=l[0]/2,o.scaleY=l[1]/2,C.T9(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){D(this._axisPointerModel,!e&&this._moveAnimation,this._handle,L(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(L(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(L(i)),k(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();var Z=n(9356),N=n(349),B=n(561),z=n(3493),F=n(8637),W=n(5628);function V(t,e,n,i,o){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:o.precision}),s=o.formatter;if(s){var l={value:z.DX(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};r.S6(i,(function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&l.seriesData.push(r)})),r.HD(s)?a=s.replace("{value}",a):r.mf(s)&&(a=s(l))}return a}function H(t,e,n){var i=B.Ue();return B.U1(i,i,n.rotation),B.Iu(i,i,n.position),T.applyTransform([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}var U=n(8395),G=n(7774),X=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,f.ZT)(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=Y(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var c=function(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}(i),h=j[s](o,u,l);h.style=c,t.graphicKey=h.type,t.pointer=h}!function(t,e,n,i,r,o){var a=F.Z.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),function(t,e,n,i,r){var o=V(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=N.MY(a.get("padding")||0),l=a.getFont(),u=Z.lP(o,l),c=r.position,h=u.width+s[1]+s[3],p=u.height+s[0]+s[2],d=r.align;"right"===d&&(c[0]-=h),"center"===d&&(c[0]-=h/2);var f=r.verticalAlign;"bottom"===f&&(c[1]-=p),"middle"===f&&(c[1]-=p/2),function(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(c,h,p,i);var g=a.get("backgroundColor");g&&"auto"!==g||(g=e.get(["axisLine","lineStyle","color"])),t.label={x:c[0],y:c[1],style:(0,W.Lr)(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}(e,i,r,o,{position:H(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}(e,t,U.bK(a.model,n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=U.bK(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=H(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=Y(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=[t.x,t.y];u[l]+=e[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,h=[c,c];return h[l]=u[l],{x:u[0],y:u[1],rotation:t.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(E);function Y(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var j={line:function(t,e,n){var i,r,o;return{type:"Line",subPixelOptimize:!0,shape:(i=[e,n[0]],r=[e,n[1]],o=$(t),{x1:i[o=o||0],y1:i[1-o],x2:r[o],y2:r[1-o]})}},shadow:function(t,e,n){var i,r,o,a=Math.max(1,t.getBandWidth()),s=n[1]-n[0];return{type:"Rect",shape:(i=[e-a/2,n[0]],r=[a,s],o=$(t),{x:i[o=o||0],y:i[1-o],width:r[o],height:r[1-o]})}}};function $(t){return"x"===t.dim?0:1}G.Z.registerAxisPointerClass("CartesianAxisPointer",X);var q=n(2822);const K=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,f.ZT)(e,t),e.type="axisPointer",e.defaultOption={show:"auto",zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(q.Z);q.Z.registerClass(K),i.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!r.kJ(e)&&(t.axisPointer.link=[e])}})),i.registerProcessor(i.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=o.KM(t,e)})),i.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},(function(t,e,n){var i=t.currTrigger,o=[t.x,t.y],a=t,f=t.dispatchAction||(0,r.ak)(n.dispatchAction,n),g=e.getComponent("axisPointer").coordSysAxesInfo;if(g){d(o)&&(o=s({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var v=d(o),y=a.axesInfo,m=g.axesInfo,_="leave"===i||d(o),x={},b={},w={list:[],map:{}},S={showPointer:(0,r.WA)(c,b),showTooltip:(0,r.WA)(h,w)};(0,r.S6)(g.coordSysMap,(function(t,e){var n=v||t.containPoint(o);(0,r.S6)(g.coordSysAxesInfo[e],(function(t,e){var i=t.axis,r=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(y,t);if(!_&&n&&(!y||r)){var a=r&&r.value;null!=a||v||(a=i.pointToData(o)),null!=a&&u(t,a,S,!1,x)}}))}));var T={};return(0,r.S6)(m,(function(t,e){var n=t.linkGroup;n&&!b[e]&&(0,r.S6)(n.axesInfo,(function(e,i){var r=b[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,p(e),p(t)))),T[t.key]=o}}))})),(0,r.S6)(T,(function(t,e){u(m[e],t,S,!0,x)})),function(t,e,n){var i=n.axesInfo=[];(0,r.S6)(e,(function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(b,m,x),function(t,e,n,i){if(!d(e)&&t.list.length){var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}else i({type:"hideTip"})}(w,o,t,f),function(t,e,n){var i=n.getZr(),o="axisPointerLastHighlights",a=l(i)[o]||{},s=l(i)[o]={};(0,r.S6)(t,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&(0,r.S6)(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;s[e]=t}))}));var u=[],c=[];(0,r.S6)(a,(function(t,e){!s[e]&&c.push(t)})),(0,r.S6)(s,(function(t,e){!a[e]&&u.push(t)})),c.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:c}),u.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:u})}(m,0,n),x}}));var J=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,f.ZT)(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderColor:"#333",borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(q.Z);q.Z.registerClass(J);var Q=n(1756),tt=n(9186);function et(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}var nt=n(574),it=["-ms-","-moz-","-o-","-webkit-",""];function rt(t,e,n,i,r){var o=e&&e.painter;if(n){var a=o&&o.getViewportRoot();a&&(0,tt.YB)(t,a,document.body,i,r)}else{t[0]=i,t[1]=r;var s=o&&o.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}const ot=function(){function t(t,e,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,g.Z.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var r=this._zr=e.getZr(),o=this._appendToBody=n&&n.appendToBody;rt(this._styleCoord,r,o,e.getWidth()/2,e.getHeight()/2),o?document.body.appendChild(i):t.appendChild(i),this._container=t;var a=this;i.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},i.onmousemove=function(t){if(t=t||window.event,!a._enterable){var e=r.handler,n=r.painter.getViewportRoot();(0,M.OD)(n,t,!0),e.dispatch("mousemove",t)}},i.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return t.prototype.update=function(t){var e=this._container,n=e.currentStyle||document.defaultView.getComputedStyle(e),i=e.style;"absolute"!==i.position&&"absolute"!==n.position&&(i.position="relative"),t.get("alwaysShowContent")&&this._moveIfResized(),this.el.className=t.get("className")||""},t.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=this._styleCoord,o=n.offsetHeight/2;e=(0,N.Lz)(e),n.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+function(t,e,n){var i=[],o=t.get("transitionDuration"),a=t.get("backgroundColor"),s=t.get("shadowBlur"),l=t.get("shadowColor"),u=t.get("shadowOffsetX"),c=t.get("shadowOffsetY"),h=t.getModel("textStyle"),p=(0,nt.d_)(t,"html"),d=u+"px "+c+"px "+s+"px "+l;return i.push("box-shadow:"+d),e&&o&&i.push(function(t,e){var n="cubic-bezier(0.23, 1, 0.32, 1)",i="opacity "+t/2+"s "+n+",visibility "+t/2+"s "+n;return e||(i+=",left "+t+"s "+n+",top "+t+"s "+n),(0,r.UI)(it,(function(t){return t+"transition:"+i})).join(";")}(o,n)),a&&(g.Z.canvasSupported?i.push("background-Color:"+a):(i.push("background-Color:#"+(0,Q.NC)(a)),i.push("filter:alpha(opacity=70)"))),(0,r.S6)(["width","color","radius"],(function(e){var n="border-"+e,r=(0,N.zW)(n),o=t.get(r);null!=o&&i.push(n+":"+o+("color"===e?"":"px"))})),i.push(function(t){var e=[],n=t.get("fontSize"),i=t.getTextColor();i&&e.push("color:"+i),e.push("font:"+t.getFont()),n&&e.push("line-height:"+Math.round(3*n/2)+"px");var o=t.get("textShadowColor"),a=t.get("textShadowBlur")||0,s=t.get("textShadowOffsetX")||0,l=t.get("textShadowOffsetY")||0;return o&&a&&e.push("text-shadow:"+s+"px "+l+"px "+a+"px "+o),(0,r.S6)(["decoration","align"],(function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)})),e.join(";")}(h)),null!=p&&i.push("padding:"+(0,N.MY)(p).join("px ")+"px"),i.join(";")+";"}(t,!this._firstShow,this._longHide)+";left:"+i[0]+"px;top:"+(i[1]-o)+"px;border-color: "+e+";"+(t.get("extraCssText")||""),n.style.display=n.innerHTML?"block":"none",n.style.pointerEvents=this._enterable?"auto":"none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(t,e,n,i,o){if(null!=t){var a=this.el;if((0,r.HD)(o)&&"item"===n.get("trigger")&&!et(n)&&(t+=function(t,e,n){if(!(0,r.HD)(n)||"inside"===n)return"";e=(0,N.Lz)(e);var i,o="left"===(i=n)?"right":"right"===i?"left":"top"===i?"bottom":"top",a="",s="";return(0,r.cq)(["left","right"],o)>-1?(a=o+":-6px;top:50%;",s="translateY(-50%) rotate("+("left"===o?-225:-45)+"deg)"):(a=o+":-6px;left:50%;",s="translateX(-50%) rotate("+("top"===o?225:45)+"deg)"),'<div style="'+["position:absolute;width:10px;height:10px;",""+a+(s=(0,r.UI)(it,(function(t){return t+"transform:"+s})).join(";"))+";","border-bottom: "+e+" solid 1px;","border-right: "+e+" solid 1px;","background-color: "+t+";","box-shadow: 8px 8px 16px -3px #000;"].join("")+'"></div>'}(n.get("backgroundColor"),i,o)),(0,r.HD)(t))a.innerHTML=t;else if(t){a.innerHTML="",(0,r.kJ)(t)||(t=[t]);for(var s=0;s<t.length;s++)(0,r.Mh)(t[s])&&t[s].parentNode!==a&&a.appendChild(t[s])}}},t.prototype.setEnterable=function(t){this._enterable=t},t.prototype.getSize=function(){var t=this.el;return[t.clientWidth,t.clientHeight]},t.prototype.moveTo=function(t,e){var n=this._styleCoord;if(rt(n,this._zr,this._appendToBody,t,e),null!=n[0]&&null!=n[1]){var i=this.el.style;i.left=n[0].toFixed(0)+"px",i.top=n[1].toFixed(0)+"px"}},t.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},t.prototype.hide=function(){var t=this;this.el.style.visibility="hidden",this.el.style.opacity="0",this._show=!1,this._longHideTimeout=setTimeout((function(){return t._longHide=!0}),500)},t.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout((0,r.ak)(this.hide,this),t)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this.el.parentNode.removeChild(this.el)},t.prototype.getOuterSize=function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var n=document.defaultView.getComputedStyle(this.el);n&&(t+=parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),e+=parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:t,height:e}},t}();var at=n(4239),st=n(3264);function lt(t){return Math.max(0,t)}function ut(t){var e=lt(t.shadowBlur||0),n=lt(t.shadowOffsetX||0),i=lt(t.shadowOffsetY||0);return{left:lt(e-n),right:lt(e+n),top:lt(e-i),bottom:lt(e+i)}}function ct(t,e,n,i){t[0]=n,t[1]=i,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}const ht=function(){function t(t){this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._zr=t.getZr(),ct(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return t.prototype.update=function(t){t.get("alwaysShowContent")&&this._moveIfResized()},t.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},t.prototype.setContent=function(t,e,n,i,o){r.Kn(t)&&(0,st._y)(""),this.el&&this._zr.remove(this.el);var a=n.getModel("textStyle");this.el=new at.ZP({style:{rich:e.richTextStyles,text:t,lineHeight:22,backgroundColor:n.get("backgroundColor"),borderRadius:n.get("borderRadius"),borderWidth:1,borderColor:i,shadowColor:n.get("shadowColor"),shadowBlur:n.get("shadowBlur"),shadowOffsetX:n.get("shadowOffsetX"),shadowOffsetY:n.get("shadowOffsetY"),textShadowColor:a.get("textShadowColor"),textShadowBlur:a.get("textShadowBlur")||0,textShadowOffsetX:a.get("textShadowOffsetX")||0,textShadowOffsetY:a.get("textShadowOffsetY")||0,fill:n.get(["textStyle","color"]),padding:(0,nt.d_)(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),this._zr.add(this.el);var s=this;this.el.on("mouseover",(function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0})),this.el.on("mouseout",(function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1}))},t.prototype.setEnterable=function(t){this._enterable=t},t.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),n=ut(t.style);return[e.width+n.left+n.right,e.height+n.top+n.bottom]},t.prototype.moveTo=function(t,e){var n=this.el;if(n){var i=this._styleCoord;ct(i,this._zr,t,e),t=i[0],e=i[1];var r=n.style,o=lt(r.borderWidth||0),a=ut(r);n.x=t+o+a.left,n.y=e+o+a.top,n.markRedraw()}},t.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},t.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},t.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(r.ak(this.hide,this),t)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.getOuterSize=function(){var t=this.getSize();return{width:t[0],height:t[1]}},t.prototype.dispose=function(){this._zr.remove(this.el)},t}();var pt=n(9199),dt=n(2746),ft=n(4708),gt=n(4037),vt=n(1563),yt=n(5498),mt=n(9291),_t=r.ak,xt=r.S6,bt=pt.GM,wt=new T.Rect({shape:{x:-1,y:-1,width:2,height:2}}),St=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,f.ZT)(e,t),e.prototype.init=function(t,e){if(!g.Z.node){var n=t.getComponent("tooltip"),i=n.get("renderMode");this._renderMode=(0,a.U9)(i),this._tooltipContent="richText"===this._renderMode?new ht(e):new ot(e.getDom(),e,{appendToBody:n.get("appendToBody",!0)})}},e.prototype.render=function(t,e,n){if(!g.Z.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update(t),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel.get("triggerOn");m("itemTooltip",this._api,_t((function(e,n,i){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})}))}},e.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!g.Z.node){var r=Mt(i,n);this._ticket="";var o=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var a=wt;a.x=i.x,a.y=i.y,a.update(),a.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:a},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var l=s(i,e),u=l.point[0],c=l.point[1];null!=u&&null!=c&&this._tryShow({offsetX:u,offsetY:c,position:i.position,target:l.el},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},e.prototype.manuallyHideTip=function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(Mt(i,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s&&"axis"===Tt([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model,t]).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;i&&i.length?this._showAxisTooltip(i,t):n&&(0,mt.o)(n,(function(t){return null!=(0,vt.A)(t).dataIndex}))?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,n,e)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,n,e)):(this._lastDataByCoordSys=null,this._hide(e))}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=r.ak(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,o=[e.offsetX,e.offsetY],a=Tt([e.tooltipOption,i]),s=this._renderMode,l=[],u=(0,nt.TX)("section",{blocks:[],noHeader:!0}),c=[],h=new nt.iv;xt(t,(function(t){xt(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),i=t.value;if(e&&null!=i){var o=V(i,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),a=(0,nt.TX)("section",{header:o,noHeader:!r.fy(o),sortBlocks:!0,blocks:[]});u.blocks.push(a),r.S6(t.seriesDataIndices,(function(r){var u=n.getSeriesByIndex(r.seriesIndex),p=r.dataIndexInside,d=u.getDataParams(p);d.axisDim=t.axisDim,d.axisIndex=t.axisIndex,d.axisType=t.axisType,d.axisId=t.axisId,d.axisValue=z.DX(e.axis,{value:i}),d.axisValueLabel=o,d.marker=h.makeTooltipMarker("item",N.Lz(d.color),s);var f=(0,yt.f)(u.formatTooltip(p,!0,null));f.markupFragment&&a.blocks.push(f.markupFragment),f.markupText&&c.push(f.markupText),l.push(d)}))}}))})),u.blocks.reverse(),c.reverse();var p=e.position,d=a.get("order"),f=(0,nt.BY)(u,h,s,d,n.get("useUTC"));f&&c.unshift(f);var g="richText"===s?"\n\n":"<br/>",v=c.join(g);this._showOrMove(a,(function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(a,p,o[0],o[1],this._tooltipContent,l):this._showTooltipContent(a,v,l,Math.random()+"",o[0],o[1],p,null,h)}))},e.prototype._showSeriesItemTooltip=function(t,e,n){var i=(0,mt.o)(e,(function(t){return null!=(0,vt.A)(t).dataIndex})),r=this._ecModel,o=(0,vt.A)(i),a=o.seriesIndex,s=r.getSeriesByIndex(a),l=o.dataModel||s,u=o.dataIndex,c=o.dataType,h=l.getData(c),p=this._renderMode,d=Tt([h.getItemModel(u),l,s&&(s.coordinateSystem||{}).model,this._tooltipModel]),f=d.get("trigger");if(null==f||"item"===f){var g=l.getDataParams(u,c),v=new nt.iv;g.marker=v.makeTooltipMarker("item",N.Lz(g.color),p);var y=(0,yt.f)(l.formatTooltip(u,!1,c)),m=d.get("order"),_=y.markupFragment?(0,nt.BY)(y.markupFragment,v,p,m,r.get("useUTC")):y.markupText,x="item_"+l.name+"_"+u;this._showOrMove(d,(function(){this._showTooltipContent(d,_,g,x,t.offsetX,t.offsetY,t.position,t.target,v)})),n({type:"showTip",dataIndexInside:u,dataIndex:h.getRawIndex(u),seriesIndex:a,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var i=e.tooltip;r.HD(i)&&(i={content:i,formatter:i});var o=new ft.Z(i,this._tooltipModel,this._ecModel),a=o.get("content"),s=Math.random()+"",l=new nt.iv;this._showOrMove(o,(function(){this._showTooltipContent(o,a,o.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e,l)})),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,i,o,a,s,l,u){if(this._ticket="",t.get("showContent")&&t.get("show")){var c=this._tooltipContent,h=t.get("formatter");s=s||t.get("position");var p=e,d=this._getNearestPoint([o,a],n,t.get("trigger"));if(h&&r.HD(h)){var f=t.ecModel.get("useUTC"),g=r.kJ(n)?n[0]:n;p=h,g&&g.axisType&&g.axisType.indexOf("time")>=0&&(p=(0,gt.WU)(g.axisValue,p,f)),p=N.kF(p,n,!0)}else if(r.mf(h)){var v=_t((function(e,i){e===this._ticket&&(c.setContent(i,u,t,d.color,s),this._updatePosition(t,s,o,a,c,n,l))}),this);this._ticket=i,p=h(n,i,v)}c.setContent(p,u,t,d.color,s),c.show(t,d.color),this._updatePosition(t,s,o,a,c,n,l)}},e.prototype._getNearestPoint=function(t,e,n){return"axis"===n||r.kJ(e)?{color:"html"===this._renderMode?"#fff":"none"}:r.kJ(e)?void 0:{color:e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,i,o,a,s){var l=this._api.getWidth(),u=this._api.getHeight();e=e||t.get("position");var c=o.getSize(),h=t.get("align"),p=t.get("verticalAlign"),d=s&&s.getBoundingRect().clone();if(s&&d.applyTransform(s.transform),r.mf(e)&&(e=e([n,i],a,o.el,d,{viewSize:[l,u],contentSize:c.slice()})),r.kJ(e))n=bt(e[0],l),i=bt(e[1],u);else if(r.Kn(e)){var f=e;f.width=c[0],f.height=c[1];var g=dt.ME(f,{width:l,height:u});n=g.x,i=g.y,h=null,p=null}else if(r.HD(e)&&s){var v=function(t,e,n){var i=n[0],r=n[1],o=0,a=0,s=e.width,l=e.height;switch(t){case"inside":o=e.x+s/2-i/2,a=e.y+l/2-r/2;break;case"top":o=e.x+s/2-i/2,a=e.y-r-10;break;case"bottom":o=e.x+s/2-i/2,a=e.y+l+10;break;case"left":o=e.x-i-10-5,a=e.y+l/2-r/2;break;case"right":o=e.x+s+10+5,a=e.y+l/2-r/2}return[o,a]}(e,d,c);n=v[0],i=v[1]}else v=function(t,e,n,i,r,o,a){var s=n.getOuterSize(),l=s.width,u=s.height;return null!=o&&(t+l+o+2>i?t-=l+o:t+=o),null!=a&&(e+u+a>r?e-=u+a:e+=a),[t,e]}(n,i,o,l,u,h?null:20,p?null:20),n=v[0],i=v[1];h&&(n-=Ct(h)?c[0]/2:"right"===h?c[0]:0),p&&(i-=Ct(p)?c[1]/2:"bottom"===p?c[1]:0),et(t)&&(v=function(t,e,n,i,r){var o=n.getOuterSize(),a=o.width,s=o.height;return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,[t=Math.max(t,0),e=Math.max(e,0)]}(n,i,o,l,u),n=v[0],i=v[1]),o.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t){var e=this._lastDataByCoordSys,n=!!e&&e.length===t.length;return n&&xt(e,(function(e,i){var r=e.dataByAxis||[],o=(t[i]||{}).dataByAxis||[];(n=n&&r.length===o.length)&&xt(r,(function(t,e){var i=o[e]||{},r=t.seriesDataIndices||[],a=i.seriesDataIndices||[];(n=n&&t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&r.length===a.length)&&xt(r,(function(t,e){var i=a[e];n=n&&t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex}))}))})),this._lastDataByCoordSys=t,!!n},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){g.Z.node||(this._tooltipContent.dispose(),b("itemTooltip",e))},e.type="tooltip",e}(w.Z);function Tt(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(n instanceof ft.Z&&(n=n.get("tooltip",!0)),r.HD(n)&&(n={formatter:n}),e=new ft.Z(n,e,e.ecModel))}return e}function Mt(t,e){return t.dispatchAction||r.ak(e.dispatchAction,e)}function Ct(t){return"center"===t||"middle"===t}w.Z.registerClass(St),i.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),i.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}))},574:(t,e,n)=>{"use strict";n.d(e,{TX:()=>h,BY:()=>f,jT:()=>m,d_:()=>_,iv:()=>x});var i=n(349),r=n(8778),o=n(5294),a=n(9199),s={fontSize:12,fill:"#6e7079"},l={fontSize:14,fill:"#464646",fontWeight:900},u=[0,10,20,30],c=["","\n","\n\n","\n\n\n"];function h(t,e){return e.type=t,e}function p(t){return(0,r.RI)(d,t.type)&&d[t.type]}var d={section:{planLayout:function(t){var e=t.blocks.length,n=e>1||e>0&&!t.noHeader,i=0;(0,r.S6)(t.blocks,(function(t){p(t).planLayout(t);var e=t.__gapLevelBetweenSubBlocks;e>=i&&(i=e+(!n||e&&("section"!==t.type||t.noHeader)?0:1))})),t.__gapLevelBetweenSubBlocks=i},build:function(t,e,n){var a=e.noHeader,s=g(e),l=function(t,e,n){var i=[],a=e.blocks||[];(0,r.hu)(!a||(0,r.kJ)(a)),a=a||[];var s=t.orderMode;if(e.sortBlocks&&s){a=a.slice();var l={valueAsc:"asc",valueDesc:"desc"};if((0,r.RI)(l,s)){var u=new o.ID(l[s],null);a.sort((function(t,e){return u.evaluate(t.sortParam,e.sortParam)}))}else"seriesDesc"===s&&a.reverse()}var c=g(e);if((0,r.S6)(a,(function(e,n){var r=p(e).build(t,e,n>0?c.html:0);null!=r&&i.push(r)})),i.length)return"richText"===t.renderMode?i.join(c.richText):v(i.join(""),n)}(t,e,a?n:s.html);if(a)return l;var u=(0,i.uX)(e.header,"ordinal",t.useUTC);return"richText"===t.renderMode?y(t,u)+s.richText+l:v('<div style="font-size:12px;color:#6e7079;line-height:1;">'+(0,i.F1)(u)+"</div>"+l,n)}},nameValue:{planLayout:function(t){t.__gapLevelBetweenSubBlocks=0},build:function(t,e,n){var o=t.renderMode,a=e.noName,s=e.noValue,u=!e.markerType,c=e.name,h=e.value,p=t.useUTC;if(!a||!s){var d=u?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",o),f=a?"":(0,i.uX)(c,"ordinal",p),g=e.valueType,m=s?[]:(0,r.kJ)(h)?(0,r.UI)(h,(function(t,e){return(0,i.uX)(t,(0,r.kJ)(g)?g[e]:g,p)})):[(0,i.uX)(h,(0,r.kJ)(g)?g[0]:g,p)],_=!u||!a,x=!u&&a;return"richText"===o?(u?"":d)+(a?"":y(t,f))+(s?"":function(t,e,n,i){var r=[l],o=i?10:20;return n&&r.push({padding:[0,0,0,o],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(e.join(" "),r)}(t,m,_,x)):v((u?"":d)+(a?"":function(t,e){return'<span style="font-size:12px;color:#6e7079;'+(e?"margin-left:2px":"")+'">'+(0,i.F1)(t)+"</span>"}(f,!u))+(s?"":function(t,e,n){return'<span style="'+(e?"float:right;margin-left:"+(n?"10px":"20px"):"")+';font-size:14px;color:#464646;font-weight:900">'+(0,r.UI)(t,(function(t){return(0,i.F1)(t)})).join(" ")+"</span>"}(m,_,x)),n)}}}};function f(t,e,n,i,r){if(t){var o=p(t);o.planLayout(t);var a={useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e};return o.build(a,t,0)}}function g(t){var e=t.__gapLevelBetweenSubBlocks;return{html:u[e],richText:c[e]}}function v(t,e){return'<div style="margin: '+e+'px 0 0;line-height:1;">'+t+'<div style="clear:both"></div></div>'}function y(t,e){return t.markupStyleCreator.wrapRichTextStyle(e,s)}function m(t,e){var n=t.getData().getItemVisual(e,"style")[t.visualDrawType];return(0,i.Lz)(n)}function _(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var x=function(){function t(){this.richTextStyles={},this._nextStyleNameId=(0,a.jj)()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var o="richText"===n?this._generateStyleName():null,a=(0,i.A0)({color:e,type:t,renderMode:n,markerId:o});return(0,r.HD)(a)?a:(this.richTextStyles[o]=a.style,a.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};(0,r.kJ)(e)?(0,r.S6)(e,(function(t){return(0,r.l7)(n,t)})):(0,r.l7)(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},t}()},5320:(t,e,n)=>{"use strict";function i(t,e){return t.type===e}n.d(e,{H:()=>i})},3493:(t,e,n)=>{"use strict";n.d(e,{aG:()=>$,Do:()=>Q,DX:()=>J,PY:()=>nt,rk:()=>tt,Yb:()=>q,J9:()=>K,Jk:()=>j,WY:()=>et,AH:()=>it});var i=n(8778),r=n(9312),o=n(4536),a=function(){function t(t){this._setting=t||{},this._extent=[1/0,-1/0]}return t.prototype.getSetting=function(t){return this._setting[t]},t.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();o.au(a,{registerWhenExtend:!0});const s=a;var l=n(1214),u=n(9199),c=u.NM;function h(t){return u.ZB(t)+2}function p(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function d(t,e){return t>=e[0]&&t<=e[1]}function f(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function g(t,e){return t*(e[1]-e[0])+e[0]}var v=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new l.Z({})),(0,i.kJ)(r)&&(r=new l.Z({categories:(0,i.UI)(r,(function(t){return(0,i.Kn)(t)?t.value:t}))})),n._ordinalMeta=r,n._categorySortInfo=[],n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return(0,r.ZT)(e,t),e.prototype.parse=function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return d(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return f(t=this.getCategoryIndex(this.parse(t)),this._extent)},e.prototype.scale=function(t){return t=this.getCategoryIndex(t),Math.round(g(t,this._extent))},e.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:this.getCategoryIndex(n)}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setCategorySortInfo=function(t){this._categorySortInfo=t},e.prototype.getCategorySortInfo=function(){return this._categorySortInfo},e.prototype.getCategoryIndex=function(t){return this._categorySortInfo.length?this._categorySortInfo[t].beforeSortIndex:t},e.prototype.getRawIndex=function(t){return this._categorySortInfo.length?this._categorySortInfo[t].ordinalNumber:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var e=this.getRawIndex(t.value),n=this._ordinalMeta.categories[e];return null==n?"":n+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.isInExtentRange=function(t){return t=this.getCategoryIndex(t),this._extent[0]<=t&&this._extent[1]>=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.niceTicks=function(){},e.prototype.niceExtent=function(){},e.type="ordinal",e}(s);s.registerClass(v);const y=v;var m=n(349),_=u.NM,x=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return(0,r.ZT)(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return d(t,this._extent)},e.prototype.normalize=function(t){return f(t,this._extent)},e.prototype.scale=function(t){return g(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=h(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;n[0]<i[0]&&(t?o.push({value:_(i[0]-e,r)}):o.push({value:n[0]}));for(var a=i[0];a<=i[1]&&(o.push({value:a}),(a=_(a+e,r))!==o[o.length-1].value);)if(o.length>1e4)return[];var s=o.length?o[o.length-1].value:i[1];return n[1]>s&&(t?o.push({value:_(s+e,r)}):o.push({value:n[1]})),o},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;r<e.length;r++){for(var o=e[r],a=e[r-1],s=0,l=[],u=(o.value-a.value)/t;s<t-1;){var c=_(a.value+(s+1)*u);c>i[0]&&c<i[1]&&l.push(c),s++}n.push(l)}return n},e.prototype.getLabel=function(t,e){if(null==t)return"";var n=e&&e.precision;null==n?n=u.ZB(t.value)||0:"auto"===n&&(n=this._intervalPrecision);var i=_(t.value,n,!0);return m.OD(i)},e.prototype.niceTicks=function(t,e,n){t=t||5;var i=this._extent,r=i[1]-i[0];if(isFinite(r)){r<0&&(r=-r,i.reverse());var o=function(t,e,n,i){var r={},o=t[1]-t[0],a=r.interval=u.kx(o/e,!0);null!=n&&a<n&&(a=r.interval=n),null!=i&&a>i&&(a=r.interval=i);var s=r.intervalPrecision=h(a);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),p(t,0,e),p(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(r.niceTickExtent=[c(Math.ceil(t[0]/a)*a,s),c(Math.floor(t[1]/a)*a,s)],t),r}(i,t,e,n);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},e.prototype.niceExtent=function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var n=e[0];t.fixMax||(e[1]+=n/2),e[0]-=n/2}else e[1]=1;var i=e[1]-e[0];isFinite(i)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=_(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=_(Math.ceil(e[1]/r)*r))},e.type="interval",e}(s);s.registerClass(x);const b=x;var w=n(3442),S=n(9472),T=n(4037),M=(n(3264),function(t){function e(e){var n=t.call(this,e)||this;return n.type="time",n}return(0,r.ZT)(e,t),e.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return(0,T.WU)(t.value,T.V8[(0,T.xC)((0,T.Tj)(this._minLevelUnit))]||T.V8.second,e,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,e,n){var i=this.getSetting("useUTC"),r=this.getSetting("locale");return(0,T.k7)(t,e,n,r,i)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,r=[];if(!e)return r;r.push({value:n[0],level:0});var o=this.getSetting("useUTC"),a=function(t,e,n,r){var o=T.FW,a=0;function s(t,e,n,i,o,a,s){for(var l=new Date(e),u=e,c=l[i]();u<n&&u<=r[1];)s.push({value:u}),c+=t,l[o](c),u=l.getTime();s.push({value:u,notAdd:!0})}function l(t,i,o){var a=[],l=!i.length;if(!function(t,e,n,i){var r=u.sG(e),o=u.sG(n),a=function(t){return(0,T.q5)(r,t,i)===(0,T.q5)(o,t,i)},s=function(){return a("year")},l=function(){return s()&&a("month")},c=function(){return l()&&a("day")},h=function(){return c()&&a("hour")},p=function(){return h()&&a("minute")},d=function(){return p()&&a("second")};switch(t){case"year":return s();case"month":return l();case"day":return c();case"hour":return h();case"minute":return p();case"second":return d();case"millisecond":return d()&&a("millisecond")}}((0,T.Tj)(t),r[0],r[1],n)){l&&(i=[{value:O(new Date(r[0]),t,n)},{value:r[1]}]);for(var c=0;c<i.length-1;c++){var h=i[c].value,p=i[c+1].value;if(h!==p){var d=void 0,f=void 0,g=void 0;switch(t){case"year":d=Math.max(1,Math.round(e/T.s2/365)),f=(0,T.sx)(n),g=(0,T.xL)(n);break;case"half-year":case"quarter":case"month":d=A(e),f=(0,T.CW)(n),g=(0,T.vh)(n);break;case"week":case"half-week":case"day":d=k(e),f=(0,T.xz)(n),g=(0,T.f5)(n),!0;break;case"half-day":case"quarter-day":case"hour":d=I(e),f=(0,T.Wp)(n),g=(0,T.En)(n);break;case"minute":d=D(e,!0),f=(0,T.fn)(n),g=(0,T.eN)(n);break;case"second":d=D(e,!1),f=(0,T.MV)(n),g=(0,T.rM)(n);break;case"millisecond":d=P(e),f=(0,T.RZ)(n),g=(0,T.cb)(n)}s(d,h,p,f,g,0,a),"year"===t&&o.length>1&&0===c&&o.unshift({value:o[0].value-d})}}for(c=0;c<a.length;c++)o.push(a[c]);return a}}for(var c=[],h=[],p=0,d=0,f=0;f<o.length&&a++<1e4;++f){var g=(0,T.Tj)(o[f]);if((0,T.$K)(o[f])&&(l(o[f],c[c.length-1]||[],h),g!==(o[f+1]?(0,T.Tj)(o[f+1]):null))){if(h.length){d=p,h.sort((function(t,e){return t.value-e.value}));for(var v=[],y=0;y<h.length;++y){var m=h[y].value;0!==y&&h[y-1].value===m||(v.push(h[y]),m>=r[0]&&m<=r[1]&&p++)}var _=(r[1]-r[0])/e;if(p>1.5*_&&d>_/1.5)break;if(c.push(v),p>_||t===o[f])break}h=[]}}var x=(0,i.hX)((0,i.UI)(c,(function(t){return(0,i.hX)(t,(function(t){return t.value>=r[0]&&t.value<=r[1]&&!t.notAdd}))})),(function(t){return t.length>0})),b=[],w=x.length-1;for(f=0;f<x.length;++f)for(var S=x[f],M=0;M<S.length;++M)b.push({value:S[M].value,level:w-f});b.sort((function(t,e){return t.value-e.value}));var C=[];for(f=0;f<b.length;++f)0!==f&&b[f].value===b[f-1].value||C.push(b[f]);return C}(this._minLevelUnit,this._approxInterval,o,n);return(r=r.concat(a)).push({value:n[1],level:0}),r},e.prototype.niceExtent=function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=T.s2,e[1]+=T.s2),e[1]===-1/0&&e[0]===1/0){var n=new Date;e[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),e[0]=e[1]-T.s2}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.niceTicks=function(t,e,n){t=t||10;var i=this._extent,r=i[1]-i[0];this._approxInterval=r/t,null!=e&&this._approxInterval<e&&(this._approxInterval=e),null!=n&&this._approxInterval>n&&(this._approxInterval=n);var o=C.length,a=Math.min(function(t,e,n,i){for(;n<i;){var r=n+i>>>1;t[r][1]<e?n=r+1:i=r}return n}(C,this._approxInterval,0,o),o-1);this._interval=C[a][1],this._minLevelUnit=C[Math.max(a-1,0)][0]},e.prototype.parse=function(t){return"number"==typeof t?t:+u.sG(t)},e.prototype.contain=function(t){return d(this.parse(t),this._extent)},e.prototype.normalize=function(t){return f(this.parse(t),this._extent)},e.prototype.scale=function(t){return g(t,this._extent)},e.type="time",e}(b)),C=[["second",T.WT],["minute",T.yR],["hour",T.dV],["quarter-day",6*T.dV],["half-day",12*T.dV],["day",1.2*T.s2],["half-week",3.5*T.s2],["week",7*T.s2],["month",31*T.s2],["quarter",95*T.s2],["half-year",T.P5/2],["year",T.P5]];function k(t,e){return(t/=T.s2)>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function A(t){return(t/=30*T.s2)>6?6:t>3?3:t>2?2:1}function I(t){return(t/=T.dV)>12?12:t>6?6:t>3.5?4:t>2?2:1}function D(t,e){return(t/=e?T.yR:T.WT)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function P(t){return u.kx(t,!0)}function O(t,e,n){var i=new Date(t);switch((0,T.Tj)(e)){case"year":case"month":i[(0,T.vh)(n)](0);case"day":i[(0,T.f5)(n)](1);case"hour":i[(0,T.En)(n)](0);case"minute":i[(0,T.eN)(n)](0);case"second":i[(0,T.rM)(n)](0),i[(0,T.cb)(n)](0)}return i.getTime()}s.registerClass(M);const L=M;var R=s.prototype,E=b.prototype,Z=u.ZB,N=u.NM,B=Math.floor,z=Math.ceil,F=Math.pow,W=Math.log,V=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new b,e._interval=0,e}return(0,r.ZT)(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,r=e.getExtent(),o=E.getTicks.call(this,t);return i.UI(o,(function(t){var e=t.value,i=u.NM(F(this.base,e));return i=e===n[0]&&this._fixMin?U(i,r[0]):i,{value:i=e===n[1]&&this._fixMax?U(i,r[1]):i}}),this)},e.prototype.setExtent=function(t,e){var n=this.base;t=W(t)/W(n),e=W(e)/W(n),E.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=R.getExtent.call(this);e[0]=F(t,e[0]),e[1]=F(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=U(e[0],n[0])),this._fixMax&&(e[1]=U(e[1],n[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=W(t[0])/W(e),t[1]=W(t[1])/W(e),R.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.niceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=u.Xd(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[u.NM(z(e[0]/i)*i),u.NM(B(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},e.prototype.niceExtent=function(t){E.niceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return d(t=W(t)/W(this.base),this._extent)},e.prototype.normalize=function(t){return f(t=W(t)/W(this.base),this._extent)},e.prototype.scale=function(t){return t=g(t,this._extent),F(this.base,t)},e.type="log",e}(s),H=V.prototype;function U(t,e){return N(t,Z(e))}H.getMinorTicks=E.getMinorTicks,H.getLabel=E.getLabel,s.registerClass(V);const G=V;var X=n(816),Y=n(9820);function j(t,e){var n=function(t,e){var n=t.type,r=(0,Y.Qw)(t,e,t.getExtent()).calculate();t.setBlank(r.isBlank);var o=r.min,a=r.max,s=e.ecModel;if(s&&"time"===n){var l=(0,w.Ge)("bar",s),u=!1;if(i.S6(l,(function(t){u=u||t.getBaseAxis()===e.axis})),u){var c=(0,w.My)(l),h=function(t,e,n,r){var o=n.axis.getExtent(),a=o[1]-o[0],s=(0,w.G_)(r,n.axis);if(void 0===s)return{min:t,max:e};var l=1/0;i.S6(s,(function(t){l=Math.min(t.offset,l)}));var u=-1/0;i.S6(s,(function(t){u=Math.max(t.offset+t.width,u)})),l=Math.abs(l),u=Math.abs(u);var c=l+u,h=e-t,p=h/(1-(l+u)/a)-h;return{min:t-=p*(l/c),max:e+=p*(u/c)}}(o,a,e,c);o=h.min,a=h.max}}return{extent:[o,a],fixMin:r.minFixed,fixMax:r.maxFixed}}(t,e),r=n.extent,o=e.get("splitNumber");t instanceof G&&(t.base=e.get("logBase"));var a=t.type;t.setExtent(r[0],r[1]),t.niceExtent({splitNumber:o,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:"interval"===a||"time"===a?e.get("minInterval"):null,maxInterval:"interval"===a||"time"===a?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function $(t,e){if(e=e||t.get("type"))switch(e){case"category":return new y({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new L({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(s.getClass(e)||b)}}function q(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||n<0&&i<0)}function K(t){var e,n,i=t.getLabelModel().get("formatter"),r="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(n=i,function(e,i){return t.scale.getFormattedLabel(e,i,n)}):"string"==typeof i?function(e){return function(n){var i=t.scale.getLabel(n);return e.replace("{value}",null!=i?i:"")}}(i):"function"==typeof i?(e=i,function(n,i){return null!=r&&(i=n.value-r),e(J(t,n),i,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getLabel(e)}}function J(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function Q(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,r,o=n.getExtent();r=n instanceof y?n.count():(i=n.getTicks()).length;var a,s,l,u,c,h,p,d=t.getLabelModel(),f=K(t),g=1;r>40&&(g=Math.ceil(r/40));for(var v=0;v<r;v+=g){var m=f(i?i[v]:{value:o[0]+v},v),_=(s=d.getTextRect(m),void 0,void 0,void 0,void 0,void 0,l=(d.get("rotate")||0)*Math.PI/180,u=s.width,c=s.height,h=u*Math.abs(Math.cos(l))+Math.abs(c*Math.sin(l)),p=u*Math.abs(Math.sin(l))+Math.abs(c*Math.cos(l)),new S.Z(s.x,s.y,h,p));a?a.union(_):a=_}return a}}function tt(t){var e=t.get("interval");return null==e?"auto":e}function et(t){return"category"===t.type&&0===tt(t.getLabelModel())}function nt(t,e){var n={};return i.S6(t.mapDimensionsAll(e),(function(e){n[(0,X.IR)(t,e)]=!0})),i.XP(n)}function it(t,e,n){e&&i.S6(nt(e,n),(function(n){var i=e.getApproximateExtent(n);i[0]<t[0]&&(t[0]=i[0]),i[1]>t[1]&&(t[1]=i[1])}))}},8395:(t,e,n)=>{"use strict";n.d(e,{bK:()=>o,Yh:()=>a,Mk:()=>s});var i=n(8778),r=n(5495);function o(t,e,n){n=n||{};var r=t.coordinateSystem,o=e.axis,a={},s=o.getAxesOnZeroOf()[0],l=o.position,u=s?"onZero":l,c=o.dim,h=r.getRect(),p=[h.x,h.x+h.width,h.y,h.y+h.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,g="x"===c?[p[2]-f,p[3]+f]:[p[0]-f,p[1]+f];if(s){var v=s.toGlobalCoord(s.dataToCoord(0));g[d.onZero]=Math.max(Math.min(v,g[1]),g[0])}a.position=["y"===c?g[d[u]]:p[0],"x"===c?g[d[u]]:p[3]],a.rotation=Math.PI/2*("x"===c?0:1),a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,left:-1,right:1}[l],a.labelOffset=s?g[d[l]]-g[d.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),i.Jv(n.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var y=e.get(["axisLabel","rotate"]);return a.labelRotate="top"===u?-y:y,a.z2=1,a}function a(t){return"cartesian2d"===t.get("coordinateSystem")}function s(t){var e={xAxisModel:null,yAxisModel:null};return i.S6(e,(function(n,i){var o=i.replace(/Model$/,""),a=t.getReferringComponents(o,r.C6).models[0];e[i]=a})),e}},9820:(t,e,n)=>{"use strict";n.d(e,{Qw:()=>l});var i=n(8778),r=n(9356),o=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var o=this._isOrdinal="ordinal"===t.type;this._needCrossZero=e.getNeedCrossZero&&e.getNeedCrossZero();var a=this._modelMinRaw=e.get("min",!0);(0,i.mf)(a)?this._modelMinNum=u(t,a({min:n[0],max:n[1]})):"dataMin"!==a&&(this._modelMinNum=u(t,a));var s=this._modelMaxRaw=e.get("max",!0);if((0,i.mf)(s)?this._modelMaxNum=u(t,s({min:n[0],max:n[1]})):"dataMax"!==s&&(this._modelMaxNum=u(t,s)),o)this._axisDataLen=e.getCategories().length;else{var l=e.get("boundaryGap"),c=(0,i.kJ)(l)?l:[l||0,l||0];"boolean"==typeof c[0]||"boolean"==typeof c[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[(0,r.GM)(c[0],1),(0,r.GM)(c[1],1)]}},t.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,n=this._dataMax,r=this._axisDataLen,o=this._boundaryGapInner,a=t?null:n-e||Math.abs(e),s="dataMin"===this._modelMinRaw?e:this._modelMinNum,l="dataMax"===this._modelMaxRaw?n:this._modelMaxNum,u=null!=s,c=null!=l;null==s&&(s=t?r?0:NaN:e-o[0]*a),null==l&&(l=t?r?r-1:NaN:n+o[1]*a),(null==s||!isFinite(s))&&(s=NaN),(null==l||!isFinite(l))&&(l=NaN),s>l&&(s=NaN,l=NaN);var h=(0,i.Bu)(s)||(0,i.Bu)(l)||t&&!r;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var p=this._determinedMin,d=this._determinedMax;return null!=p&&(s=p,u=!0),null!=d&&(l=d,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:h}},t.prototype.modifyDataMinMax=function(t,e){this[s[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){this[a[t]]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),a={min:"_determinedMin",max:"_determinedMax"},s={min:"_dataMin",max:"_dataMax"};function l(t,e,n){var i=t.rawExtentInfo;return i||(i=new o(t,e,n),t.rawExtentInfo=i,i)}function u(t,e){return null==e?null:(0,i.Bu)(e)?NaN:t.parse(e)}},7586:(t,e,n)=>{"use strict";function i(t){return null==t?0:t.length||1}function r(t){return t}n.d(e,{Z:()=>o});const o=function(){function t(t,e,n,i,o,a){this._old=t,this._new=e,this._oldKeyGetter=n||r,this._newKeyGetter=i||r,this.context=o,this._diffModeMultiple="multiple"===a}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},r=new Array(t.length),o=new Array(e.length);this._initIndexMap(t,null,r,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var a=0;a<t.length;a++){var s=r[a],l=n[s],u=i(l);if(u>1){var c=l.shift();1===l.length&&(n[s]=l[0]),this._update&&this._update(c,a)}else 1===u?(n[s]=null,this._update&&this._update(l,a)):this._remove&&this._remove(a)}this._performRestAdd(o,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},r={},o=[],a=[];this._initIndexMap(t,n,o,"_oldKeyGetter"),this._initIndexMap(e,r,a,"_newKeyGetter");for(var s=0;s<o.length;s++){var l=o[s],u=n[l],c=r[l],h=i(u),p=i(c);if(h>1&&1===p)this._updateManyToOne&&this._updateManyToOne(c,u),r[l]=null;else if(1===h&&p>1)this._updateOneToMany&&this._updateOneToMany(c,u),r[l]=null;else if(1===h&&1===p)this._update&&this._update(c,u),r[l]=null;else if(h>1)for(var d=0;d<h;d++)this._remove&&this._remove(u[d]);else this._remove&&this._remove(u)}this._performRestAdd(a,r)},t.prototype._performRestAdd=function(t,e){for(var n=0;n<t.length;n++){var r=t[n],o=e[r],a=i(o);if(a>1)for(var s=0;s<a;s++)this._add&&this._add(o[s]);else 1===a&&this._add&&this._add(o);e[r]=null}},t.prototype._initIndexMap=function(t,e,n,r){for(var o=this._diffModeMultiple,a=0;a<t.length;a++){var s="_ec_"+this[r](t[a],a);if(o||(n[a]=s),e){var l=e[s],u=i(l);0===u?(e[s]=a,o&&n.push(s)):1===u?e[s]=[l,a]:l.push(a)}}},t}()},1214:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(8778);function r(t){return(0,i.Kn)(t)&&null!=t.value?t.value:t+""}const o=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication}return t.createByAxisModel=function(e){var n=e.option,o=n.data,a=o&&(0,i.UI)(o,r);return new t({categories:a,needCollect:!a,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=this._getOrCreateMap();return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=(0,i.kW)(this.categories))},t}()},7158:(t,e,n)=>{"use strict";n.d(e,{Ld:()=>s,_P:()=>l,nx:()=>u,ML:()=>c});var i=n(8778),r=n(7252),o=n(5495),a=function(t){this.data=t.data||(t.sourceFormat===r.hL?{}:[]),this.sourceFormat=t.sourceFormat||r.RA,this.seriesLayoutBy=t.seriesLayoutBy||r.fY,this.startIndex=t.startIndex||0,this.dimensionsDefine=t.dimensionsDefine,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.encodeDefine=t.encodeDefine,this.metaRawOption=t.metaRawOption};function s(t){return t instanceof a}function l(t,e,n,s){n=n||function(t){var e=r.RA;if((0,i.fU)(t))e=r.J5;else if((0,i.kJ)(t)){0===t.length&&(e=r.XD);for(var n=0,o=t.length;n<o;n++){var a=t[n];if(null!=a){if((0,i.kJ)(a)){e=r.XD;break}if((0,i.Kn)(a)){e=r.qb;break}}}}else if((0,i.Kn)(t)){for(var s in t)if((0,i.RI)(t,s)&&(0,i.zG)(t[s])){e=r.hL;break}}else if(null!=t)throw new Error("Invalid data");return e}(t);var l=e.seriesLayoutBy,u=function(t,e,n,a,s){var l,u;if(!t)return{dimensionsDefine:p(s),startIndex:u,dimensionsDetectedCount:l};if(e===r.XD){var c=t;"auto"===a||null==a?d((function(t){null!=t&&"-"!==t&&((0,i.HD)(t)?null==u&&(u=1):u=0)}),n,c,10):u=(0,i.hj)(a)?a:a?1:0,s||1!==u||(s=[],d((function(t,e){s[e]=null!=t?t+"":""}),n,c,1/0)),l=s?s.length:n===r.Wc?c.length:c[0]?c[0].length:null}else if(e===r.qb)s||(s=function(t){for(var e,n=0;n<t.length&&!(e=t[n++]););if(e){var r=[];return(0,i.S6)(e,(function(t,e){r.push(e)})),r}}(t));else if(e===r.hL)s||(s=[],(0,i.S6)(t,(function(t,e){s.push(e)})));else if(e===r.cy){var h=(0,o.C4)(t[0]);l=(0,i.kJ)(h)&&h.length||1}else r.J5;return{startIndex:u,dimensionsDefine:p(s),dimensionsDetectedCount:l}}(t,n,l,e.sourceHeader,e.dimensions);return new a({data:t,sourceFormat:n,seriesLayoutBy:l,dimensionsDefine:u.dimensionsDefine,startIndex:u.startIndex,dimensionsDetectedCount:u.dimensionsDetectedCount,encodeDefine:h(s),metaRawOption:(0,i.d9)(e)})}function u(t){return new a({data:t,sourceFormat:(0,i.fU)(t)?r.J5:r.cy})}function c(t){return new a({data:t.data,sourceFormat:t.sourceFormat,seriesLayoutBy:t.seriesLayoutBy,dimensionsDefine:(0,i.d9)(t.dimensionsDefine),startIndex:t.startIndex,dimensionsDetectedCount:t.dimensionsDetectedCount,encodeDefine:h(t.encodeDefine)})}function h(t){return t?(0,i.kW)(t):null}function p(t){if(t){var e=(0,i.kW)();return(0,i.UI)(t,(function(t,n){var r={name:(t=(0,i.Kn)(t)?t:{name:t}).name,displayName:t.displayName,type:t.type};if(null==name)return r;r.name+="",null==r.displayName&&(r.displayName=r.name);var o=e.get(r.name);return o?r.name+="-"+o.count++:e.set(r.name,{count:1}),r}))}}function d(t,e,n,i){if(e===r.Wc)for(var o=0;o<n.length&&o<i;o++)t(n[o]?n[o][0]:null,o);else{var a=n[0]||[];for(o=0;o<a.length&&o<i;o++)t(a[o],o)}}},1245:(t,e,n)=>{"use strict";n.d(e,{Pl:()=>p,_j:()=>g,a:()=>m,tB:()=>b,hk:()=>S});var i,r,o,a,s,l=n(8778),u=n(5495),c=n(7158),h=n(7252),p=function(){function t(t,e){var n=(0,c.Ld)(t)?t:(0,c.nx)(t);this._source=n;var i=this._data=n.data;n.sourceFormat===h.J5&&(this._offset=0,this._dimSize=e,this._data=i),s(this,i,n)}var e;return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(t,e){},t.prototype.appendData=function(t){},t.prototype.clean=function(){},t.protoInitialize=((e=t.prototype).pure=!1,void(e.persistent=!0)),t.internalField=function(){var t;s=function(t,r,o){var s=o.sourceFormat,u=o.seriesLayoutBy,c=o.startIndex,p=o.dimensionsDefine,d=a[w(s,u)];if((0,l.l7)(t,d),s===h.J5)t.getItem=e,t.count=i,t.fillStorage=n;else{var f=g(s,u);t.getItem=(0,l.ak)(f,null,r,c,p);var v=m(s,u);t.count=(0,l.ak)(v,null,r,c,p)}};var e=function(t,e){t-=this._offset,e=e||[];for(var n=this._data,i=this._dimSize,r=i*t,o=0;o<i;o++)e[o]=n[r+o];return e},n=function(t,e,n,i){for(var r=this._data,o=this._dimSize,a=0;a<o;a++){for(var s=i[a],l=null==s[0]?1/0:s[0],u=null==s[1]?-1/0:s[1],c=e-t,h=n[a],p=0;p<c;p++){var d=r[(t+p)*o+a];h[t+p]=d,d<l&&(l=d),d>u&&(u=d)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}(t={})[h.XD+"_"+h.fY]={pure:!0,appendData:r},t[h.XD+"_"+h.Wc]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[h.qb]={pure:!0,appendData:r},t[h.hL]={pure:!0,appendData:function(t){var e=this._data;(0,l.S6)(t,(function(t,n){for(var i=e[n]||(e[n]=[]),r=0;r<(t||[]).length;r++)i.push(t[r])}))}},t[h.cy]={appendData:r},t[h.J5]={persistent:!1,pure:!0,appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}},a=t}(),t}(),d=function(t,e,n,i){return t[i]},f=((i={})[h.XD+"_"+h.fY]=function(t,e,n,i){return t[i+e]},i[h.XD+"_"+h.Wc]=function(t,e,n,i){i+=e;for(var r=[],o=t,a=0;a<o.length;a++){var s=o[a];r.push(s?s[i]:null)}return r},i[h.qb]=d,i[h.hL]=function(t,e,n,i){for(var r=[],o=0;o<n.length;o++){var a=t[n[o].name];r.push(a?a[i]:null)}return r},i[h.cy]=d,i);function g(t,e){return f[w(t,e)]}var v=function(t,e,n){return t.length},y=((r={})[h.XD+"_"+h.fY]=function(t,e,n){return Math.max(0,t.length-e)},r[h.XD+"_"+h.Wc]=function(t,e,n){var i=t[0];return i?Math.max(0,i.length-e):0},r[h.qb]=v,r[h.hL]=function(t,e,n){var i=t[n[0].name];return i?i.length:0},r[h.cy]=v,r);function m(t,e){return y[w(t,e)]}var _=function(t,e,n){return null!=e?t[e]:t},x=((o={})[h.XD]=_,o[h.qb]=function(t,e,n){return null!=e?t[n]:t},o[h.hL]=_,o[h.cy]=function(t,e,n){var i=(0,u.C4)(t);return null!=e&&i instanceof Array?i[e]:i},o[h.J5]=_,o);function b(t){return x[t]}function w(t,e){return t===h.XD?t+"_"+e:t}function S(t,e,n){if(t){var i=t.getRawDataItem(e);if(null!=i){var r,o,a=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(n);return s&&(r=s.name,o=s.index),b(a)(i,o,r)}}}},816:(t,e,n)=>{"use strict";n.d(e,{BM:()=>r,M:()=>o,IR:()=>a});var i=n(8778);function r(t,e,n){var r,o,a,s,l=(n=n||{}).byIndex,u=n.stackedCoordDimension,c=!(!t||!t.get("stack"));if((0,i.S6)(e,(function(t,n){(0,i.HD)(t)&&(e[n]=t={name:t}),c&&!t.isExtraCoord&&(l||r||!t.ordinalMeta||(r=t),o||"ordinal"===t.type||"time"===t.type||u&&u!==t.coordDim||(o=t))})),!o||l||r||(l=!0),o){a="__\0ecstackresult",s="__\0ecstackedover",r&&(r.createInvertedIndices=!0);var h=o.coordDim,p=o.type,d=0;(0,i.S6)(e,(function(t){t.coordDim===h&&d++})),e.push({name:a,coordDim:h,coordDimIndex:d,type:p,isExtraCoord:!0,isCalculationCoord:!0}),d++,e.push({name:s,coordDim:s,coordDimIndex:d,type:p,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:o&&o.name,stackedByDimension:r&&r.name,isStackedByIndex:l,stackedOverDimension:s,stackResultDimension:a}}function o(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function a(t,e){return o(t,e)?t.getCalculationInfo("stackResultDimension"):e}},5294:(t,e,n)=>{"use strict";n.d(e,{yQ:()=>o,ID:()=>a});var i=n(9199),r=n(8778);n(3264);function o(t,e){var n=e&&e.type;if("ordinal"===n){var r=e&&e.ordinalMeta;return r?r.parseAndCollect(t):t}return"time"===n&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+(0,i.sG)(t)),null==t||""===t?NaN:+t}(0,r.kW)({number:function(t){return parseFloat(t)},time:function(t){return+(0,i.sG)(t)},trim:function(t){return"string"==typeof t?(0,r.fy)(t):t}});var a=function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=typeof t,r=typeof e,o="number"===n?t:(0,i.FK)(t),a="number"===r?e:(0,i.FK)(e),s=isNaN(o),l=isNaN(a);if(s&&(o=this._incomparable),l&&(a=this._incomparable),s&&l){var u="string"===n,c="string"===r;u&&(o=c?t:0),c&&(a=u?e:0)}return o<a?this._resultLT:o>a?-this._resultLT:0},t}()},6203:(t,e,n)=>{"use strict";n.d(e,{Dq:()=>a,md:()=>l,pV:()=>u,pY:()=>c,Wd:()=>h,JT:()=>p,u7:()=>d});var i=n(5495),r=n(8778),o=n(7252),a={Must:1,Might:2,Not:3},s=(0,i.Yf)();function l(t){s(t).datasetMap=(0,r.kW)()}function u(t,e){var n=t?t.metaRawOption:null;return{seriesLayoutBy:(0,r.pD)(e.seriesLayoutBy,n?n.seriesLayoutBy:null),sourceHeader:(0,r.pD)(e.sourceHeader,t?t.startIndex:null),dimensions:(0,r.pD)(e.dimensions,t?t.dimensionsDefine:null)}}function c(t,e,n){var i={},o=h(e);if(!o||!t)return i;var a,l,u=[],c=[],p=e.ecModel,d=s(p).datasetMap,f=o.uid+"_"+n.seriesLayoutBy;t=t.slice(),(0,r.S6)(t,(function(e,n){var o=(0,r.Kn)(e)?e:t[n]={name:e};"ordinal"===o.type&&null==a&&(a=n,l=y(o)),i[o.name]=[]}));var g=d.get(f)||d.set(f,{categoryWayDim:l,valueWayDim:0});function v(t,e,n){for(var i=0;i<n;i++)t.push(e+i)}function y(t){var e=t.dimsDef;return e?e.length:1}return(0,r.S6)(t,(function(t,e){var n=t.name,r=y(t);if(null==a){var o=g.valueWayDim;v(i[n],o,r),v(c,o,r),g.valueWayDim+=r}else a===e?(v(i[n],0,r),v(u,0,r)):(o=g.categoryWayDim,v(i[n],o,r),v(c,o,r),g.categoryWayDim+=r)})),u.length&&(i.itemName=u),c.length&&(i.seriesName=c),i}function h(t){if(!t.get("data",!0))return(0,i.HZ)(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},i.C6).models[0]}function p(t){return t.get("transform",!0)||t.get("fromTransformResult",!0)?(0,i.HZ)(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},i.C6).models:[]}function d(t,e){return function(t,e,n,s,l,u){var c,h,p;if((0,r.fU)(t))return a.Not;if(s){var d=s[u];(0,r.Kn)(d)?(h=d.name,p=d.type):(0,r.HD)(d)&&(h=d)}if(null!=p)return"ordinal"===p?a.Must:a.Not;if(e===o.XD){var f=t;if(n===o.Wc){for(var g=f[u],v=0;v<(g||[]).length&&v<5;v++)if(null!=(c=S(g[l+v])))return c}else for(v=0;v<f.length&&v<5;v++){var y=f[l+v];if(y&&null!=(c=S(y[u])))return c}}else if(e===o.qb){var m=t;if(!h)return a.Not;for(v=0;v<m.length&&v<5;v++)if((b=m[v])&&null!=(c=S(b[h])))return c}else if(e===o.hL){var _=t;if(!h)return a.Not;if(!(g=_[h])||(0,r.fU)(g))return a.Not;for(v=0;v<g.length&&v<5;v++)if(null!=(c=S(g[v])))return c}else if(e===o.cy){var x=t;for(v=0;v<x.length&&v<5;v++){var b=x[v],w=(0,i.C4)(b);if(!(0,r.kJ)(w))return a.Not;if(null!=(c=S(w[u])))return c}}function S(t){var e=(0,r.HD)(t);return null!=t&&isFinite(t)&&""!==t?e?a.Might:a.Not:e&&"-"!==t?a.Must:void 0}return a.Not}(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}},5073:(t,e,n)=>{"use strict";n.d(e,{U:()=>l,t:()=>u});var i=n(8778),r=n(7158),o=n(7252),a=n(6203),s=n(9785),l=function(){function t(t){this._sourceList=[],this._upstreamSignList=[],this._versionSignBase=0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[])},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&this._createSource()},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,s=this._getUpstreamSourceManagers(),l=!!s.length;if(c(n)){var u=n,h=void 0,p=void 0,d=void 0;if(l){var f=s[0];f.prepareSource(),h=(d=f.getSource()).data,p=d.sourceFormat,e=[f._getVersionSign()]}else h=u.get("data",!0),p=(0,i.fU)(h)?o.J5:o.cy,e=[];var g=(0,a.pV)(d,this._getSourceMetaRawOption());t=[(0,r._P)(h,g,p,u.get("encode",!0))]}else{var v=n;if(l){var y=this._applyTransform(s);t=y.sourceList,e=y.upstreamSignList}else{var m=v.get("source",!0);t=[(0,r._P)(m,this._getSourceMetaRawOption(),null,null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,o=n.get("transform",!0),a=n.get("fromTransformResult",!0);null!=a&&1!==t.length&&h("");var l=[],u=[];return(0,i.S6)(t,(function(t){t.prepareSource();var e=t.getSource(a||0);null==a||e||h(""),l.push(e),u.push(t._getVersionSign())})),o?e=(0,s.vK)(o,l,{datasetIndex:n.componentIndex}):null!=a&&(e=[(0,r.ML)(l[0])]),{sourceList:e,upstreamSignList:u}},t.prototype._isDirty=function(){if(!this._sourceList.length)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var n=t[e];if(n._isDirty()||this._upstreamSignList[e]!==n._getVersionSign())return!0}},t.prototype.getSource=function(t){return this._sourceList[t||0]},t.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(c(t)){var e=(0,a.Wd)(t);return e?[e.getSourceManager()]:[]}return(0,i.UI)((0,a.JT)(t),(function(t){return t.getSourceManager()}))},t.prototype._getSourceMetaRawOption=function(){var t,e,n,i=this._sourceHost;if(c(i))t=i.get("seriesLayoutBy",!0),e=i.get("sourceHeader",!0),n=i.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var r=i;t=r.get("seriesLayoutBy",!0),e=r.get("sourceHeader",!0),n=r.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:e,dimensions:n}},t}();function u(t){t.option.transform&&(0,i.s7)(t.option.transform)}function c(t){return"series"===t.mainType}function h(t){throw new Error(t)}},9785:(t,e,n)=>{"use strict";n.d(e,{DA:()=>y,vK:()=>m});var i=n(7252),r=n(5495),o=n(8778),a=n(1245),s=n(5294),l=n(6203),u=n(3264),c=n(7158),h=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return(0,s.yQ)(t,e)},t}();function p(t){var e=t.sourceFormat,n=t.data;if(e===i.XD||e===i.qb||!n||(0,o.kJ)(n)&&!n.length)return t.data;(0,u._y)("")}function d(t){var e=t.sourceFormat,n=t.data;if(!n)return n;if((0,o.kJ)(n)&&!n.length)return[];if(e===i.XD){for(var r=[],a=0,s=n.length;a<s;a++)r.push(n[a].slice());return r}if(e===i.qb){for(r=[],a=0,s=n.length;a<s;a++)r.push((0,o.l7)({},n[a]));return r}}function f(t,e,n){if(null!=n)return"number"==typeof n||!isNaN(n)&&!(0,o.RI)(e,n)?t[n]:(0,o.RI)(e,n)?e[n]:void 0}function g(t){return(0,o.d9)(t)}var v=(0,o.kW)();function y(t){var e=(t=(0,o.d9)(t)).type;e||(0,u._y)("");var n=e.split(":");2!==n.length&&(0,u._y)("");var i=!1;"echarts"===n[0]&&(e=n[1],i=!0),t.__isBuiltIn=i,v.set(e,t)}function m(t,e,n){var i=(0,r.kF)(t),o=i.length;o||(0,u._y)("");for(var a=0,s=o;a<s;a++)e=_(i[a],e),a!==s-1&&(e.length=Math.max(e.length,1));return e}function _(t,e,n,s){e.length||(0,u._y)(""),(0,o.Kn)(t)||(0,u._y)("");var y=t.type,m=v.get(y);m||(0,u._y)("");var _=(0,o.UI)(e,(function(t){return function(t,e){var n=new h,r=t.data,s=n.sourceFormat=t.sourceFormat,l=t.startIndex,c=[],v={},y=t.dimensionsDefine;if(y)(0,o.S6)(y,(function(t,e){var n=t.name,i={index:e,name:n,displayName:t.displayName};c.push(i),null!=n&&((0,o.RI)(v,n)&&(0,u._y)(""),v[n]=i)}));else for(var m=0;m<t.dimensionsDetectedCount;m++)c.push({index:m});var _=(0,a._j)(s,i.fY);e.__isBuiltIn&&(n.getRawDataItem=function(t){return _(r,l,c,t)},n.getRawData=(0,o.ak)(p,null,t)),n.cloneRawData=(0,o.ak)(d,null,t);var x=(0,a.a)(s,i.fY);n.count=(0,o.ak)(x,null,r,l,c);var b=(0,a.tB)(s);n.retrieveValue=function(t,e){var n=_(r,l,c,t);return w(n,e)};var w=n.retrieveValueFromItem=function(t,e){if(null!=t){var n=c[e];return n?b(t,e,n.name):void 0}};return n.getDimensionInfo=(0,o.ak)(f,null,c,v),n.cloneAllDimensionInfo=(0,o.ak)(g,null,c),n}(t,m)})),x=(0,r.kF)(m.transform({upstream:_[0],upstreamList:_,config:(0,o.d9)(t.config)}));return(0,o.UI)(x,(function(t){(0,o.Kn)(t)||(0,u._y)("");var n=t.data;null!=n?(0,o.Kn)(n)||(0,o.zG)(n)||(0,u._y)(""):n=e[0].data;var r=(0,l.pV)(e[0],{seriesLayoutBy:i.fY,sourceHeader:0,dimensions:t.dimensions});return(0,c._P)(n,r,null,null)}))}},8966:(t,e,n)=>{"use strict";n.r(e),n.d(e,{PRIORITY:()=>br,connect:()=>vo,dataTool:()=>Vo,dependencies:()=>mr,disConnect:()=>yo,disconnect:()=>mo,dispose:()=>_o,extendChartView:()=>No,extendComponentModel:()=>Ro,extendComponentView:()=>Eo,extendSeriesModel:()=>Zo,getCoordinateSystemDimensions:()=>Io,getInstanceByDom:()=>xo,getInstanceById:()=>bo,getMap:()=>Fo,init:()=>go,registerAction:()=>ko,registerCoordinateSystem:()=>Ao,registerLayout:()=>Do,registerLoading:()=>Lo,registerLocale:()=>tr.I2,registerMap:()=>zo,registerPostInit:()=>Mo,registerPostUpdate:()=>Co,registerPreprocessor:()=>So,registerProcessor:()=>To,registerTheme:()=>wo,registerTransform:()=>Wo,registerVisual:()=>Po,setCanvasCreator:()=>Bo,version:()=>yr});var i=n(9312),r=n(8781),o=n(8778),a=n(213),s=function(t,e){this.target=t,this.topTarget=e&&e.topTarget};const l=function(){function t(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return t.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new s(e,t),"dragstart",t.event))},t.prototype._drag=function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,i=t.offsetY,r=n-this._x,o=i-this._y;this._x=n,this._y=i,e.drift(r,o,t),this.handler.dispatchToElement(new s(e,t),"drag",t.event);var a=this.handler.findHover(n,i,e).target,l=this._dropTarget;this._dropTarget=a,e!==a&&(l&&a!==l&&this.handler.dispatchToElement(new s(l,t),"dragleave",t.event),a&&a!==l&&this.handler.dispatchToElement(new s(a,t),"dragenter",t.event))}},t.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new s(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new s(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},t}();var u=n(444),c=n(3837),h=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o<a;o++){var s=i[o],l=c.eV(n,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},t.prototype._recognize=function(t){for(var e in d)if(d.hasOwnProperty(e)){var n=d[e](this._track,t);if(n)return n}},t}();function p(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}var d={pinch:function(t,e){var n=t.length;if(n){var i,r=(t[n-1]||{}).points,o=(t[n-2]||{}).points||r;if(o&&o.length>1&&r&&r.length>1){var a=p(r)/p(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},f="silent";function g(){c.sT(this.event)}var v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return(0,i.ZT)(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(u.Z),y=function(t,e){this.x=t,this.y=e},m=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],_=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o._hovered=new y(0,0),o.storage=e,o.painter=n,o.painterRoot=r,i=i||new v,o.proxy=null,o.setHandlerProxy(i),o._draggingMgr=new l(o),o}return(0,i.ZT)(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(o.S6(m,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=b(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?new y(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl,n=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&!n&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new y(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:g}}(e,t,n);i&&(i[r]&&(o.cancelBubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hostTarget?i.__hostTarget:i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)})))}},e.prototype.findHover=function(t,e,n){for(var i=this.storage.getDisplayList(),r=new y(t,e),o=i.length-1;o>=0;o--){var a=void 0;if(i[o]!==n&&!i[o].ignore&&(a=x(i[o],t,e))&&(!r.topTarget&&(r.topTarget=i[o]),a!==f)){r.target=i[o];break}}return r},e.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new h);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r;var o=new y;o.target=i.target,this.dispatchToElement(o,r,i.event)}},e}(u.Z);function x(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,r=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1;i.silent&&(r=!0)}i=i.__hostTarget||i.parent}return!r||f}return!1}function b(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}o.S6(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){_.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,s=b(this,r,o);if("mouseup"===t&&s||(i=(n=this.findHover(r,o)).target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||a.TK(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}));const w=_;var S=n(8073);function T(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r<n&&i(t[r],t[r-1])<0;)r++;!function(t,e,n){for(n--;e<n;){var i=t[e];t[e++]=t[n],t[n--]=i}}(t,e,r)}else for(;r<n&&i(t[r],t[r-1])>=0;)r++;return r-e}function M(t,e,n,i,r){for(i===e&&i++;i<n;i++){for(var o,a=t[i],s=e,l=i;s<l;)r(a,t[o=s+l>>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function C(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l<s&&o(t,e[n+r+l])>0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;l<s&&o(t,e[n+r-l])<=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a<l;){var c=a+(l-a>>>1);o(t,e[n+c])>0?a=c+1:l=c}return l}function k(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;l<s&&o(t,e[n+r-l])<0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l<s&&o(t,e[n+r+l])>=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a<l;){var c=a+(l-a>>>1);o(t,e[n+c])<0?l=c:a=c+1}return l}function A(t,e,n,i){n||(n=0),i||(i=t.length);var r=i-n;if(!(r<2)){var o=0;if(r<32)M(t,n,i,n+(o=T(t,n,i,e)),e);else{var a=function(t,e){var n,i,r=7,o=0;t.length;var a=[];function s(s){var l=n[s],u=i[s],c=n[s+1],h=i[s+1];i[s]=u+h,s===o-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),o--;var p=k(t[c],t,l,u,0,e);l+=p,0!=(u-=p)&&0!==(h=C(t[l+u-1],t,c,h,h-1,e))&&(u<=h?function(n,i,o,s){var l=0;for(l=0;l<i;l++)a[l]=t[n+l];var u=0,c=o,h=n;if(t[h++]=t[c++],0!=--s)if(1!==i){for(var p,d,f,g=r;;){p=0,d=0,f=!1;do{if(e(t[c],a[u])<0){if(t[h++]=t[c++],d++,p=0,0==--s){f=!0;break}}else if(t[h++]=a[u++],p++,d=0,1==--i){f=!0;break}}while((p|d)<g);if(f)break;do{if(0!==(p=k(t[c],a,u,i,0,e))){for(l=0;l<p;l++)t[h+l]=a[u+l];if(h+=p,u+=p,(i-=p)<=1){f=!0;break}}if(t[h++]=t[c++],0==--s){f=!0;break}if(0!==(d=C(a[u],t,c,s,0,e))){for(l=0;l<d;l++)t[h+l]=t[c+l];if(h+=d,c+=d,0==(s-=d)){f=!0;break}}if(t[h++]=a[u++],1==--i){f=!0;break}g--}while(p>=7||d>=7);if(f)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(l=0;l<s;l++)t[h+l]=t[c+l];t[h+s]=a[u]}else{if(0===i)throw new Error;for(l=0;l<i;l++)t[h+l]=a[u+l]}}else{for(l=0;l<s;l++)t[h+l]=t[c+l];t[h+s]=a[u]}else for(l=0;l<i;l++)t[h+l]=a[u+l]}(l,u,c,h):function(n,i,o,s){var l=0;for(l=0;l<s;l++)a[l]=t[o+l];var u=n+i-1,c=s-1,h=o+s-1,p=0,d=0;if(t[h--]=t[u--],0!=--i)if(1!==s){for(var f=r;;){var g=0,v=0,y=!1;do{if(e(a[c],t[u])<0){if(t[h--]=t[u--],g++,v=0,0==--i){y=!0;break}}else if(t[h--]=a[c--],v++,g=0,1==--s){y=!0;break}}while((g|v)<f);if(y)break;do{if(0!=(g=i-k(a[c],t,n,i,i-1,e))){for(i-=g,d=1+(h-=g),p=1+(u-=g),l=g-1;l>=0;l--)t[d+l]=t[p+l];if(0===i){y=!0;break}}if(t[h--]=a[c--],1==--s){y=!0;break}if(0!=(v=s-C(t[u],a,0,s,s-1,e))){for(s-=v,d=1+(h-=v),p=1+(c-=v),l=0;l<v;l++)t[d+l]=a[p+l];if(s<=1){y=!0;break}}if(t[h--]=t[u--],0==--i){y=!0;break}f--}while(g>=7||v>=7);if(y)break;f<0&&(f=0),f+=2}if((r=f)<1&&(r=1),1===s){for(d=1+(h-=i),p=1+(u-=i),l=i-1;l>=0;l--)t[d+l]=t[p+l];t[h]=a[c]}else{if(0===s)throw new Error;for(p=h-(s-1),l=0;l<s;l++)t[p+l]=a[l]}}else{for(d=1+(h-=i),p=1+(u-=i),l=i-1;l>=0;l--)t[d+l]=t[p+l];t[h]=a[c]}else for(p=h-(s-1),l=0;l<s;l++)t[p+l]=a[l]}(l,u,c,h))}return n=[],i=[],{mergeRuns:function(){for(;o>1;){var t=o-2;if(t>=1&&i[t-1]<=i[t]+i[t+1]||t>=2&&i[t-2]<=i[t]+i[t-1])i[t-1]<i[t+1]&&t--;else if(i[t]>i[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&i[t-1]<i[t+1]&&t--,s(t)}},pushRun:function(t,e){n[o]=t,i[o]=e,o+=1}}}(t,e),s=function(t){for(var e=0;t>=32;)e|=1&t,t>>=1;return t+e}(r);do{if((o=T(t,n,i,e))<s){var l=r;l>s&&(l=s),M(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}}var I=!1;function D(){I||(I=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function P(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}const O=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=P}return t.prototype.traverse=function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},t.prototype.getDisplayList=function(t,e){e=e||!1;var n=this._displayList;return!t&&n.length||this.updateDisplayList(e),n},t.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,n=this._displayList,i=0,o=e.length;i<o;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,r.Z.canvasSupported&&A(n,P)},t.prototype._updateAndAddDisplayable=function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath();if(t.ignoreClip)e=null;else if(i){e=e?e.slice():[];for(var r=i,o=t;r;)r.parent=o,r.updateTransform(),e.push(r),o=r,r=r.getClipPath()}if(t.childrenRef){for(var a=t.childrenRef(),s=0;s<a.length;s++){var l=a[s];t.__dirty&&(l.__dirty|=S.Z.REDARAW_BIT),this._updateAndAddDisplayable(l,e,n)}t.__dirty=0}else{var u=t;e&&e.length?u.__clipPaths=e:u.__clipPaths&&u.__clipPaths.length>0&&(u.__clipPaths=[]),isNaN(u.z)&&(D(),u.z=0),isNaN(u.z2)&&(D(),u.z2=0),isNaN(u.zlevel)&&(D(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var c=t.getDecalElement&&t.getDecalElement();c&&this._updateAndAddDisplayable(c,e,n);var h=t.getTextGuideLine();h&&this._updateAndAddDisplayable(h,e,n);var p=t.getTextContent();p&&this._updateAndAddDisplayable(p,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e<n;e++)this.delRoot(t[e]);else{var i=o.cq(this._roots,t);i>=0&&this._roots.splice(i,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),L="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var R=n(4017);const E=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n.onframe=e.onframe||function(){},n}return(0,i.ZT)(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._clipsHead?(this._clipsTail.next=t,t.prev=this._clipsTail,t.next=null,this._clipsTail=t):this._clipsHead=this._clipsTail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._clipsHead=n,n?n.prev=e:this._clipsTail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=(new Date).getTime()-this._pausedTime,n=e-this._time,i=this._clipsHead;i;){var r=i.next;i.step(e,n)?(i.ondestroy&&i.ondestroy(),this.removeClip(i),i=r):i=r}this._time=e,t||(this.onframe(n),this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,L((function e(){t._running&&(L(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._clipsHead;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._clipsHead=this._clipsTail=null},e.prototype.isFinished=function(){return null==this._clipsHead},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new R.ZP(t,e.loop);return this.addAnimator(n),n},e}(u.Z);var Z,N,B=r.Z.domSupported,z=(N={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Z=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:o.UI(Z,(function(t){var e=t.replace("mouse","pointer");return N.hasOwnProperty(e)?e:t}))}),F=["mousemove","mouseup"],W=["pointermove","pointerup"],V=!1;function H(t){var e=t.pointerType;return"pen"===e||"touch"===e}function U(t){t&&(t.zrByTouch=!0)}function G(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var X=function(t,e){this.stopPropagation=o.ZT,this.stopImmediatePropagation=o.ZT,this.preventDefault=o.ZT,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},Y={mousedown:function(t){t=(0,c.OD)(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=(0,c.OD)(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=(0,c.OD)(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){if(t.target===this.dom){t=(0,c.OD)(this.dom,t),this.__pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=G(this,e),this.trigger("mouseout",t)}},wheel:function(t){V=!0,t=(0,c.OD)(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){V||(t=(0,c.OD)(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){U(t=(0,c.OD)(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Y.mousemove.call(this,t),Y.mousedown.call(this,t)},touchmove:function(t){U(t=(0,c.OD)(this.dom,t)),this.handler.processGesture(t,"change"),Y.mousemove.call(this,t)},touchend:function(t){U(t=(0,c.OD)(this.dom,t)),this.handler.processGesture(t,"end"),Y.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&Y.click.call(this,t)},pointerdown:function(t){Y.mousedown.call(this,t)},pointermove:function(t){H(t)||Y.mousemove.call(this,t)},pointerup:function(t){Y.mouseup.call(this,t)},pointerout:function(t){H(t)||Y.mouseout.call(this,t)}};o.S6(["click","dblclick","contextmenu"],(function(t){Y[t]=function(e){e=(0,c.OD)(this.dom,e),this.trigger(t,e)}}));var j={pointermove:function(t){H(t)||j.mousemove.call(this,t)},pointerup:function(t){j.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function $(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,(0,c.Oo)(t.domTarget,e,n,i)}function q(t){var e=t.mounted;for(var n in e)e.hasOwnProperty(n)&&(0,c.xg)(t.domTarget,n,e[n],t.listenerOpts[n]);t.mounted={}}var K=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e};const J=function(t){function e(e,n){var i,a,s,l=t.call(this)||this;return l.__pointerCapturing=!1,l.dom=e,l.painterRoot=n,l._localHandlerScope=new K(e,Y),B&&(l._globalHandlerScope=new K(document,j)),i=l,a=l._localHandlerScope,s=a.domHandlers,r.Z.pointerEventsSupported?o.S6(z.pointer,(function(t){$(a,t,(function(e){s[t].call(i,e)}))})):(r.Z.touchEventsSupported&&o.S6(z.touch,(function(t){$(a,t,(function(e){s[t].call(i,e),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(a)}))})),o.S6(z.mouse,(function(t){$(a,t,(function(e){e=(0,c.iP)(e),a.touching||s[t].call(i,e)}))}))),l}return(0,i.ZT)(e,t),e.prototype.dispose=function(){q(this._localHandlerScope),B&&q(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,B&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?function(t,e){function n(n){$(e,n,(function(i){i=(0,c.iP)(i),G(t,i.target)||(i=function(t,e){return(0,c.OD)(t.dom,new X(t,e),!0)}(t,i),e.domHandlers[n].call(t,i))}),{capture:!0})}r.Z.pointerEventsSupported?o.S6(W,n):r.Z.touchEventsSupported||o.S6(F,n)}(this,e):q(e)}},e}(u.Z);var Q,tt=n(1756),et=n(7367),nt=n(6454),it=n(6781),rt=n(1707),ot=n(230),at=n(9509),st=n(6573),lt=n(391),ut=n(1748),ct=n(9181),ht=n(561),pt=n(5853),dt=n(9882),ft=/[\s,]+/;function gt(t){(0,o.HD)(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));var e=t;for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}!function(){function t(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}t.prototype.parse=function(t,e){e=e||{};var n=gt(t);if(!n)throw new Error("Illegal svg");var i=new nt.Z;this._root=i;var r=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||e.width),s=parseFloat(n.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(s)&&(s=null),xt(n,i,null,!0);for(var l,u,c=n.firstChild;c;)this._parseNode(c,i),c=c.nextSibling;if(r){var h=(0,o.fy)(r).split(ft);h.length>=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&null!=a&&null!=s&&(u=function(t,e,n){var i=e/t.width,r=n/t.height,o=Math.min(i,r);return{scale:o,x:-(t.x+t.width/2)*o+e/2,y:-(t.y+t.height/2)*o+n/2}}(l,a,s),!e.ignoreViewBox)){var p=i;(i=new nt.Z).add(p),p.scaleX=p.scaleY=u.scale,p.x=u.x,p.y=u.y}return e.ignoreRootClip||null==a||null==s||i.setClipPath(new ot.Z({shape:{x:0,y:0,width:a,height:s}})),{root:i,width:a,height:s,viewBoxRect:l,viewBoxTransform:u}},t.prototype._parseNode=function(t,e){var n,i,r=t.nodeName.toLowerCase();if("defs"===r?this._isDefine=!0:"text"===r&&(this._isText=!0),this._isDefine){if(i=vt[r]){var o=i.call(this,t),a=t.getAttribute("id");a&&(this._defs[a]=o)}}else(i=Q[r])&&(n=i.call(this,t,e),e.add(n));if(n)for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===r?this._isDefine=!1:"text"===r&&(this._isText=!1)},t.prototype._parseText=function(t,e){if(1===t.nodeType){var n=t.getAttribute("dx")||0,i=t.getAttribute("dy")||0;this._textX+=parseFloat(n),this._textY+=parseFloat(i)}var r=new dt.Z({style:{text:t.textContent},x:this._textX||0,y:this._textY||0});yt(e,r),xt(t,r,this._defs);var o=r.style,a=o.fontSize;a&&a<9&&(o.fontSize=9,r.scaleX*=a/9,r.scaleY*=a/9);var s=(o.fontSize||o.fontFamily)&&[o.fontStyle,o.fontWeight,(o.fontSize||12)+"px",o.fontFamily||"sans-serif"].join(" ");o.font=s;var l=r.getBoundingRect();return this._textX+=l.width,e.add(r),r},t.internalField=void(Q={g:function(t,e){var n=new nt.Z;return yt(e,n),xt(t,n,this._defs),n},rect:function(t,e){var n=new ot.Z;return yt(e,n),xt(t,n,this._defs),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n},circle:function(t,e){var n=new rt.Z;return yt(e,n),xt(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n},line:function(t,e){var n=new st.Z;return yt(e,n),xt(t,n,this._defs),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n},ellipse:function(t,e){var n=new at.Z;return yt(e,n),xt(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n},polygon:function(t,e){var n,i=t.getAttribute("points");i&&(n=mt(i));var r=new ut.Z({shape:{points:n||[]}});return yt(e,r),xt(t,r,this._defs),r},polyline:function(t,e){var n=new lt.ZP;yt(e,n),xt(t,n,this._defs);var i,r=t.getAttribute("points");return r&&(i=mt(r)),new ct.Z({shape:{points:i||[]}})},image:function(t,e){var n=new it.ZP;return yt(e,n),xt(t,n,this._defs),n.setStyle({image:t.getAttribute("xlink:href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(o);var a=new nt.Z;return yt(e,a),xt(t,a,this._defs),a},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0,a=new nt.Z;return yt(e,a),xt(t,a,this._defs),this._textX+=r,this._textY+=o,a},path:function(t,e){var n=t.getAttribute("d")||"",i=(0,et.iR)(n);return yt(e,i),xt(t,i,this._defs),i}})}();var vt={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),r=parseInt(t.getAttribute("y2")||"0",10),o=new pt.Z(e,n,i,r);return function(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType){var i,r=n.getAttribute("offset");i=r.indexOf("%")>0?parseInt(r,10)/100:r?parseFloat(r):0;var o=n.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:i,color:o})}n=n.nextSibling}}(t,o),o}};function yt(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),(0,o.ce)(e.__inheritedStyle,t.__inheritedStyle))}function mt(t){for(var e=(0,o.fy)(t).split(ft),n=[],i=0;i<e.length;i+=2){var r=parseFloat(e[i]),a=parseFloat(e[i+1]);n.push([r,a])}return n}var _t={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function xt(t,e,n,i){var r=e,a=r.__inheritedStyle||{};if(1===t.nodeType&&(function(t,e){var n=t.getAttribute("transform");if(n){n=n.replace(/,/g," ");var i=[],r=null;n.replace(St,(function(t,e,n){return i.push(e,n),""}));for(var a=i.length-1;a>0;a-=2){var s=i[a],l=i[a-1],u=void 0;switch(r=r||ht.Ue(),l){case"translate":u=(0,o.fy)(s).split(ft),ht.Iu(r,r,[parseFloat(u[0]),parseFloat(u[1]||"0")]);break;case"scale":u=(0,o.fy)(s).split(ft),ht.bA(r,r,[parseFloat(u[0]),parseFloat(u[1]||u[0])]);break;case"rotate":u=(0,o.fy)(s).split(ft),ht.U1(r,r,parseFloat(u[0]));break;case"skew":u=(0,o.fy)(s).split(ft),console.warn("Skew transform is not supported yet");break;case"matrix":u=(0,o.fy)(s).split(ft),r[0]=parseFloat(u[0]),r[1]=parseFloat(u[1]),r[2]=parseFloat(u[2]),r[3]=parseFloat(u[3]),r[4]=parseFloat(u[4]),r[5]=parseFloat(u[5])}}e.setLocalTransform(r)}}(t,e),(0,o.l7)(a,function(t){var e=t.getAttribute("style"),n={};if(!e)return n;var i,r={};for(Tt.lastIndex=0;null!=(i=Tt.exec(e));)r[i[1]]=i[2];for(var o in _t)_t.hasOwnProperty(o)&&null!=r[o]&&(n[_t[o]]=r[o]);return n}(t)),!i))for(var s in _t)if(_t.hasOwnProperty(s)){var l=t.getAttribute(s);null!=l&&(a[_t[s]]=l)}r.style=r.style||{},null!=a.fill&&(r.style.fill=wt(a.fill,n)),null!=a.stroke&&(r.style.stroke=wt(a.stroke,n)),(0,o.S6)(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(t){null!=a[t]&&(r.style[t]=parseFloat(a[t]))})),a.textBaseline&&"auto"!==a.textBaseline||(a.textBaseline="alphabetic"),"alphabetic"===a.textBaseline&&(a.textBaseline="bottom"),"start"===a.textAlign&&(a.textAlign="left"),"end"===a.textAlign&&(a.textAlign="right"),(0,o.S6)(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(t){null!=a[t]&&(r.style[t]=a[t])})),a.lineDash&&(r.style.lineDash=(0,o.UI)((0,o.fy)(a.lineDash).split(ft),(function(t){return parseFloat(t)}))),r.__inheritedStyle=a}var bt=/url\(\s*#(.*?)\)/;function wt(t,e){var n=e&&t&&t.match(bt);return n?e[(0,o.fy)(n[1])]:t}var St=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,Tt=/([^\s:;]+)\s*:\s*([^:;]+)/g,Mt=n(2397),Ct=n(3475);n(2098),Mt.Z.CMD,Math.PI,n(6),n(8234);var kt=n(2012),At=(n(4239),n(9689),n(3584),function(){this.cx=0,this.cy=0,this.width=0,this.height=0});(function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new At},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=e.width,o=e.height;t.moveTo(n,i+r),t.bezierCurveTo(n+r,i+r,n+3*r/2,i-r/3,n,i-o),t.bezierCurveTo(n-3*r/2,i-r/3,n-r,i+r,n,i+r),t.closePath()},e})(lt.ZP).prototype.type="droplet";var It=function(){this.cx=0,this.cy=0,this.width=0,this.height=0};(function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new It},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=e.width,o=e.height;t.moveTo(n,i),t.bezierCurveTo(n+r/2,i-2*o/3,n+2*r,i+o/3,n,i+o),t.bezierCurveTo(n-2*r,i+o/3,n-r/2,i-2*o/3,n,i)},e})(lt.ZP).prototype.type="heart";var Dt=Math.PI,Pt=Math.sin,Ot=Math.cos,Lt=function(){this.x=0,this.y=0,this.r=0,this.n=0};(function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new Lt},e.prototype.buildPath=function(t,e){var n=e.n;if(n&&!(n<2)){var i=e.x,r=e.y,o=e.r,a=2*Dt/n,s=-Dt/2;t.moveTo(i+o*Ot(s),r+o*Pt(s));for(var l=0,u=n-1;l<u;l++)s+=a,t.lineTo(i+o*Ot(s),r+o*Pt(s));t.closePath()}},e})(lt.ZP).prototype.type="isogon",n(4874);var Rt=Math.sin,Et=Math.cos,Zt=Math.PI/180,Nt=function(){this.cx=0,this.cy=0,this.r=[],this.k=0,this.n=1};(function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Nt},e.prototype.buildPath=function(t,e){var n,i,r,o=e.r,a=e.k,s=e.n,l=e.cx,u=e.cy;t.moveTo(l,u);for(var c=0,h=o.length;c<h;c++){r=o[c];for(var p=0;p<=360*s;p++)n=r*Rt(a/s*p%360*Zt)*Et(p*Zt)+l,i=r*Rt(a/s*p%360*Zt)*Rt(p*Zt)+u,t.lineTo(n,i)}},e})(lt.ZP).prototype.type="rose";var Bt=Math.PI,zt=Math.cos,Ft=Math.sin,Wt=function(){this.cx=0,this.cy=0,this.n=3,this.r=0};(function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new Wt},e.prototype.buildPath=function(t,e){var n=e.n;if(n&&!(n<2)){var i=e.cx,r=e.cy,o=e.r,a=e.r0;null==a&&(a=n>4?o*zt(2*Bt/n)/zt(Bt/n):o/3);var s=Bt/n,l=-Bt/2,u=i+o*zt(l),c=r+o*Ft(l);l+=s,t.moveTo(u,c);for(var h=0,p=2*n-1,d=void 0;h<p;h++)d=h%2==0?a:o,t.lineTo(i+d*zt(l),r+d*Ft(l)),l+=s;t.closePath()}},e})(lt.ZP).prototype.type="star";var Vt=Math.cos,Ht=Math.sin,Ut=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0,this.d=0,this.location="out"};(function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Ut},e.prototype.buildPath=function(t,e){var n,i,r,o,a=e.r,s=e.r0,l=e.d,u=e.cx,c=e.cy,h="out"===e.location?1:-1;if(!(e.location&&a<=s)){var p,d=0,f=1;n=(a+h*s)*Vt(0)-h*l*Vt(0)+u,i=(a+h*s)*Ht(0)-l*Ht(0)+c,t.moveTo(n,i);do{d++}while(s*d%(a+h*s)!=0);do{p=Math.PI/180*f,r=(a+h*s)*Vt(p)-h*l*Vt((a/s+h)*p)+u,o=(a+h*s)*Ht(p)-l*Ht((a/s+h)*p)+c,t.lineTo(r,o),f++}while(f<=s*d/(a+h*s)*360)}},e})(lt.ZP).prototype.type="trochoid",n(2763);var Gt=n(9472);n(8511),function(){function t(t){var e=this.dom=document.createElement("div");for(var n in e.className="ec-debug-dirty-rect",t=Object.assign({},t),Object.assign(t,{backgroundColor:"rgba(0, 0, 255, 0.2)",border:"1px solid #00f"}),e.style.cssText="\nposition: absolute;\nopacity: 0;\ntransition: opacity 0.5s linear;\npointer-events: none;\n",t)t.hasOwnProperty(n)&&(e.style[n]=t[n])}t.prototype.update=function(t){var e=this.dom.style;e.width=t.width+"px",e.height=t.height+"px",e.left=t.x+"px",e.top=t.y+"px"},t.prototype.hide=function(){this.dom.style.opacity="0"},t.prototype.show=function(t){var e=this;clearTimeout(this._hideTimeout),this.dom.style.opacity="1",this._hideTimeout=setTimeout((function(){e.hide()}),t||1e3)}}();var Xt=n(5080),Yt=!r.Z.canvasSupported,jt={},$t={},qt=function(){function t(t,e,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=e,this.id=t;var o=new O,a=n.renderer;if(Yt){if(!jt.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a||(a="canvas");if(!jt[a])throw new Error("Renderer '"+a+"' is not imported. Please import it first.");n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var s=new jt[a](e,o,n,t);this.storage=o,this.painter=s;var l=r.Z.node||r.Z.worker?null:new J(s.getViewportRoot(),s.root);this.handler=new w(o,s,l,s.root),this.animation=new E({stage:{update:function(){return i._flush(!0)}}}),this.animation.start()}return t.prototype.add=function(t){t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},t.prototype.remove=function(t){t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh()},t.prototype.setBackgroundColor=function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=function(t){if(!t)return!1;if("string"==typeof t)return(0,tt.L0)(t,1)<Xt.Ak;if(t.colorStops){for(var e=t.colorStops,n=0,i=e.length,r=0;r<i;r++)n+=(0,tt.L0)(e[r].color,1);return(n/=i)<Xt.Ak}return!1}(t)},t.prototype.getBackgroundColor=function(){return this._backgroundColor},t.prototype.setDarkMode=function(t){this._darkMode=t},t.prototype.isDarkMode=function(){return this._darkMode},t.prototype.refreshImmediately=function(t){t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},t.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},t.prototype.flush=function(){this._flush(!1)},t.prototype._flush=function(t){var e,n=(new Date).getTime();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());var i=(new Date).getTime();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.addHover=function(t){},t.prototype.removeHover=function(t){},t.prototype.clearHover=function(){},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},t.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.pathToImage=function(t,e){if(this.painter.pathToImage)return this.painter.pathToImage(t,e)},t.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this.handler.off(t,e)},t.prototype.trigger=function(t,e){this.handler.trigger(t,e)},t.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof nt.Z&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},t.prototype.dispose=function(){var t;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,t=this.id,delete $t[t]},t}();function Kt(t,e){var n=new qt(o.M8(),t,e);return $t[n.id]=n,n}var Jt=n(5495),Qt=n(4708),te=n(2822),ee="";"undefined"!=typeof navigator&&(ee=navigator.platform||"");var ne="rgba(0, 0, 0, 0.2)";const ie={darkMode:"auto",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:ne,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:ne,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:ne,dashArrayX:[1,0],dashArrayY:[4,3],dashLineOffset:0,rotation:-Math.PI/4},{color:ne,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:ne,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:ne,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:ee.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var re,oe,ae,se=n(6203),le=n(4841),ue=n(661),ce=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new Qt.Z(i),this._locale=new Qt.Z(r),this._optionManager=o},e.prototype.setOption=function(t,e,n){(0,o.hu)(!("\0_ec_inner"in t),"please use chart.getOption()");var i=de(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,e){return this._resetOption(t,de(e))},e.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var r=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(r,e)):ae(this,r),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var a=i.getTimelineOption(this);a&&(n=!0,this._mergeOption(a,e))}if(!t||"recreate"===t||"media"===t){var s=i.getMediaOption(this);s.length&&(0,o.S6)(s,(function(t){n=!0,this._mergeOption(t,e)}),this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,r=this._componentsCount,a=[],s=(0,o.kW)(),l=e&&e.replaceMergeMainTypeMap;(0,se.md)(this),(0,o.S6)(t,(function(t,e){null!=t&&(te.Z.hasClass(e)?e&&(a.push(e),s.set(e,!0)):n[e]=null==n[e]?(0,o.d9)(t):(0,o.TS)(n[e],t,!0))})),l&&l.each((function(t,e){te.Z.hasClass(e)&&!s.get(e)&&(a.push(e),s.set(e,!0))})),te.Z.topologicalTravel(a,te.Z.getAllClassMainTypes(),(function(e){var a=(0,le.R)(this,e,Jt.kF(t[e])),s=i.get(e),u=s?l&&l.get(e)?"replaceMerge":"normalMerge":"replaceAll",c=Jt.ab(s,a,u);Jt.O0(c,e,te.Z),n[e]=null,i.set(e,null),r.set(e,0);var h=[],p=[],d=0;(0,o.S6)(c,(function(t,n){var i=t.existing,r=t.newOption;if(r){var a=te.Z.getClass(e,t.keyInfo.subType,!0);if(i&&i.constructor===a)i.name=t.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var s=(0,o.l7)({componentIndex:n},t.keyInfo);i=new a(r,this,this,s),(0,o.l7)(i,s),t.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(h.push(i.option),p.push(i),d++):(h.push(void 0),p.push(void 0))}),this),n[e]=h,i.set(e,p),r.set(e,d),"series"===e&&re(this)}),this),this._seriesIndices||re(this)},e.prototype.getOption=function(){var t=(0,o.d9)(this.option);return(0,o.S6)(t,(function(e,n){if(te.Z.hasClass(n)){for(var i=Jt.kF(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!Jt.lY(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}})),delete t["\0_ec_inner"],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.getLocale=function(t){return this.getLocaleModel().get(t)},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var r=0;r<n.length;r++)if(n[r])return n[r]}},e.prototype.queryComponents=function(t){var e=t.mainType;if(!e)return[];var n,i=t.index,r=t.id,a=t.name,s=this._componentsMap.get(e);return s&&s.length?(null!=i?(n=[],(0,o.S6)(Jt.kF(i),(function(t){s[t]&&n.push(s[t])}))):n=null!=r?he("id",r,s):null!=a?he("name",a,s):(0,o.hX)(s,(function(t){return!!t})),pe(n,t)):[]},e.prototype.findComponents=function(t){var e,n,i,r,a,s=t.query,l=t.mainType,u=(n=l+"Index",i=l+"Id",r=l+"Name",!(e=s)||null==e[n]&&null==e[i]&&null==e[r]?null:{mainType:l,index:e[n],id:e[i],name:e[r]});return a=pe(u?this.queryComponents(u):(0,o.hX)(this._componentsMap.get(l),(function(t){return!!t})),t),t.filter?(0,o.hX)(a,t.filter):a},e.prototype.eachComponent=function(t,e,n){var i=this._componentsMap;if((0,o.mf)(t)){var r=e,a=t;i.each((function(t,e){for(var n=0;t&&n<t.length;n++){var i=t[n];i&&a.call(r,e,i,i.componentIndex)}}))}else for(var s=(0,o.HD)(t)?i.get(t):(0,o.Kn)(t)?this.findComponents(t):null,l=0;s&&l<s.length;l++){var u=s[l];u&&e.call(n,u,u.componentIndex)}},e.prototype.getSeriesByName=function(t){var e=Jt.U5(t,null);return(0,o.hX)(this._componentsMap.get("series"),(function(t){return!!t&&null!=e&&t.name===e}))},e.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},e.prototype.getSeriesByType=function(t){return(0,o.hX)(this._componentsMap.get("series"),(function(e){return!!e&&e.subType===t}))},e.prototype.getSeries=function(){return(0,o.hX)(this._componentsMap.get("series").slice(),(function(t){return!!t}))},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(t,e){oe(this),(0,o.S6)(this._seriesIndices,(function(n){var i=this._componentsMap.get("series")[n];t.call(e,i,n)}),this)},e.prototype.eachRawSeries=function(t,e){(0,o.S6)(this._componentsMap.get("series"),(function(n){n&&t.call(e,n,n.componentIndex)}))},e.prototype.eachSeriesByType=function(t,e,n){oe(this),(0,o.S6)(this._seriesIndices,(function(i){var r=this._componentsMap.get("series")[i];r.subType===t&&e.call(n,r,i)}),this)},e.prototype.eachRawSeriesByType=function(t,e,n){return(0,o.S6)(this.getSeriesByType(t),e,n)},e.prototype.isSeriesFiltered=function(t){return oe(this),null==this._seriesIndicesMap.get(t.componentIndex)},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(t,e){oe(this);var n=[];(0,o.S6)(this._seriesIndices,(function(i){var r=this._componentsMap.get("series")[i];t.call(e,r,i)&&n.push(i)}),this),this._seriesIndices=n,this._seriesIndicesMap=(0,o.kW)(n)},e.prototype.restoreData=function(t){re(this);var e=this._componentsMap,n=[];e.each((function(t,e){te.Z.hasClass(e)&&n.push(e)})),te.Z.topologicalTravel(n,te.Z.getAllClassMainTypes(),(function(n){(0,o.S6)(e.get(n),(function(e){!e||"series"===n&&function(t,e){if(e){var n=e.seriesIndex,i=e.seriesId,r=e.seriesName;return null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=r&&t.name!==r}}(e,t)||e.restoreData()}))}))},e.internalField=(re=function(t){var e=t._seriesIndices=[];(0,o.S6)(t._componentsMap.get("series"),(function(t){t&&e.push(t.componentIndex)})),t._seriesIndicesMap=(0,o.kW)(e)},oe=function(t){},void(ae=function(t,e){t.option={},t.option["\0_ec_inner"]=1,t._componentsMap=(0,o.kW)({series:[]}),t._componentsCount=(0,o.kW)();var n=e.aria;(0,o.Kn)(n)&&null==n.enabled&&(n.enabled=!0),function(t,e){var n=t.color&&!t.colorLayer;(0,o.S6)(e,(function(e,i){"colorLayer"===i&&n||te.Z.hasClass(i)||("object"==typeof e?t[i]=t[i]?(0,o.TS)(t[i],e,!1):(0,o.d9)(e):null==t[i]&&(t[i]=e))}))}(e,t._theme.option),(0,o.TS)(e,ie,!1),t._mergeOption(e,null)})),e}(Qt.Z);function he(t,e,n){if((0,o.kJ)(e)){var i=(0,o.kW)();return(0,o.S6)(e,(function(t){null!=t&&null!=Jt.U5(t,null)&&i.set(t,!0)})),(0,o.hX)(n,(function(e){return e&&i.get(e[t])}))}var r=Jt.U5(e,null);return(0,o.hX)(n,(function(e){return e&&null!=r&&e[t]===r}))}function pe(t,e){return e.hasOwnProperty("subType")?(0,o.hX)(t,(function(t){return t&&t.subType===e.subType})):t}function de(t){var e=(0,o.kW)();return t&&(0,o.S6)(Jt.kF(t.replaceMerge),(function(t){e.set(t,!0)})),{replaceMergeMainTypeMap:e}}(0,o.jB)(ce,ue._);const fe=ce;var ge=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"];const ve=function(t){o.S6(ge,(function(e){this[e]=o.ak(t[e],t)}),this)};var ye=n(4134),me=n(3264),_e=/^(min|max)?(.+)$/;function xe(t,e,n){var i={width:e,height:n,aspectratio:e/n},r=!0;return(0,o.S6)(t,(function(t,e){var n=e.match(_e);if(n&&n[1]&&n[2]){var o=n[1],a=n[2].toLowerCase();(function(t,e,n){return"min"===n?t>=e:"max"===n?t<=e:t===e})(i[a],t,o)||(r=!1)}})),r}const be=function(){function t(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return t.prototype.setOption=function(t,e,n){t&&((0,o.S6)((0,Jt.kF)(t.series),(function(t){t&&t.data&&(0,o.fU)(t.data)&&(0,o.s7)(t.data)})),(0,o.S6)((0,Jt.kF)(t.dataset),(function(t){t&&t.source&&(0,o.fU)(t.source)&&(0,o.s7)(t.source)}))),t=(0,o.d9)(t);var i=this._optionBackup,r=function(t,e,n){var i,r,a=[],s=t.baseOption,l=t.timeline,u=t.options,c=t.media,h=!!t.media,p=!!(u||l||s&&s.timeline);function d(t){(0,o.S6)(e,(function(e){e(t,n)}))}return s?(r=s).timeline||(r.timeline=l):((p||h)&&(t.options=t.media=null),r=t),h&&(0,o.kJ)(c)&&(0,o.S6)(c,(function(t){t&&t.option&&(t.query?a.push(t):i||(i=t))})),d(r),(0,o.S6)(u,(function(t){return d(t)})),(0,o.S6)(a,(function(t){return d(t.option)})),{baseOption:r,timelineOptions:u||[],mediaDefault:i,mediaList:a}}(t,e,!i);this._newBaseOption=r.baseOption,i?(r.timelineOptions.length&&(i.timelineOptions=r.timelineOptions),r.mediaList.length&&(i.mediaList=r.mediaList),r.mediaDefault&&(i.mediaDefault=r.mediaDefault)):this._optionBackup=r},t.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],(0,o.d9)(t?e.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=(0,o.d9)(n[i.getCurrentIndex()]))}return e},t.prototype.getMediaOption=function(t){var e,n,i=this._api.getWidth(),r=this._api.getHeight(),a=this._mediaList,s=this._mediaDefault,l=[],u=[];if(!a.length&&!s)return u;for(var c=0,h=a.length;c<h;c++)xe(a[c].query,i,r)&&l.push(c);return!l.length&&s&&(l=[-1]),l.length&&(e=l,n=this._currentMediaIndices,e.join(",")!==n.join(","))&&(u=(0,o.UI)(l,(function(t){return(0,o.d9)(-1===t?s.option:a[t].option)}))),this._currentMediaIndices=l,u},t}();var we=o.S6,Se=o.Kn,Te=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Me(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=Te.length;n<i;n++){var r=Te[n],a=e.normal,s=e.emphasis;a&&a[r]&&(t[r]=t[r]||{},t[r].normal?o.TS(t[r].normal,a[r]):t[r].normal=a[r],a[r]=null),s&&s[r]&&(t[r]=t[r]||{},t[r].emphasis?o.TS(t[r].emphasis,s[r]):t[r].emphasis=s[r],s[r]=null)}}function Ce(t,e,n){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var i=t[e].normal,r=t[e].emphasis;i&&(n?(t[e].normal=t[e].emphasis=null,o.ce(t[e],i)):t[e]=i),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r,r.focus&&(t.emphasis.focus=r.focus),r.blurScope&&(t.emphasis.blurScope=r.blurScope))}}function ke(t){Ce(t,"itemStyle"),Ce(t,"lineStyle"),Ce(t,"areaStyle"),Ce(t,"label"),Ce(t,"labelLine"),Ce(t,"upperLabel"),Ce(t,"edgeLabel")}function Ae(t,e){var n=Se(t)&&t[e],i=Se(n)&&n.textStyle;if(i)for(var r=0,o=Jt.Td.length;r<o;r++){var a=Jt.Td[r];i.hasOwnProperty(a)&&(n[a]=i[a])}}function Ie(t){t&&(ke(t),Ae(t,"label"),t.emphasis&&Ae(t.emphasis,"label"))}function De(t){return o.kJ(t)?t:t?[t]:[]}function Pe(t){return(o.kJ(t)?t[0]:t)||{}}function Oe(t){t&&(0,o.S6)(Le,(function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])}))}var Le=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Re=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Ee=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Ze(t){var e=t&&t.itemStyle;if(e)for(var n=0;n<Ee.length;n++){var i=Ee[n][1],r=Ee[n][0];null!=e[i]&&(e[r]=e[i])}}function Ne(t){t&&"edge"===t.alignTo&&null!=t.margin&&null==t.edgeDistance&&(t.edgeDistance=t.margin)}function Be(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay)}function ze(t,e){if(t)for(var n=0;n<t.length;n++)e(t[n]),t[n]&&ze(t[n].children,e)}function Fe(t,e){(function(t,e){we(De(t.series),(function(t){Se(t)&&function(t){if(Se(t)){Me(t),ke(t),Ae(t,"label"),Ae(t,"upperLabel"),Ae(t,"edgeLabel"),t.emphasis&&(Ae(t.emphasis,"label"),Ae(t.emphasis,"upperLabel"),Ae(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(Me(e),Ie(e));var n=t.markLine;n&&(Me(n),Ie(n));var i=t.markArea;i&&Ie(i);var r=t.data;if("graph"===t.type){r=r||t.nodes;var a=t.links||t.edges;if(a&&!o.fU(a))for(var s=0;s<a.length;s++)Ie(a[s]);o.S6(t.categories,(function(t){ke(t)}))}if(r&&!o.fU(r))for(s=0;s<r.length;s++)Ie(r[s]);if((e=t.markPoint)&&e.data){var l=e.data;for(s=0;s<l.length;s++)Ie(l[s])}if((n=t.markLine)&&n.data){var u=n.data;for(s=0;s<u.length;s++)o.kJ(u[s])?(Ie(u[s][0]),Ie(u[s][1])):Ie(u[s])}"gauge"===t.type?(Ae(t,"axisLabel"),Ae(t,"title"),Ae(t,"detail")):"treemap"===t.type?(Ce(t.breadcrumb,"itemStyle"),o.S6(t.levels,(function(t){ke(t)}))):"tree"===t.type&&ke(t.leaves)}}(t)}));var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),we(n,(function(e){we(De(t[e]),(function(t){t&&(Ae(t,"axisLabel"),Ae(t.axisPointer,"label"))}))})),we(De(t.parallel),(function(t){var e=t&&t.parallelAxisDefault;Ae(e,"axisLabel"),Ae(e&&e.axisPointer,"label")})),we(De(t.calendar),(function(t){Ce(t,"itemStyle"),Ae(t,"dayLabel"),Ae(t,"monthLabel"),Ae(t,"yearLabel")})),we(De(t.radar),(function(t){Ae(t,"name"),t.name&&null==t.axisName&&(t.axisName=t.name,delete t.name),null!=t.nameGap&&null==t.axisNameGap&&(t.axisNameGap=t.nameGap,delete t.nameGap)})),we(De(t.geo),(function(t){Se(t)&&(Ie(t),we(De(t.regions),(function(t){Ie(t)})))})),we(De(t.timeline),(function(t){Ie(t),Ce(t,"label"),Ce(t,"itemStyle"),Ce(t,"controlStyle",!0);var e=t.data;o.kJ(e)&&o.S6(e,(function(t){o.Kn(t)&&(Ce(t,"label"),Ce(t,"itemStyle"))}))})),we(De(t.toolbox),(function(t){Ce(t,"iconStyle"),we(t.feature,(function(t){Ce(t,"iconStyle")}))})),Ae(Pe(t.axisPointer),"label"),Ae(Pe(t.tooltip).axisPointer,"label")})(t,e),t.series=(0,Jt.kF)(t.series),(0,o.S6)(t.series,(function(t){if((0,o.Kn)(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e){if(null!=t.clockWise&&(t.clockwise=t.clockWise),Ne(t.label),(r=t.data)&&!(0,o.fU)(r))for(var n=0;n<r.length;n++)Ne(r[n]);null!=t.hoverOffset&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if("gauge"===e){var i=function(t,e){for(var n="pointer.color".split(","),i=t,r=0;r<n.length&&null!=(i=i&&i[n[r]]);r++);return i}(t);null!=i&&function(t,e,n,i){for(var r,o="itemStyle.color".split(","),a=t,s=0;s<o.length-1;s++)null==a[r=o[s]]&&(a[r]={}),a=a[r];null==a[o[s]]&&(a[o[s]]=n)}(t,0,i)}else if("bar"===e){var r;if(Ze(t),Ze(t.backgroundStyle),Ze(t.emphasis),(r=t.data)&&!(0,o.fU)(r))for(n=0;n<r.length;n++)"object"==typeof r[n]&&(Ze(r[n]),Ze(r[n]&&r[n].emphasis))}else if("sunburst"===e){var a=t.highlightPolicy;a&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=a)),Be(t),ze(t.data,Be)}else"graph"===e||"sankey"===e?function(t){t&&null!=t.focusNodeAdjacency&&(t.emphasis=t.emphasis||{},null==t.emphasis.focus&&(t.emphasis.focus="adjacency"))}(t):"map"===e&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&(0,o.ce)(t,t.mapLocation));null!=t.hoverAnimation&&(t.emphasis=t.emphasis||{},t.emphasis&&null==t.emphasis.scale&&(t.emphasis.scale=t.hoverAnimation)),Oe(t)}})),t.dataRange&&(t.visualMap=t.dataRange),(0,o.S6)(Re,(function(e){var n=t[e];n&&((0,o.kJ)(n)||(n=[n]),(0,o.S6)(n,(function(t){Oe(t)})))}))}function We(t){(0,o.S6)(t,(function(e,n){var i=[],r=[NaN,NaN],o=[e.stackResultDimension,e.stackedOverDimension],a=e.data,s=e.isStackedByIndex,l=a.map(o,(function(o,l,u){var c,h,p=a.get(e.stackedDimension,u);if(isNaN(p))return r;s?h=a.getRawIndex(u):c=a.get(e.stackedByDimension,u);for(var d=NaN,f=n-1;f>=0;f--){var g=t[f];if(s||(h=g.data.rawIndexOf(g.stackedByDimension,c)),h>=0){var v=g.data.getByRawIndex(g.stackResultDimension,h);if(p>=0&&v>0||p<=0&&v<0){p+=v,d=v;break}}}return i[0]=p,i[1]=d,i}));a.hostModel.setData(l),e.data=l}))}var Ve=n(4689),He=n(8278),Ue=n(2916),Ge=n(3696),Xe=n(1563),Ye=n(106),je=n(4013),$e=n(1761),qe=n(8261),Ke=n(3607),Je=(0,Jt.Yf)(),Qe={itemStyle:(0,$e.Z)(qe.t,!0),lineStyle:(0,$e.Z)(Ke.v,!0)},tn={lineStyle:"stroke",itemStyle:"fill"};function en(t,e){return t.visualStyleMapper||Qe[e]||(console.warn("Unkown style type '"+e+"'."),Qe.itemStyle)}function nn(t,e){return t.visualDrawType||tn[e]||(console.warn("Unkown style type '"+e+"'."),"fill")}var rn={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),a=en(t,i)(r),s=r.getShallow("decal");s&&(n.setVisual("decal",s),s.dirty=!0);var l=nn(t,i),u=a[l],c=(0,o.mf)(u)?u:null;if(a[l]&&!c||(a[l]=t.getColorFromPalette(t.name,null,e.getSeriesCount()),n.setVisual("colorFromPalette",!0)),n.setVisual("style",a),n.setVisual("drawType",l),!e.isSeriesFiltered(t)&&c)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=(0,o.l7)({},a);r[l]=c(i),e.setItemVisual(n,"style",r)}}}},on=new Qt.Z,an={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=en(t,i),a=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){on.option=n[i];var s=r(on),l=t.ensureUniqueItemVisual(e,"style");(0,o.l7)(l,s),on.option.decal&&(t.setItemVisual(e,"decal",on.option.decal),on.option.decal.dirty=!0),a in s&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},sn={performRawSeries:!0,overallReset:function(t){var e=(0,o.kW)();t.eachSeries((function(t){if(t.useColorPaletteOnData){var n=e.get(t.type);n||(n={},e.set(t.type,n)),Je(t).scope=n}})),t.eachSeries((function(e){if(e.useColorPaletteOnData&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},r=e.getData(),o=Je(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=nn(e,a);r.each((function(t){var e=r.getRawIndex(t);i[e]=t})),n.each((function(t){var a=i[t];if(r.getItemVisual(a,"colorFromPalette")){var l=r.ensureUniqueItemVisual(a,"style"),u=n.getName(t)||t+"",c=n.count();l[s]=e.getColorFromPalette(u,o,c)}}))}}))}},ln=n(9356),un=Math.PI,cn=n(5193),hn=n(4053),pn=function(){function t(t,e,n,i){this._stageTaskMap=(0,o.kW)(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=(0,o.kW)();t.eachSeries((function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;(0,o.S6)(this._allHandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,{});(0,o.hu)(!(i.reset&&i.overallReset),""),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)}),this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var r=!1,a=this;function s(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}(0,o.S6)(t,(function(t,o){if(!i.visualType||i.visualType===t.visualType){var l=a._stageTaskMap.get(t.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var h,p=c.agentStubMap;p.each((function(t){s(i,t)&&(t.dirty(),h=!0)})),h&&c.dirty(),a.updatePayload(c,n);var d=a.getPerformArgs(c,i.block);p.each((function(t){t.perform(d)})),c.perform(d)&&(r=!0)}else u&&u.each((function(o,l){s(i,o)&&o.dirty();var u=a.getPerformArgs(o,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(o.context.model),a.updatePayload(o,n),o.perform(u)&&(r=!0)}))}})),this.unfinished=r||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var r=this,a=e.seriesTaskMap,s=e.seriesTaskMap=(0,o.kW)(),l=t.seriesType,u=t.getTargetSeries;function c(e){var o=e.uid,l=s.set(o,a&&a.get(o)||(0,cn.v)({plan:yn,reset:mn,count:bn}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c)},t.prototype._createOverallStageTask=function(t,e,n,i){var r=this,a=e.overallTask=e.overallTask||(0,cn.v)({reset:dn});a.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var s=a.agentStubMap,l=a.agentStubMap=(0,o.kW)(),u=t.seriesType,c=t.getTargetSeries,h=!0,p=!1;function d(t){var e=t.uid,n=l.set(e,s&&s.get(e)||(p=!0,(0,cn.v)({reset:fn,onDirty:vn})));n.context={model:t,overallProgress:h},n.agent=a,n.__block=h,r._pipe(t,n)}(0,o.hu)(!t.createOnAllSeries,""),u?n.eachRawSeriesByType(u,d):c?c(n,i).each(d):(h=!1,(0,o.S6)(n.getSeries(),d)),p&&a.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},t.wrapStageHandler=function(t,e){return(0,o.mf)(t)&&(t={overallReset:t,seriesType:wn(t)}),t.uid=(0,hn.Kr)("stageHandler"),e&&(t.visualType=e),t},t}();function dn(t){t.overallReset(t.ecModel,t.api,t.payload)}function fn(t){return t.overallProgress&&gn}function gn(){this.agent.dirty(),this.getDownstream().dirty()}function vn(){this.agent&&this.agent.dirty()}function yn(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function mn(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=(0,Jt.kF)(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?(0,o.UI)(e,(function(t,e){return xn(e)})):_n}var _n=xn(0);function xn(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o<e.end;o++)r.dataEach(i,o);else r&&r.progress&&r.progress(e,i)}}function bn(t){return t.data.count()}function wn(t){Sn=null;try{t(Tn,Mn)}catch(t){}return Sn}var Sn,Tn={},Mn={};function Cn(t,e){for(var n in e.prototype)t[n]=o.ZT}Cn(Tn,fe),Cn(Mn,ve),Tn.eachSeriesByType=Tn.eachRawSeriesByType=function(t){Sn=t},Tn.eachComponent=function(t){"series"===t.mainType&&t.subType&&(Sn=t.subType)};const kn=pn;var An=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const In={color:An,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],An]};var Dn="#B9B8CE",Pn="#100C2A",On=function(){return{axisLine:{lineStyle:{color:Dn}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},Ln=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],Rn={darkMode:!0,color:Ln,backgroundColor:Pn,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Dn}},textStyle:{color:Dn},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Dn}},dataZoom:{borderColor:"#71708A",textStyle:{color:Dn},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:Dn}},timeline:{lineStyle:{color:Dn},label:{color:Dn},controlStyle:{color:Dn,borderColor:Dn}},calendar:{itemStyle:{color:Pn},dayLabel:{color:Dn},monthLabel:{color:Dn},yearLabel:{color:Dn}},timeAxis:On(),logAxis:On(),valueAxis:On(),categoryAxis:On(),line:{symbol:"circle"},graph:{color:Ln},gauge:{title:{color:Dn},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Dn},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}};Rn.categoryAxis.splitLine.show=!1;const En=Rn;var Zn=n(7252),Nn=n(5073),Bn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return(0,i.ZT)(e,t),e.prototype.init=function(e,n,i){t.prototype.init.call(this,e,n,i),this._sourceManager=new Nn.U(this),(0,Nn.t)(this)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),(0,Nn.t)(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Zn.fY},e}(te.Z);te.Z.registerClass(Bn);var zn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return(0,i.ZT)(e,t),e.type="dataset",e}(He.Z);He.Z.registerClass(zn);var Fn=(0,o.kW)();var Wn={geoJSON:function(t){var e=t.source;t.geoJSON=(0,o.HD)(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=gt(t.source)}},Vn=n(4536),Hn=function(){function t(){}return t.prototype.normalizeQuery=function(t){var e={},n={},i={};if(o.HD(t)){var r=(0,Vn.u9)(t);e.mainType=r.main||null,e.subType=r.sub||null}else{var a=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};o.S6(t,(function(t,r){for(var o=!1,l=0;l<a.length;l++){var u=a[l],c=r.lastIndexOf(u);if(c>0&&c===r.length-u.length){var h=r.slice(0,c);"data"!==h&&(e.mainType=h,e[u.toLowerCase()]=t,o=!0)}}s.hasOwnProperty(r)&&(n[r]=t,o=!0),o||(i[r]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Un={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendSymbol&&n.setVisual("legendSymbol",t.legendSymbol),t.hasSymbolVisual){var i=t.get("symbol"),r=t.get("symbolSize"),a=t.get("symbolKeepAspect"),s=t.get("symbolRotate"),l=(0,o.mf)(i),u=(0,o.mf)(r),c=(0,o.mf)(s),h=l||u||c,p=!l&&i?i:t.defaultSymbol,d=u?null:r,f=c?null:s;if(n.setVisual({legendSymbol:t.legendSymbol||p,symbol:p,symbolSize:d,symbolKeepAspect:a,symbolRotate:f}),!e.isSeriesFiltered(t))return{dataEach:h?function(e,n){var o=t.getRawValue(n),a=t.getDataParams(n);l&&e.setItemVisual(n,"symbol",i(o,a)),u&&e.setItemVisual(n,"symbolSize",r(o,a)),c&&e.setItemVisual(n,"symbolRotate",s(o,a))}:null}}}},Gn=n(9199),Xn=n(4629),Yn=n(7096),jn=2*Math.PI,$n=Mt.Z.CMD,qn=["top","right","bottom","left"];function Kn(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0)}}function Jn(t,e,n,i,r,o,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s),c=(a/=u)*n+t,h=(s/=u)*n+e;if(Math.abs(i-r)%jn<1e-4)return l[0]=c,l[1]=h,u-n;if(o){var p=i;i=(0,Yn.m)(r),r=(0,Yn.m)(p)}else i=(0,Yn.m)(i),r=(0,Yn.m)(r);i>r&&(r+=jn);var d=Math.atan2(s,a);if(d<0&&(d+=jn),d>=i&&d<=r||d+jn>=i&&d+jn<=r)return l[0]=c,l[1]=h,u-n;var f=n*Math.cos(i)+t,g=n*Math.sin(i)+e,v=n*Math.cos(r)+t,y=n*Math.sin(r)+e,m=(f-a)*(f-a)+(g-s)*(g-s),_=(v-a)*(v-a)+(y-s)*(y-s);return m<_?(l[0]=f,l[1]=g,Math.sqrt(m)):(l[0]=v,l[1]=y,Math.sqrt(_))}function Qn(t,e,n,i,r,o,a,s){var l=r-t,u=o-e,c=n-t,h=i-e,p=Math.sqrt(c*c+h*h),d=(l*(c/=p)+u*(h/=p))/p;s&&(d=Math.min(Math.max(d,0),1)),d*=p;var f=a[0]=t+d*c,g=a[1]=e+d*h;return Math.sqrt((f-r)*(f-r)+(g-o)*(g-o))}function ti(t,e,n,i,r,o,a){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i);var s=t+n,l=e+i,u=a[0]=Math.min(Math.max(r,t),s),c=a[1]=Math.min(Math.max(o,e),l);return Math.sqrt((u-r)*(u-r)+(c-o)*(c-o))}var ei=[];function ni(t,e,n){var i=ti(e.x,e.y,e.width,e.height,t.x,t.y,ei);return n.set(ei[0],ei[1]),i}function ii(t,e,n){for(var i,r,o=0,a=0,s=0,l=0,u=1/0,c=e.data,h=t.x,p=t.y,d=0;d<c.length;){var f=c[d++];1===d&&(s=o=c[d],l=a=c[d+1]);var g=u;switch(f){case $n.M:o=s=c[d++],a=l=c[d++];break;case $n.L:g=Qn(o,a,c[d],c[d+1],h,p,ei,!0),o=c[d++],a=c[d++];break;case $n.C:g=(0,Ct.t1)(o,a,c[d++],c[d++],c[d++],c[d++],c[d],c[d+1],h,p,ei),o=c[d++],a=c[d++];break;case $n.Q:g=(0,Ct.Wr)(o,a,c[d++],c[d++],c[d],c[d+1],h,p,ei),o=c[d++],a=c[d++];break;case $n.A:var v=c[d++],y=c[d++],m=c[d++],_=c[d++],x=c[d++],b=c[d++];d+=1;var w=!!(1-c[d++]);i=Math.cos(x)*m+v,r=Math.sin(x)*_+y,d<=1&&(s=i,l=r),g=Jn(v,y,_,x,x+b,w,(h-v)*_/m+v,p,ei),o=Math.cos(x+b)*m+v,a=Math.sin(x+b)*_+y;break;case $n.R:g=ti(s=o=c[d++],l=a=c[d++],c[d++],c[d++],h,p,ei);break;case $n.Z:g=Qn(o,a,s,l,h,p,ei,!0),o=s,a=l}g<u&&(u=g,n.set(ei[0],ei[1]))}return u}var ri=new Ge.Point,oi=new Ge.Point,ai=new Ge.Point,si=new Ge.Point,li=new Ge.Point;function ui(t,e){if(t){var n=t.getTextGuideLine(),i=t.getTextContent();if(i&&n){var r=t.textGuideLineConfig||{},o=[[0,0],[0,0],[0,0]],a=r.candidates||qn,s=i.getBoundingRect().clone();s.applyTransform(i.getComputedTransform());var l=1/0,u=r.anchor,c=t.getComputedTransform(),h=c&&(0,ht.U_)([],c),p=e.get("length2")||0;u&&ai.copy(u);for(var d=0;d<a.length;d++){Kn(a[d],0,s,ri,si),Ge.Point.scaleAndAdd(oi,ri,si,p),oi.transform(h);var f=t.getBoundingRect(),g=u?u.distance(oi):t instanceof Ge.Path?ii(oi,t.path,ai):ni(oi,f,ai);g<l&&(l=g,oi.transform(c),ai.transform(c),ai.toArray(o[0]),oi.toArray(o[1]),ri.toArray(o[2]))}!function(t,e){if(e<=180&&e>0){e=e/180*Math.PI,ri.fromArray(t[0]),oi.fromArray(t[1]),ai.fromArray(t[2]),Ge.Point.sub(si,ri,oi),Ge.Point.sub(li,ai,oi);var n=si.len(),i=li.len();if(!(n<.001||i<.001)){si.scale(1/n),li.scale(1/i);var r=si.dot(li);if(Math.cos(e)<r){var o=Qn(oi.x,oi.y,ai.x,ai.y,ri.x,ri.y,ci,!1);hi.fromArray(ci),hi.scaleAndAdd(li,o/Math.tan(Math.PI-e));var a=ai.x!==oi.x?(hi.x-oi.x)/(ai.x-oi.x):(hi.y-oi.y)/(ai.y-oi.y);if(isNaN(a))return;a<0?Ge.Point.copy(hi,oi):a>1&&Ge.Point.copy(hi,ai),hi.toArray(t[1])}}}}(o,e.get("minTurnAngle")),n.setShape({points:o})}}}var ci=[],hi=new Ge.Point;function pi(t,e,n,i){var r="normal"===n,o=r?t:t.ensureState(n);o.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function di(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=a.TK(i[0],i[1]),o=a.TK(i[1],i[2]);if(!r||!o)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var s=Math.min(r,o)*n,l=a.t7([],i[1],i[0],s/r),u=a.t7([],i[1],i[2],s/o),c=a.t7([],l,u,.5);t.bezierCurveTo(l[0],l[1],l[0],l[1],c[0],c[1]),t.bezierCurveTo(u[0],u[1],u[0],u[1],i[2][0],i[2][1])}else for(var h=1;h<i.length;h++)t.lineTo(i[h][0],i[h][1])}function fi(t,e,n,i,r,o){var a=t.length;if(!(a<2)){t.sort((function(t,n){return t.rect[e]-n.rect[e]}));for(var s,l=0,u=!1,c=[],h=0,p=0;p<a;p++){var d=t[p],f=d.rect;(s=f[e]-l)<0&&(f[e]-=s,d.label[e]-=s,u=!0);var g=Math.max(-s,0);c.push(g),h+=g,l=f[e]+f[n]}h>0&&o&&w(-h/a,0,a);var v,y,m=t[0],_=t[a-1];return x(),v<0&&S(-v,.8),y<0&&S(y,.8),x(),b(v,y,1),b(y,v,-1),x(),v<0&&T(-v),y<0&&T(y),u}function x(){v=m.rect[e]-i,y=r-_.rect[e]-_.rect[n]}function b(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){w(i*n,0,a);var r=i+t;r<0&&S(-r*n,1)}else S(-t*n,1)}}function w(n,i,r){0!==n&&(u=!0);for(var o=i;o<r;o++){var a=t[o];a.rect[e]+=n,a.label[e]+=n}}function S(i,r){for(var o=[],s=0,l=1;l<a;l++){var u=t[l-1].rect,c=Math.max(t[l].rect[e]-u[e]-u[n],0);o.push(c),s+=c}if(s){var h=Math.min(Math.abs(i)/s,r);if(i>0)for(l=0;l<a-1;l++)w(o[l]*h,0,l+1);else for(l=a-1;l>0;l--)w(-o[l-1]*h,l,a)}}function T(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i<a-1;i++)if(e>0?w(n,0,i+1):w(-n,a-i-1,a),(t-=n)<=0)return}}var gi=n(5628);function vi(t){if(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n].slice());return e}}function yi(t,e){var n=t.label,i=e&&e.getTextGuideLine();return{dataIndex:t.dataIndex,dataType:t.dataType,seriesIndex:t.seriesModel.seriesIndex,text:t.label.style.text,rect:t.hostRect,labelRect:t.rect,align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:vi(i&&i.shape.points)}}var mi=["align","verticalAlign","width","height","fontSize"],_i=new Xn.Z,xi=(0,Jt.Yf)(),bi=(0,Jt.Yf)();function wi(t,e,n){for(var i=0;i<n.length;i++){var r=n[i];null!=e[r]&&(t[r]=e[r])}}var Si=["x","y","rotation"];const Ti=function(){function t(){this._labelList=[],this._chartViewList=[]}return t.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},t.prototype._addLabel=function(t,e,n,i,r){var o=i.style,a=i.__hostTarget.textConfig||{},s=i.getComputedTransform(),l=i.getBoundingRect().plain();Ge.BoundingRect.applyTransform(l,l,s),s?_i.setLocalTransform(s):(_i.x=_i.y=_i.rotation=_i.originX=_i.originY=0,_i.scaleX=_i.scaleY=1);var u,c=i.__hostTarget;if(c){u=c.getBoundingRect().plain();var h=c.getComputedTransform();Ge.BoundingRect.applyTransform(u,u,h)}var p=u&&c.getTextGuideLine();this._labelList.push({label:i,labelLine:p,seriesModel:n,dataIndex:t,dataType:e,layoutOption:r,computedLayoutOption:null,rect:l,hostRect:u,priority:u?u.width*u.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:p&&p.ignore,x:_i.x,y:_i.y,rotation:_i.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:i.cursor,attachedPos:a.position,attachedRot:a.rotation}})},t.prototype.addLabelsOfSeries=function(t){var e=this;this._chartViewList.push(t);var n=t.__model,i=n.get("labelLayout");((0,o.mf)(i)||(0,o.XP)(i).length)&&t.group.traverse((function(t){if(t.ignore)return!0;var r=t.getTextContent(),o=(0,Xe.A)(t);r&&!r.disableLabelLayout&&e._addLabel(o.dataIndex,o.dataType,n,r,i)}))},t.prototype.updateLayoutConfig=function(t){var e=t.getWidth(),n=t.getHeight();function i(t,e){return function(){ui(t,e)}}for(var r=0;r<this._labelList.length;r++){var o=this._labelList[r],a=o.label,s=a.__hostTarget,l=o.defaultAttr,u=void 0;u=(u="function"==typeof o.layoutOption?o.layoutOption(yi(o,s)):o.layoutOption)||{},o.computedLayoutOption=u;var c=Math.PI/180;s&&s.setTextConfig({local:!1,position:null!=u.x||null!=u.y?null:l.attachedPos,rotation:null!=u.rotate?u.rotate*c:l.attachedRot,offset:[u.dx||0,u.dy||0]});var h=!1;if(null!=u.x?(a.x=(0,Gn.GM)(u.x,e),a.setStyle("x",0),h=!0):(a.x=l.x,a.setStyle("x",l.style.x)),null!=u.y?(a.y=(0,Gn.GM)(u.y,n),a.setStyle("y",0),h=!0):(a.y=l.y,a.setStyle("y",l.style.y)),u.labelLinePoints){var p=s.getTextGuideLine();p&&(p.setShape({points:u.labelLinePoints}),h=!1)}xi(a).needsUpdateLabelLine=h,a.rotation=null!=u.rotate?u.rotate*c:l.rotation;for(var d=0;d<mi.length;d++){var f=mi[d];a.setStyle(f,null!=u[f]?u[f]:l.style[f])}if(u.draggable){if(a.draggable=!0,a.cursor="move",s){var g=o.seriesModel;null!=o.dataIndex&&(g=o.seriesModel.getData(o.dataType).getItemModel(o.dataIndex)),a.on("drag",i(s,g.getModel("labelLine")))}}else a.off("drag"),a.cursor=l.cursor}},t.prototype.layout=function(t){var e=t.getWidth(),n=t.getHeight(),i=function(t){for(var e=[],n=0;n<t.length;n++){var i=t[n];if(!i.defaultAttr.ignore){var r=i.label,o=r.getComputedTransform(),a=r.getBoundingRect(),s=!o||o[1]<1e-5&&o[2]<1e-5,l=r.style.margin||0,u=a.clone();u.applyTransform(o),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=s?new Ge.OrientedBoundingRect(a,o):null;e.push({label:r,labelLine:i.labelLine,rect:u,localRect:a,obb:c,priority:i.priority,defaultAttr:i.defaultAttr,layoutOption:i.computedLayoutOption,axisAligned:s,transform:o})}}return e}(this._labelList),r=(0,o.hX)(i,(function(t){return"shiftX"===t.layoutOption.moveOverlap})),a=(0,o.hX)(i,(function(t){return"shiftY"===t.layoutOption.moveOverlap}));fi(r,"x","width",0,e,undefined),fi(a,"y","height",0,n,void 0),function(t){var e=[];t.sort((function(t,e){return e.priority-t.priority}));var n=new Ge.BoundingRect(0,0,0,0);function i(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}for(var r=0;r<t.length;r++){var o=t[r],a=o.axisAligned,s=o.localRect,l=o.transform,u=o.label,c=o.labelLine;n.copy(o.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05;for(var h=o.obb,p=!1,d=0;d<e.length;d++){var f=e[d];if(n.intersect(f.rect)){if(a&&f.axisAligned){p=!0;break}if(f.obb||(f.obb=new Ge.OrientedBoundingRect(f.localRect,f.transform)),h||(h=new Ge.OrientedBoundingRect(s,l)),h.intersect(f.obb)){p=!0;break}}}p?(i(u),c&&i(c)):(u.attr("ignore",o.defaultAttr.ignore),c&&c.attr("ignore",o.defaultAttr.labelGuideIgnore),e.push(o))}}((0,o.hX)(i,(function(t){return t.layoutOption.hideOverlap})))},t.prototype.processLabelsOverall=function(){var t=this;(0,o.S6)(this._chartViewList,(function(e){var n=e.__model,i=e.ignoreLabelLineUpdate,r=n.isAnimationEnabled();e.group.traverse((function(e){if(e.ignore)return!0;var o=!i,a=e.getTextContent();!o&&a&&(o=xi(a).needsUpdateLabelLine),o&&t._updateLabelLine(e,n),r&&t._animateLabels(e,n)}))}))},t.prototype._updateLabelLine=function(t,e){var n=t.getTextContent(),i=(0,Xe.A)(t),r=i.dataIndex;if(n&&null!=r){var a=e.getData(i.dataType),s=a.getItemModel(r),l={},u=a.getItemVisual(r,"style"),c=a.getVisual("drawType");l.stroke=u[c];var h=s.getModel("labelLine");!function(t,e,n){var i=t.getTextGuideLine(),r=t.getTextContent();if(r){for(var a=e.normal,s=a.get("show"),l=r.ignore,u=0;u<Ye.qc.length;u++){var c=Ye.qc[u],h=e[c],p="normal"===c;if(h){var d=h.get("show");if((p?l:(0,o.pD)(r.states[c]&&r.states[c].ignore,l))||!(0,o.pD)(d,s)){var f=p?i:i&&i.states.normal;f&&(f.ignore=!0);continue}i||(i=new Ge.Polyline,t.setTextGuideLine(i),p||!l&&s||pi(i,!0,"normal",e.normal),t.stateProxy&&(i.stateProxy=t.stateProxy)),pi(i,!1,c,h)}}if(i){(0,o.ce)(i.style,n),i.style.fill=null;var g=a.get("showAbove");(t.textGuideLineConfig=t.textGuideLineConfig||{}).showAbove=g||!1,i.buildPath=di}}else i&&t.removeTextGuideLine()}(t,function(t,e){e=e||"labelLine";for(var n={normal:t.getModel(e)},i=0;i<Ye.L1.length;i++){var r=Ye.L1[i];n[r]=t.getModel([r,e])}return n}(s),l),ui(t,h)}},t.prototype._animateLabels=function(t,e){var n=t.getTextContent(),i=t.getTextGuideLine();if(n&&!n.ignore&&!n.invisible&&!t.disableLabelAnimation&&!(0,Ge.isElementRemoved)(t)){var r=(f=xi(n)).oldLayout,a=(0,Xe.A)(t),s=a.dataIndex,l={x:n.x,y:n.y,rotation:n.rotation},u=e.getData(a.dataType);if(r){n.attr(r);var c=t.prevStates;c&&((0,o.cq)(c,"select")>=0&&n.attr(f.oldLayoutSelect),(0,o.cq)(c,"emphasis")>=0&&n.attr(f.oldLayoutEmphasis)),(0,Ge.updateProps)(n,l,e,s)}else if(n.attr(l),!(0,gi.qA)(n).valueAnimation){var h=(0,o.pD)(n.style.opacity,1);n.style.opacity=0,(0,Ge.initProps)(n,{style:{opacity:h}},e,s)}if(f.oldLayout=l,n.states.select){var p=f.oldLayoutSelect={};wi(p,l,Si),wi(p,n.states.select,Si)}if(n.states.emphasis){var d=f.oldLayoutEmphasis={};wi(d,l,Si),wi(d,n.states.emphasis,Si)}(0,gi.tD)(n,s,u,e)}if(i&&!i.ignore&&!i.invisible){r=(f=bi(i)).oldLayout;var f,g={points:i.shape.points};r?(i.attr({shape:r}),(0,Ge.updateProps)(i,{shape:g},e)):(i.setShape(g),i.style.strokePercent=0,(0,Ge.initProps)(i,{style:{strokePercent:1}},e)),f.oldLayout=g}},t}();function Mi(t,e,n,i,r){var a=t+e;n.isSilent(a)||i.eachComponent({mainType:"series",subType:"pie"},(function(t){for(var e=t.seriesIndex,i=r.selected,s=0;s<i.length;s++)if(i[s].seriesIndex===e){var l=t.getData(),u=(0,Jt.gO)(l,r.fromActionPayload);n.trigger(a,{type:a,seriesId:t.id,name:(0,o.kJ)(u)?l.getName(u[0]):l.getName(u),selected:(0,o.l7)({},t.option.selectedMap)})}}))}var Ci=n(400),ki=n(8199);function Ai(t,e,n){for(var i="radial"===e.type?function(t,e,n){var i=n.width,r=n.height,o=Math.min(i,r),a=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(a=a*i+n.x,s=s*r+n.y,l*=o),t.createRadialGradient(a,s,0,a,s,l)}(t,e,n):function(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;return e.global||(i=i*n.width+n.x,r=r*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),i=isNaN(i)?0:i,r=isNaN(r)?1:r,o=isNaN(o)?0:o,a=isNaN(a)?0:a,t.createLinearGradient(i,o,r,a)}(t,e,n),r=e.colorStops,o=0;o<r.length;o++)i.addColorStop(r[o].offset,r[o].color);return i}function Ii(t,e){return t&&"solid"!==t&&e>0?(e=e||1,"dashed"===t?[4*e,2*e]:"dotted"===t?[e]:(0,o.hj)(t)?[t]:(0,o.kJ)(t)?t:null):null}var Di=new Mt.Z(!0);function Pi(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function Oi(t){var e=t.fill;return null!=e&&"none"!==e}function Li(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function Ri(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function Ei(t,e,n){var i=(0,ki.Gq)(e.image,e.__image,n);if((0,ki.v5)(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"==typeof DOMMatrix){var o=new DOMMatrix;o.rotateSelf(0,0,(e.rotation||0)/Math.PI*180),o.scaleSelf(e.scaleX||1,e.scaleY||1),o.translateSelf(e.x||0,e.y||0),r.setTransform(o)}return r}}var Zi=["shadowBlur","shadowOffsetX","shadowOffsetY"],Ni=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Bi(t,e,n,i,r){var o=!1;if(!i&&e===(n=n||{}))return!1;(i||e.opacity!==n.opacity)&&(o||(Wi(t,r),o=!0),t.globalAlpha=null==e.opacity?Ci.tj.opacity:e.opacity),(i||e.blend!==n.blend)&&(o||(Wi(t,r),o=!0),t.globalCompositeOperation=e.blend||Ci.tj.blend);for(var a=0;a<Zi.length;a++){var s=Zi[a];(i||e[s]!==n[s])&&(o||(Wi(t,r),o=!0),t[s]=t.dpr*(e[s]||0))}return(i||e.shadowColor!==n.shadowColor)&&(o||(Wi(t,r),o=!0),t.shadowColor=e.shadowColor||Ci.tj.shadowColor),o}function zi(t,e,n,i,r){var o=Vi(e,r.inHover),a=i?null:n&&Vi(n,r.inHover)||{};if(o===a)return!1;var s=Bi(t,o,a,i,r);if((i||o.fill!==a.fill)&&(s||(Wi(t,r),s=!0),t.fillStyle=o.fill),(i||o.stroke!==a.stroke)&&(s||(Wi(t,r),s=!0),t.strokeStyle=o.stroke),(i||o.opacity!==a.opacity)&&(s||(Wi(t,r),s=!0),t.globalAlpha=null==o.opacity?1:o.opacity),e.hasStroke()){var l=o.lineWidth/(o.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1);t.lineWidth!==l&&(s||(Wi(t,r),s=!0),t.lineWidth=l)}for(var u=0;u<Ni.length;u++){var c=Ni[u],h=c[0];(i||o[h]!==a[h])&&(s||(Wi(t,r),s=!0),t[h]=o[h]||c[1])}return s}function Fi(t,e){var n=e.transform,i=t.dpr||1;n?t.setTransform(i*n[0],i*n[1],i*n[2],i*n[3],i*n[4],i*n[5]):t.setTransform(i,0,0,i,0,0)}function Wi(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function Vi(t,e){return e&&t.__hoverStyle||t.style}function Hi(t,e){Ui(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Ui(t,e,n,i){var r=e.transform;if(!e.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1))return e.__dirty&=~S.Z.REDARAW_BIT,void(e.__isRendered=!1);var a=e.__clipPaths,s=n.prevElClipPaths,l=!1,u=!1;if(s&&!function(t,e){if(t===e||!t&&!e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!0;return!1}(a,s)||(s&&s.length&&(Wi(t,n),t.restore(),u=l=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),a&&a.length&&(Wi(t,n),t.save(),function(t,e,n){for(var i=!1,r=0;r<t.length;r++){var o=t[r];i=i||o.isZeroArea(),Fi(e,o),e.beginPath(),o.buildPath(e,o.shape),e.clip()}n.allClipped=i}(a,t,n),l=!0),n.prevElClipPaths=a),n.allClipped)e.__isRendered=!1;else{e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var c=n.prevEl;c||(u=l=!0);var h,p,d=e instanceof lt.ZP&&e.autoBatch&&function(t){var e=Oi(t),n=Pi(t);return!(t.lineDash||!(+e^+n)||e&&"string"!=typeof t.fill||n&&"string"!=typeof t.stroke||t.strokePercent<1||t.strokeOpacity<1||t.fillOpacity<1)}(e.style);l||(h=r,p=c.transform,h&&p?h[0]!==p[0]||h[1]!==p[1]||h[2]!==p[2]||h[3]!==p[3]||h[4]!==p[4]||h[5]!==p[5]:h||p)?(Wi(t,n),Fi(t,e)):d||Wi(t,n);var f=Vi(e,n.inHover);e instanceof lt.ZP?(1!==n.lastDrawType&&(u=!0,n.lastDrawType=1),zi(t,e,c,u,n),d&&(n.batchFill||n.batchStroke)||t.beginPath(),function(t,e,n,i){var r=Pi(n),a=Oi(n),s=n.strokePercent,l=s<1,u=!e.path;e.silent&&!l||!u||e.createPathProxy();var c=e.path||Di;if(!i){var h=n.fill,p=n.stroke,d=a&&!!h.colorStops,f=r&&!!p.colorStops,g=a&&!!h.image,v=r&&!!p.image,y=void 0,m=void 0,_=void 0,x=void 0,b=void 0;(d||f)&&(b=e.getBoundingRect()),d&&(y=e.__dirty?Ai(t,h,b):e.__canvasFillGradient,e.__canvasFillGradient=y),f&&(m=e.__dirty?Ai(t,p,b):e.__canvasStrokeGradient,e.__canvasStrokeGradient=m),g&&(_=e.__dirty||!e.__canvasFillPattern?Ei(t,h,e):e.__canvasFillPattern,e.__canvasFillPattern=_),v&&(x=e.__dirty||!e.__canvasStrokePattern?Ei(t,p,e):e.__canvasStrokePattern,e.__canvasStrokePattern=_),d?t.fillStyle=y:g&&(_?t.fillStyle=_:a=!1),f?t.strokeStyle=m:v&&(x?t.strokeStyle=x:r=!1)}var w=n.lineDash&&n.lineWidth>0&&Ii(n.lineDash,n.lineWidth),S=n.lineDashOffset,T=!!t.setLineDash,M=e.getGlobalScale();if(c.setScale(M[0],M[1],e.segmentIgnoreThreshold),w){var C=n.strokeNoScale&&e.getLineScale?e.getLineScale():1;C&&1!==C&&(w=(0,o.UI)(w,(function(t){return t/C})),S/=C)}var k=!0;(u||e.__dirty<.ZP.SHAPE_CHANGED_BIT||w&&!T&&r)&&(c.setDPR(t.dpr),l?c.setContext(null):(c.setContext(t),k=!1),c.reset(),w&&!T&&(c.setLineDash(w),c.setLineDashOffset(S)),e.buildPath(c,e.shape,i),c.toStatic(),e.pathUpdated()),k&&c.rebuildPath(t,l?s:1),w&&T&&(t.setLineDash(w),t.lineDashOffset=S),i||(n.strokeFirst?(r&&Ri(t,n),a&&Li(t,n)):(a&&Li(t,n),r&&Ri(t,n))),w&&T&&t.setLineDash([])}(t,e,f,d),d&&(n.batchFill=f.fill||"",n.batchStroke=f.stroke||"")):e instanceof dt.Z?(3!==n.lastDrawType&&(u=!0,n.lastDrawType=3),zi(t,e,c,u,n),function(t,e,n){var i=n.text;if(null!=i&&(i+=""),i){t.font=n.font||ln.Uo,t.textAlign=n.textAlign,t.textBaseline=n.textBaseline;var r=void 0;if(t.setLineDash){var a=n.lineDash&&n.lineWidth>0&&Ii(n.lineDash,n.lineWidth),s=n.lineDashOffset;if(a){var l=n.strokeNoScale&&e.getLineScale?e.getLineScale():1;l&&1!==l&&(a=(0,o.UI)(a,(function(t){return t/l})),s/=l),t.setLineDash(a),t.lineDashOffset=s,r=!0}}n.strokeFirst?(Pi(n)&&t.strokeText(i,n.x,n.y),Oi(n)&&t.fillText(i,n.x,n.y)):(Oi(n)&&t.fillText(i,n.x,n.y),Pi(n)&&t.strokeText(i,n.x,n.y)),r&&t.setLineDash([])}}(t,e,f)):e instanceof it.ZP?(2!==n.lastDrawType&&(u=!0,n.lastDrawType=2),function(t,e,n,i,r){Bi(t,Vi(e,r.inHover),n&&Vi(n,r.inHover),i,r)}(t,e,c,u,n),function(t,e,n){var i=e.__image=(0,ki.Gq)(n.image,e.__image,e,e.onload);if(i&&(0,ki.v5)(i)){var r=n.x||0,o=n.y||0,a=e.getWidth(),s=e.getHeight(),l=i.width/i.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=i.width,s=i.height),n.sWidth&&n.sHeight){var u=n.sx||0,c=n.sy||0;t.drawImage(i,u,c,n.sWidth,n.sHeight,r,o,a,s)}else if(n.sx&&n.sy){var h=a-(u=n.sx),p=s-(c=n.sy);t.drawImage(i,u,c,h,p,r,o,a,s)}else t.drawImage(i,r,o,a,s)}}(t,e,f)):e instanceof kt.Z&&(4!==n.lastDrawType&&(u=!0,n.lastDrawType=4),function(t,e,n){var i=e.getDisplayables(),r=e.getTemporalDisplayables();t.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(o=e.getCursor(),a=i.length;o<a;o++)(c=i[o]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),Ui(t,c,s,o===a-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c;for(var l=0,u=r.length;l<u;l++){var c;(c=r[l]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),Ui(t,c,s,l===u-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}(t,e,n)),d&&i&&Wi(t,n),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),n.prevEl=e,e.__dirty=0,e.__isRendered=!0}}function Gi(){return!1}function Xi(t,e,n){var i=o.vL(),r=e.getWidth(),a=e.getHeight(),s=i.style;return s&&(s.position="absolute",s.left="0",s.top="0",s.width=r+"px",s.height=a+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=a*n,i}const Yi=function(t){function e(e,n,i){var r,a=t.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null,i=i||Xt.KL,"string"==typeof e?r=Xi(e,n,i):o.Kn(e)&&(e=(r=e).id),a.id=e,a.dom=r;var s=r.style;return s&&(r.onselectstart=Gi,s.webkitUserSelect="none",s.userSelect="none",s.webkitTapHighlightColor="rgba(0,0,0,0)",s["-webkit-touch-callout"]="none",s.padding="0",s.margin="0",s.borderWidth="0"),a.domBack=null,a.ctxBack=null,a.painter=n,a.config=null,a.dpr=i,a}return(0,i.ZT)(e,t),e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=Xi("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,e,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var r,o=[],a=this.maxRepaintRectCount,s=!1,l=new Gt.Z(0,0,0,0);function u(t){if(t.isFinite()&&!t.isZero())if(0===o.length)(e=new Gt.Z(0,0,0,0)).copy(t),o.push(e);else{for(var e,n=!1,i=1/0,r=0,u=0;u<o.length;++u){var c=o[u];if(c.intersect(t)){var h=new Gt.Z(0,0,0,0);h.copy(c),h.union(t),o[u]=h,n=!0;break}if(s){l.copy(t),l.union(c);var p=t.width*t.height,d=c.width*c.height;l.width*l.height-p-d<i&&(i=i,r=u)}}s&&(o[r].union(t),n=!0),n||((e=new Gt.Z(0,0,0,0)).copy(t),o.push(e)),s||(s=o.length>=a)}}for(var c=this.__startIndex;c<this.__endIndex;++c)if(d=t[c]){var h=d.shouldBePainted(n,i,!0,!0);(f=d.__isRendered&&(d.__dirty&S.Z.REDARAW_BIT||!h)?d.getPrevPaintRect():null)&&u(f);var p=h&&(d.__dirty&S.Z.REDARAW_BIT||!d.__isRendered)?d.getPaintRect():null;p&&u(p)}for(c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var d,f;h=(d=e[c]).shouldBePainted(n,i,!0,!0),!d||h&&d.__zr||!d.__isRendered||(f=d.getPrevPaintRect())&&u(f)}do{for(r=!1,c=0;c<o.length;)if(o[c].isZero())o.splice(c,1);else{for(var g=c+1;g<o.length;)o[c].intersect(o[g])?(r=!0,o[c].union(o[g]),o.splice(g,1)):g++;c++}}while(r);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(t,e){var n=this.dpr,i=this.dom,r=i.style,o=this.domBack;r&&(r.width=t+"px",r.height=e+"px"),i.width=t*n,i.height=e*n,o&&(o.width=t*n,o.height=e*n,1!==n&&this.ctxBack.scale(n,n))},e.prototype.clear=function(t,e,n){var i=this.dom,r=this.ctx,a=i.width,s=i.height;e=e||this.clearColor;var l=this.motionBlur&&!t,u=this.lastFrameAlpha,c=this.dpr,h=this;l&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,a/c,s/c));var p=this.domBack;function d(t,n,i,a){if(r.clearRect(t,n,i,a),e&&"transparent"!==e){var s=void 0;o.Qq(e)?(s=e.__canvasGradient||Ai(r,e,{x:0,y:0,width:i,height:a}),e.__canvasGradient=s):o.wo(e)&&(s=Ei(r,e,{dirty:function(){h.setUnpainted(),h.__painter.refresh()}})),r.save(),r.fillStyle=s||e,r.fillRect(t,n,i,a),r.restore()}l&&(r.save(),r.globalAlpha=u,r.drawImage(p,t,n,i,a),r.restore())}!n||l?d(0,0,a,s):n.length&&o.S6(n,(function(t){d(t.x*c,t.y*c,t.width*c,t.height*c)}))},e}(u.Z);var ji,$i=1e5,qi=314159,Ki=.01;function Ji(t){return parseInt(t,10)}ji=function(){function t(t,e,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var r=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=n=o.l7({},n||{}),this.dpr=n.devicePixelRatio||Xt.KL,this._singleCanvas=r,this.root=t;var a=t.style;a&&(a.webkitTapHighlightColor="transparent",a.webkitUserSelect="none",a.userSelect="none",a["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(r){var u=t,c=u.width,h=u.height;null!=n.width&&(c=n.width),null!=n.height&&(h=n.height),this.dpr=n.devicePixelRatio||1,u.width=c*this.dpr,u.height=h*this.dpr,this._width=c,this._height=h;var p=new Yi(u,this,this.dpr);p.__builtin__=!0,p.initContext(),l[314159]=p,p.zlevel=qi,s.push(qi),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var d=this._domRoot=function(t,e){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}(this._width,this._height);t.appendChild(d)}}return t.prototype.getType=function(){return"canvas"},t.prototype.isSingleCanvas=function(){return this._singleCanvas},t.prototype.getViewportRoot=function(){return this._domRoot},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,n,t,this._redrawId);for(var r=0;r<i.length;r++){var o=i[r],a=this._layers[o];if(!a.__builtin__&&a.refresh){var s=0===r?this._backgroundColor:null;a.refresh(s)}}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},t.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},t.prototype._paintHoverList=function(t){var e=t.length,n=this._hoverlayer;if(n&&n.clear(),e){for(var i,r={inHover:!0,viewWidth:this._width,viewHeight:this._height},o=0;o<e;o++){var a=t[o];a.__inHover&&(n||(n=this._hoverlayer=this.getLayer($i)),i||(i=n.ctx).save(),Ui(i,a,r,o===e-1))}i&&i.restore()}},t.prototype.getHoverLayer=function(){return this.getLayer($i)},t.prototype.paintOne=function(t,e){Hi(t,e)},t.prototype._paintList=function(t,e,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(t);var r=this._doPaintList(t,e,n),o=r.finished,a=r.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(t),o)this.eachLayer((function(t){t.afterBrush&&t.afterBrush()}));else{var s=this;L((function(){s._paintList(t,e,n,i)}))}}},t.prototype._compositeManually=function(){var t=this.getLayer(qi).ctx,e=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,e,n),this.eachBuiltinLayer((function(i){i.virtual&&t.drawImage(i.dom,0,0,e,n)}))},t.prototype._doPaintList=function(t,e,n){for(var i=this,a=[],s=this._opts.useDirtyRect,l=0;l<this._zlevelList.length;l++){var u=this._zlevelList[l],c=this._layers[u];c.__builtin__&&c!==this._hoverlayer&&(c.__dirty||n)&&a.push(c)}for(var h=!0,p=!1,d=function(r){var o=a[r],l=o.ctx,u=s&&o.createRepaintRects(t,e,f._width,f._height);l.save();var c,d=n?o.__startIndex:o.__drawIndex,g=!n&&o.incremental&&Date.now,v=g&&Date.now(),y=o.zlevel===f._zlevelList[0]?f._backgroundColor:null;if(o.__startIndex===o.__endIndex)o.clear(!1,y,u);else if(d===o.__startIndex){var m=t[d];m.incremental&&m.notClear&&!n||o.clear(!1,y,u)}-1===d&&(console.error("For some unknown reason. drawIndex is -1"),d=o.__startIndex);var _=function(e){var n={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(c=d;c<o.__endIndex;c++){var r=t[c];if(r.__inHover&&(p=!0),i._doPaintEl(r,o,s,e,n,c===o.__endIndex-1),g&&Date.now()-v>15)break}n.prevElClipPaths&&l.restore()};if(u)if(0===u.length)c=o.__endIndex;else for(var x=f.dpr,b=0;b<u.length;++b){var w=u[b];l.save(),l.beginPath(),l.rect(w.x*x,w.y*x,w.width*x,w.height*x),l.clip(),_(w),l.restore()}else l.save(),_(),l.restore();o.__drawIndex=c,o.__drawIndex<o.__endIndex&&(h=!1)},f=this,g=0;g<a.length;g++)d(g);return r.Z.wxa&&o.S6(this._layers,(function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()})),{finished:h,needsRefreshHover:p}},t.prototype._doPaintEl=function(t,e,n,i,r,o){var a=e.ctx;if(n){var s=t.getPaintRect();(!i||s&&s.intersect(i))&&(Ui(a,t,r,o),t.setPrevPaintRect(s))}else Ui(a,t,r,o)},t.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=qi);var n=this._layers[t];return n||((n=new Yi("zr_"+t,this,this.dpr)).zlevel=t,n.__builtin__=!0,this._layerConfig[t]?o.TS(n,this._layerConfig[t],!0):this._layerConfig[t-Ki]&&o.TS(n,this._layerConfig[t-Ki],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},t.prototype.insertLayer=function(t,e){var n=this._layers,i=this._zlevelList,r=i.length,a=this._domRoot,s=null,l=-1;if(n[t])o.H("ZLevel "+t+" has been used already");else if(function(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}(e)){if(r>0&&t>i[0]){for(l=0;l<r-1&&!(i[l]<t&&i[l+1]>t);l++);s=n[i[l]]}if(i.splice(l+1,0,t),n[t]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?a.insertBefore(e.dom,u.nextSibling):a.appendChild(e.dom)}else a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom);e.__painter=this}else o.H("Layer of zlevel "+t+" is not valid")},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var r=n[i];t.call(e,this._layers[r],r)}},t.prototype.eachBuiltinLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var r=n[i],o=this._layers[r];o.__builtin__&&t.call(e,o,r)}},t.prototype.eachOtherLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var r=n[i],o=this._layers[r];o.__builtin__||t.call(e,o,r)}},t.prototype.getLayers=function(){return this._layers},t.prototype._updateLayerStatus=function(t){function e(t){a&&(a.__endIndex!==t&&(a.__dirty=!0),a.__endIndex=t)}if(this.eachBuiltinLayer((function(t,e){t.__dirty=t.__used=!1})),this._singleCanvas)for(var n=1;n<t.length;n++)if((l=t[n]).zlevel!==t[n-1].zlevel||l.incremental){this._needsManuallyCompositing=!0;break}var i,r,a=null,s=0;for(r=0;r<t.length;r++){var l,u=(l=t[r]).zlevel,c=void 0;i!==u&&(i=u,s=0),l.incremental?((c=this.getLayer(u+.001,this._needsManuallyCompositing)).incremental=!0,s=1):c=this.getLayer(u+(s>0?Ki:0),this._needsManuallyCompositing),c.__builtin__||o.H("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==r&&(c.__dirty=!0),c.__startIndex=r,c.incremental?c.__drawIndex=-1:c.__drawIndex=r,e(r),a=c),l.__dirty&S.Z.REDARAW_BIT&&!l.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=r))}e(r),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,o.S6(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?o.TS(n[t],e,!0):n[t]=e;for(var i=0;i<this._zlevelList.length;i++){var r=this._zlevelList[i];if(r===t||r===t+Ki){var a=this._layers[r];o.TS(a,n[t],!0)}}}},t.prototype.delLayer=function(t){var e=this._layers,n=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],n.splice(o.cq(n,t),1))},t.prototype.resize=function(t,e){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts;if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width!==t||e!==this._height){for(var r in n.style.width=t+"px",n.style.height=e+"px",this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(qi).resize(t,e)}return this},t.prototype.clearLayer=function(t){var e=this._layers[t];e&&e.clear()},t.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},t.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var e=new Yi("image",this,t.pixelRatio||this.dpr),n=e.ctx;if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,r=e.dom.height,o=e.ctx;this.eachLayer((function(t){t.__builtin__?o.drawImage(t.dom,0,0,i,r):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())}))}else for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++)Ui(n,s[l],a,l===u-1);return e.dom},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t.prototype._getSize=function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var a=this.root,s=document.defaultView.getComputedStyle(a);return(a[i]||Ji(s[n])||Ji(a.style[n]))-(Ji(s[r])||0)-(Ji(s[o])||0)|0},t.prototype.pathToImage=function(t,e){e=e||this.dpr;var n=document.createElement("canvas"),i=n.getContext("2d"),r=t.getBoundingRect(),a=t.style,s=a.shadowBlur*e,l=a.shadowOffsetX*e,u=a.shadowOffsetY*e,c=t.hasStroke()?a.lineWidth:0,h=Math.max(c/2,-l+s),p=Math.max(c/2,l+s),d=Math.max(c/2,-u+s),f=Math.max(c/2,u+s),g=r.width+h+p,v=r.height+d+f;n.width=g*e,n.height=v*e,i.scale(e,e),i.clearRect(0,0,g,v),i.dpr=e;var y={x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY,rotation:t.rotation,originX:t.originX,originY:t.originY};t.x=h-r.x,t.y=d-r.y,t.rotation=0,t.scaleX=1,t.scaleY=1,t.updateTransform(),t&&Ui(i,t,{inHover:!1,viewWidth:this._width,viewHeight:this._height},!0);var m=new it.ZP({style:{x:0,y:0,image:n}});return o.l7(t,y),m},t}(),jt.canvas=ji;var Qi=n(9785),tr=n(7979),er=n(9291),nr=Math.round(9*Math.random());const ir=function(){function t(){this._id="__ec_inner_"+nr++}return t.prototype.get=function(t){return this._guard(t)[this._id]},t.prototype.set=function(t,e){var n=this._guard(t);return"function"==typeof Object.defineProperty?Object.defineProperty(n,this._id,{value:e,enumerable:!1,configurable:!0}):n[this._id]=e,this},t.prototype.delete=function(t){return!!this.has(t)&&(delete this._guard(t)[this._id],!0)},t.prototype.has=function(t){return!!this._guard(t)[this._id]},t.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},t}();var rr=n(4290),or=n(3111),ar=new ir,sr=new rr.ZP(100),lr=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","dashLineOffset","maxTileWidth","maxTileHeight"];function ur(t,e){if("none"===t)return null;var n=e.getDevicePixelRatio(),i=e.getZr(),r="svg"===i.painter.type;t.dirty&&ar.delete(t);var a=ar.get(t);if(a)return a;var s=(0,o.ce)(t,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,dashLineOffset:0,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===s.backgroundColor&&(s.backgroundColor=null);var l={repeat:"repeat"};return function(t){for(var e,a=[n],l=!0,u=0;u<lr.length;++u){var c=s[lr[u]],h=typeof c;if(null!=c&&!(0,o.kJ)(c)&&"string"!==h&&"number"!==h&&"boolean"!==h){l=!1;break}a.push(c)}if(l){e=a.join(",")+(r?"-svg":"");var p=sr.get(e);p&&(r?t.svgElement=p:t.image=p)}var d,f,g=hr(s.dashArrayX),v=function(t){if(!t||"object"==typeof t&&0===t.length)return[0,0];if("number"==typeof t){var e=Math.ceil(t);return[e,e]}var n=(0,o.UI)(t,(function(t){return Math.ceil(t)}));return t.length%2?n.concat(n):n}(s.dashArrayY),y=cr(s.symbol),m=(f=g,(0,o.UI)(f,(function(t){return pr(t)}))),_=pr(v),x=!r&&(0,o.vL)(),b=r&&i.painter.createSVGElement("g"),w=function(){for(var t=1,e=0,n=m.length;e<n;++e)t=(0,Gn.nl)(t,m[e]);var i=1;for(e=0,n=y.length;e<n;++e)i=(0,Gn.nl)(i,y[e].length);t*=i;var r=_*m.length*y.length;return{width:Math.max(1,Math.min(t,s.maxTileWidth)),height:Math.max(1,Math.min(r,s.maxTileHeight))}}();x&&(x.width=w.width*n,x.height=w.height*n,d=x.getContext("2d")),function(){d&&(d.clearRect(0,0,x.width,x.height),s.backgroundColor&&(d.fillStyle=s.backgroundColor,d.fillRect(0,0,x.width,x.height)));for(var t=0,e=0;e<v.length;++e)t+=v[e];if(!(t<=0))for(var o=-_,a=0,l=0,u=0;o<w.height;){if(a%2==0){for(var c=l/2%y.length,h=0,p=0,f=0;h<2*w.width;){var m=0;for(e=0;e<g[u].length;++e)m+=g[u][e];if(m<=0)break;if(p%2==0){var S=.5*(1-s.symbolSize),T=h+g[u][p]*S,M=o+v[a]*S,C=g[u][p]*s.symbolSize,k=v[a]*s.symbolSize,A=f/2%y[c].length;I(T,M,C,k,y[c][A])}h+=g[u][p],++f,++p===g[u].length&&(p=0)}++u===g.length&&(u=0)}o+=v[a],++l,++a===v.length&&(a=0)}function I(t,e,o,a,l){var u=r?1:n,c=(0,or.t)(l,t*u,e*u,o*u,a*u,s.color,s.symbolKeepAspect);r?b.appendChild(i.painter.paintOne(c)):Hi(d,c)}}(),l&&sr.put(e,x||b),t.image=x,t.svgElement=b,t.svgWidth=w.width,t.svgHeight=w.height}(l),l.rotation=s.rotation,l.scaleX=l.scaleY=r?1:1/n,ar.set(t,l),t.dirty=!1,l}function cr(t){if(!t||0===t.length)return[["rect"]];if("string"==typeof t)return[[t]];for(var e=!0,n=0;n<t.length;++n)if("string"!=typeof t[n]){e=!1;break}if(e)return cr([t]);var i=[];for(n=0;n<t.length;++n)"string"==typeof t[n]?i.push([t[n]]):i.push(t[n]);return i}function hr(t){if(!t||0===t.length)return[[0,0]];if("number"==typeof t)return[[r=Math.ceil(t),r]];for(var e=!0,n=0;n<t.length;++n)if("number"!=typeof t[n]){e=!1;break}if(e)return hr([t]);var i=[];for(n=0;n<t.length;++n)if("number"==typeof t[n]){var r=Math.ceil(t[n]);i.push([r,r])}else(r=(0,o.UI)(t[n],(function(t){return Math.ceil(t)}))).length%2==1?i.push(r.concat(r)):i.push(r);return i}function pr(t){for(var e=0,n=0;n<t.length;++n)e+=t[n];return t.length%2==1?2*e:e}var dr=o.hu,fr=o.S6,gr=o.mf,vr=o.Kn,yr="5.0.0",mr={zrender:"5.0.1"},_r=2e3,xr=4500,br={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:_r,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:xr,ARIA:6e3,DECAL:7e3}},wr=/^[a-zA-Z0-9_]+$/,Sr="__connectUpdateStatus";function Tr(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(!this.isDisposed())return Cr(this,t,e);Qr(this.id)}}function Mr(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Cr(this,t,e)}}function Cr(t,e,n){return n[0]=n[0]&&n[0].toLowerCase(),u.Z.prototype[e].apply(t,n)}var kr,Ar,Ir,Dr,Pr,Or,Lr,Rr,Er,Zr,Nr,Br,zr,Fr,Wr,Vr,Hr,Ur,Gr,Xr,Yr,jr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e}(u.Z),$r=jr.prototype;$r.on=Mr("on"),$r.off=Mr("off");var qr=function(t){function e(e,i,r){var a=t.call(this,new Hn)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],r=r||{},"string"==typeof i&&(i=so[i]),a._dom=e,"undefined"==typeof window?n.g:window;var s=a._zr=Kt(e,{renderer:r.renderer||"canvas",devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,useDirtyRect:null!=r.useDirtyRect&&r.useDirtyRect});a._throttledZrFlush=(0,je.P2)(o.ak(s.flush,s),17),(i=o.d9(i))&&Fe(i,!0),a._theme=i,a._locale=(0,tr.D0)(r.locale||tr.sO),a._coordSysMgr=new ye.Z;var l=a._api=Hr(a);function u(t,e){return t.__prio-e.__prio}return A(ao,u),A(no,u),a._scheduler=new kn(a,l,no,ao),a._messageCenter=new jr,a._labelManager=new Ti,a._initEvents(),a.resize=o.ak(a.resize,a),s.animation.on("frame",a._onframe,a),Zr(s,a),Nr(s,a),o.s7(a),a}return(0,i.ZT)(e,t),e.prototype._onframe=function(){if(!this._disposed){Yr(this);var t=this._scheduler;if(this.__optionUpdated){var e=this.__optionUpdated.silent;this.__flagInMainProcess=!0,kr(this),Dr.update.call(this),this._zr.flush(),this.__flagInMainProcess=!1,this.__optionUpdated=!1,Rr.call(this,e),Er.call(this,e)}else if(t.unfinished){var n=1,i=this._model,r=this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),Or(this,i),t.performVisualTasks(i),Wr(this,this._model,r,"remain"),n-=+new Date-o}while(n>0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.setOption=function(t,e,n){if(this._disposed)Qr(this.id);else{var i,r,o;if(vr(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,o=e.transition,e=e.notMerge),this.__flagInMainProcess=!0,!this._model||e){var a=new be(this._api),s=this._theme,l=this._model=new fe;l.scheduler=this._scheduler,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:r},io),Gr(this,o),n?(this.__optionUpdated={silent:i},this.__flagInMainProcess=!1,this.getZr().wakeUp()):(kr(this),Dr.update.call(this),this._zr.flush(),this.__optionUpdated=!1,this.__flagInMainProcess=!1,Rr.call(this,i),Er.call(this,i))}},e.prototype.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){if(r.Z.canvasSupported)return(t=o.l7({},t||{})).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},e.prototype.getSvgDataURL=function(){if(r.Z.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return o.S6(e,(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;fr(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return fr(i,(function(t){t.group.ignore=!1})),o}Qr(this.id)},e.prototype.getConnectedDataURL=function(t){if(this._disposed)Qr(this.id);else if(r.Z.canvasSupported){var e="svg"===t.type,n=this.group,i=Math.min,a=Math.max,s=1/0;if(co[n]){var l=s,u=s,c=-1/0,h=-1/0,p=[],d=t&&t.pixelRatio||1;o.S6(uo,(function(r,s){if(r.group===n){var d=e?r.getZr().painter.getSvgDom().innerHTML:r.getRenderedCanvas(o.d9(t)),f=r.getDom().getBoundingClientRect();l=i(f.left,l),u=i(f.top,u),c=a(f.right,c),h=a(f.bottom,h),p.push({dom:d,left:f.left,top:f.top})}}));var f=(c*=d)-(l*=d),g=(h*=d)-(u*=d),v=o.vL(),y=Kt(v,{renderer:e?"svg":"canvas"});if(y.resize({width:f,height:g}),e){var m="";return fr(p,(function(t){var e=t.left-l,n=t.top-u;m+='<g transform="translate('+e+","+n+')">'+t.dom+"</g>"})),y.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}return t.connectedBackgroundColor&&y.add(new Ge.Rect({shape:{x:0,y:0,width:f,height:g},style:{fill:t.connectedBackgroundColor}})),fr(p,(function(t){var e=new Ge.Image({style:{x:t.left*d-l,y:t.top*d-u,image:t.dom}});y.add(e)})),y.refreshImmediately(),v.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},e.prototype.convertToPixel=function(t,e){return Pr(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return Pr(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){if(!this._disposed){var n,i=this._model,r=Jt.pm(i,t);return o.S6(r,(function(t,i){i.indexOf("Models")>=0&&o.S6(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}}),this)}),this),!!n}Qr(this.id)},e.prototype.getVisual=function(t,e){var n=this._model,i=Jt.pm(n,t,{defaultMainType:"series"}),r=i.seriesModel.getData(),o=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?r.indexOfRawIndex(i.dataIndex):null;return null!=o?function(t,e,n){switch(n){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,n)}}(r,o,e):function(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e)}}(r,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t,e,n,i=this;fr(Jr,(function(t){var e=function(e){var n,r=i.getModel(),a=e.target;if("globalout"===t?n={}:a&&(0,er.o)(a,(function(t){var e=(0,Xe.A)(t);if(e&&null!=e.dataIndex){var i=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return n=i&&i.getDataParams(e.dataIndex,e.dataType)||{},!0}if(e.eventData)return n=o.l7({},e.eventData),!0}),!0),n){var s=n.componentType,l=n.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=n.seriesIndex);var u=s&&null!=l&&r.getComponent(s,l),c=u&&i["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];n.event=e,n.type=t,i._$eventProcessor.eventInfo={targetEl:a,packedEvent:n,model:u,view:c},i.trigger(t,n)}};e.zrEventfulCallAtLast=!0,i._zr.on(t,e,i)})),fr(eo,(function(t,e){i._messageCenter.on(e,(function(t){this.trigger(e,t)}),i)})),fr(["selectchanged"],(function(t){i._messageCenter.on(t,(function(e){this.trigger(t,e)}),i)})),t=this._messageCenter,e=this,n=this._model,t.on("selectchanged",(function(t){t.isFromClick?(Mi("map","selectchanged",e,n,t),Mi("pie","selectchanged",e,n,t)):"select"===t.fromAction?(Mi("map","selected",e,n,t),Mi("pie","selected",e,n,t)):"unselect"===t.fromAction&&(Mi("map","unselected",e,n,t),Mi("pie","unselected",e,n,t))}))},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?Qr(this.id):this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)Qr(this.id);else{this._disposed=!0,Jt.P$(this.getDom(),fo,"");var t=this._api,e=this._model;fr(this._componentsViews,(function(n){n.dispose(e,t)})),fr(this._chartsViews,(function(n){n.dispose(e,t)})),this._zr.dispose(),delete uo[this.id]}},e.prototype.resize=function(t){if(this._disposed)Qr(this.id);else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this.__flagInMainProcess=!0,n&&kr(this),Dr.update.call(this,{type:"resize",animation:{duration:0}}),this.__flagInMainProcess=!1,Rr.call(this,i),Er.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed)Qr(this.id);else if(vr(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),lo[t]){var n=lo[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed?Qr(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=o.l7({},t);return e.type=eo[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)Qr(this.id);else if(vr(e)||(e={silent:!!e}),to[t.type]&&this._model)if(this.__flagInMainProcess)this._pendingActions.push(t);else{var n=e.silent;Lr.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&r.Z.browser.weChat&&this._throttledZrFlush(),Rr.call(this,n),Er.call(this,n)}},e.prototype.updateLabelLayout=function(){var t=this._labelManager;t.updateLayoutConfig(this._api),t.layout(this._api),t.processLabelsOverall()},e.prototype.appendData=function(t){if(this._disposed)Qr(this.id);else{var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){for(var e=[],n=t.currentStates,i=0;i<n.length;i++){var r=n[i];"emphasis"!==r&&"blur"!==r&&"select"!==r&&e.push(r)}t.selected&&t.states.select&&e.push("select"),t.hoverState===Ye.wU&&t.states.emphasis?e.push("emphasis"):t.hoverState===Ye.CX&&t.states.blur&&e.push("blur"),t.useStates(e)}function e(t,e){if(!t.preventAutoZ){var n=t.get("z"),i=t.get("zlevel");e.group.traverse((function(t){if(!t.isGroup){null!=n&&(t.z=n),null!=i&&(t.zlevel=i);var e=t.getTextContent(),r=t.getTextGuideLine();if(e&&(e.z=t.z,e.zlevel=t.zlevel,e.z2=t.z2+2),r){var o=t.textGuideLineConfig&&t.textGuideLineConfig.showAbove;r.z=t.z,r.zlevel=t.zlevel,r.z2=t.z2+(o?1:-1)}}}))}}function n(t,e){e.group.traverse((function(t){if(!Ge.isElementRemoved(t)){var e=t.getTextContent(),n=t.getTextGuideLine();t.stateTransition&&(t.stateTransition=null),e&&e.stateTransition&&(e.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),t.hasState()?(t.prevStates=t.currentStates,t.clearStates()):t.prevStates&&(t.prevStates=null)}}))}function a(e,n){var i=e.getModel("stateAnimation"),r=e.isAnimationEnabled(),o=i.get("duration"),a=o>0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.group.traverse((function(e){if(e.states&&e.states.emphasis){if(Ge.isElementRemoved(e))return;if(e instanceof Ge.Path&&(0,Ye.e9)(e),e.__dirty){var n=e.prevStates;n&&e.useStates(n)}if(r){e.stateTransition=a;var i=e.getTextContent(),o=e.getTextGuideLine();i&&(i.stateTransition=a),o&&(o.stateTransition=a)}e.__dirty&&t(e)}}))}kr=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),Ar(t,!0),Ar(t,!1),e.plan()},Ar=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;l<r.length;l++)r[l].__alive=!1;function u(t){var l=t.__requireNewView;t.__requireNewView=!1;var u="_ec_"+t.id+"_"+t.type,c=!l&&o[u];if(!c){var h=(0,Vn.u9)(t.type);(c=new(e?He.Z.getClass(h.main,h.sub):Ue.Z.getClass(h.sub))).init(n,s),o[u]=c,r.push(c),a.add(c.group)}t.__viewId=c.__id=u,c.__alive=!0,c.__model=t,c.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!e&&i.prepareView(c,t,n,s)}for(e?n.eachComponent((function(t,e){"series"!==t&&u(e)})):n.eachSeries(u),l=0;l<r.length;){var c=r[l];c.__alive?l++:(!e&&c.renderTask.dispose(),a.remove(c.group),c.dispose(n,s),r.splice(l,1),o[c.__id]===c&&delete o[c.__id],c.__id=c.group.__ecComponentInfo=null)}},Ir=function(t,e,n,i,r){var a=t._model;if(a.setUpdatePayload(n),i){var s={};s[i+"Id"]=n[i+"Id"],s[i+"Index"]=n[i+"Index"],s[i+"Name"]=n[i+"Name"];var l={mainType:i,query:s};r&&(l.subType=r);var u,c=n.excludeSeriesId;null!=c&&(u=o.kW(),fr(Jt.kF(c),(function(t){var e=Jt.U5(t,null);null!=e&&u.set(e,!0)}))),a&&a.eachComponent(l,(function(e){u&&null!=u.get(e.id)||((0,Ye.xp)(n)&&!n.notBlur?e instanceof Ve.Z&&(0,Ye.nV)(e,n,t._api):(0,Ye.aG)(n)&&e instanceof Ve.Z&&((0,Ye.og)(e,n,t._api),(0,Ye.ci)(e),Xr(t)),h(t["series"===i?"_chartsMap":"_componentsMap"][e.__viewId]))}),t)}else fr([].concat(t._componentsViews).concat(t._chartsViews),h);function h(i){i&&i.__alive&&i[e]&&i[e](i.__model,a,t._api,n)}},Dr={prepareAndUpdate:function(t){kr(this),Dr.update.call(this,t)},update:function(t){var e=this._model,n=this._api,i=this._zr,o=this._coordSysMgr,a=this._scheduler;if(e){e.setUpdatePayload(t),a.restoreData(e,t),a.performSeriesTasks(e),o.create(e,n),a.performDataProcessorTasks(e,t),Or(this,e),o.update(e,n),Br(e),a.performVisualTasks(e,t),zr(this,e,n,t);var s=e.get("backgroundColor")||"transparent",l=e.get("darkMode");if(r.Z.canvasSupported)i.setBackgroundColor(s),null!=l&&"auto"!==l&&i.setDarkMode(l);else{var u=tt.Qc(s);s=tt.Pz(u,"rgb"),0===u[3]&&(s="transparent")}Vr(e,n)}},updateTransform:function(t){var e=this,n=this._model,i=this._api;if(n){n.setUpdatePayload(t);var r=[];n.eachComponent((function(o,a){if("series"!==o){var s=e.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,n,i,t);l&&l.update&&r.push(s)}else r.push(s)}}));var a=o.kW();n.eachSeries((function(r){var o=e._chartsMap[r.__viewId];if(o.updateTransform){var s=o.updateTransform(r,n,i,t);s&&s.update&&a.set(r.uid,1)}else a.set(r.uid,1)})),Br(n),this._scheduler.performVisualTasks(n,t,{setDirty:!0,dirtyMap:a}),Wr(this,n,i,t,a),Vr(n,this._api)}},updateView:function(t){var e=this._model;e&&(e.setUpdatePayload(t),Ue.Z.markUpdateMethod(t,"updateView"),Br(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),zr(this,this._model,this._api,t),Vr(e,this._api))},updateVisual:function(t){var e=this,n=this._model;n&&(n.setUpdatePayload(t),n.eachSeries((function(t){t.getData().clearAllVisual()})),Ue.Z.markUpdateMethod(t,"updateVisual"),Br(n),this._scheduler.performVisualTasks(n,t,{visualType:"visual",setDirty:!0}),n.eachComponent((function(i,r){if("series"!==i){var o=e.getViewOfComponentModel(r);o&&o.__alive&&o.updateVisual(r,n,e._api,t)}})),n.eachSeries((function(i){e._chartsMap[i.__viewId].updateVisual(i,n,e._api,t)})),Vr(n,this._api))},updateLayout:function(t){Dr.update.call(this,t)}},Pr=function(t,e,n,i){if(t._disposed)Qr(t.id);else for(var r,o=t._model,a=t._coordSysMgr.getCoordinateSystems(),s=Jt.pm(o,n),l=0;l<a.length;l++){var u=a[l];if(u[e]&&null!=(r=u[e](o,s,i)))return r}},Or=function(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries((function(t){i.updateStreamModes(t,n[t.__viewId])}))},Lr=function(t,e){var n=this,i=this.getModel(),r=t.type,a=t.escapeConnect,s=to[r],l=s.actionInfo,u=(l.update||"update").split(":"),c=u.pop(),h=null!=u[0]&&(0,Vn.u9)(u[0]);this.__flagInMainProcess=!0;var p=[t],d=!1;t.batch&&(d=!0,p=o.UI(t.batch,(function(e){return(e=o.ce(o.l7({},e),t)).batch=null,e})));var f,g=[],v=(0,Ye.aG)(t),y=(0,Ye.xp)(t)||v;if(fr(p,(function(t){(f=(f=s.action(t,n._model,n._api))||o.l7({},t)).type=l.event||f.type,g.push(f),y?(Ir(n,c,t,"series"),Xr(n)):h&&Ir(n,c,t,h.main,h.sub)})),"none"===c||y||h||(this.__optionUpdated?(kr(this),Dr.update.call(this,t),this.__optionUpdated=!1):Dr[c].call(this,t)),f=d?{type:l.event||r,escapeConnect:a,batch:g}:g[0],this.__flagInMainProcess=!1,!e){var m=this._messageCenter;if(m.trigger(f.type,f),v){var _={type:"selectchanged",escapeConnect:a,selected:(0,Ye.C5)(i),isFromClick:t.isFromClick||!1,fromAction:t.type,fromActionPayload:t};m.trigger(_.type,_)}}},Rr=function(t){for(var e=this._pendingActions;e.length;){var n=e.shift();Lr.call(this,n,t)}},Er=function(t){!t&&this.trigger("updated")},Zr=function(t,e){t.on("rendered",(function(n){e.trigger("rendered",n),!t.animation.isFinished()||e.__optionUpdated||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")}))},Nr=function(t,e){t.on("mouseover",(function(t){var n=t.target,i=(0,er.o)(n,Ye.Av);if(i){var r=(0,Xe.A)(i);(0,Ye._V)(r.seriesIndex,r.focus,r.blurScope,e._api,!0),(0,Ye.Pc)(i,t),Xr(e)}})).on("mouseout",(function(t){var n=t.target,i=(0,er.o)(n,Ye.Av);if(i){var r=(0,Xe.A)(i);(0,Ye._V)(r.seriesIndex,r.focus,r.blurScope,e._api,!1),(0,Ye.i1)(i,t),Xr(e)}})).on("click",(function(t){var n=t.target,i=(0,er.o)(n,(function(t){return null!=(0,Xe.A)(t).dataIndex}),!0);if(i){var r=i.selected?"unselect":"select",o=(0,Xe.A)(i);e._api.dispatchAction({type:r,dataType:o.dataType,dataIndexInside:o.dataIndex,seriesIndex:o.seriesIndex,isFromClick:!0})}}))},Br=function(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))},zr=function(t,e,n,i){Fr(t,e,n,i),fr(t._chartsViews,(function(t){t.__alive=!1})),Wr(t,e,n,i),fr(t._chartsViews,(function(t){t.__alive||t.remove(e,n)}))},Fr=function(t,i,r,o,s){fr(s||t._componentsViews,(function(t){var s=t.__model;n(0,t),t.render(s,i,r,o),e(s,t),a(s,t)}))},Wr=function(t,i,o,s,l){var u=t._scheduler,c=t._labelManager;c.clearLabels();var h=!1;i.eachSeries((function(e){var i=t._chartsMap[e.__viewId];i.__alive=!0;var r=i.renderTask;u.updatePayload(r,s),n(0,i),l&&l.get(e.uid)&&r.dirty(),r.perform(u.getPerformArgs(r))&&(h=!0),e.__transientTransitionOpt=null,i.group.silent=!!e.get("silent"),function(t,e){var n=t.get("blendMode")||null;e.group.traverse((function(t){t.isGroup||(t.style.blend=n),t.eachPendingDisplayable&&t.eachPendingDisplayable((function(t){t.style.blend=n}))}))}(e,i),(0,Ye.ci)(e),c.addLabelsOfSeries(i)})),u.unfinished=h||u.unfinished,c.updateLayoutConfig(o),c.layout(o),c.processLabelsOverall(),i.eachSeries((function(n){var i=t._chartsMap[n.__viewId];e(n,i),a(n,i)})),function(t,e){var n=t._zr.storage,i=0;n.traverse((function(t){t.isGroup||i++})),i>e.get("hoverLayerThreshold")&&!r.Z.node&&!r.Z.worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.group.traverse((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,i)},Vr=function(t,e){fr(oo,(function(n){n(t,e)}))},Xr=function(t){t.__needsUpdateStatus=!0,t.getZr().wakeUp()},Yr=function(e){e.__needsUpdateStatus&&(e.getZr().storage.traverse((function(e){Ge.isElementRemoved(e)||t(e)})),e.__needsUpdateStatus=!1)},Hr=function(t){return new(function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return(0,i.ZT)(n,e),n.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},n.prototype.enterEmphasis=function(e,n){(0,Ye.fD)(e,n),Xr(t)},n.prototype.leaveEmphasis=function(e,n){(0,Ye.Mh)(e,n),Xr(t)},n.prototype.enterBlur=function(e){(0,Ye.SX)(e),Xr(t)},n.prototype.leaveBlur=function(e){(0,Ye.VP)(e),Xr(t)},n.prototype.enterSelect=function(e){(0,Ye.XX)(e),Xr(t)},n.prototype.leaveSelect=function(e){(0,Ye.SJ)(e),Xr(t)},n.prototype.getModel=function(){return t.getModel()},n.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},n.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},n}(ve))(t)},Ur=function(t){function e(t,e){for(var n=0;n<t.length;n++)t[n][Sr]=e}fr(eo,(function(n,i){t._messageCenter.on(i,(function(n){if(co[t.group]&&0!==t[Sr]){if(n&&n.escapeConnect)return;var i=t.makeActionFromEvent(n),r=[];fr(uo,(function(e){e!==t&&e.group===t.group&&r.push(e)})),e(r,0),fr(r,(function(t){1!==t[Sr]&&t.dispatchAction(i)})),e(r,2)}}))}))},Gr=function(t,e){var n=t._model;o.S6(Jt.kF(e),(function(t){var e,i=t.from,r=t.to;null==r&&(0,me._y)(e);var o={includeMainTypes:["series"],enableAll:!1,enableNone:!1},a=i?Jt.pm(n,i,o):null,s=Jt.pm(n,r,o).seriesModel;null==s&&(e=""),a&&a.seriesModel!==s&&(e=""),null!=e&&(0,me._y)(e),s.__transientTransitionOpt={from:i?i.dimension:null,to:r.dimension,dividingMethod:t.dividingMethod}}))}}(),e}(u.Z),Kr=qr.prototype;Kr.on=Tr("on"),Kr.off=Tr("off"),Kr.one=function(t,e,n){var i=this;(0,me.Sh)("ECharts#one is deprecated."),this.on.call(this,t,(function n(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];e&&e.apply&&e.apply(this,r),i.off(t,n)}),n)};var Jr=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Qr(t){}var to={},eo={},no=[],io=[],ro=[],oo=[],ao=[],so={},lo={},uo={},co={},ho=+new Date-0,po=+new Date-0,fo="_echarts_instance_";function go(t,e,n){var i=xo(t);if(i)return i;var r=new qr(t,e,n);return r.id="ec_"+ho++,uo[r.id]=r,Jt.P$(t,fo,r.id),Ur(r),fr(ro,(function(t){t(r)})),r}function vo(t){if(o.kJ(t)){var e=t;t=null,fr(e,(function(e){null!=e.group&&(t=e.group)})),t=t||"g_"+po++,fr(e,(function(e){e.group=t}))}return co[t]=!0,t}function yo(t){co[t]=!1}var mo=yo;function _o(t){"string"==typeof t?t=uo[t]:t instanceof qr||(t=xo(t)),t instanceof qr&&!t.isDisposed()&&t.dispose()}function xo(t){return uo[Jt.IL(t,fo)]}function bo(t){return uo[t]}function wo(t,e){so[t]=e}function So(t){io.push(t)}function To(t,e){Oo(no,t,e,2e3)}function Mo(t){t&&ro.push(t)}function Co(t){t&&oo.push(t)}function ko(t,e,n){"function"==typeof e&&(n=e,e="");var i=vr(t)?t.type:[t,t={event:e}][0];t.event=(t.event||i).toLowerCase(),e=t.event,dr(wr.test(i)&&wr.test(e)),to[i]||(to[i]={action:n,actionInfo:t}),eo[e]=i}function Ao(t,e){ye.Z.register(t,e)}function Io(t){var e=ye.Z.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()}function Do(t,e){Oo(ao,t,e,1e3,"layout")}function Po(t,e){Oo(ao,t,e,3e3,"visual")}function Oo(t,e,n,i,r){(gr(e)||vr(e))&&(n=e,e=i);var o=kn.wrapStageHandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}function Lo(t,e){lo[t]=e}function Ro(t){return te.Z.extend(t)}function Eo(t){return He.Z.extend(t)}function Zo(t){return Ve.Z.extend(t)}function No(t){return Ue.Z.extend(t)}function Bo(t){o.v9("createCanvas",t)}function zo(t,e,n){!function(t,e,n){var i;if((0,o.kJ)(e))i=e;else if(e.svg)i=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}];else{var r=e.geoJson||e.geoJSON;r&&!e.features&&(n=e.specialAreas,e=r),i=[{type:"geoJSON",source:e,specialAreas:n}]}(0,o.S6)(i,(function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,Wn[e])(t)})),Fn.set(t,i)}(t,e,n)}function Fo(t){var e=function(t){return Fn.get(t)}(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}}var Wo=Qi.DA;Po(_r,rn),Po(xr,an),Po(xr,sn),Po(_r,Un),Po(xr,{createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(t.hasSymbolVisual&&!e.isSeriesFiltered(t))return{dataEach:t.getData().hasItemOption?function(t,e){var n=t.getItemModel(e),i=n.getShallow("symbol",!0),r=n.getShallow("symbolSize",!0),o=n.getShallow("symbolRotate",!0),a=n.getShallow("symbolKeepAspect",!0);null!=i&&t.setItemVisual(e,"symbol",i),null!=r&&t.setItemVisual(e,"symbolSize",r),null!=o&&t.setItemVisual(e,"symbolRotate",o),null!=a&&t.setItemVisual(e,"symbolKeepAspect",a)}:null}}}),Po(7e3,(function(t,e){t.eachRawSeries((function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each((function(t){var n=i.getItemVisual(t,"decal");n&&(i.ensureUniqueItemVisual(t,"style").decal=ur(n,e))}));var r=i.getVisual("decal");r&&(i.getVisual("style").decal=ur(r,e))}}))})),So(Fe),To(900,(function(t){var e=(0,o.kW)();t.eachSeries((function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}})),e.each(We)})),Lo("default",(function(t,e){e=e||{},o.ce(e,{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Ge.Group,i=new Ge.Rect({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r,a=e.fontSize+" sans-serif",s=new Ge.Rect({style:{fill:"none"},textContent:new Ge.Text({style:{text:e.text,fill:e.textColor,font:a}}),textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(s),e.showSpinner&&((r=new Ge.Arc({shape:{startAngle:-un/2,endAngle:-un/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*un/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*un/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=ln.dz(e.text,a),o=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*o-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner?0:n/2),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),s.setShape({x:l-o,y:u-o,width:2*o,height:2*o}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n})),ko({type:Ye.Ki,event:Ye.Ki,update:Ye.Ki},o.ZT),ko({type:Ye.yx,event:Ye.yx,update:Ye.yx},o.ZT),ko({type:Ye.Hg,event:Ye.Hg,update:Ye.Hg},o.ZT),ko({type:Ye.JQ,event:Ye.JQ,update:Ye.JQ},o.ZT),ko({type:Ye.iK,event:Ye.iK,update:Ye.iK},o.ZT),wo("light",In),wo("dark",En);var Vo={}},5628:(t,e,n)=>{"use strict";n.d(e,{ni:()=>h,k3:()=>p,Lr:()=>d,qT:()=>_,qA:()=>x,pe:()=>b,tD:()=>w});var i=n(4239),r=n(8778),o=n(106),a=(n(3264),n(5495)),s=n(3696),l={};function u(t,e){for(var n=0;n<o.L1.length;n++){var i=o.L1[n],r=e[i],a=t.ensureState(i);a.style=a.style||{},a.style.text=r}var s=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(s,!0)}function c(t,e,n){var i,a=t.labelFetcher,s=t.labelDataIndex,l=t.labelDimIndex,u=e.normal;a&&(i=a.getFormattedLabel(s,"normal",null,l,u&&u.get("formatter"),null!=n?{value:n}:null)),null==i&&(i=(0,r.mf)(t.defaultText)?t.defaultText(s,t,n):t.defaultText);for(var c={normal:i},h=0;h<o.L1.length;h++){var p=o.L1[h],d=e[p];c[p]=(0,r.pD)(a?a.getFormattedLabel(s,p,null,l,d&&d.get("formatter")):null,i)}return c}function h(t,e,n,a){n=n||l;for(var s=t instanceof i.ZP,h=!1,p=0;p<o.qc.length;p++)if((b=e[o.qc[p]])&&b.getShallow("show")){h=!0;break}var g=s?t:t.getTextContent();if(h){s||(g||(g=new i.ZP,t.setTextContent(g)),t.stateProxy&&(g.stateProxy=t.stateProxy));var v=c(n,e),y=e.normal,m=!!y.getShallow("show"),_=d(y,a&&a.normal,n,!1,!s);for(_.text=v.normal,s||t.setTextConfig(f(y,n,!1)),p=0;p<o.L1.length;p++){var b,w=o.L1[p];if(b=e[w]){var S=g.ensureState(w),T=!!(0,r.pD)(b.getShallow("show"),m);T!==m&&(S.ignore=!T),S.style=d(b,a&&a[w],n,!0,!s),S.style.text=v[w],s||(t.ensureState(w).textConfig=f(b,n,!0))}}g.silent=!!y.getShallow("silent"),null!=g.style.x&&(_.x=g.style.x),null!=g.style.y&&(_.y=g.style.y),g.ignore=!m,g.useStyle(_),g.dirty(),n.enableTextSetter&&(x(g).setLabelText=function(t){var i=c(n,e,t);u(g,i)})}else g&&(g.ignore=!0);t.dirty()}function p(t,e){e=e||"label";for(var n={normal:t.getModel(e)},i=0;i<o.L1.length;i++){var r=o.L1[i];n[r]=t.getModel([r,e])}return n}function d(t,e,n,i,o){var a={};return function(t,e,n,i,o){n=n||l;var a,s=e.ecModel,u=s&&s.option.textStyle,c=function(t){for(var e;t&&t!==t.ecModel;){var n=(t.option||l).rich;if(n){e=e||{};for(var i=(0,r.XP)(n),o=0;o<i.length;o++)e[i[o]]=1}t=t.parentModel}return e}(e);if(c)for(var h in a={},c)if(c.hasOwnProperty(h)){var p=e.getModel(["rich",h]);m(a[h]={},p,u,n,i,o,!1,!0)}a&&(t.rich=a);var d=e.get("overflow");d&&(t.overflow=d);var f=e.get("minMargin");null!=f&&(t.margin=f),m(t,e,u,n,i,o,!0,!1)}(a,t,n,i,o),e&&(0,r.l7)(a,e),a}function f(t,e,n){e=e||{};var i,o={},a=t.getShallow("rotate"),s=(0,r.pD)(t.getShallow("distance"),n?null:5),l=t.getShallow("offset");return"outside"===(i=t.getShallow("position")||(n?null:"inside"))&&(i=e.defaultOutsidePosition||"top"),null!=i&&(o.position=i),null!=l&&(o.offset=l),null!=a&&(a*=Math.PI/180,o.rotation=a),null!=s&&(o.distance=s),o.outsideFill="inherit"===t.get("color")?e.inheritColor||null:"auto",o}var g=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],v=["align","lineHeight","width","height","tag","verticalAlign"],y=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function m(t,e,n,i,o,a,s,u){n=!o&&n||l;var c=i&&i.inheritColor,h=e.getShallow("color"),p=e.getShallow("textBorderColor"),d=(0,r.pD)(e.getShallow("opacity"),n.opacity);"inherit"!==h&&"auto"!==h||(h=c||null),"inherit"!==p&&"auto"!==p||(p=c||null),a||(h=h||n.color,p=p||n.textBorderColor),null!=h&&(t.fill=h),null!=p&&(t.stroke=p);var f=(0,r.pD)(e.getShallow("textBorderWidth"),n.textBorderWidth);null!=f&&(t.lineWidth=f);var m=(0,r.pD)(e.getShallow("textBorderType"),n.textBorderType);null!=m&&(t.lineDash=m);var _=(0,r.pD)(e.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=_&&(t.lineDashOffset=_),o||null!=d||u||(d=i&&i.defaultOpacity),null!=d&&(t.opacity=d),o||a||null==t.fill&&i.inheritColor&&(t.fill=i.inheritColor);for(var x=0;x<g.length;x++){var b=g[x];null!=(S=(0,r.pD)(e.getShallow(b),n[b]))&&(t[b]=S)}for(x=0;x<v.length;x++)b=v[x],null!=(S=e.getShallow(b))&&(t[b]=S);if(null==t.verticalAlign){var w=e.getShallow("baseline");null!=w&&(t.verticalAlign=w)}if(!s||!i.disableBox){for(x=0;x<y.length;x++){var S;b=y[x],null!=(S=e.getShallow(b))&&(t[b]=S)}var T=e.getShallow("borderType");null!=T&&(t.borderDash=T),"auto"!==t.backgroundColor&&"inherit"!==t.backgroundColor||!c||(t.backgroundColor=c),"auto"!==t.borderColor&&"inherit"!==t.borderColor||!c||(t.borderColor=c)}}function _(t,e){var n=e&&e.getModel("textStyle");return(0,r.fy)([t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}var x=(0,a.Yf)();function b(t,e,n,i){if(t){var r=x(t);r.prevValue=r.value,r.value=n;var o=e.normal;r.valueAnimation=o.get("valueAnimation"),r.valueAnimation&&(r.precision=o.get("precision"),r.defaultInterpolatedText=i,r.statesModels=e)}}function w(t,e,n,i){var r=x(t);if(r.valueAnimation){var o=r.defaultInterpolatedText,l=r.prevValue,h=r.value;(null==l?s.initProps:s.updateProps)(t,{},i,e,null,(function(i){var s=(0,a.pk)(n,r.precision,l,h,i),p=c({labelDataIndex:e,defaultText:o?o(s):s+""},r.statesModels,s);u(t,p)}))}}},3442:(t,e,n)=>{"use strict";n.d(e,{Ge:()=>c,My:()=>h,G_:()=>p,bK:()=>d,kY:()=>f});var i=n(8778),r=n(9199),o=n(816),a=n(760),s="undefined"!=typeof Float32Array?Float32Array:Array;function l(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function u(t){return t.dim+t.index}function c(t,e){var n=[];return e.eachSeriesByType(t,(function(t){g(t)&&!v(t)&&n.push(t)})),n}function h(t){var e=function(t){var e={};i.S6(t,(function(t){var n=t.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var i=t.getData(),r=n.dim+"_"+n.index,o=i.mapDimension(n.dim),a=0,s=i.count();a<s;++a){var l=i.get(o,a);e[r]?e[r].push(l):e[r]=[l]}}));var n={};for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];if(o){o.sort((function(t,e){return t-e}));for(var a=null,s=1;s<o.length;++s){var l=o[s]-o[s-1];l>0&&(a=null===a?l:Math.min(a,l))}n[r]=a}}return n}(t),n=[];return i.S6(t,(function(t){var i,o=t.coordinateSystem.getBaseAxis(),a=o.getExtent();if("category"===o.type)i=o.getBandWidth();else if("value"===o.type||"time"===o.type){var s=o.dim+"_"+o.index,c=e[s],h=Math.abs(a[1]-a[0]),p=o.scale.getExtent(),d=Math.abs(p[1]-p[0]);i=c?h/d*c:h}else{var f=t.getData();i=Math.abs(a[1]-a[0])/f.count()}var g=(0,r.GM)(t.get("barWidth"),i),v=(0,r.GM)(t.get("barMaxWidth"),i),y=(0,r.GM)(t.get("barMinWidth")||1,i),m=t.get("barGap"),_=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:g,barMaxWidth:v,barMinWidth:y,barGap:m,barCategoryGap:_,axisKey:u(o),stackId:l(t)})})),function(t){var e={};i.S6(t,(function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var c=t.barMinWidth;c&&(a[s].minWidth=c);var h=t.barGap;null!=h&&(o.gap=h);var p=t.barCategoryGap;null!=p&&(o.categoryGap=p)}));var n={};return i.S6(e,(function(t,e){n[e]={};var o=t.stacks,a=t.bandWidth,s=t.categoryGap;if(null==s){var l=i.XP(o).length;s=Math.max(35-4*l,15)+"%"}var u=(0,r.GM)(s,a),c=(0,r.GM)(t.gap,1),h=t.remainedWidth,p=t.autoWidthCount,d=(h-u)/(p+(p-1)*c);d=Math.max(d,0),i.S6(o,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width)i=t.width,e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,h-=i+c*i,p--;else{var i=d;e&&e<i&&(i=Math.min(e,h)),n&&n>i&&(i=n),i!==d&&(t.width=i,h-=i+c*i,p--)}})),d=(h-u)/(p+(p-1)*c),d=Math.max(d,0);var f,g=0;i.S6(o,(function(t,e){t.width||(t.width=d),f=t,g+=t.width*(1+c)})),f&&(g-=f.width*c);var v=-g/2;i.S6(o,(function(t,i){n[e][i]=n[e][i]||{bandWidth:a,offset:v,width:t.width},v+=t.width*(1+c)}))})),n}(n)}function p(t,e,n){if(t&&e){var i=t[u(e)];return null!=i&&null!=n?i[l(n)]:i}}function d(t,e){var n=c(t,e),r=h(n),a={};i.S6(n,(function(t){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),s=l(t),c=r[u(i)][s],h=c.offset,p=c.width,d=n.getOtherAxis(i),f=t.get("barMinHeight")||0;a[s]=a[s]||[],e.setLayout({bandWidth:c.bandWidth,offset:h,size:p});for(var g=e.mapDimension(d.dim),v=e.mapDimension(i.dim),m=(0,o.M)(e,g),_=d.isHorizontal(),x=y(0,d),b=0,w=e.count();b<w;b++){var S=e.get(g,b),T=e.get(v,b),M=S>=0?"p":"n",C=x;m&&(a[s][T]||(a[s][T]={p:x,n:x}),C=a[s][T][M]);var k,A=void 0,I=void 0,D=void 0,P=void 0;_?(A=C,I=(k=n.dataToPoint([S,T]))[1]+h,D=k[0]-x,P=p,Math.abs(D)<f&&(D=(D<0?-1:1)*f),isNaN(D)||m&&(a[s][T][M]+=D)):(A=(k=n.dataToPoint([T,S]))[0]+h,I=C,D=p,P=k[1]-x,Math.abs(P)<f&&(P=(P<=0?-1:1)*f),isNaN(P)||m&&(a[s][T][M]+=P)),e.setItemLayout(b,{x:A,y:I,width:D,height:P})}}))}var f={seriesType:"bar",plan:(0,a.Z)(),reset:function(t){if(g(t)&&v(t)){var e=t.getData(),n=t.coordinateSystem,i=n.master.getRect(),r=n.getBaseAxis(),o=n.getOtherAxis(r),a=e.mapDimension(o.dim),l=e.mapDimension(r.dim),u=o.isHorizontal(),c=u?0:1,d=p(h([t]),r,t).width;return d>.5||(d=.5),{progress:function(t,e){for(var r,h=t.count,p=new s(2*h),f=new s(2*h),g=new s(h),v=[],m=[],_=0,x=0;null!=(r=t.next());)m[c]=e.get(a,r),m[1-c]=e.get(l,r),v=n.dataToPoint(m,null,v),f[_]=u?i.x+i.width:v[0],p[_++]=v[0],f[_]=u?v[1]:i.y+i.height,p[_++]=v[1],g[x++]=r;e.setLayout({largePoints:p,largeDataIndices:g,largeBackgroundPoints:f,barWidth:d,valueAxisStart:y(0,o),backgroundStart:u?i.x:i.y,valueAxisHorizontal:u})}}}}};function g(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function v(t){return t.pipelineContext&&t.pipelineContext.large}function y(t,e,n){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}},7979:(t,e,n)=>{"use strict";n.d(e,{sO:()=>c,D0:()=>p,Li:()=>f,G8:()=>d,I2:()=>h});var i=n(4708),r=n(8781),o=n(8778),a="ZH",s="EN",l={},u={},c=r.Z.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf(a)>-1?a:"EN";function h(t,e){t=t.toUpperCase(),u[t]=new i.Z(e),l[t]=e}function p(t){if((0,o.HD)(t)){var e=l[t.toUpperCase()]||{};return t===a||t===s?(0,o.d9)(e):(0,o.TS)((0,o.d9)(e),(0,o.d9)(l.EN),!1)}return(0,o.TS)((0,o.d9)(t),(0,o.d9)(l.EN),!1)}function d(t){return u[t]}function f(){return u.EN}h(s,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Guage",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),h(a,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}})},2822:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});var i=n(9312),r=n(8778),o=n(4708),a=n(4053),s=n(4536),l=n(5495),u=n(2746),c=(0,l.Yf)(),h=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.uid=a.Kr("ec_cpt_model"),r}var n;return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=u.YD(this),i=n?u.tE(t):{},o=e.getTheme();r.TS(t,o.get(this.mainType)),r.TS(t,this.getDefaultOption()),n&&u.dt(t,i,n)},e.prototype.mergeOption=function(t,e){r.TS(this.option,t,!0);var n=u.YD(this);n&&u.dt(this.option,t,n)},e.prototype.optionUpdated=function(t,e){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!(0,s.PT)(t))return t.defaultOption;var e=c(this);if(!e.defaultOption){for(var n=[],i=t;i;){var o=i.prototype.defaultOption;o&&n.push(o),i=i.superClass}for(var a={},l=n.length-1;l>=0;l--)a=r.TS(a,n[l],!0);e.defaultOption=a}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return(0,l.HZ)(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.protoInitialize=((n=e.prototype).type="component",n.id="",n.name="",n.mainType="",n.subType="",void(n.componentIndex=0)),e}(o.Z);(0,s.pw)(h,o.Z),(0,s.au)(h,{registerWhenExtend:!0}),a.cj(h),a.jS(h,(function(t){var e=[];return r.S6(h.getClassesByMainType(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=r.UI(e,(function(t){return(0,s.u9)(t).main})),"dataset"!==t&&r.cq(e,"dataset")<=0&&e.unshift("dataset"),e}));const p=h},4708:(t,e,n)=>{"use strict";n.d(e,{Z:()=>v});var i=n(8781),r=n(4536),o=(0,n(1761).Z)([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),a=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return o(this,t,e)},t}(),s=n(5628),l=n(4239),u=["textStyle","color"],c=new l.ZP;const h=function(){function t(){}return t.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(u):null)},t.prototype.getFont=function(){return(0,s.qT)({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},t.prototype.getTextRect=function(t){return c.useStyle({text:t,fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily"),verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline"),padding:this.getShallow("padding"),lineHeight:this.getShallow("lineHeight"),rich:this.getShallow("rich")}),c.update(),c.getBoundingRect()},t}();var p=n(3607),d=n(8261),f=n(8778),g=function(){function t(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}return t.prototype.init=function(t,e,n){for(var i=[],r=3;r<arguments.length;r++)i[r-3]=arguments[r]},t.prototype.mergeOption=function(t,e){(0,f.TS)(this.option,t,!0)},t.prototype.get=function(t,e){return null==t?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},t.prototype.getShallow=function(t,e){var n=this.option,i=null==n?n:n[t];if(null==i&&!e){var r=this.parentModel;r&&(i=r.getShallow(t))}return i},t.prototype.getModel=function(e,n){var i=null!=e,r=i?this.parsePath(e):null;return new t(i?this._doGet(r):this.option,n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(r)),this.ecModel)},t.prototype.isEmpty=function(){return null==this.option},t.prototype.restoreData=function(){},t.prototype.clone=function(){return new(0,this.constructor)((0,f.d9)(this.option))},t.prototype.parsePath=function(t){return"string"==typeof t?t.split("."):t},t.prototype.resolveParentPath=function(t){return t},t.prototype.isAnimationEnabled=function(){if(!i.Z.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},t.prototype._doGet=function(t,e){var n=this.option;if(!t)return n;for(var i=0;i<t.length&&(!t[i]||null!=(n=n&&"object"==typeof n?n[t[i]]:null));i++);return null==n&&e&&(n=e._doGet(this.resolveParentPath(t),e.parentModel)),n},t}();(0,r.dm)(g),(0,r.Qj)(g),(0,f.jB)(g,p.K),(0,f.jB)(g,d.D),(0,f.jB)(g,a),(0,f.jB)(g,h);const v=g},4689:(t,e,n)=>{"use strict";n.d(e,{Z:()=>C});var i=n(9312),r=n(8778),o=n(8781),a=n(5495),s=n(2822),l=n(661),u=n(5498),c=n(2746),h=n(5193),p=n(4536),d=n(5073),f=n(574),g=n(1245);var v=a.Yf();function y(t,e){return t.getName(e)||t.getId(e)}var m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}var n;return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=(0,h.v)({count:x,reset:b}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(v(this).sourceManager=new d.U(this)).prepareSource();var i=this.getInitialData(t,n);S(i,this),this.dataTask.context.data=i,v(this).dataBeforeProcessed=i,_(this),this._initSelectedMapFromData(i)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=(0,c.YD)(this),i=n?(0,c.tE)(t):{},o=this.subType;s.Z.hasClass(o)&&(o+="Series"),r.TS(t,e.getTheme().get(this.subType)),r.TS(t,this.getDefaultOption()),a.Cc(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&(0,c.dt)(t,i,n)},e.prototype.mergeOption=function(t,e){t=r.TS(this.option,t,!0),this.fillDataTextStyle(t.data);var n=(0,c.YD)(this);n&&(0,c.dt)(this.option,t,n);var i=v(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,e);S(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,v(this).dataBeforeProcessed=o,_(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!r.fU(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&a.Cc(t[n],"label",e)},e.prototype.getInitialData=function(t,e){},e.prototype.appendData=function(t){this.getRawData().appendData(t.data)},e.prototype.getData=function(t){var e=M(this);if(e){var n=e.context.data;return null==t?n:n.getLinkedData(t)}return v(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var e=M(this);if(e){var n=e.context;n.outputData=t,e!==this.dataTask&&(n.data=t)}v(this).data=t},e.prototype.getSource=function(){return v(this).sourceManager.getSource()},e.prototype.getRawData=function(){return v(this).dataBeforeProcessed},e.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},e.prototype.formatTooltip=function(t,e,n){return function(t){var e,n,i,o,s=t.series,l=t.dataIndex,u=t.multipleSeries,c=s.getData(),h=c.mapDimensionsAll("defaultedTooltip"),p=h.length,d=s.getRawValue(l),v=(0,r.kJ)(d),y=(0,f.jT)(s,l);if(p>1||v&&!p){var m=function(t,e,n,i,o){var a=e.getData(),s=(0,r.u4)(t,(function(t,e,n){var i=a.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName}),!1),l=[],u=[],c=[];function h(t,e){var n=a.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(s?c.push((0,f.TX)("nameValue",{markerType:"subItem",markerColor:o,name:n.displayName,value:t,valueType:n.type})):(l.push(t),u.push(n.type)))}return i.length?(0,r.S6)(i,(function(t){h((0,g.hk)(a,n,t),t)})):(0,r.S6)(t,h),{inlineValues:l,inlineValueTypes:u,blocks:c}}(d,s,l,h,y);e=m.inlineValues,n=m.inlineValueTypes,i=m.blocks,o=m.inlineValues[0]}else if(p){var _=c.getDimensionInfo(h[0]);o=e=(0,g.hk)(c,l,h[0]),n=_.type}else o=e=v?d[0]:d;var x=(0,a.yu)(s),b=x&&s.name||"",w=c.getName(l),S=u?b:w;return(0,f.TX)("section",{header:b,noHeader:u||!x,sortParam:o,blocks:[(0,f.TX)("nameValue",{markerType:"item",markerColor:y,name:S,noName:!(0,r.fy)(S),value:e,valueType:n})].concat(i||[])})}({series:this,dataIndex:t,multipleSeries:e})},e.prototype.isAnimationEnabled=function(){if(o.Z.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),!!t},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,r=l._.prototype.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n)for(var i=this.getData(e),r=0;r<t.length;r++){var o=y(i,t[r]);n[o]=!1,this._selectedDataIndicesMap[o]=-1}},e.prototype.toggleSelect=function(t,e){for(var n=[],i=0;i<t.length;i++)n[0]=t[i],this.isSelected(t[i],e)?this.unselect(n,e):this.select(n,e)},e.prototype.getSelectedDataIndices=function(){for(var t=this._selectedDataIndicesMap,e=r.XP(t),n=[],i=0;i<e.length;i++){var o=t[e[i]];o>=0&&n.push(o)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;return n&&n[y(this.getData(e),t)]||!1},e.prototype._innerSelect=function(t,e){var n,i,r=this.option.selectedMode,o=e.length;if(r&&o)if("multiple"===r)for(var a=this.option.selectedMap||(this.option.selectedMap={}),s=0;s<o;s++){var l=e[s];a[c=y(t,l)]=!0,this._selectedDataIndicesMap[c]=t.getRawIndex(l)}else if("single"===r||!0===r){var u=e[o-1],c=y(t,u);this.option.selectedMap=((n={})[c]=!0,n),this._selectedDataIndicesMap=((i={})[c]=t.getRawIndex(u),i)}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var e=[];t.hasItemOption&&t.each((function(n){var i=t.getRawDataItem(n);"object"==typeof i&&i.selected&&e.push(n)})),e.length>0&&this._innerSelect(t,e)}},e.registerClass=function(t){return s.Z.registerClass(t)},e.protoInitialize=((n=e.prototype).type="series.__base__",n.seriesIndex=0,n.useColorPaletteOnData=!1,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",void(n.visualDrawType="fill")),e}(s.Z);function _(t){var e=t.name;a.yu(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return r.S6(n,(function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)})),i.join(" ")}(t)||e)}function x(t){return t.model.getRawData().count()}function b(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),w}function w(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function S(t,e){r.S6((0,i.pr)(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(n){t.wrapMethod(n,r.WA(T,e))}))}function T(t,e){var n=M(t);return n&&n.setOutputEnd((e||this).count()),e}function M(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}r.jB(m,u.X),r.jB(m,l._),(0,p.pw)(m,s.Z);const C=m},4841:(t,e,n)=>{"use strict";n.d(e,{f:()=>o,R:()=>a});var i=n(8778),r=(n(5495),(0,i.kW)());function o(t,e){(0,i.hu)(null==r.get(t)&&e),r.set(t,e)}function a(t,e,n){var i=r.get(e);if(!i)return n;var o=i(t);return o?n.concat(o):n}},5498:(t,e,n)=>{"use strict";n.d(e,{X:()=>s,f:()=>l});var i=n(8778),r=n(1245),o=n(349),a=(n(3264),/\{@(.+?)\}/g),s=function(){function t(){}return t.prototype.getDataParams=function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),r=n.getRawIndex(t),o=n.getName(t),a=n.getRawDataItem(t),s=n.getItemVisual(t,"style"),l=s&&s[n.getItemVisual(t,"drawType")||"fill"],u=s&&s.stroke,c=this.mainType,h="series"===c,p=n.userOutput;return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:h?this.subType:null,seriesIndex:this.seriesIndex,seriesId:h?this.id:null,seriesName:h?this.name:null,name:o,dataIndex:r,data:a,dataType:e,value:i,color:l,borderColor:u,dimensionNames:p?p.dimensionNames:null,encode:p?p.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(t,e,n,s,l,u){e=e||"normal";var c=this.getData(n),h=this.getDataParams(t,n);return u&&i.l7(h,u),null!=s&&h.value instanceof Array&&(h.value=h.value[s]),l||(l=c.getItemModel(t).get("normal"===e?["label","formatter"]:[e,"label","formatter"])),"function"==typeof l?(h.status=e,h.dimensionIndex=s,l(h)):"string"==typeof l?(0,o.kF)(l,h).replace(a,(function(e,n){var i=n.length;return"["===n.charAt(0)&&"]"===n.charAt(i-1)&&(n=+n.slice(1,i-1)),(0,r.hk)(c,t,n)})):void 0},t.prototype.getRawValue=function(t,e){return(0,r.hk)(this.getData(e),t)},t.prototype.formatTooltip=function(t,e,n){},t}();function l(t){var e,n;return i.Kn(t)?t.type&&(n=t):e=t,{markupText:e,markupFragment:n}}},8261:(t,e,n)=>{"use strict";n.d(e,{t:()=>r,D:()=>a});var i=n(1761),r=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],o=(0,i.Z)(r),a=function(){function t(){}return t.prototype.getItemStyle=function(t,e){return o(this,t,e)},t}()},3607:(t,e,n)=>{"use strict";n.d(e,{v:()=>r,K:()=>a});var i=n(1761),r=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],o=(0,i.Z)(r),a=function(){function t(){}return t.prototype.getLineStyle=function(t){return o(this,t)},t}()},1761:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(8778);function r(t,e){for(var n=0;n<t.length;n++)t[n][1]||(t[n][1]=t[n][0]);return e=e||!1,function(n,r,o){for(var a={},s=0;s<t.length;s++){var l=t[s][1];if(!(r&&i.cq(r,l)>=0||o&&i.cq(o,l)<0)){var u=n.getShallow(l,e);null!=u&&(a[t[s][0]]=u)}}return a}}},661:(t,e,n)=>{"use strict";n.d(e,{_:()=>o});var i=n(5495),r=(0,i.Yf)(),o=((0,i.Yf)(),function(){function t(){}return t.prototype.getColorFromPalette=function(t,e,n){var o=(0,i.kF)(this.get("color",!0)),a=this.get("colorLayer",!0);return function(t,e,n,i,r,o,a){var s=e(o=o||t),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(r))return u[r];var c=null!=a&&i?function(t,e){for(var n=t.length,i=0;i<n;i++)if(t[i].length>e)return t[i];return t[n-1]}(i,a):n;if((c=c||n)&&c.length){var h=c[l];return r&&(u[r]=h),s.paletteIdx=(l+1)%c.length,h}}(this,r,o,a,t,e,n)},t.prototype.clearColorPalette=function(){var t;(t=r)(this).paletteIdx=0,t(this).paletteNameMap={}},t}())},6774:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i={average:function(t){for(var e=0,n=0,i=0;i<t.length;i++)isNaN(t[i])||(e+=t[i],n++);return 0===n?NaN:e/n},sum:function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]||0;return e},max:function(t){for(var e=-1/0,n=0;n<t.length;n++)t[n]>e&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n<t.length;n++)t[n]<e&&(e=t[n]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}},r=function(t){return Math.round(t.length/2)};function o(t){return{seriesType:t,reset:function(t,e,n){var o=t.getData(),a=t.get("sampling"),s=t.coordinateSystem,l=o.count();if(l>10&&"cartesian2d"===s.type&&a){var u=s.getBaseAxis(),c=s.getOtherAxis(u),h=u.getExtent(),p=n.getDevicePixelRatio(),d=Math.abs(h[1]-h[0])*(p||1),f=Math.round(l/d);if(f>1){"lttb"===a&&t.setData(o.lttbDownSample(o.mapDimension(c.dim),1/f));var g=void 0;"string"==typeof a?g=i[a]:"function"==typeof a&&(g=a),g&&t.setData(o.downSample(o.mapDimension(c.dim),1/f,g,r))}}}}}},5193:(t,e,n)=>{"use strict";n.d(e,{v:()=>r});var i=n(8778);function r(t){return new o(t)}var o=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,n=this._upstream,r=t&&t.skip;if(this._dirty&&n){var o=this.context;o.data=o.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(e=this._plan(this.context));var a,s=h(this._modBy),l=this._modDataCount||0,u=h(t&&t.modBy),c=t&&t.modDataCount||0;function h(t){return!(t>=1)&&(t=1),t}s===u&&l===c||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,a=this._doReset(r)),this._modBy=u,this._modDataCount=c;var p=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=p?this._dueIndex+p:1/0,this._dueEnd);if(!r&&(a||d<f)){var g=this._progress;if((0,i.kJ)(g))for(var v=0;v<g.length;v++)this._doProgress(g[v],d,f,u,c);else this._doProgress(g,d,f,u,c)}this._dueIndex=f;var y=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=y}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},t.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},t.prototype._doProgress=function(t,e,n,i,r){a.reset(e,n,i,r),this._callingProgress=t,this._callingProgress({start:e,end:n,count:n-e,next:a.next},this.context)},t.prototype._doReset=function(t){var e,n;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!t&&this._reset&&((e=this._reset(this.context))&&e.progress&&(n=e.forceFirstProgress,e=e.progress),(0,i.kJ)(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),n},t.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},t.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},t.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},t.prototype.getUpstream=function(){return this._upstream},t.prototype.getDownstream=function(){return this._downstream},t.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},t}(),a=function(){var t,e,n,i,r,o={reset:function(l,u,c,h){e=l,t=u,n=c,i=h,r=Math.ceil(i/n),o.next=n>1&&i>0?s:a}};return o;function a(){return e<t?e++:null}function s(){var o=e%r*n+Math.ceil(e/r),a=e>=t?null:o<i?o:e;return e++,a}}()},4536:(t,e,n)=>{"use strict";n.d(e,{u9:()=>s,PT:()=>l,dm:()=>u,pw:()=>h,Qj:()=>d,au:()=>v});var i=n(9312),r=n(8778),o="___EC__COMPONENT__CONTAINER___",a="___EC__EXTENDED_CLASS___";function s(t){var e={main:"",sub:""};if(t){var n=t.split(".");e.main=n[0]||"",e.sub=n[1]||""}return e}function l(t){return!(!t||!t[a])}function u(t,e){t.$constructor=t,t.extend=function(t){var e=this;function n(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(t.$constructor)t.$constructor.apply(this,arguments);else{if(c(e)){var s=r.nW(n.prototype,new(e.bind.apply(e,(0,i.pr)([void 0],o))));return s}e.apply(this,arguments)}}return n[a]=!0,r.l7(n.prototype,t),n.extend=this.extend,n.superCall=f,n.superApply=g,r.XW(n,this),n.superClass=e,n}}function c(t){return"function"==typeof t&&/^class\s/.test(Function.prototype.toString.call(t))}function h(t,e){t.extend=e.extend}var p=Math.round(10*Math.random());function d(t){var e=["__\0is_clz",p++].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function f(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return this.superClass.prototype[e].apply(t,n)}function g(t,e,n){return this.superClass.prototype[e].apply(t,n)}function v(t,e){e=e||{};var n={};if(t.registerClass=function(t){var e,i=t.type||t.prototype.type;if(i){e=i,r.hu(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal'),t.prototype.type=i;var a=s(i);a.sub?a.sub!==o&&((function(t){var e=n[t.main];return e&&e[o]||((e=n[t.main]={})[o]=!0),e}(a))[a.sub]=t):n[a.main]=t}return t},t.getClass=function(t,e,i){var r=n[t];if(r&&r[o]&&(r=e?r[e]:null),i&&!r)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return r},t.getClassesByMainType=function(t){var e=s(t),i=[],a=n[e.main];return a&&a[o]?r.S6(a,(function(t,e){e!==o&&i.push(t)})):i.push(a),i},t.hasClass=function(t){var e=s(t);return!!n[e.main]},t.getAllClassMainTypes=function(){var t=[];return r.S6(n,(function(e,n){t.push(n)})),t},t.hasSubTypes=function(t){var e=s(t),i=n[e.main];return i&&i[o]},e.registerWhenExtend){var i=t.extend;i&&(t.extend=function(e){var n=i.call(this,e);return t.registerClass(n)})}}},4053:(t,e,n)=>{"use strict";n.d(e,{Kr:()=>a,cj:()=>s,jS:()=>l,ZL:()=>u});var i=n(8778),r=n(4536),o=(n(3264),Math.round(10*Math.random()));function a(t){return[t||"",o++].join("_")}function s(t){var e={};t.registerSubTypeDefaulter=function(t,n){var i=(0,r.u9)(t);e[i.main]=n},t.determineSubType=function(n,i){var o=i.type;if(!o){var a=(0,r.u9)(n).main;t.hasSubTypes(n)&&e[a]&&(o=e[a](i))}return o}}function l(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,r,o,a){if(t.length){var s=function(t){var r={},o=[];return i.S6(t,(function(a){var s=n(r,a),l=function(t,e){var n=[];return i.S6(t,(function(t){i.cq(e,t)>=0&&n.push(t)})),n}(s.originalDeps=e(a),t);s.entryCount=l.length,0===s.entryCount&&o.push(a),i.S6(l,(function(t){i.cq(s.predecessor,t)<0&&s.predecessor.push(t);var e=n(r,t);i.cq(e.successor,t)<0&&e.successor.push(a)}))})),{graph:r,noEntryList:o}}(r),l=s.graph,u=s.noEntryList,c={};for(i.S6(t,(function(t){c[t]=!0}));u.length;){var h=u.pop(),p=l[h],d=!!c[h];d&&(o.call(a,h,p.originalDeps.slice()),delete c[h]),i.S6(p.successor,d?g:f)}i.S6(c,(function(){throw new Error("")}))}function f(t){l[t].entryCount--,0===l[t].entryCount&&u.push(t)}function g(t){c[t]=!0,f(t)}}}function u(t,e){return i.TS(i.TS({},t,!0),e,!0)}},9291:(t,e,n)=>{"use strict";function i(t,e,n){for(var i;t&&(!e(t)||(i=t,!n));)t=t.__hostTarget||t.parent;return i}n.d(e,{o:()=>i})},349:(t,e,n)=>{"use strict";n.d(e,{OD:()=>a,Lz:()=>y,F1:()=>h,kF:()=>g,A0:()=>v,uX:()=>p,MY:()=>l,zW:()=>s,MI:()=>m});var i=n(8778),r=n(9199),o=n(4037);function a(t){if(!(0,r.kE)(t))return i.HD(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function s(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}n(3264),n(3146),n(3696);var l=i.MY,u=/([&<>"'])/g,c={"&":"&","<":"<",">":">",'"':""","'":"'"};function h(t){return null==t?"":(t+"").replace(u,(function(t,e){return c[e]}))}function p(t,e,n){function s(t){return t&&i.fy(t)?t:"-"}function l(t){return!(null==t||isNaN(t)||!isFinite(t))}var u="time"===e,c=t instanceof Date;if(u||c){var h=u?(0,r.sG)(t):t;if(!isNaN(+h))return(0,o.WU)(h,"yyyy-MM-dd hh:mm:ss",n);if(c)return"-"}if("ordinal"===e)return i.cd(t)?s(t):i.hj(t)&&l(t)?t+"":"-";var p=(0,r.FK)(t);return l(p)?a(p):i.cd(t)?s(t):"-"}var d=["a","b","c","d","e","f","g"],f=function(t,e){return"{"+t+(null==e?"":e)+"}"};function g(t,e,n){i.kJ(e)||(e=[e]);var r=e.length;if(!r)return"";for(var o=e[0].$vars||[],a=0;a<o.length;a++){var s=d[a];t=t.replace(f(s),f(s,0))}for(var l=0;l<r;l++)for(var u=0;u<o.length;u++){var c=e[l][o[u]];t=t.replace(f(d[u],l),n?h(c):c)}return t}function v(t,e){var n=i.HD(t)?{color:t,extraCssText:e}:t||{},r=n.color,o=n.type;e=n.extraCssText;var a=n.renderMode||"html";return r?"html"===a?"subItem"===o?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+h(r)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+h(r)+";"+(e||"")+'"></span>':{renderMode:a,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===o?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}function y(t,e){return e=e||"transparent",i.HD(t)?t:i.Kn(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function m(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}},3696:(t,e,n)=>{"use strict";n.r(e),n.d(e,{extendShape:()=>R,extendPath:()=>Z,registerShape:()=>N,getShapeClass:()=>B,makePath:()=>z,makeImage:()=>F,mergePath:()=>V,resizePath:()=>H,subPixelOptimizeLine:()=>U,subPixelOptimizeRect:()=>G,subPixelOptimize:()=>X,updateProps:()=>j,initProps:()=>$,removeElement:()=>q,removeElementWithFadeOut:()=>J,isElementRemoved:()=>Q,getTransform:()=>tt,applyTransform:()=>et,transformDirection:()=>nt,groupTransition:()=>rt,clipPointsByRect:()=>ot,clipRectByRect:()=>at,createIcon:()=>st,linePolygonIntersect:()=>lt,lineLineIntersect:()=>ut,Group:()=>u.Z,Image:()=>l.ZP,Text:()=>c.ZP,Circle:()=>h.Z,Ellipse:()=>p.Z,Sector:()=>d.Z,Ring:()=>f.Z,Polygon:()=>g.Z,Polyline:()=>v.Z,Rect:()=>y.Z,Line:()=>m.Z,BezierCurve:()=>_.Z,Arc:()=>x.Z,IncrementalDisplayable:()=>k.Z,CompoundPath:()=>b.Z,LinearGradient:()=>w.Z,RadialGradient:()=>S.Z,BoundingRect:()=>T.Z,OrientedBoundingRect:()=>M.Z,Point:()=>C.Z,Path:()=>a.ZP});var i=n(7367),r=n(561),o=n(213),a=n(391),s=n(4629),l=n(6781),u=n(6454),c=n(4239),h=n(1707),p=n(9509),d=n(2098),f=n(4874),g=n(1748),v=n(9181),y=n(230),m=n(6573),_=n(3584),x=n(9689),b=n(8234),w=n(5853),S=n(2763),T=n(9472),M=n(8511),C=n(6),k=n(2012),A=n(6169),I=n(8778),D=n(1563),P=Math.max,O=Math.min,L={};function R(t){return a.ZP.extend(t)}var E=i.Pc;function Z(t,e){return E(t,e)}function N(t,e){L[t]=e}function B(t){if(L.hasOwnProperty(t))return L[t]}function z(t,e,n,r){var o=i.iR(t,e);return n&&("center"===r&&(n=W(n,o.getBoundingRect())),H(o,n)),o}function F(t,e,n){var i=new l.ZP({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===n){var r={width:t.width,height:t.height};i.setStyle(W(e,r))}}});return i}function W(t,e){var n,i=e.width/e.height,r=t.height*i;return n=r<=t.width?t.height:(r=t.width)/i,{x:t.x+t.width/2-r/2,y:t.y+t.height/2-n/2,width:r,height:n}}var V=i.AA;function H(t,e){if(t.applyTransform){var n=t.getBoundingRect().calculateTransform(e);t.applyTransform(n)}}function U(t){return A._3(t.shape,t.shape,t.style),t}function G(t){return A.Pw(t.shape,t.shape,t.style),t}var X=A.vu;function Y(t,e,n,i,r,o,a){var s,l=!1;"function"==typeof r?(a=o,o=r,r=null):(0,I.Kn)(r)&&(o=r.cb,a=r.during,l=r.isFrom,s=r.removeOpt,r=r.dataIndex);var u,c="update"===t,h="remove"===t;if(i&&i.ecModel){var p=i.ecModel.getUpdatePayload();u=p&&p.animation}var d=i&&i.isAnimationEnabled();if(h||e.stopAnimation("remove"),d){var f=void 0,g=void 0,v=void 0;u?(f=u.duration||0,g=u.easing||"cubicOut",v=u.delay||0):h?(s=s||{},f=(0,I.pD)(s.duration,200),g=(0,I.pD)(s.easing,"cubicOut"),v=0):(f=i.getShallow(c?"animationDurationUpdate":"animationDuration"),g=i.getShallow(c?"animationEasingUpdate":"animationEasing"),v=i.getShallow(c?"animationDelayUpdate":"animationDelay")),"function"==typeof v&&(v=v(r,i.getAnimationDelayParams?i.getAnimationDelayParams(e,r):null)),"function"==typeof f&&(f=f(r)),f>0?l?e.animateFrom(n,{duration:f,delay:v||0,easing:g,done:o,force:!!o||!!a,scope:t,during:a}):e.animateTo(n,{duration:f,delay:v||0,easing:g,done:o,force:!!o||!!a,setToFinal:!0,scope:t,during:a}):(e.stopAnimation(),!l&&e.attr(n),o&&o())}else e.stopAnimation(),!l&&e.attr(n),a&&a(1),o&&o()}function j(t,e,n,i,r,o){Y("update",t,e,n,i,r,o)}function $(t,e,n,i,r,o){Y("init",t,e,n,i,r,o)}function q(t,e,n,i,r,o){Q(t)||Y("remove",t,e,n,i,r,o)}function K(t,e,n,i){t.removeTextContent(),t.removeTextGuideLine(),q(t,{style:{opacity:0}},e,n,i)}function J(t,e,n){function i(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse((function(t){t.isGroup||K(t,e,n,i)})):K(t,e,n,i)}function Q(t){if(!t.__zr)return!0;for(var e=0;e<t.animators.length;e++)if("remove"===t.animators[e].scope)return!0;return!1}function tt(t,e){for(var n=r.yR([]);t&&t!==e;)r.dC(n,t.getLocalTransform(),n),t=t.parent;return n}function et(t,e,n){return e&&!(0,I.zG)(e)&&(e=s.Z.getLocalTransform(e)),n&&(e=r.U_([],e)),o.Ne([],t,e)}function nt(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),o=["left"===t?-i:"right"===t?i:0,"top"===t?-r:"bottom"===t?r:0];return o=et(o,e,n),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function it(t){return!t.isGroup}function rt(t,e,n){if(t&&e){var i,r=(i={},t.traverse((function(t){it(t)&&t.anid&&(i[t.anid]=t)})),i);e.traverse((function(t){if(it(t)&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),j(t,i,n,(0,D.A)(t).dataIndex)}}}))}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=(0,I.l7)({},t.shape)),e}}function ot(t,e){return(0,I.UI)(t,(function(t){var n=t[0];n=P(n,e.x),n=O(n,e.x+e.width);var i=t[1];return i=P(i,e.y),[n,i=O(i,e.y+e.height)]}))}function at(t,e){var n=P(t.x,e.x),i=O(t.x+t.width,e.x+e.width),r=P(t.y,e.y),o=O(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function st(t,e,n){var i=(0,I.l7)({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),(0,I.ce)(r,n),new l.ZP(i)):z(t.replace("path://",""),i,n,"center")}function lt(t,e,n,i,r){for(var o=0,a=r[r.length-1];o<r.length;o++){var s=r[o];if(ut(t,e,n,i,s[0],s[1],a[0],a[1]))return!0;a=s}}function ut(t,e,n,i,r,o,a,s){var l,u=n-t,c=i-e,h=a-r,p=s-o,d=ct(h,p,u,c);if((l=d)<=1e-6&&l>=-1e-6)return!1;var f=t-r,g=e-o,v=ct(f,g,u,c)/d;if(v<0||v>1)return!1;var y=ct(f,g,h,p)/d;return!(y<0||y>1)}function ct(t,e,n,i){return t*i-n*e}N("circle",h.Z),N("ellipse",p.Z),N("sector",d.Z),N("ring",f.Z),N("polygon",g.Z),N("polyline",v.Z),N("rect",y.Z),N("line",m.Z),N("bezierCurve",_.Z),N("arc",x.Z)},1563:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var i=(0,n(5495).Yf)()},2746:(t,e,n)=>{"use strict";n.d(e,{BZ:()=>h,ME:()=>p,p$:()=>d,YD:()=>f,dt:()=>g,tE:()=>v});var i=n(8778),r=n(9472),o=n(9199),a=n(349),s=i.S6,l=["left","right","top","bottom","width","height"],u=[["width","left","right"],["height","top","bottom"]];function c(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var c,h,p=l.getBoundingRect(),d=e.childAt(u+1),f=d&&d.getBoundingRect();if("horizontal"===t){var g=p.width+(f?-f.x+p.x:0);(c=o+g)>i||l.newline?(o=0,c=g,a+=s+n,s=p.height):s=Math.max(s,p.height)}else{var v=p.height+(f?-f.y+p.y:0);(h=a+v)>r||l.newline?(o+=s+n,a=0,h=v,s=p.width):s=Math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=c+n:a=h+n)}))}var h=c;function p(t,e,n){n=a.MY(n||0);var i=e.width,s=e.height,l=(0,o.GM)(t.left,i),u=(0,o.GM)(t.top,s),c=(0,o.GM)(t.right,i),h=(0,o.GM)(t.bottom,s),p=(0,o.GM)(t.width,i),d=(0,o.GM)(t.height,s),f=n[2]+n[0],g=n[1]+n[3],v=t.aspect;switch(isNaN(p)&&(p=i-c-g-l),isNaN(d)&&(d=s-h-f-u),null!=v&&(isNaN(p)&&isNaN(d)&&(v>i/s?p=.8*i:d=.8*s),isNaN(p)&&(p=v*d),isNaN(d)&&(d=p/v)),isNaN(l)&&(l=i-c-p-g),isNaN(u)&&(u=s-h-d-f),t.left||t.right){case"center":l=i/2-p/2-n[3];break;case"right":l=i-p-g}switch(t.top||t.bottom){case"middle":case"center":u=s/2-d/2-n[0];break;case"bottom":u=s-d-f}l=l||0,u=u||0,isNaN(p)&&(p=i-g-l-(c||0)),isNaN(d)&&(d=s-f-u-(h||0));var y=new r.Z(l+n[3],u+n[0],p,d);return y.margin=n,y}function d(t,e,n,o,a){var s=!a||!a.hv||a.hv[0],l=!a||!a.hv||a.hv[1],u=a&&a.boundingMode||"all";if(s||l){var c;if("raw"===u)c="group"===t.type?new r.Z(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(c=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();(c=c.clone()).applyTransform(h)}var d=p(i.ce({width:c.width,height:c.height},e),n,o),f=s?d.x-c.x:0,g=l?d.y-c.y:0;"raw"===u?(t.x=f,t.y=g):(t.x+=f,t.y+=g),t.markRedraw()}}function f(t){var e=t.layoutMode||t.constructor.layoutMode;return i.Kn(e)?e:e?{type:e}:null}function g(t,e,n){var r=n&&n.ignoreSize;!i.kJ(r)&&(r=[r,r]);var o=l(u[0],0),a=l(u[1],1);function l(n,i){var o={},a=0,l={},u=0;if(s(n,(function(e){l[e]=t[e]})),s(n,(function(t){c(e,t)&&(o[t]=l[t]=e[t]),h(o,t)&&a++,h(l,t)&&u++})),r[i])return h(e,n[1])?l[n[2]]=null:h(e,n[2])&&(l[n[1]]=null),l;if(2!==u&&a){if(a>=2)return o;for(var p=0;p<n.length;p++){var d=n[p];if(!c(o,d)&&c(t,d)){o[d]=t[d];break}}return o}return l}function c(t,e){return t.hasOwnProperty(e)}function h(t,e){return null!=t[e]&&"auto"!==t[e]}function p(t,e,n){s(t,(function(t){e[t]=n[t]}))}p(u[0],t,o),p(u[1],t,a)}function v(t){return function(t,e){return e&&t&&s(l,(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}({},t)}i.WA(c,"vertical"),i.WA(c,"horizontal")},3264:(t,e,n)=>{"use strict";function i(t){}function r(t){throw new Error(t)}n.d(e,{Sh:()=>i,_y:()=>r}),n(8778),"undefined"!=typeof console&&console.warn&&console.log},5495:(t,e,n)=>{"use strict";n.d(e,{kF:()=>u,Cc:()=>c,Td:()=>h,C4:()=>p,Co:()=>d,ab:()=>f,U5:()=>y,yu:()=>m,lY:()=>_,g0:()=>x,O0:()=>b,gO:()=>w,Yf:()=>S,pm:()=>M,C6:()=>C,iP:()=>k,HZ:()=>A,P$:()=>I,IL:()=>D,U9:()=>P,pk:()=>O});var i=n(8778),r=n(8781),o=n(9199),a=n(4017),s=(n(3264),"series\0"),l="\0_ec_\0";function u(t){return t instanceof Array?t:null==t?[]:[t]}function c(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;i<r;i++){var o=n[i];!t.emphasis[e].hasOwnProperty(o)&&t[e].hasOwnProperty(o)&&(t.emphasis[e][o]=t[e][o])}}}var h=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function p(t){return!(0,i.Kn)(t)||(0,i.kJ)(t)||t instanceof Date?t:t.value}function d(t){return(0,i.Kn)(t)&&!(t instanceof Array)}function f(t,e,n){var r="normalMerge"===n,o="replaceMerge"===n,a="replaceAll"===n;t=t||[],e=(e||[]).slice();var l=(0,i.kW)();(0,i.S6)(e,(function(t,n){(0,i.Kn)(t)||(e[n]=null)}));var u,c,h=function(t,e,n){var i=[];if("replaceAll"===n)return i;for(var r=0;r<t.length;r++){var o=t[r];o&&null!=o.id&&e.set(o.id,r),i.push({existing:"replaceMerge"===n||_(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return i}(t,l,n);return(r||o)&&function(t,e,n,r){(0,i.S6)(r,(function(o,a){if(o&&null!=o.id){var s=v(o.id),l=n.get(s);if(null!=l){var u=t[l];(0,i.hu)(!u.newOption,'Duplicated option on id "'+s+'".'),u.newOption=o,u.existing=e[l],r[a]=null}}}))}(h,t,l,e),r&&function(t,e){(0,i.S6)(e,(function(n,i){if(n&&null!=n.name)for(var r=0;r<t.length;r++){var o=t[r].existing;if(!t[r].newOption&&o&&(null==o.id||null==n.id)&&!_(n)&&!_(o)&&g("name",o,n))return t[r].newOption=n,void(e[i]=null)}}))}(h,e),r||o?function(t,e,n){(0,i.S6)(e,(function(e){if(e){for(var i,r=0;(i=t[r])&&(i.newOption||_(i.existing)||i.existing&&null!=e.id&&!g("id",e,i.existing));)r++;i?(i.newOption=e,i.brandNew=n):t.push({newOption:e,brandNew:n,existing:null,keyInfo:null}),r++}}))}(h,e,o):a&&function(t,e){(0,i.S6)(e,(function(e){t.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})}))}(h,e),u=h,c=(0,i.kW)(),(0,i.S6)(u,(function(t){var e=t.existing;e&&c.set(e.id,t)})),(0,i.S6)(u,(function(t){var e=t.newOption;(0,i.hu)(!e||null==e.id||!c.get(e.id)||c.get(e.id)===t,"id duplicates: "+(e&&e.id)),e&&null!=e.id&&c.set(e.id,t),!t.keyInfo&&(t.keyInfo={})})),(0,i.S6)(u,(function(t,e){var n=t.existing,r=t.newOption,o=t.keyInfo;if((0,i.Kn)(r)){if(o.name=null!=r.name?v(r.name):n?n.name:s+e,n)o.id=v(n.id);else if(null!=r.id)o.id=v(r.id);else{var a=0;do{o.id="\0"+o.name+"\0"+a++}while(c.get(o.id))}c.set(o.id,t)}})),h}function g(t,e,n){var i=y(e[t],null),r=y(n[t],null);return null!=i&&null!=r&&i===r}function v(t){return y(t,"")}function y(t,e){if(null==t)return e;var n=typeof t;return"string"===n?t:"number"===n||(0,i.cd)(t)?t+"":e}function m(t){var e=t.name;return!(!e||!e.indexOf(s))}function _(t){return t&&null!=t.id&&0===v(t.id).indexOf(l)}function x(t){return l+t}function b(t,e,n){(0,i.S6)(t,(function(t){var r=t.newOption;(0,i.Kn)(r)&&(t.keyInfo.mainType=e,t.keyInfo.subType=function(t,e,n,i){return e.type?e.type:n?n.subType:i.determineSubType(t,e)}(e,r,t.existing,n))}))}function w(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?(0,i.kJ)(e.dataIndex)?(0,i.UI)(e.dataIndex,(function(e){return t.indexOfRawIndex(e)})):t.indexOfRawIndex(e.dataIndex):null!=e.name?(0,i.kJ)(e.name)?(0,i.UI)(e.name,(function(e){return t.indexOfName(e)})):t.indexOfName(e.name):void 0}function S(){var t="__ec_inner_"+T++;return function(e){return e[t]||(e[t]={})}}var T=(0,o.jj)();function M(t,e,n){var r;if((0,i.HD)(e)){var o={};o[e+"Index"]=0,r=o}else r=e;var a=(0,i.kW)(),s={},l=!1;(0,i.S6)(r,(function(t,e){if("dataIndex"!==e&&"dataIndexInside"!==e){var r=e.match(/^(\w+)(Index|Id|Name)$/)||[],o=r[1],u=(r[2]||"").toLowerCase();!o||!u||n&&n.includeMainTypes&&(0,i.cq)(n.includeMainTypes,o)<0||(l=l||!!o,(a.get(o)||a.set(o,{}))[u]=t)}else s[e]=t}));var u=n?n.defaultMainType:null;return!l&&u&&a.set(u,{}),a.each((function(e,i){var r=A(t,i,e,{useDefault:u===i,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone});s[i+"Models"]=r.models,s[i+"Model"]=r.models[0]})),s}var C={useDefault:!0,enableAll:!1,enableNone:!1},k={useDefault:!1,enableAll:!0,enableNone:!0};function A(t,e,n,r){r=r||C;var o=n.index,a=n.id,s=n.name,l={models:null,specified:null!=o||null!=a||null!=s};if(!l.specified){var u=void 0;return l.models=r.useDefault&&(u=t.getComponent(e))?[u]:[],l}return"none"===o||!1===o?((0,i.hu)(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),l.models=[],l):("all"===o&&((0,i.hu)(r.enableAll,'`"all"` is not a valid value on index option.'),o=a=s=null),l.models=t.queryComponents({mainType:e,index:o,id:a,name:s}),l)}function I(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function D(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function P(t){return"auto"===t?r.Z.domSupported?"html":"richText":t||"html"}function O(t,e,n,i,r){var s=null==e||"auto"===e;if(null==i)return i;if("number"==typeof i){var l=(0,a.k4)(n||0,i,r);return(0,o.NM)(l,s?Math.max((0,o.ZB)(n||0),(0,o.ZB)(i)):e)}if("string"==typeof i)return r<1?n:i;for(var u=[],c=n||[],h=i,p=Math.max(c.length,h.length),d=0;d<p;++d)if("ordinal"===t.getDimensionInfo(d).type)u[d]=(r<1?c:h)[d];else{var f=c&&c[d]?c[d]:0,g=h[d];l=null==c?i[d]:(0,a.k4)(f,g,r),u[d]=(0,o.NM)(l,s?Math.max((0,o.ZB)(f),(0,o.ZB)(g)):e)}return u}},9199:(t,e,n)=>{"use strict";n.d(e,{NU:()=>i,GM:()=>r,NM:()=>o,dt:()=>a,ZB:()=>s,M9:()=>l,wW:()=>u,mW:()=>c,sG:()=>p,Xd:()=>d,kx:()=>g,FK:()=>v,kE:()=>y,jj:()=>m,nl:()=>x}),n(8778);function i(t,e,n,i){var r=e[1]-e[0],o=n[1]-n[0];if(0===r)return 0===o?n[0]:(n[0]+n[1])/2;if(i)if(r>0){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*o+n[0]}function r(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function o(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function a(t){return t.sort((function(t,e){return t-e})),t}function s(t){var e=t.toString(),n=e.indexOf("e");if(n>0){var i=+e.slice(n+1);return i<0?-i:0}var r=e.indexOf(".");return r<0?0:e.length-1-r}function l(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function u(t){var e=2*Math.PI;return(t%e+e)%e}function c(t){return t>-1e-4&&t<1e-4}var h=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function p(t){if(t instanceof Date)return t;if("string"==typeof t){var e=h.exec(t);if(!e)return new Date(NaN);if(e[8]){var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return null==t?new Date(NaN):new Date(Math.round(t))}function d(t){return Math.pow(10,f(t))}function f(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function g(t,e){var n=f(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function v(t){var e=parseFloat(t);return e==t&&(0!==e||"string"!=typeof t||t.indexOf("x")<=0)?e:NaN}function y(t){return!isNaN(v(t))}function m(){return Math.round(9*Math.random())}function _(t,e){return 0===e?t:_(e,t%e)}function x(t,e){return null==t?e:null==e?t:t*e/_(t,e)}},106:(t,e,n)=>{"use strict";n.d(e,{CX:()=>p,wU:()=>d,L1:()=>f,qc:()=>g,Ki:()=>v,yx:()=>y,Hg:()=>m,JQ:()=>_,iK:()=>x,Gl:()=>L,Pc:()=>Z,i1:()=>N,fD:()=>B,Mh:()=>z,SX:()=>F,VP:()=>W,XX:()=>V,SJ:()=>H,_V:()=>G,nV:()=>X,og:()=>Y,ci:()=>j,C5:()=>$,vF:()=>q,WO:()=>Q,Av:()=>tt,RW:()=>et,aG:()=>nt,xp:()=>it,e9:()=>rt});var i=n(4290),r=n(8778),o=n(1563),a=n(1756),s=n(5495),l=n(391),u=1,c={},h=(0,s.Yf)(),p=1,d=2,f=["emphasis","blur","select"],g=["normal","emphasis","blur","select"],v="highlight",y="downplay",m="select",_="unselect",x="toggleSelect";function b(t){return null!=t&&"none"!==t}var w=new i.ZP(100);function S(t){if("string"!=typeof t)return t;var e=w.get(t);return e||(e=a.xb(t,-.1),w.put(t,e)),e}function T(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function M(t){T(t,"emphasis",d)}function C(t){t.hoverState===d&&T(t,"normal",0)}function k(t){T(t,"blur",p)}function A(t){t.hoverState===p&&T(t,"normal",0)}function I(t){t.selected=!0}function D(t){t.selected=!1}function P(t,e,n){e(t,n)}function O(t,e,n){P(t,e,n),t.isGroup&&t.traverse((function(t){P(t,e,n)}))}function L(t,e){switch(e){case"emphasis":t.hoverState=d;break;case"normal":t.hoverState=0;break;case"blur":t.hoverState=p;break;case"select":t.selected=!0}}function R(t,e){var n=this.states[t];if(this.style){if("emphasis"===t)return function(t,e,n,i){var o=n&&(0,r.cq)(n,"select")>=0,a=!1;if(t instanceof l.ZP){var s=h(t),u=o&&s.selectFill||s.normalFill,c=o&&s.selectStroke||s.normalStroke;if(b(u)||b(c)){var p=(i=i||{}).style||{};!b(p.fill)&&b(u)?(a=!0,i=(0,r.l7)({},i),(p=(0,r.l7)({},p)).fill=S(u)):!b(p.stroke)&&b(c)&&(a||(i=(0,r.l7)({},i),p=(0,r.l7)({},p)),p.stroke=S(c)),i.style=p}}if(i&&null==i.z2){a||(i=(0,r.l7)({},i));var d=t.z2EmphasisLift;i.z2=t.z2+(null!=d?d:10)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=(0,r.cq)(t.currentStates,e)>=0,o=t.style.opacity,a=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;a<e.length;a++){var s=e[a],l=r[s];o[s]=null==l?i&&i[s]:l}for(a=0;a<t.animators.length;a++){var u=t.animators[a];u.__fromStateTransition&&u.__fromStateTransition.indexOf(n)<0&&"style"===u.targetName&&u.saveFinalToTarget(o,e)}return o}(t,["opacity"],e,{opacity:1}),s=(n=n||{}).style||{};return null==s.opacity&&(n=(0,r.l7)({},n),s=(0,r.l7)({opacity:i?o:.1*a.opacity},s),n.style=s),n}(this,t,n);if("select"===t)return function(t,e,n){if(n&&null==n.z2){n=(0,r.l7)({},n);var i=t.z2SelectLift;n.z2=t.z2+(null!=i?i:9)}return n}(this,0,n)}return n}function E(t){t.stateProxy=R;var e=t.getTextContent(),n=t.getTextGuideLine();e&&(e.stateProxy=R),n&&(n.stateProxy=R)}function Z(t,e){!U(t,e)&&!t.__highByOuter&&O(t,M)}function N(t,e){!U(t,e)&&!t.__highByOuter&&O(t,C)}function B(t,e){t.__highByOuter|=1<<(e||0),O(t,M)}function z(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&O(t,C)}function F(t){O(t,k)}function W(t){O(t,A)}function V(t){O(t,I)}function H(t){O(t,D)}function U(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function G(t,e,n,i,o){var a=i.getModel();function s(t,e){for(var n=0;n<e.length;n++){var i=t.getItemGraphicEl(e[n]);i&&W(i)}}if(n=n||"coordinateSystem",o){if(null!=t&&e&&"none"!==e){var l=a.getSeriesByIndex(t),u=l.coordinateSystem;u&&u.master&&(u=u.master);var c=[];a.eachSeries((function(t){var o=l===t,a=t.coordinateSystem;if(a&&a.master&&(a=a.master),!("series"===n&&!o||"coordinateSystem"===n&&!(a&&u?a===u:o)||"series"===e&&o)){if(i.getViewOfSeriesModel(t).group.traverse((function(t){k(t)})),(0,r.zG)(e))s(t.getData(),e);else if((0,r.Kn)(e))for(var h=(0,r.XP)(e),p=0;p<h.length;p++)s(t.getData(h[p]),e[h[p]]);c.push(t)}})),a.eachComponent((function(t,e){if("series"!==t){var n=i.getViewOfComponentModel(e);n&&n.blurSeries&&n.blurSeries(c,a)}}))}}else!function(t){t.getModel().eachComponent((function(e,n){("series"===e?t.getViewOfSeriesModel(n):t.getViewOfComponentModel(n)).group.traverse((function(t){A(t)}))}))}(i)}function X(t,e,n){if(it(e)){var i=e.type===v,a=t.seriesIndex,l=t.getData(e.dataType),u=(0,s.gO)(l,e);u=((0,r.kJ)(u)?u[0]:u)||0;var c=l.getItemGraphicEl(u);if(!c)for(var h=l.count(),p=0;!c&&p<h;)c=l.getItemGraphicEl(p++);if(c){var d=(0,o.A)(c);G(a,d.focus,d.blurScope,n,i)}else{var f=t.get(["emphasis","focus"]),g=t.get(["emphasis","blurScope"]);null!=f&&G(a,f,g,n,i)}}}function Y(t,e,n){if(nt(e)){var i=e.dataType,o=t.getData(i),a=(0,s.gO)(o,e);(0,r.kJ)(a)||(a=[a]),t[e.type===x?"toggleSelect":e.type===m?"select":"unselect"](a,i)}}function j(t){var e=t.getAllData();(0,r.S6)(e,(function(e){var n=e.data,i=e.type;n.eachItemGraphicEl((function(e,n){t.isSelected(n,i)?V(e):H(e)}))}))}function $(t){var e=[];return t.eachSeries((function(t){var n=t.getAllData();(0,r.S6)(n,(function(n){n.data;var i=n.type,r=t.getSelectedDataIndices();if(r.length>0){var o={dataIndex:r,seriesIndex:t.seriesIndex};null!=i&&(o.dataType=i),e.push(o)}}))})),e}function q(t,e,n){!function(t,e){var n=t;t.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=t.highDownSilentOnTouch),n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!0}(t),O(t,E),function(t,e,n){var i=(0,o.A)(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}(t,e,n)}var K=["emphasis","blur","select"],J={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Q(t,e,n,i){n=n||"itemStyle";for(var r=0;r<K.length;r++){var o=K[r],a=e.getModel([o,n]);t.ensureState(o).style=i?i(a):a[J[n]]()}}function tt(t){return!(!t||!t.__highDownDispatcher)}function et(t){var e=c[t];return null==e&&u<=32&&(e=c[t]=u++),e}function nt(t){var e=t.type;return e===m||e===_||e===x}function it(t){var e=t.type;return e===v||e===y}function rt(t){var e=h(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}},3111:(t,e,n)=>{"use strict";n.d(e,{t:()=>v});var i=n(8778),r=n(3696),o=n(9472),a=n(9356),s=r.Path.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i+o),t.lineTo(n-r,i+o),t.closePath()}}),l=r.Path.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i),t.lineTo(n,i+o),t.lineTo(n-r,i),t.closePath()}}),u=r.Path.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width/5*3,o=Math.max(r,e.height),a=r/2,s=a*a/(o-a),l=i-o+a+s,u=Math.asin(s/a),c=Math.cos(u)*a,h=Math.sin(u),p=Math.cos(u),d=.6*a,f=.7*a;t.moveTo(n-c,l+s),t.arc(n,l,a,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(n+c-h*d,l+s+p*d,n,i-f,n,i),t.bezierCurveTo(n,i-f,n-c+h*d,l+s+p*d,n-c,l+s),t.closePath()}}),c=r.Path.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,r=e.x,o=e.y,a=i/3*2;t.moveTo(r,o),t.lineTo(r+a,o+n),t.lineTo(r,o+n/4*3),t.lineTo(r-a,o+n),t.lineTo(r,o),t.closePath()}}),h={line:r.Rect,rect:r.Rect,roundRect:r.Rect,square:r.Rect,circle:r.Circle,diamond:l,pin:u,arrow:c,triangle:s},p={line:function(t,e,n,i,r){r.x=t,r.y=e+i/2-1,r.width=n,r.height=2},rect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i},roundRect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(t,e,n,i,r){var o=Math.min(n,i);r.x=t,r.y=e,r.width=o,r.height=o},circle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.r=Math.min(n,i)/2},diamond:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i},pin:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},arrow:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},triangle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i}},d={};i.S6(h,(function(t,e){d[e]=new t}));var f=r.Path.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,n){var i=(0,a.wI)(t,e,n),r=this.shape;return r&&"pin"===r.symbolType&&"inside"===e.position&&(i.y=n.y+.4*n.height),i},buildPath:function(t,e,n){var i=e.symbolType;if("none"!==i){var r=d[i];r||(r=d[i="rect"]),p[i](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,n)}}});function g(t,e){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff",n.lineWidth=2):n.fill=t,this.markRedraw()}}function v(t,e,n,i,a,s,l){var u,c=0===t.indexOf("empty");return c&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(u=0===t.indexOf("image://")?r.makeImage(t.slice(8),new o.Z(e,n,i,a),l?"center":"cover"):0===t.indexOf("path://")?r.makePath(t.slice(7),{},new o.Z(e,n,i,a),l?"center":"cover"):new f({shape:{symbolType:t,x:e,y:n,width:i,height:a}})).__isEmptyBrush=c,u.setColor=g,s&&u.setColor(s),u}},4013:(t,e,n)=>{"use strict";n.d(e,{P2:()=>a,T9:()=>s});var i="\0__throttleOriginMethod",r="\0__throttleRate",o="\0__throttleType";function a(t,e,n){var i,r,o,a,s,l=0,u=0,c=null;function h(){u=(new Date).getTime(),c=null,t.apply(o,a||[])}e=e||0;var p=function(){for(var t=[],p=0;p<arguments.length;p++)t[p]=arguments[p];i=(new Date).getTime(),o=this,a=t;var d=s||e,f=s||n;s=null,r=i-(f?l:u)-d,clearTimeout(c),f?c=setTimeout(h,d):r>=0?h():c=setTimeout(h,-r),l=i};return p.clear=function(){c&&(clearTimeout(c),c=null)},p.debounceNextCall=function(t){s=t},p}function s(t,e,n,s){var l=t[e];if(l){var u=l[i]||l,c=l[o];if(l[r]!==n||c!==s){if(null==n||!s)return t[e]=u;(l=t[e]=a(u,n,"debounce"===s))[i]=u,l[o]=s,l[r]=n}return l}}},4037:(t,e,n)=>{"use strict";n.d(e,{WT:()=>s,yR:()=>l,dV:()=>u,s2:()=>c,P5:()=>h,V8:()=>d,FW:()=>g,Tj:()=>y,$K:()=>m,xC:()=>_,WU:()=>x,k7:()=>b,q5:()=>S,sx:()=>T,CW:()=>M,xz:()=>C,Wp:()=>k,fn:()=>A,MV:()=>I,RZ:()=>D,xL:()=>P,vh:()=>O,f5:()=>L,En:()=>R,eN:()=>E,rM:()=>Z,cb:()=>N});var i=n(8778),r=n(9199),o=n(7979),a=n(4708),s=1e3,l=60*s,u=60*l,c=24*u,h=365*c,p={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{hh}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {hh}:{mm}:{ss} {SSS}"},d={year:"{yyyy}",month:"{yyyy}-{MM}",day:"{yyyy}-{MM}-{dd}",hour:"{yyyy}-{MM}-{dd} "+p.hour,minute:"{yyyy}-{MM}-{dd} "+p.minute,second:"{yyyy}-{MM}-{dd} "+p.second,millisecond:p.none},f=["year","month","day","hour","minute","second","millisecond"],g=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function v(t,e){return"0000".substr(0,e-(t+="").length)+t}function y(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function m(t){return t===y(t)}function _(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function x(t,e,n,i){var s=r.sG(t),l=s[T(n)](),u=s[M(n)]()+1,c=Math.floor((u-1)/4)+1,h=s[C(n)](),p=s["get"+(n?"UTC":"")+"Day"](),d=s[k(n)](),f=(d-1)%12+1,g=s[A(n)](),y=s[I(n)](),m=s[D(n)](),_=(i instanceof a.Z?i:(0,o.G8)(i||o.sO)||(0,o.Li)()).getModel("time"),x=_.get("month"),b=_.get("monthAbbr"),w=_.get("dayOfWeek"),S=_.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,l+"").replace(/{yy}/g,l%100+"").replace(/{Q}/g,c+"").replace(/{MMMM}/g,x[u-1]).replace(/{MMM}/g,b[u-1]).replace(/{MM}/g,v(u,2)).replace(/{M}/g,u+"").replace(/{dd}/g,v(h,2)).replace(/{d}/g,h+"").replace(/{eeee}/g,w[p]).replace(/{ee}/g,S[p]).replace(/{e}/g,p+"").replace(/{HH}/g,v(d,2)).replace(/{H}/g,d+"").replace(/{hh}/g,v(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,v(g,2)).replace(/{m}/g,g+"").replace(/{ss}/g,v(y,2)).replace(/{s}/g,y+"").replace(/{SSS}/g,v(m,3)).replace(/{S}/g,m+"")}function b(t,e,n,r,o){var a=null;if("string"==typeof n)a=n;else if("function"==typeof n)a=n(t.value,e,{level:t.level});else{var s=i.l7({},p);if(t.level>0)for(var l=0;l<f.length;++l)s[f[l]]="{primary|"+s[f[l]]+"}";var u=n?!1===n.inherit?n:i.ce(n,s):s,c=w(t.value,o);if(u[c])a=u[c];else if(u.inherit){for(l=g.indexOf(c)-1;l>=0;--l)if(u[c]){a=u[c];break}a=a||s.none}if(i.kJ(a)){var h=null==t.level?0:t.level>=0?t.level:a.length+t.level;a=a[h=Math.min(h,a.length-1)]}}return x(new Date(t.value),a,o,r)}function w(t,e){var n=r.sG(t),i=n[M(e)]()+1,o=n[C(e)](),a=n[k(e)](),s=n[A(e)](),l=n[I(e)](),u=0===n[D(e)](),c=u&&0===l,h=c&&0===s,p=h&&0===a,d=p&&1===o;return d&&1===i?"year":d?"month":p?"day":h?"hour":c?"minute":u?"second":"millisecond"}function S(t,e,n){var i="number"==typeof t?r.sG(t):t;switch(e=e||w(t,n)){case"year":return i[T(n)]();case"half-year":return i[M(n)]()>=6?1:0;case"quarter":return Math.floor((i[M(n)]()+1)/4);case"month":return i[M(n)]();case"day":return i[C(n)]();case"half-day":return i[k(n)]()/24;case"hour":return i[k(n)]();case"minute":return i[A(n)]();case"second":return i[I(n)]();case"millisecond":return i[D(n)]()}}function T(t){return t?"getUTCFullYear":"getFullYear"}function M(t){return t?"getUTCMonth":"getMonth"}function C(t){return t?"getUTCDate":"getDate"}function k(t){return t?"getUTCHours":"getHours"}function A(t){return t?"getUTCMinutes":"getMinutes"}function I(t){return t?"getUTCSeconds":"getSeconds"}function D(t){return t?"getUTCSeconds":"getSeconds"}function P(t){return t?"setUTCFullYear":"setFullYear"}function O(t){return t?"setUTCMonth":"setMonth"}function L(t){return t?"setUTCDate":"setDate"}function R(t){return t?"setUTCHours":"setHours"}function E(t){return t?"setUTCMinutes":"setMinutes"}function Z(t){return t?"setUTCSeconds":"setSeconds"}function N(t){return t?"setUTCSeconds":"setSeconds"}},7252:(t,e,n)=>{"use strict";n.d(e,{f7:()=>i,cy:()=>r,XD:()=>o,qb:()=>a,hL:()=>s,J5:()=>l,RA:()=>u,fY:()=>c,Wc:()=>h});var i=(0,n(8778).kW)(["tooltip","label","itemName","itemId","seriesName"]),r="original",o="arrayRows",a="objectRows",s="keyedColumns",l="typedArray",u="unknown",c="column",h="row"},2916:(t,e,n)=>{"use strict";n.d(e,{Z:()=>_});var i=n(8778),r=n(6454),o=n(4053),a=n(4536),s=n(5495),l=n(106),u=n(5193),c=n(760),h=s.Yf(),p=(0,c.Z)(),d=function(){function t(){this.group=new r.Z,this.uid=o.Kr("viewChart"),this.renderTask=(0,u.v)({plan:v,reset:y}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.highlight=function(t,e,n,i){g(t.getData(),i,"emphasis")},t.prototype.downplay=function(t,e,n,i){g(t.getData(),i,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.markUpdateMethod=function(t,e){h(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function f(t,e,n){t&&("emphasis"===e?l.fD:l.Mh)(t,n)}function g(t,e,n){var r=s.gO(t,e),o=e&&null!=e.highlightKey?(0,l.RW)(e.highlightKey):null;null!=r?(0,i.S6)(s.kF(r),(function(e){f(t.getItemGraphicEl(e),n,o)})):t.eachItemGraphicEl((function(t){f(t,n,o)}))}function v(t){return p(t.model)}function y(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&h(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),m[l]}a.dm(d,["dispose"]),a.au(d,{registerWhenExtend:!0});var m={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};const _=d},8278:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(6454),r=n(4053),o=n(4536),a=function(){function t(){this.group=new i.Z,this.uid=r.Kr("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){},t.prototype.updateLayout=function(t,e,n,i){},t.prototype.updateVisual=function(t,e,n,i){},t.prototype.blurSeries=function(t,e){},t}();o.dm(a),o.au(a,{registerWhenExtend:!0});const s=a},9312:(t,e,n)=>{"use strict";n.d(e,{ZT:()=>r,pr:()=>o});var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function o(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,r++)i[r]=o[a];return i}},810:(t,e,n)=>{"use strict";function i(t,e,n,i,r,o,a,s){var l,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=l):r&&(l=s?function(){r.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(t,e){return l.call(e),c(t,e)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:u}}n.d(e,{Z:()=>i})},9441:(t,e,n)=>{"use strict";function i(t,e){for(var n=[],i={},r=0;r<e.length;r++){var o=e[r],a=o[0],s={id:t+":"+r,css:o[1],media:o[2],sourceMap:o[3]};i[a]?i[a].parts.push(s):n.push(i[a]={id:a,parts:[s]})}return n}n.d(e,{Z:()=>f});var r="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!r)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o={},a=r&&(document.head||document.getElementsByTagName("head")[0]),s=null,l=0,u=!1,c=function(){},h=null,p="data-vue-ssr-id",d="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function f(t,e,n,r){u=n,h=r||{};var a=i(t,e);return g(a),function(e){for(var n=[],r=0;r<a.length;r++){var s=a[r];(l=o[s.id]).refs--,n.push(l)}for(e?g(a=i(t,e)):a=[],r=0;r<n.length;r++){var l;if(0===(l=n[r]).refs){for(var u=0;u<l.parts.length;u++)l.parts[u]();delete o[l.id]}}}}function g(t){for(var e=0;e<t.length;e++){var n=t[e],i=o[n.id];if(i){i.refs++;for(var r=0;r<i.parts.length;r++)i.parts[r](n.parts[r]);for(;r<n.parts.length;r++)i.parts.push(y(n.parts[r]));i.parts.length>n.parts.length&&(i.parts.length=n.parts.length)}else{var a=[];for(r=0;r<n.parts.length;r++)a.push(y(n.parts[r]));o[n.id]={id:n.id,refs:1,parts:a}}}}function v(){var t=document.createElement("style");return t.type="text/css",a.appendChild(t),t}function y(t){var e,n,i=document.querySelector("style["+p+'~="'+t.id+'"]');if(i){if(u)return c;i.parentNode.removeChild(i)}if(d){var r=l++;i=s||(s=v()),e=x.bind(null,i,r,!1),n=x.bind(null,i,r,!0)}else i=v(),e=b.bind(null,i),n=function(){i.parentNode.removeChild(i)};return e(t),function(i){if(i){if(i.css===t.css&&i.media===t.media&&i.sourceMap===t.sourceMap)return;e(t=i)}else n()}}var m,_=(m=[],function(t,e){return m[t]=e,m.filter(Boolean).join("\n")});function x(t,e,n,i){var r=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=_(e,r);else{var o=document.createTextNode(r),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function b(t,e){var n=e.css,i=e.media,r=e.sourceMap;if(i&&t.setAttribute("media",i),h.ssrId&&t.setAttribute(p,e.id),r&&(n+="\n/*# sourceURL="+r.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}},8073:(t,e,n)=>{"use strict";n.d(e,{Z:()=>w});var i=n(4629),r=n(4017),o=n(9472),a=n(444),s=n(9356),l=n(8778),u=n(5080),c=n(1756),h=n(8781),p="__zr_normal__",d=["x","y","scaleX","scaleY","originX","originY","rotation","ignore"],f={x:!0,y:!0,scaleX:!0,scaleY:!0,originX:!0,originY:!0,rotation:!0,ignore:!1},g={},v=new o.Z(0,0,0,0),y=function(){function t(t){this.id=(0,l.M8)(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=e.attachedTransform,o=void 0,a=void 0,l=!1;r.parent=i?this:null;var u=!1;if(r.x=e.x,r.y=e.y,r.originX=e.originX,r.originY=e.originY,r.rotation=e.rotation,r.scaleX=e.scaleX,r.scaleY=e.scaleY,null!=n.position){var c=v;n.layoutRect?c.copy(n.layoutRect):c.copy(this.getBoundingRect()),i||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(g,n,c):(0,s.wI)(g,n,c),r.x=g.x,r.y=g.y,o=g.align,a=g.verticalAlign;var h=n.origin;if(h&&null!=n.rotation){var p=void 0,d=void 0;"center"===h?(p=.5*c.width,d=.5*c.height):(p=(0,s.GM)(h[0],c.width),d=(0,s.GM)(h[1],c.height)),u=!0,r.originX=-r.x+p+(i?0:c.x),r.originY=-r.y+d+(i?0:c.y)}}null!=n.rotation&&(r.rotation=n.rotation);var f=n.offset;f&&(r.x+=f[0],r.y+=f[1],u||(r.originX=-f[0],r.originY=-f[1]));var y=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,m=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),_=void 0,x=void 0,b=void 0;y&&this.canBeInsideText()?(_=n.insideFill,x=n.insideStroke,null!=_&&"auto"!==_||(_=this.getInsideTextFill()),null!=x&&"auto"!==x||(x=this.getInsideTextStroke(_),b=!0)):(_=n.outsideFill,x=n.outsideStroke,null!=_&&"auto"!==_||(_=this.getOutsideFill()),null!=x&&"auto"!==x||(x=this.getOutsideStroke(_),b=!0)),(_=_||"#000")===m.fill&&x===m.stroke&&b===m.autoStroke&&o===m.align&&a===m.verticalAlign||(l=!0,m.fill=_,m.stroke=x,m.autoStroke=b,m.align=o,m.verticalAlign=a,e.setDefaultTextStyle(m)),l&&e.dirtyStyle(),e.markRedraw()}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?u.GD:u.vU},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&(0,c.Qc)(e);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(r?0:255)*(1-i);return n[3]=1,(0,c.Pz)(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},(0,l.l7)(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if((0,l.Kn)(t))for(var n=t,i=(0,l.XP)(n),r=0;r<i.length;r++){var o=i[r];this.attrKV(o,t[o])}return this.markRedraw(),this},t.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],r=i.__fromStateTransition;if(!r||r===p){var o=i.targetName,a=o?e[o]:e;i.saveFinalToTarget(a)}}},t.prototype._innerSaveToNormal=function(t){var e=this._normalState;e||(e=this._normalState={}),t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,d)},t.prototype._savePrimaryToNormal=function(t,e,n){for(var i=0;i<n.length;i++){var r=n[i];null==t[r]||r in e||(e[r]=this[r])}},t.prototype.hasState=function(){return this.currentStates.length>0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(p,!1,t)},t.prototype.useState=function(e,n,i){var r=e===p;if(this.hasState()||!r){var o=this.currentStates,a=this.stateTransition;if(!((0,l.cq)(o,e)>=0)||!n&&1!==o.length){var s;if(this.stateProxy&&!r&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),s||r){r||this.saveCurrentToNormalState(s);var u=!(!s||!s.hoverLayer);return u&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,n,!i&&!this.__inHover&&a&&a.duration>0,a),this._textContent&&this._textContent.useState(e,n),this._textGuide&&this._textGuide.useState(e,n),r?(this.currentStates=[],this._normalState={}):n?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!u&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~t.REDARAW_BIT),s}(0,l.H)("State "+e+" not exists.")}}},t.prototype.useStates=function(e,n){if(e.length){var i=[],r=this.currentStates,o=e.length,a=o===r.length;if(a)for(var s=0;s<o;s++)if(e[s]!==r[s]){a=!1;break}if(a)return;for(s=0;s<o;s++){var l=e[s],u=void 0;this.stateProxy&&(u=this.stateProxy(l,e)),u||(u=this.states[l]),u&&i.push(u)}var c=!(!i[o-1]||!i[o-1].hoverLayer);c&&this._toggleHoverLayerFlag(!0);var h=this._mergeStates(i),p=this.stateTransition;this.saveCurrentToNormalState(h),this._applyStateObj(e.join(","),h,this._normalState,!1,!n&&!this.__inHover&&p&&p.duration>0,p),this._textContent&&this._textContent.useStates(e),this._textGuide&&this._textGuide.useStates(e),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~t.REDARAW_BIT)}else this.clearStates()},t.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},t.prototype.removeState=function(t){var e=(0,l.cq)(this.currentStates,t);if(e>=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=(0,l.cq)(i,t),o=(0,l.cq)(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.useStates(i)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i<t.length;i++){var r=t[i];(0,l.l7)(n,r),r.textConfig&&(e=e||{},(0,l.l7)(e,r.textConfig))}return e&&(n.textConfig=e),n},t.prototype._applyStateObj=function(t,e,n,i,r,o){var a=!(e&&i);e&&e.textConfig?(this.textConfig=(0,l.l7)({},i?this.textConfig:n.textConfig),(0,l.l7)(this.textConfig,e.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},u=!1,c=0;c<d.length;c++){var h=d[c],p=r&&f[h];e&&null!=e[h]?p?(u=!0,s[h]=e[h]):this[h]=e[h]:a&&null!=n[h]&&(p?(u=!0,s[h]=n[h]):this[h]=n[h])}if(!r)for(c=0;c<this.animators.length;c++){var g=this.animators[c],v=g.targetName;g.__changeFinalValue(v?(e||n)[v]:e||n)}u&&this._transitionState(t,s,o)},t.prototype._attachComponent=function(t){if(t.__zr&&!t.__hostTarget)throw new Error("Text element has been added to zrender.");if(t===this)throw new Error("Recursive component attachment.");var e=this.__zr;e&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this},t.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},t.prototype.getClipPath=function(){return this._clipPath},t.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},t.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},t.prototype.getTextContent=function(){return this._textContent},t.prototype.setTextContent=function(t){var e=this._textContent;if(e!==t){if(e&&e!==t&&this.removeTextContent(),t.__zr&&!t.__hostTarget)throw new Error("Text element has been added to zrender.");t.attachedTransform=new i.Z,this._attachComponent(t),this._textContent=t,this.markRedraw()}},t.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),(0,l.l7)(this.textConfig,t),this.markRedraw()},t.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.attachedTransform=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},t.prototype.getTextGuideLine=function(){return this._textGuide},t.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},t.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},t.prototype.markRedraw=function(){this.__dirty|=t.REDARAW_BIT;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},t.prototype.dirty=function(){this.markRedraw()},t.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,n=this._textGuide;e&&(e.__inHover=t),n&&(n.__inHover=t)},t.prototype.addSelfToZr=function(t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.addAnimator(e[n]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)},t.prototype.removeSelfFromZr=function(t){this.__zr=null;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.removeAnimator(e[n]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)},t.prototype.animate=function(t,e){var n=t?this[t]:this;if(n){var i=new r.ZP(n,e);return this.addAnimator(i,t),i}(0,l.H)('Property "'+t+'" is not existed in element '+this.id)},t.prototype.addAnimator=function(t,e){var n=this.__zr,i=this;t.during((function(){i.updateDuringAnimation(e)})).done((function(){var e=i.animators,n=(0,l.cq)(e,t);n>=0&&e.splice(n,1)})),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o<i;o++){var a=n[o];t&&t!==a.scope?r.push(a):a.stop(e)}return this.animators=r,this},t.prototype.animateTo=function(t,e,n){m(this,t,e,n)},t.prototype.animateFrom=function(t,e,n){m(this,t,e,n,!0)},t.prototype._transitionState=function(t,e,n,i){for(var r=m(this,e,n,i),o=0;o<r.length;o++)r[o].__fromStateTransition=t},t.prototype.getBoundingRect=function(){return null},t.prototype.getPaintRect=function(){return null},t.REDARAW_BIT=1,t.initDefaultProps=function(){var e=t.prototype;e.type="element",e.name="",e.ignore=!1,e.silent=!1,e.isGroup=!1,e.draggable=!1,e.dragging=!1,e.ignoreClip=!1,e.__inHover=!1,e.__dirty=t.REDARAW_BIT;var n={};function i(t,e,i){n[t+e+i]||(console.warn("DEPRECATED: '"+t+"' has been deprecated. use '"+e+"', '"+i+"' instead"),n[t+e+i]=!0)}function r(t,n,r,o){function a(t,e){Object.defineProperty(e,0,{get:function(){return t[r]},set:function(e){t[r]=e}}),Object.defineProperty(e,1,{get:function(){return t[o]},set:function(e){t[o]=e}})}Object.defineProperty(e,t,{get:function(){return i(t,r,o),this[n]||a(this,this[n]=[]),this[n]},set:function(e){i(t,r,o),this[r]=e[0],this[o]=e[1],this[n]=e,a(this,e)}})}Object.defineProperty&&(!h.Z.browser.ie||h.Z.browser.version>8)&&(r("position","_legacyPos","x","y"),r("scale","_legacyScale","scaleX","scaleY"),r("origin","_legacyOrigin","originX","originY"))}(),t}();function m(t,e,n,i,r){var o=[];b(t,"",t,e,n=n||{},i,o,r);var a=o.length,s=!1,l=n.done,u=n.aborted,c=function(){s=!0,--a<=0&&(s?l&&l():u&&u())},h=function(){--a<=0&&(s?l&&l():u&&u())};a||l&&l(),o.length>0&&n.during&&o[0].during((function(t,e){n.during(e)}));for(var p=0;p<o.length;p++){var d=o[p];c&&d.done(c),h&&d.aborted(h),d.start(n.easing,n.force)}return o}function _(t,e,n){for(var i=0;i<n;i++)t[i]=e[i]}function x(t,e,n){if((0,l.zG)(e[n]))if((0,l.zG)(t[n])||(t[n]=[]),(0,l.fU)(e[n])){var i=e[n].length;t[n].length!==i&&(t[n]=new e[n].constructor(i),_(t[n],e[n],i))}else{var r=e[n],o=t[n],a=r.length;if(c=r,(0,l.zG)(c[0]))for(var s=r[0].length,u=0;u<a;u++)o[u]?_(o[u],r[u],s):o[u]=Array.prototype.slice.call(r[u]);else _(o,r,a);o.length=r.length}else t[n]=e[n];var c}function b(t,e,n,i,o,a,s,u){for(var c=[],h=[],p=(0,l.XP)(i),d=o.duration,f=o.delay,g=o.additive,v=o.setToFinal,y=!(0,l.Kn)(a),m=0;m<p.length;m++)if(null!=n[I=p[m]]&&null!=i[I]&&(y||a[I]))if((0,l.Kn)(i[I])&&!(0,l.zG)(i[I])){if(e){u||(n[I]=i[I],t.updateDuringAnimation(e));continue}b(t,I,n[I],i[I],o,a&&a[I],s,u)}else c.push(I),h.push(I);else u||(n[I]=i[I],t.updateDuringAnimation(e),h.push(I));var _=c.length;if(_>0||o.force&&!s.length){for(var w=t.animators,S=[],T=0;T<w.length;T++)w[T].targetName===e&&S.push(w[T]);if(!g&&S.length)for(T=0;T<S.length;T++)if(S[T].stopTracks(h)){var M=(0,l.cq)(w,S[T]);w.splice(M,1)}var C=void 0,k=void 0,A=void 0;if(u)for(k={},v&&(C={}),T=0;T<_;T++)k[I=c[T]]=n[I],v?C[I]=i[I]:n[I]=i[I];else if(v)for(A={},T=0;T<_;T++){var I;A[I=c[T]]=(0,r.Ve)(n[I]),x(n,i,I)}var D=new r.ZP(n,!1,g?S:null);D.targetName=e,o.scope&&(D.scope=o.scope),v&&C&&D.whenWithKeys(0,C,c),A&&D.whenWithKeys(0,A,c),D.whenWithKeys(null==d?500:d,u?k:i,c).delay(f||0),t.addAnimator(D,e),s.push(D)}}(0,l.jB)(y,a.Z),(0,l.jB)(y,i.Z);const w=y},4017:(t,e,n)=>{"use strict";n.d(e,{Ve:()=>y,ZP:()=>b,k4:()=>u});var i={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-i.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*i.bounceIn(2*t):.5*i.bounceOut(2*t-1)+.5}};const r=i,o=function(){function t(t){this._initialized=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}return t.prototype.step=function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),!this._paused){var n=(t-this._startTime-this._pausedTime)/this._life;n<0&&(n=0),n=Math.min(n,1);var i=this.easing,o="string"==typeof i?r[i]:i,a="function"==typeof o?o(n):n;if(this.onframe&&this.onframe(a),1===n){if(!this.loop)return!0;this._restart(t),this.onrestart&&this.onrestart()}return!1}this._pausedTime+=e},t.prototype._restart=function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t}();var a=n(1756),s=n(8778),l=Array.prototype.slice;function u(t,e,n){return(e-t)*n+t}function c(t,e,n,i){for(var r=e.length,o=0;o<r;o++)t[o]=u(e[o],n[o],i)}function h(t,e,n,i){for(var r=e.length,o=0;o<r;o++)t[o]=e[o]+n[o]*i;return t}function p(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a<r;a++){t[a]||(t[a]=[]);for(var s=0;s<o;s++)t[a][s]=e[a][s]+n[a][s]*i}return t}function d(t,e,n){var i=t,r=e;if(i.push&&r.push){var o=i.length,a=r.length;if(o!==a)if(o>a)i.length=a;else for(var s=o;s<a;s++)i.push(1===n?r[s]:l.call(r[s]));var u=i[0]&&i[0].length;for(s=0;s<i.length;s++)if(1===n)isNaN(i[s])&&(i[s]=r[s]);else for(var c=0;c<u;c++)isNaN(i[s][c])&&(i[s][c]=r[s][c])}}function f(t,e){var n=t.length;if(n!==e.length)return!1;for(var i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}function g(t,e,n,i,r,o,a){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*a+(-3*(e-n)-2*s-l)*o+s*r+e}function v(t,e,n,i,r,o,a,s){for(var l=e.length,u=0;u<l;u++)t[u]=g(e[u],n[u],i[u],r[u],o,a,s)}function y(t){if((0,s.zG)(t)){var e=t.length;if((0,s.zG)(t[0])){for(var n=[],i=0;i<e;i++)n.push(l.call(t[i]));return n}return l.call(t)}return t}function m(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}var _=[0,0,0,0],x=function(){function t(t){this.keyframes=[],this.maxTime=0,this.arrDim=0,this.interpolable=!0,this._needsSort=!1,this._isAllValueEqual=!0,this._lastFrame=0,this._lastFramePercent=0,this.propName=t}return t.prototype.isFinished=function(){return this._finished},t.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},t.prototype.needsAnimate=function(){return!this._isAllValueEqual&&this.keyframes.length>=2&&this.interpolable},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e){t>=this.maxTime?this.maxTime=t:this._needsSort=!0;var n=this.keyframes,i=n.length;if(this.interpolable)if((0,s.zG)(e)){var r=function(t){return(0,s.zG)(t&&t[0])?2:1}(e);if(i>0&&this.arrDim!==r)return void(this.interpolable=!1);if(1===r&&"number"!=typeof e[0]||2===r&&"number"!=typeof e[0][0])return void(this.interpolable=!1);if(i>0){var o=n[i-1];this._isAllValueEqual&&(1===r&&f(e,o.value)||(this._isAllValueEqual=!1))}this.arrDim=r}else{if(this.arrDim>0)return void(this.interpolable=!1);if("string"==typeof e){var l=a.Qc(e);l?(e=l,this.isValueColor=!0):this.interpolable=!1}else if("number"!=typeof e)return void(this.interpolable=!1);this._isAllValueEqual&&i>0&&(o=n[i-1],(this.isValueColor&&!f(o.value,e)||o.value!==e)&&(this._isAllValueEqual=!1))}var u={time:t,value:e,percent:0};return this.keyframes.push(u),u},t.prototype.prepare=function(t){var e=this.keyframes;this._needsSort&&e.sort((function(t,e){return t.time-e.time}));for(var n=this.arrDim,i=e.length,r=e[i-1],o=0;o<i;o++)e[o].percent=e[o].time/this.maxTime,n>0&&o!==i-1&&d(e[o].value,r.value,n);if(t&&this.needsAnimate()&&t.needsAnimate()&&n===t.arrDim&&this.isValueColor===t.isValueColor&&!t._finished){this._additiveTrack=t;var a=e[0].value;for(o=0;o<i;o++)0===n?this.isValueColor?e[o].additiveValue=h([],e[o].value,a,-1):e[o].additiveValue=e[o].value-a:1===n?e[o].additiveValue=h([],e[o].value,a,-1):2===n&&(e[o].additiveValue=p([],e[o].value,a,-1))}},t.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,i=null!=this._additiveTrack,r=i?"additiveValue":"value",o=this.keyframes,a=this.keyframes.length,s=this.propName,l=this.arrDim,h=this.isValueColor;if(e<0)n=0;else if(e<this._lastFramePercent){for(n=Math.min(this._lastFrame+1,a-1);n>=0&&!(o[n].percent<=e);n--);n=Math.min(n,a-2)}else{for(n=this._lastFrame;n<a&&!(o[n].percent>e);n++);n=Math.min(n-1,a-2)}var p=o[n+1],d=o[n];if(d&&p){this._lastFrame=n,this._lastFramePercent=e;var f=p.percent-d.percent;if(0!==f){var y=(e-d.percent)/f,x=i?this._additiveValue:h?_:t[s];if((l>0||h)&&!x&&(x=this._additiveValue=[]),this.useSpline){var b=o[n][r],w=o[0===n?n:n-1][r],S=o[n>a-2?a-1:n+1][r],T=o[n>a-3?a-1:n+2][r];if(l>0)1===l?v(x,w,b,S,T,y,y*y,y*y*y):function(t,e,n,i,r,o,a,s){for(var l=e.length,u=e[0].length,c=0;c<l;c++){t[c]||(t[1]=[]);for(var h=0;h<u;h++)t[c][h]=g(e[c][h],n[c][h],i[c][h],r[c][h],o,a,s)}}(x,w,b,S,T,y,y*y,y*y*y);else if(h)v(x,w,b,S,T,y,y*y,y*y*y),i||(t[s]=m(x));else{var M=void 0;M=this.interpolable?g(w,b,S,T,y,y*y,y*y*y):S,i?this._additiveValue=M:t[s]=M}}else l>0?1===l?c(x,d[r],p[r],y):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a<r;a++){t[a]||(t[a]=[]);for(var s=0;s<o;s++)t[a][s]=u(e[a][s],n[a][s],i)}}(x,d[r],p[r],y):h?(c(x,d[r],p[r],y),i||(t[s]=m(x))):(M=void 0,M=this.interpolable?u(d[r],p[r],y):function(t,e,n){return n>.5?e:t}(d[r],p[r],y),i?this._additiveValue=M:t[s]=M);i&&this._addToTarget(t)}}}},t.prototype._addToTarget=function(t){var e=this.arrDim,n=this.propName,i=this._additiveValue;0===e?this.isValueColor?(a.Qc(t[n],_),h(_,_,i,1),t[n]=m(_)):t[n]=t[n]+i:1===e?h(t[n],t[n],i,1):2===e&&p(t[n],t[n],i,1)},t}();const b=function(){function t(t,e,n){this._tracks={},this._trackKeys=[],this._delay=0,this._maxTime=0,this._paused=!1,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n?(0,s.H)("Can' use additive animation on looped animation."):this._additiveAnimators=n}return t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(t){this._target=t},t.prototype.when=function(t,e){return this.whenWithKeys(t,e,(0,s.XP)(e))},t.prototype.whenWithKeys=function(t,e,n){for(var i=this._tracks,r=0;r<n.length;r++){var o=n[r],a=i[o];if(!a){a=i[o]=new x(o);var s=void 0,l=this._getAdditiveTrack(o);if(l){var u=l.keyframes[l.keyframes.length-1];s=u&&u.value,l.isValueColor&&s&&(s=m(s))}else s=this._target[o];if(null==s)continue;0!==t&&a.addKeyframe(0,y(s)),this._trackKeys.push(o)}a.addKeyframe(t,y(e[o]))}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneList;if(t)for(var e=t.length,n=0;n<e;n++)t[n].call(this)},t.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedList;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var n=0;n<e.length;n++)e[n].call(this)},t.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,n=0;n<e.length;n++)t[e[n]].setFinished()},t.prototype._getAdditiveTrack=function(t){var e,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var r=n[i].getTrack(t);r&&(e=r)}return e},t.prototype.start=function(t,e){if(!(this._started>0)){this._started=1;for(var n=this,i=[],r=0;r<this._trackKeys.length;r++){var a=this._trackKeys[r],s=this._tracks[a],l=this._getAdditiveTrack(a),u=s.keyframes;if(s.prepare(l),s.needsAnimate())i.push(s);else if(!s.interpolable){var c=u[u.length-1];c&&(n._target[s.propName]=c.value)}}if(i.length||e){var h=new o({life:this._maxTime,loop:this._loop,delay:this._delay,onframe:function(t){n._started=2;var e=n._additiveAnimators;if(e){for(var r=!1,o=0;o<e.length;o++)if(e[o]._clip){r=!0;break}r||(n._additiveAnimators=null)}for(o=0;o<i.length;o++)i[o].step(n._target,t);var a=n._onframeList;if(a)for(o=0;o<a.length;o++)a[o](n._target,t)},ondestroy:function(){n._doneCallback()}});this._clip=h,this.animation&&this.animation.addClip(h),t&&"spline"!==t&&(h.easing=t)}else this._doneCallback();return this}},t.prototype.stop=function(t){if(this._clip){var e=this._clip;t&&e.onframe(1),this._abortedCallback()}},t.prototype.delay=function(t){return this._delay=t,this},t.prototype.during=function(t){return t&&(this._onframeList||(this._onframeList=[]),this._onframeList.push(t)),this},t.prototype.done=function(t){return t&&(this._doneList||(this._doneList=[]),this._doneList.push(t)),this},t.prototype.aborted=function(t){return t&&(this._abortedList||(this._abortedList=[]),this._abortedList.push(t)),this},t.prototype.getClip=function(){return this._clip},t.prototype.getTrack=function(t){return this._tracks[t]},t.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,r=0;r<t.length;r++){var o=n[t[r]];o&&(e?o.step(this._target,1):1===this._started&&o.step(this._target,0),o.setFinished())}var a=!0;for(r=0;r<i.length;r++)if(!n[i[r]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},t.prototype.saveFinalToTarget=function(t,e){if(t){e=e||this._trackKeys;for(var n=0;n<e.length;n++){var i=e[n],r=this._tracks[i];if(r&&!r.isFinished()){var o=r.keyframes,a=o[o.length-1];if(a){var s=y(a.value);r.isValueColor&&(s=m(s)),t[i]=s}}}}},t.prototype.__changeFinalValue=function(t,e){e=e||(0,s.XP)(t);for(var n=0;n<e.length;n++){var i=e[n],r=this._tracks[i];if(r){var o=r.keyframes;if(o.length>1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(r.getAdditiveTrack())}}}},t}()},5080:(t,e,n)=>{"use strict";n.d(e,{KL:()=>r,Ak:()=>o,vU:()=>a,GD:()=>s,iv:()=>l});var i=1;"undefined"!=typeof window&&(i=Math.max(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var r=i,o=.4,a="#333",s="#ccc",l="#eee"},9356:(t,e,n)=>{"use strict";n.d(e,{Uo:()=>u,dz:()=>h,lP:()=>d,M3:()=>f,mU:()=>g,Dp:()=>v,GM:()=>y,wI:()=>m});var i,r,o=n(9472),a=n(8778),s=n(4290),l={},u="12px sans-serif",c=function(t,e){return i||(i=(0,a.vL)().getContext("2d")),r!==e&&(r=i.font=e||u),i.measureText(t)};function h(t,e){var n=l[e=e||u];n||(n=l[e]=new s.ZP(500));var i=n.get(t);return null==i&&(i=c(t,e).width,n.put(t,i)),i}function p(t,e,n,i){var r=h(t,e),a=v(e),s=f(0,r,n),l=g(0,a,i);return new o.Z(s,l,r,a)}function d(t,e,n,i){var r=((t||"")+"").split("\n");if(1===r.length)return p(r[0],e,n,i);for(var a=new o.Z(0,0,0,0),s=0;s<r.length;s++){var l=p(r[s],e,n,i);0===s?a.copy(l):a.union(l)}return a}function f(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function g(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function v(t){return h("国",t)}function y(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function m(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,c="left",h="top";if(i instanceof Array)l+=y(i[0],n.width),u+=y(i[1],n.height),c=null,h=null;else switch(i){case"left":l-=r,u+=s,c="right",h="middle";break;case"right":l+=r+a,u+=s,h="middle";break;case"top":l+=a/2,u-=r,c="center",h="bottom";break;case"bottom":l+=a/2,u+=o+r,c="center";break;case"inside":l+=a/2,u+=s,c="center",h="middle";break;case"insideLeft":l+=r,u+=s,h="middle";break;case"insideRight":l+=a-r,u+=s,c="right",h="middle";break;case"insideTop":l+=a/2,u+=r,c="center";break;case"insideBottom":l+=a/2,u+=o-r,c="center",h="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,c="right";break;case"insideBottomLeft":l+=r,u+=o-r,h="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,c="right",h="bottom"}return(t=t||{}).x=l,t.y=u,t.align=c,t.verticalAlign=h,t}},7096:(t,e,n)=>{"use strict";n.d(e,{m:()=>r});var i=2*Math.PI;function r(t){return(t%=i)<0&&(t+=i),t}},9472:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});var i=n(561),r=n(6),o=Math.min,a=Math.max,s=new r.Z,l=new r.Z,u=new r.Z,c=new r.Z,h=new r.Z,p=new r.Z;const d=function(){function t(t,e,n,i){n<0&&isFinite(n)&&(t+=n,n=-n),i<0&&isFinite(i)&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return t.prototype.union=function(t){var e=o(t.x,this.x),n=o(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=a(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=a(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,r=t.height/e.height,o=i.Ue();return i.Iu(o,o,[-e.x,-e.y]),i.bA(o,o,[n,r]),i.Iu(o,o,[t.x,t.y]),o},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var i=this,o=i.x,a=i.x+i.width,s=i.y,l=i.y+i.height,u=e.x,c=e.x+e.width,d=e.y,f=e.y+e.height,g=!(a<u||c<o||l<d||f<s);if(n){var v=1/0,y=0,m=Math.abs(a-u),_=Math.abs(c-o),x=Math.abs(l-d),b=Math.abs(f-s),w=Math.min(m,_),S=Math.min(x,b);a<u||c<o?w>y&&(y=w,m<_?r.Z.set(p,-m,0):r.Z.set(p,_,0)):w<v&&(v=w,m<_?r.Z.set(h,m,0):r.Z.set(h,-_,0)),l<d||f<s?S>y&&(y=S,x<b?r.Z.set(p,0,-x):r.Z.set(p,0,b)):w<v&&(v=w,x<b?r.Z.set(h,0,x):r.Z.set(h,0,-b))}return n&&r.Z.copy(n,g?h:p),g},t.prototype.contain=function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],h=i[3],p=i[4],d=i[5];return e.x=n.x*r+p,e.y=n.y*h+d,e.width=n.width*r,e.height=n.height*h,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}s.x=u.x=n.x,s.y=c.y=n.y,l.x=c.x=n.x+n.width,l.y=u.y=n.y+n.height,s.transform(i),c.transform(i),l.transform(i),u.transform(i),e.x=o(s.x,l.x,u.x,c.x),e.y=o(s.y,l.y,u.y,c.y);var f=a(s.x,l.x,u.x,c.x),g=a(s.y,l.y,u.y,c.y);e.width=f-e.x,e.height=g-e.y}else e!==n&&t.copy(e,n)},t}()},444:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t){t&&(this._$eventProcessor=t)}return t.prototype.on=function(t,e,n,i){this._$handlers||(this._$handlers={});var r=this._$handlers;if("function"==typeof e&&(i=n,n=e,e=null),!n||!t)return this;var o=this._$eventProcessor;null!=e&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),r[t]||(r[t]=[]);for(var a=0;a<r[t].length;a++)if(r[t][a].h===n)return this;var s={h:n,query:e,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},l=r[t].length-1,u=r[t][l];return u&&u.callAtLast?r[t].splice(l,0,s):r[t].push(s),this},t.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},t.prototype.off=function(t,e){var n=this._$handlers;if(!n)return this;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],r=0,o=n[t].length;r<o;r++)n[t][r].h!==e&&i.push(n[t][r]);n[t]=i}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},t.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],r=this._$eventProcessor;if(i)for(var o=e.length,a=i.length,s=0;s<a;s++){var l=i[s];if(!r||!r.filter||null==l.query||r.filter(t,l.query))switch(o){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,e[0]);break;case 2:l.h.call(l.ctx,e[0],e[1]);break;default:l.h.apply(l.ctx,e)}}return r&&r.afterTrigger&&r.afterTrigger(t),this},t.prototype.triggerWithContext=function(t){if(!this._$handlers)return this;var e=this._$handlers[t],n=this._$eventProcessor;if(e)for(var i=arguments,r=i.length,o=i[r-1],a=e.length,s=0;s<a;s++){var l=e[s];if(!n||!n.filter||null==l.query||n.filter(t,l.query))switch(r){case 0:l.h.call(o);break;case 1:l.h.call(o,i[0]);break;case 2:l.h.call(o,i[0],i[1]);break;default:l.h.apply(o,i.slice(1,r-1))}}return n&&n.afterTrigger&&n.afterTrigger(t),this},t}()},4290:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>o});var i=function(t){this.value=t},r=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new i(t);return this.insertEntry(e),e},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}();const o=function(){function t(t){this._list=new r,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,r=this._map,o=null;if(null==r[t]){var a=n.len(),s=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var l=n.head;n.remove(l),delete r[l.key],o=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new i(e),s.key=t,n.insertEntry(s),r[t]=s}return o},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}()},8511:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(6),r=[0,0],o=[0,0],a=new i.Z,s=new i.Z;const l=function(){function t(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new i.Z;for(n=0;n<2;n++)this._axes[n]=new i.Z;t&&this.fromBoundingRect(t,e)}return t.prototype.fromBoundingRect=function(t,e){var n=this._corners,r=this._axes,o=t.x,a=t.y,s=o+t.width,l=a+t.height;if(n[0].set(o,a),n[1].set(s,a),n[2].set(s,l),n[3].set(o,l),e)for(var u=0;u<4;u++)n[u].transform(e);for(i.Z.sub(r[0],n[1],n[0]),i.Z.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize(),u=0;u<2;u++)this._origin[u]=r[u].dot(n[0])},t.prototype.intersect=function(t,e){var n=!0,r=!e;return a.set(1/0,1/0),s.set(0,0),!this._intersectCheckOneSide(this,t,a,s,r,1)&&(n=!1,r)||!this._intersectCheckOneSide(t,this,a,s,r,-1)&&(n=!1,r)||r||i.Z.copy(e,n?a:s),n},t.prototype._intersectCheckOneSide=function(t,e,n,a,s,l){for(var u=!0,c=0;c<2;c++){var h=this._axes[c];if(this._getProjMinMaxOnAxis(c,t._corners,r),this._getProjMinMaxOnAxis(c,e._corners,o),r[1]<o[0]||r[0]>o[1]){if(u=!1,s)return u;var p=Math.abs(o[0]-r[1]),d=Math.abs(r[0]-o[1]);Math.min(p,d)>a.len()&&(p<d?i.Z.scale(a,h,-p*l):i.Z.scale(a,h,d*l))}else n&&(p=Math.abs(o[0]-r[1]),d=Math.abs(r[0]-o[1]),Math.min(p,d)<n.len()&&(p<d?i.Z.scale(n,h,p*l):i.Z.scale(n,h,-d*l)))}return u},t.prototype._getProjMinMaxOnAxis=function(t,e,n){for(var i=this._axes[t],r=this._origin,o=e[0].dot(i)+r[t],a=o,s=o,l=1;l<e.length;l++){var u=e[l].dot(i)+r[t];a=Math.min(u,a),s=Math.max(u,s)}n[0]=a,n[1]=s},t}()},2397:(t,e,n)=>{"use strict";n.d(e,{Z:()=>F,L:()=>z});var i=n(213),r=n(9472),o=n(5080),a=n(3475),s=Math.min,l=Math.max,u=Math.sin,c=Math.cos,h=2*Math.PI,p=i.Ue(),d=i.Ue(),f=i.Ue();function g(t,e,n,i,r,o){r[0]=s(t,n),r[1]=s(e,i),o[0]=l(t,n),o[1]=l(e,i)}var v=[],y=[];function m(t,e,n,i,r,o,u,c,h,p){var d=a.pP,f=a.af,g=d(t,n,r,u,v);h[0]=1/0,h[1]=1/0,p[0]=-1/0,p[1]=-1/0;for(var m=0;m<g;m++){var _=f(t,n,r,u,v[m]);h[0]=s(_,h[0]),p[0]=l(_,p[0])}for(g=d(e,i,o,c,y),m=0;m<g;m++){var x=f(e,i,o,c,y[m]);h[1]=s(x,h[1]),p[1]=l(x,p[1])}h[0]=s(t,h[0]),p[0]=l(t,p[0]),h[0]=s(u,h[0]),p[0]=l(u,p[0]),h[1]=s(e,h[1]),p[1]=l(e,p[1]),h[1]=s(c,h[1]),p[1]=l(c,p[1])}function _(t,e,n,i,r,o,u,c){var h=a.QC,p=a.Zm,d=l(s(h(t,n,r),1),0),f=l(s(h(e,i,o),1),0),g=p(t,n,r,d),v=p(e,i,o,f);u[0]=s(t,r,g),u[1]=s(e,o,v),c[0]=l(t,r,g),c[1]=l(e,o,v)}function x(t,e,n,r,o,a,s,l,g){var v=i.VV,y=i.Fp,m=Math.abs(o-a);if(m%h<1e-4&&m>1e-4)return l[0]=t-n,l[1]=e-r,g[0]=t+n,void(g[1]=e+r);if(p[0]=c(o)*n+t,p[1]=u(o)*r+e,d[0]=c(a)*n+t,d[1]=u(a)*r+e,v(l,p,d),y(g,p,d),(o%=h)<0&&(o+=h),(a%=h)<0&&(a+=h),o>a&&!s?a+=h:o<a&&s&&(o+=h),s){var _=a;a=o,o=_}for(var x=0;x<a;x+=Math.PI/2)x>o&&(f[0]=c(x)*n+t,f[1]=u(x)*r+e,v(l,f,l),y(g,f,g))}var b={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},w=[],S=[],T=[],M=[],C=[],k=[],A=Math.min,I=Math.max,D=Math.cos,P=Math.sin,O=Math.sqrt,L=Math.abs,R=Math.PI,E=2*R,Z="undefined"!=typeof Float32Array,N=[];function B(t){return Math.round(t/R*1e8)/1e8%2*R}function z(t,e){var n=B(t[0]);n<0&&(n+=E);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=E?r=n+E:e&&n-r>=E?r=n-E:!e&&n>r?r=n+(E-B(n-r)):e&&n<r&&(r=n-(E-B(r-n))),t[0]=n,t[1]=r}const F=function(){function t(t){this.dpr=1,this._version=0,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}var e;return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(t,e,n){(n=n||0)>0&&(this._ux=L(n/o.KL/t)||0,this._uy=L(n/o.KL/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this.addData(b.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=L(t-this._xi)>this._ux||L(e-this._yi)>this._uy||this._len<5;return this.addData(b.L,t,e),this._ctx&&n&&(this._needsDash?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this.addData(b.C,t,e,n,i,r,o),this._ctx&&(this._needsDash?this._dashedBezierTo(t,e,n,i,r,o):this._ctx.bezierCurveTo(t,e,n,i,r,o)),this._xi=r,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,i){return this.addData(b.Q,t,e,n,i),this._ctx&&(this._needsDash?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},t.prototype.arc=function(t,e,n,i,r,o){N[0]=i,N[1]=r,z(N,o),i=N[0];var a=(r=N[1])-i;return this.addData(b.A,t,e,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=D(r)*n+t,this._yi=P(r)*n+e,this},t.prototype.arcTo=function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},t.prototype.rect=function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(b.R,t,e,n,i),this},t.prototype.closePath=function(){this.addData(b.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.setLineDash=function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,n=0;n<t.length;n++)e+=t[n];this._dashSum=e,this._needsDash=!0}else this._lineDash=null,this._needsDash=!1;return this},t.prototype.setLineDashOffset=function(t){return this._dashOffset=t,this},t.prototype.len=function(){return this._len},t.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!Z||(this.data=new Float32Array(e));for(var n=0;n<e;n++)this.data[n]=t[n];this._len=e},t.prototype.appendPath=function(t){t instanceof Array||(t=[t]);for(var e=t.length,n=0,i=this._len,r=0;r<e;r++)n+=t[r].len();for(Z&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n)),r=0;r<e;r++)for(var o=t[r].data,a=0;a<o.length;a++)this.data[i++]=o[a];this._len=i},t.prototype.addData=function(t,e,n,i,r,o,a,s,l){if(this._saveData){var u=this.data;this._len+arguments.length>u.length&&(this._expandData(),u=this.data);for(var c=0;c<arguments.length;c++)u[this._len++]=arguments[c]}},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},t.prototype._dashedLineTo=function(t,e){var n,i,r=this._dashSum,o=this._lineDash,a=this._ctx,s=this._dashOffset,l=this._xi,u=this._yi,c=t-l,h=e-u,p=O(c*c+h*h),d=l,f=u,g=o.length;for(s<0&&(s=r+s),d-=(s%=r)*(c/=p),f-=s*(h/=p);c>0&&d<=t||c<0&&d>=t||0===c&&(h>0&&f<=e||h<0&&f>=e);)d+=c*(n=o[i=this._dashIdx]),f+=h*n,this._dashIdx=(i+1)%g,c>0&&d<l||c<0&&d>l||h>0&&f<u||h<0&&f>u||a[i%2?"moveTo":"lineTo"](c>=0?A(d,t):I(d,t),h>=0?A(f,e):I(f,e));c=d-t,h=f-e,this._dashOffset=-O(c*c+h*h)},t.prototype._dashedBezierTo=function(t,e,n,i,r,o){var s,l,u,c,h,p=this._ctx,d=this._dashSum,f=this._dashOffset,g=this._lineDash,v=this._xi,y=this._yi,m=0,_=this._dashIdx,x=g.length,b=0;for(f<0&&(f=d+f),f%=d,s=0;s<1;s+=.1)l=(0,a.af)(v,t,n,r,s+.1)-(0,a.af)(v,t,n,r,s),u=(0,a.af)(y,e,i,o,s+.1)-(0,a.af)(y,e,i,o,s),m+=O(l*l+u*u);for(;_<x&&!((b+=g[_])>f);_++);for(s=(b-f)/m;s<=1;)c=(0,a.af)(v,t,n,r,s),h=(0,a.af)(y,e,i,o,s),_%2?p.moveTo(c,h):p.lineTo(c,h),s+=g[_]/m,_=(_+1)%x;_%2!=0&&p.lineTo(r,o),l=r-c,u=o-h,this._dashOffset=-O(l*l+u*u)},t.prototype._dashedQuadraticTo=function(t,e,n,i){var r=n,o=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,r,o)},t.prototype.toStatic=function(){if(this._saveData){var t=this.data;t instanceof Array&&(t.length=this._len,Z&&this._len>11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){T[0]=T[1]=C[0]=C[1]=Number.MAX_VALUE,M[0]=M[1]=k[0]=k[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,o=0,a=0,s=0;for(t=0;t<this._len;){var l=e[t++],u=1===t;switch(u&&(a=n=e[t],s=o=e[t+1]),l){case b.M:n=a=e[t++],o=s=e[t++],C[0]=a,C[1]=s,k[0]=a,k[1]=s;break;case b.L:g(n,o,e[t],e[t+1],C,k),n=e[t++],o=e[t++];break;case b.C:m(n,o,e[t++],e[t++],e[t++],e[t++],e[t],e[t+1],C,k),n=e[t++],o=e[t++];break;case b.Q:_(n,o,e[t++],e[t++],e[t],e[t+1],C,k),n=e[t++],o=e[t++];break;case b.A:var c=e[t++],h=e[t++],p=e[t++],d=e[t++],f=e[t++],v=e[t++]+f;t+=1;var y=!e[t++];u&&(a=D(f)*p+c,s=P(f)*d+h),x(c,h,p,d,f,v,y,C,k),n=D(v)*p+c,o=P(v)*d+h;break;case b.R:g(a=n=e[t++],s=o=e[t++],a+e[t++],s+e[t++],C,k);break;case b.Z:n=a,o=s}i.VV(T,T,C),i.Fp(M,M,k)}return 0===t&&(T[0]=T[1]=M[0]=M[1]=0),new r.Z(T[0],T[1],M[0]-T[0],M[1]-T[1])},t.prototype._calculateLength=function(){var t=this.data,e=this._len,n=this._ux,i=this._uy,r=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,h=0,p=0;p<e;){var d=t[p++],f=1===p;f&&(s=r=t[p],l=o=t[p+1]);var g=-1;switch(d){case b.M:r=s=t[p++],o=l=t[p++];break;case b.L:var v=t[p++],y=(x=t[p++])-o;(L(N=v-r)>n||L(y)>i||p===e-1)&&(g=Math.sqrt(N*N+y*y),r=v,o=x);break;case b.C:var m=t[p++],_=t[p++],x=(v=t[p++],t[p++]),w=t[p++],S=t[p++];g=(0,a.Ci)(r,o,m,_,v,x,w,S,10),r=w,o=S;break;case b.Q:m=t[p++],_=t[p++],v=t[p++],x=t[p++],g=(0,a.wQ)(r,o,m,_,v,x,10),r=v,o=x;break;case b.A:var T=t[p++],M=t[p++],C=t[p++],k=t[p++],O=t[p++],R=t[p++],Z=R+O;p+=1,t[p++],f&&(s=D(O)*C+T,l=P(O)*k+M),g=I(C,k)*A(E,Math.abs(R)),r=D(Z)*C+T,o=P(Z)*k+M;break;case b.R:s=r=t[p++],l=o=t[p++],g=2*t[p++]+2*t[p++];break;case b.Z:var N=s-r;y=l-o,g=Math.sqrt(N*N+y*y),r=s,o=l}g>=0&&(u[h++]=g,c+=g)}return this._pathLen=c,c},t.prototype.rebuildPath=function(t,e){var n,i,r,o,s,l,u,c,h=this.data,p=this._ux,d=this._uy,f=this._len,g=e<1,v=0,y=0;if(!g||(this._pathSegLen||this._calculateLength(),u=this._pathSegLen,c=e*this._pathLen))t:for(var m=0;m<f;){var _=h[m++],x=1===m;switch(x&&(n=r=h[m],i=o=h[m+1]),_){case b.M:n=r=h[m++],i=o=h[m++],t.moveTo(r,o);break;case b.L:if(s=h[m++],l=h[m++],L(s-r)>p||L(l-o)>d||m===f-1){if(g){if(v+(K=u[y++])>c){var T=(c-v)/K;t.lineTo(r*(1-T)+s*T,o*(1-T)+l*T);break t}v+=K}t.lineTo(s,l),r=s,o=l}break;case b.C:var M=h[m++],C=h[m++],k=h[m++],O=h[m++],R=h[m++],E=h[m++];if(g){if(v+(K=u[y++])>c){T=(c-v)/K,(0,a.Vz)(r,M,k,R,T,w),(0,a.Vz)(o,C,O,E,T,S),t.bezierCurveTo(w[1],S[1],w[2],S[2],w[3],S[3]);break t}v+=K}t.bezierCurveTo(M,C,k,O,R,E),r=R,o=E;break;case b.Q:if(M=h[m++],C=h[m++],k=h[m++],O=h[m++],g){if(v+(K=u[y++])>c){T=(c-v)/K,(0,a.Lx)(r,M,k,T,w),(0,a.Lx)(o,C,O,T,S),t.quadraticCurveTo(w[1],S[1],w[2],S[2]);break t}v+=K}t.quadraticCurveTo(M,C,k,O),r=k,o=O;break;case b.A:var Z=h[m++],N=h[m++],B=h[m++],z=h[m++],F=h[m++],W=h[m++],V=h[m++],H=!h[m++],U=B>z?B:z,G=L(B-z)>.001,X=F+W,Y=!1;if(g&&(v+(K=u[y++])>c&&(X=F+W*(c-v)/K,Y=!0),v+=K),G&&t.ellipse?t.ellipse(Z,N,B,z,V,F,X,H):t.arc(Z,N,U,F,X,H),Y)break t;x&&(n=D(F)*B+Z,i=P(F)*z+N),r=D(X)*B+Z,o=P(X)*z+N;break;case b.R:n=r=h[m],i=o=h[m+1],s=h[m++],l=h[m++];var j=h[m++],$=h[m++];if(g){if(v+(K=u[y++])>c){var q=c-v;t.moveTo(s,l),t.lineTo(s+A(q,j),l),(q-=j)>0&&t.lineTo(s+j,l+A(q,$)),(q-=$)>0&&t.lineTo(s+I(j-q,0),l+$),(q-=j)>0&&t.lineTo(s,l+I($-q,0));break t}v+=K}t.rect(s,l,j,$);break;case b.Z:if(g){var K;if(v+(K=u[y++])>c){T=(c-v)/K,t.lineTo(r*(1-T)+n*T,o*(1-T)+i*T);break t}v+=K}t.closePath(),r=n,o=i}}},t.CMD=b,t.initDefaultProps=((e=t.prototype)._saveData=!0,e._needsDash=!1,e._dashOffset=0,e._dashIdx=0,e._dashSum=0,e._ux=0,void(e._uy=0)),t}()},6:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},t.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},t}()},4629:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i=n(561),r=n(213),o=i.yR;function a(t){return t>5e-5||t<-5e-5}var s=[],l=[],u=i.Ue(),c=Math.abs;const h=function(){function t(){}var e;return t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return a(this.rotation)||a(this.x)||a(this.y)||a(this.scaleX-1)||a(this.scaleY-1)},t.prototype.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),r=this.transform;n||e?(r=r||i.Ue(),n?this.getLocalTransform(r):o(r),e&&(n?i.dC(r,t.transform,r):i.JG(r,t.transform)),this.transform=r,this._resolveGlobalScaleRatio(r)):r&&o(r)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(s);var n=s[0]<0?-1:1,r=s[1]<0?-1:1,o=((s[0]-n)*e+n)/s[0]||0,a=((s[1]-r)*e+r)/s[1]||0;t[0]*=o,t[1]*=o,t[2]*=a,t[3]*=a}this.invTransform=this.invTransform||i.Ue(),i.U_(this.invTransform,t)},t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3];a(e-1)&&(e=Math.sqrt(e)),a(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),this.rotation=Math.atan2(-t[1]/n,t[0]/e),e<0&&n<0&&(this.rotation+=Math.PI,e=-e,n=-n),this.x=t[4],this.y=t[5],this.scaleX=e,this.scaleY=n}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(i.dC(l,t.invTransform,e),e=l);var n=this.originX,r=this.originY;(n||r)&&(u[4]=n,u[5]=r,i.dC(l,e,u),l[4]-=n,l[5]-=r,e=l),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&r.Ne(n,n,i),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&r.Ne(n,n,i),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&c(t[0]-1)>1e-10&&c(t[3]-1)>1e-10?Math.sqrt(c(t[0]*t[3]-t[2]*t[1])):1},t.getLocalTransform=function(t,e){o(e=e||[]);var n=t.originX||0,r=t.originY||0,a=t.scaleX,s=t.scaleY,l=t.rotation||0,u=t.x,c=t.y;return e[4]-=n,e[5]-=r,e[0]*=a,e[1]*=s,e[2]*=a,e[3]*=s,e[4]*=a,e[5]*=s,l&&i.U1(e,e,l),e[4]+=n,e[5]+=r,e[4]+=u,e[5]+=c,e},t.initDefaultProps=((e=t.prototype).x=0,e.y=0,e.scaleX=1,e.scaleY=1,e.originX=0,e.originY=0,e.rotation=0,void(e.globalScaleRatio=1)),t}()},3475:(t,e,n)=>{"use strict";n.d(e,{af:()=>f,X_:()=>g,kD:()=>v,pP:()=>y,Vz:()=>m,t1:()=>_,Ci:()=>x,Zm:()=>b,AZ:()=>w,Jz:()=>S,QC:()=>T,Lx:()=>M,Wr:()=>C,wQ:()=>k});var i=n(213),r=Math.pow,o=Math.sqrt,a=1e-4,s=o(3),l=1/3,u=(0,i.Ue)(),c=(0,i.Ue)(),h=(0,i.Ue)();function p(t){return t>-1e-8&&t<1e-8}function d(t){return t>1e-8||t<-1e-8}function f(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function g(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function v(t,e,n,i,a,u){var c=i+3*(e-n)-t,h=3*(n-2*e+t),d=3*(e-t),f=t-a,g=h*h-3*c*d,v=h*d-9*c*f,y=d*d-3*h*f,m=0;if(p(g)&&p(v))p(h)?u[0]=0:(I=-d/h)>=0&&I<=1&&(u[m++]=I);else{var _=v*v-4*g*y;if(p(_)){var x=v/g,b=-x/2;(I=-h/c+x)>=0&&I<=1&&(u[m++]=I),b>=0&&b<=1&&(u[m++]=b)}else if(_>0){var w=o(_),S=g*h+1.5*c*(-v+w),T=g*h+1.5*c*(-v-w);(I=(-h-((S=S<0?-r(-S,l):r(S,l))+(T=T<0?-r(-T,l):r(T,l))))/(3*c))>=0&&I<=1&&(u[m++]=I)}else{var M=(2*g*h-3*c*v)/(2*o(g*g*g)),C=Math.acos(M)/3,k=o(g),A=Math.cos(C),I=(-h-2*k*A)/(3*c),D=(b=(-h+k*(A+s*Math.sin(C)))/(3*c),(-h+k*(A-s*Math.sin(C)))/(3*c));I>=0&&I<=1&&(u[m++]=I),b>=0&&b<=1&&(u[m++]=b),D>=0&&D<=1&&(u[m++]=D)}}return m}function y(t,e,n,i,r){var a=6*n-12*e+6*t,s=9*e+3*i-3*t-9*n,l=3*e-3*t,u=0;if(p(s))d(a)&&(h=-l/a)>=0&&h<=1&&(r[u++]=h);else{var c=a*a-4*s*l;if(p(c))r[0]=-a/(2*s);else if(c>0){var h,f=o(c),g=(-a-f)/(2*s);(h=(-a+f)/(2*s))>=0&&h<=1&&(r[u++]=h),g>=0&&g<=1&&(r[u++]=g)}}return u}function m(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,c=(l-s)*r+s,h=(c-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=h,o[4]=h,o[5]=c,o[6]=l,o[7]=i}function _(t,e,n,r,s,l,p,d,g,v,y){var m,_,x,b,w,S=.005,T=1/0;u[0]=g,u[1]=v;for(var M=0;M<1;M+=.05)c[0]=f(t,n,s,p,M),c[1]=f(e,r,l,d,M),(b=(0,i.WU)(u,c))<T&&(m=M,T=b);T=1/0;for(var C=0;C<32&&!(S<a);C++)_=m-S,x=m+S,c[0]=f(t,n,s,p,_),c[1]=f(e,r,l,d,_),b=(0,i.WU)(c,u),_>=0&&b<T?(m=_,T=b):(h[0]=f(t,n,s,p,x),h[1]=f(e,r,l,d,x),w=(0,i.WU)(h,u),x<=1&&w<T?(m=x,T=w):S*=.5);return y&&(y[0]=f(t,n,s,p,m),y[1]=f(e,r,l,d,m)),o(T)}function x(t,e,n,i,r,o,a,s,l){for(var u=t,c=e,h=0,p=1/l,d=1;d<=l;d++){var g=d*p,v=f(t,n,r,a,g),y=f(e,i,o,s,g),m=v-u,_=y-c;h+=Math.sqrt(m*m+_*_),u=v,c=y}return h}function b(t,e,n,i){var r=1-i;return r*(r*t+2*i*e)+i*i*n}function w(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function S(t,e,n,i,r){var a=t-2*e+n,s=2*(e-t),l=t-i,u=0;if(p(a))d(s)&&(h=-l/s)>=0&&h<=1&&(r[u++]=h);else{var c=s*s-4*a*l;if(p(c))(h=-s/(2*a))>=0&&h<=1&&(r[u++]=h);else if(c>0){var h,f=o(c),g=(-s-f)/(2*a);(h=(-s+f)/(2*a))>=0&&h<=1&&(r[u++]=h),g>=0&&g<=1&&(r[u++]=g)}}return u}function T(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function M(t,e,n,i,r){var o=(e-t)*i+t,a=(n-e)*i+e,s=(a-o)*i+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=n}function C(t,e,n,r,s,l,p,d,f){var g,v=.005,y=1/0;u[0]=p,u[1]=d;for(var m=0;m<1;m+=.05)c[0]=b(t,n,s,m),c[1]=b(e,r,l,m),(S=(0,i.WU)(u,c))<y&&(g=m,y=S);y=1/0;for(var _=0;_<32&&!(v<a);_++){var x=g-v,w=g+v;c[0]=b(t,n,s,x),c[1]=b(e,r,l,x);var S=(0,i.WU)(c,u);if(x>=0&&S<y)g=x,y=S;else{h[0]=b(t,n,s,w),h[1]=b(e,r,l,w);var T=(0,i.WU)(h,u);w<=1&&T<y?(g=w,y=T):v*=.5}}return f&&(f[0]=b(t,n,s,g),f[1]=b(e,r,l,g)),o(y)}function k(t,e,n,i,r,o,a){for(var s=t,l=e,u=0,c=1/a,h=1;h<=a;h++){var p=h*c,d=b(t,n,r,p),f=b(e,i,o,p),g=d-s,v=f-l;u+=Math.sqrt(g*g+v*v),s=d,l=f}return u}},9186:(t,e,n)=>{"use strict";n.d(e,{UK:()=>c,A4:()=>u,YB:()=>l});var i=n(8781),r=Math.log(2);function o(t,e,n,i,a,s){var l=i+"-"+a,u=t.length;if(s.hasOwnProperty(l))return s[l];if(1===e){var c=Math.round(Math.log((1<<u)-1&~a)/r);return t[n][c]}for(var h=i|1<<n,p=n+1;i&1<<p;)p++;for(var d=0,f=0,g=0;f<u;f++){var v=1<<f;v&a||(d+=(g%2?-1:1)*t[n][f]*o(t,e-1,p,h,a|v,s),g++)}return s[l]=d,d}function a(t,e){var n=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],i={},r=o(n,8,0,0,0,i);if(0!==r){for(var a=[],s=0;s<8;s++)for(var l=0;l<8;l++)null==a[l]&&(a[l]=0),a[l]+=((s+l)%2?-1:1)*o(n,7,0===s?1:0,1<<s,1<<l,i)/r*e[s];return function(t,e,n){var i=e*a[6]+n*a[7]+1;t[0]=(e*a[0]+n*a[1]+a[2])/i,t[1]=(e*a[3]+n*a[4]+a[5])/i}}}var s=[];function l(t,e,n,i,r){return u(s,e,i,r,!0)&&u(t,n,s[0],s[1])}function u(t,e,n,r,o){if(e.getBoundingClientRect&&i.Z.domSupported&&!c(e)){var s=e.___zrEVENTSAVED||(e.___zrEVENTSAVED={}),l=function(t,e,n){for(var i=n?"invTrans":"trans",r=e[i],o=e.srcCoords,s=[],l=[],u=!0,c=0;c<4;c++){var h=t[c].getBoundingClientRect(),p=2*c,d=h.left,f=h.top;s.push(d,f),u=u&&o&&d===o[p]&&f===o[p+1],l.push(t[c].offsetLeft,t[c].offsetTop)}return u&&r?r:(e.srcCoords=s,e[i]=n?a(l,s):a(s,l))}(function(t,e){var n=e.markers;if(n)return n;n=e.markers=[];for(var i=["left","right"],r=["top","bottom"],o=0;o<4;o++){var a=document.createElement("div"),s=o%2,l=(o>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,s),s,o);if(l)return l(t,n,r),!0}return!1}function c(t){return"CANVAS"===t.nodeName.toUpperCase()}},8781:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.weChat=!1},r=new function(){this.browser=new i,this.node=!1,this.wxa=!1,this.worker=!1,this.canvasSupported=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(r.wxa=!0,r.canvasSupported=!0,r.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?(r.worker=!0,r.canvasSupported=!0):"undefined"==typeof navigator?(r.node=!0,r.canvasSupported=!0,r.svgSupported=!0):function(t,e){var n=e.browser,i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(n.firefox=!0,n.version=i[1]),r&&(n.ie=!0,n.version=r[1]),o&&(n.edge=!0,n.version=o[1]),a&&(n.weChat=!0),e.canvasSupported=!!document.createElement("canvas").getContext,e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document}(navigator.userAgent,r);const o=r},3837:(t,e,n)=>{"use strict";n.d(e,{eV:()=>l,iP:()=>c,OD:()=>h,Oo:()=>p,xg:()=>d,sT:()=>f}),n(444);var i=n(8781),r=n(9186),o="undefined"!=typeof window&&!!window.addEventListener,a=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,s=[];function l(t,e,n,r){return n=n||{},r||!i.Z.canvasSupported?u(t,e,n):i.Z.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):u(t,e,n),n}function u(t,e,n){if(i.Z.domSupported&&t.getBoundingClientRect){var o=e.clientX,a=e.clientY;if((0,r.UK)(t)){var l=t.getBoundingClientRect();return n.zrX=o-l.left,void(n.zrY=a-l.top)}if((0,r.A4)(s,t,o,a))return n.zrX=s[0],void(n.zrY=s[1])}n.zrX=n.zrY=0}function c(t){return t||window.event}function h(t,e,n){if(null!=(e=c(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&l(t,r,e,n)}else{l(t,e,e,n);var o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;return null==n||null==i?e:3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var s=e.button;return null==e.which&&void 0!==s&&a.test(e.type)&&(e.which=1&s?1:2&s?3:4&s?2:0),e}function p(t,e,n,i){o?t.addEventListener(e,n,i):t.attachEvent("on"+e,n)}function d(t,e,n,i){o?t.removeEventListener(e,n,i):t.detachEvent("on"+e,n)}var f=o?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0}},561:(t,e,n)=>{"use strict";function i(){return[1,0,0,1,0,0]}function r(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function a(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function s(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function l(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(n),c=Math.cos(n);return t[0]=i*c+a*u,t[1]=-i*u+a*c,t[2]=r*c+s*u,t[3]=-r*u+c*s,t[4]=c*o+u*l,t[5]=c*l-u*o,t}function u(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function c(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}n.d(e,{Ue:()=>i,yR:()=>r,JG:()=>o,dC:()=>a,Iu:()=>s,U1:()=>l,bA:()=>u,U_:()=>c})},8778:(t,e,n)=>{"use strict";n.d(e,{v9:()=>f,M8:()=>v,H:()=>y,d9:()=>m,TS:()=>_,l7:()=>x,ce:()=>b,vL:()=>w,cq:()=>S,XW:()=>T,jB:()=>M,zG:()=>C,S6:()=>k,UI:()=>A,u4:()=>I,hX:()=>D,XP:()=>P,ak:()=>O,WA:()=>L,kJ:()=>R,mf:()=>E,HD:()=>Z,cd:()=>N,hj:()=>B,Kn:()=>z,fU:()=>W,Mh:()=>V,Qq:()=>H,wo:()=>U,Bu:()=>G,Jv:()=>X,pD:()=>Y,R1:()=>j,tP:()=>$,MY:()=>q,hu:()=>K,fy:()=>J,s7:()=>tt,kW:()=>it,nW:()=>rt,RI:()=>ot,ZT:()=>at});var i={"[object Function]":!0,"[object RegExp]":!0,"[object Date]":!0,"[object Error]":!0,"[object CanvasGradient]":!0,"[object CanvasPattern]":!0,"[object Image]":!0,"[object Canvas]":!0},r={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0},o=Object.prototype.toString,a=Array.prototype,s=a.forEach,l=a.filter,u=a.slice,c=a.map,h=function(){}.constructor,p=h?h.prototype:null,d={};function f(t,e){d[t]=e}var g=2311;function v(){return g++}function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"undefined"!=typeof console&&console.error.apply(console,t)}function m(t){if(null==t||"object"!=typeof t)return t;var e=t,n=o.call(t);if("[object Array]"===n){if(!et(t)){e=[];for(var a=0,s=t.length;a<s;a++)e[a]=m(t[a])}}else if(r[n]){if(!et(t)){var l=t.constructor;if(l.from)e=l.from(t);else for(e=new l(t.length),a=0,s=t.length;a<s;a++)e[a]=m(t[a])}}else if(!i[n]&&!et(t)&&!V(t))for(var u in e={},t)t.hasOwnProperty(u)&&(e[u]=m(t[u]));return e}function _(t,e,n){if(!z(e)||!z(t))return n?m(e):t;for(var i in e)if(e.hasOwnProperty(i)){var r=t[i],o=e[i];!z(o)||!z(r)||R(o)||R(r)||V(o)||V(r)||F(o)||F(r)||et(o)||et(r)?!n&&i in t||(t[i]=m(e[i])):_(r,o,n)}return t}function x(t,e){if(Object.assign)Object.assign(t,e);else for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function b(t,e,n){for(var i=P(e),r=0;r<i.length;r++){var o=i[r];(n?null!=e[o]:null==t[o])&&(t[o]=e[o])}return t}var w=function(){return d.createCanvas()};function S(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n}return-1}function T(t,e){var n=t.prototype;function i(){}for(var r in i.prototype=e.prototype,t.prototype=new i,n)n.hasOwnProperty(r)&&(t.prototype[r]=n[r]);t.prototype.constructor=t,t.superClass=e}function M(t,e,n){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),r=0;r<i.length;r++){var o=i[r];"constructor"!==o&&(n?null!=e[o]:null==t[o])&&(t[o]=e[o])}else b(t,e,n)}function C(t){return!!t&&"string"!=typeof t&&"number"==typeof t.length}function k(t,e,n){if(t&&e)if(t.forEach&&t.forEach===s)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,r=t.length;i<r;i++)e.call(n,t[i],i,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(n,t[o],o,t)}function A(t,e,n){if(!t)return[];if(!e)return $(t);if(t.map&&t.map===c)return t.map(e,n);for(var i=[],r=0,o=t.length;r<o;r++)i.push(e.call(n,t[r],r,t));return i}function I(t,e,n,i){if(t&&e){for(var r=0,o=t.length;r<o;r++)n=e.call(i,n,t[r],r,t);return n}}function D(t,e,n){if(!t)return[];if(!e)return $(t);if(t.filter&&t.filter===l)return t.filter(e,n);for(var i=[],r=0,o=t.length;r<o;r++)e.call(n,t[r],r,t)&&i.push(t[r]);return i}function P(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}d.createCanvas=function(){return document.createElement("canvas")};var O=p&&E(p.bind)?p.call.bind(p.bind):function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return function(){return t.apply(e,n.concat(u.call(arguments)))}};function L(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){return t.apply(this,e.concat(u.call(arguments)))}}function R(t){return Array.isArray?Array.isArray(t):"[object Array]"===o.call(t)}function E(t){return"function"==typeof t}function Z(t){return"string"==typeof t}function N(t){return"[object String]"===o.call(t)}function B(t){return"number"==typeof t}function z(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function F(t){return!!i[o.call(t)]}function W(t){return!!r[o.call(t)]}function V(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function H(t){return null!=t.colorStops}function U(t){return null!=t.image}function G(t){return t!=t}function X(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,i=t.length;n<i;n++)if(null!=t[n])return t[n]}function Y(t,e){return null!=t?t:e}function j(t,e,n){return null!=t?t:null!=e?e:n}function $(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return u.apply(t,e)}function q(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function K(t,e){if(!t)throw new Error(e)}function J(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Q="__ec_primitive__";function tt(t){t[Q]=!0}function et(t){return t[Q]}var nt=function(){function t(e){this.data={};var n=R(e);this.data={};var i=this;function r(t,e){n?i.set(t,e):i.set(e,t)}e instanceof t?e.each(r):e&&k(e,r)}return t.prototype.get=function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},t.prototype.set=function(t,e){return this.data[t]=e},t.prototype.each=function(t,e){for(var n in this.data)this.data.hasOwnProperty(n)&&t.call(e,this.data[n],n)},t.prototype.keys=function(){return P(this.data)},t.prototype.removeKey=function(t){delete this.data[t]},t}();function it(t){return new nt(t)}function rt(t,e){var n;if(Object.create)n=Object.create(t);else{var i=function(){};i.prototype=t,n=new i}return e&&x(n,e),n}function ot(t,e){return t.hasOwnProperty(e)}function at(){}},213:(t,e,n)=>{"use strict";function i(t,e){return null==t&&(t=0),null==e&&(e=0),[t,e]}function r(t){return[t[0],t[1]]}function o(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function s(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function l(t,e){var n=function(t){return Math.sqrt(function(t){return t[0]*t[0]+t[1]*t[1]}(t))}(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function u(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}n.d(e,{Ue:()=>i,d9:()=>r,IH:()=>o,lu:()=>a,bA:()=>s,Fv:()=>l,TE:()=>u,TK:()=>c,WU:()=>h,t7:()=>p,Ne:()=>d,VV:()=>f,Fp:()=>g});var c=u,h=function(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])};function p(t,e,n,i){return t[0]=e[0]+i*(n[0]-e[0]),t[1]=e[1]+i*(n[1]-e[1]),t}function d(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t}function f(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function g(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}},8234:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(9312),r=n(391);const o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="compound",e}return(0,i.ZT)(e,t),e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,e=this.shapeChanged(),n=0;n<t.length;n++)e=e||t[n].shapeChanged();e&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),n=0;n<t.length;n++)t[n].path||t[n].createPathProxy(),t[n].path.setScale(e[0],e[1],t[n].segmentIgnoreThreshold)},e.prototype.buildPath=function(t,e){for(var n=e.paths||[],i=0;i<n.length;i++)n[i].buildPath(t,n[i].shape,!0)},e.prototype.afterBrush=function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),r.ZP.prototype.getBoundingRect.call(this)},e}(r.ZP)},400:(t,e,n)=>{"use strict";n.d(e,{tj:()=>l,ik:()=>u,ZP:()=>f});var i=n(9312),r=n(8073),o=n(9472),a=n(8778),s="__zr_style_"+Math.round(10*Math.random()),l={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},u={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};l[s]=!0;var c=["z","z2","invisible"],h=function(t){function e(e){return t.call(this,e)||this}var n;return(0,i.ZT)(e,t),e.prototype._init=function(e){for(var n=(0,a.XP)(e),i=0;i<n.length;i++){var r=n[i];"style"===r?this.useStyle(e[r]):t.prototype.attrKV.call(this,r,e[r])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(t,e,n,i){var r,o,a,s=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&(r=this,o=t,a=e,p.copy(r.getBoundingRect()),r.transform&&p.applyTransform(r.transform),d.width=o,d.height=a,!p.intersect(d))||s&&!s[0]&&!s[3])return!1;if(n&&this.__clipPaths)for(var l=0;l<this.__clipPaths.length;++l)if(this.__clipPaths[l].isZeroArea())return!1;if(i&&this.parent)for(var u=this.parent;u;){if(u.ignore)return!1;u=u.parent}return!0},e.prototype.contain=function(t,e){return this.rectContain(t,e)},e.prototype.traverse=function(t,e){t.call(e,this)},e.prototype.rectContain=function(t,e){var n=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(n[0],n[1])},e.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var e=this.transform,n=this.getBoundingRect(),i=this.style,r=i.shadowBlur||0,a=i.shadowOffsetX||0,s=i.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new o.Z(0,0,0,0)),e?o.Z.applyTransform(t,n,e):t.copy(n),(r||a||s)&&(t.width+=2*r+Math.abs(a),t.height+=2*r+Math.abs(s),t.x=Math.min(t.x,t.x+a-r),t.y=Math.min(t.y,t.y+s-r));var l=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-l),t.y=Math.floor(t.y-l),t.width=Math.ceil(t.width+1+2*l),t.height=Math.ceil(t.height+1+2*l))}return t},e.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new o.Z(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(t){return this.animate("style",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(e,n){"style"!==e?t.prototype.attrKV.call(this,e,n):this.style?this.setStyle(n):this.useStyle(n)},e.prototype.setStyle=function(t,e){return"string"==typeof t?this.style[t]=e:(0,a.l7)(this.style,t),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(){this.markRedraw(),this.__dirty|=e.STYLE_CHANGED_BIT,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&e.STYLE_CHANGED_BIT)},e.prototype.styleUpdated=function(){this.__dirty&=~e.STYLE_CHANGED_BIT},e.prototype.createStyle=function(t){return(0,a.nW)(l,t)},e.prototype.useStyle=function(t){t[s]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},e.prototype.isStyleObject=function(t){return t[s]},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(e,n,c)},e.prototype._applyStateObj=function(e,n,i,r,o,s){t.prototype._applyStateObj.call(this,e,n,i,r,o,s);var l,u=!(n&&r);if(n&&n.style?o?r?l=n.style:(l=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(l,n.style)):(l=this._mergeStyle(this.createStyle(),r?this.style:i.style),this._mergeStyle(l,n.style)):u&&(l=i.style),l)if(o){var h=this.style;if(this.style=this.createStyle(u?{}:h),u)for(var p=(0,a.XP)(h),d=0;d<p.length;d++)(g=p[d])in l&&(l[g]=l[g],this.style[g]=h[g]);var f=(0,a.XP)(l);for(d=0;d<f.length;d++){var g=f[d];this.style[g]=this.style[g]}this._transitionState(e,{style:l},s,this.getAnimationStyleProps())}else this.useStyle(l);for(d=0;d<c.length;d++)g=c[d],n&&null!=n[g]?this[g]=n[g]:u&&null!=i[g]&&(this[g]=i[g])},e.prototype._mergeStates=function(e){for(var n,i=t.prototype._mergeStates.call(this,e),r=0;r<e.length;r++){var o=e[r];o.style&&(n=n||{},this._mergeStyle(n,o.style))}return n&&(i.style=n),i},e.prototype._mergeStyle=function(t,e){return(0,a.l7)(t,e),t},e.prototype.getAnimationStyleProps=function(){return u},e.STYLE_CHANGED_BIT=2,e.initDefaultProps=((n=e.prototype).type="displayable",n.invisible=!1,n.z=0,n.z2=0,n.zlevel=0,n.culling=!1,n.cursor="pointer",n.rectHover=!1,n.incremental=!1,n._rect=null,n.dirtyRectTolerance=0,void(n.__dirty=r.Z.REDARAW_BIT|e.STYLE_CHANGED_BIT)),e}(r.Z),p=new o.Z(0,0,0,0),d=new o.Z(0,0,0,0);const f=h},8387:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t){this.colorStops=t||[]}return t.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},t}()},6454:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(9312),r=n(8778),o=n(8073),a=n(9472),s=function(t){function e(e){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return(0,i.ZT)(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var e=this._children,n=0;n<e.length;n++)if(e[n].name===t)return e[n]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(t){if(t&&(t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),t.__hostTarget))throw"This elemenet has been used as an attachment";return this},e.prototype.addBefore=function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var n=this._children,i=n.indexOf(e);i>=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,i=r.cq(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n<t.length;n++){var i=t[n];e&&i.removeSelfFromZr(e),i.parent=null}return t.length=0,this},e.prototype.eachChild=function(t,e){for(var n=this._children,i=0;i<n.length;i++){var r=n[i];t.call(e,r,i)}return this},e.prototype.traverse=function(t,e){for(var n=0;n<this._children.length;n++){var i=this._children[n],r=t.call(e,i);i.isGroup&&!r&&i.traverse(t,e)}return this},e.prototype.addSelfToZr=function(e){t.prototype.addSelfToZr.call(this,e);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(e)},e.prototype.removeSelfFromZr=function(e){t.prototype.removeSelfFromZr.call(this,e);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(e)},e.prototype.getBoundingRect=function(t){for(var e=new a.Z(0,0,0,0),n=t||this._children,i=[],r=null,o=0;o<n.length;o++){var s=n[o];if(!s.ignore&&!s.invisible){var l=s.getBoundingRect(),u=s.getLocalTransform(i);u?(a.Z.applyTransform(e,l,u),(r=r||e.clone()).union(e)):(r=r||l.clone()).union(l)}}return r||e},e}(o.Z);s.prototype.type="group";const l=s},6781:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>c});var i=n(9312),r=n(400),o=n(9472),a=n(8778),s=(0,a.ce)({x:0,y:0},r.tj),l={style:(0,a.ce)({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},r.ik.style)},u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.createStyle=function(t){return(0,a.nW)(s,t)},e.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var i,r=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!r)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?r[t]:r[t]/r[o]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return l},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new o.Z(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(r.ZP);u.prototype.type="image";const c=u},2012:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(9312),r=n(400),o=n(9472),a=[];const s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.notClear=!0,e.incremental=!0,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}return(0,i.ZT)(e,t),e.prototype.traverse=function(t,e){t.call(e,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},e.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++)(e=this._displayables[t]).parent=this,e.update(),e.parent=null;for(t=0;t<this._temporaryDisplayables.length;t++){var e;(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new o.Z(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var n=this._displayables[e],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(a)),t.union(i)}this._rect=t}return this._rect},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(n[0],n[1]))for(var i=0;i<this._displayables.length;i++)if(this._displayables[i].contain(t,e))return!0;return!1},e}(r.ZP)},5853:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(9312);const r=function(t){function e(e,n,i,r,o,a){var s=t.call(this,o)||this;return s.x=null==e?0:e,s.y=null==n?0:n,s.x2=null==i?1:i,s.y2=null==r?0:r,s.type="linear",s.global=a||!1,s}return(0,i.ZT)(e,t),e}(n(8387).Z)},391:(t,e,n)=>{"use strict";n.d(e,{$t:()=>C,ZP:()=>I});var i=n(9312),r=n(400),o=n(8073),a=n(2397);function s(t,e,n,i,r,o,a){if(0===r)return!1;var s,l=r;if(a>e+l&&a>i+l||a<e-l&&a<i-l||o>t+l&&o>n+l||o<t-l&&o<n-l)return!1;if(t===n)return Math.abs(o-t)<=l/2;var u=(s=(e-i)/(t-n))*o-a+(t*i-n*e)/(t-n);return u*u/(s*s+1)<=l/2*l/2}var l=n(3475);function u(t,e,n,i,r,o,a,s,u,c,h){if(0===u)return!1;var p=u;return!(h>e+p&&h>i+p&&h>o+p&&h>s+p||h<e-p&&h<i-p&&h<o-p&&h<s-p||c>t+p&&c>n+p&&c>r+p&&c>a+p||c<t-p&&c<n-p&&c<r-p&&c<a-p)&&l.t1(t,e,n,i,r,o,a,s,c,h,null)<=p/2}function c(t,e,n,i,r,o,a,s,u){if(0===a)return!1;var c=a;return!(u>e+c&&u>i+c&&u>o+c||u<e-c&&u<i-c&&u<o-c||s>t+c&&s>n+c&&s>r+c||s<t-c&&s<n-c&&s<r-c)&&(0,l.Wr)(t,e,n,i,r,o,s,u,null)<=c/2}var h=n(7096),p=2*Math.PI;function d(t,e,n,i,r,o,a,s,l){if(0===a)return!1;var u=a;s-=t,l-=e;var c=Math.sqrt(s*s+l*l);if(c-u>n||c+u<n)return!1;if(Math.abs(i-r)%p<1e-4)return!0;if(o){var d=i;i=(0,h.m)(r),r=(0,h.m)(d)}else i=(0,h.m)(i),r=(0,h.m)(r);i>r&&(r+=p);var f=Math.atan2(l,s);return f<0&&(f+=p),f>=i&&f<=r||f+p>=i&&f+p<=r}function f(t,e,n,i,r,o){if(o>e&&o>i||o<e&&o<i)return 0;if(i===e)return 0;var a=(o-e)/(i-e),s=i<e?1:-1;1!==a&&0!==a||(s=i<e?.5:-.5);var l=a*(n-t)+t;return l===r?1/0:l>r?s:0}var g=a.Z.CMD,v=2*Math.PI,y=[-1,-1,-1],m=[-1,-1];function _(t,e,n,i,r,o,a,s,u,c){if(c>e&&c>i&&c>o&&c>s||c<e&&c<i&&c<o&&c<s)return 0;var h,p=l.kD(e,i,o,s,c,y);if(0===p)return 0;for(var d=0,f=-1,g=void 0,v=void 0,_=0;_<p;_++){var x=y[_],b=0===x||1===x?.5:1;l.af(t,n,r,a,x)<u||(f<0&&(f=l.pP(e,i,o,s,m),m[1]<m[0]&&f>1&&(void 0,h=m[0],m[0]=m[1],m[1]=h),g=l.af(e,i,o,s,m[0]),f>1&&(v=l.af(e,i,o,s,m[1]))),2===f?x<m[0]?d+=g<e?b:-b:x<m[1]?d+=v<g?b:-b:d+=s<v?b:-b:x<m[0]?d+=g<e?b:-b:d+=s<g?b:-b)}return d}function x(t,e,n,i,r,o,a,s){if(s>e&&s>i&&s>o||s<e&&s<i&&s<o)return 0;var u=l.Jz(e,i,o,s,y);if(0===u)return 0;var c=l.QC(e,i,o);if(c>=0&&c<=1){for(var h=0,p=l.Zm(e,i,o,c),d=0;d<u;d++){var f=0===y[d]||1===y[d]?.5:1;l.Zm(t,n,r,y[d])<a||(y[d]<c?h+=p<e?f:-f:h+=o<p?f:-f)}return h}return f=0===y[0]||1===y[0]?.5:1,l.Zm(t,n,r,y[0])<a?0:o<e?f:-f}function b(t,e,n,i,r,o,a,s){if((s-=e)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);y[0]=-l,y[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=v-1e-4){i=0,r=v;var c=o?1:-1;return a>=y[0]+t&&a<=y[1]+t?c:0}if(i>r){var h=i;i=r,r=h}i<0&&(i+=v,r+=v);for(var p=0,d=0;d<2;d++){var f=y[d];if(f+t>a){var g=Math.atan2(s,f);c=o?1:-1,g<0&&(g=v+g),(g>=i&&g<=r||g+v>=i&&g+v<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),p+=c)}}return p}function w(t,e,n,i,r){for(var o,a,l,h,p=t.data,v=t.len(),y=0,m=0,w=0,S=0,T=0,M=0;M<v;){var C=p[M++],k=1===M;switch(C===g.M&&M>1&&(n||(y+=f(m,w,S,T,i,r))),k&&(S=m=p[M],T=w=p[M+1]),C){case g.M:m=S=p[M++],w=T=p[M++];break;case g.L:if(n){if(s(m,w,p[M],p[M+1],e,i,r))return!0}else y+=f(m,w,p[M],p[M+1],i,r)||0;m=p[M++],w=p[M++];break;case g.C:if(n){if(u(m,w,p[M++],p[M++],p[M++],p[M++],p[M],p[M+1],e,i,r))return!0}else y+=_(m,w,p[M++],p[M++],p[M++],p[M++],p[M],p[M+1],i,r)||0;m=p[M++],w=p[M++];break;case g.Q:if(n){if(c(m,w,p[M++],p[M++],p[M],p[M+1],e,i,r))return!0}else y+=x(m,w,p[M++],p[M++],p[M],p[M+1],i,r)||0;m=p[M++],w=p[M++];break;case g.A:var A=p[M++],I=p[M++],D=p[M++],P=p[M++],O=p[M++],L=p[M++];M+=1;var R=!!(1-p[M++]);o=Math.cos(O)*D+A,a=Math.sin(O)*P+I,k?(S=o,T=a):y+=f(m,w,o,a,i,r);var E=(i-A)*P/D+A;if(n){if(d(A,I,P,O,O+L,R,e,E,r))return!0}else y+=b(A,I,P,O,O+L,R,E,r);m=Math.cos(O+L)*D+A,w=Math.sin(O+L)*P+I;break;case g.R:if(S=m=p[M++],T=w=p[M++],o=S+p[M++],a=T+p[M++],n){if(s(S,T,o,T,e,i,r)||s(o,T,o,a,e,i,r)||s(o,a,S,a,e,i,r)||s(S,a,S,T,e,i,r))return!0}else y+=f(o,T,o,a,i,r),y+=f(S,a,S,T,i,r);break;case g.Z:if(n){if(s(m,w,S,T,e,i,r))return!0}else y+=f(m,w,S,T,i,r);m=S,w=T}}return n||(l=w,h=T,Math.abs(l-h)<1e-4)||(y+=f(m,w,S,T,i,r)||0),0!==y}var S=n(8778),T=n(1756),M=n(5080),C=(0,S.ce)({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},r.tj),k={style:(0,S.ce)({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},r.ik.style)},A=["x","y","rotation","scaleX","scaleY","originX","originY","invisible","culling","z","z2","zlevel","parent"];const I=function(t){function e(e){return t.call(this,e)||this}var n;return(0,i.ZT)(e,t),e.prototype.update=function(){var n=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(t){n.buildPath(t,n.shape)}),r.silent=!0;var a=r.style;for(var s in i)a[s]!==i[s]&&(a[s]=i[s]);a.fill=i.fill?i.decal:null,a.decal=null,a.shadowColor=null,i.strokeFirst&&(a.stroke=null);for(var l=0;l<A.length;++l)r[A[l]]=this[A[l]];r.__dirty|=o.Z.REDARAW_BIT}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(e){var n=(0,S.XP)(e);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var r=0;r<n.length;r++){var o=n[r],a=e[o];"style"===o?this.style?(0,S.l7)(this.style,a):this.useStyle(a):"shape"===o?(0,S.l7)(this.shape,a):t.prototype.attrKV.call(this,o,a)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var t=this.style.fill;if("none"!==t){if((0,S.HD)(t)){var e=(0,T.L0)(t,0);return e>.5?M.vU:e>.2?M.iv:M.GD}if(t)return M.GD}return M.vU},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if((0,S.HD)(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())==(0,T.L0)(t,0)<M.Ak)return e}},e.prototype.buildPath=function(t,e,n){},e.prototype.pathUpdated=function(){this.__dirty&=~e.SHAPE_CHANGED_BIT},e.prototype.createPathProxy=function(){this.path=new a.Z(!1)},e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,i=!t;if(i){var r=!1;this.path||(r=!0,this.createPathProxy());var o=this.path;(r||this.__dirty&e.SHAPE_CHANGED_BIT)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){a.copy(t);var s=n.strokeNoScale?this.getLineScale():1,l=n.lineWidth;if(!this.hasFill()){var u=this.strokeContainThreshold;l=Math.max(l,null==u?4:u)}s>1e-10&&(a.width+=l/s,a.height+=l/s,a.x-=l/s/2,a.y-=l/s/2)}return a}return t},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,n,i){return w(t,e,!0,n,i)}(o,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,n){return w(t,0,!1,e,n)}(o,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=e.SHAPE_CHANGED_BIT,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},e.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:(0,S.l7)(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&e.SHAPE_CHANGED_BIT)},e.prototype.createStyle=function(t){return(0,S.nW)(C,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=(0,S.l7)({},this.shape))},e.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=(0,S.l7)({},i.shape),(0,S.l7)(s,n.shape)):(s=(0,S.l7)({},r?this.shape:i.shape),(0,S.l7)(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=(0,S.l7)({},this.shape);for(var u={},c=(0,S.XP)(s),h=0;h<c.length;h++){var p=c[h];"object"==typeof s[p]?this.shape[p]=s[p]:u[p]=s[p]}this._transitionState(e,{shape:u},a)}else this.shape=s,this.dirtyShape()},e.prototype._mergeStates=function(e){for(var n,i=t.prototype._mergeStates.call(this,e),r=0;r<e.length;r++){var o=e[r];o.shape&&(n=n||{},this._mergeStyle(n,o.shape))}return n&&(i.shape=n),i},e.prototype.getAnimationStyleProps=function(){return k},e.prototype.isZeroArea=function(){return!1},e.extend=function(t){var n=function(e){function n(n){var i=e.call(this,n)||this;return t.init&&t.init.call(i,n),i}return(0,i.ZT)(n,e),n.prototype.getDefaultStyle=function(){return(0,S.d9)(t.style)},n.prototype.getDefaultShape=function(){return(0,S.d9)(t.shape)},n}(e);for(var r in t)"function"==typeof t[r]&&(n.prototype[r]=t[r]);return n},e.SHAPE_CHANGED_BIT=4,e.initDefaultProps=((n=e.prototype).type="path",n.strokeContainThreshold=5,n.segmentIgnoreThreshold=0,n.subPixelOptimize=!1,n.autoBatch=!1,void(n.__dirty=o.Z.REDARAW_BIT|r.ZP.STYLE_CHANGED_BIT|e.SHAPE_CHANGED_BIT)),e}(r.ZP)},2763:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(9312);const r=function(t){function e(e,n,i,r,o){var a=t.call(this,r)||this;return a.x=null==e?.5:e,a.y=null==n?.5:n,a.r=null==i?.5:i,a.type="radial",a.global=o||!1,a}return(0,i.ZT)(e,t),e}(n(8387).Z)},9882:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(9312),r=n(400),o=n(9356),a=n(391),s=n(8778),l=(0,s.ce)({strokeFirst:!0,font:o.Uo,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},a.$t),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return null!=e&&"none"!==e&&t.lineWidth>0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return(0,s.nW)(l,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=(0,o.lP)(e,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(r.ZP);u.prototype.type="tspan";const c=u},4239:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>S});var i=n(9312),r=n(3146),o=n(9882),a=n(8778),s=n(9356),l=n(6781),u=n(230),c=n(9472),h=n(561),p=n(400),d={fill:"#000"},f={style:(0,a.ce)({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},p.ik.style)},g=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=d,n.attr(e),n}return(0,i.ZT)(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){this.styleChanged()&&this._updateSubTexts();for(var e=0;e<this._children.length;e++){var n=this._children[e];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}var i=this.attachedTransform;if(i){i.updateTransform();var r=i.transform;r?(this.transform=this.transform||[],(0,h.JG)(this.transform,r)):this.transform=null}else t.prototype.update.call(this)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),this.attachedTransform?this.attachedTransform.getComputedTransform():t.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){var t;this._childCursor=0,m(t=this.style),(0,a.S6)(t.rich,m),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(e){t.prototype.addSelfToZr.call(this,e);for(var n=0;n<this._children.length;n++)this._children[n].__zr=e},e.prototype.removeSelfFromZr=function(e){t.prototype.removeSelfFromZr.call(this,e);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new c.Z(0,0,0,0),e=this._children,n=[],i=null,r=0;r<e.length;r++){var o=e[r],a=o.getBoundingRect(),s=o.getLocalTransform(n);s?(t.copy(a),t.applyTransform(s),(i=i||t.clone()).union(t)):(i=i||a.clone()).union(a)}this._rect=i||t}return this._rect},e.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||d},e.prototype.setTextContent=function(t){throw new Error("Can't attach text on another text")},e.prototype._mergeStyle=function(t,e){if(!e)return t;var n=e.rich,i=t.rich||n&&{};return(0,a.l7)(t,e),n&&i?(this._mergeRich(i,n),t.rich=i):i&&(t.rich=i),t},e.prototype._mergeRich=function(t,e){for(var n=(0,a.XP)(e),i=0;i<n.length;i++){var r=n[i];t[r]=t[r]||{},(0,a.l7)(t[r],e[r])}},e.prototype.getAnimationStyleProps=function(){return f},e.prototype._getOrCreateChild=function(t){var e=this._children[this._childCursor];return e&&e instanceof t||(e=new t),this._children[this._childCursor++]=e,e.__zr=this.__zr,e.parent=this,e},e.prototype._updatePlainTexts=function(){var t=this.style,e=t.font||s.Uo,n=t.padding,i=b(t),a=(0,r.NY)(i,t),l=w(t),u=!!t.backgroundColor,h=a.outerHeight,p=a.lines,d=a.lineHeight,f=this._defaultStyle,g=t.x||0,v=t.y||0,y=t.align||f.align||"left",m=t.verticalAlign||f.verticalAlign||"top",S=g,T=(0,s.mU)(v,a.contentHeight,m);if(l||n){var M=a.width;n&&(M+=n[1]+n[3]);var C=(0,s.M3)(g,M,y),k=(0,s.mU)(v,h,m);l&&this._renderBackground(t,t,C,k,M,h)}T+=d/2,n&&(S=x(g,y,n),"top"===m?T+=n[0]:"bottom"===m&&(T-=n[2]));for(var A,I=0,D=!1,P=(null==(A="fill"in t?t.fill:(D=!0,f.fill))||"none"===A?null:A.image||A.colorStops?"#000":A),O=(_("stroke"in t?t.stroke:u||f.autoStroke&&!D?null:(I=2,f.stroke))),L=t.textShadowBlur>0,R=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),E=a.calculatedLineHeight,Z=0;Z<p.length;Z++){var N=this._getOrCreateChild(o.Z),B=N.createStyle();N.useStyle(B),B.text=p[Z],B.x=S,B.y=T,y&&(B.textAlign=y),B.textBaseline="middle",B.opacity=t.opacity,B.strokeFirst=!0,L&&(B.shadowBlur=t.textShadowBlur||0,B.shadowColor=t.textShadowColor||"transparent",B.shadowOffsetX=t.textShadowOffsetX||0,B.shadowOffsetY=t.textShadowOffsetY||0),O&&(B.stroke=O,B.lineWidth=t.lineWidth||I,B.lineDash=t.lineDash,B.lineDashOffset=t.lineDashOffset||0),P&&(B.fill=P),B.font=e,T+=d,R&&N.setBoundingRect(new c.Z((0,s.M3)(B.x,t.width,B.textAlign),(0,s.mU)(B.y,E,B.textBaseline),t.width,E))}},e.prototype._updateRichTexts=function(){var t=this.style,e=b(t),n=(0,r.$F)(e,t),i=n.width,o=n.outerWidth,a=n.outerHeight,l=t.padding,u=t.x||0,c=t.y||0,h=this._defaultStyle,p=t.align||h.align,d=t.verticalAlign||h.verticalAlign,f=(0,s.M3)(u,o,p),g=(0,s.mU)(c,a,d),v=f,y=g;l&&(v+=l[3],y+=l[0]);var m=v+i;w(t)&&this._renderBackground(t,t,f,g,o,a);for(var _=!!t.backgroundColor,x=0;x<n.lines.length;x++){for(var S=n.lines[x],T=S.tokens,M=T.length,C=S.lineHeight,k=S.width,A=0,I=v,D=m,P=M-1,O=void 0;A<M&&(!(O=T[A]).align||"left"===O.align);)this._placeToken(O,t,C,y,I,"left",_),k-=O.width,I+=O.width,A++;for(;P>=0&&"right"===(O=T[P]).align;)this._placeToken(O,t,C,y,D,"right",_),k-=O.width,D-=O.width,P--;for(I+=(i-(I-v)-(m-D)-k)/2;A<=P;)O=T[A],this._placeToken(O,t,C,y,I+O.width/2,"center",_),I+=O.width,A++;y+=C}},e.prototype._placeToken=function(t,e,n,i,r,l,u){var h=e.rich[t.styleName]||{};h.text=t.text;var p=t.verticalAlign,d=i+n/2;"top"===p?d=i+t.height/2:"bottom"===p&&(d=i+n-t.height/2),!t.isLineHolder&&w(h)&&this._renderBackground(h,e,"right"===l?r-t.width:"center"===l?r-t.width/2:r,d-t.height/2,t.width,t.height);var f=!!h.backgroundColor,g=t.textPadding;g&&(r=x(r,l,g),d-=t.height/2-g[0]-t.innerHeight/2);var v=this._getOrCreateChild(o.Z),y=v.createStyle();v.useStyle(y);var m=this._defaultStyle,b=!1,S=0,T=_("fill"in h?h.fill:"fill"in e?e.fill:(b=!0,m.fill)),M=_("stroke"in h?h.stroke:"stroke"in e?e.stroke:f||u||m.autoStroke&&!b?null:(S=2,m.stroke)),C=h.textShadowBlur>0||e.textShadowBlur>0;y.text=t.text,y.x=r,y.y=d,C&&(y.shadowBlur=h.textShadowBlur||e.textShadowBlur||0,y.shadowColor=h.textShadowColor||e.textShadowColor||"transparent",y.shadowOffsetX=h.textShadowOffsetX||e.textShadowOffsetX||0,y.shadowOffsetY=h.textShadowOffsetY||e.textShadowOffsetY||0),y.textAlign=l,y.textBaseline="middle",y.font=t.font||s.Uo,y.opacity=(0,a.R1)(h.opacity,e.opacity,1),M&&(y.lineWidth=(0,a.R1)(h.lineWidth,e.lineWidth,S),y.lineDash=(0,a.pD)(h.lineDash,e.lineDash),y.lineDashOffset=e.lineDashOffset||0,y.stroke=M),T&&(y.fill=T);var k=t.contentWidth,A=t.contentHeight;v.setBoundingRect(new c.Z((0,s.M3)(y.x,k,y.textAlign),(0,s.mU)(y.y,A,y.textBaseline),k,A))},e.prototype._renderBackground=function(t,e,n,i,r,o){var s,c,h,p=t.backgroundColor,d=t.borderWidth,f=t.borderColor,g=(0,a.HD)(p),v=t.borderRadius,y=this;if(g||d&&f){(s=this._getOrCreateChild(u.Z)).useStyle(s.createStyle()),s.style.fill=null;var m=s.shape;m.x=n,m.y=i,m.width=r,m.height=o,m.r=v,s.dirtyShape()}if(g)(h=s.style).fill=p||null,h.fillOpacity=(0,a.pD)(t.fillOpacity,1);else if(p&&p.image){(c=this._getOrCreateChild(l.ZP)).onload=function(){y.dirtyStyle()};var _=c.style;_.image=p.image,_.x=n,_.y=i,_.width=r,_.height=o}d&&f&&((h=s.style).lineWidth=d,h.stroke=f,h.strokeOpacity=(0,a.pD)(t.strokeOpacity,1),h.lineDash=t.borderDash,h.lineDashOffset=t.borderDashOffset||0,s.strokeContainThreshold=0,s.hasFill()&&s.hasStroke()&&(h.strokeFirst=!0,h.lineWidth*=2));var x=(s||c).style;x.shadowBlur=t.shadowBlur||0,x.shadowColor=t.shadowColor||"transparent",x.shadowOffsetX=t.shadowOffsetX||0,x.shadowOffsetY=t.shadowOffsetY||0,x.opacity=(0,a.R1)(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";if(t.fontSize||t.fontFamily||t.fontWeight){var n="";n="string"!=typeof t.fontSize||-1===t.fontSize.indexOf("px")&&-1===t.fontSize.indexOf("rem")&&-1===t.fontSize.indexOf("em")?isNaN(+t.fontSize)?"12px":t.fontSize+"px":t.fontSize,e=[t.fontStyle,t.fontWeight,n,t.fontFamily||"sans-serif"].join(" ")}return e&&(0,a.fy)(e)||t.textFont||t.font},e}(p.ZP),v={left:!0,right:1,center:1},y={top:1,bottom:1,middle:1};function m(t){if(t){t.font=g.makeFont(t);var e=t.align;"middle"===e&&(e="center"),t.align=null==e||v[e]?e:"left";var n=t.verticalAlign;"center"===n&&(n="middle"),t.verticalAlign=null==n||y[n]?n:"top",t.padding&&(t.padding=(0,a.MY)(t.padding))}}function _(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function x(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function b(t){var e=t.text;return null!=e&&(e+=""),e}function w(t){return!!(t.backgroundColor||t.borderWidth&&t.borderColor)}const S=g},8199:(t,e,n)=>{"use strict";n.d(e,{ko:()=>r,Gq:()=>o,v5:()=>s});var i=new(n(4290).ZP)(50);function r(t){if("string"==typeof t){var e=i.get(t);return e&&e.image}return t}function o(t,e,n,r,o){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var l=i.get(t),u={hostEl:n,cb:r,cbPayload:o};return l?!s(e=l.image)&&l.pending.push(u):((e=new Image).onload=e.onerror=a,i.put(t,e.__cachedImgObj={image:e,pending:[u]}),e.src=e.__zrImageSrc=t),e}return t}return e}function a(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var n=t.pending[e],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}t.pending.length=0}function s(t){return t&&t.width&&t.height}},3146:(t,e,n)=>{"use strict";n.d(e,{NY:()=>h,$F:()=>g});var i=n(8199),r=n(8778),o=n(9356),a=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function s(t,e,n,i,r){if(!e)return"";var o=(t+"").split("\n");r=l(e,n,i,r);for(var a=0,s=o.length;a<s;a++)o[a]=u(o[a],r);return o.join("\n")}function l(t,e,n,i){i=i||{};var a=(0,r.l7)({},i);a.font=e,n=(0,r.pD)(n,"..."),a.maxIterations=(0,r.pD)(i.maxIterations,2);var s=a.minChar=(0,r.pD)(i.minChar,0);a.cnCharWidth=(0,o.dz)("国",e);var l=a.ascCharWidth=(0,o.dz)("a",e);a.placeholder=(0,r.pD)(i.placeholder,"");for(var u=t=Math.max(0,t-1),c=0;c<s&&u>=l;c++)u-=l;var h=(0,o.dz)(n,e);return h>u&&(n="",h=0),u=t-h,a.ellipsis=n,a.ellipsisWidth=h,a.contentWidth=u,a.containerWidth=t,a}function u(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var a=(0,o.dz)(t,i);if(a<=n)return t;for(var s=0;;s++){if(a<=r||s>=e.maxIterations){t+=e.ellipsis;break}var l=0===s?c(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;t=t.substr(0,l),a=(0,o.dz)(t,i)}return""===t&&(t=e.placeholder),t}function c(t,e,n,i){for(var r=0,o=0,a=t.length;o<a&&r<e;o++){var s=t.charCodeAt(o);r+=0<=s&&s<=127?n:i}return o}function h(t,e){null!=t&&(t+="");var n,i=e.overflow,a=e.padding,s=e.font,c="truncate"===i,h=(0,o.Dp)(s),p=(0,r.pD)(e.lineHeight,h),d="truncate"===e.lineOverflow,f=e.width,g=(n=null!=f&&"break"===i||"breakAll"===i?t?_(t,e.font,f,"breakAll"===i,0).lines:[]:t?t.split("\n"):[]).length*p,v=(0,r.pD)(e.height,g);if(g>v&&d){var y=Math.floor(v/p);n=n.slice(0,y)}var m=v,x=f;if(a&&(m+=a[0]+a[2],null!=x&&(x+=a[1]+a[3])),t&&c&&null!=x)for(var b=l(f,s,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),w=0;w<n.length;w++)n[w]=u(n[w],b);if(null==f){var S=0;for(w=0;w<n.length;w++)S=Math.max((0,o.dz)(n[w],s),S);f=S}return{lines:n,height:v,outerHeight:m,lineHeight:p,calculatedLineHeight:h,contentHeight:g,width:f}}var p=function(){},d=function(t){this.tokens=[],t&&(this.tokens=t)},f=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function g(t,e){var n=new f;if(null!=t&&(t+=""),!t)return n;for(var l,u=e.width,c=e.height,h=e.overflow,p="break"!==h&&"breakAll"!==h||null==u?null:{width:u,accumWidth:0,breakAll:"breakAll"===h},d=a.lastIndex=0;null!=(l=a.exec(t));){var g=l.index;g>d&&v(n,t.substring(d,g),e,p),v(n,l[2],e,p,l[1]),d=a.lastIndex}d<t.length&&v(n,t.substring(d,t.length),e,p);var y=[],m=0,_=0,x=e.padding,b="truncate"===h,w="truncate"===e.lineOverflow;function S(t,e,n){t.width=e,t.lineHeight=n,m+=n,_=Math.max(_,e)}t:for(var T=0;T<n.lines.length;T++){for(var M=n.lines[T],C=0,k=0,A=0;A<M.tokens.length;A++){var I=(z=M.tokens[A]).styleName&&e.rich[z.styleName]||{},D=z.textPadding=I.padding,P=D?D[1]+D[3]:0,O=z.font=I.font||e.font;z.contentHeight=(0,o.Dp)(O);var L=(0,r.pD)(I.height,z.contentHeight);if(z.innerHeight=L,D&&(L+=D[0]+D[2]),z.height=L,z.lineHeight=(0,r.R1)(I.lineHeight,e.lineHeight,L),z.align=I&&I.align||e.align,z.verticalAlign=I&&I.verticalAlign||"middle",w&&null!=c&&m+z.lineHeight>c){A>0?(M.tokens=M.tokens.slice(0,A),S(M,k,C),n.lines=n.lines.slice(0,T+1)):n.lines=n.lines.slice(0,T);break t}var R=I.width,E=null==R||"auto"===R;if("string"==typeof R&&"%"===R.charAt(R.length-1))z.percentWidth=R,y.push(z),z.contentWidth=(0,o.dz)(z.text,O);else{if(E){var Z=I.backgroundColor,N=Z&&Z.image;N&&(N=i.ko(N),i.v5(N)&&(z.width=Math.max(z.width,N.width*L/N.height)))}var B=b&&null!=u?u-k:null;null!=B&&B<z.width?!E||B<P?(z.text="",z.width=z.contentWidth=0):(z.text=s(z.text,B-P,O,e.ellipsis,{minChar:e.truncateMinChar}),z.width=z.contentWidth=(0,o.dz)(z.text,O)):z.contentWidth=(0,o.dz)(z.text,O)}z.width+=P,k+=z.width,I&&(C=Math.max(C,z.lineHeight))}S(M,k,C)}for(n.outerWidth=n.width=(0,r.pD)(u,_),n.outerHeight=n.height=(0,r.pD)(c,m),n.contentHeight=m,n.contentWidth=_,x&&(n.outerWidth+=x[1]+x[3],n.outerHeight+=x[0]+x[2]),T=0;T<y.length;T++){var z,F=(z=y[T]).percentWidth;z.width=parseInt(F,10)/100*n.width}return n}function v(t,e,n,i,r){var a,s,l,u,c=""===e,h=r&&n.rich[r]||{},f=t.lines,g=h.font||n.font,v=!1;if(i){var y=h.padding,m=y?y[1]+y[3]:0;if(null!=h.width&&"auto"!==h.width){var x=(l=h.width,u=i.width,("string"==typeof l?l.lastIndexOf("%")>=0?parseFloat(l)/100*u:parseFloat(l):l)+m);f.length>0&&x+i.accumWidth>i.width&&(a=e.split("\n"),v=!0),i.accumWidth=x}else{var b=_(e,g,i.width,i.breakAll,i.accumWidth);i.accumWidth=b.accumWidth+m,s=b.linesWidths,a=b.lines}}else a=e.split("\n");for(var w=0;w<a.length;w++){var S=a[w],T=new p;if(T.styleName=r,T.text=S,T.isLineHolder=!S&&!c,"number"==typeof h.width?T.width=h.width:T.width=s?s[w]:(0,o.dz)(S,g),w||v)f.push(new d([T]));else{var M=(f[f.length-1]||(f[0]=new d)).tokens,C=M.length;1===C&&M[0].isLineHolder?M[0]=T:(S||!C||c)&&M.push(T)}}}var y=(0,r.u4)(",&?/;] ".split(""),(function(t,e){return t[e]=!0,t}),{});function m(t){return!function(t){var e=t.charCodeAt(0);return e>=33&&e<=255}(t)||!!y[t]}function _(t,e,n,i,r){for(var a=[],s=[],l="",u="",c=0,h=0,p=0;p<t.length;p++){var d=t.charAt(p);if("\n"!==d){var f=(0,o.dz)(d,e),g=!i&&!m(d);(a.length?h+f>n:r+h+f>n)?h?(l||u)&&(g?(l||(l=u,u="",h=c=0),a.push(l),s.push(h-c),u+=d,l="",h=c+=f):(u&&(l+=u,h+=c,u="",c=0),a.push(l),s.push(h),l=d,h=f)):g?(a.push(u),s.push(c),u=d,c=f):(a.push(d),s.push(f)):(h+=f,g?(u+=d,c+=f):(u&&(l+=u,u="",c=0),l+=d))}else u&&(l+=u,h+=c),a.push(l),s.push(h),l="",u="",c=0,h=0}return a.length||l||(l=t,u="",c=0),u&&(l+=u),l&&(a.push(l),s.push(h)),1===a.length&&(h+=r),{accumWidth:h,lines:a,linesWidths:s}}},5425:(t,e,n)=>{"use strict";n.d(e,{L:()=>o});var i=n(213);function r(t,e,n,i,r,o,a){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*a+(-3*(e-n)-2*s-l)*o+s*r+e}function o(t,e,n){var o=e.smooth,a=e.points;if(a&&a.length>=2){if(o&&"spline"!==o){var s=function(t,e,n,r){var o,a,s,l,u=[],c=[],h=[],p=[];if(r){s=[1/0,1/0],l=[-1/0,-1/0];for(var d=0,f=t.length;d<f;d++)(0,i.VV)(s,s,t[d]),(0,i.Fp)(l,l,t[d]);(0,i.VV)(s,s,r[0]),(0,i.Fp)(l,l,r[1])}for(d=0,f=t.length;d<f;d++){var g=t[d];if(n)o=t[d?d-1:f-1],a=t[(d+1)%f];else{if(0===d||d===f-1){u.push((0,i.d9)(t[d]));continue}o=t[d-1],a=t[d+1]}(0,i.lu)(c,a,o),(0,i.bA)(c,c,e);var v=(0,i.TE)(g,o),y=(0,i.TE)(g,a),m=v+y;0!==m&&(v/=m,y/=m),(0,i.bA)(h,c,-v),(0,i.bA)(p,c,y);var _=(0,i.IH)([],g,h),x=(0,i.IH)([],g,p);r&&((0,i.Fp)(_,_,s),(0,i.VV)(_,_,l),(0,i.Fp)(x,x,s),(0,i.VV)(x,x,l)),u.push(_),u.push(x)}return n&&u.push(u.shift()),u}(a,o,n,e.smoothConstraint);t.moveTo(a[0][0],a[0][1]);for(var l=a.length,u=0;u<(n?l:l-1);u++){var c=s[2*u],h=s[2*u+1],p=a[(u+1)%l];t.bezierCurveTo(c[0],c[1],h[0],h[1],p[0],p[1])}}else{"spline"===o&&(a=function(t,e){for(var n=t.length,o=[],a=0,s=1;s<n;s++)a+=(0,i.TE)(t[s-1],t[s]);var l=a/2;for(l=l<n?n:l,s=0;s<l;s++){var u=s/(l-1)*(e?n:n-1),c=Math.floor(u),h=u-c,p=void 0,d=t[c%n],f=void 0,g=void 0;e?(p=t[(c-1+n)%n],f=t[(c+1)%n],g=t[(c+2)%n]):(p=t[0===c?c:c-1],f=t[c>n-2?n-1:c+1],g=t[c>n-3?n-1:c+2]);var v=h*h,y=h*v;o.push([r(p[0],d[0],f[0],g[0],h,v,y),r(p[1],d[1],f[1],g[1],h,v,y)])}return o}(a,n)),t.moveTo(a[0][0],a[0][1]),u=1;for(var d=a.length;u<d;u++)t.lineTo(a[u][0],a[u][1])}n&&t.closePath()}}},6169:(t,e,n)=>{"use strict";n.d(e,{_3:()=>r,Pw:()=>o,vu:()=>a});var i=Math.round;function r(t,e,n){if(e){var r=e.x1,o=e.x2,s=e.y1,l=e.y2;t.x1=r,t.x2=o,t.y1=s,t.y2=l;var u=n&&n.lineWidth;return u?(i(2*r)===i(2*o)&&(t.x1=t.x2=a(r,u,!0)),i(2*s)===i(2*l)&&(t.y1=t.y2=a(s,u,!0)),t):t}}function o(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,s=e.height;t.x=i,t.y=r,t.width=o,t.height=s;var l=n&&n.lineWidth;return l?(t.x=a(i,l,!0),t.y=a(r,l,!0),t.width=Math.max(a(i+o,l,!1)-t.x,0===o?0:1),t.height=Math.max(a(r+s,l,!1)-t.y,0===s?0:1),t):t}}function a(t,e,n){if(!e)return t;var r=i(2*t);return(r+i(e))%2==0?r/2:(r+(n?1:-1))/2}},9689:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(9312),r=n(391),o=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(o),u=Math.sin(o);t.moveTo(l*r+n,u*r+i),t.arc(n,i,r,o,a,!s)},e}(r.ZP);a.prototype.type="arc";const s=a},3584:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i=n(9312),r=n(391),o=n(213),a=n(3475),s=[],l=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function u(t,e,n){var i=t.cpx2,r=t.cpy2;return null===i||null===r?[(n?a.X_:a.af)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?a.X_:a.af)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?a.AZ:a.Zm)(t.x1,t.cpx1,t.x2,e),(n?a.AZ:a.Zm)(t.y1,t.cpy1,t.y2,e)]}var c=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new l},e.prototype.buildPath=function(t,e){var n=e.x1,i=e.y1,r=e.x2,o=e.y2,l=e.cpx1,u=e.cpy1,c=e.cpx2,h=e.cpy2,p=e.percent;0!==p&&(t.moveTo(n,i),null==c||null==h?(p<1&&((0,a.Lx)(n,l,r,p,s),l=s[1],r=s[2],(0,a.Lx)(i,u,o,p,s),u=s[1],o=s[2]),t.quadraticCurveTo(l,u,r,o)):(p<1&&((0,a.Vz)(n,l,c,r,p,s),l=s[1],c=s[2],r=s[3],(0,a.Vz)(i,u,h,o,p,s),u=s[1],h=s[2],o=s[3]),t.bezierCurveTo(l,u,c,h,r,o)))},e.prototype.pointAt=function(t){return u(this.shape,t,!1)},e.prototype.tangentAt=function(t){var e=u(this.shape,t,!0);return o.Fv(e,e)},e}(r.ZP);c.prototype.type="bezier-curve";const h=c},1707:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(9312),r=n(391),o=function(){this.cx=0,this.cy=0,this.r=0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e,n){n&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI)},e}(r.ZP);a.prototype.type="circle";const s=a},9509:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(9312),r=n(391),o=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){var n=.5522848,i=e.cx,r=e.cy,o=e.rx,a=e.ry,s=o*n,l=a*n;t.moveTo(i-o,r),t.bezierCurveTo(i-o,r-l,i-s,r-a,i,r-a),t.bezierCurveTo(i+s,r-a,i+o,r-l,i+o,r),t.bezierCurveTo(i+o,r+l,i+s,r+a,i,r+a),t.bezierCurveTo(i-s,r+a,i-o,r+l,i-o,r),t.closePath()},e}(r.ZP);a.prototype.type="ellipse";const s=a},6573:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i=n(9312),r=n(391),o=n(6169),a={},s=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},l=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new s},e.prototype.buildPath=function(t,e){var n,i,r,s;if(this.subPixelOptimize){var l=(0,o._3)(a,e,this.style);n=l.x1,i=l.y1,r=l.x2,s=l.y2}else n=e.x1,i=e.y1,r=e.x2,s=e.y2;var u=e.percent;0!==u&&(t.moveTo(n,i),u<1&&(r=n*(1-u)+r*u,s=i*(1-u)+s*u),t.lineTo(r,s))},e.prototype.pointAt=function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]},e}(r.ZP);l.prototype.type="line";const u=l},1748:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(9312),r=n(391),o=n(5425),a=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},s=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new a},e.prototype.buildPath=function(t,e){o.L(t,e,!0)},e}(r.ZP);s.prototype.type="polygon";const l=s},9181:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(9312),r=n(391),o=n(5425),a=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},s=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new a},e.prototype.buildPath=function(t,e){o.L(t,e,!1)},e}(r.ZP);s.prototype.type="polyline";const l=s},230:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i=n(9312),r=n(391),o=n(6169),a=function(){this.x=0,this.y=0,this.width=0,this.height=0},s={},l=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new a},e.prototype.buildPath=function(t,e){var n,i,r,a;if(this.subPixelOptimize){var l=(0,o.Pw)(s,e,this.style);n=l.x,i=l.y,r=l.width,a=l.height,l.r=e.r,e=l}else n=e.x,i=e.y,r=e.width,a=e.height;e.r?function(t,e){var n,i,r,o,a,s=e.x,l=e.y,u=e.width,c=e.height,h=e.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof h?n=i=r=o=h:h instanceof Array?1===h.length?n=i=r=o=h[0]:2===h.length?(n=r=h[0],i=o=h[1]):3===h.length?(n=h[0],i=o=h[1],r=h[2]):(n=h[0],i=h[1],r=h[2],o=h[3]):n=i=r=o=0,n+i>u&&(n*=u/(a=n+i),i*=u/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),i+r>c&&(i*=c/(a=i+r),r*=c/a),n+o>c&&(n*=c/(a=n+o),o*=c/a),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+c-r),0!==r&&t.arc(s+u-r,l+c-r,r,0,Math.PI/2),t.lineTo(s+o,l+c),0!==o&&t.arc(s+o,l+c-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(t,e):t.rect(n,i,r,a)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(r.ZP);l.prototype.type="rect";const u=l},4874:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(9312),r=n(391),o=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)},e}(r.ZP);a.prototype.type="ring";const s=a},2098:(t,e,n)=>{"use strict";n.d(e,{Z:()=>x});var i=n(9312),r=n(391),o=n(2397),a=Math.PI,s=2*a,l=Math.sin,u=Math.cos,c=Math.acos,h=Math.atan2,p=Math.abs,d=Math.sqrt,f=Math.max,g=Math.min,v=1e-4;function y(t,e,n,i,r,o,a){var s=t-n,l=e-i,u=(a?o:-o)/d(s*s+l*l),c=u*l,h=-u*s,p=t+c,g=e+h,v=n+c,y=i+h,m=(p+v)/2,_=(g+y)/2,x=v-p,b=y-g,w=x*x+b*b,S=r-o,T=p*y-v*g,M=(b<0?-1:1)*d(f(0,S*S*w-T*T)),C=(T*b-x*M)/w,k=(-T*x-b*M)/w,A=(T*b+x*M)/w,I=(-T*x+b*M)/w,D=C-m,P=k-_,O=A-m,L=I-_;return D*D+P*P>O*O+L*L&&(C=A,k=I),{cx:C,cy:k,x01:-c,y01:-h,x11:C*(r/S-1),y11:k*(r/S-1)}}var m=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0,this.innerCornerRadius=0},_=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new m},e.prototype.buildPath=function(t,e){!function(t,e){var n=f(e.r,0),i=f(e.r0||0,0),r=n>0;if(r||i>0){if(r||(n=i,i=0),i>n){var m=n;n=i,i=m}var _=!!e.clockwise,x=e.startAngle,b=e.endAngle,w=[x,b];(0,o.L)(w,!_);var S=p(w[0]-w[1]),T=e.cx,M=e.cy,C=e.cornerRadius||0,k=e.innerCornerRadius||0;if(n>v)if(S>s-v)t.moveTo(T+n*u(x),M+n*l(x)),t.arc(T,M,n,x,b,!_),i>v&&(t.moveTo(T+i*u(b),M+i*l(b)),t.arc(T,M,i,b,x,_));else{var A=p(n-i)/2,I=g(A,C),D=g(A,k),P=D,O=I,L=n*u(x),R=n*l(x),E=i*u(b),Z=i*l(b),N=void 0,B=void 0,z=void 0,F=void 0;if((I>v||D>v)&&(N=n*u(b),B=n*l(b),z=i*u(x),F=i*l(x),S<a)){var W=function(t,e,n,i,r,o,a,s){var l=n-t,u=i-e,c=a-r,h=s-o,p=h*l-c*u;if(!(p*p<v))return[t+(p=(c*(e-o)-h*(t-r))/p)*l,e+p*u]}(L,R,z,F,N,B,E,Z);if(W){var V=L-W[0],H=R-W[1],U=N-W[0],G=B-W[1],X=1/l(c((V*U+H*G)/(d(V*V+H*H)*d(U*U+G*G)))/2),Y=d(W[0]*W[0]+W[1]*W[1]);P=g(D,(i-Y)/(X-1)),O=g(I,(n-Y)/(X+1))}}if(S>v)if(O>v){var j=y(z,F,L,R,n,O,_),$=y(N,B,E,Z,n,O,_);t.moveTo(T+j.cx+j.x01,M+j.cy+j.y01),O<I?t.arc(T+j.cx,M+j.cy,O,h(j.y01,j.x01),h($.y01,$.x01),!_):(t.arc(T+j.cx,M+j.cy,O,h(j.y01,j.x01),h(j.y11,j.x11),!_),t.arc(T,M,n,h(j.cy+j.y11,j.cx+j.x11),h($.cy+$.y11,$.cx+$.x11),!_),t.arc(T+$.cx,M+$.cy,O,h($.y11,$.x11),h($.y01,$.x01),!_))}else t.moveTo(T+L,M+R),t.arc(T,M,n,x,b,!_);else t.moveTo(T+L,M+R);i>v&&S>v?P>v?(j=y(E,Z,N,B,i,-P,_),$=y(L,R,z,F,i,-P,_),t.lineTo(T+j.cx+j.x01,M+j.cy+j.y01),P<D?t.arc(T+j.cx,M+j.cy,P,h(j.y01,j.x01),h($.y01,$.x01),!_):(t.arc(T+j.cx,M+j.cy,P,h(j.y01,j.x01),h(j.y11,j.x11),!_),t.arc(T,M,i,h(j.cy+j.y11,j.cx+j.x11),h($.cy+$.y11,$.cx+$.x11),_),t.arc(T+$.cx,M+$.cy,P,h($.y11,$.x11),h($.y01,$.x01),!_))):(t.lineTo(T+E,M+Z),t.arc(T,M,i,b,x,_)):t.lineTo(T+E,M+Z)}else t.moveTo(T,M);t.closePath()}}(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(r.ZP);_.prototype.type="sector";const x=_},1756:(t,e,n)=>{"use strict";n.d(e,{Qc:()=>g,xb:()=>y,NC:()=>m,Pz:()=>_,L0:()=>x});var i=n(4290),r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function o(t){return(t=Math.round(t))<0?0:t>255?255:t}function a(t){return t<0?0:t>1?1:t}function s(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?o(parseFloat(e)/100*255):o(parseInt(e,10))}function l(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?a(parseFloat(e)/100):a(parseFloat(e))}function u(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function c(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function h(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var p=new i.ZP(20),d=null;function f(t,e){d&&h(d,e),d=p.put(t,d||e.slice())}function g(t,e){if(t){e=e||[];var n=p.get(t);if(n)return h(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in r)return h(e,r[i]),f(t,e),e;var o,a=i.length;if("#"===i.charAt(0))return 4===a||5===a?(o=parseInt(i.slice(1,4),16))>=0&&o<=4095?(c(e,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===a?parseInt(i.slice(4),16)/15:1),f(t,e),e):void c(e,0,0,0,1):7===a||9===a?(o=parseInt(i.slice(1,7),16))>=0&&o<=16777215?(c(e,(16711680&o)>>16,(65280&o)>>8,255&o,9===a?parseInt(i.slice(7),16)/255:1),f(t,e),e):void c(e,0,0,0,1):void 0;var u=i.indexOf("("),d=i.indexOf(")");if(-1!==u&&d+1===a){var g=i.substr(0,u),y=i.substr(u+1,d-(u+1)).split(","),m=1;switch(g){case"rgba":if(4!==y.length)return 3===y.length?c(e,+y[0],+y[1],+y[2],1):c(e,0,0,0,1);m=l(y.pop());case"rgb":return 3!==y.length?void c(e,0,0,0,1):(c(e,s(y[0]),s(y[1]),s(y[2]),m),f(t,e),e);case"hsla":return 4!==y.length?void c(e,0,0,0,1):(y[3]=l(y[3]),v(y,e),f(t,e),e);case"hsl":return 3!==y.length?void c(e,0,0,0,1):(v(y,e),f(t,e),e);default:return}}c(e,0,0,0,1)}}function v(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=l(t[1]),r=l(t[2]),a=r<=.5?r*(i+1):r+i-r*i,s=2*r-a;return c(e=e||[],o(255*u(s,a,n+1/3)),o(255*u(s,a,n)),o(255*u(s,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function y(t,e){var n=g(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return _(n,4===n.length?"rgba":"rgb")}}function m(t){var e=g(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function _(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function x(t,e){var n=g(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}},7367:(t,e,n)=>{"use strict";n.d(e,{iR:()=>M,Pc:()=>C,AA:()=>k});var i=n(9312),r=n(391),o=n(2397),a=n(213),s=o.Z.CMD,l=[[],[],[]],u=Math.sqrt,c=Math.atan2,h=n(8778),p=Math.sqrt,d=Math.sin,f=Math.cos,g=Math.PI;function v(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function y(t,e){return(t[0]*e[0]+t[1]*e[1])/(v(t)*v(e))}function m(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(y(t,e))}function _(t,e,n,i,r,o,a,s,l,u,c){var h=l*(g/180),v=f(h)*(t-n)/2+d(h)*(e-i)/2,_=-1*d(h)*(t-n)/2+f(h)*(e-i)/2,x=v*v/(a*a)+_*_/(s*s);x>1&&(a*=p(x),s*=p(x));var b=(r===o?-1:1)*p((a*a*(s*s)-a*a*(_*_)-s*s*(v*v))/(a*a*(_*_)+s*s*(v*v)))||0,w=b*a*_/s,S=b*-s*v/a,T=(t+n)/2+f(h)*w-d(h)*S,M=(e+i)/2+d(h)*w+f(h)*S,C=m([1,0],[(v-w)/a,(_-S)/s]),k=[(v-w)/a,(_-S)/s],A=[(-1*v-w)/a,(-1*_-S)/s],I=m(k,A);if(y(k,A)<=-1&&(I=g),y(k,A)>=1&&(I=0),I<0){var D=Math.round(I/g*1e6)/1e6;I=2*g+D%2*g}c.addData(u,T,M,a,s,C,I,h,o)}var x=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,b=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,w=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.applyTransform=function(t){},e}(r.ZP);function S(t){return null!=t.setData}function T(t,e){var n=function(t){if(!t)return new o.Z;for(var e,n=0,i=0,r=n,a=i,s=new o.Z,l=o.Z.CMD,u=t.match(x),c=0;c<u.length;c++){for(var h=u[c],p=h.charAt(0),d=void 0,f=h.match(b)||[],g=f.length,v=0;v<g;v++)f[v]=parseFloat(f[v]);for(var y=0;y<g;){var m=void 0,w=void 0,S=void 0,T=void 0,M=void 0,C=void 0,k=void 0,A=n,I=i,D=void 0,P=void 0;switch(p){case"l":n+=f[y++],i+=f[y++],d=l.L,s.addData(d,n,i);break;case"L":n=f[y++],i=f[y++],d=l.L,s.addData(d,n,i);break;case"m":n+=f[y++],i+=f[y++],d=l.M,s.addData(d,n,i),r=n,a=i,p="l";break;case"M":n=f[y++],i=f[y++],d=l.M,s.addData(d,n,i),r=n,a=i,p="L";break;case"h":n+=f[y++],d=l.L,s.addData(d,n,i);break;case"H":n=f[y++],d=l.L,s.addData(d,n,i);break;case"v":i+=f[y++],d=l.L,s.addData(d,n,i);break;case"V":i=f[y++],d=l.L,s.addData(d,n,i);break;case"C":d=l.C,s.addData(d,f[y++],f[y++],f[y++],f[y++],f[y++],f[y++]),n=f[y-2],i=f[y-1];break;case"c":d=l.C,s.addData(d,f[y++]+n,f[y++]+i,f[y++]+n,f[y++]+i,f[y++]+n,f[y++]+i),n+=f[y-2],i+=f[y-1];break;case"S":m=n,w=i,D=s.len(),P=s.data,e===l.C&&(m+=n-P[D-4],w+=i-P[D-3]),d=l.C,A=f[y++],I=f[y++],n=f[y++],i=f[y++],s.addData(d,m,w,A,I,n,i);break;case"s":m=n,w=i,D=s.len(),P=s.data,e===l.C&&(m+=n-P[D-4],w+=i-P[D-3]),d=l.C,A=n+f[y++],I=i+f[y++],n+=f[y++],i+=f[y++],s.addData(d,m,w,A,I,n,i);break;case"Q":A=f[y++],I=f[y++],n=f[y++],i=f[y++],d=l.Q,s.addData(d,A,I,n,i);break;case"q":A=f[y++]+n,I=f[y++]+i,n+=f[y++],i+=f[y++],d=l.Q,s.addData(d,A,I,n,i);break;case"T":m=n,w=i,D=s.len(),P=s.data,e===l.Q&&(m+=n-P[D-4],w+=i-P[D-3]),n=f[y++],i=f[y++],d=l.Q,s.addData(d,m,w,n,i);break;case"t":m=n,w=i,D=s.len(),P=s.data,e===l.Q&&(m+=n-P[D-4],w+=i-P[D-3]),n+=f[y++],i+=f[y++],d=l.Q,s.addData(d,m,w,n,i);break;case"A":S=f[y++],T=f[y++],M=f[y++],C=f[y++],k=f[y++],_(A=n,I=i,n=f[y++],i=f[y++],C,k,S,T,M,d=l.A,s);break;case"a":S=f[y++],T=f[y++],M=f[y++],C=f[y++],k=f[y++],_(A=n,I=i,n+=f[y++],i+=f[y++],C,k,S,T,M,d=l.A,s)}}"z"!==p&&"Z"!==p||(d=l.Z,s.addData(d),n=r,i=a),e=d}return s.toStatic(),s}(t),i=(0,h.l7)({},e);return i.buildPath=function(t){if(S(t))t.setData(n.data),(e=t.getContext())&&t.rebuildPath(e,1);else{var e=t;n.rebuildPath(e,1)}},i.applyTransform=function(t){!function(t,e){var n,i,r,o,h,p,d=t.data,f=t.len(),g=s.M,v=s.C,y=s.L,m=s.R,_=s.A,x=s.Q;for(r=0,o=0;r<f;){switch(n=d[r++],o=r,i=0,n){case g:case y:i=1;break;case v:i=3;break;case x:i=2;break;case _:var b=e[4],w=e[5],S=u(e[0]*e[0]+e[1]*e[1]),T=u(e[2]*e[2]+e[3]*e[3]),M=c(-e[1]/T,e[0]/S);d[r]*=S,d[r++]+=b,d[r]*=T,d[r++]+=w,d[r++]*=S,d[r++]*=T,d[r++]+=M,d[r++]+=M,o=r+=2;break;case m:p[0]=d[r++],p[1]=d[r++],(0,a.Ne)(p,p,e),d[o++]=p[0],d[o++]=p[1],p[0]+=d[r++],p[1]+=d[r++],(0,a.Ne)(p,p,e),d[o++]=p[0],d[o++]=p[1]}for(h=0;h<i;h++){var C=l[h];C[0]=d[r++],C[1]=d[r++],(0,a.Ne)(C,C,e),d[o++]=C[0],d[o++]=C[1]}}t.increaseVersion()}(n,t),this.dirtyShape()},i}function M(t,e){return new w(T(t,e))}function C(t,e){var n=T(t,e);return function(t){function e(e){var i=t.call(this,e)||this;return i.applyTransform=n.applyTransform,i.buildPath=n.buildPath,i}return(0,i.ZT)(e,t),e}(w)}function k(t,e){for(var n=[],i=t.length,o=0;o<i;o++){var a=t[o];a.path||a.createPathProxy(),a.shapeChanged()&&a.buildPath(a.path,a.shape,!0),n.push(a.path)}var s=new r.ZP(e);return s.createPathProxy(),s.buildPath=function(t){if(S(t)){t.appendPath(n);var e=t.getContext();e&&t.rebuildPath(e,1)}},s}}}]);
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzQxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLzc0MS5qcyJdLCJtYXBwaW5ncyI6IjtBQUFBIiwic291cmNlUm9vdCI6IiJ9
|
/*
* Copyright 2018 ThoughtWorks, 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.
*/
const Stream = require("mithril/stream");
const _ = require("lodash");
const Dfr = require("jquery").Deferred;
const PluginInfos = require("models/shared/plugin_infos");
const ConfigRepoVM = require("views/config_repos/models/config_repo_vm");
function ReposListVM(model) {
const repos = Stream([]);
CreateSupport.call(this, model, repos);
UpdateSupport.call(this, model, repos);
DeleteSupport.call(this, model, repos);
const self = this;
const addError = (msg) => { // fixme: add better error handling. this is cheap & not production quality.
if (!contains(self.errors(), msg)) {
self.errors().push(msg);
}
};
this.load = () => {
this.errors([]);
this.loading(true);
model.all().then((data) => {
repos(data._embedded.config_repos.map((r) => new ConfigRepoVM(r)));
}, addError).always(() => this.loading(false));
return this;
};
this.loadPlugins = () => {
this.errors([]);
return PluginInfos.all(null, {type: "configrepo"}).then((infos) => {
const all = [];
infos.eachPluginInfo((p) => { all.push({ id: p.id(), text: p.about().name() }); });
this.pluginChoices(all);
}, addError);
};
this.pluginChoices = Stream([]);
this.loading = Stream(false);
this.errors = Stream([]);
this.repos = repos;
}
// Mixins
const MATERIAL_SELECTIONS = [
{ id: "git", text: "Git" },
{ id: "hg", text: "Mercurial" },
{ id: "svn", text: "Subversion" },
{ id: "p4", text: "Perforce" },
{ id: "tfs", text: "Team Foundation Server" }
];
function CreateSupport(model, repos) {
this.availMaterials = MATERIAL_SELECTIONS;
this.typeToAdd = Stream(this.availMaterials[0].id);
this.addModel = Stream(null);
this.addMode = () => !!this.addModel();
this.enterAddMode = () => {
this.editModel(null);
const payload = {
plugin_id: this.pluginChoices()[0].id, // eslint-disable-line camelcase
material: {
type: this.typeToAdd()
}
};
this.addModel(new ConfigRepoVM(payload));
};
this.exitAddMode = () => this.addModel(null);
this.createRepo = withValidation((repo) => model.create(repo).then((data, etag) => {
const repo = new ConfigRepoVM(data);
if (etag) { repo.etag(etag); }
repos().push(repo);
}, repo.serverErrors));
}
function UpdateSupport(model, repos) {
this.editModel = Stream(null);
this.editMode = (repo) => !!this.editModel() && this.editModel().id() === repo.id();
this.enterEditMode = (repo) => {
this.addModel(null);
model.get(repo.etag(), repo.id()).then((data, etag, status) => {
if (etag) { repo.etag(etag); }
if (304 !== status && data) { repo.initialize(data); }
this.editModel(repo.clone());
}, repo.serverErrors);
};
this.exitEditMode = () => this.editModel(null);
this.updateRepo = withValidation((repo) => model.update(repo.etag(), repo).then((data, etag) => {
if (etag) { repo.etag(etag); }
repo.initialize(data);
const idx = _.findIndex(repos(), (r) => r.id() === repo.id()); // should not fail
repos().splice(idx, 1, repo);
}, repo.serverErrors));
}
function DeleteSupport(model, repos) {
this.removeRepo = (repo) => model.delete(repo.id()).then(() => repos().splice(repos().indexOf(repo), 1), repo.serverErrors);
}
// Utility functions
function withValidation(proceed) {
return (repo) => {
repo.serverErrors(null);
return repo.allowSave() ? proceed(repo) : Dfr(function fail() { this.reject(); }).promise();
};
}
function contains(arr, el) { return !!~arr.indexOf(el); }
// expose for tests
_.assign(ReposListVM, {CreateSupport, UpdateSupport, DeleteSupport});
module.exports = ReposListVM;
|
'use strict';
/* global Promise */
var PromiseA;
try {
PromiseA = require('bluebird');
} catch(e) {
PromiseA = Promise;
}
var util = require('util');
if (!util.promisify) {
util.promisify = PromiseA.promisify;
}
function promisifyAll(obj) {
var aobj = {};
Object.keys(obj).forEach(function (key) {
aobj[key + 'Async'] = util.promisify(obj[key]);
});
return aobj;
}
var mkdirpAsync = util.promisify(require('@root/mkdirp'));
var path = require('path');
var fs = require('fs');
var readFileAsync = util.promisify(fs.readFile);
var readdirAsync = util.promisify(fs.readdir);
var writeFileAsync = util.promisify(fs.writeFile);
var statAsync = util.promisify(fs.stat);
var sfs = require('safe-replace');
var os = require('os');
function log(debug) {
if (debug) {
var args = Array.prototype.slice.call(arguments);
args.shift();
args.unshift("[le-store-certbot]");
console.log.apply(console, args);
}
}
function writeRenewalConfig(args) {
var pyobj = args.pyobj;
pyobj.checkpoints = parseInt(pyobj.checkpoints, 10) || 0;
var pyconf = promisifyAll(require('pyconf'));
var liveDir = args.liveDir || path.join(args.configDir, 'live', args.domains[0]);
var certPath = args.certPath || pyobj.cert || path.join(liveDir, 'cert.pem');
var fullchainPath = args.fullchainPath || pyobj.fullchain || path.join(liveDir, 'fullchain.pem');
var chainPath = args.chainPath || pyobj.chain || path.join(liveDir, 'chain.pem');
var privkeyPath = args.privkeyPath || pyobj.privkey
//|| args.domainPrivateKeyPath || args.domainKeyPath || pyobj.keyPath
|| path.join(liveDir, 'privkey.pem');
log(args.debug, 'writeRenewalConfig privkeyPath', privkeyPath);
var updates = {
account: args.account.id
, configDir: args.configDir
, domains: args.domains
, email: args.email
, tos: args.agreeTos && true
// yes, it's an array. weird, right?
, webrootPath: args.webrootPath && [args.webrootPath] || []
, server: args.server || args.acmeDiscoveryUrl
, privkey: privkeyPath
, fullchain: fullchainPath
, cert: certPath
, chain: chainPath
, http01Port: args.http01Port
, keyPath: args.domainPrivateKeyPath || args.privkeyPath
, rsaKeySize: args.rsaKeySize
, checkpoints: pyobj.checkpoints
/* // TODO XXX what's the deal with these? they don't make sense
// are they just old junk? or do they have a meaning that I don't know about?
, fullchainPath: path.join(args.configDir, 'chain.pem')
, certPath: path.join(args.configDir, 'cert.pem')
, chainPath: path.join(args.configDir, 'chain.pem')
*/ // TODO XXX end
, workDir: args.workDir
, logsDir: args.logsDir
};
// final section is completely dynamic
// :hostname = :webroot_path
args.domains.forEach(function (hostname) {
updates[hostname] = args.webrootPath;
});
// must write back to the original pyobject or
// annotations will be lost
Object.keys(updates).forEach(function (key) {
pyobj[key] = updates[key];
});
return mkdirpAsync(path.dirname(args.renewalPath)).then(function () {
return pyconf.writeFileAsync(args.renewalPath, pyobj);
}).then(function () {
// NOTE
// writing twice seems to causes a bug,
// so instead we re-read the file from the disk
return pyconf.readFileAsync(args.renewalPath);
});
}
function pyToJson(pyobj) {
if (!pyobj) {
return null;
}
var jsobj = {};
Object.keys(pyobj).forEach(function (key) {
jsobj[key] = pyobj[key];
});
jsobj.__lines = undefined;
jsobj.__keys = undefined;
return jsobj;
}
var crypto = require('crypto');
var rnd = crypto.randomBytes(8).toString('hex');
var defaults = {
configDir: [ os.homedir(), 'letsencrypt', 'etc' ].join(path.sep) // /etc/letsencrypt/
, logsDir: [ os.tmpdir(), 'acme-' + rnd, 'log' ].join(path.sep) // /var/log/letsencrypt/
, webrootPath: [ os.tmpdir(), 'acme-' + rnd, 'acme-challenge' ].join(path.sep)
, accountsDir: [ ':configDir', 'accounts', ':serverDir' ].join(path.sep)
, renewalPath: [ ':configDir', 'renewal', ':hostname.conf' ].join(path.sep)
, renewalDir: [ ':configDir', 'renewal', '' ].join(path.sep)
, serverDirGet: function (copy) {
return (copy.server || '').replace('https://', '').replace(/(\/)$/, '').replace(/\//g, path.sep);
}
, privkeyPath: ':configDir/live/:hostname/privkey.pem'.split(/\//).join(path.sep)
, fullchainPath: [ ':configDir', 'live', ':hostname', 'fullchain.pem' ].join(path.sep)
, certPath: [ ':configDir', 'live', ':hostname', 'cert.pem' ].join(path.sep)
, chainPath: [ ':configDir', 'live', ':hostname', 'chain.pem' ].join(path.sep)
, bundlePath: [ ':configDir', 'live', ':hostname', 'bundle.pem' ].join(path.sep)
, rsaKeySize: 2048
};
module.exports.create = function (configs) {
var mergedConfigs;
var store = {
getOptions: function () {
if (mergedConfigs) {
return configs;
}
if (!configs.domainKeyPath) {
configs.domainKeyPath = configs.privkeyPath || defaults.privkeyPath;
}
Object.keys(defaults).forEach(function (key) {
if (!configs[key]) {
configs[key] = defaults[key];
}
});
mergedConfigs = configs;
return configs;
}
, keypairs: {
checkAsync: function (keypath, format) {
if (!keypath) {
return null;
}
return readFileAsync(keypath, 'ascii').then(function (key) {
if ('jwk' === format) {
return { privateKeyJwk: JSON.parse(key) };
}
else {
return { privateKeyPem: key };
}
}, function (err) {
if ('ENOENT' !== err.code) {
throw err;
}
return null;
});
}
, setAsync: function (keypath, keypair, format) {
return mkdirpAsync(path.dirname(keypath)).then(function () {
var key;
if ('jwk' === format) {
key = JSON.stringify(keypair.privateKeyJwk, null, ' ');
}
else {
key = keypair.privateKeyPem;
}
return writeFileAsync(keypath, key, 'ascii').then(function () {
return keypair;
});
});
}
}
//
// Certificates
//
, certificates: {
// Certificates
checkKeypairAsync: function (args) {
if (!args.domainKeyPath) {
return PromiseA.reject(new Error("missing options.domainKeyPath"));
}
return store.keypairs.checkAsync(args.domainKeyPath, 'pem');
}
// Certificates
, setKeypairAsync: function (args, keypair) {
return store.keypairs.setAsync(args.domainKeyPath, keypair, 'pem');
}
// Certificates
, checkAsync: function (args) {
if (!args.fullchainPath || !args.privkeyPath || !args.certPath || !args.chainPath) {
return PromiseA.reject(new Error("missing one or more of privkeyPath, fullchainPath, certPath, chainPath from options"));
}
//, readFileAsync(fullchainPath, 'ascii')
// note: if this ^^ gets added back in, the arrays below must change
return PromiseA.all([
readFileAsync(args.privkeyPath, 'ascii') // 0
, readFileAsync(args.certPath, 'ascii') // 1
, readFileAsync(args.chainPath, 'ascii') // 2
// stat the file, not the link
, statAsync(args.certPath) // 3
]).then(function (arr) {
return {
privkey: arr[0] // privkey.pem
, cert: arr[1] // cert.pem
, chain: arr[2] // chain.pem
/*
// TODO populate these values only if they are known
, issuedAt: arr[3].mtime.valueOf()
, expiresAt: arr[3].mtime.valueOf() + (90 * 24 * 60 * 60 * 100)
*/
};
}, function (err) {
if (args.debug) {
log("certificates.check");
log(err.stack);
}
return null;
});
}
// Certificates
, setAsync: function (args) {
return store.configs.getAsync(args).then(function (pyobj) {
var pems = args.pems;
pyobj.checkpoints = parseInt(pyobj.checkpoints, 10) || 0;
var liveDir = args.liveDir || path.join(args.configDir, 'live', args.domains[0]);
var certPath = args.certPath || pyobj.cert || path.join(liveDir, 'cert.pem');
var fullchainPath = args.fullchainPath || pyobj.fullchain || path.join(liveDir, 'fullchain.pem');
var chainPath = args.chainPath || pyobj.chain || path.join(liveDir, 'chain.pem');
var privkeyPath = args.privkeyPath || pyobj.privkey || args.domainKeyPath || path.join(liveDir, 'privkey.pem');
var bundlePath = args.bundlePath || pyobj.bundle || path.join(liveDir, 'bundle.pem');
var archiveDir = args.archiveDir || path.join(args.configDir, 'archive', args.domains[0]);
var checkpoints = pyobj.checkpoints.toString();
var certArchive = path.join(archiveDir, 'cert' + checkpoints + '.pem');
var fullchainArchive = path.join(archiveDir, 'fullchain' + checkpoints + '.pem');
var chainArchive = path.join(archiveDir, 'chain'+ checkpoints + '.pem');
var privkeyArchive = path.join(archiveDir, 'privkey' + checkpoints + '.pem');
var bundleArchive = path.join(archiveDir, 'bundle' + checkpoints + '.pem');
return mkdirpAsync(archiveDir).then(function () {
return PromiseA.all([
sfs.writeFileAsync(certArchive, pems.cert, 'ascii')
, sfs.writeFileAsync(chainArchive, pems.chain, 'ascii')
, sfs.writeFileAsync(fullchainArchive, [ pems.cert, pems.chain ].join('\n'), 'ascii')
, sfs.writeFileAsync(privkeyArchive, pems.privkey, 'ascii')
, sfs.writeFileAsync(bundleArchive, pems.bundle, 'ascii')
]);
}).then(function () {
return mkdirpAsync(liveDir);
}).then(function () {
return PromiseA.all([
sfs.writeFileAsync(certPath, pems.cert, 'ascii')
, sfs.writeFileAsync(chainPath, pems.chain, 'ascii')
// Most platforms need these two
, sfs.writeFileAsync(fullchainPath, [ pems.cert, pems.chain ].join('\n'), 'ascii')
, sfs.writeFileAsync(privkeyPath, pems.privkey, 'ascii')
// HAProxy needs "bundle.pem" aka "combined.pem"
, sfs.writeFileAsync(bundlePath, [ pems.privkey, pems.cert, pems.chain ].join('\n'), 'ascii')
]);
}).then(function () {
pyobj.checkpoints += 1;
args.checkpoints += 1;
// TODO other than for compatibility this is optional, right?
// or is it actually needful for renewal? (i.e. list of domains)
return writeRenewalConfig(args);
}).then(function () {
return {
privkey: pems.privkey
, cert: pems.cert
, chain: pems.chain
, expires: pems.expires
, identifiers: pems.identifiers
/*
// TODO populate these only if they are actually known
, issuedAt: Date.now()
, expiresAt: Date.now() + (90 * 24 * 60 * 60 * 100)
*/
};
});
});
}
}
//
// Accounts
//
, accounts: {
// Accounts
_getAccountKeyPath: function (args) {
var promise = PromiseA.resolve(args.accountId);
if (args.email && !args.accountKeyPath && !args.accountId) {
promise = store.accounts._getAccountIdByEmail(args);
}
return promise.then(function (accountId) {
if (!accountId) {
return null;
}
return args.accountKeyPath || path.join(args.accountsDir, accountId, 'private_key.json');
});
}
// Accounts
, _getAccountIdByEmail: function (args) {
// If we read 10,000 account directories looking for
// just one email address, that could get crazy.
// We should have a folder per email and list
// each account as a file in the folder
// TODO
var email = args.email;
if ('string' !== typeof email) {
log(args.debug, "No email given");
return PromiseA.resolve(null);
}
return readdirAsync(args.accountsDir).then(function (nodes) {
log(args.debug, "success reading arg.accountsDir");
return PromiseA.all(nodes.map(function (node) {
return readFileAsync(path.join(args.accountsDir, node, 'regr.json'), 'utf8').then(function (text) {
var regr = JSON.parse(text);
regr.__accountId = node;
return regr;
});
})).then(function (regrs) {
var accountId;
log(args.debug, "regrs.length", regrs.length);
regrs.some(function (regr) {
return regr.body.contact.some(function (contact) {
var match = contact.toLowerCase() === 'mailto:' + email.toLowerCase();
if (match) {
accountId = regr.__accountId;
return true;
}
});
});
if (!accountId) {
return null;
}
return accountId;
});
}).then(function (accountId) {
return accountId;
}, function (err) {
if ('ENOENT' === err.code) {
// ignore error
return null;
}
return PromiseA.reject(err);
});
}
// Accounts
, _getAccountIdByPublicKey: function (keypair) {
// we use insecure md5 - even though we know it's bad - because that's how the python client did
var pubkey = keypair.publicKeyPem.replace(/\r/g, '');
return crypto.createHash('md5').update(pubkey).digest('hex');
}
// Accounts
, checkKeypairAsync: function (args) {
if (!(args.accountKeyPath || args.accountsDir)) {
return PromiseA.reject(new Error("must provide one of options.accountKeyPath or options.accountsDir"));
}
return store.accounts._getAccountKeyPath(args).then(function (keypath) {
return store.keypairs.checkAsync(keypath, 'jwk');
});
}
// Accounts
, setKeypairAsync: function (args, keypair) {
var accountId;
if (args.email) {
accountId = store.accounts._getAccountIdByPublicKey(keypair);
}
return store.accounts._getAccountKeyPath({
accountsDir: args.accountsDir
, email: args.email
, accountId: args.accountId || accountId
}).then(function (keypath) {
return store.keypairs.setAsync(keypath, keypair, 'jwk');
});
}
// Accounts
, checkAsync: function (args) {
var promise;
var files = {};
var accountId;
if (args.accountId) {
promise = PromiseA.resolve(args.accountId);
}
else if (args.email) {
promise = store.accounts._getAccountIdByEmail(args);
}
else {
promise = PromiseA.reject(new Error("must provide accountId or email"));
}
return promise.then(function (_accountId) {
log(args.debug, 'accountId:', _accountId);
if (!_accountId) {
return false;
}
accountId = _accountId;
var accountDir = path.join(args.accountsDir, accountId);
var configs = [ 'meta.json', 'private_key.json', 'regr.json' ];
return PromiseA.all(configs.map(function (filename) {
var keyname = filename.slice(0, -5);
return readFileAsync(path.join(accountDir, filename), 'utf8').then(function (text) {
var data;
try {
data = JSON.parse(text);
} catch(e) {
files[keyname] = { error: e };
return;
}
files[keyname] = data;
return true;
}, function (err) {
log(args.debug, 'Error reading account files:', err);
files[keyname] = { error: err };
});
}));
}).then(function (hasAccount) {
if (!hasAccount) {
return null;
}
var err;
if (!Object.keys(files).every(function (key) {
return !files[key].error;
}) || !files.private_key || !files.private_key.n) {
err = new Error("Account '" + accountId + "' was corrupt (had id, but was missing files).");
err.code = 'E_ACCOUNT_CORRUPT';
err.data = files;
return PromiseA.reject(err);
}
//files.private_key;
//files.regr;
//files.meta;
files.accountId = accountId; // preserve current account id
files.id = accountId;
files.keypair = { privateKeyJwk: files.private_key };
return files;
});
}
// Accounts
, setAsync: function (args, reg) {
var os = require("os");
var accountId = store.accounts._getAccountIdByPublicKey(reg.keypair);
var accountDir = path.join(args.accountsDir, accountId);
var accountMeta = {
creation_host: os.hostname()
, creation_dt: new Date().toISOString()
};
var uri = args.server.replace(/\/directory.*/,
'/acme/reg/' + accountId);
return mkdirpAsync(accountDir).then(function () {
var regrBody = {
body: reg.receipt,
uri: uri,
};
if (typeof reg.newAuthzUrl !== 'undefined') {
regrBody.new_authzr_uri = reg.newAuthzUrl;
}
// TODO abstract file writing
return PromiseA.all([
// meta.json {"creation_host": "ns1.redirect-www.org", "creation_dt": "2015-12-11T04:14:38Z"}
writeFileAsync(path.join(accountDir, 'meta.json'), JSON.stringify(accountMeta), 'utf8')
// private_key.json { "e", "d", "n", "q", "p", "kty", "qi", "dp", "dq" }
, writeFileAsync(path.join(accountDir, 'private_key.json'), JSON.stringify(reg.keypair.privateKeyJwk), 'utf8')
// regr.json:
/*
{ body: { contact: [ 'mailto:coolaj86@gmail.com' ],
agreement: 'https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf',
key: { e: 'AQAB', kty: 'RSA', n: '...' } },
uri: 'https://acme-v01.api.letsencrypt.org/acme/reg/71272',
new_authzr_uri: 'https://acme-v01.api.letsencrypt.org/acme/new-authz',
terms_of_service: 'https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf' }
*/
, writeFileAsync(path.join(accountDir, 'regr.json'),
JSON.stringify(regrBody),
'utf8')
]);
}).then(function () {
return {
id: accountId
, accountId: accountId
, email: args.email
, keypair: reg.keypair
, receipt: reg.receipt
};
});
}
// Accounts
, getAccountIdAsync: function (args) {
var pyconf = promisifyAll(require('pyconf'));
return pyconf.readFileAsync(args.renewalPath).then(function (renewal) {
var accountId = renewal.account;
renewal = renewal.account;
return accountId;
}, function (err) {
if ("ENOENT" === err.code) {
return store.accounts._getAccountIdByEmail(args);
}
return PromiseA.reject(err);
});
}
}
//
// Configs
//
, configs: {
// Configs
checkAsync: function (copy) {
copy.domains = [];
return store.configs._checkHelperAsync(copy).then(function (pyobj) {
var exists = pyobj.checkpoints >= 0;
if (!exists) {
return null;
}
return pyToJson(pyobj);
});
}
// Configs
, _checkHelperAsync: function (args) {
var pyconf = promisifyAll(require('pyconf'));
return pyconf.readFileAsync(args.renewalPath).then(function (pyobj) {
return pyobj;
}, function () {
return pyconf.readFileAsync(path.join(__dirname, 'renewal.conf.tpl')).then(function (pyobj) {
return pyobj;
});
});
}
// Configs
, getAsync: function (args) {
return store.configs._checkHelperAsync(args).then(function (pyobj) {
var minver = pyobj.checkpoints >= 0;
args.pyobj = pyobj;
if (!minver) {
args.checkpoints = 0;
pyobj.checkpoints = 0;
return writeRenewalConfig(args);
}
// args.account.id = pyobj.account
// args.configDir = args.configDir || pyobj.configDir;
args.checkpoints = pyobj.checkpoints;
args.agreeTos = (args.agreeTos || pyobj.tos) && true;
args.email = args.email || pyobj.email;
args.domains = args.domains || pyobj.domains;
// yes, it's an array. weird, right?
args.webrootPath = args.webrootPath || pyobj.webrootPath[0];
args.server = args.server || args.acmeDiscoveryUrl || pyobj.server;
args.certPath = args.certPath || pyobj.cert;
args.privkeyPath = args.privkeyPath || pyobj.privkey;
args.chainPath = args.chainPath || pyobj.chain;
args.fullchainPath = args.fullchainPath || pyobj.fullchain;
//, workDir: args.workDir
//, logsDir: args.logsDir
args.rsaKeySize = args.rsaKeySize || pyobj.rsaKeySize;
args.http01Port = args.http01Port || pyobj.http01Port;
args.domainKeyPath = args.domainKeyPath || args.keyPath || pyobj.keyPath;
return writeRenewalConfig(args);
});
}
// Configs
, allAsync: function (copy) {
copy.domains = [];
return readdirAsync(copy.renewalDir).then(function (nodes) {
nodes = nodes.filter(function (node) {
return /^[a-z0-9]+.*\.conf$/.test(node);
});
return PromiseA.all(nodes.map(function (node) {
copy.domains = [node.replace(/\.conf$/, '')];
return store.configs.getAsync(copy);
}));
});
}
}
};
return store;
};
|
'use strict';
module.exports = (sequelize, DataTypes) => {
var posts = sequelize.define('posts', {
img_link: DataTypes.STRING,
description: DataTypes.STRING,
tags: DataTypes.STRING,
userId: DataTypes.INTEGER
}, {
classMethods: {
associate: function(models) {
// associations can be defined here
posts.hasMany(models.comments);
posts.hasMany(models.tags);
posts.hasOne(models.user);
posts.belongsTo(models.user, {
delete: "CASCADE",
foreignKey: {
allowNull: false
}
});
}
}
});
return posts;
};
|
var config = require('../config')
var webpack = require('webpack')
var merge = require('webpack-merge')
var utils = require('./utils')
var baseWebpackConfig = require('./webpack.base.conf')
var HtmlWebpackPlugin = require('html-webpack-plugin')
// add hot-reload related code to entry chunks
Object.keys(baseWebpackConfig.entry).forEach(function (name) {
baseWebpackConfig.entry[name] = ['./client/build/dev-client'].concat(baseWebpackConfig.entry[name])
})
module.exports = merge(baseWebpackConfig, {
output: {
publicPath: config.dev.assetsPublicPath,
},
module: {
loaders: utils.styleLoaders()
},
// eval-source-map is faster for development
devtool: '#eval-source-map',
plugins: [
new webpack.DefinePlugin({
'process.env': config.dev.env
}),
// https://github.com/glenjamin/webpack-hot-middleware#installation--usage
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
favicon:'./client/src/assets/img/fav.ico', //favicon路径
filename: 'index.html',
template: './client/index.html',
inject: true
})
]
})
|
module.exports = require("./lib/redirect");
|
import merge from 'lodash.merge';
import * as types from '../constants/ActionTypes';
const initialState = {
grouplist: [],
users: [],
};
export default function entities(state = initialState, action) {
let index = -1;
let group = null;
switch (action.type) {
case types.LOGOUT:
return { ...initialState };
case types.GOT_UNREADMESSAGE:
group = state.grouplist.find(group => group.Id == action.groupId);
if (group) group.unread += 1;
return { ...state };
case types.FETCH_MESSAGE_SUCCESS:
group = state.grouplist.find(group => group.Id == action.groupId);
if (group) group.unread = 0;
return { ...state };
case types.FETCH_GROUPLIST_SUCCESS:
return { ...state, grouplist: action.groups.map(group => ({ ...group, unread: 0 })) };
case types.FETCH_ACCOUNTLIST_SUCCESS:
return { ...state, users: action.accounts };
case types.SET_FAVORITEGROUP_SUCCESS:
index = state.users.indexOf(action.originUInfo);
state.users.splice(index, 1, action.newUInfo);
return { ...state };
case types.ADD_NEWGROUP_SUCCESS:
return { ...state, grouplist: [...state.grouplist, { ...action.group, unread: 0 }] };
case types.SAVEPROFILE_SUCCESS:
index = state.users.findIndex(user => user.Id == action.uInfo.Id);
if (index != -1)
state.users.splice(index, 1, action.uInfo);
return { ...state };
default:
return state;
}
}
|
const Notifications = () => import('../pages/Index.vue');
export default {
name: 'core.notifications.index',
path: '/core/notifications/index',
component: Notifications,
meta: {
breadcrumb: 'notifications',
title: 'Notifications',
},
};
|
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* 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.
*/
'use strict';
// MODULES //
var tape = require( 'tape' );
var PINF = require( '@stdlib/constants/math/float64-pinf' );
var NINF = require( '@stdlib/constants/math/float64-ninf' );
var EPSILON = require( '@stdlib/constants/math/float64-eps' );
var isEven = require( '@stdlib/math/base/assert/is-even' );
var isnan = require( '@stdlib/math/base/assert/is-nan' );
var isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' );
var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' );
var normal = require( '@stdlib/random/base/normal' );
var randu = require( '@stdlib/random/base/randu' );
var ldexp = require( '@stdlib/math/base/special/ldexp' );
var abs = require( '@stdlib/math/base/special/abs' );
var incrmprod = require( './../lib' );
// TESTS //
tape( 'main export is a function', function test( t ) {
t.ok( true, __filename );
t.equal( typeof incrmprod, 'function', 'main export is a function' );
t.end();
});
tape( 'the function throws an error if not provided a positive integer', function test( t ) {
var values;
var i;
values = [
'5',
-5.0,
0.0,
3.14,
true,
null,
void 0,
NaN,
[],
{},
function noop() {}
];
for ( i = 0; i < values.length; i++ ) {
t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] );
}
t.end();
function badValue( value ) {
return function badValue() {
incrmprod( value );
};
}
});
tape( 'the function returns an accumulator function', function test( t ) {
t.equal( typeof incrmprod( 3 ), 'function', 'returns a function' );
t.end();
});
tape( 'the accumulator function computes a moving product incrementally', function test( t ) {
var expected;
var actual;
var data;
var acc;
var N;
var i;
data = [ 2.0, 3.0, 2.0, 4.0, 3.0, 4.0 ];
N = data.length;
acc = incrmprod( 3 );
actual = new Array( N );
for ( i = 0; i < N; i++ ) {
actual[ i ] = acc( data[ i ] );
}
expected = [ 2.0, 6.0, 12.0, 24.0, 24.0, 48.0 ];
t.deepEqual( actual, expected, 'returns expected incremental results' );
t.end();
});
tape( 'if not provided an input value, the accumulator function returns the current product', function test( t ) {
var data;
var acc;
var i;
data = [ 2.0, 3.0, 5.0 ];
acc = incrmprod( 2 );
for ( i = 0; i < data.length; i++ ) {
acc( data[ i ] );
}
t.equal( acc(), 15.0, 'returns expected value' );
t.end();
});
tape( 'if data has yet to be provided, the accumulator function returns `null`', function test( t ) {
var acc = incrmprod( 3 );
t.equal( acc(), null, 'returns null' );
t.end();
});
tape( 'if provided `NaN`, the accumulated value is `NaN` for at least `W` invocations', function test( t ) {
var expected;
var data;
var acc;
var v;
var i;
acc = incrmprod( 3 );
data = [
NaN, // NaN
3.0, // NaN, 3.0
3.0, // NaN, 3.0, 3.0
NaN, // 3.0, 3.0, NaN
3.0, // 3.0, NaN, 3.0
3.0, // NaN, 3.0, 3.0
3.0, // 3.0, 3.0, 3.0
NaN, // 3.0, 3.0, NaN
3.0, // 3.0, NaN, 3.0
3.0, // NaN, 3.0, 3.0
3.0, // 3.0, 3.0, 3.0
NaN, // 3.0, 3.0, NaN
3.0, // 3.0, NaN, 3.0
3.0, // NaN, 3.0, 3.0
NaN, // 3.0, 3.0, NaN
NaN, // 3.0, NaN, NaN
NaN, // NaN, NaN, NaN
NaN, // NaN, NaN, NaN
3.0 // NaN, NaN, 3.0
];
expected = [
NaN,
NaN,
NaN,
NaN,
NaN,
NaN,
27.0,
NaN,
NaN,
NaN,
27.0,
NaN,
NaN,
NaN,
NaN,
NaN,
NaN,
NaN,
NaN
];
for ( i = 0; i < data.length; i++ ) {
v = acc( data[ i ] );
if ( isnan( expected[ i ] ) ) {
t.equal( isnan( v ), true, 'returns expected value for window '+i );
} else {
t.equal( v, expected[ i ], 'returns expected value for window '+i );
}
}
t.end();
});
tape( 'the accumulator function incrementally computes a moving product (special series)', function test( t ) {
var acc;
var x;
var i;
acc = incrmprod( 150 );
x = 2;
// A series of reciprocals having an even number of terms is equal to unity...
for ( i = 0; i < 150; i++ ) {
if ( isEven( i ) ) {
acc( x );
} else {
acc( 1.0/x );
}
}
t.equal( acc(), 1.0, 'returns expected value' );
t.end();
});
tape( 'the accumulator function can return a result which overflows', function test( t ) {
var acc = incrmprod( 2 );
acc( 5.0e300 );
acc( 1.0e300 );
t.equal( acc(), PINF, 'returns infinity' );
t.end();
});
tape( 'overflow may be transient', function test( t ) {
var expected;
var delta;
var tol;
var acc;
var x;
var y;
var z;
expected = ldexp( 0.01, 1000 );
acc = incrmprod( 3 );
x = ldexp( 0.5, 1000 ); // ~5.4e300
y = ldexp( 0.1, 1000 ); // ~1.1e300
z = ldexp( 0.2, -1000 ); // ~1.87e-302
acc( x );
acc( y );
acc( z );
delta = abs( expected - acc() );
tol = EPSILON * abs( expected );
t.equal( delta <= tol, true, 'within tolerance. Expected: '+expected+'. Actual: '+acc()+'. Delta: '+delta+'. Tol: '+tol+'.' );
t.end();
});
tape( 'the accumulator function can return a result which underflows', function test( t ) {
var acc = incrmprod( 2 );
acc( 4.0e-302 );
acc( 9.0e-303 );
t.equal( acc(), 0.0, 'returns 0' );
t.end();
});
tape( 'underflow may be transient', function test( t ) {
var expected;
var delta;
var tol;
var acc;
var x;
var y;
var z;
expected = ldexp( 0.01, -1000 );
acc = incrmprod( 3 );
x = ldexp( 0.5, -1000 ); // ~4.67e-302
y = ldexp( 0.1, -1000 ); // ~9.33e-303
z = ldexp( 0.2, 1000 ); // ~2.14e300
acc( x );
acc( y );
t.equal( acc(), 0.0, 'returns 0 due to underflow' );
acc( z );
delta = abs( acc() - expected );
tol = EPSILON * abs( expected );
t.equal( delta <= tol, true, 'within tolerance. Expected: '+expected+'. Actual: '+acc()+'. Delta: '+delta+'. Tol: '+tol+'.' );
t.end();
});
tape( 'if provided values of normal magnitude (i.e., far away from the extremes), the accumulator function returns results matching naive multiplication', function test( t ) {
var randn;
var prod;
var acc;
var r;
var i;
acc = incrmprod( 1000 );
randn = normal.factory( 50.0, 10.0, {
'seed': 1234
});
prod = 1.0;
for ( i = 0; i < 1000; i++ ) {
r = randn();
acc( r );
prod *= r;
}
t.equal( acc(), prod, 'equals native multiplication' );
t.end();
});
tape( 'if provided `+infinity`, the accumulator function returns `+-infinity` (unless provided zero)', function test( t ) {
var acc;
var x;
var i;
acc = incrmprod( 3 );
acc( 5.0 );
t.equal( acc(), 5.0, 'returns expected value' );
acc( PINF );
t.equal( acc(), PINF, 'returns +infinity' );
acc( 3.0 );
t.equal( acc(), PINF, 'returns +infinity' );
acc( -4.0 );
t.equal( acc(), NINF, 'returns -infinity' );
for ( i = 0; i < 100; i++ ) {
x = ( randu()*100.0 ) - 50.0;
if ( x === 0.0 ) {
continue;
}
x = acc( x );
t.notEqual( x === PINF || x === NINF, true, 'does not return +-infinity' );
}
t.end();
});
tape( 'if provided `-infinity`, the accumulator function returns `+-infinity` (unless provided zero)', function test( t ) {
var acc;
var x;
var i;
acc = incrmprod( 3 );
acc( 5.0 );
t.equal( acc(), 5.0, 'returns expected value' );
acc( NINF );
t.equal( acc(), NINF, 'returns -infinity' );
acc( 3.0 );
t.equal( acc(), NINF, 'returns -infinity' );
acc( -4.0 );
t.equal( acc(), PINF, 'returns +infinity' );
for ( i = 0; i < 100; i++ ) {
x = ( randu()*100.0 ) - 50.0;
if ( x === 0.0 ) {
continue;
}
x = acc( x );
t.notEqual( x === PINF || x === NINF, true, 'does not return +-infinity' );
}
t.end();
});
tape( 'if provided `+infinity`, the accumulator function returns `NaN` if also provided a `0`', function test( t ) {
var acc;
var p;
var i;
acc = incrmprod( 3 );
acc( 5.0 );
t.equal( acc(), 5.0, 'returns expected value' );
acc( PINF );
t.equal( acc(), PINF, 'returns +infinity' );
acc( 0.0 );
t.equal( isnan( acc() ), true, 'returns NaN' );
acc( 3.0 );
t.equal( isnan( acc() ), true, 'returns NaN' );
acc( 4.0 );
t.equal( isnan( acc() ), false, 'does not return NaN' );
for ( i = 0; i < 10; i++ ) {
p = acc( i+1 );
t.equal( isnan( p ), false, 'does not return NaN' );
}
t.end();
});
tape( 'if provided `-infinity`, the accumulator function returns `NaN` if also provided a `0`', function test( t ) {
var acc;
var p;
var i;
acc = incrmprod( 3 );
acc( 5.0 );
t.equal( acc(), 5.0, 'returns expected value' );
acc( NINF );
t.equal( acc(), NINF, 'returns -infinity' );
acc( 0.0 );
t.equal( isnan( acc() ), true, 'returns NaN' );
acc( 3.0 );
t.equal( isnan( acc() ), true, 'returns NaN' );
acc( 4.0 );
t.equal( isnan( acc() ), false, 'does not return NaN' );
for ( i = 0; i < 10; i++ ) {
p = acc( i+1 );
t.equal( isnan( p ), false, 'does not return NaN' );
}
t.end();
});
tape( 'if provided `0`, the accumulator function returns `0` (no +-infinity)', function test( t ) {
var acc;
var p;
var i;
acc = incrmprod( 3 );
acc( 5.0 );
t.equal( acc(), 5.0, 'returns expected value' );
acc( 0.0 );
t.equal( acc(), 0.0, 'returns 0.0' );
acc( 3.0 );
t.equal( acc(), 0.0, 'returns 0.0' );
acc( 4.0 );
t.equal( acc(), 0.0, 'returns 0.0' );
for ( i = 0; i < 10; i++ ) {
p = acc( i+1 );
t.equal( p > 0.0, true, 'does not return 0.0' );
}
t.end();
});
tape( 'the accumulator function returns a signed zero', function test( t ) {
var acc;
var p;
var i;
acc = incrmprod( 3 );
p = acc( -0.0 );
t.equal( isNegativeZero( p ), true, 'returns -0' );
p = acc( -0.0 );
t.equal( isPositiveZero( p ), true, 'returns +0' );
for ( i = 0; i < 100; i++ ) {
p = acc( -0.0 );
t.equal( isNegativeZero( p ), true, 'returns -0' );
}
acc = incrmprod( 4 );
p = acc( -0.0 );
t.equal( isNegativeZero( p ), true, 'returns -0' );
p = acc( -0.0 );
t.equal( isPositiveZero( p ), true, 'returns +0' );
p = acc( -0.0 );
t.equal( isNegativeZero( p ), true, 'returns -0' );
for ( i = 0; i < 100; i++ ) {
p = acc( -0.0 );
t.equal( isPositiveZero( p ), true, 'returns +0' );
}
t.end();
});
|
// Generated by CoffeeScript 1.4.0
(function() {
var Teacup, doctypes, elements, merge_elements, tagName, _fn, _fn1, _fn2, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2,
__slice = [].slice,
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
doctypes = {
'default': '<!DOCTYPE html>',
'5': '<!DOCTYPE html>',
'xml': '<?xml version="1.0" encoding="utf-8" ?>',
'transitional': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
'strict': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
'frameset': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
'1.1': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
'basic': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">',
'mobile': '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">',
'ce': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "ce-html-1.0-transitional.dtd">'
};
elements = {
regular: 'a abbr address article aside audio b bdi bdo blockquote body button\
canvas caption cite code colgroup datalist dd del details dfn div dl dt em\
fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup\
html i iframe ins kbd label legend li map mark menu meter nav noscript object\
ol optgroup option output p pre progress q rp rt ruby s samp section\
select small span strong sub summary sup table tbody td textarea tfoot\
th thead time title tr u ul video',
raw: 'script style',
"void": 'area base br col command embed hr img input keygen link meta param\
source track wbr',
obsolete: 'applet acronym bgsound dir frameset noframes isindex listing\
nextid noembed plaintext rb strike xmp big blink center font marquee multicol\
nobr spacer tt',
obsolete_void: 'basefont frame'
};
merge_elements = function() {
var a, args, element, result, _i, _j, _len, _len1, _ref;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
result = [];
for (_i = 0, _len = args.length; _i < _len; _i++) {
a = args[_i];
_ref = elements[a].split(' ');
for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
element = _ref[_j];
if (__indexOf.call(result, element) < 0) {
result.push(element);
}
}
}
return result;
};
Teacup = (function() {
function Teacup() {
this.htmlOut = null;
}
Teacup.prototype.resetBuffer = function(html) {
var previous;
if (html == null) {
html = null;
}
previous = this.htmlOut;
this.htmlOut = html;
return previous;
};
Teacup.prototype.render = function() {
var args, previous, result, template;
template = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
previous = this.resetBuffer('');
try {
template.apply(null, args);
} catch (error) {
throw this.cleanStack(error);
} finally {
result = this.resetBuffer(previous);
}
return result;
};
Teacup.prototype.cede = function() {
var args;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
return this.render.apply(this, args);
};
Teacup.prototype.cleanStack = (function() {
var lineExpressions, tagExpression;
lineExpressions = ['\\s*at Teacup\\.renderContents .*', '\\s*at Teacup\\.tag .*', '\\s*at Teacup.* \\[as (\\w+)\\].*', '\\s*at Teacup\\.tags\\.bound.*$'];
tagExpression = new RegExp("^" + (lineExpressions.join('\\n')), 'mg');
return function(error) {
var _ref;
error.stack = (_ref = error.stack) != null ? _ref.replace(tagExpression, ' at Teacup.$1') : void 0;
return error;
};
})();
Teacup.prototype.renderable = function(template) {
var teacup;
teacup = this;
return function() {
var args, result;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
if (teacup.htmlOut === null) {
teacup.htmlOut = '';
try {
template.apply(this, args);
} catch (error) {
throw teacup.cleanStack(error);
} finally {
result = teacup.resetBuffer();
}
return result;
} else {
return template.apply(this, args);
}
};
};
Teacup.prototype.renderAttr = function(name, value) {
var k, v;
if ((value == null) || value === false) {
return '';
}
if (name === 'data' && typeof value === 'object') {
return ((function() {
var _results;
_results = [];
for (k in value) {
v = value[k];
_results.push(this.renderAttr("data-" + k, v));
}
return _results;
}).call(this)).join('');
}
if (value === true) {
value = name;
}
return " " + name + "=" + (this.quote(this.escape(value.toString())));
};
Teacup.prototype.attrOrder = ['id', 'class'];
Teacup.prototype.renderAttrs = function(obj) {
var name, result, value, _i, _len, _ref;
result = '';
_ref = this.attrOrder;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
name = _ref[_i];
if (!(name in obj)) {
continue;
}
result += this.renderAttr(name, obj[name]);
delete obj[name];
}
for (name in obj) {
value = obj[name];
result += this.renderAttr(name, value);
}
return result;
};
Teacup.prototype.renderContents = function(contents) {
if (contents == null) {
} else if (typeof contents === 'function') {
return contents.call(this);
} else {
return this.text(contents);
}
};
Teacup.prototype.isSelector = function(string) {
var _ref;
return string.length > 1 && ((_ref = string[0]) === '#' || _ref === '.');
};
Teacup.prototype.parseSelector = function(selector) {
var classes, id, klass, token, _i, _len, _ref, _ref1;
id = null;
classes = [];
_ref = selector.split('.');
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
token = _ref[_i];
if (id) {
classes.push(token);
} else {
_ref1 = token.split('#'), klass = _ref1[0], id = _ref1[1];
if (klass !== '') {
classes.push(token);
}
}
}
return {
id: id,
classes: classes
};
};
Teacup.prototype.normalizeArgs = function(args) {
var arg, attrs, classes, contents, id, index, selector, _i, _len;
attrs = {};
selector = null;
contents = null;
for (index = _i = 0, _len = args.length; _i < _len; index = ++_i) {
arg = args[index];
if (arg != null) {
switch (typeof arg) {
case 'string':
if (index === 0 && this.isSelector(arg)) {
selector = this.parseSelector(arg);
} else {
contents = arg;
}
break;
case 'function':
case 'number':
case 'boolean':
contents = arg;
break;
case 'object':
attrs = arg;
break;
default:
console.log("Teacup: invalid argument: " + (arg.toString()));
}
}
}
if (selector != null) {
id = selector.id, classes = selector.classes;
if (id != null) {
attrs.id = id;
}
if (classes != null ? classes.length : void 0) {
attrs["class"] = classes.join(' ');
}
}
return {
attrs: attrs,
contents: contents
};
};
Teacup.prototype.tag = function() {
var args, attrs, contents, tagName, _ref;
tagName = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
_ref = this.normalizeArgs(args), attrs = _ref.attrs, contents = _ref.contents;
this.raw("<" + tagName + (this.renderAttrs(attrs)) + ">");
this.renderContents(contents);
return this.raw("</" + tagName + ">");
};
Teacup.prototype.rawTag = function() {
var args, attrs, contents, tagName, _ref;
tagName = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
_ref = this.normalizeArgs(args), attrs = _ref.attrs, contents = _ref.contents;
this.raw("<" + tagName + (this.renderAttrs(attrs)) + ">");
this.raw(contents);
return this.raw("</" + tagName + ">");
};
Teacup.prototype.selfClosingTag = function() {
var args, attrs, contents, tag, _ref;
tag = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
_ref = this.normalizeArgs(args), attrs = _ref.attrs, contents = _ref.contents;
if (contents) {
throw new Error("Teacup: <" + tag + "/> must not have content. Attempted to nest " + content);
}
return this.raw("<" + tag + (this.renderAttrs(attrs)) + " />");
};
Teacup.prototype.coffeescript = function(fn) {
return this.raw("<script type=\"text/javascript\">(function() {\n var __slice = [].slice,\n __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },\n __hasProp = {}.hasOwnProperty,\n __extends = 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; };\n (" + (fn.toString()) + ")();\n})();</script>");
};
Teacup.prototype.comment = function(text) {
return this.raw("<!--" + (this.escape(text)) + "-->");
};
Teacup.prototype.doctype = function(type) {
if (type == null) {
type = 5;
}
return this.raw(doctypes[type]);
};
Teacup.prototype.ie = function(condition, contents) {
this.raw("<!--[if " + (this.escape(condition)) + "]>");
this.renderContents(contents);
return this.raw("<![endif]-->");
};
Teacup.prototype.text = function(s) {
if (this.htmlOut == null) {
throw new Error("Teacup: can't call a tag function outside a rendering context");
}
return this.htmlOut += s && this.escape(s.toString()) || '';
};
Teacup.prototype.raw = function(s) {
return this.htmlOut += s;
};
Teacup.prototype.escape = function(text) {
return text.toString().replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
};
Teacup.prototype.quote = function(value) {
return "\"" + value + "\"";
};
Teacup.prototype.tags = function() {
var bound, boundMethodNames, method, _fn, _i, _len,
_this = this;
bound = {};
boundMethodNames = [].concat('cede coffeescript comment doctype escape ie raw render renderable script tag text'.split(' '), merge_elements('regular', 'obsolete', 'raw', 'void', 'obsolete_void'));
_fn = function(method) {
return bound[method] = function() {
var args;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
return _this[method].apply(_this, args);
};
};
for (_i = 0, _len = boundMethodNames.length; _i < _len; _i++) {
method = boundMethodNames[_i];
_fn(method);
}
return bound;
};
return Teacup;
})();
_ref = merge_elements('regular', 'obsolete');
_fn = function(tagName) {
return Teacup.prototype[tagName] = function() {
var args;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
return this.tag.apply(this, [tagName].concat(__slice.call(args)));
};
};
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
tagName = _ref[_i];
_fn(tagName);
}
_ref1 = merge_elements('raw');
_fn1 = function(tagName) {
return Teacup.prototype[tagName] = function() {
var args;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
return this.rawTag.apply(this, [tagName].concat(__slice.call(args)));
};
};
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
tagName = _ref1[_j];
_fn1(tagName);
}
_ref2 = merge_elements('void', 'obsolete_void');
_fn2 = function(tagName) {
return Teacup.prototype[tagName] = function() {
var args;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
return this.selfClosingTag.apply(this, [tagName].concat(__slice.call(args)));
};
};
for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
tagName = _ref2[_k];
_fn2(tagName);
}
if (typeof module !== "undefined" && module !== null ? module.exports : void 0) {
module.exports = new Teacup().tags();
module.exports.Teacup = Teacup;
} else {
window.teacup = new Teacup().tags();
window.teacup.Teacup = Teacup;
}
}).call(this);
|
export default {
html: `[]`,
async test({ assert, component, target }) {
await component.go();
assert.htmlEqual(target.innerHTML, `[42]`);
}
};
|
socket.emit('join', 'your name'); // <-- Update
let mouseX, mouseY;
document.addEventListener('mousemove', (event) => {
mouseX = event.pageX;
mouseY = event.pageY;
});
class MouseFollower extends Component {
update() {
super.update();
this.gameObject.x = mouseX;
this.gameObject.y = mouseY;
}
}
const go = scene.createGameObject();
go.addComponent(new Renderer());
go.addComponent(new NetworkSynchronization());
go.addComponent(new MouseFollower());
|
//This file is automatically rebuilt by the Cesium build process.
/*global define*/
define(function() {
'use strict';
return "#ifdef INSTANCED\n\
attribute vec2 direction;\n\
#endif\n\
attribute vec4 positionHighAndScale;\n\
attribute vec4 positionLowAndRotation;\n\
attribute vec4 compressedAttribute0;\n\
attribute vec4 compressedAttribute1;\n\
attribute vec4 compressedAttribute2;\n\
attribute vec4 eyeOffset;\n\
attribute vec4 scaleByDistance;\n\
attribute vec4 pixelOffsetScaleByDistance;\n\
varying vec2 v_textureCoordinates;\n\
#ifdef RENDER_FOR_PICK\n\
varying vec4 v_pickColor;\n\
#else\n\
varying vec4 v_color;\n\
#endif\n\
const float UPPER_BOUND = 32768.0;\n\
const float SHIFT_LEFT16 = 65536.0;\n\
const float SHIFT_LEFT8 = 256.0;\n\
const float SHIFT_LEFT7 = 128.0;\n\
const float SHIFT_LEFT5 = 32.0;\n\
const float SHIFT_LEFT3 = 8.0;\n\
const float SHIFT_LEFT2 = 4.0;\n\
const float SHIFT_LEFT1 = 2.0;\n\
const float SHIFT_RIGHT8 = 1.0 / 256.0;\n\
const float SHIFT_RIGHT7 = 1.0 / 128.0;\n\
const float SHIFT_RIGHT5 = 1.0 / 32.0;\n\
const float SHIFT_RIGHT3 = 1.0 / 8.0;\n\
const float SHIFT_RIGHT2 = 1.0 / 4.0;\n\
const float SHIFT_RIGHT1 = 1.0 / 2.0;\n\
vec4 computePositionWindowCoordinates(vec4 positionEC, vec2 imageSize, float scale, vec2 direction, vec2 origin, vec2 translate, vec2 pixelOffset, vec3 alignedAxis, bool validAlignedAxis, float rotation, bool sizeInMeters)\n\
{\n\
vec2 halfSize = imageSize * scale * czm_resolutionScale;\n\
halfSize *= ((direction * 2.0) - 1.0);\n\
if (sizeInMeters)\n\
{\n\
positionEC.xy += halfSize;\n\
}\n\
vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n\
if (sizeInMeters)\n\
{\n\
positionWC.xy += (origin * abs(halfSize)) / czm_metersPerPixel(positionEC);\n\
}\n\
else\n\
{\n\
positionWC.xy += (origin * abs(halfSize));\n\
}\n\
#if defined(ROTATION) || defined(ALIGNED_AXIS)\n\
if (validAlignedAxis || rotation != 0.0)\n\
{\n\
float angle = rotation;\n\
if (validAlignedAxis)\n\
{\n\
vec3 pos = positionEC.xyz + czm_encodedCameraPositionMCHigh + czm_encodedCameraPositionMCLow;\n\
vec3 normal = normalize(cross(alignedAxis, pos));\n\
vec4 tangent = vec4(normalize(cross(pos, normal)), 0.0);\n\
tangent = czm_modelViewProjection * tangent;\n\
angle += sign(-tangent.x) * acos(tangent.y / length(tangent.xy));\n\
}\n\
float cosTheta = cos(angle);\n\
float sinTheta = sin(angle);\n\
mat2 rotationMatrix = mat2(cosTheta, sinTheta, -sinTheta, cosTheta);\n\
halfSize = rotationMatrix * halfSize;\n\
}\n\
#endif\n\
if (!sizeInMeters)\n\
{\n\
positionWC.xy += halfSize;\n\
}\n\
positionWC.xy += translate;\n\
positionWC.xy += (pixelOffset * czm_resolutionScale);\n\
return positionWC;\n\
}\n\
void main()\n\
{\n\
vec3 positionHigh = positionHighAndScale.xyz;\n\
vec3 positionLow = positionLowAndRotation.xyz;\n\
float scale = positionHighAndScale.w;\n\
#if defined(ROTATION) || defined(ALIGNED_AXIS)\n\
float rotation = positionLowAndRotation.w;\n\
#else\n\
float rotation = 0.0;\n\
#endif\n\
float compressed = compressedAttribute0.x;\n\
vec2 pixelOffset;\n\
pixelOffset.x = floor(compressed * SHIFT_RIGHT7);\n\
compressed -= pixelOffset.x * SHIFT_LEFT7;\n\
pixelOffset.x -= UPPER_BOUND;\n\
vec2 origin;\n\
origin.x = floor(compressed * SHIFT_RIGHT5);\n\
compressed -= origin.x * SHIFT_LEFT5;\n\
origin.y = floor(compressed * SHIFT_RIGHT3);\n\
compressed -= origin.y * SHIFT_LEFT3;\n\
origin -= vec2(1.0);\n\
float show = floor(compressed * SHIFT_RIGHT2);\n\
compressed -= show * SHIFT_LEFT2;\n\
#ifdef INSTANCED\n\
vec2 textureCoordinatesBottomLeft = czm_decompressTextureCoordinates(compressedAttribute0.w);\n\
vec2 textureCoordinatesRange = czm_decompressTextureCoordinates(eyeOffset.w);\n\
vec2 textureCoordinates = textureCoordinatesBottomLeft + direction * textureCoordinatesRange;\n\
#else\n\
vec2 direction;\n\
direction.x = floor(compressed * SHIFT_RIGHT1);\n\
direction.y = compressed - direction.x * SHIFT_LEFT1;\n\
vec2 textureCoordinates = czm_decompressTextureCoordinates(compressedAttribute0.w);\n\
#endif\n\
float temp = compressedAttribute0.y * SHIFT_RIGHT8;\n\
pixelOffset.y = -(floor(temp) - UPPER_BOUND);\n\
vec2 translate;\n\
translate.y = (temp - floor(temp)) * SHIFT_LEFT16;\n\
temp = compressedAttribute0.z * SHIFT_RIGHT8;\n\
translate.x = floor(temp) - UPPER_BOUND;\n\
translate.y += (temp - floor(temp)) * SHIFT_LEFT8;\n\
translate.y -= UPPER_BOUND;\n\
temp = compressedAttribute1.x * SHIFT_RIGHT8;\n\
vec2 imageSize = vec2(floor(temp), compressedAttribute2.w);\n\
#ifdef EYE_DISTANCE_TRANSLUCENCY\n\
vec4 translucencyByDistance;\n\
translucencyByDistance.x = compressedAttribute1.z;\n\
translucencyByDistance.z = compressedAttribute1.w;\n\
translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n\
temp = compressedAttribute1.y * SHIFT_RIGHT8;\n\
translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n\
#endif\n\
#ifdef ALIGNED_AXIS\n\
vec3 alignedAxis = czm_octDecode(floor(compressedAttribute1.y * SHIFT_RIGHT8));\n\
temp = compressedAttribute2.z * SHIFT_RIGHT5;\n\
bool validAlignedAxis = (temp - floor(temp)) * SHIFT_LEFT1 > 0.0;\n\
#else\n\
vec3 alignedAxis = vec3(0.0);\n\
bool validAlignedAxis = false;\n\
#endif\n\
#ifdef RENDER_FOR_PICK\n\
temp = compressedAttribute2.y;\n\
#else\n\
temp = compressedAttribute2.x;\n\
#endif\n\
vec4 color;\n\
temp = temp * SHIFT_RIGHT8;\n\
color.b = (temp - floor(temp)) * SHIFT_LEFT8;\n\
temp = floor(temp) * SHIFT_RIGHT8;\n\
color.g = (temp - floor(temp)) * SHIFT_LEFT8;\n\
color.r = floor(temp);\n\
temp = compressedAttribute2.z * SHIFT_RIGHT8;\n\
bool sizeInMeters = floor((temp - floor(temp)) * SHIFT_LEFT7) > 0.0;\n\
temp = floor(temp) * SHIFT_RIGHT8;\n\
#ifdef RENDER_FOR_PICK\n\
color.a = (temp - floor(temp)) * SHIFT_LEFT8;\n\
vec4 pickColor = color / 255.0;\n\
#else\n\
color.a = floor(temp);\n\
color /= 255.0;\n\
#endif\n\
vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n\
vec4 positionEC = czm_modelViewRelativeToEye * p;\n\
positionEC = czm_eyeOffset(positionEC, eyeOffset.xyz);\n\
positionEC.xyz *= show;\n\
#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(EYE_DISTANCE_PIXEL_OFFSET)\n\
float lengthSq;\n\
if (czm_sceneMode == czm_sceneMode2D)\n\
{\n\
lengthSq = czm_eyeHeight2D.y;\n\
}\n\
else\n\
{\n\
lengthSq = dot(positionEC.xyz, positionEC.xyz);\n\
}\n\
#endif\n\
#ifdef EYE_DISTANCE_SCALING\n\
scale *= czm_nearFarScalar(scaleByDistance, lengthSq);\n\
if (scale == 0.0)\n\
{\n\
positionEC.xyz = vec3(0.0);\n\
}\n\
#endif\n\
float translucency = 1.0;\n\
#ifdef EYE_DISTANCE_TRANSLUCENCY\n\
translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\n\
if (translucency == 0.0)\n\
{\n\
positionEC.xyz = vec3(0.0);\n\
}\n\
#endif\n\
#ifdef EYE_DISTANCE_PIXEL_OFFSET\n\
float pixelOffsetScale = czm_nearFarScalar(pixelOffsetScaleByDistance, lengthSq);\n\
pixelOffset *= pixelOffsetScale;\n\
#endif\n\
#ifdef CLAMPED_TO_GROUND\n\
positionEC.z *= 0.995;\n\
origin.y = 1.0;\n\
#endif\n\
vec4 positionWC = computePositionWindowCoordinates(positionEC, imageSize, scale, direction, origin, translate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters);\n\
gl_Position = czm_viewportOrthographic * vec4(positionWC.xy, -positionWC.z, 1.0);\n\
v_textureCoordinates = textureCoordinates;\n\
#ifdef RENDER_FOR_PICK\n\
v_pickColor = pickColor;\n\
#else\n\
v_color = color;\n\
v_color.a *= translucency;\n\
#endif\n\
}\n\
";
});
|
/******/ (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] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = 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;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 44);
/******/ })
/************************************************************************/
/******/ ({
/***/ "./node_modules/ui-huma/js/vendor/quill.js":
/*!*************************************************!*\
!*** ./node_modules/ui-huma/js/vendor/quill.js ***!
\*************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var fm_plugin_quill__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fm-plugin-quill */ "./node_modules/ui-huma/node_modules/fm-plugin-quill/js/quill.js");
/* harmony import */ var fm_plugin_quill__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fm_plugin_quill__WEBPACK_IMPORTED_MODULE_0__);
/***/ }),
/***/ "./node_modules/ui-huma/node_modules/fm-plugin-quill/js/quill.js":
/*!***********************************************************************!*\
!*** ./node_modules/ui-huma/node_modules/fm-plugin-quill/js/quill.js ***!
\***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
(function () {
'use strict';
$('[data-toggle="quill"]').each(function () {
var element = $(this);
var options = {
modules: {
toolbar: void 0 !== element.data('quill-modules-toolbar') ? element.data('quill-modules-toolbar') : {}
},
theme: void 0 !== element.data('quill-theme') ? element.data('quill-theme') : 'snow',
placeholder: void 0 !== element.data('quill-placeholder') ? element.data('quill-placeholder') : Quill.DEFAULTS.placeholder,
readOnly: void 0 !== element.data('quill-read-only') ? element.data('quill-read-only') : Quill.DEFAULTS.readOnly,
debug: void 0 !== element.data('quill-debug') ? element.data('quill-debug') : Quill.DEFAULTS.debug,
formats: void 0 !== element.data('quill-formats') ? element.data('quill-formats') : Quill.DEFAULTS.formats
};
var quillElement = element.get(0);
var quill = new Quill(quillElement, options);
Object.defineProperty(quillElement, 'Quill', {
configurable: true,
writable: false,
value: quill
});
});
})();
/***/ }),
/***/ "./src/js/vendor/quill.js":
/*!********************************!*\
!*** ./src/js/vendor/quill.js ***!
\********************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var ui_huma_js_vendor_quill__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ui-huma/js/vendor/quill */ "./node_modules/ui-huma/js/vendor/quill.js");
/***/ }),
/***/ 44:
/*!**************************************!*\
!*** multi ./src/js/vendor/quill.js ***!
\**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(/*! /home/skankhunt/repositorys/digitalcrafts-LMS/src/js/vendor/quill.js */"./src/js/vendor/quill.js");
/***/ })
/******/ });
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL3VpLWh1bWEvanMvdmVuZG9yL3F1aWxsLmpzIiwid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy91aS1odW1hL25vZGVfbW9kdWxlcy9mbS1wbHVnaW4tcXVpbGwvanMvcXVpbGwuanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL2pzL3ZlbmRvci9xdWlsbC5qcyJdLCJuYW1lcyI6WyIkIiwiZWFjaCIsImVsZW1lbnQiLCJvcHRpb25zIiwibW9kdWxlcyIsInRvb2xiYXIiLCJkYXRhIiwidGhlbWUiLCJwbGFjZWhvbGRlciIsIlF1aWxsIiwiREVGQVVMVFMiLCJyZWFkT25seSIsImRlYnVnIiwiZm9ybWF0cyIsInF1aWxsRWxlbWVudCIsImdldCIsInF1aWxsIiwiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJjb25maWd1cmFibGUiLCJ3cml0YWJsZSIsInZhbHVlIl0sIm1hcHBpbmdzIjoiO1FBQUE7UUFDQTs7UUFFQTtRQUNBOztRQUVBO1FBQ0E7UUFDQTtRQUNBO1FBQ0E7UUFDQTtRQUNBO1FBQ0E7UUFDQTtRQUNBOztRQUVBO1FBQ0E7O1FBRUE7UUFDQTs7UUFFQTtRQUNBO1FBQ0E7OztRQUdBO1FBQ0E7O1FBRUE7UUFDQTs7UUFFQTtRQUNBO1FBQ0E7UUFDQSwwQ0FBMEMsZ0NBQWdDO1FBQzFFO1FBQ0E7O1FBRUE7UUFDQTtRQUNBO1FBQ0Esd0RBQXdELGtCQUFrQjtRQUMxRTtRQUNBLGlEQUFpRCxjQUFjO1FBQy9EOztRQUVBO1FBQ0E7UUFDQTtRQUNBO1FBQ0E7UUFDQTtRQUNBO1FBQ0E7UUFDQTtRQUNBO1FBQ0E7UUFDQSx5Q0FBeUMsaUNBQWlDO1FBQzFFLGdIQUFnSCxtQkFBbUIsRUFBRTtRQUNySTtRQUNBOztRQUVBO1FBQ0E7UUFDQTtRQUNBLDJCQUEyQiwwQkFBMEIsRUFBRTtRQUN2RCxpQ0FBaUMsZUFBZTtRQUNoRDtRQUNBO1FBQ0E7O1FBRUE7UUFDQSxzREFBc0QsK0RBQStEOztRQUVySDtRQUNBOzs7UUFHQTtRQUNBOzs7Ozs7Ozs7Ozs7O0FDbEZBO0FBQUE7QUFBQTs7Ozs7Ozs7Ozs7O0FDQUEsQ0FBQyxZQUFVO0FBQ1Q7O0FBRUFBLEdBQUMsQ0FBQyx1QkFBRCxDQUFELENBQTJCQyxJQUEzQixDQUFnQyxZQUFXO0FBQ3pDLFFBQUlDLE9BQU8sR0FBR0YsQ0FBQyxDQUFDLElBQUQsQ0FBZjtBQUNBLFFBQUlHLE9BQU8sR0FBRztBQUNaQyxhQUFPLEVBQUU7QUFDUEMsZUFBTyxFQUFFLEtBQUssQ0FBTCxLQUFXSCxPQUFPLENBQUNJLElBQVIsQ0FBYSx1QkFBYixDQUFYLEdBQ1BKLE9BQU8sQ0FBQ0ksSUFBUixDQUFhLHVCQUFiLENBRE8sR0FFUDtBQUhLLE9BREc7QUFNWkMsV0FBSyxFQUFFLEtBQUssQ0FBTCxLQUFXTCxPQUFPLENBQUNJLElBQVIsQ0FBYSxhQUFiLENBQVgsR0FDSEosT0FBTyxDQUFDSSxJQUFSLENBQWEsYUFBYixDQURHLEdBRUgsTUFSUTtBQVNaRSxpQkFBVyxFQUFFLEtBQUssQ0FBTCxLQUFXTixPQUFPLENBQUNJLElBQVIsQ0FBYSxtQkFBYixDQUFYLEdBQ1RKLE9BQU8sQ0FBQ0ksSUFBUixDQUFhLG1CQUFiLENBRFMsR0FFVEcsS0FBSyxDQUFDQyxRQUFOLENBQWVGLFdBWFA7QUFZWkcsY0FBUSxFQUFFLEtBQUssQ0FBTCxLQUFXVCxPQUFPLENBQUNJLElBQVIsQ0FBYSxpQkFBYixDQUFYLEdBQ05KLE9BQU8sQ0FBQ0ksSUFBUixDQUFhLGlCQUFiLENBRE0sR0FFTkcsS0FBSyxDQUFDQyxRQUFOLENBQWVDLFFBZFA7QUFlWkMsV0FBSyxFQUFFLEtBQUssQ0FBTCxLQUFXVixPQUFPLENBQUNJLElBQVIsQ0FBYSxhQUFiLENBQVgsR0FDSEosT0FBTyxDQUFDSSxJQUFSLENBQWEsYUFBYixDQURHLEdBRUhHLEtBQUssQ0FBQ0MsUUFBTixDQUFlRSxLQWpCUDtBQWtCWkMsYUFBTyxFQUFFLEtBQUssQ0FBTCxLQUFXWCxPQUFPLENBQUNJLElBQVIsQ0FBYSxlQUFiLENBQVgsR0FDTEosT0FBTyxDQUFDSSxJQUFSLENBQWEsZUFBYixDQURLLEdBRUxHLEtBQUssQ0FBQ0MsUUFBTixDQUFlRztBQXBCUCxLQUFkO0FBdUJBLFFBQUlDLFlBQVksR0FBR1osT0FBTyxDQUFDYSxHQUFSLENBQVksQ0FBWixDQUFuQjtBQUNBLFFBQUlDLEtBQUssR0FBRyxJQUFJUCxLQUFKLENBQVVLLFlBQVYsRUFBd0JYLE9BQXhCLENBQVo7QUFDQWMsVUFBTSxDQUFDQyxjQUFQLENBQXNCSixZQUF0QixFQUFvQyxPQUFwQyxFQUE2QztBQUMzQ0ssa0JBQVksRUFBRSxJQUQ2QjtBQUUzQ0MsY0FBUSxFQUFFLEtBRmlDO0FBRzNDQyxXQUFLLEVBQUVMO0FBSG9DLEtBQTdDO0FBS0QsR0FoQ0Q7QUFrQ0QsQ0FyQ0QsSTs7Ozs7Ozs7Ozs7O0FDQUE7QUFBQSIsImZpbGUiOiIvZGlzdC9hc3NldHMvanMvcXVpbGwuanMiLCJzb3VyY2VzQ29udGVudCI6WyIgXHQvLyBUaGUgbW9kdWxlIGNhY2hlXG4gXHR2YXIgaW5zdGFsbGVkTW9kdWxlcyA9IHt9O1xuXG4gXHQvLyBUaGUgcmVxdWlyZSBmdW5jdGlvblxuIFx0ZnVuY3Rpb24gX193ZWJwYWNrX3JlcXVpcmVfXyhtb2R1bGVJZCkge1xuXG4gXHRcdC8vIENoZWNrIGlmIG1vZHVsZSBpcyBpbiBjYWNoZVxuIFx0XHRpZihpbnN0YWxsZWRNb2R1bGVzW21vZHVsZUlkXSkge1xuIFx0XHRcdHJldHVybiBpbnN0YWxsZWRNb2R1bGVzW21vZHVsZUlkXS5leHBvcnRzO1xuIFx0XHR9XG4gXHRcdC8vIENyZWF0ZSBhIG5ldyBtb2R1bGUgKGFuZCBwdXQgaXQgaW50byB0aGUgY2FjaGUpXG4gXHRcdHZhciBtb2R1bGUgPSBpbnN0YWxsZWRNb2R1bGVzW21vZHVsZUlkXSA9IHtcbiBcdFx0XHRpOiBtb2R1bGVJZCxcbiBcdFx0XHRsOiBmYWxzZSxcbiBcdFx0XHRleHBvcnRzOiB7fVxuIFx0XHR9O1xuXG4gXHRcdC8vIEV4ZWN1dGUgdGhlIG1vZHVsZSBmdW5jdGlvblxuIFx0XHRtb2R1bGVzW21vZHVsZUlkXS5jYWxsKG1vZHVsZS5leHBvcnRzLCBtb2R1bGUsIG1vZHVsZS5leHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKTtcblxuIFx0XHQvLyBGbGFnIHRoZSBtb2R1bGUgYXMgbG9hZGVkXG4gXHRcdG1vZHVsZS5sID0gdHJ1ZTtcblxuIFx0XHQvLyBSZXR1cm4gdGhlIGV4cG9ydHMgb2YgdGhlIG1vZHVsZVxuIFx0XHRyZXR1cm4gbW9kdWxlLmV4cG9ydHM7XG4gXHR9XG5cblxuIFx0Ly8gZXhwb3NlIHRoZSBtb2R1bGVzIG9iamVjdCAoX193ZWJwYWNrX21vZHVsZXNfXylcbiBcdF9fd2VicGFja19yZXF1aXJlX18ubSA9IG1vZHVsZXM7XG5cbiBcdC8vIGV4cG9zZSB0aGUgbW9kdWxlIGNhY2hlXG4gXHRfX3dlYnBhY2tfcmVxdWlyZV9fLmMgPSBpbnN0YWxsZWRNb2R1bGVzO1xuXG4gXHQvLyBkZWZpbmUgZ2V0dGVyIGZ1bmN0aW9uIGZvciBoYXJtb255IGV4cG9ydHNcbiBcdF9fd2VicGFja19yZXF1aXJlX18uZCA9IGZ1bmN0aW9uKGV4cG9ydHMsIG5hbWUsIGdldHRlcikge1xuIFx0XHRpZighX193ZWJwYWNrX3JlcXVpcmVfXy5vKGV4cG9ydHMsIG5hbWUpKSB7XG4gXHRcdFx0T2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIG5hbWUsIHsgZW51bWVyYWJsZTogdHJ1ZSwgZ2V0OiBnZXR0ZXIgfSk7XG4gXHRcdH1cbiBcdH07XG5cbiBcdC8vIGRlZmluZSBfX2VzTW9kdWxlIG9uIGV4cG9ydHNcbiBcdF9fd2VicGFja19yZXF1aXJlX18uciA9IGZ1bmN0aW9uKGV4cG9ydHMpIHtcbiBcdFx0aWYodHlwZW9mIFN5bWJvbCAhPT0gJ3VuZGVmaW5lZCcgJiYgU3ltYm9sLnRvU3RyaW5nVGFnKSB7XG4gXHRcdFx0T2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFN5bWJvbC50b1N0cmluZ1RhZywgeyB2YWx1ZTogJ01vZHVsZScgfSk7XG4gXHRcdH1cbiBcdFx0T2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICdfX2VzTW9kdWxlJywgeyB2YWx1ZTogdHJ1ZSB9KTtcbiBcdH07XG5cbiBcdC8vIGNyZWF0ZSBhIGZha2UgbmFtZXNwYWNlIG9iamVjdFxuIFx0Ly8gbW9kZSAmIDE6IHZhbHVlIGlzIGEgbW9kdWxlIGlkLCByZXF1aXJlIGl0XG4gXHQvLyBtb2RlICYgMjogbWVyZ2UgYWxsIHByb3BlcnRpZXMgb2YgdmFsdWUgaW50byB0aGUgbnNcbiBcdC8vIG1vZGUgJiA0OiByZXR1cm4gdmFsdWUgd2hlbiBhbHJlYWR5IG5zIG9iamVjdFxuIFx0Ly8gbW9kZSAmIDh8MTogYmVoYXZlIGxpa2UgcmVxdWlyZVxuIFx0X193ZWJwYWNrX3JlcXVpcmVfXy50ID0gZnVuY3Rpb24odmFsdWUsIG1vZGUpIHtcbiBcdFx0aWYobW9kZSAmIDEpIHZhbHVlID0gX193ZWJwYWNrX3JlcXVpcmVfXyh2YWx1ZSk7XG4gXHRcdGlmKG1vZGUgJiA4KSByZXR1cm4gdmFsdWU7XG4gXHRcdGlmKChtb2RlICYgNCkgJiYgdHlwZW9mIHZhbHVlID09PSAnb2JqZWN0JyAmJiB2YWx1ZSAmJiB2YWx1ZS5fX2VzTW9kdWxlKSByZXR1cm4gdmFsdWU7XG4gXHRcdHZhciBucyA9IE9iamVjdC5jcmVhdGUobnVsbCk7XG4gXHRcdF9fd2VicGFja19yZXF1aXJlX18ucihucyk7XG4gXHRcdE9iamVjdC5kZWZpbmVQcm9wZXJ0eShucywgJ2RlZmF1bHQnLCB7IGVudW1lcmFibGU6IHRydWUsIHZhbHVlOiB2YWx1ZSB9KTtcbiBcdFx0aWYobW9kZSAmIDIgJiYgdHlwZW9mIHZhbHVlICE9ICdzdHJpbmcnKSBmb3IodmFyIGtleSBpbiB2YWx1ZSkgX193ZWJwYWNrX3JlcXVpcmVfXy5kKG5zLCBrZXksIGZ1bmN0aW9uKGtleSkgeyByZXR1cm4gdmFsdWVba2V5XTsgfS5iaW5kKG51bGwsIGtleSkpO1xuIFx0XHRyZXR1cm4gbnM7XG4gXHR9O1xuXG4gXHQvLyBnZXREZWZhdWx0RXhwb3J0IGZ1bmN0aW9uIGZvciBjb21wYXRpYmlsaXR5IHdpdGggbm9uLWhhcm1vbnkgbW9kdWxlc1xuIFx0X193ZWJwYWNrX3JlcXVpcmVfXy5uID0gZnVuY3Rpb24obW9kdWxlKSB7XG4gXHRcdHZhciBnZXR0ZXIgPSBtb2R1bGUgJiYgbW9kdWxlLl9fZXNNb2R1bGUgP1xuIFx0XHRcdGZ1bmN0aW9uIGdldERlZmF1bHQoKSB7IHJldHVybiBtb2R1bGVbJ2RlZmF1bHQnXTsgfSA6XG4gXHRcdFx0ZnVuY3Rpb24gZ2V0TW9kdWxlRXhwb3J0cygpIHsgcmV0dXJuIG1vZHVsZTsgfTtcbiBcdFx0X193ZWJwYWNrX3JlcXVpcmVfXy5kKGdldHRlciwgJ2EnLCBnZXR0ZXIpO1xuIFx0XHRyZXR1cm4gZ2V0dGVyO1xuIFx0fTtcblxuIFx0Ly8gT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsXG4gXHRfX3dlYnBhY2tfcmVxdWlyZV9fLm8gPSBmdW5jdGlvbihvYmplY3QsIHByb3BlcnR5KSB7IHJldHVybiBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwob2JqZWN0LCBwcm9wZXJ0eSk7IH07XG5cbiBcdC8vIF9fd2VicGFja19wdWJsaWNfcGF0aF9fXG4gXHRfX3dlYnBhY2tfcmVxdWlyZV9fLnAgPSBcIi9cIjtcblxuXG4gXHQvLyBMb2FkIGVudHJ5IG1vZHVsZSBhbmQgcmV0dXJuIGV4cG9ydHNcbiBcdHJldHVybiBfX3dlYnBhY2tfcmVxdWlyZV9fKF9fd2VicGFja19yZXF1aXJlX18ucyA9IDQ0KTtcbiIsImltcG9ydCAnZm0tcGx1Z2luLXF1aWxsJyIsIihmdW5jdGlvbigpe1xuICAndXNlIHN0cmljdCc7XG5cbiAgJCgnW2RhdGEtdG9nZ2xlPVwicXVpbGxcIl0nKS5lYWNoKGZ1bmN0aW9uKCkge1xuICAgIHZhciBlbGVtZW50ID0gJCh0aGlzKVxuICAgIHZhciBvcHRpb25zID0ge1xuICAgICAgbW9kdWxlczoge1xuICAgICAgICB0b29sYmFyOiB2b2lkIDAgIT09IGVsZW1lbnQuZGF0YSgncXVpbGwtbW9kdWxlcy10b29sYmFyJykgXG4gICAgICAgID8gZWxlbWVudC5kYXRhKCdxdWlsbC1tb2R1bGVzLXRvb2xiYXInKSBcbiAgICAgICAgOiB7fVxuICAgICAgfSxcbiAgICAgIHRoZW1lOiB2b2lkIDAgIT09IGVsZW1lbnQuZGF0YSgncXVpbGwtdGhlbWUnKSBcbiAgICAgICAgPyBlbGVtZW50LmRhdGEoJ3F1aWxsLXRoZW1lJykgXG4gICAgICAgIDogJ3Nub3cnLFxuICAgICAgcGxhY2Vob2xkZXI6IHZvaWQgMCAhPT0gZWxlbWVudC5kYXRhKCdxdWlsbC1wbGFjZWhvbGRlcicpIFxuICAgICAgICA/IGVsZW1lbnQuZGF0YSgncXVpbGwtcGxhY2Vob2xkZXInKSBcbiAgICAgICAgOiBRdWlsbC5ERUZBVUxUUy5wbGFjZWhvbGRlcixcbiAgICAgIHJlYWRPbmx5OiB2b2lkIDAgIT09IGVsZW1lbnQuZGF0YSgncXVpbGwtcmVhZC1vbmx5JylcbiAgICAgICAgPyBlbGVtZW50LmRhdGEoJ3F1aWxsLXJlYWQtb25seScpXG4gICAgICAgIDogUXVpbGwuREVGQVVMVFMucmVhZE9ubHksXG4gICAgICBkZWJ1Zzogdm9pZCAwICE9PSBlbGVtZW50LmRhdGEoJ3F1aWxsLWRlYnVnJylcbiAgICAgICAgPyBlbGVtZW50LmRhdGEoJ3F1aWxsLWRlYnVnJylcbiAgICAgICAgOiBRdWlsbC5ERUZBVUxUUy5kZWJ1ZyxcbiAgICAgIGZvcm1hdHM6IHZvaWQgMCAhPT0gZWxlbWVudC5kYXRhKCdxdWlsbC1mb3JtYXRzJylcbiAgICAgICAgPyBlbGVtZW50LmRhdGEoJ3F1aWxsLWZvcm1hdHMnKVxuICAgICAgICA6IFF1aWxsLkRFRkFVTFRTLmZvcm1hdHNcbiAgICB9XG5cbiAgICB2YXIgcXVpbGxFbGVtZW50ID0gZWxlbWVudC5nZXQoMClcbiAgICB2YXIgcXVpbGwgPSBuZXcgUXVpbGwocXVpbGxFbGVtZW50LCBvcHRpb25zKVxuICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShxdWlsbEVsZW1lbnQsICdRdWlsbCcsIHtcbiAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZSxcbiAgICAgIHdyaXRhYmxlOiBmYWxzZSxcbiAgICAgIHZhbHVlOiBxdWlsbFxuICAgIH0pXG4gIH0pXG5cbn0pKCkiLCJpbXBvcnQgJ3VpLWh1bWEvanMvdmVuZG9yL3F1aWxsJyJdLCJzb3VyY2VSb290IjoiIn0=
|
// @flow
import * as React from "react";
import styled, { css } from "styled-components";
import defaultTheme from "../defaultTheme";
import Button from "../Button";
import ButtonLink from "../ButtonLink";
import FormLabel from "../FormLabel";
import FormFeedback from "../FormFeedback";
import Attachment from "../icons/Attachment";
import CloseCircle from "../icons/CloseCircle";
import { rtlSpacing } from "../utils/rtl";
import getSpacingToken from "../common/getSpacingToken";
import getFieldDataState from "../common/getFieldDataState";
import formElementFocus from "../InputField/helpers/formElementFocus";
import mq from "../utils/mediaQuery";
import type { Props } from "./index";
const Field = styled.label`
font-family: ${({ theme }) => theme.orbit.fontfamily};
display: block;
position: relative;
width: 100%;
margin-bottom: ${getSpacingToken};
`;
Field.defaultProps = {
theme: defaultTheme,
};
const FakeInput = styled(({ children, className }) => <div className={className}>{children}</div>)`
box-sizing: border-box;
display: flex;
align-items: center;
padding: ${({ theme }) => rtlSpacing(theme.orbit.paddingInputFile)};
height: ${({ theme }) => theme.orbit.heightInputNormal};
box-shadow: inset 0 0 0
${({ theme, error }) =>
`${theme.orbit.borderWidthInput} ${
error ? theme.orbit.borderColorInputError : theme.orbit.borderColorInput
}`};
background-color: ${({ theme }) => theme.backgroundInput};
transition: box-shadow ${({ theme }) => theme.orbit.durationFast} ease-in-out;
border-radius: 6px;
${mq.tablet(css`
border-radius: ${({ theme }) => theme.orbit.borderRadiusNormal};
`)};
&:hover {
box-shadow: inset 0 0 0
${({ theme, error }) =>
`${theme.orbit.borderWidthInput} ${
error ? theme.orbit.paletteRedNormalHover : theme.orbit.borderColorInputHover
}`};
}
`;
FakeInput.defaultProps = {
theme: defaultTheme,
};
const Input = styled.input`
// we need to hide the input, but not with display or visibility so we can trigger the focus
opacity: 0;
position: absolute;
height: 0;
&:focus ~ ${FakeInput} {
${formElementFocus}
}
`;
Input.defaultProps = {
theme: defaultTheme,
};
const getFileInputColor = ({ error, fileName }, theme) => {
if (error) {
return theme.orbit.paletteRedNormal;
}
if (fileName) {
return theme.orbit.colorTextInput;
}
return theme.orbit.paletteInkLight;
};
const StyledFileInput = styled.div`
font-family: ${({ theme }) => theme.orbit.fontFamily};
color: ${({ error, fileName, theme }) => getFileInputColor({ error, fileName }, theme)};
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: ${({ theme }) => rtlSpacing(`0 0 0 ${theme.orbit.spaceSmall}`)};
`;
StyledFileInput.defaultProps = {
theme: defaultTheme,
};
const InputFile = React.forwardRef<Props, HTMLInputElement>((props, ref) => {
const {
placeholder = "No file selected",
buttonLabel = "Select file",
onRemoveFile,
dataTest,
spaceAfter,
} = props;
return (
<Field spaceAfter={spaceAfter}>
<Input
data-test={dataTest}
data-state={getFieldDataState(!!props.error)}
type="file"
name={props.name}
error={props.error}
onChange={props.onChange}
onFocus={props.onChange}
onBlur={props.onBlur}
accept={props.allowedFileTypes}
ref={ref}
tabIndex={props.tabIndex}
/>
{props.label && <FormLabel filled={!!props.fileName}>{props.label}</FormLabel>}
<FakeInput error={props.error}>
<Button type="secondary" size="small" iconLeft={<Attachment />} asComponent="div">
{buttonLabel}
</Button>
<StyledFileInput fileName={props.fileName} error={props.error}>
{props.fileName || placeholder}
</StyledFileInput>
{props.fileName && (
<ButtonLink
type="inline"
iconLeft={<CloseCircle color="secondary" />}
onClick={ev => {
ev.preventDefault();
if (onRemoveFile) {
onRemoveFile();
}
}}
/>
)}
</FakeInput>
{props.help && !props.error && <FormFeedback type="help">{props.help}</FormFeedback>}
{props.error && <FormFeedback type="error">{props.error}</FormFeedback>}
</Field>
);
});
InputFile.displayName = "InputFile";
export default InputFile;
|
module.exports = function index(app) {
"use strict";
require('./server')(app);
require('./express')(app);
};
|
"use strict";
if (process.env.NODE_ENV === 'development') {
const electronHot = require('electron-hot-loader');
electronHot.install({higherOrderFunctions: ['connect']});
electronHot.watchJsx(['src/**/*.jsx']);
electronHot.watchCss(['src/assets/**/*.css']);
}
require('./index.jsx');
|
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h(h.f, null, h("path", {
d: "M20 6H4l8 5zM4 8v10h16V8l-8 5z",
opacity: ".3"
}), h("path", {
d: "M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 2l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"
})), 'MarkunreadTwoTone');
|
import { observable, action, runInAction } from 'mobx';
import Api from '../../models/Api';
class PostsStore {
@observable posts = [];
@observable postInputMessage;
@observable isPosting = false;
constructor(store, client) {
this.store = store;
this.api = new Api('api/posts', client);
}
@action.bound async fetchPosts() {
try {
const posts = await this.api.find({ $sort: { createdAt: -1 } });
runInAction(() => { this.posts = posts; });
} catch (e) {
console.log(e);
}
}
@action.bound async createPost() {
try {
if (!this.postInputMessage) return;
runInAction(() => { this.isPosting = true; });
const ownerId = this.store.userStore.currentUser._id;
const res = await this.api.create({ ownerId, post: this.postInputMessage });
this.addPost(res);
this.handlePostInput('');
runInAction(() => { this.isPosting = false; });
} catch (e) {
console.log(e);
runInAction(() => { this.isPosting = false; });
}
}
@action.bound handlePostInput(value) {
this.postInputMessage = value;
}
@action.bound addPost(post) {
this.posts.unshift(post);
}
}
export default PostsStore;
|
/*global require, applicationContext*/
////////////////////////////////////////////////////////////////////////////////
/// @brief A Foxx.Controller to show all Foxx Applications
///
/// @file
///
/// DISCLAIMER
///
/// Copyright 2010-2013 triagens GmbH, Cologne, Germany
///
/// 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.
///
/// Copyright holder is triAGENS GmbH, Cologne, Germany
///
/// @author Michael Hackstein
/// @author Copyright 2011-2013, triAGENS GmbH, Cologne, Germany
////////////////////////////////////////////////////////////////////////////////
"use strict";
// Initialise a new FoxxController called controller under the urlPrefix: "foxxes".
var FoxxController = require("org/arangodb/foxx").Controller,
controller = new FoxxController(applicationContext),
ArangoError = require("org/arangodb").ArangoError,
underscore = require("underscore"),
joi = require("joi"),
notifications = require("org/arangodb/configuration").notifications,
db = require("internal").db,
foxxInstallKey = joi.string().required().description(
"The _key attribute, where the information of this Foxx-Install is stored."
),
appname = joi.string().required();
var foxxes = new (require("lib/foxxes").Foxxes)();
var FoxxManager = require("org/arangodb/foxx/manager");
var docus = new (require("lib/swagger").Swagger)();
controller.get("/whoAmI", function(req, res) {
res.json({
name: req.user
});
});
controller.get("/unauthorized", function(req, res) {
throw new ArangoError();
}).errorResponse(ArangoError, 401, "unauthorized");
/** Is version check allowed
*
* Check if version check is allowed
*/
controller.get("shouldCheckVersion", function(req, res) {
var versions = notifications.versions();
if (!versions || versions.enableVersionNotification === false) {
res.json(false);
} else {
res.json(true);
}
});
/** Disable version check
*
* Disable the version check in web interface
*/
controller.post("disableVersionCheck", function(req, res) {
notifications.setVersions({
enableVersionNotification: false
});
res.json("ok");
});
/** Fetch a foxx from temp folder
*
* Makes a foxx uploaded to the temp folder
* available for mounting.
*/
controller.post("/foxxes/inspect", function (req, res) {
var content = JSON.parse(req.requestBody),
path = content.filename;
res.json(foxxes.inspect(path));
}).errorResponse(ArangoError, 500, "No valid app");
// .............................................................................
// install
// .............................................................................
controller.put("/foxxes/install", function (req, res) {
var content = JSON.parse(req.requestBody),
name = content.name,
mount = content.mount,
version = content.version,
options = content.options;
res.json(foxxes.install(name, mount, version, options));
}).summary("Installs a new foxx")
.notes("This function is used to install a new foxx.");
/** Install a Foxx from Github
*
* Install a Foxx with URL and .....
*/
controller.post("/foxxes/gitinstall", function (req, res) {
var content = JSON.parse(req.requestBody),
name = content.name,
url = content.url,
version = content.version;
var appID = FoxxManager.fetchFromGithub(url, name, version);
res.json(appID);
}).summary("Installs a foxx or update existing")
.notes("This function is used to install or update a (new) foxx.");
/** Remove an uninstalled Foxx
*
* Remove the Foxx with the given key.
*/
controller.del("/foxxes/purge/:key", function (req, res) {
res.json(FoxxManager.purge(req.params("key")));
}).pathParam("key", {
type: foxxInstallKey,
allowMultiple: false
}).summary("Remove a Foxx.")
.notes("This function is used to remove a foxx.");
/** Remove all uninstalled Foxx versions
*
* Remove the Foxx with the given array of versions app ids.
*/
controller.del("/foxxes/purgeall/:key", function (req, res) {
var name = req.params("key");
var allFoxxes = foxxes.viewAll();
var toDelete = [];
underscore.each(allFoxxes, function(myFoxx) {
if (myFoxx.name === name) {
toDelete.push(myFoxx.app);
}
});
underscore.each(toDelete, function(myFoxx) {
FoxxManager.purge(myFoxx);
});
res.json({res: true});
}).pathParam("key", {
type: foxxInstallKey,
allowMultiple: false
}).summary("Remove a all existing Foxx versions .")
.notes("This function is used to remove all versions of a foxx.");
/** Get info about github information of an available Foxx
*
* Returns github information of Foxx
*/
controller.get("/foxxes/gitinfo/:key", function (req, res) {
res.json(FoxxManager.gitinfo(req.params("key")));
}).pathParam("key", {
type: foxxInstallKey,
allowMultiple: false
}).summary("List git information of a Foxx")
.notes("This function is used to display all available github information of a foxx");
/** Get info about mount points of an installed Foxx
*
* Returns mount points of Foxx
*/
controller.get("/foxxes/mountinfo/:key", function (req, res) {
res.json(FoxxManager.mountinfo(req.params("key")));
}).pathParam("key", {
type: foxxInstallKey,
allowMultiple: false
}).summary("List mount points of a Foxx")
.notes("This function is used to display all available mount points of a foxx");
/** Get info about all mount points of all installed Foxx
*
* Returns mount points of all Foxxes
*/
controller.get("/foxxes/mountinfo/", function (req, res) {
res.json(FoxxManager.mountinfo());
}).pathParam("key", {
type: foxxInstallKey,
allowMultiple: false
}).summary("List mount points of all Foxx")
.notes("This function is used to display all available mount points of all foxxes");
/** Uninstall a Foxx
*
* Uninstall the Foxx with the given key.
*/
controller.del("/foxxes/:key", function (req, res) {
res.json(foxxes.uninstall(req.params("key")));
}).pathParam("key", {
type: foxxInstallKey,
allowMultiple: false
}).summary("Uninstall a Foxx.")
.notes("This function is used to uninstall a foxx.");
/** Update a Foxx
*
* Update the Foxx with the given information.
*/
controller.put("/foxxes/:key", function (req, res) {
var content = JSON.parse(req.requestBody),
active = content.active;
// TODO: Other changes applied to foxx! e.g. Mount
if (active) {
res.json(foxxes.activate());
} else {
res.json(foxxes.deactivate());
}
}).pathParam("key", {
type: foxxInstallKey,
allowMultiple: false
}).summary("Update a foxx.")
.notes("Used to either activate/deactivate a foxx, or change the mount point.");
/** Get the thubmail of a Foxx
*
* Request the Thumbnail stored for a Foxx
*/
controller.get("/foxxes/thumbnail/:app", function (req, res) {
res.transformations = [ "base64decode" ];
res.body = foxxes.thumbnail(req.params("app"));
// evil mimetype detection attempt...
var start = require("internal").base64Decode(res.body.substr(0, 8));
if (start.indexOf("PNG") !== -1) {
res.contentType = "image/png";
}
}).pathParam("app", {
type: appname.description(
"The appname which is used to identify the foxx in the list of available foxxes."
),
allowMultiple: false
}).summary("Get the thumbnail of a foxx.")
.notes("Used to request the thumbnail of the given Foxx in order to display it on the screen.");
/** List all Foxxes
*
* Get a List of all Foxxes available and running
*
*/
controller.get('/foxxes', function (req, res) {
res.json(foxxes.viewAll());
}).summary("List of all foxxes.")
.notes("This function simply returns the list of all running foxxes");
/** List available Documentation
*
* Get the list of all running Foxxes with links to their documentation
*/
controller.get('/docus', function (req, res) {
res.json(docus.list(req.protocol + "://" + req.headers.host + "/_db/" + req.database + req.path + "/"));
}).summary("List documentation of all foxxes.")
.notes("This function simply returns the list of all running"
+ " foxxes and supplies the paths for the swagger documentation");
/** Get Documentation for one Foxx
*
* Get the complete documentation available for one Foxx
*
*/
controller.get("/docu/:key",function (req, res) {
var subPath = req.path.substr(0, req.path.lastIndexOf("[") - 1),
key = req.params("key"),
path = req.protocol + "://" + req.headers.host +
"/_db/" + encodeURIComponent(req.database) + subPath + "/" + encodeURIComponent(key) + "/";
res.json(docus.listOne(path, key));
}).summary("List documentation of one foxxes.")
.notes("This function simply returns one specific"
+ " foxx and supplies the paths for the swagger documentation");
/** Subroutes for API Documentation
*
* Get the Elements of the API Documentation subroutes
*
*/
controller.get('/docu/:key/*', function(req, res) {
var mountPoint = "";
underscore.each(req.suffix, function(part) {
mountPoint += "/" + part;
});
res.json(docus.show(mountPoint));
}).summary("List the API for one foxx")
.notes("This function lists the API of the foxx"
+ " running under the given mount point");
/** Subroutes for API Documentation
*
* Get the Elements of the API Documentation subroutes
*
*/
controller.get('/swagger/:mount', function(req, res) {
var subPath = req.path.substr(0, req.path.lastIndexOf("[") - 1),
mount = decodeURIComponent(req.params("mount")),
path = req.protocol + "://" + req.headers.host +
"/_db/" + encodeURIComponent(req.database) + subPath + "/" + encodeURIComponent(mount) + "/",
candidate = db._aal.firstExample({ mount: mount });
if (candidate === null) {
throw "no entry found for mount";
}
res.json(docus.show(mount));
// res.json(docus.listOneForMount(path, mount));
}).summary("Returns the generated Swagger JSON description for one foxx")
.notes("This function returns the Swagger JSON API description of the foxx"
+ " running under the given mount point");
/** Move Foxx to other Mount
*
* Move a running Foxx from one mount point to another
*
*/
controller.put('/foxx/move/:key', function(req, res) {
var body = req.body();
var mountPoint = body.mount;
var app = body.app;
var key = req.params("key");
var prefix = body.prefix;
var result = foxxes.move(key, app, mountPoint, prefix);
if (result.error) {
res.status(result.status);
res.body = result.message;
return;
}
res.json(result);
})
.summary("Move one foxx to another moint point")
.notes ("This function moves one installed foxx"
+ " to a given mount point.");
/** Download stored queries
*
* Download and export all queries from the given username.
*
*/
controller.post("/query/upload/:user", function(req, res) {
var user = req.params("user");
var response, queries, userColl, storedQueries, queriesToSave;
queries = req.body();
userColl = db._users.byExample({"user": user}).toArray()[0];
queriesToSave = userColl.userData.queries || [ ];
underscore.each(queries, function(newq) {
var found = false, i;
for (i = 0; i < queriesToSave.length; ++i) {
if (queriesToSave[i].name === newq.name) {
queriesToSave[i] = newq;
found = true;
break;
}
}
if (! found) {
queriesToSave.push(newq);
}
});
var toUpdate = {
userData: {
queries: queriesToSave
}
}
var result = db._users.update(userColl, toUpdate, true);
res.json(result);
}).summary("Upload user queries")
.notes("This function uploads all given user queries");
/** Download stored queries
*
* Download and export all queries from the given username.
*
*/
controller.get("/query/download/:user", function(req, res) {
var user = req.params("user");
var result = db._users.byExample({"user": user}).toArray()[0];
res.set("Content-Type", "application/json");
res.set("Content-Disposition", "attachment; filename=queries.json");
res.json(result.userData.queries);
}).summary("Download all user queries")
.notes("This function downloads all user queries from the given user");
/** Download a query result
*
* Download and export all queries from the given username.
*
*/
controller.get("/query/result/download/:query", function(req, res) {
var query = req.params("query"),
parsedQuery;
var internal = require("internal");
query = internal.base64Decode(query);
try {
parsedQuery = JSON.parse(query);
}
catch (ignore) {
}
var result = db._query(parsedQuery.query, parsedQuery.bindVars).toArray();
res.set("Content-Type", "application/json");
res.set("Content-Disposition", "attachment; filename=results.json");
res.json(result);
}).summary("Download the result of a query")
.notes("This function downloads the result of a user query.");
// -----------------------------------------------------------------------------
// --SECTION-- END-OF-FILE
// -----------------------------------------------------------------------------
/// Local Variables:
/// mode: outline-minor
/// outline-regexp: "/// @brief\\|/// @addtogroup\\|/// @page\\|// --SECTION--\\|/// @\\}\\|/\\*jslint"
/// End:
|
export default ({ route }) => {
if (process.browser) {
// https://zz.bdstatic.com/linksubmit/push.js
const r = `${window.location.origin}${route.path}`;
const t = document.referrer;
const i = new Image();
let o = 'https://sp0.baidu.com/9_Q4simg2RQJ8t7jm9iCKT-xh_/s.gif';
t
? ((o += '?r=' + encodeURIComponent(document.referrer)),
r && (o += '&l=' + r))
: r && (o += '?l=' + r);
i.src = o;
}
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.