@openremote/or-attribute-barchart 1.12.0-snapshot.20251119112219 → 1.12.0-snapshot.20251124061455
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
:host([hidden]) {
|
|
10
10
|
display: none;
|
|
11
11
|
}
|
|
12
|
-
`,iu([nc({type:String})],im.prototype,"value",void 0),iu([nc({type:Object})],im.prototype,"options",void 0),im=iu([ns("or-translate")],im),function(e){e.CREATE="CREATE",e.UPDATE="UPDATE",e.DELETE="DELETE"}(e||(e={})),function(e){e.LOW="LOW",e.MEDIUM="MEDIUM",e.HIGH="HIGH"}(t||(t={})),function(e){e.MANUAL="MANUAL",e.CLIENT="CLIENT",e.GLOBAL_RULESET="GLOBAL_RULESET",e.REALM_RULESET="REALM_RULESET",e.ASSET_RULESET="ASSET_RULESET",e.AGENT="AGENT"}(o||(o={})),function(e){e.OPEN="OPEN",e.ACKNOWLEDGED="ACKNOWLEDGED",e.IN_PROGRESS="IN_PROGRESS",e.RESOLVED="RESOLVED",e.CLOSED="CLOSED"}(r||(r={})),function(e){e.BOTTOM_LEFT="BOTTOM_LEFT",e.BOTTOM_RIGHT="BOTTOM_RIGHT",e.TOP_LEFT="TOP_LEFT",e.TOP_RIGHT="TOP_RIGHT"}(a||(a={})),function(e){e.CREATE="CREATE",e.READ="READ",e.UPDATE="UPDATE",e.DELETE="DELETE"}(s||(s={})),function(e){e.NONE="NONE",e.FORECAST="FORECAST",e.SETPOINT="SETPOINT"}(l||(l={})),function(e){e.DISCONNECTED="DISCONNECTED",e.CONNECTING="CONNECTING",e.DISCONNECTING="DISCONNECTING",e.CONNECTED="CONNECTED",e.DISABLED="DISABLED",e.WAITING="WAITING",e.ERROR="ERROR",e.STOPPED="STOPPED"}(c||(c={})),function(e){e.EV="EV",e.PHEV="PHEV"}(d||(d={})),function(e){e.YAZAKI="YAZAKI",e.MENNEKES="MENNEKES",e.LE_GRAND="LE_GRAND",e.CHADEMO="CHADEMO",e.COMBO="COMBO",e.SCHUKO="SCHUKO",e.ENERGYLOCK="ENERGYLOCK"}(u||(u={})),function(e){e.SOUTH="SOUTH",e.EAST_WEST="EAST_WEST"}(m||(m={})),function(e){e.REQUEST_START="REQUEST_START",e.REQUEST_REPEATING="REQUEST_REPEATING",e.REQUEST_CANCEL="REQUEST_CANCEL",e.READY="READY",e.COMPLETED="COMPLETED",e.RUNNING="RUNNING",e.CANCELLED="CANCELLED"}(f||(f={})),function(e){e.TOGGLE="TOGGLE",e.INCREMENT="INCREMENT",e.DECREMENT="DECREMENT",e.NEGATE="NEGATE"}(p||(p={})),function(e){e.ASSET_NOT_FOUND="ASSET_NOT_FOUND",e.ATTRIBUTE_NOT_FOUND="ATTRIBUTE_NOT_FOUND",e.INSUFFICIENT_ACCESS="INSUFFICIENT_ACCESS",e.INVALID_VALUE="INVALID_VALUE",e.INTERCEPTOR_FAILURE="INTERCEPTOR_FAILURE",e.STATE_STORAGE_FAILED="STATE_STORAGE_FAILED",e.CANNOT_PROCESS="CANNOT_PROCESS",e.QUEUE_FULL="QUEUE_FULL",e.UNKNOWN="UNKNOWN",e.ASSET_ID_MISSING="ASSET_ID_MISSING",e.ATTRIBUTE_NAME_MISSING="ATTRIBUTE_NAME_MISSING"}(h||(h={})),function(e){e.PUBLIC="PUBLIC",e.SHARED="SHARED",e.PRIVATE="PRIVATE"}(b||(b={})),function(e){e.OFF="OFF",e.ONE_MIN="ONE_MIN",e.FIVE_MIN="FIVE_MIN",e.QUARTER="QUARTER",e.ONE_HOUR="ONE_HOUR"}(g||(g={})),function(e){e.WRAP_TO_SINGLE_COLUMN="WRAP_TO_SINGLE_COLUMN",e.KEEP_LAYOUT="KEEP_LAYOUT",e.REDIRECT="REDIRECT",e.BLOCK_DEVICE="BLOCK_DEVICE"}(_||(_={})),function(e){e.MINUTE="MINUTE",e.HOUR="HOUR",e.DAY="DAY",e.WEEK="WEEK",e.MONTH="MONTH",e.YEAR="YEAR"}(y||(y={})),function(e){e.MIN="MIN",e.AVG="AVG",e.MAX="MAX",e.DIFFERENCE="DIFFERENCE",e.COUNT="COUNT",e.SUM="SUM",e.MODE="MODE",e.MEDIAN="MEDIAN"}(v||(v={})),function(e){e.TERMINATING="TERMINATING",e.DISABLED="DISABLED",e.ALREADY_CONNECTED="ALREADY_CONNECTED",e.UNRECOGNISED="UNRECOGNISED",e.PERMANENT_ERROR="PERMANENT_ERROR",e.SYNC_ERROR="SYNC_ERROR"}(F||(F={})),function(e){e.HTTPS="HTTPS",e.HTTP="HTTP",e.TCP="TCP"}(x||(x={})),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.OPTIONS="OPTIONS",e.PATCH="PATCH"}(w||(w={})),function(e){e.KEYCLOAK="KEYCLOAK",e.BASIC="BASIC",e.NONE="NONE"}(k||(k={})),function(e){e.WEBSOCKET="WEBSOCKET",e.POLLING="POLLING"}(E||(E={})),function(e){e.VECTOR="VECTOR",e.RASTER="RASTER"}(T||(T={})),function(e){e.INTERNAL="INTERNAL",e.CLIENT="CLIENT",e.GLOBAL_RULESET="GLOBAL_RULESET",e.REALM_RULESET="REALM_RULESET",e.ASSET_RULESET="ASSET_RULESET"}(M||(M={})),function(e){e.REALM="REALM",e.USER="USER",e.ASSET="ASSET",e.CUSTOM="CUSTOM"}(A||(A={})),function(e){e.NORMAL="NORMAL",e.HIGH="HIGH"}(C||(C={})),function(e){e.DEVICE="DEVICE",e.TOPIC="TOPIC",e.CONDITION="CONDITION"}(D||(D={})),function(e){e.ALWAYS="ALWAYS",e.ONCE="ONCE",e.HOURLY="HOURLY",e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY",e.ANNUALLY="ANNUALLY"}(S||(S={})),function(e){e.MESSAGE_INVALID="MESSAGE_INVALID",e.CERTIFICATE_INVALID="CERTIFICATE_INVALID",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.UNIQUE_ID_MISMATCH="UNIQUE_ID_MISMATCH",e.CONFIG_DISABLED="CONFIG_DISABLED",e.USER_DISABLED="USER_DISABLED",e.SERVER_ERROR="SERVER_ERROR",e.ASSET_ERROR="ASSET_ERROR",e.SERVER_BUSY="SERVER_BUSY"}(L||(L={})),function(e){e.PRIVATE="PRIVATE",e.PROTECTED="PROTECTED",e.PUBLIC="PUBLIC"}(I||(I={})),function(e){e.EXACT="EXACT",e.BEGIN="BEGIN",e.END="END",e.CONTAINS="CONTAINS"}(O||(O={})),function(e){e.EQUALS="EQUALS",e.GREATER_THAN="GREATER_THAN",e.GREATER_EQUALS="GREATER_EQUALS",e.LESS_THAN="LESS_THAN",e.LESS_EQUALS="LESS_EQUALS",e.BETWEEN="BETWEEN"}(R||(R={})),function(e){e.CREATED_ON="CREATED_ON",e.NAME="NAME",e.ASSET_TYPE="ASSET_TYPE",e.PARENT_ID="PARENT_ID",e.REALM="REALM"}(Y||(Y={})),function(e){e.RESTRICTED="RESTRICTED",e.LINKED="LINKED",e.REALM="REALM"}(P||(P={})),function(e){e.AT_LEAST_ONE="AT_LEAST_ONE",e.ALL="ALL",e.NONE="NONE"}(N||(N={})),function(e){e.AND="AND",e.OR="OR"}(B||(B={})),function(e){e.CREATED_ON="CREATED_ON",e.FIRST_NAME="FIRST_NAME",e.LAST_NAME="LAST_NAME",e.USERNAME="USERNAME",e.EMAIL="EMAIL"}(H||(H={})),function(e){e.STOPPED="STOPPED",e.RUNNING="RUNNING",e.ERROR="ERROR"}(z||(z={})),function(e){e.JAVASCRIPT="JAVASCRIPT",e.GROOVY="GROOVY",e.JSON="JSON",e.FLOW="FLOW"}(j||(j={})),function(e){e.READY="READY",e.DEPLOYED="DEPLOYED",e.COMPILATION_ERROR="COMPILATION_ERROR",e.VALIDITY_PERIOD_ERROR="VALIDITY_PERIOD_ERROR",e.EXECUTION_ERROR="EXECUTION_ERROR",e.LOOP_ERROR="LOOP_ERROR",e.DISABLED="DISABLED",e.PAUSED="PAUSED",e.EXPIRED="EXPIRED",e.REMOVED="REMOVED",e.EMPTY="EMPTY"}(U||(U={})),function(e){e.SUNRISE="SUNRISE",e.SUNSET="SUNSET",e.TWILIGHT_MORNING_VISUAL="TWILIGHT_MORNING_VISUAL",e.TWILIGHT_MORNING_VISUAL_LOWER="TWILIGHT_MORNING_VISUAL_LOWER",e.TWILIGHT_MORNING_HORIZON="TWILIGHT_MORNING_HORIZON",e.TWILIGHT_MORNING_CIVIL="TWILIGHT_MORNING_CIVIL",e.TWILIGHT_MORNING_NAUTICAL="TWILIGHT_MORNING_NAUTICAL",e.TWILIGHT_MORNING_ASTRONOMICAL="TWILIGHT_MORNING_ASTRONOMICAL",e.TWILIGHT_MORNING_GOLDEN_HOUR="TWILIGHT_MORNING_GOLDEN_HOUR",e.TWILIGHT_MORNING_BLUE_HOUR="TWILIGHT_MORNING_BLUE_HOUR",e.TWILIGHT_MORNING_NIGHT_HOUR="TWILIGHT_MORNING_NIGHT_HOUR",e.TWILIGHT_EVENING_VISUAL="TWILIGHT_EVENING_VISUAL",e.TWILIGHT_EVENING_VISUAL_LOWER="TWILIGHT_EVENING_VISUAL_LOWER",e.TWILIGHT_EVENING_HORIZON="TWILIGHT_EVENING_HORIZON",e.TWILIGHT_EVENING_CIVIL="TWILIGHT_EVENING_CIVIL",e.TWILIGHT_EVENING_NAUTICAL="TWILIGHT_EVENING_NAUTICAL",e.TWILIGHT_EVENING_ASTRONOMICAL="TWILIGHT_EVENING_ASTRONOMICAL",e.TWILIGHT_EVENING_GOLDEN_HOUR="TWILIGHT_EVENING_GOLDEN_HOUR",e.TWILIGHT_EVENING_BLUE_HOUR="TWILIGHT_EVENING_BLUE_HOUR",e.TWILIGHT_EVENING_NIGHT_HOUR="TWILIGHT_EVENING_NIGHT_HOUR"}(W||(W={})),function(e){e.NUMBER="NUMBER",e.NUMBER_ARRAY="NUMBER_ARRAY",e.STRING="STRING",e.BOOLEAN="BOOLEAN",e.TRIGGER="TRIGGER",e.COLOR="COLOR",e.ANY="ANY"}(V||(V={})),function(e){e.NEW_LINE="NEW_LINE",e.SPACER="SPACER"}(G||(G={})),function(e){e.INPUT="INPUT",e.PROCESSOR="PROCESSOR",e.OUTPUT="OUTPUT",e.THEN="THEN"}($||($={})),function(e){e.TEXT="TEXT",e.MULTILINE="MULTILINE",e.NUMBER="NUMBER",e.DROPDOWN="DROPDOWN",e.DOUBLE_DROPDOWN="DOUBLE_DROPDOWN",e.CHECKBOX="CHECKBOX",e.ASSET_ATTRIBUTE="ASSET_ATTRIBUTE",e.COLOR="COLOR",e.DATE="DATE"}(q||(q={})),function(e){e.ADD="ADD",e.ADD_OR_REPLACE="ADD_OR_REPLACE",e.REPLACE="REPLACE",e.DELETE="DELETE",e.CLEAR="CLEAR"}(X||(X={})),function(e){e.PER_ASSET="PER_ASSET",e.GLOBAL="GLOBAL"}(K||(K={})),function(e){e.READ_ADMIN="read:admin",e.READ_LOGS="read:logs",e.READ_USERS="read:users",e.READ_MAP="read:map",e.READ_ASSETS="read:assets",e.READ_RULES="read:rules",e.READ_INSIGHTS="read:insights",e.READ_ALARMS="read:alarms",e.READ_SERVICES="read:services",e.WRITE_SERVICES="write:services",e.WRITE_USER="write:user",e.WRITE_ADMIN="write:admin",e.WRITE_LOGS="write:logs",e.WRITE_ASSETS="write:assets",e.WRITE_ATTRIBUTES="write:attributes",e.WRITE_RULES="write:rules",e.WRITE_INSIGHTS="write:insights",e.WRITE_ALARMS="write:alarms",e.READ="read",e.WRITE="write"}(J||(J={})),function(e){e.REGISTER="REGISTER",e.UPDATE="UPDATE",e.DEREGISTER="DEREGISTER"}(Z||(Z={})),function(e){e.AVAILABLE="AVAILABLE",e.UNAVAILABLE="UNAVAILABLE"}(Q||(Q={})),function(e){e.ASSET="ASSET",e.AGENT="AGENT",e.NOTIFICATION="NOTIFICATION",e.ALARM="ALARM",e.RULES="RULES",e.PROTOCOL="PROTOCOL",e.GATEWAY="GATEWAY",e.MODEL_AND_VALUES="MODEL_AND_VALUES",e.API="API",e.DATA="DATA"}(ee||(ee={})),function(e){e.INFO="INFO",e.WARN="WARN",e.ERROR="ERROR"}(et||(et={})),function(e){e.NUMERIC="numeric",e.DIGIT_2="2-digit",e.FULL="full",e.LONG="long",e.MEDIUM="medium",e.SHORT="short",e.NARROW="narrow"}(en||(en={})),function(e){e.SECONDLY="SECONDLY",e.MINUTELY="MINUTELY",e.HOURLY="HOURLY",e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY",e.YEARLY="YEARLY"}(ei||(ei={})),function(e){e.OMIT="OMIT",e.BACKWARD="BACKWARD",e.FORWARD="FORWARD"}(eo||(eo={})),function(e){e.JAPANESE="JAPANESE",e.BUDDHIST="BUDDHIST",e.ROC="ROC",e.ISLAMIC="ISLAMIC",e.ISO8601="ISO8601",e.CHINESE="CHINESE",e.ETHIOPIC="ETHIOPIC",e.HEBREW="HEBREW",e.GREGORIAN="GREGORIAN"}(er||(er={})),function(e){e.SU="SU",e.MO="MO",e.TU="TU",e.WE="WE",e.TH="TH",e.FR="FR",e.SA="SA"}(ea||(ea={})),function(e){e.PEOPLECOUNTERASSET="PeopleCounterAsset",e.STORAGESIMULATORAGENT="StorageSimulatorAgent",e.CITYASSET="CityAsset",e.ELECTRICITYCONSUMERASSET="ElectricityConsumerAsset",e.ELECTRICVEHICLEASSET="ElectricVehicleAsset",e.CONSOLEASSET="ConsoleAsset",e.PRESENCESENSORASSET="PresenceSensorAsset",e.LIGHTASSET="LightAsset",e.THETHINGSSTACKAGENT="TheThingsStackAgent",e.PLUGASSET="PlugAsset",e.ELECTRICITYCHARGERASSET="ElectricityChargerAsset",e.ELECTRICITYBATTERYASSET="ElectricityBatteryAsset",e.ELECTRICITYSUPPLIERASSET="ElectricitySupplierAsset",e.TCPAGENT="TCPAgent",e.SERIALAGENT="SerialAgent",e.BLUETOOTHMESHAGENT="BluetoothMeshAgent",e.SNMPAGENT="SNMPAgent",e.GROUPASSET="GroupAsset",e.BUILDINGASSET="BuildingAsset",e.ELECTRICITYPRODUCERWINDASSET="ElectricityProducerWindAsset",e.ENVIRONMENTSENSORASSET="EnvironmentSensorAsset",e.MQTTAGENT="MQTTAgent",e.MICROPHONEASSET="MicrophoneAsset",e.MODBUSTCPAGENT="ModbusTcpAgent",e.HTTPAGENT="HTTPAgent",e.DOORASSET="DoorAsset",e.ELECTRICITYPRODUCERASSET="ElectricityProducerAsset",e.MAILAGENT="MailAgent",e.UDPAGENT="UDPAgent",e.ROOMASSET="RoomAsset",e.VENTILATIONASSET="VentilationAsset",e.TRADFRILIGHTASSET="TradfriLightAsset",e.KNXAGENT="KNXAgent",e.OPENWEATHERMAPAGENT="OpenWeatherMapAgent",e.CHIRPSTACKAGENT="ChirpStackAgent",e.WEATHERASSET="WeatherAsset",e.THINGASSET="ThingAsset",e.WEBSOCKETAGENT="WebsocketAgent",e.GATEWAYASSET="GatewayAsset",e.PARKINGASSET="ParkingAsset",e.TRADFRIPLUGASSET="TradfriPlugAsset",e.SIMULATORAGENT="SimulatorAgent",e.MODBUSSERIALAGENT="ModbusSerialAgent",e.ELECTRICVEHICLEFLEETGROUPASSET="ElectricVehicleFleetGroupAsset",e.VELBUSTCPAGENT="VelbusTCPAgent",e.ARTNETLIGHTASSET="ArtnetLightAsset",e.VELBUSSERIALAGENT="VelbusSerialAgent",e.GROUNDWATERSENSORASSET="GroundwaterSensorAsset",e.ELECTRICITYPRODUCERSOLARASSET="ElectricityProducerSolarAsset",e.ENERGYOPTIMISATIONASSET="EnergyOptimisationAsset",e.ZWAVEAGENT="ZWaveAgent",e.THERMOSTATASSET="ThermostatAsset",e.SHIPASSET="ShipAsset"}(es||(es={})),function(e){e.SUPPORTSEXPORT="supportsExport",e.MQTTPORT="MQTTPort",e.ENERGYSELFCONSUMPTION="energySelfConsumption",e.LASTACCESS="lastAccess",e.CHARGERID="chargerID",e.POSITION="position",e.CARBONSAVING="carbonSaving",e.ROUTINGMODE="routingMode",e.LASTWILLRETAIN="lastWillRetain",e.LASTWILLTOPIC="lastWillTopic",e.SERIALBAUDRATE="serialBaudrate",e.BASEURL="baseURL",e.REQUIREDVALUES="requiredValues",e.FINANCIALSAVING="financialSaving",e.FLEETCATEGORY="fleetCategory",e.GATEWAYSTATUS="gatewayStatus",e.NO2LEVEL="NO2Level",e.ATMOSPHERICPRESSURE="atmosphericPressure",e.TAGS="tags",e.UNLOCK="unlock",e.MILEAGEMIN="mileageMin",e.CHECKINTERVALSECONDS="checkIntervalSeconds",e.LOCATION="location",e.CLIENTSECRET="clientSecret",e.WINDDIRECTION="windDirection",e.WINDSPEED="windSpeed",e.PARTICLESPM10="particlesPM10",e.APPLICATIONKEY="applicationKey",e.POWEREXPORTMAX="powerExportMax",e.SETWINDACTUALVALUEWITHFORECAST="setWindActualValueWithForecast",e.WATERLEVEL="waterLevel",e.CONSOLENAME="consoleName",e.CONNECTHEADERS="connectHeaders",e.WEBSOCKETQUERY="websocketQuery",e.PREFERHTML="preferHTML",e.COOLING="cooling",e.POLLINGMILLIS="pollingMillis",e.SOILTEMPERATURE="soilTemperature",e.SUNIRRADIANCE="sunIrradiance",e.ODOMETER="odometer",e.SUPPORTSIMPORT="supportsImport",e.MESSAGEMAXLENGTH="messageMaxLength",e.WINDGUSTSPEED="windGustSpeed",e.ENERGYLEVELPERCENTAGEMIN="energyLevelPercentageMin",e.LIGHTID="lightId",e.POWER="power",e.STREET="street",e.DELETEPROCESSEDMAIL="deleteProcessedMail",e.WINDSPEEDMIN="windSpeedMin",e.POWERSETPOINT="powerSetpoint",e.PRESENCE="presence",e.SPACESOCCUPIED="spacesOccupied",e.STARTTLS="startTLS",e.AGENTSTATUS="agentStatus",e.MESSAGECHARSET="messageCharset",e.CERTIFICATEALIAS="certificateAlias",e.PANELPITCH="panelPitch",e.EMAIL="email",e.BINDPORT="bindPort",e.PARTICLESPM1="particlesPM1",e.SPEED="speed",e.ENERGYLEVELPERCENTAGEMAX="energyLevelPercentageMax",e.MESSAGESTRIPDELIMITER="messageStripDelimiter",e.AREA="area",e.COUNTRY="country",e.SHIPTYPE="shipType",e.CONNECTSUBSCRIPTIONS="connectSubscriptions",e.RELATIVEHUMIDITY="relativeHumidity",e.INCLUDEFORECASTWINDSERVICE="includeForecastWindService",e.SOURCEADDRESS="sourceAddress",e.RAINFALL="rainfall",e.ENERGYIMPORTTOTAL="energyImportTotal",e.OAUTHGRANT="oAuthGrant",e.OZONELEVEL="ozoneLevel",e.COUNTINMINUTE="countInMinute",e.PORT="port",e.TUNNELINGSUPPORTED="tunnelingSupported",e.ENINUMBER="ENINumber",e.AGENTDISABLED="agentDisabled",e.DISABLED="disabled",e.FORCECHARGE="forceCharge",e.TIMEINJECTIONINTERVAL="timeInjectionInterval",e.FINANCIALWEIGHTING="financialWeighting",e.ENERGYLEVELPERCENTAGE="energyLevelPercentage",e.SPACESBUFFER="spacesBuffer",e.VEHICLECATEGORY="vehicleCategory",e.FANSPEED="fanSpeed",e.FINANCIALCOST="financialCost",e.NOTES="notes",e.MAILFOLDERNAME="mailFolderName",e.TEMPERATURE="temperature",e.AVAILABLECHARGINGSPACES="availableChargingSpaces",e.ENERGYCAPACITY="energyCapacity",e.POWERIMPORTMIN="powerImportMin",e.INTERVALSIZE="intervalSize",e.SNMPVERSIONVALUE="SNMPVersionValue",e.SOUNDLEVEL="soundLevel",e.UNITID="unitId",e.STOPBITS="stopBits",e.CONNECTURL="connectURL",e.CLIENTID="clientId",e.VEHICLEID="vehicleID",e.SUNAZIMUTH="sunAzimuth",e.AVAILABLEDISCHARGINGSPACES="availableDischargingSpaces",e.WEBSOCKETMODE="websocketMode",e.COLOURTEMPERATURE="colourTemperature",e.VEHICLECONNECTED="vehicleConnected",e.DATABITS="dataBits",e.MILEAGEMINIMUM="mileageMinimum",e.COLOURRGB="colourRGB",e.CARBONIMPORT="carbonImport",e.WILDCARDSUBSCRIPTIONTOPICS="wildcardSubscriptionTopics",e.PRICEHOURLY="priceHourly",e.WINDSPEEDMAX="windSpeedMax",e.PINGDISABLED="pingDisabled",e.FLOW="flow",e.CHILDASSETTYPE="childAssetType",e.NETWORKKEY="networkKey",e.UNIVERSE="universe",e.MSSINUMBER="MSSINumber",e.SUBSCRIBEQOS="subscribeQos",e.LEDCOUNT="lEDCount",e.LOCKED="locked",e.CLOUDCOVERAGE="cloudCoverage",e.PROTOCOL="protocol",e.TARIFFIMPORT="tariffImport",e.ENERGYRENEWABLESHARE="energyRenewableShare",e.REGION="region",e.CONSOLEPLATFORM="consolePlatform",e.POWEREXPORTMIN="powerExportMin",e.EFFICIENCYEXPORT="efficiencyExport",e.CHARGECYCLES="chargeCycles",e.SERIALPORT="serialPort",e.APPLICATIONID="applicationId",e.PANELORIENTATION="panelOrientation",e.LENGTH="length",e.PROBABILITYOFPRECIPITATION="probabilityOfPrecipitation",e.USERNAMEPASSWORD="usernamePassword",e.POWERFORECAST="powerForecast",e.SETACTUALSOLARVALUEWITHFORECAST="setActualSolarValueWithForecast",e.REQUESTQUERYPARAMETERS="requestQueryParameters",e.PROXYADDRESS="proxyAddress",e.MQTTHOST="MQTTHost",e.ENERGYLOCAL="energyLocal",e.ENERGYAUTARKY="energyAutarky",e.MODEL="model",e.MANUFACTURER="manufacturer",e.ONOFF="onOff",e.RESUMESESSION="resumeSession",e.TARIFFEXPORT="tariffExport",e.APIKEY="ApiKey",e.CITY="city",e.CONNECTORTYPE="connectorType",e.ENERGYEXPORTTOTAL="energyExportTotal",e.CARBONEXPORT="carbonExport",e.REQUESTTIMEOUTMILLIS="requestTimeoutMillis",e.ENERGYLEVEL="energyLevel",e.OPTIMISATIONDISABLED="optimisationDisabled",e.WEBSOCKETPATH="websocketPath",e.WINDSPEEDREFERENCE="windSpeedReference",e.PRICEDAILY="priceDaily",e.COUNTGROWTHMINUTE="countGrowthMinute",e.IMONUMBER="IMONumber",e.ATTRIBUTION="Attribution",e.INCLUDEFORECASTSOLARSERVICE="includeForecastSolarService",e.REQUESTHEADERS="requestHeaders",e.TENANTID="tenantId",e.HOST="host",e.COUNTOUTMINUTE="countOutMinute",e.ENERGYTYPE="energyType",e.CONSOLEVERSION="consoleVersion",e.MTU="mtu",e.PANELAZIMUTH="panelAzimuth",e.SEQUENCENUMBER="sequenceNumber",e.SUNALTITUDE="sunAltitude",e.COUNTOUT="countOut",e.CHARGERCONNECTED="chargerConnected",e.ROOMNUMBER="roomNumber",e.PARTICLESPM2_5="particlesPM2_5",e.MESSAGESOURCEADDRESS="messageSourceAddress",e.COUNTIN="countIn",e.MILEAGECHARGED="mileageCharged",e.PROVISIONWEATHERASSET="ProvisionWeatherAsset",e.TEMPERATURESETPOINT="temperatureSetpoint",e.CONSOLEPROVIDERS="consoleProviders",e.POWERIMPORTMAX="powerImportMax",e.COUNTTOTAL="countTotal",e.SPACESTOTAL="spacesTotal",e.BINDHOST="bindHost",e.MESSAGECONVERTBINARY="messageConvertBinary",e.MESSAGEDELIMITERS="messageDelimiters",e.EFFICIENCYIMPORT="efficiencyImport",e.SUNZENITH="sunZenith",e.BRIGHTNESS="brightness",e.POSTALCODE="postalCode",e.SPACESOPEN="spacesOpen",e.HUMIDITY="humidity",e.SECUREMODE="secureMode",e.MILEAGECAPACITY="mileageCapacity",e.DIRECTION="direction",e.ENERGYLEVELSCHEDULE="energyLevelSchedule",e.UVINDEX="uVIndex",e.NATMODE="NATMode",e.UPDATEONWRITE="updateOnWrite",e.LASTWILLPAYLOAD="lastWillPayload",e.GROUPID="groupId",e.FOLLOWREDIRECTS="followRedirects",e.CARBONCOST="carbonCost",e.MESSAGECONVERTHEX="messageConvertHex",e.PUBLISHQOS="publishQos"}(el||(el={})),function(e){e.FORMAT="format",e.RULESTATE="ruleState",e.HASPREDICTEDDATAPOINTS="hasPredictedDataPoints",e.STOREDATAPOINTS="storeDataPoints",e.LABEL="label",e.CONSTRAINTS="constraints",e.SHOWONDASHBOARD="showOnDashboard",e.READONLY="readOnly",e.MULTILINE="multiline",e.ACCESSPUBLICWRITE="accessPublicWrite",e.MOMENTARY="momentary",e.AGENTLINK="agentLink",e.ACCESSRESTRICTEDREAD="accessRestrictedRead",e.DATAPOINTSMAXAGEDAYS="dataPointsMaxAgeDays",e.ACCESSRESTRICTEDWRITE="accessRestrictedWrite",e.SECRET="secret",e.ATTRIBUTELINKS="attributeLinks",e.RULERESETIMMEDIATE="ruleResetImmediate",e.AGENTLINKCONFIG="agentLinkConfig",e.FORECAST="forecast",e.UNITS="units",e.USERCONNECTED="userConnected",e.ACCESSPUBLICREAD="accessPublicRead"}(ec||(ec={})),function(e){e.WSURL="WS_URL",e.POSITIVENUMBER="positiveNumber",e.VALUEDESCRIPTOR="valueDescriptor",e.LONG="long",e.BOOLEANMAP="booleanMap",e.MQTTQOS="MQTTQos",e.GEOJSONPOINT="GEO_JSONPoint",e.SNMPVERSION="SNMPVersion",e.ASSETTYPE="assetType",e.JSONOBJECT="JSONObject",e.BIGNUMBER="bigNumber",e.IPADDRESS="IPAddress",e.EMAIL="email",e.KNXMESSAGESOURCEADDRESS="kNXMessageSourceAddress",e.ATTRIBUTEREFERENCE="attributeReference",e.INTEGER="integer",e.OAUTHGRANT="oAuthGrant",e.NUMBER="number",e.TEXTMAP="textMap",e.WEBSOCKETSUBSCRIPTION="websocketSubscription",e.BOOLEAN="boolean",e.TIMEANDPERIODDURATIONISO8601="timeAndPeriodDurationISO8601",e.TIMESTAMPISO8601="timestampISO8601",e.MULTIVALUEDTEXTMAP="multivaluedTextMap",e.JSON="JSON",e.INTEGERBYTE="integerByte",e.AGENTLINK="agentLink",e.CALENDAREVENT="calendarEvent",e.CONNECTIONSTATUS="connectionStatus",e.VALUECONSTRAINT="valueConstraint",e.ASSETQUERY="assetQuery",e.COLOURRGB="colourRGB",e.VALUEFORMAT="valueFormat",e.TEXT="text",e.BYTE="byte",e.USERNAMEANDPASSWORD="usernameAndPassword",e.HTTPURL="HTTP_URL",e.ATTRIBUTELINK="attributeLink",e.ASSETID="assetID",e.NUMBERMAP="numberMap",e.HTTPMETHOD="HTTPMethod",e.PANELORIENTATION="panelOrientation",e.ATTRIBUTESTATE="attributeState",e.POSITIVEINTEGER="positiveInteger",e.EXECUTIONSTATUS="executionStatus",e.BIGINTEGER="bigInteger",e.PERIODDURATIONISO8601="periodDurationISO8601",e.DATEANDTIME="dateAndTime",e.CONNECTORTYPE="connectorType",e.NEGATIVEINTEGER="negativeInteger",e.TCPIPPORTNUMBER="TCP_IPPortNumber",e.INTEGERMAP="integerMap",e.ENERGYTYPE="energyType",e.TIMESTAMP="timestamp",e.UUID="UUID",e.FORECASTCONFIGURATION="forecastConfiguration",e.TIMEDURATIONISO8601="timeDurationISO8601",e.CONSOLEPROVIDERS="consoleProviders",e.NEGATIVENUMBER="negativeNumber",e.CRONEXPRESSION="CRONExpression",e.DIRECTION="direction",e.HOSTORIPADDRESS="hostOrIPAddress"}(ed||(ed={})),function(e){e.MONTH="month",e.MILE_SCANDINAVIAN="mile_scandinavian",e.YEAR="year",e.VOLT="volt",e.HERTZ="hertz",e.MILE="mile",e.BTU="btu",e.FOOT="foot",e.MEGA="mega",e.INCH="inch",e.IN_HG="inch_mercury",e.CENTI="centi",e.GRAM="gram",e.KNOT="knot",e.METRE="metre",e.LITRE="litre",e.FLUID_OUNCE="fluid_ounce",e.CELSIUS="celsius",e.DECIBEL="decibel",e.FAHRENHEIT="fahrenheit",e.WATT="watt",e.PEAK="peak",e.MICRO="micro",e.PER="per",e.STONE="stone",e.VAR="var",e.OUNCE="ounce",e.HECTARE="hectare",e.YARD="yard",e.JOULE="joule",e.DEGREE="degree",e.KILO="kilo",e.KELVIN="kelvin",e.CARBON="carbon",e.DECIBEL_ATTENUATED="decibel_attenuated",e.SQUARED="squared",e.PERCENTAGE="percentage",e.CUBED="cubed",e.DAY="day",e.RADIAN="radian",e.OHM="ohm",e.MINUTE="minute",e.PART_PER_MILLION="ppm",e.AMP="amp",e.MASS_POUND="pound",e.HOUR="hour",e.ACRE="acre",e.RPM="rpm",e.PASCAL="pascal",e.LUMEN="lumen",e.WEEK="week",e.GALLON="gallon",e.LUX="lux",e.MILLI="milli",e.BAR="bar",e.HECTO="hecto",e.SECOND="second"}(eu||(eu={})),em||(em={});class ip{static getAssetDescriptors(){return ip._assetTypeInfos.map(e=>e.assetDescriptor)}static getMetaItemDescriptors(){return[...this._metaItemDescriptors]}static getValueDescriptors(){return[...this._valueDescriptors]}static getAssetTypeInfos(){return[...this._assetTypeInfos]}static getAssetTypeInfo(e){if(e)return e.assetDescriptor?e:("string"!=typeof e&&(e=e.name),this._assetTypeInfos.find(t=>t.assetDescriptor.name===e))}static getAssetDescriptor(e){if(!e)return;if(e.assetDescriptor)return e.assetDescriptor;if("string"!=typeof e)return e;let t=this._assetTypeInfos.find(t=>t.assetDescriptor.name===e);return t?t.assetDescriptor:void 0}static getAttributeDescriptor(e,t){if(!e)return;let n=this.getAssetTypeInfo(t||"ThingAsset");if(n&&n.attributeDescriptors)return n.attributeDescriptors.find(t=>t.name===e)}static getValueDescriptor(e){let t;if(!e)return;if(e.endsWith("[]"))for(t=0;e.endsWith("[]");)e=e.substring(0,e.length-2),t++;let n=this._valueDescriptors.find(t=>t.name===e);return n&&t&&(n=Object.assign(Object.assign({},n),{arrayDimensions:t})),n}static resolveValueDescriptor(e,t){let n;return t&&("string"==typeof t&&(n=ip.getValueDescriptor(t)),n=t.jsonType?t:ip.getValueDescriptor(t.type)),!n&&e&&(n=ip.getValueDescriptor("JSON")),n}static resolveValueTypeFromValue(e){if(null!=e){if("number"==typeof e)return"number";if("string"==typeof e)return"text";if("boolean"==typeof e)return"boolean";if(Array.isArray(e)){let t=1,n=e.find(e=>null!=e);for(;Array.isArray(n);)n=n.find(e=>null!=e),t++;let i=this.resolveValueTypeFromValue(n);if(!i)return;for(;t>0;)i+="[]",t--;return i}if(e instanceof Date)return"dateAndTime"}}static getAttributeAndValueDescriptors(e,t,n){let i,o;if(t&&"string"!=typeof t)i=t;else{let o=this.getAssetTypeInfo(e||"ThingAsset");if(!o)return[void 0,void 0];"string"==typeof t&&(i=this.getAttributeDescriptor(t,o)),!i&&n&&(i={type:n.type,name:n.name,meta:n.meta})}return i&&(o=this.getValueDescriptor(i.type)),[i,o]}static getMetaItemDescriptor(e){if(e)return this._metaItemDescriptors.find(t=>t.name===e)}static getAssetDescriptorColour(e,t){let n=this.getAssetDescriptor(e);return n&&n.colour?n.colour:t}static getAssetDescriptorIcon(e,t){let n=this.getAssetDescriptor(e);return n&&n.icon?n.icon:t}}ip._assetTypeInfos=[],ip._metaItemDescriptors=[],ip._valueDescriptors=[],n(488);var ih=n(3348),ib=n.n(ih),ig=n(3806),i_=n.n(ig);n(2891);class iy{get resolve(){return this._resolve}get reject(){return this._reject}get promise(){return this._promise}constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t}),Object.freeze(this)}}function iv(e,t,n=!0){if(null==e||null==t)return e===t;if(e.constructor!==t.constructor)return!1;if(e instanceof Function||e instanceof RegExp)return e===t;if(e===t||e.valueOf()===t.valueOf())return!0;if(Array.isArray(e)&&e.length!==t.length||e instanceof Date||!(e instanceof Object)||!(t instanceof Object))return!1;if(n){let n=Object.keys(e);return Object.keys(t).every(e=>-1!==n.indexOf(e))&&n.every(n=>iv(e[n],t[n]))}return!1}function iF(e){if(null==e)return"";let t=!1;return e.split(/([A-Z]|\d)/).map((e,n,i)=>{if(!e)return e;if(!t)return t=!0,e.charAt(0).toUpperCase()+e.slice(1);if("_"===e)return" ";if(1===e.length&&e===e.toUpperCase()){let t=!i[n-1]||"_"===i[n-1],o=n+1<i.length&&i[n+1]&&"_"!==i[n+1],r=n+3>i.length||!i[n+1]&&!i[n+3];(!t||o)&&(e=" "+e),!o&&(t||r)||(e=e.toLowerCase())}return e}).join("").trim()}function ix(e,t,n){let i="string"==typeof e?e:e.name;return t&&t.meta&&t.meta.hasOwnProperty(i)?t.meta[i]:n&&n.meta?n.meta[i]:void 0}function iw(e,t,n,i,o,r){let a=iT("label",e,t,n,o),s="";if(a||(a=ix("label",e,t&&t.meta?t:void 0)),i&&(s=ik(iE("units",e,t,n,o))),!a){let n=e?e.name:t?"string"==typeof t?t:t.name:void 0;a=r||(n?iF(n):void 0)}return a?a+(s?" ("+s+")":""):s}function ik(e,t){if(!e)return"";t||(t="");let n=e.map((e,n)=>{if(3!==e.length||e.toUpperCase()!==e)return id.t(["units."+e,"or:units."+e]);{let i=new Intl.NumberFormat(id.language,{currency:e,style:"currency"}).formatToParts();if(0!==n||"currency"!==i[0].type)return"currency"===i[0].type?i[0].value:i[i.length-1].value;if(!t)return i[0].value;t=i[0].value+t}}).join("");return t.length>0?t+" "+n:n}function iE(e,t,n,i,o){let r,a=[],s=iT(e,t&&"string"==typeof t?t:t?t.name:n?"string"==typeof n?n:n.name:void 0,n,i,o);if(s&&(r=JSON.parse(s)))if("format"!==e)return r;else a.push(r);if(t&&t.meta&&(r=ix(e,t,n)))if("format"!==e)return r;else a.push(r);if(n&&"string"!=typeof n&&n.hasOwnProperty(e)){if(r=n[e],"format"!==e)return r;a.push(r)}if(n&&n.type){if(r=ip.getValueDescriptor(n.type)[e],"format"!==e)return r;a.push(r)}if("format"!==e||0===a.length)return r;let l={};return a.reverse().forEach(e=>{l=Object.assign(Object.assign({},l),e)}),l}function iT(e,t,n,i,o,r){let a;if(t?a="string"==typeof t?t:t.name:n&&(a="string"==typeof n?n:n.name),!a)return;let s=[],l=e+"."+(o?"attribute":"meta")+".";if(i&&s.push(l+i+"."+a),n&&"string"!=typeof n&&(s.push(l+n.type+"."+a),s.push(l+n.type)),s.push(l+a),s.length>0)return id.t(s,{defaultValue:r||""})}var iM=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})};let iA=n(9916);class iC{constructor(e,t,n){this._autoEnable=!1,this._initialised=!1,this._initialiseInProgress=!1,this._pendingProviderPromises={},this._providerMessageListeners={},this._pendingProviderEnables=[],this._registrationTimer=null,this._realm=e,this._autoEnable=t,this._enableCompleteCallback=n,window.OpenRemoteConsole=this;let i=new URLSearchParams(window.location.search),o=i.get("consoleName"),r=i.get("consoleVersion"),a=i.get("consolePlatform"),s=i.get("consoleProviders"),l=i.get("consoleAutoEnable"),c=s&&s.length>0?s.split(" "):["push"];this._pendingProviderEnables=c;let d=iC._createConsoleRegistration(),u=window.localStorage.getItem("OpenRemoteConsole:"+e);if(u)try{let e=JSON.parse(u);e.id&&(d.id=e.id),e.name&&(d.name=e.name),e.providers&&(d.providers=e.providers),e.apps&&(d.apps=e.apps)}catch(e){console.error("Failed to deserialise console registration")}let m=d.providers;for(let e of(d.providers={},c)){let t=m&&m.hasOwnProperty(e)?m[e]:{enabled:!1,disabled:!1};d.providers[e]=t}let f=o9.getAppName();f.length>0&&0>d.apps.indexOf(f)&&d.apps.push(f),this._registration=d,o&&(d.name=o),r&&(d.version=r),a&&(d.platform=a),l&&(this._autoEnable="TRUE"===l||"true"===l)}get registration(){return this._registration}get autoEnable(){return this._autoEnable}get pendingProviderEnables(){return this._pendingProviderEnables.slice(0)}get shellApple(){let e=navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform:navigator.platform;return e&&("iP"===e.substring(0,2)||"Mac"===e.substring(0,3))&&window.webkit&&window.webkit.messageHandlers}get shellAndroid(){return!!window.MobileInterface}get isMobile(){return this.shellApple||this.shellAndroid}initialise(){return iM(this,void 0,void 0,function*(){if(!this._initialised&&!this._initialiseInProgress){console.debug("Console: initialising"),this._initialiseInProgress=!0;try{if(this._registration.providers)for(let e of Object.keys(this._registration.providers))yield this._initialiseProvider(e);this._registration.id||(yield this.sendRegistration(0)),this._initialised=!0,this._initialiseInProgress=!1,0===this._pendingProviderEnables.length?(yield this.sendRegistration(),this._callCompletedCallback()):this._autoEnable&&(yield this.enableProviders())}catch(e){console.error(e)}finally{this._initialiseInProgress=!1}}})}enableProviders(){return iM(this,void 0,void 0,function*(){if(!this._initialised)throw Error("Console must be initialised before enabling providers");for(let e=this._pendingProviderEnables.length-1;e>-1;e--){let t=this._pendingProviderEnables[e];yield this.enableProvider(t)}})}enableProvider(e,t){return iM(this,void 0,void 0,function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),Error("Console must be initialised before enabling providers");if(!this._registration.providers.hasOwnProperty(e))throw console.debug("Invalid console provider '"+e+"'"),Error("Invalid console provider '"+e+"'");console.debug("Console: enabling provider '"+e+"'");let n={provider:e,action:"PROVIDER_ENABLE",consoleId:this._registration.id,data:t},i=yield this.sendProviderMessage(n,!0);this._registration.providers[e].hasPermission=i.hasPermission,this._registration.providers[e].success=i.success,this._registration.providers[e].enabled=i.success,this._registration.providers[e].data=i.data;let o=this._pendingProviderEnables.indexOf(e);return o>=0&&(this._pendingProviderEnables.splice(o,1),0===this._pendingProviderEnables.length&&(this.sendRegistration(),this._callCompletedCallback())),i})}disableProvider(e){return iM(this,void 0,void 0,function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),Error("Console must be initialised before disabling providers");if(!this._registration.providers.hasOwnProperty(e))throw console.debug("Invalid console provider '"+e+"'"),Error("Invalid console provider '"+e+"'");console.debug("Console: disabling provider '"+e+"'");let t=yield this.sendProviderMessage({provider:e,action:"PROVIDER_DISABLE"},!0);return this._registration.providers[e].disabled=!0,this._registration.providers[e].enabled=!1,t})}getProvider(e){return this._registration&&this._registration.providers?this._registration.providers[e]:void 0}sendProviderMessage(e,t){return iM(this,void 0,void 0,function*(){if("storage"!==e.provider&&!this._registration.providers.hasOwnProperty(e.provider))throw console.debug("Invalid console provider '"+e.provider+"'"),Error("Invalid console provider '"+e.provider+"'");if(!t)return void this._doSendProviderMessage(e);let n=e.provider+e.action;if(this._pendingProviderPromises[n])throw Error("Message already pending for provider '"+e.provider+"' with action '"+e.action+"'");let i=new iy,o=()=>{delete this._pendingProviderPromises[n],i.reject("No response from provider")};return this._pendingProviderPromises[n]=[i,window.setTimeout(o,5e3)],this._doSendProviderMessage(e),i.promise})}sendRegistration(e){return this._registrationTimer&&(window.clearTimeout(this._registrationTimer),this._registrationTimer=null),console.debug("Sending registration in: "+(e=void 0!==e?e:2e3)+"ms"),new Promise((e,t)=>{this._registrationTimer=window.setTimeout(()=>{this._registrationTimer=null,console.debug("Console: updating registration");try{this._registration.name||(this._registration.name="Console"),this._registration.platform||(this._registration.platform="N/A"),this._registration.version||(this._registration.version="N/A"),this._registration.providers||(this._registration.providers={}),o9.rest.api.ConsoleResource.register(this._registration).then(t=>{if(200!==t.status)throw Error("Failed to register console");this._registration=t.data,console.debug("Console: registration successful"),console.debug("Console: updating locally stored registration"),window.localStorage.setItem("OpenRemoteConsole:"+this._realm,JSON.stringify(this._registration)),e()})}catch(e){console.error("Failed to register console"),t("Failed to register console")}})})}storeData(e,t){this.sendProviderMessage({provider:"storage",action:"STORE",key:e,value:t},!1)}retrieveData(e){return iM(this,void 0,void 0,function*(){let t=this.sendProviderMessage({provider:"storage",action:"RETRIEVE",key:e},!0);try{let e=yield Promise.race([t,new Promise((e,t)=>setTimeout(t,2e3))]);if(e&&e.value){let t=e.value;return"null"===t?void 0:t}}catch(e){console.log("Failed to retrieve data from storage provider")}})}addProviderMessageListener(e,t){this._providerMessageListeners[e.provider+e.action]=t}removeProviderMessageListener(e){delete this._providerMessageListeners[e.provider+e.action]}_postNativeShellMessage(e){try{if(this.shellAndroid)return window.MobileInterface.postMessage(JSON.stringify(e));if(this.shellApple)return window.webkit.messageHandlers.int.postMessage(e)}catch(e){console.error("Failed to send shell message towards console",e)}}_doSendGenericMessage(e,t){let n={type:e,data:t};this.isMobile?this._postNativeShellMessage(n):console.warn("Failed to send generic message to console.",n)}_doSendProviderMessage(e){if(this.isMobile)this._postNativeShellMessage({type:"provider",data:e});else{if(!e.provider||!e.action)return;switch(e.provider.trim().toUpperCase()){case"PUSH":switch(e.action.trim().toUpperCase()){case"PROVIDER_INIT":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_INIT",provider:"push",version:"web",enabled:!0,disabled:!1,hasPermission:!0,requiresPermission:!1,success:!0}));break;case"PROVIDER_ENABLE":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_ENABLE",provider:"push",hasPermission:!0,success:!0}));break;default:throw Error("Unsupported provider '"+e.provider+"' and action '"+e.action+"'")}break;case"STORAGE":switch(e.action){case"PROVIDER_INIT":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_INIT",provider:"storage",version:"1.0.0",disabled:!1,enabled:!0,hasPermission:!0,requiresPermission:!1,success:!0}));break;case"PROVIDER_ENABLE":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_ENABLE",provider:"storage",hasPermission:!0,success:!0}));break;case"STORE":{let t=e.key?e.key.trim():null;if(!t||0===t.length)throw Error("Storage provider 'store' action requires a `key`");null===e.value?window.localStorage.removeItem(t):window.localStorage.setItem(t,JSON.stringify(e.value))}break;case"RETRIEVE":{let t=e.key?e.key.trim():null;if(!t||0===t.length)throw Error("Storage provider 'retrieve' action requires a `key`");let n=window.localStorage.getItem(t);if(null!==n)try{n=JSON.parse(n)}catch(e){}this._handleProviderResponse(JSON.stringify({action:"RETRIEVE",provider:"storage",key:t,value:n}))}break;default:throw Error("Unsupported provider '"+e.provider+"' and action '"+e.action+"'")}break;default:console.error("Unsupported provider: "+e.provider)}}}_handleProviderResponse(e){if(!e)return;let t=JSON.parse(e),n=t.provider,i=t.action,o=this._pendingProviderPromises[n+i];o&&(window.clearTimeout(o[1]),delete this._pendingProviderPromises[n+i],o[0].resolve(t));let r=this._providerMessageListeners[n+i];r&&r(t)}_callCompletedCallback(){let e=this._enableCompleteCallback;this._enableCompleteCallback=null,e&&window.setTimeout(()=>{e()},0)}static _createConsoleRegistration(){return{name:iA.name,version:iA.version,platform:iA.os.toString(),apps:[],model:((iA.manufacturer?iA.manufacturer+" ":"")+(iA.product?iA.product:"")).trim()}}_initialiseProvider(e){return iM(this,void 0,void 0,function*(){let t;console.debug("Console: initialising provider '"+e+"'");try{t=yield this.sendProviderMessage({provider:e,action:"PROVIDER_INIT"},!0),this._registration.providers[e].version=t.version,this._registration.providers[e].requiresPermission=t.requiresPermission,this._registration.providers[e].hasPermission=t.hasPermission,this._registration.providers[e].success=t.success,this._registration.providers[e].enabled=t.enabled,this._registration.providers[e].disabled=t.disabled,this._registration.providers[e].data=t.data}catch(e){console.error(e),t={action:"",disabled:!1,enabled:!1,hasPermission:!1,provider:"",requiresPermission:!1,version:"",success:!1}}if(t.success||(console.debug("Provider initialisation failed: '"+e+"'"),t.disabled=!0,this._registration.providers[e].disabled=!0),t.disabled||t.enabled){let t=this._pendingProviderEnables.indexOf(e);t>=0&&this._pendingProviderEnables.splice(t,1)}})}}var iD=n(3653),iS=n.n(iD);class iL{constructor(e){this.httpClient=e}createGlobalRuleset(e,t){return this.httpClient.request({method:"POST",url:i0`rules`,data:e,options:t})}getGlobalRulesets(e,t){return this.httpClient.request({method:"GET",url:i0`rules`,queryParams:e,options:t})}createAssetRuleset(e,t){return this.httpClient.request({method:"POST",url:i0`rules/asset`,data:e,options:t})}getAssetRulesets(e,t,n){return this.httpClient.request({method:"GET",url:i0`rules/asset/for/${e}`,queryParams:t,options:n})}deleteAssetRuleset(e,t){return this.httpClient.request({method:"DELETE",url:i0`rules/asset/${e}`,options:t})}getAssetRuleset(e,t){return this.httpClient.request({method:"GET",url:i0`rules/asset/${e}`,options:t})}updateAssetRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:i0`rules/asset/${e}`,data:t,options:n})}getAssetGeofences(e,t){return this.httpClient.request({method:"GET",url:i0`rules/geofences/${e}`,options:t})}getAssetEngineInfo(e,t){return this.httpClient.request({method:"GET",url:i0`rules/info/asset/${e}`,options:t})}getGlobalEngineInfo(e){return this.httpClient.request({method:"GET",url:i0`rules/info/global`,options:e})}getRealmEngineInfo(e,t){return this.httpClient.request({method:"GET",url:i0`rules/info/realm/${e}`,options:t})}createRealmRuleset(e,t){return this.httpClient.request({method:"POST",url:i0`rules/realm`,data:e,options:t})}getRealmRulesets(e,t,n){return this.httpClient.request({method:"GET",url:i0`rules/realm/for/${e}`,queryParams:t,options:n})}deleteRealmRuleset(e,t){return this.httpClient.request({method:"DELETE",url:i0`rules/realm/${e}`,options:t})}getRealmRuleset(e,t){return this.httpClient.request({method:"GET",url:i0`rules/realm/${e}`,options:t})}updateRealmRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:i0`rules/realm/${e}`,data:t,options:n})}deleteGlobalRuleset(e,t){return this.httpClient.request({method:"DELETE",url:i0`rules/${e}`,options:t})}getGlobalRuleset(e,t){return this.httpClient.request({method:"GET",url:i0`rules/${e}`,options:t})}updateGlobalRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:i0`rules/${e}`,data:t,options:n})}}class iI{constructor(e){this.httpClient=e}createProvisioningConfig(e,t){return this.httpClient.request({method:"POST",url:i0`provisioning`,data:e,options:t})}getProvisioningConfigs(e){return this.httpClient.request({method:"GET",url:i0`provisioning`,options:e})}deleteProvisioningConfig(e,t){return this.httpClient.request({method:"DELETE",url:i0`provisioning/${e}`,options:t})}updateProvisioningConfig(e,t,n){return this.httpClient.request({method:"PUT",url:i0`provisioning/${e}`,data:t,options:n})}}class iO{constructor(e){this.httpClient=e}getSettings(e){return this.httpClient.request({method:"GET",url:i0`map`,options:e})}saveSettings(e,t){return this.httpClient.request({method:"PUT",url:i0`map`,data:e,options:t})}deleteMap(e){return this.httpClient.request({method:"DELETE",url:i0`map/deleteMap`,options:e})}getCustomMapInfo(e){return this.httpClient.request({method:"GET",url:i0`map/getCustomMapInfo`,options:e})}getSettingsJs(e){return this.httpClient.request({method:"GET",url:i0`map/js`,options:e})}getTile(e,t,n,i){return this.httpClient.request({method:"GET",url:i0`map/tile/${e}/${t}/${n}`,options:i})}uploadMap(e,t){return this.httpClient.request({method:"POST",url:i0`map/upload`,queryParams:e,options:t})}}class iR{constructor(e){this.httpClient=e}getServices(e,t){return this.httpClient.request({method:"GET",url:i0`service`,queryParams:e,options:t})}registerService(e,t){return this.httpClient.request({method:"POST",url:i0`service`,data:e,options:t})}getGlobalServices(e){return this.httpClient.request({method:"GET",url:i0`service/global`,options:e})}registerGlobalService(e,t){return this.httpClient.request({method:"POST",url:i0`service/global`,data:e,options:t})}deregisterService(e,t,n){return this.httpClient.request({method:"DELETE",url:i0`service/${e}/${t}`,options:n})}getService(e,t,n){return this.httpClient.request({method:"GET",url:i0`service/${e}/${t}`,options:n})}heartbeat(e,t,n){return this.httpClient.request({method:"PUT",url:i0`service/${e}/${t}`,options:n})}}class iY{constructor(e){this.httpClient=e}getNotifications(e,t){return this.httpClient.request({method:"GET",url:i0`notification`,queryParams:e,options:t})}removeNotifications(e,t){return this.httpClient.request({method:"DELETE",url:i0`notification`,queryParams:e,options:t})}sendNotification(e,t){return this.httpClient.request({method:"POST",url:i0`notification/alert`,data:e,options:t})}removeNotification(e,t){return this.httpClient.request({method:"DELETE",url:i0`notification/${e}`,options:t})}notificationAcknowledged(e,t,n,i){return this.httpClient.request({method:"PUT",url:i0`notification/${e}/acknowledged`,queryParams:n,data:t,options:i})}notificationDelivered(e,t,n){return this.httpClient.request({method:"PUT",url:i0`notification/${e}/delivered`,queryParams:t,options:n})}}class iP{constructor(e){this.httpClient=e}getConfig(e){return this.httpClient.request({method:"GET",url:i0`syslog/config`,options:e})}updateConfig(e,t){return this.httpClient.request({method:"PUT",url:i0`syslog/config`,data:e,options:t})}clearEvents(e){return this.httpClient.request({method:"DELETE",url:i0`syslog/event`,options:e})}getEvents(e,t){return this.httpClient.request({method:"GET",url:i0`syslog/event`,queryParams:e,options:t})}}class iN{constructor(e){this.httpClient=e}doProtocolAssetDiscovery(e,t,n){return this.httpClient.request({method:"GET",url:i0`agent/assetDiscovery/${e}`,queryParams:t,options:n})}doProtocolAssetImport(e,t,n,i){return this.httpClient.request({method:"POST",url:i0`agent/assetImport/${e}`,queryParams:n,data:t,options:i})}doProtocolInstanceDiscovery(e,t,n){return this.httpClient.request({method:"GET",url:i0`agent/instanceDiscovery/${e}`,queryParams:t,options:n})}}class iB{constructor(e){this.httpClient=e}getApps(e){return this.httpClient.request({method:"GET",url:i0`apps`,options:e})}getConsoleConfig(e){return this.httpClient.request({method:"GET",url:i0`apps/consoleConfig`,options:e})}getAppInfos(e){return this.httpClient.request({method:"GET",url:i0`apps/info`,options:e})}}class iH{constructor(e){this.httpClient=e}getAllNodeDefinitions(e){return this.httpClient.request({method:"GET",url:i0`flow`,options:e})}getNodeDefinition(e,t){return this.httpClient.request({method:"GET",url:i0`flow/${e}`,options:t})}getAllNodeDefinitionsByType(e,t){return this.httpClient.request({method:"GET",url:i0`flow/${e}`,options:t})}}class iz{constructor(e){this.httpClient=e}updateCurrentUserLocale(e,t){return this.httpClient.request({method:"PUT",url:i0`user/locale`,data:e,options:t})}query(e,t){return this.httpClient.request({method:"POST",url:i0`user/query`,data:e,options:t})}requestPasswordResetCurrent(e){return this.httpClient.request({method:"PUT",url:i0`user/request-password-reset`,options:e})}updatePasswordCurrent(e,t){return this.httpClient.request({method:"PUT",url:i0`user/reset-password`,data:e,options:t})}updateCurrent(e,t){return this.httpClient.request({method:"PUT",url:i0`user/update`,data:e,options:t})}getCurrent(e){return this.httpClient.request({method:"GET",url:i0`user/user`,options:e})}getCurrentUserRealmRoles(e){return this.httpClient.request({method:"GET",url:i0`user/userRealmRoles`,options:e})}getCurrentUserClientRoles(e,t){return this.httpClient.request({method:"GET",url:i0`user/userRoles/${e}`,options:t})}disconnectUserSession(e,t,n){return this.httpClient.request({method:"GET",url:i0`user/${e}/disconnect/${t}`,options:n})}requestPasswordReset(e,t,n){return this.httpClient.request({method:"PUT",url:i0`user/${e}/request-password-reset/${t}`,options:n})}updatePassword(e,t,n,i){return this.httpClient.request({method:"PUT",url:i0`user/${e}/reset-password/${t}`,data:n,options:i})}resetSecret(e,t,n){return this.httpClient.request({method:"GET",url:i0`user/${e}/reset-secret/${t}`,options:n})}updateRoles(e,t,n){return this.httpClient.request({method:"PUT",url:i0`user/${e}/roles`,data:t,options:n})}getUserRealmRoles(e,t,n){return this.httpClient.request({method:"GET",url:i0`user/${e}/userRealmRoles/${t}`,options:n})}updateUserRealmRoles(e,t,n,i){return this.httpClient.request({method:"PUT",url:i0`user/${e}/userRealmRoles/${t}`,data:n,options:i})}getUserClientRoles(e,t,n,i){return this.httpClient.request({method:"GET",url:i0`user/${e}/userRoles/${t}/${n}`,options:i})}updateUserClientRoles(e,t,n,i,o){return this.httpClient.request({method:"PUT",url:i0`user/${e}/userRoles/${t}/${n}`,data:i,options:o})}getUserSessions(e,t,n){return this.httpClient.request({method:"GET",url:i0`user/${e}/userSessions/${t}`,options:n})}create(e,t,n){return this.httpClient.request({method:"POST",url:i0`user/${e}/users`,data:t,options:n})}update(e,t,n){return this.httpClient.request({method:"PUT",url:i0`user/${e}/users`,data:t,options:n})}delete(e,t,n){return this.httpClient.request({method:"DELETE",url:i0`user/${e}/users/${t}`,options:n})}getClientRoles(e,t,n){return this.httpClient.request({method:"GET",url:i0`user/${e}/${t}/roles`,options:n})}updateClientRoles(e,t,n,i){return this.httpClient.request({method:"PUT",url:i0`user/${e}/${t}/roles`,data:n,options:i})}get(e,t,n){return this.httpClient.request({method:"GET",url:i0`user/${e}/${t}`,options:n})}}class ij{constructor(e){this.httpClient=e}startTunnel(e,t){return this.httpClient.request({method:"POST",url:i0`gateway/tunnel`,data:e,options:t})}stopTunnel(e,t){return this.httpClient.request({method:"DELETE",url:i0`gateway/tunnel`,data:e,options:t})}getAllActiveTunnelInfos(e,t){return this.httpClient.request({method:"GET",url:i0`gateway/tunnel/${e}`,options:t})}getGatewayActiveTunnelInfos(e,t,n){return this.httpClient.request({method:"GET",url:i0`gateway/tunnel/${e}/${t}`,options:n})}getActiveTunnelInfo(e,t,n,i,o){return this.httpClient.request({method:"GET",url:i0`gateway/tunnel/${e}/${t}/${n}/${i}`,options:o})}}class iU{constructor(e){this.httpClient=e}getPredictedDatapoints(e,t,n,i){return this.httpClient.request({method:"POST",url:i0`asset/predicted/${e}/${t}`,data:n,options:i})}writePredictedDatapoints(e,t,n,i){return this.httpClient.request({method:"PUT",url:i0`asset/predicted/${e}/${t}`,data:n,options:i})}}class iW{constructor(e){this.httpClient=e}getDatapointExport(e,t){return this.httpClient.request({method:"GET",url:i0`asset/datapoint/export`,queryParams:e,options:t})}getDatapointPeriod(e,t){return this.httpClient.request({method:"GET",url:i0`asset/datapoint/periods`,queryParams:e,options:t})}getDatapoints(e,t,n,i){return this.httpClient.request({method:"POST",url:i0`asset/datapoint/${e}/${t}`,data:n,options:i})}}class iV{constructor(e){this.httpClient=e}getManagerConfig(e){return this.httpClient.request({method:"GET",url:i0`configuration/manager`,options:e})}update(e,t){return this.httpClient.request({method:"PUT",url:i0`configuration/manager`,data:e,options:t})}fileUpload(e,t,n){return this.httpClient.request({method:"POST",url:i0`configuration/manager/file`,queryParams:t,data:e,options:n})}getManagerConfigImage(e,t){return this.httpClient.request({method:"GET",url:i0`configuration/manager/image/${e}`,options:t})}}class iG{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:i0`realm`,data:e,options:t})}getAll(e){return this.httpClient.request({method:"GET",url:i0`realm`,options:e})}getAccessible(e){return this.httpClient.request({method:"GET",url:i0`realm/accessible`,options:e})}delete(e,t){return this.httpClient.request({method:"DELETE",url:i0`realm/${e}`,options:t})}get(e,t){return this.httpClient.request({method:"GET",url:i0`realm/${e}`,options:t})}update(e,t,n){return this.httpClient.request({method:"PUT",url:i0`realm/${e}`,data:t,options:n})}}class i${constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:i0`asset`,data:e,options:t})}delete(e,t){return this.httpClient.request({method:"DELETE",url:i0`asset`,queryParams:e,options:t})}writeAttributeValues(e,t){return this.httpClient.request({method:"PUT",url:i0`asset/attributes`,data:e,options:t})}writeAttributeEvents(e,t){return this.httpClient.request({method:"PUT",url:i0`asset/attributes/timestamp`,data:e,options:t})}updateNoneParent(e,t){return this.httpClient.request({method:"DELETE",url:i0`asset/parent`,queryParams:e,options:t})}getPartial(e,t){return this.httpClient.request({method:"GET",url:i0`asset/partial/${e}`,options:t})}queryAssets(e,t){return this.httpClient.request({method:"POST",url:i0`asset/query`,data:e,options:t})}queryAssetTree(e,t){return this.httpClient.request({method:"POST",url:i0`asset/tree`,data:e,options:t})}getCurrentUserAssets(e){return this.httpClient.request({method:"GET",url:i0`asset/user/current`,options:e})}createUserAssetLinks(e,t){return this.httpClient.request({method:"POST",url:i0`asset/user/link`,data:e,options:t})}getUserAssetLinks(e,t){return this.httpClient.request({method:"GET",url:i0`asset/user/link`,queryParams:e,options:t})}deleteUserAssetLinks(e,t){return this.httpClient.request({method:"POST",url:i0`asset/user/link/delete`,data:e,options:t})}deleteAllUserAssetLinks(e,t,n){return this.httpClient.request({method:"DELETE",url:i0`asset/user/link/${e}/${t}`,options:n})}deleteUserAssetLink(e,t,n,i){return this.httpClient.request({method:"DELETE",url:i0`asset/user/link/${e}/${t}/${n}`,options:i})}get(e,t){return this.httpClient.request({method:"GET",url:i0`asset/${e}`,options:t})}update(e,t,n){return this.httpClient.request({method:"PUT",url:i0`asset/${e}`,data:t,options:n})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName(e,t,n,i){return this.httpClient.request({method:"PUT",url:i0`asset/${e}/attribute/${t}`,data:n,options:i})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName_timestamp(e,t,n,i,o){return this.httpClient.request({method:"PUT",url:i0`asset/${e}/attribute/${t}/${n}`,data:i,options:o})}updateParent(e,t,n){return this.httpClient.request({method:"PUT",url:i0`asset/${e}/child`,queryParams:t,options:n})}}class iq{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:i0`dashboard`,data:e,options:t})}update(e,t){return this.httpClient.request({method:"PUT",url:i0`dashboard`,data:e,options:t})}getAllRealmDashboards(e,t){return this.httpClient.request({method:"GET",url:i0`dashboard/all/${e}`,options:t})}query(e,t){return this.httpClient.request({method:"POST",url:i0`dashboard/query`,data:e,options:t})}delete(e,t,n){return this.httpClient.request({method:"DELETE",url:i0`dashboard/${e}/${t}`,options:n})}get(e,t,n){return this.httpClient.request({method:"GET",url:i0`dashboard/${e}/${t}`,options:n})}}class iX{constructor(e){this.httpClient=e}createAlarm(e,t,n){return this.httpClient.request({method:"POST",url:i0`alarm`,queryParams:t,data:e,options:n})}getAlarms(e,t){return this.httpClient.request({method:"GET",url:i0`alarm`,queryParams:e,options:t})}removeAlarms(e,t){return this.httpClient.request({method:"DELETE",url:i0`alarm`,data:e,options:t})}setAssetLinks(e,t){return this.httpClient.request({method:"PUT",url:i0`alarm/assets`,data:e,options:t})}getAlarm(e,t){return this.httpClient.request({method:"GET",url:i0`alarm/${e}`,options:t})}removeAlarm(e,t){return this.httpClient.request({method:"DELETE",url:i0`alarm/${e}`,options:t})}updateAlarm(e,t,n){return this.httpClient.request({method:"PUT",url:i0`alarm/${e}`,data:t,options:n})}getAssetLinks(e,t,n){return this.httpClient.request({method:"GET",url:i0`alarm/${e}/assets`,queryParams:t,options:n})}}class iK{constructor(e){this.httpClient=e}deleteConnections(e,t){return this.httpClient.request({method:"DELETE",url:i0`gateway/connection`,queryParams:e,options:t})}getConnections(e){return this.httpClient.request({method:"GET",url:i0`gateway/connection`,options:e})}deleteConnection(e,t){return this.httpClient.request({method:"DELETE",url:i0`gateway/connection/${e}`,options:t})}getConnection(e,t){return this.httpClient.request({method:"GET",url:i0`gateway/connection/${e}`,options:t})}setConnection(e,t,n){return this.httpClient.request({method:"PUT",url:i0`gateway/connection/${e}`,data:t,options:n})}getConnectionStatus(e,t){return this.httpClient.request({method:"GET",url:i0`gateway/status/${e}`,options:t})}}class iJ{constructor(e){this.httpClient=e}getAssetDescriptors(e,t){return this.httpClient.request({method:"GET",url:i0`model/assetDescriptors`,queryParams:e,options:t})}getAssetInfo(e,t,n){return this.httpClient.request({method:"GET",url:i0`model/assetInfo/${e}`,queryParams:t,options:n})}getAssetInfos(e,t){return this.httpClient.request({method:"GET",url:i0`model/assetInfos`,queryParams:e,options:t})}getValueDescriptorSchema(e,t){return this.httpClient.request({method:"GET",url:i0`model/getValueDescriptorSchema`,queryParams:e,options:t})}getMetaItemDescriptors(e,t){return this.httpClient.request({method:"GET",url:i0`model/metaItemDescriptors`,queryParams:e,options:t})}getValueDescriptors(e,t){return this.httpClient.request({method:"GET",url:i0`model/valueDescriptors`,queryParams:e,options:t})}}class iZ{constructor(e){this.httpClient=e}register(e,t){return this.httpClient.request({method:"POST",url:i0`console/register`,data:e,options:t})}}class iQ{constructor(e){this.httpClient=e}getHealthStatus(e){return this.httpClient.request({method:"GET",url:i0`health`,options:e})}getInfo(e){return this.httpClient.request({method:"GET",url:i0`info`,options:e})}}function i0(e,...t){let n="";for(let i=0;i<t.length;i++)n+=e[i],n+=encodeURIComponent(t[i]);return n+e[e.length-1]}class i1{constructor(e,t=iS().create()){this._rulesResource=new i5(e,t),this._provisioningResource=new i3(e,t),this._mapResource=new i4(e,t),this._externalServiceResource=new i6(e,t),this._notificationResource=new i8(e,t),this._syslogResource=new i7(e,t),this._agentResource=new i9(e,t),this._appResource=new oe(e,t),this._flowResource=new ot(e,t),this._userResource=new on(e,t),this._gatewayServiceResource=new oi(e,t),this._assetPredictedDatapointResource=new oo(e,t),this._assetDatapointResource=new or(e,t),this._configurationResource=new oa(e,t),this._realmResource=new os(e,t),this._assetResource=new ol(e,t),this._dashboardResource=new oc(e,t),this._alarmResource=new od(e,t),this._gatewayClientResource=new ou(e,t),this._assetModelResource=new om(e,t),this._consoleResource=new of(e,t),this._statusResource=new op(e,t),this._assetResource=new ol(e,t)}get RulesResource(){return this._rulesResource}get ProvisioningResource(){return this._provisioningResource}get MapResource(){return this._mapResource}get ExternalServiceResource(){return this._externalServiceResource}get NotificationResource(){return this._notificationResource}get SyslogResource(){return this._syslogResource}get AgentResource(){return this._agentResource}get AppResource(){return this._appResource}get FlowResource(){return this._flowResource}get UserResource(){return this._userResource}get GatewayServiceResource(){return this._gatewayServiceResource}get AssetPredictedDatapointResource(){return this._assetPredictedDatapointResource}get AssetDatapointResource(){return this._assetDatapointResource}get ConfigurationResource(){return this._configurationResource}get RealmResource(){return this._realmResource}get AssetResource(){return this._assetResource}get DashboardResource(){return this._dashboardResource}get AlarmResource(){return this._alarmResource}get GatewayClientResource(){return this._gatewayClientResource}get AssetModelResource(){return this._assetModelResource}get ConsoleResource(){return this._consoleResource}get StatusResource(){return this._statusResource}}class i2{constructor(e){this.axios=e}request(e){let t={};t.method=e.method,t.url=e.url,t.params=e.queryParams,t.data=e.data,function(e,t){if(void 0!=t)for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}(t,e.options);let n=e.copyFn;return this.axios.request(t).then(e=>(n&&e.data&&(e.originalData=e.data,e.data=n(e.data)),e))}}class i5 extends iL{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class i3 extends iI{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class i4 extends iO{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class i6 extends iR{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class i8 extends iY{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class i7 extends iP{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class i9 extends iN{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class oe extends iB{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class ot extends iH{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class on extends iz{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class oi extends ij{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class oo extends iU{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class or extends iW{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class oa extends iV{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class os extends iG{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class ol extends i${constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class oc extends iq{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class od extends iX{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class ou extends iK{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class om extends iJ{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class of extends iZ{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class op extends iQ{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}let oh=iS().isAxiosError,ob=new class{get api(){return this._client}constructor(){this._axiosInstance=iS().create(),this._axiosInstance.defaults.headers.common["Content-Type"]="application/json",this._axiosInstance.interceptors.request.use(e=>(e.paramsSerializer=e=>ib().stringify(e,{arrayFormat:"repeat"}),e))}get axiosInstance(){return this._axiosInstance}get baseUrl(){return this._baseUrl}setTimeout(e){this._axiosInstance.defaults.timeout=e}addRequestInterceptor(e){this._axiosInstance.interceptors.request.use(e)}initialise(e){this._baseUrl=e,this._client=new i1(e,this._axiosInstance)}};var og=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})};!function(e){e.DISCONNECTED="DISCONNECTED",e.CONNECTED="CONNECTED",e.CONNECTING="CONNECTING"}(ef||(ef={}));let o_="SUBSCRIBED:",oy="UNAUTHORIZED:",ov="TRIGGERED:",oF="EVENT:";class ox{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=ow.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=ef.DISCONNECTED,this._connectingDeferred=null,this._statusCallbacks=[],this._pendingSubscription=null,this._queuedSubscriptions=[],this._subscriptionMap=new Map,this._assetEventCallbackMap=new Map,this._attributeEventCallbackMap=new Map,this._unloading=!1}get status(){return this._status}subscribeStatusChange(e){this._statusCallbacks.push(e)}unsubscribeStatusChange(e){!function(e,t){if(0===e.length)return;let n=e.indexOf(t);n>=0&&e.splice(n,1)}(this._statusCallbacks,e)}connect(){return(this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this._status===ef.CONNECTED)?Promise.resolve(!0):(this._disconnectRequested=!1,this._connectingDeferred||(this._onStatusChanged(ef.CONNECTING),this._connectingDeferred=new iy,this._doConnect().then(e=>{if(this._connectingDeferred){let t=this._connectingDeferred;this._connectingDeferred=null,e?(console.debug("Connected to event service: "+this.endpointUrl),this._reconnectDelayMillis=ow.MIN_RECONNECT_DELAY,this._onStatusChanged(ef.CONNECTED),window.setTimeout(()=>{this._onConnect()},0)):(console.debug("Failed to connect to event service: "+this.endpointUrl),this._scheduleReconnect()),t.resolve(e)}})),this._connectingDeferred.promise)}disconnect(){console.debug("Disconnecting from event service: "+this.endpointUrl),this._disconnectRequested||(this._disconnectRequested=!0,this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this.status!==ef.DISCONNECTED&&this._doDisconnect())}subscribe(e,t){let n={eventSubscription:e,callback:t,deferred:new iy};return null!=this._pendingSubscription||this._status!==ef.CONNECTED?(this._queuedSubscriptions.push(n),n.deferred.promise):(this._pendingSubscription=n,this._doSubscribe(e).then(e=>{if(this._pendingSubscription){let t=this._pendingSubscription;this._pendingSubscription=null,this._subscriptionMap.set(e,t),this._processNextSubscription();let n=t.deferred;t.deferred=null,n&&n.resolve(e)}},e=>{if(this._pendingSubscription){let t=this._pendingSubscription;this._pendingSubscription=null,this._processNextSubscription();let n=t.deferred;t.deferred=null,n&&n.reject(e)}}),this._pendingSubscription.deferred.promise)}unsubscribe(e){return og(this,void 0,void 0,function*(){if(this._subscriptionMap.delete(e))return void this._doUnsubscribe(e);if(this._assetEventCallbackMap.delete(e)){if(this._assetEventPromise&&0===this._assetEventCallbackMap.size){let e=yield this._assetEventPromise;this._assetEventPromise=void 0,this.unsubscribe(e)}return}if(this._attributeEventCallbackMap.delete(e)){if(this._attributeEventPromise&&0===this._attributeEventCallbackMap.size){let e=yield this._attributeEventPromise;this._attributeEventPromise=void 0,this.unsubscribe(e)}return}})}sendEvent(e){this._status===ef.CONNECTED&&this._doSend(e)}sendEventWithReply(e){return this._status!==ef.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(e)}subscribeAssetEvents(e,t,n){return og(this,void 0,void 0,function*(){let i=e&&"string"!=typeof e[0]?e.map(e=>e.id):e,o="AssetEvent"+ox._subscriptionCounter++;if(!this._assetEventPromise){let e;o9.authenticated||(e={filterType:"asset",realm:o9.displayRealm});let t={eventType:"asset",filter:e};this._assetEventPromise=this.subscribe(t,e=>{this._assetEventCallbackMap.forEach(t=>t(e))})}return this._assetEventCallbackMap.set(o,e=>{let t=e.asset.id;i?i.find(e=>t===e)&&n(e):e.asset.realm===o9.displayRealm&&n(e)}),this._assetEventPromise.then(()=>{try{if(i&&t){let e={messageID:"read-assets:"+i.join(",")+":"+o,eventType:"read-assets",assetQuery:{ids:i}};this.sendEventWithReply(e).then(e=>{e.assets&&this._assetEventCallbackMap.has(o)&&e.assets.forEach(e=>{n({eventType:"asset",asset:e,cause:"READ"})})})}}catch(t){throw console.error("Failed to subscribe to asset events for assets: "+e),o&&this.unsubscribe(o),t}return o})})}subscribeAttributeEvents(e,t,n){return og(this,void 0,void 0,function*(){let i=e&&"string"!=typeof e[0],o=i?e.map(e=>e.id):e,r=i?e:void 0,a="AttributeEvent"+ox._subscriptionCounter++;if(!this._attributeEventPromise){let e;o9.authenticated||(e={filterType:"asset",realm:o9.displayRealm});let t={eventType:"attribute",filter:e};this._attributeEventPromise=this.subscribe(t,e=>{this._attributeEventCallbackMap.forEach(t=>t(e))})}let s=t=>{let r=t.ref;i?e.forEach(e=>{r.id===e.id&&r.name===e.name&&n(t)}):o?o.find(e=>r.id===e)&&n(t):t.realm===o9.displayRealm&&n(t)};return this._attributeEventCallbackMap.set(a,s),this._attributeEventPromise.then(()=>{try{if(t&&o){let e={messageID:"read-assets:"+o.join(",")+":"+a,eventType:"read-assets",assetQuery:{ids:o}};this.sendEventWithReply(e).then(e=>{e.assets&&this._attributeEventCallbackMap.has(a)&&e.assets.forEach(e=>{e.attributes&&Object.entries(e.attributes).forEach(([t,n])=>{(!r||r.find(n=>n.id===e.id&&n.name===t))&&s({eventType:"attribute",timestamp:n.timestamp,value:n.value,ref:{id:e.id,name:t}})})})})}}catch(t){throw console.error("Failed to subscribe to asset events for assets: "+e),a&&this.unsubscribe(a),t}return a})})}_processNextSubscription(){this._status===ef.CONNECTED&&0!==this._queuedSubscriptions.length&&setTimeout(()=>{let e=this._queuedSubscriptions.shift();e&&this.subscribe(e.eventSubscription,e.callback).then(t=>{let n=e.deferred;e.deferred=null,n&&n.resolve(t)},t=>{let n=e.deferred;e.deferred=null,n&&n.reject(t)})},0)}_onStatusChanged(e){e!==this._status&&(console.debug("Event provider status changed: "+e),this._status=e,this._unloading||window.setTimeout(()=>{this._statusCallbacks.forEach(t=>t(e))},0))}_onMessageReceived(e,t){let n=this._subscriptionMap.get(e);n&&n.callback(t)}_onConnect(){if(Object.keys(this._subscriptionMap).length>0){for(let e in this._subscriptionMap)this._subscriptionMap.has(e)&&this._queuedSubscriptions.unshift(this._subscriptionMap.get(e));this._subscriptionMap.clear()}this._processNextSubscription()}_onDisconnect(){this._status===ef.CONNECTED&&this._onStatusChanged(ef.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(ef.CONNECTING),this._scheduleReconnect()}_scheduleReconnect(){this._reconnectTimer||!this._disconnectRequested&&(console.debug("Event provider scheduling reconnect in "+this._reconnectDelayMillis+"ms"),this._reconnectTimer=window.setTimeout(()=>{this._disconnectRequested||this.connect()},this._reconnectDelayMillis),this._reconnectDelayMillis<ow.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(ow.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}ox.MIN_RECONNECT_DELAY=0,ox.MAX_RECONNECT_DELAY=3e4,ox._subscriptionCounter=0;class ow extends ox{get endpointUrl(){return this._endpointUrl}constructor(e){super(),this._webSocket=void 0,this._connectDeferred=null,this._subscribeDeferred=null,this._repliesDeferred=new Map,this._endpointUrl=(e.startsWith("https:")?"wss":"ws")+"://"+e.substr(e.indexOf("://")+3)+"/websocket/events",window.addEventListener("beforeunload",()=>{this._unloading=!0,this.disconnect()})}_doConnect(){let e=this._endpointUrl+"?Realm="+o9.config.realm;return o9.authenticated&&(e+="&Authorization="+o9.getAuthorizationHeader()),this._webSocket=new WebSocket(e),this._connectDeferred=new iy,this._webSocket.onopen=()=>{if(this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.resolve(!0)}},this._webSocket.onerror=e=>{if(this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.resolve(!1)}else console.debug("Event provider error"),this._beforeDisconnect()},this._webSocket.onclose=()=>{if(this._webSocket=void 0,this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.resolve(!1)}else this._beforeDisconnect()},this._webSocket.onmessage=e=>{let t=e.data;if(t&&t.startsWith(o_)){let e=JSON.parse(t.substring(o_.length)),n=this._subscribeDeferred;this._subscribeDeferred=null,n&&n.resolve(e.subscriptionId)}else if(t.startsWith(oy)){let e=JSON.parse(t.substring(oy.length)),n=this._subscribeDeferred;this._subscribeDeferred=null,n&&(console.warn("Unauthorized event subscription: "+JSON.stringify(e,null,2)),n.reject("Unauthorized"))}else if(t.startsWith(ov)){let e=JSON.parse(t.substring(ov.length));e.events&&e.events.forEach(t=>{this._onMessageReceived(e.subscriptionId,t)})}else if(t.startsWith(oF)){let e=JSON.parse(t.substring(oF.length));if(e.messageID){let t=this._repliesDeferred.get(e.messageID);this._repliesDeferred.delete(e.messageID),t&&t.resolve(e)}}},this._connectDeferred.promise}_beforeDisconnect(){this._onDisconnect()}_doDisconnect(){var e;null==(e=this._webSocket)||e.close(),this._subscribeDeferred=null,this._repliesDeferred.clear()}_doSubscribe(e){return this._webSocket?this._subscribeDeferred?Promise.reject("There's already a pending subscription"):(this._subscribeDeferred=new iy,e.subscriptionId||(e.subscriptionId=ow._subscriptionCounter+++""),this._webSocket.send("SUBSCRIBE:"+JSON.stringify(e)),this._subscribeDeferred.promise):Promise.reject("Not connected")}_doUnsubscribe(e){this._webSocket&&this._webSocket.send("UNSUBSCRIBE:"+JSON.stringify({subscriptionId:e}))}_doSend(e){let t=oF+JSON.stringify(e);this._webSocket.send(t)}_doSendWithReply(e){if(e.messageID||(e.messageID=(new Date().getTime()+10*Math.random()).toString(10)),this._repliesDeferred.has(e.messageID))return Promise.reject("There's already a pending send and reply with this ID");let t=new iy;return this._repliesDeferred.set(e.messageID,t),this._webSocket.send(oF+JSON.stringify(e)),t.promise}}function ok(e){return(ok="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}ow._subscriptionCounter=1;var oE=[],oT=oE.forEach,oM=oE.slice;function oA(e){return oT.call(oM.call(arguments,1),function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e}function oC(){return"function"==typeof XMLHttpRequest||("undefined"==typeof XMLHttpRequest?"undefined":ok(XMLHttpRequest))==="object"}var oD=n(6850),oS=n.t(oD,2);function oL(e){return(oL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"function"==typeof fetch&&(ep="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),oC()&&("undefined"!=typeof global&&global.XMLHttpRequest?eh=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(eh=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?eb=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(eb=window.ActiveXObject)),ep||!oS||eh||eb||(ep=oD||oS),"function"!=typeof ep&&(ep=void 0);var oI=function(e,t){if(t&&"object"===oL(t)){var n="";for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},oO=function(e,t,n){ep(e,t).then(function(e){if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then(function(t){n(null,{status:e.status,data:t})}).catch(n)}).catch(n)},oR=!1,oY=function(e,t,n,i){e.queryStringParams&&(t=oI(t,e.queryStringParams));var o=oA({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);n&&(o["Content-Type"]="application/json");var r="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,a=oA({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o},oR?{}:r);try{oO(t,a,i)}catch(e){if(!r||0===Object.keys(r).length||!e.message||0>e.message.indexOf("not implemented"))return i(e);try{Object.keys(r).forEach(function(e){delete a[e]}),oO(t,a,i),oR=!0}catch(e){i(e)}}},oP=function(e,t,n,i){n&&"object"===oL(n)&&(n=oI("",n).slice(1)),e.queryStringParams&&(t=oI(t,e.queryStringParams));try{(o=eh?new eh:new eb("MSXML2.XMLHTTP.3.0")).open(n?"POST":"GET",t,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,n&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var o,r=e.customHeaders;if(r="function"==typeof r?r():r)for(var a in r)o.setRequestHeader(a,r[a]);o.onreadystatechange=function(){o.readyState>3&&i(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(n)}catch(e){console&&console.log(e)}};let oN=function(e,t,n,i){return("function"==typeof n&&(i=n,n=void 0),i=i||function(){},ep)?oY(e,t,n,i):oC()||"function"==typeof ActiveXObject?oP(e,t,n,i):void i(Error("No fetch and no xhr implementation found!"))};var oB=function(){var e;function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.services=e,this.options=n,this.allOptions=i,this.type="backend",this.init(e,n,i)}return e=[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=oA(n,this.options||{},{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){var i,o;return i={},o=n||"",t in i?Object.defineProperty(i,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[t]=o,i},request:oN,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}),this.allOptions=i,this.services&&this.options.reloadInterval&&setInterval(function(){return t.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(e,t,n){this._readAny(e,e,t,t,n)}},{key:"read",value:function(e,t,n){this._readAny([e],e,[t],t,n)}},{key:"_readAny",value:function(e,t,n,i,o){var r,a,s=this,l=this.options.loadPath;"function"==typeof this.options.loadPath&&(l=this.options.loadPath(e,n)),(l=(a=r=l)&&"function"==typeof a.then?r:Promise.resolve(r)).then(function(r){if(!r)return o(null,{});var a=s.services.interpolator.interpolate(r,{lng:e.join("+"),ns:n.join("+")});s.loadUrl(a,o,t,i)})}},{key:"loadUrl",value:function(e,t,n,i){var o=this;this.options.request(this.options,e,void 0,function(r,a){var s,l;if(a&&(a.status>=500&&a.status<600||!a.status))return t("failed loading "+e+"; status code: "+a.status,!0);if(a&&a.status>=400&&a.status<500)return t("failed loading "+e+"; status code: "+a.status,!1);if(!a&&r&&r.message&&r.message.indexOf("Failed to fetch")>-1)return t("failed loading "+e+": "+r.message,!0);if(r)return t(r,!1);try{s="string"==typeof a.data?o.options.parse(a.data,n,i):a.data}catch(t){l="failed parsing "+e+" to json"}if(l)return t(l,!1);t(null,s)})}},{key:"create",value:function(e,t,n,i,o){var r=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var a=this.options.parsePayload(t,n,i),s=0,l=[],c=[];e.forEach(function(n){var i=r.options.addPath;"function"==typeof r.options.addPath&&(i=r.options.addPath(n,t));var d=r.services.interpolator.interpolate(i,{lng:n,ns:t});r.options.request(r.options,d,a,function(t,n){s+=1,l.push(t),c.push(n),s===e.length&&o&&o(l,c)})})}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,i=t.languageUtils,o=t.logger,r=n.language;if(!r||"cimode"!==r.toLowerCase()){var a=[],s=function(e){i.toResolveHierarchy(e).forEach(function(e){0>a.indexOf(e)&&a.push(e)})};s(r),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return s(e)}),a.forEach(function(t){e.allOptions.ns.forEach(function(e){n.read(t,e,"read",null,null,function(i,r){i&&o.warn("loading namespace ".concat(e," for language ").concat(t," failed"),i),!i&&r&&o.log("loaded namespace ".concat(e," for language ").concat(t),r),n.loaded("".concat(t,"|").concat(e),i,r)})})})}}}],function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}();oB.type="backend";let oH={ATTRIBUTE:1,CHILD:2},oz=e=>(...t)=>({_$litDirective$:e,values:t});class oj{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}class oU extends oj{constructor(e){if(super(e),this.it=tZ,e.type!==oH.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===tZ||null==e)return this._t=void 0,this.it=e;if(e===tJ)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}oU.directiveName="unsafeHTML",oU.resultType=1,oz(oU);class oW extends oU{}oW.directiveName="unsafeSVG",oW.resultType=2;let oV=oz(oW),oG={size:24,icons:{logo:'<path style=\'pointer-events: var(--or-icon-pointer-events, none);\' fill="#C4D600" d="m11.96125,23.85096c-6.56773,0 -11.90971,-5.34202 -11.90971,-11.90862l2.49411,0c0,5.19176 4.22389,9.41568 9.41561,9.41568c5.19053,0 9.41561,-4.22392 9.41561,-9.41568c0,-5.19176 -4.22389,-9.41568 -9.41561,-9.41568l0,-2.49413c6.56655,0 11.90971,5.34439 11.90971,11.9098c0,6.5666 -5.34316,11.90862 -11.90971,11.90862l0,0z" /><path fill="#4E9D2D" d="m10.25094,20.38647c-2.26848,-0.47231 -4.21822,-1.80199 -5.48741,-3.74009s-1.70892,-4.25777 -1.23545,-6.52625c0.47347,-2.26965 1.80315,-4.21822 3.74242,-5.48857c1.93926,-1.27035 4.25661,-1.70892 6.52625,-1.23545c4.68471,0.97719 7.70121,5.5828 6.72286,10.26635l-2.39994,-0.49907c0.70149,-3.36085 -1.4623,-6.66585 -4.82431,-7.36734c-1.62866,-0.33969 -3.29105,-0.02559 -4.68238,0.88645c-1.39134,0.91088 -2.34526,2.3092 -2.68495,3.93786c-0.33853,1.62633 -0.02443,3.28988 0.88645,4.68122c0.91088,1.39134 2.3092,2.34526 3.93786,2.68379l-0.50139,2.4011l0,0z"/><path fill="#1D5632"d="m12.03064,17.49616c-0.09524,0 -0.19048,-0.00116 -0.28457,-0.00465c-1.49833,-0.0755 -2.87818,-0.72942 -3.88636,-1.84097c-1.00818,-1.11271 -1.52156,-2.54948 -1.44722,-4.05013l2.44378,0.12196c-0.04181,0.84557 0.24856,1.65745 0.81769,2.28466c0.56681,0.62721 1.34733,0.99656 2.1929,1.03838c0.84208,0.03833 1.65629,-0.2474 2.2835,-0.81653c0.62837,-0.56797 0.99656,-1.34617 1.03954,-2.19174c0.08711,-1.74573 -1.26371,-3.23708 -3.00943,-3.3242l0.12196,-2.44378c3.09422,0.15332 5.4869,2.79455 5.33358,5.88877c-0.07434,1.49949 -0.72942,2.87818 -1.84097,3.8852c-1.04186,0.94313 -2.36945,1.45303 -3.7644,1.45303l0,0z"/>',"logo-plain":"m11.9925,23.91349c-6.58498,0 -11.94099,-5.35605 -11.94099,-11.9399l2.50066,0c0,5.20539 4.23498,9.44041 9.44033,9.44041c5.20416,0 9.44033,-4.23502 9.44033,-9.44041c0,-5.20539 -4.23498,-9.44041 -9.44033,-9.44041l0,-2.50068c6.5838,0 11.94099,5.35842 11.94099,11.94108c0,6.58385 -5.35719,11.9399 -11.94099,11.9399l0,0zm-1.80787,-3.27769c-2.31323,-0.48163 -4.30141,-1.83755 -5.59563,-3.81389s-1.74263,-4.34178 -1.25982,-6.65502c0.48281,-2.31443 1.83872,-4.30145 3.81623,-5.59686c1.97751,-1.29542 4.34056,-1.74264 6.65497,-1.25983c4.77711,0.99647 7.8531,5.69295 6.85545,10.46891l-2.44727,-0.50891c0.71532,-3.42716 -1.49114,-6.79738 -4.91946,-7.5127c-1.66078,-0.34639 -3.35596,-0.0261 -4.77474,0.90394c-1.41878,0.92886 -2.39152,2.35476 -2.73791,4.01555c-0.3452,1.65842 -0.02491,3.3548 0.90394,4.77359c0.92885,1.41879 2.35475,2.39154 4.01552,2.73675l-0.51128,2.44848l0,0zm1.81499,-2.92536c-0.09727,0 -0.19455,-0.00119 -0.29064,-0.00475c-1.53029,-0.07711 -2.93958,-0.74498 -3.96926,-1.88025c-1.02968,-1.13646 -1.55401,-2.60388 -1.47809,-4.13655l2.49591,0.12456c-0.04271,0.86361 0.25386,1.69282 0.83513,2.33341c0.5789,0.64059 1.37607,1.01783 2.23968,1.06053c0.86005,0.03915 1.69162,-0.25268 2.33221,-0.83395c0.64177,-0.58009 1.01782,-1.3749 1.06171,-2.23851c0.08897,-1.78298 -1.29066,-3.30616 -3.07362,-3.39513l0.12456,-2.49593c3.16022,0.15659 5.60394,2.85419 5.44735,6.01443c-0.07592,1.53149 -0.74498,2.9396 -1.88024,3.9681c-1.06408,0.96326 -2.41999,1.48403 -3.8447,1.48403l0,0z",marker:'<ellipse fill="#000" opacity="0.2" ry="1.5" rx="4" cy="22.5" cx="12" /><path style=\'pointer-events: var(--or-icon-pointer-events, none);\' d="m11.999999,0a8.437501,8.344057 0 0 1 8.437501,8.344057c0,6.500779 -5.798864,6.280799 -8.437501,14.412461c-2.638637,-8.131662 -8.437501,-7.911683 -8.437501,-14.412461a8.437501,8.344057 0 0 1 8.437501,-8.344057z" />'}};var o$=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let oq=n(7319);class oX extends CustomEvent{constructor(){super(oX.NAME,{bubbles:!0,composed:!0})}}oX.NAME="or-iconset-added";let oK=new class{constructor(){this._icons={}}addIconSet(e,t){this._icons[e]=t,this._defaultIconSet||(this._defaultIconSet=t),t.onAdd&&t.onAdd(),window.dispatchEvent(new oX)}getIconSet(e){return this._icons[e]}getIconTemplate(e){if(!e)return tK``;let t=(e||"").split(":"),n=t.pop(),i=t.pop(),o=this._defaultIconSet;return(i&&(o=this.getIconSet(i)),n&&o)?o.getIconTemplate(n):tK``}},oJ=class extends nr{constructor(){super(...arguments),this._handler=e=>{this._updateIcon()}}static get styles(){return[tf`
|
|
12
|
+
`,iu([nc({type:String})],im.prototype,"value",void 0),iu([nc({type:Object})],im.prototype,"options",void 0),im=iu([ns("or-translate")],im),function(e){e.CREATE="CREATE",e.UPDATE="UPDATE",e.DELETE="DELETE"}(e||(e={})),function(e){e.LOW="LOW",e.MEDIUM="MEDIUM",e.HIGH="HIGH"}(t||(t={})),function(e){e.MANUAL="MANUAL",e.CLIENT="CLIENT",e.GLOBAL_RULESET="GLOBAL_RULESET",e.REALM_RULESET="REALM_RULESET",e.ASSET_RULESET="ASSET_RULESET",e.AGENT="AGENT"}(o||(o={})),function(e){e.OPEN="OPEN",e.ACKNOWLEDGED="ACKNOWLEDGED",e.IN_PROGRESS="IN_PROGRESS",e.RESOLVED="RESOLVED",e.CLOSED="CLOSED"}(r||(r={})),function(e){e.BOTTOM_LEFT="BOTTOM_LEFT",e.BOTTOM_RIGHT="BOTTOM_RIGHT",e.TOP_LEFT="TOP_LEFT",e.TOP_RIGHT="TOP_RIGHT"}(a||(a={})),function(e){e.CREATE="CREATE",e.READ="READ",e.UPDATE="UPDATE",e.DELETE="DELETE"}(s||(s={})),function(e){e.NONE="NONE",e.FORECAST="FORECAST",e.SETPOINT="SETPOINT"}(l||(l={})),function(e){e.DISCONNECTED="DISCONNECTED",e.CONNECTING="CONNECTING",e.DISCONNECTING="DISCONNECTING",e.CONNECTED="CONNECTED",e.DISABLED="DISABLED",e.WAITING="WAITING",e.ERROR="ERROR",e.STOPPED="STOPPED"}(c||(c={})),function(e){e.EV="EV",e.PHEV="PHEV"}(d||(d={})),function(e){e.YAZAKI="YAZAKI",e.MENNEKES="MENNEKES",e.LE_GRAND="LE_GRAND",e.CHADEMO="CHADEMO",e.COMBO="COMBO",e.SCHUKO="SCHUKO",e.ENERGYLOCK="ENERGYLOCK"}(u||(u={})),function(e){e.SOUTH="SOUTH",e.EAST_WEST="EAST_WEST"}(m||(m={})),function(e){e.REQUEST_START="REQUEST_START",e.REQUEST_REPEATING="REQUEST_REPEATING",e.REQUEST_CANCEL="REQUEST_CANCEL",e.READY="READY",e.COMPLETED="COMPLETED",e.RUNNING="RUNNING",e.CANCELLED="CANCELLED"}(f||(f={})),function(e){e.TOGGLE="TOGGLE",e.INCREMENT="INCREMENT",e.DECREMENT="DECREMENT",e.NEGATE="NEGATE"}(p||(p={})),function(e){e.ASSET_NOT_FOUND="ASSET_NOT_FOUND",e.ATTRIBUTE_NOT_FOUND="ATTRIBUTE_NOT_FOUND",e.INSUFFICIENT_ACCESS="INSUFFICIENT_ACCESS",e.INVALID_VALUE="INVALID_VALUE",e.INTERCEPTOR_FAILURE="INTERCEPTOR_FAILURE",e.STATE_STORAGE_FAILED="STATE_STORAGE_FAILED",e.CANNOT_PROCESS="CANNOT_PROCESS",e.QUEUE_FULL="QUEUE_FULL",e.UNKNOWN="UNKNOWN",e.ASSET_ID_MISSING="ASSET_ID_MISSING",e.ATTRIBUTE_NAME_MISSING="ATTRIBUTE_NAME_MISSING"}(h||(h={})),function(e){e.PUBLIC="PUBLIC",e.SHARED="SHARED",e.PRIVATE="PRIVATE"}(b||(b={})),function(e){e.OFF="OFF",e.ONE_MIN="ONE_MIN",e.FIVE_MIN="FIVE_MIN",e.QUARTER="QUARTER",e.ONE_HOUR="ONE_HOUR"}(g||(g={})),function(e){e.WRAP_TO_SINGLE_COLUMN="WRAP_TO_SINGLE_COLUMN",e.KEEP_LAYOUT="KEEP_LAYOUT",e.REDIRECT="REDIRECT",e.BLOCK_DEVICE="BLOCK_DEVICE"}(_||(_={})),function(e){e.MINUTE="MINUTE",e.HOUR="HOUR",e.DAY="DAY",e.WEEK="WEEK",e.MONTH="MONTH",e.YEAR="YEAR"}(y||(y={})),function(e){e.MIN="MIN",e.AVG="AVG",e.MAX="MAX",e.DIFFERENCE="DIFFERENCE",e.COUNT="COUNT",e.SUM="SUM",e.MODE="MODE",e.MEDIAN="MEDIAN"}(v||(v={})),function(e){e.TERMINATING="TERMINATING",e.DISABLED="DISABLED",e.ALREADY_CONNECTED="ALREADY_CONNECTED",e.UNRECOGNISED="UNRECOGNISED",e.PERMANENT_ERROR="PERMANENT_ERROR",e.SYNC_ERROR="SYNC_ERROR"}(F||(F={})),function(e){e.HTTPS="HTTPS",e.HTTP="HTTP",e.TCP="TCP"}(x||(x={})),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.OPTIONS="OPTIONS",e.PATCH="PATCH"}(w||(w={})),function(e){e.KEYCLOAK="KEYCLOAK",e.BASIC="BASIC",e.NONE="NONE"}(k||(k={})),function(e){e.WEBSOCKET="WEBSOCKET",e.POLLING="POLLING"}(E||(E={})),function(e){e.VECTOR="VECTOR",e.RASTER="RASTER"}(T||(T={})),function(e){e.INTERNAL="INTERNAL",e.CLIENT="CLIENT",e.GLOBAL_RULESET="GLOBAL_RULESET",e.REALM_RULESET="REALM_RULESET",e.ASSET_RULESET="ASSET_RULESET"}(M||(M={})),function(e){e.REALM="REALM",e.USER="USER",e.ASSET="ASSET",e.CUSTOM="CUSTOM"}(A||(A={})),function(e){e.NORMAL="NORMAL",e.HIGH="HIGH"}(C||(C={})),function(e){e.DEVICE="DEVICE",e.TOPIC="TOPIC",e.CONDITION="CONDITION"}(D||(D={})),function(e){e.ALWAYS="ALWAYS",e.ONCE="ONCE",e.HOURLY="HOURLY",e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY",e.ANNUALLY="ANNUALLY"}(S||(S={})),function(e){e.MESSAGE_INVALID="MESSAGE_INVALID",e.CERTIFICATE_INVALID="CERTIFICATE_INVALID",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.UNIQUE_ID_MISMATCH="UNIQUE_ID_MISMATCH",e.CONFIG_DISABLED="CONFIG_DISABLED",e.USER_DISABLED="USER_DISABLED",e.SERVER_ERROR="SERVER_ERROR",e.ASSET_ERROR="ASSET_ERROR",e.SERVER_BUSY="SERVER_BUSY"}(L||(L={})),function(e){e.PRIVATE="PRIVATE",e.PROTECTED="PROTECTED",e.PUBLIC="PUBLIC"}(I||(I={})),function(e){e.EXACT="EXACT",e.BEGIN="BEGIN",e.END="END",e.CONTAINS="CONTAINS"}(O||(O={})),function(e){e.EQUALS="EQUALS",e.GREATER_THAN="GREATER_THAN",e.GREATER_EQUALS="GREATER_EQUALS",e.LESS_THAN="LESS_THAN",e.LESS_EQUALS="LESS_EQUALS",e.BETWEEN="BETWEEN"}(R||(R={})),function(e){e.CREATED_ON="CREATED_ON",e.NAME="NAME",e.ASSET_TYPE="ASSET_TYPE",e.PARENT_ID="PARENT_ID",e.REALM="REALM"}(Y||(Y={})),function(e){e.RESTRICTED="RESTRICTED",e.LINKED="LINKED",e.REALM="REALM"}(P||(P={})),function(e){e.AT_LEAST_ONE="AT_LEAST_ONE",e.ALL="ALL",e.NONE="NONE"}(N||(N={})),function(e){e.AND="AND",e.OR="OR"}(B||(B={})),function(e){e.CREATED_ON="CREATED_ON",e.FIRST_NAME="FIRST_NAME",e.LAST_NAME="LAST_NAME",e.USERNAME="USERNAME",e.EMAIL="EMAIL"}(H||(H={})),function(e){e.STOPPED="STOPPED",e.RUNNING="RUNNING",e.ERROR="ERROR"}(z||(z={})),function(e){e.JAVASCRIPT="JAVASCRIPT",e.GROOVY="GROOVY",e.JSON="JSON",e.FLOW="FLOW"}(j||(j={})),function(e){e.READY="READY",e.DEPLOYED="DEPLOYED",e.COMPILATION_ERROR="COMPILATION_ERROR",e.VALIDITY_PERIOD_ERROR="VALIDITY_PERIOD_ERROR",e.EXECUTION_ERROR="EXECUTION_ERROR",e.LOOP_ERROR="LOOP_ERROR",e.DISABLED="DISABLED",e.PAUSED="PAUSED",e.EXPIRED="EXPIRED",e.REMOVED="REMOVED",e.EMPTY="EMPTY"}(U||(U={})),function(e){e.SUNRISE="SUNRISE",e.SUNSET="SUNSET",e.TWILIGHT_MORNING_VISUAL="TWILIGHT_MORNING_VISUAL",e.TWILIGHT_MORNING_VISUAL_LOWER="TWILIGHT_MORNING_VISUAL_LOWER",e.TWILIGHT_MORNING_HORIZON="TWILIGHT_MORNING_HORIZON",e.TWILIGHT_MORNING_CIVIL="TWILIGHT_MORNING_CIVIL",e.TWILIGHT_MORNING_NAUTICAL="TWILIGHT_MORNING_NAUTICAL",e.TWILIGHT_MORNING_ASTRONOMICAL="TWILIGHT_MORNING_ASTRONOMICAL",e.TWILIGHT_MORNING_GOLDEN_HOUR="TWILIGHT_MORNING_GOLDEN_HOUR",e.TWILIGHT_MORNING_BLUE_HOUR="TWILIGHT_MORNING_BLUE_HOUR",e.TWILIGHT_MORNING_NIGHT_HOUR="TWILIGHT_MORNING_NIGHT_HOUR",e.TWILIGHT_EVENING_VISUAL="TWILIGHT_EVENING_VISUAL",e.TWILIGHT_EVENING_VISUAL_LOWER="TWILIGHT_EVENING_VISUAL_LOWER",e.TWILIGHT_EVENING_HORIZON="TWILIGHT_EVENING_HORIZON",e.TWILIGHT_EVENING_CIVIL="TWILIGHT_EVENING_CIVIL",e.TWILIGHT_EVENING_NAUTICAL="TWILIGHT_EVENING_NAUTICAL",e.TWILIGHT_EVENING_ASTRONOMICAL="TWILIGHT_EVENING_ASTRONOMICAL",e.TWILIGHT_EVENING_GOLDEN_HOUR="TWILIGHT_EVENING_GOLDEN_HOUR",e.TWILIGHT_EVENING_BLUE_HOUR="TWILIGHT_EVENING_BLUE_HOUR",e.TWILIGHT_EVENING_NIGHT_HOUR="TWILIGHT_EVENING_NIGHT_HOUR"}(W||(W={})),function(e){e.NUMBER="NUMBER",e.NUMBER_ARRAY="NUMBER_ARRAY",e.STRING="STRING",e.BOOLEAN="BOOLEAN",e.TRIGGER="TRIGGER",e.COLOR="COLOR",e.ANY="ANY"}(V||(V={})),function(e){e.NEW_LINE="NEW_LINE",e.SPACER="SPACER"}(G||(G={})),function(e){e.INPUT="INPUT",e.PROCESSOR="PROCESSOR",e.OUTPUT="OUTPUT",e.THEN="THEN"}($||($={})),function(e){e.TEXT="TEXT",e.MULTILINE="MULTILINE",e.NUMBER="NUMBER",e.DROPDOWN="DROPDOWN",e.DOUBLE_DROPDOWN="DOUBLE_DROPDOWN",e.CHECKBOX="CHECKBOX",e.ASSET_ATTRIBUTE="ASSET_ATTRIBUTE",e.COLOR="COLOR",e.DATE="DATE"}(q||(q={})),function(e){e.ADD="ADD",e.ADD_OR_REPLACE="ADD_OR_REPLACE",e.REPLACE="REPLACE",e.DELETE="DELETE",e.CLEAR="CLEAR"}(X||(X={})),function(e){e.PER_ASSET="PER_ASSET",e.GLOBAL="GLOBAL"}(K||(K={})),function(e){e.READ_ADMIN="read:admin",e.READ_LOGS="read:logs",e.READ_USERS="read:users",e.READ_MAP="read:map",e.READ_ASSETS="read:assets",e.READ_RULES="read:rules",e.READ_INSIGHTS="read:insights",e.READ_ALARMS="read:alarms",e.READ_SERVICES="read:services",e.WRITE_SERVICES="write:services",e.WRITE_USER="write:user",e.WRITE_ADMIN="write:admin",e.WRITE_LOGS="write:logs",e.WRITE_ASSETS="write:assets",e.WRITE_ATTRIBUTES="write:attributes",e.WRITE_RULES="write:rules",e.WRITE_INSIGHTS="write:insights",e.WRITE_ALARMS="write:alarms",e.READ="read",e.WRITE="write"}(J||(J={})),function(e){e.REGISTER="REGISTER",e.UPDATE="UPDATE",e.DEREGISTER="DEREGISTER"}(Z||(Z={})),function(e){e.AVAILABLE="AVAILABLE",e.UNAVAILABLE="UNAVAILABLE"}(Q||(Q={})),function(e){e.ASSET="ASSET",e.AGENT="AGENT",e.NOTIFICATION="NOTIFICATION",e.ALARM="ALARM",e.RULES="RULES",e.PROTOCOL="PROTOCOL",e.GATEWAY="GATEWAY",e.MODEL_AND_VALUES="MODEL_AND_VALUES",e.API="API",e.DATA="DATA"}(ee||(ee={})),function(e){e.INFO="INFO",e.WARN="WARN",e.ERROR="ERROR"}(et||(et={})),function(e){e.NUMERIC="numeric",e.DIGIT_2="2-digit",e.FULL="full",e.LONG="long",e.MEDIUM="medium",e.SHORT="short",e.NARROW="narrow"}(en||(en={})),function(e){e.SECONDLY="SECONDLY",e.MINUTELY="MINUTELY",e.HOURLY="HOURLY",e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY",e.YEARLY="YEARLY"}(ei||(ei={})),function(e){e.OMIT="OMIT",e.BACKWARD="BACKWARD",e.FORWARD="FORWARD"}(eo||(eo={})),function(e){e.JAPANESE="JAPANESE",e.BUDDHIST="BUDDHIST",e.ROC="ROC",e.ISLAMIC="ISLAMIC",e.ISO8601="ISO8601",e.CHINESE="CHINESE",e.ETHIOPIC="ETHIOPIC",e.HEBREW="HEBREW",e.GREGORIAN="GREGORIAN"}(er||(er={})),function(e){e.SU="SU",e.MO="MO",e.TU="TU",e.WE="WE",e.TH="TH",e.FR="FR",e.SA="SA"}(ea||(ea={})),function(e){e.PEOPLECOUNTERASSET="PeopleCounterAsset",e.STORAGESIMULATORAGENT="StorageSimulatorAgent",e.CITYASSET="CityAsset",e.ELECTRICITYCONSUMERASSET="ElectricityConsumerAsset",e.ELECTRICVEHICLEASSET="ElectricVehicleAsset",e.CONSOLEASSET="ConsoleAsset",e.PRESENCESENSORASSET="PresenceSensorAsset",e.LIGHTASSET="LightAsset",e.THETHINGSSTACKAGENT="TheThingsStackAgent",e.PLUGASSET="PlugAsset",e.ELECTRICITYCHARGERASSET="ElectricityChargerAsset",e.ELECTRICITYBATTERYASSET="ElectricityBatteryAsset",e.ELECTRICITYSUPPLIERASSET="ElectricitySupplierAsset",e.TCPAGENT="TCPAgent",e.SERIALAGENT="SerialAgent",e.BLUETOOTHMESHAGENT="BluetoothMeshAgent",e.SNMPAGENT="SNMPAgent",e.GROUPASSET="GroupAsset",e.BUILDINGASSET="BuildingAsset",e.ELECTRICITYPRODUCERWINDASSET="ElectricityProducerWindAsset",e.ENVIRONMENTSENSORASSET="EnvironmentSensorAsset",e.MQTTAGENT="MQTTAgent",e.MICROPHONEASSET="MicrophoneAsset",e.MODBUSTCPAGENT="ModbusTcpAgent",e.HTTPAGENT="HTTPAgent",e.DOORASSET="DoorAsset",e.ELECTRICITYPRODUCERASSET="ElectricityProducerAsset",e.MAILAGENT="MailAgent",e.UDPAGENT="UDPAgent",e.ROOMASSET="RoomAsset",e.VENTILATIONASSET="VentilationAsset",e.TRADFRILIGHTASSET="TradfriLightAsset",e.KNXAGENT="KNXAgent",e.OPENWEATHERMAPAGENT="OpenWeatherMapAgent",e.CHIRPSTACKAGENT="ChirpStackAgent",e.WEATHERASSET="WeatherAsset",e.THINGASSET="ThingAsset",e.WEBSOCKETAGENT="WebsocketAgent",e.GATEWAYASSET="GatewayAsset",e.PARKINGASSET="ParkingAsset",e.TRADFRIPLUGASSET="TradfriPlugAsset",e.SIMULATORAGENT="SimulatorAgent",e.MODBUSSERIALAGENT="ModbusSerialAgent",e.ELECTRICVEHICLEFLEETGROUPASSET="ElectricVehicleFleetGroupAsset",e.VELBUSTCPAGENT="VelbusTCPAgent",e.ARTNETLIGHTASSET="ArtnetLightAsset",e.VELBUSSERIALAGENT="VelbusSerialAgent",e.GROUNDWATERSENSORASSET="GroundwaterSensorAsset",e.ELECTRICITYPRODUCERSOLARASSET="ElectricityProducerSolarAsset",e.ENERGYOPTIMISATIONASSET="EnergyOptimisationAsset",e.ZWAVEAGENT="ZWaveAgent",e.THERMOSTATASSET="ThermostatAsset",e.SHIPASSET="ShipAsset"}(es||(es={})),function(e){e.SUPPORTSEXPORT="supportsExport",e.MQTTPORT="MQTTPort",e.ENERGYSELFCONSUMPTION="energySelfConsumption",e.LASTACCESS="lastAccess",e.CHARGERID="chargerID",e.POSITION="position",e.CARBONSAVING="carbonSaving",e.ROUTINGMODE="routingMode",e.LASTWILLRETAIN="lastWillRetain",e.LASTWILLTOPIC="lastWillTopic",e.SERIALBAUDRATE="serialBaudrate",e.BASEURL="baseURL",e.REQUIREDVALUES="requiredValues",e.FINANCIALSAVING="financialSaving",e.FLEETCATEGORY="fleetCategory",e.GATEWAYSTATUS="gatewayStatus",e.NO2LEVEL="NO2Level",e.ATMOSPHERICPRESSURE="atmosphericPressure",e.TAGS="tags",e.UNLOCK="unlock",e.MILEAGEMIN="mileageMin",e.CHECKINTERVALSECONDS="checkIntervalSeconds",e.LOCATION="location",e.CLIENTSECRET="clientSecret",e.WINDDIRECTION="windDirection",e.WINDSPEED="windSpeed",e.PARTICLESPM10="particlesPM10",e.APPLICATIONKEY="applicationKey",e.POWEREXPORTMAX="powerExportMax",e.SETWINDACTUALVALUEWITHFORECAST="setWindActualValueWithForecast",e.WATERLEVEL="waterLevel",e.CONSOLENAME="consoleName",e.CONNECTHEADERS="connectHeaders",e.WEBSOCKETQUERY="websocketQuery",e.PREFERHTML="preferHTML",e.COOLING="cooling",e.POLLINGMILLIS="pollingMillis",e.SOILTEMPERATURE="soilTemperature",e.SUNIRRADIANCE="sunIrradiance",e.ODOMETER="odometer",e.SUPPORTSIMPORT="supportsImport",e.MESSAGEMAXLENGTH="messageMaxLength",e.WINDGUSTSPEED="windGustSpeed",e.ENERGYLEVELPERCENTAGEMIN="energyLevelPercentageMin",e.LIGHTID="lightId",e.POWER="power",e.STREET="street",e.DELETEPROCESSEDMAIL="deleteProcessedMail",e.WINDSPEEDMIN="windSpeedMin",e.POWERSETPOINT="powerSetpoint",e.PRESENCE="presence",e.SPACESOCCUPIED="spacesOccupied",e.STARTTLS="startTLS",e.AGENTSTATUS="agentStatus",e.MESSAGECHARSET="messageCharset",e.CERTIFICATEALIAS="certificateAlias",e.PANELPITCH="panelPitch",e.EMAIL="email",e.BINDPORT="bindPort",e.PARTICLESPM1="particlesPM1",e.SPEED="speed",e.ENERGYLEVELPERCENTAGEMAX="energyLevelPercentageMax",e.MESSAGESTRIPDELIMITER="messageStripDelimiter",e.AREA="area",e.COUNTRY="country",e.SHIPTYPE="shipType",e.CONNECTSUBSCRIPTIONS="connectSubscriptions",e.RELATIVEHUMIDITY="relativeHumidity",e.INCLUDEFORECASTWINDSERVICE="includeForecastWindService",e.SOURCEADDRESS="sourceAddress",e.RAINFALL="rainfall",e.ENERGYIMPORTTOTAL="energyImportTotal",e.OAUTHGRANT="oAuthGrant",e.OZONELEVEL="ozoneLevel",e.COUNTINMINUTE="countInMinute",e.PORT="port",e.TUNNELINGSUPPORTED="tunnelingSupported",e.ENINUMBER="ENINumber",e.AGENTDISABLED="agentDisabled",e.DISABLED="disabled",e.FORCECHARGE="forceCharge",e.TIMEINJECTIONINTERVAL="timeInjectionInterval",e.FINANCIALWEIGHTING="financialWeighting",e.ENERGYLEVELPERCENTAGE="energyLevelPercentage",e.SPACESBUFFER="spacesBuffer",e.VEHICLECATEGORY="vehicleCategory",e.FANSPEED="fanSpeed",e.FINANCIALCOST="financialCost",e.NOTES="notes",e.MAILFOLDERNAME="mailFolderName",e.TEMPERATURE="temperature",e.AVAILABLECHARGINGSPACES="availableChargingSpaces",e.ENERGYCAPACITY="energyCapacity",e.POWERIMPORTMIN="powerImportMin",e.INTERVALSIZE="intervalSize",e.SNMPVERSIONVALUE="SNMPVersionValue",e.SOUNDLEVEL="soundLevel",e.UNITID="unitId",e.STOPBITS="stopBits",e.CONNECTURL="connectURL",e.CLIENTID="clientId",e.VEHICLEID="vehicleID",e.SUNAZIMUTH="sunAzimuth",e.AVAILABLEDISCHARGINGSPACES="availableDischargingSpaces",e.WEBSOCKETMODE="websocketMode",e.COLOURTEMPERATURE="colourTemperature",e.VEHICLECONNECTED="vehicleConnected",e.DATABITS="dataBits",e.MILEAGEMINIMUM="mileageMinimum",e.COLOURRGB="colourRGB",e.CARBONIMPORT="carbonImport",e.WILDCARDSUBSCRIPTIONTOPICS="wildcardSubscriptionTopics",e.PRICEHOURLY="priceHourly",e.WINDSPEEDMAX="windSpeedMax",e.PINGDISABLED="pingDisabled",e.FLOW="flow",e.CHILDASSETTYPE="childAssetType",e.NETWORKKEY="networkKey",e.UNIVERSE="universe",e.MSSINUMBER="MSSINumber",e.SUBSCRIBEQOS="subscribeQos",e.LEDCOUNT="lEDCount",e.LOCKED="locked",e.CLOUDCOVERAGE="cloudCoverage",e.PROTOCOL="protocol",e.TARIFFIMPORT="tariffImport",e.ENERGYRENEWABLESHARE="energyRenewableShare",e.REGION="region",e.CONSOLEPLATFORM="consolePlatform",e.POWEREXPORTMIN="powerExportMin",e.EFFICIENCYEXPORT="efficiencyExport",e.CHARGECYCLES="chargeCycles",e.SERIALPORT="serialPort",e.APPLICATIONID="applicationId",e.PANELORIENTATION="panelOrientation",e.LENGTH="length",e.PROBABILITYOFPRECIPITATION="probabilityOfPrecipitation",e.USERNAMEPASSWORD="usernamePassword",e.POWERFORECAST="powerForecast",e.SETACTUALSOLARVALUEWITHFORECAST="setActualSolarValueWithForecast",e.REQUESTQUERYPARAMETERS="requestQueryParameters",e.PROXYADDRESS="proxyAddress",e.MQTTHOST="MQTTHost",e.ENERGYLOCAL="energyLocal",e.ENERGYAUTARKY="energyAutarky",e.MODEL="model",e.MANUFACTURER="manufacturer",e.ONOFF="onOff",e.RESUMESESSION="resumeSession",e.TARIFFEXPORT="tariffExport",e.APIKEY="ApiKey",e.CITY="city",e.CONNECTORTYPE="connectorType",e.ENERGYEXPORTTOTAL="energyExportTotal",e.CARBONEXPORT="carbonExport",e.REQUESTTIMEOUTMILLIS="requestTimeoutMillis",e.ENERGYLEVEL="energyLevel",e.OPTIMISATIONDISABLED="optimisationDisabled",e.WEBSOCKETPATH="websocketPath",e.WINDSPEEDREFERENCE="windSpeedReference",e.PRICEDAILY="priceDaily",e.COUNTGROWTHMINUTE="countGrowthMinute",e.IMONUMBER="IMONumber",e.ATTRIBUTION="Attribution",e.INCLUDEFORECASTSOLARSERVICE="includeForecastSolarService",e.REQUESTHEADERS="requestHeaders",e.TENANTID="tenantId",e.HOST="host",e.COUNTOUTMINUTE="countOutMinute",e.ENERGYTYPE="energyType",e.CONSOLEVERSION="consoleVersion",e.MTU="mtu",e.PANELAZIMUTH="panelAzimuth",e.SEQUENCENUMBER="sequenceNumber",e.SUNALTITUDE="sunAltitude",e.COUNTOUT="countOut",e.CHARGERCONNECTED="chargerConnected",e.ROOMNUMBER="roomNumber",e.PARTICLESPM2_5="particlesPM2_5",e.MESSAGESOURCEADDRESS="messageSourceAddress",e.COUNTIN="countIn",e.MILEAGECHARGED="mileageCharged",e.PROVISIONWEATHERASSET="ProvisionWeatherAsset",e.TEMPERATURESETPOINT="temperatureSetpoint",e.CONSOLEPROVIDERS="consoleProviders",e.POWERIMPORTMAX="powerImportMax",e.COUNTTOTAL="countTotal",e.SPACESTOTAL="spacesTotal",e.BINDHOST="bindHost",e.MESSAGECONVERTBINARY="messageConvertBinary",e.MESSAGEDELIMITERS="messageDelimiters",e.EFFICIENCYIMPORT="efficiencyImport",e.SUNZENITH="sunZenith",e.BRIGHTNESS="brightness",e.POSTALCODE="postalCode",e.SPACESOPEN="spacesOpen",e.HUMIDITY="humidity",e.SECUREMODE="secureMode",e.MILEAGECAPACITY="mileageCapacity",e.DIRECTION="direction",e.ENERGYLEVELSCHEDULE="energyLevelSchedule",e.UVINDEX="uVIndex",e.NATMODE="NATMode",e.UPDATEONWRITE="updateOnWrite",e.LASTWILLPAYLOAD="lastWillPayload",e.GROUPID="groupId",e.FOLLOWREDIRECTS="followRedirects",e.CARBONCOST="carbonCost",e.MESSAGECONVERTHEX="messageConvertHex",e.PUBLISHQOS="publishQos"}(el||(el={})),function(e){e.FORMAT="format",e.RULESTATE="ruleState",e.HASPREDICTEDDATAPOINTS="hasPredictedDataPoints",e.STOREDATAPOINTS="storeDataPoints",e.LABEL="label",e.CONSTRAINTS="constraints",e.SHOWONDASHBOARD="showOnDashboard",e.READONLY="readOnly",e.MULTILINE="multiline",e.ACCESSPUBLICWRITE="accessPublicWrite",e.MOMENTARY="momentary",e.AGENTLINK="agentLink",e.ACCESSRESTRICTEDREAD="accessRestrictedRead",e.DATAPOINTSMAXAGEDAYS="dataPointsMaxAgeDays",e.ACCESSRESTRICTEDWRITE="accessRestrictedWrite",e.SECRET="secret",e.ATTRIBUTELINKS="attributeLinks",e.RULERESETIMMEDIATE="ruleResetImmediate",e.AGENTLINKCONFIG="agentLinkConfig",e.FORECAST="forecast",e.UNITS="units",e.USERCONNECTED="userConnected",e.ACCESSPUBLICREAD="accessPublicRead"}(ec||(ec={})),function(e){e.WSURL="WS_URL",e.POSITIVENUMBER="positiveNumber",e.VALUEDESCRIPTOR="valueDescriptor",e.LONG="long",e.BOOLEANMAP="booleanMap",e.MQTTQOS="MQTTQos",e.GEOJSONPOINT="GEO_JSONPoint",e.SNMPVERSION="SNMPVersion",e.ASSETTYPE="assetType",e.JSONOBJECT="JSONObject",e.BIGNUMBER="bigNumber",e.IPADDRESS="IPAddress",e.EMAIL="email",e.KNXMESSAGESOURCEADDRESS="kNXMessageSourceAddress",e.ATTRIBUTEREFERENCE="attributeReference",e.INTEGER="integer",e.OAUTHGRANT="oAuthGrant",e.NUMBER="number",e.TEXTMAP="textMap",e.WEBSOCKETSUBSCRIPTION="websocketSubscription",e.BOOLEAN="boolean",e.TIMEANDPERIODDURATIONISO8601="timeAndPeriodDurationISO8601",e.TIMESTAMPISO8601="timestampISO8601",e.MULTIVALUEDTEXTMAP="multivaluedTextMap",e.JSON="JSON",e.INTEGERBYTE="integerByte",e.AGENTLINK="agentLink",e.CALENDAREVENT="calendarEvent",e.CONNECTIONSTATUS="connectionStatus",e.VALUECONSTRAINT="valueConstraint",e.ASSETQUERY="assetQuery",e.COLOURRGB="colourRGB",e.VALUEFORMAT="valueFormat",e.TEXT="text",e.BYTE="byte",e.USERNAMEANDPASSWORD="usernameAndPassword",e.HTTPURL="HTTP_URL",e.ATTRIBUTELINK="attributeLink",e.ASSETID="assetID",e.NUMBERMAP="numberMap",e.HTTPMETHOD="HTTPMethod",e.PANELORIENTATION="panelOrientation",e.ATTRIBUTESTATE="attributeState",e.POSITIVEINTEGER="positiveInteger",e.EXECUTIONSTATUS="executionStatus",e.BIGINTEGER="bigInteger",e.PERIODDURATIONISO8601="periodDurationISO8601",e.DATEANDTIME="dateAndTime",e.CONNECTORTYPE="connectorType",e.NEGATIVEINTEGER="negativeInteger",e.TCPIPPORTNUMBER="TCP_IPPortNumber",e.INTEGERMAP="integerMap",e.ENERGYTYPE="energyType",e.TIMESTAMP="timestamp",e.UUID="UUID",e.FORECASTCONFIGURATION="forecastConfiguration",e.TIMEDURATIONISO8601="timeDurationISO8601",e.CONSOLEPROVIDERS="consoleProviders",e.NEGATIVENUMBER="negativeNumber",e.CRONEXPRESSION="CRONExpression",e.DIRECTION="direction",e.HOSTORIPADDRESS="hostOrIPAddress"}(ed||(ed={})),function(e){e.MONTH="month",e.MILE_SCANDINAVIAN="mile_scandinavian",e.YEAR="year",e.VOLT="volt",e.HERTZ="hertz",e.MILE="mile",e.BTU="btu",e.FOOT="foot",e.MEGA="mega",e.INCH="inch",e.IN_HG="inch_mercury",e.CENTI="centi",e.GRAM="gram",e.KNOT="knot",e.METRE="metre",e.LITRE="litre",e.FLUID_OUNCE="fluid_ounce",e.CELSIUS="celsius",e.DECIBEL="decibel",e.FAHRENHEIT="fahrenheit",e.WATT="watt",e.PEAK="peak",e.MICRO="micro",e.PER="per",e.STONE="stone",e.VAR="var",e.OUNCE="ounce",e.HECTARE="hectare",e.YARD="yard",e.JOULE="joule",e.DEGREE="degree",e.KILO="kilo",e.KELVIN="kelvin",e.CARBON="carbon",e.DECIBEL_ATTENUATED="decibel_attenuated",e.SQUARED="squared",e.PERCENTAGE="percentage",e.CUBED="cubed",e.DAY="day",e.RADIAN="radian",e.OHM="ohm",e.MINUTE="minute",e.PART_PER_MILLION="ppm",e.AMP="amp",e.MASS_POUND="pound",e.HOUR="hour",e.ACRE="acre",e.RPM="rpm",e.PASCAL="pascal",e.LUMEN="lumen",e.WEEK="week",e.GALLON="gallon",e.LUX="lux",e.MILLI="milli",e.BAR="bar",e.HECTO="hecto",e.SECOND="second"}(eu||(eu={})),em||(em={});class ip{static getAssetDescriptors(){return ip._assetTypeInfos.map(e=>e.assetDescriptor)}static getMetaItemDescriptors(){return[...this._metaItemDescriptors]}static getValueDescriptors(){return[...this._valueDescriptors]}static getAssetTypeInfos(){return[...this._assetTypeInfos]}static getAssetTypeInfo(e){if(e)return e.assetDescriptor?e:("string"!=typeof e&&(e=e.name),this._assetTypeInfos.find(t=>t.assetDescriptor.name===e))}static getAssetDescriptor(e){if(!e)return;if(e.assetDescriptor)return e.assetDescriptor;if("string"!=typeof e)return e;let t=this._assetTypeInfos.find(t=>t.assetDescriptor.name===e);return t?t.assetDescriptor:void 0}static getAttributeDescriptor(e,t){if(!e)return;let n=this.getAssetTypeInfo(t||"ThingAsset");if(n&&n.attributeDescriptors)return n.attributeDescriptors.find(t=>t.name===e)}static getValueDescriptor(e){let t;if(!e)return;if(e.endsWith("[]"))for(t=0;e.endsWith("[]");)e=e.substring(0,e.length-2),t++;let n=this._valueDescriptors.find(t=>t.name===e);return n&&t&&(n=Object.assign(Object.assign({},n),{arrayDimensions:t})),n}static resolveValueDescriptor(e,t){let n;return t&&("string"==typeof t&&(n=ip.getValueDescriptor(t)),n=t.jsonType?t:ip.getValueDescriptor(t.type)),!n&&e&&(n=ip.getValueDescriptor("JSON")),n}static resolveValueTypeFromValue(e){if(null!=e){if("number"==typeof e)return"number";if("string"==typeof e)return"text";if("boolean"==typeof e)return"boolean";if(Array.isArray(e)){let t=1,n=e.find(e=>null!=e);for(;Array.isArray(n);)n=n.find(e=>null!=e),t++;let i=this.resolveValueTypeFromValue(n);if(!i)return;for(;t>0;)i+="[]",t--;return i}if(e instanceof Date)return"dateAndTime"}}static getAttributeAndValueDescriptors(e,t,n){let i,o;if(t&&"string"!=typeof t)i=t;else{let o=this.getAssetTypeInfo(e||"ThingAsset");if(!o)return[void 0,void 0];"string"==typeof t&&(i=this.getAttributeDescriptor(t,o)),!i&&n&&(i={type:n.type,name:n.name,meta:n.meta})}return i&&(o=this.getValueDescriptor(i.type)),[i,o]}static getMetaItemDescriptor(e){if(e)return this._metaItemDescriptors.find(t=>t.name===e)}static getAssetDescriptorColour(e,t){let n=this.getAssetDescriptor(e);return n&&n.colour?n.colour:t}static getAssetDescriptorIcon(e,t){let n=this.getAssetDescriptor(e);return n&&n.icon?n.icon:t}}ip._assetTypeInfos=[],ip._metaItemDescriptors=[],ip._valueDescriptors=[],n(488);var ih=n(3348),ib=n.n(ih),ig=n(3806),i_=n.n(ig);n(2891);class iy{get resolve(){return this._resolve}get reject(){return this._reject}get promise(){return this._promise}constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t}),Object.freeze(this)}}function iv(e,t,n=!0){if(null==e||null==t)return e===t;if(e.constructor!==t.constructor)return!1;if(e instanceof Function||e instanceof RegExp)return e===t;if(e===t||e.valueOf()===t.valueOf())return!0;if(Array.isArray(e)&&e.length!==t.length||e instanceof Date||!(e instanceof Object)||!(t instanceof Object))return!1;if(n){let n=Object.keys(e);return Object.keys(t).every(e=>-1!==n.indexOf(e))&&n.every(n=>iv(e[n],t[n]))}return!1}function iF(e){if(null==e)return"";let t=!1;return e.split(/([A-Z]|\d)/).map((e,n,i)=>{if(!e)return e;if(!t)return t=!0,e.charAt(0).toUpperCase()+e.slice(1);if("_"===e)return" ";if(1===e.length&&e===e.toUpperCase()){let t=!i[n-1]||"_"===i[n-1],o=n+1<i.length&&i[n+1]&&"_"!==i[n+1],r=n+3>i.length||!i[n+1]&&!i[n+3];(!t||o)&&(e=" "+e),!o&&(t||r)||(e=e.toLowerCase())}return e}).join("").trim()}function ix(e,t,n){let i="string"==typeof e?e:e.name;return t&&t.meta&&t.meta.hasOwnProperty(i)?t.meta[i]:n&&n.meta?n.meta[i]:void 0}function iw(e,t,n,i,o,r){let a=iT("label",e,t,n,o),s="";if(a||(a=ix("label",e,t&&t.meta?t:void 0)),i&&(s=ik(iE("units",e,t,n,o))),!a){let n=e?e.name:t?"string"==typeof t?t:t.name:void 0;a=r||(n?iF(n):void 0)}return a?a+(s?" ("+s+")":""):s}function ik(e,t){if(!e)return"";t||(t="");let n=e.map((e,n)=>{if(3!==e.length||e.toUpperCase()!==e)return id.t(["units."+e,"or:units."+e]);{let i=new Intl.NumberFormat(id.language,{currency:e,style:"currency"}).formatToParts();if(0!==n||"currency"!==i[0].type)return"currency"===i[0].type?i[0].value:i[i.length-1].value;if(!t)return i[0].value;t=i[0].value+t}}).join("");return t.length>0?t+" "+n:n}function iE(e,t,n,i,o){let r,a=[],s=iT(e,t&&"string"==typeof t?t:t?t.name:n?"string"==typeof n?n:n.name:void 0,n,i,o);if(s&&(r=JSON.parse(s)))if("format"!==e)return r;else a.push(r);if(t&&t.meta&&(r=ix(e,t,n)))if("format"!==e)return r;else a.push(r);if(n&&"string"!=typeof n&&n.hasOwnProperty(e)){if(r=n[e],"format"!==e)return r;a.push(r)}if(n&&n.type){if(r=ip.getValueDescriptor(n.type)[e],"format"!==e)return r;a.push(r)}if("format"!==e||0===a.length)return r;let l={};return a.reverse().forEach(e=>{l=Object.assign(Object.assign({},l),e)}),l}function iT(e,t,n,i,o,r){let a;if(t?a="string"==typeof t?t:t.name:n&&(a="string"==typeof n?n:n.name),!a)return;let s=[],l=e+"."+(o?"attribute":"meta")+".";if(i&&s.push(l+i+"."+a),n&&"string"!=typeof n&&(s.push(l+n.type+"."+a),s.push(l+n.type)),s.push(l+a),s.length>0)return id.t(s,{defaultValue:r||""})}var iM=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})};let iA=n(9916);class iC{constructor(e,t,n){this._autoEnable=!1,this._initialised=!1,this._initialiseInProgress=!1,this._pendingProviderPromises={},this._providerMessageListeners={},this._pendingProviderEnables=[],this._registrationTimer=null,this._realm=e,this._autoEnable=t,this._enableCompleteCallback=n,window.OpenRemoteConsole=this;let i=new URLSearchParams(window.location.search),o=i.get("consoleName"),r=i.get("consoleVersion"),a=i.get("consolePlatform"),s=i.get("consoleProviders"),l=i.get("consoleAutoEnable"),c=s&&s.length>0?s.split(" "):["push"];this._pendingProviderEnables=c;let d=iC._createConsoleRegistration(),u=window.localStorage.getItem("OpenRemoteConsole:"+e);if(u)try{let e=JSON.parse(u);e.id&&(d.id=e.id),e.name&&(d.name=e.name),e.providers&&(d.providers=e.providers),e.apps&&(d.apps=e.apps)}catch(e){console.error("Failed to deserialise console registration")}let m=d.providers;for(let e of(d.providers={},c)){let t=m&&m.hasOwnProperty(e)?m[e]:{enabled:!1,disabled:!1};d.providers[e]=t}let f=o9.getAppName();f.length>0&&0>d.apps.indexOf(f)&&d.apps.push(f),this._registration=d,o&&(d.name=o),r&&(d.version=r),a&&(d.platform=a),l&&(this._autoEnable="TRUE"===l||"true"===l)}get registration(){return this._registration}get autoEnable(){return this._autoEnable}get pendingProviderEnables(){return this._pendingProviderEnables.slice(0)}get shellApple(){let e=navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform:navigator.platform;return e&&("iP"===e.substring(0,2)||"Mac"===e.substring(0,3))&&window.webkit&&window.webkit.messageHandlers}get shellAndroid(){return!!window.MobileInterface}get isMobile(){return this.shellApple||this.shellAndroid}initialise(){return iM(this,void 0,void 0,function*(){if(!this._initialised&&!this._initialiseInProgress){console.debug("Console: initialising"),this._initialiseInProgress=!0;try{if(this._registration.providers)for(let e of Object.keys(this._registration.providers))yield this._initialiseProvider(e);this._registration.id||(yield this.sendRegistration(0)),this._initialised=!0,this._initialiseInProgress=!1,0===this._pendingProviderEnables.length?(yield this.sendRegistration(),this._callCompletedCallback()):this._autoEnable&&(yield this.enableProviders())}catch(e){console.error(e)}finally{this._initialiseInProgress=!1}}})}enableProviders(){return iM(this,void 0,void 0,function*(){if(!this._initialised)throw Error("Console must be initialised before enabling providers");for(let e=this._pendingProviderEnables.length-1;e>-1;e--){let t=this._pendingProviderEnables[e];yield this.enableProvider(t)}})}enableProvider(e,t){return iM(this,void 0,void 0,function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),Error("Console must be initialised before enabling providers");if(!this._registration.providers.hasOwnProperty(e))throw console.debug("Invalid console provider '"+e+"'"),Error("Invalid console provider '"+e+"'");console.debug("Console: enabling provider '"+e+"'");let n={provider:e,action:"PROVIDER_ENABLE",consoleId:this._registration.id,data:t},i=yield this.sendProviderMessage(n,!0);this._registration.providers[e].hasPermission=i.hasPermission,this._registration.providers[e].success=i.success,this._registration.providers[e].enabled=i.success,this._registration.providers[e].data=i.data;let o=this._pendingProviderEnables.indexOf(e);return o>=0&&(this._pendingProviderEnables.splice(o,1),0===this._pendingProviderEnables.length&&(this.sendRegistration(),this._callCompletedCallback())),i})}disableProvider(e){return iM(this,void 0,void 0,function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),Error("Console must be initialised before disabling providers");if(!this._registration.providers.hasOwnProperty(e))throw console.debug("Invalid console provider '"+e+"'"),Error("Invalid console provider '"+e+"'");console.debug("Console: disabling provider '"+e+"'");let t=yield this.sendProviderMessage({provider:e,action:"PROVIDER_DISABLE"},!0);return this._registration.providers[e].disabled=!0,this._registration.providers[e].enabled=!1,t})}getProvider(e){return this._registration&&this._registration.providers?this._registration.providers[e]:void 0}sendProviderMessage(e,t){return iM(this,void 0,void 0,function*(){if("storage"!==e.provider&&!this._registration.providers.hasOwnProperty(e.provider))throw console.debug("Invalid console provider '"+e.provider+"'"),Error("Invalid console provider '"+e.provider+"'");if(!t)return void this._doSendProviderMessage(e);let n=e.provider+e.action;if(this._pendingProviderPromises[n])throw Error("Message already pending for provider '"+e.provider+"' with action '"+e.action+"'");let i=new iy,o=()=>{delete this._pendingProviderPromises[n],i.reject("No response from provider")};return this._pendingProviderPromises[n]=[i,window.setTimeout(o,5e3)],this._doSendProviderMessage(e),i.promise})}sendRegistration(e){return this._registrationTimer&&(window.clearTimeout(this._registrationTimer),this._registrationTimer=null),console.debug("Sending registration in: "+(e=void 0!==e?e:2e3)+"ms"),new Promise((e,t)=>{this._registrationTimer=window.setTimeout(()=>{this._registrationTimer=null,console.debug("Console: updating registration");try{this._registration.name||(this._registration.name="Console"),this._registration.platform||(this._registration.platform="N/A"),this._registration.version||(this._registration.version="N/A"),this._registration.providers||(this._registration.providers={}),o9.rest.api.ConsoleResource.register(this._registration).then(t=>{if(200!==t.status)throw Error("Failed to register console");this._registration=t.data,console.debug("Console: registration successful"),console.debug("Console: updating locally stored registration"),window.localStorage.setItem("OpenRemoteConsole:"+this._realm,JSON.stringify(this._registration)),e()})}catch(e){console.error("Failed to register console"),t("Failed to register console")}})})}storeData(e,t){this.sendProviderMessage({provider:"storage",action:"STORE",key:e,value:t},!1)}retrieveData(e){return iM(this,void 0,void 0,function*(){let t=this.sendProviderMessage({provider:"storage",action:"RETRIEVE",key:e},!0);try{let e=yield Promise.race([t,new Promise((e,t)=>setTimeout(t,2e3))]);if(e&&e.value){let t=e.value;return"null"===t?void 0:t}}catch(e){console.log("Failed to retrieve data from storage provider")}})}addProviderMessageListener(e,t){this._providerMessageListeners[e.provider+e.action]=t}removeProviderMessageListener(e){delete this._providerMessageListeners[e.provider+e.action]}_postNativeShellMessage(e){try{if(this.shellAndroid)return window.MobileInterface.postMessage(JSON.stringify(e));if(this.shellApple)return window.webkit.messageHandlers.int.postMessage(e)}catch(e){console.error("Failed to send shell message towards console",e)}}_doSendGenericMessage(e,t){let n={type:e,data:t};this.isMobile?this._postNativeShellMessage(n):console.warn("Failed to send generic message to console.",n)}_doSendProviderMessage(e){if(this.isMobile)this._postNativeShellMessage({type:"provider",data:e});else{if(!e.provider||!e.action)return;switch(e.provider.trim().toUpperCase()){case"PUSH":switch(e.action.trim().toUpperCase()){case"PROVIDER_INIT":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_INIT",provider:"push",version:"web",enabled:!0,disabled:!1,hasPermission:!0,requiresPermission:!1,success:!0}));break;case"PROVIDER_ENABLE":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_ENABLE",provider:"push",hasPermission:!0,success:!0}));break;default:throw Error("Unsupported provider '"+e.provider+"' and action '"+e.action+"'")}break;case"STORAGE":switch(e.action){case"PROVIDER_INIT":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_INIT",provider:"storage",version:"1.0.0",disabled:!1,enabled:!0,hasPermission:!0,requiresPermission:!1,success:!0}));break;case"PROVIDER_ENABLE":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_ENABLE",provider:"storage",hasPermission:!0,success:!0}));break;case"STORE":{let t=e.key?e.key.trim():null;if(!t||0===t.length)throw Error("Storage provider 'store' action requires a `key`");null===e.value?window.localStorage.removeItem(t):window.localStorage.setItem(t,JSON.stringify(e.value))}break;case"RETRIEVE":{let t=e.key?e.key.trim():null;if(!t||0===t.length)throw Error("Storage provider 'retrieve' action requires a `key`");let n=window.localStorage.getItem(t);if(null!==n)try{n=JSON.parse(n)}catch(e){}this._handleProviderResponse(JSON.stringify({action:"RETRIEVE",provider:"storage",key:t,value:n}))}break;default:throw Error("Unsupported provider '"+e.provider+"' and action '"+e.action+"'")}break;default:console.error("Unsupported provider: "+e.provider)}}}_handleProviderResponse(e){if(!e)return;let t=JSON.parse(e),n=t.provider,i=t.action,o=this._pendingProviderPromises[n+i];o&&(window.clearTimeout(o[1]),delete this._pendingProviderPromises[n+i],o[0].resolve(t));let r=this._providerMessageListeners[n+i];r&&r(t)}_callCompletedCallback(){let e=this._enableCompleteCallback;this._enableCompleteCallback=null,e&&window.setTimeout(()=>{e()},0)}static _createConsoleRegistration(){return{name:iA.name,version:iA.version,platform:iA.os.toString(),apps:[],model:((iA.manufacturer?iA.manufacturer+" ":"")+(iA.product?iA.product:"")).trim()}}_initialiseProvider(e){return iM(this,void 0,void 0,function*(){let t;console.debug("Console: initialising provider '"+e+"'");try{t=yield this.sendProviderMessage({provider:e,action:"PROVIDER_INIT"},!0),this._registration.providers[e].version=t.version,this._registration.providers[e].requiresPermission=t.requiresPermission,this._registration.providers[e].hasPermission=t.hasPermission,this._registration.providers[e].success=t.success,this._registration.providers[e].enabled=t.enabled,this._registration.providers[e].disabled=t.disabled,this._registration.providers[e].data=t.data}catch(e){console.error(e),t={action:"",disabled:!1,enabled:!1,hasPermission:!1,provider:"",requiresPermission:!1,version:"",success:!1}}if(t.success||(console.debug("Provider initialisation failed: '"+e+"'"),t.disabled=!0,this._registration.providers[e].disabled=!0),t.disabled||t.enabled){let t=this._pendingProviderEnables.indexOf(e);t>=0&&this._pendingProviderEnables.splice(t,1)}})}}var iD=n(3653),iS=n.n(iD);class iL{constructor(e){this.httpClient=e}createGlobalRuleset(e,t){return this.httpClient.request({method:"POST",url:i0`rules`,data:e,options:t})}getGlobalRulesets(e,t){return this.httpClient.request({method:"GET",url:i0`rules`,queryParams:e,options:t})}createAssetRuleset(e,t){return this.httpClient.request({method:"POST",url:i0`rules/asset`,data:e,options:t})}getAssetRulesets(e,t,n){return this.httpClient.request({method:"GET",url:i0`rules/asset/for/${e}`,queryParams:t,options:n})}deleteAssetRuleset(e,t){return this.httpClient.request({method:"DELETE",url:i0`rules/asset/${e}`,options:t})}getAssetRuleset(e,t){return this.httpClient.request({method:"GET",url:i0`rules/asset/${e}`,options:t})}updateAssetRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:i0`rules/asset/${e}`,data:t,options:n})}getAssetGeofences(e,t){return this.httpClient.request({method:"GET",url:i0`rules/geofences/${e}`,options:t})}getAssetEngineInfo(e,t){return this.httpClient.request({method:"GET",url:i0`rules/info/asset/${e}`,options:t})}getGlobalEngineInfo(e){return this.httpClient.request({method:"GET",url:i0`rules/info/global`,options:e})}getRealmEngineInfo(e,t){return this.httpClient.request({method:"GET",url:i0`rules/info/realm/${e}`,options:t})}createRealmRuleset(e,t){return this.httpClient.request({method:"POST",url:i0`rules/realm`,data:e,options:t})}getRealmRulesets(e,t,n){return this.httpClient.request({method:"GET",url:i0`rules/realm/for/${e}`,queryParams:t,options:n})}deleteRealmRuleset(e,t){return this.httpClient.request({method:"DELETE",url:i0`rules/realm/${e}`,options:t})}getRealmRuleset(e,t){return this.httpClient.request({method:"GET",url:i0`rules/realm/${e}`,options:t})}updateRealmRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:i0`rules/realm/${e}`,data:t,options:n})}deleteGlobalRuleset(e,t){return this.httpClient.request({method:"DELETE",url:i0`rules/${e}`,options:t})}getGlobalRuleset(e,t){return this.httpClient.request({method:"GET",url:i0`rules/${e}`,options:t})}updateGlobalRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:i0`rules/${e}`,data:t,options:n})}}class iI{constructor(e){this.httpClient=e}startTunnel(e,t){return this.httpClient.request({method:"POST",url:i0`gateway/tunnel`,data:e,options:t})}stopTunnel(e,t){return this.httpClient.request({method:"DELETE",url:i0`gateway/tunnel`,data:e,options:t})}getAllActiveTunnelInfos(e,t){return this.httpClient.request({method:"GET",url:i0`gateway/tunnel/${e}`,options:t})}getGatewayActiveTunnelInfos(e,t,n){return this.httpClient.request({method:"GET",url:i0`gateway/tunnel/${e}/${t}`,options:n})}getActiveTunnelInfo(e,t,n,i,o){return this.httpClient.request({method:"GET",url:i0`gateway/tunnel/${e}/${t}/${n}/${i}`,options:o})}}class iO{constructor(e){this.httpClient=e}getDatapointExport(e,t){return this.httpClient.request({method:"GET",url:i0`asset/datapoint/export`,queryParams:e,options:t})}getDatapointPeriod(e,t){return this.httpClient.request({method:"GET",url:i0`asset/datapoint/periods`,queryParams:e,options:t})}getDatapoints(e,t,n,i){return this.httpClient.request({method:"POST",url:i0`asset/datapoint/${e}/${t}`,data:n,options:i})}}class iR{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:i0`dashboard`,data:e,options:t})}update(e,t){return this.httpClient.request({method:"PUT",url:i0`dashboard`,data:e,options:t})}getAllRealmDashboards(e,t){return this.httpClient.request({method:"GET",url:i0`dashboard/all/${e}`,options:t})}query(e,t){return this.httpClient.request({method:"POST",url:i0`dashboard/query`,data:e,options:t})}delete(e,t,n){return this.httpClient.request({method:"DELETE",url:i0`dashboard/${e}/${t}`,options:n})}get(e,t,n){return this.httpClient.request({method:"GET",url:i0`dashboard/${e}/${t}`,options:n})}}class iY{constructor(e){this.httpClient=e}getPredictedDatapoints(e,t,n,i){return this.httpClient.request({method:"POST",url:i0`asset/predicted/${e}/${t}`,data:n,options:i})}writePredictedDatapoints(e,t,n,i){return this.httpClient.request({method:"PUT",url:i0`asset/predicted/${e}/${t}`,data:n,options:i})}}class iP{constructor(e){this.httpClient=e}createProvisioningConfig(e,t){return this.httpClient.request({method:"POST",url:i0`provisioning`,data:e,options:t})}getProvisioningConfigs(e){return this.httpClient.request({method:"GET",url:i0`provisioning`,options:e})}deleteProvisioningConfig(e,t){return this.httpClient.request({method:"DELETE",url:i0`provisioning/${e}`,options:t})}updateProvisioningConfig(e,t,n){return this.httpClient.request({method:"PUT",url:i0`provisioning/${e}`,data:t,options:n})}}class iN{constructor(e){this.httpClient=e}getAllNodeDefinitions(e){return this.httpClient.request({method:"GET",url:i0`flow`,options:e})}getNodeDefinition(e,t){return this.httpClient.request({method:"GET",url:i0`flow/${e}`,options:t})}getAllNodeDefinitionsByType(e,t){return this.httpClient.request({method:"GET",url:i0`flow/${e}`,options:t})}}class iB{constructor(e){this.httpClient=e}doProtocolAssetDiscovery(e,t,n){return this.httpClient.request({method:"GET",url:i0`agent/assetDiscovery/${e}`,queryParams:t,options:n})}doProtocolAssetImport(e,t,n,i){return this.httpClient.request({method:"POST",url:i0`agent/assetImport/${e}`,queryParams:n,data:t,options:i})}doProtocolInstanceDiscovery(e,t,n){return this.httpClient.request({method:"GET",url:i0`agent/instanceDiscovery/${e}`,queryParams:t,options:n})}}class iH{constructor(e){this.httpClient=e}getConfig(e){return this.httpClient.request({method:"GET",url:i0`syslog/config`,options:e})}updateConfig(e,t){return this.httpClient.request({method:"PUT",url:i0`syslog/config`,data:e,options:t})}clearEvents(e){return this.httpClient.request({method:"DELETE",url:i0`syslog/event`,options:e})}getEvents(e,t){return this.httpClient.request({method:"GET",url:i0`syslog/event`,queryParams:e,options:t})}}class iz{constructor(e){this.httpClient=e}updateCurrentUserLocale(e,t){return this.httpClient.request({method:"PUT",url:i0`user/locale`,data:e,options:t})}query(e,t){return this.httpClient.request({method:"POST",url:i0`user/query`,data:e,options:t})}requestPasswordResetCurrent(e){return this.httpClient.request({method:"PUT",url:i0`user/request-password-reset`,options:e})}updatePasswordCurrent(e,t){return this.httpClient.request({method:"PUT",url:i0`user/reset-password`,data:e,options:t})}updateCurrent(e,t){return this.httpClient.request({method:"PUT",url:i0`user/update`,data:e,options:t})}getCurrent(e){return this.httpClient.request({method:"GET",url:i0`user/user`,options:e})}getCurrentUserRealmRoles(e){return this.httpClient.request({method:"GET",url:i0`user/userRealmRoles`,options:e})}getCurrentUserClientRoles(e,t){return this.httpClient.request({method:"GET",url:i0`user/userRoles/${e}`,options:t})}disconnectUserSession(e,t,n){return this.httpClient.request({method:"GET",url:i0`user/${e}/disconnect/${t}`,options:n})}requestPasswordReset(e,t,n){return this.httpClient.request({method:"PUT",url:i0`user/${e}/request-password-reset/${t}`,options:n})}updatePassword(e,t,n,i){return this.httpClient.request({method:"PUT",url:i0`user/${e}/reset-password/${t}`,data:n,options:i})}resetSecret(e,t,n){return this.httpClient.request({method:"GET",url:i0`user/${e}/reset-secret/${t}`,options:n})}updateRoles(e,t,n){return this.httpClient.request({method:"PUT",url:i0`user/${e}/roles`,data:t,options:n})}getUserRealmRoles(e,t,n){return this.httpClient.request({method:"GET",url:i0`user/${e}/userRealmRoles/${t}`,options:n})}updateUserRealmRoles(e,t,n,i){return this.httpClient.request({method:"PUT",url:i0`user/${e}/userRealmRoles/${t}`,data:n,options:i})}getUserClientRoles(e,t,n,i){return this.httpClient.request({method:"GET",url:i0`user/${e}/userRoles/${t}/${n}`,options:i})}updateUserClientRoles(e,t,n,i,o){return this.httpClient.request({method:"PUT",url:i0`user/${e}/userRoles/${t}/${n}`,data:i,options:o})}getUserSessions(e,t,n){return this.httpClient.request({method:"GET",url:i0`user/${e}/userSessions/${t}`,options:n})}create(e,t,n){return this.httpClient.request({method:"POST",url:i0`user/${e}/users`,data:t,options:n})}update(e,t,n){return this.httpClient.request({method:"PUT",url:i0`user/${e}/users`,data:t,options:n})}delete(e,t,n){return this.httpClient.request({method:"DELETE",url:i0`user/${e}/users/${t}`,options:n})}getClientRoles(e,t,n){return this.httpClient.request({method:"GET",url:i0`user/${e}/${t}/roles`,options:n})}updateClientRoles(e,t,n,i){return this.httpClient.request({method:"PUT",url:i0`user/${e}/${t}/roles`,data:n,options:i})}get(e,t,n){return this.httpClient.request({method:"GET",url:i0`user/${e}/${t}`,options:n})}}class ij{constructor(e){this.httpClient=e}createAlarm(e,t,n){return this.httpClient.request({method:"POST",url:i0`alarm`,queryParams:t,data:e,options:n})}getAlarms(e,t){return this.httpClient.request({method:"GET",url:i0`alarm`,queryParams:e,options:t})}removeAlarms(e,t){return this.httpClient.request({method:"DELETE",url:i0`alarm`,data:e,options:t})}setAssetLinks(e,t){return this.httpClient.request({method:"PUT",url:i0`alarm/assets`,data:e,options:t})}getAlarm(e,t){return this.httpClient.request({method:"GET",url:i0`alarm/${e}`,options:t})}removeAlarm(e,t){return this.httpClient.request({method:"DELETE",url:i0`alarm/${e}`,options:t})}updateAlarm(e,t,n){return this.httpClient.request({method:"PUT",url:i0`alarm/${e}`,data:t,options:n})}getAssetLinks(e,t,n){return this.httpClient.request({method:"GET",url:i0`alarm/${e}/assets`,queryParams:t,options:n})}}class iU{constructor(e){this.httpClient=e}getManagerConfig(e){return this.httpClient.request({method:"GET",url:i0`configuration/manager`,options:e})}update(e,t){return this.httpClient.request({method:"PUT",url:i0`configuration/manager`,data:e,options:t})}fileUpload(e,t,n){return this.httpClient.request({method:"POST",url:i0`configuration/manager/file`,queryParams:t,data:e,options:n})}getManagerConfigImage(e,t){return this.httpClient.request({method:"GET",url:i0`configuration/manager/image/${e}`,options:t})}}class iW{constructor(e){this.httpClient=e}getHealthStatus(e){return this.httpClient.request({method:"GET",url:i0`health`,options:e})}getInfo(e){return this.httpClient.request({method:"GET",url:i0`info`,options:e})}}class iV{constructor(e){this.httpClient=e}register(e,t){return this.httpClient.request({method:"POST",url:i0`console/register`,data:e,options:t})}}class iG{constructor(e){this.httpClient=e}getSettings(e){return this.httpClient.request({method:"GET",url:i0`map`,options:e})}saveSettings(e,t){return this.httpClient.request({method:"PUT",url:i0`map`,data:e,options:t})}deleteMap(e){return this.httpClient.request({method:"DELETE",url:i0`map/deleteMap`,options:e})}getCustomMapInfo(e){return this.httpClient.request({method:"GET",url:i0`map/getCustomMapInfo`,options:e})}getSettingsJs(e){return this.httpClient.request({method:"GET",url:i0`map/js`,options:e})}getTile(e,t,n,i){return this.httpClient.request({method:"GET",url:i0`map/tile/${e}/${t}/${n}`,options:i})}uploadMap(e,t){return this.httpClient.request({method:"POST",url:i0`map/upload`,queryParams:e,options:t})}}class i${constructor(e){this.httpClient=e}getNotifications(e,t){return this.httpClient.request({method:"GET",url:i0`notification`,queryParams:e,options:t})}removeNotifications(e,t){return this.httpClient.request({method:"DELETE",url:i0`notification`,queryParams:e,options:t})}sendNotification(e,t){return this.httpClient.request({method:"POST",url:i0`notification/alert`,data:e,options:t})}removeNotification(e,t){return this.httpClient.request({method:"DELETE",url:i0`notification/${e}`,options:t})}notificationAcknowledged(e,t,n,i){return this.httpClient.request({method:"PUT",url:i0`notification/${e}/acknowledged`,queryParams:n,data:t,options:i})}notificationDelivered(e,t,n){return this.httpClient.request({method:"PUT",url:i0`notification/${e}/delivered`,queryParams:t,options:n})}}class iq{constructor(e){this.httpClient=e}deleteConnections(e,t){return this.httpClient.request({method:"DELETE",url:i0`gateway/connection`,queryParams:e,options:t})}getConnections(e){return this.httpClient.request({method:"GET",url:i0`gateway/connection`,options:e})}deleteConnection(e,t){return this.httpClient.request({method:"DELETE",url:i0`gateway/connection/${e}`,options:t})}getConnection(e,t){return this.httpClient.request({method:"GET",url:i0`gateway/connection/${e}`,options:t})}setConnection(e,t,n){return this.httpClient.request({method:"PUT",url:i0`gateway/connection/${e}`,data:t,options:n})}getConnectionStatus(e,t){return this.httpClient.request({method:"GET",url:i0`gateway/status/${e}`,options:t})}}class iX{constructor(e){this.httpClient=e}getAssetDescriptors(e,t){return this.httpClient.request({method:"GET",url:i0`model/assetDescriptors`,queryParams:e,options:t})}getAssetInfo(e,t,n){return this.httpClient.request({method:"GET",url:i0`model/assetInfo/${e}`,queryParams:t,options:n})}getAssetInfos(e,t){return this.httpClient.request({method:"GET",url:i0`model/assetInfos`,queryParams:e,options:t})}getValueDescriptorSchema(e,t){return this.httpClient.request({method:"GET",url:i0`model/getValueDescriptorSchema`,queryParams:e,options:t})}getMetaItemDescriptors(e,t){return this.httpClient.request({method:"GET",url:i0`model/metaItemDescriptors`,queryParams:e,options:t})}getValueDescriptors(e,t){return this.httpClient.request({method:"GET",url:i0`model/valueDescriptors`,queryParams:e,options:t})}}class iK{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:i0`realm`,data:e,options:t})}getAll(e){return this.httpClient.request({method:"GET",url:i0`realm`,options:e})}getAccessible(e){return this.httpClient.request({method:"GET",url:i0`realm/accessible`,options:e})}delete(e,t){return this.httpClient.request({method:"DELETE",url:i0`realm/${e}`,options:t})}get(e,t){return this.httpClient.request({method:"GET",url:i0`realm/${e}`,options:t})}update(e,t,n){return this.httpClient.request({method:"PUT",url:i0`realm/${e}`,data:t,options:n})}}class iJ{constructor(e){this.httpClient=e}getApps(e){return this.httpClient.request({method:"GET",url:i0`apps`,options:e})}getConsoleConfig(e){return this.httpClient.request({method:"GET",url:i0`apps/consoleConfig`,options:e})}getAppInfos(e){return this.httpClient.request({method:"GET",url:i0`apps/info`,options:e})}}class iZ{constructor(e){this.httpClient=e}getServices(e,t){return this.httpClient.request({method:"GET",url:i0`service`,queryParams:e,options:t})}registerService(e,t){return this.httpClient.request({method:"POST",url:i0`service`,data:e,options:t})}getGlobalServices(e){return this.httpClient.request({method:"GET",url:i0`service/global`,options:e})}registerGlobalService(e,t){return this.httpClient.request({method:"POST",url:i0`service/global`,data:e,options:t})}deregisterService(e,t,n){return this.httpClient.request({method:"DELETE",url:i0`service/${e}/${t}`,options:n})}getService(e,t,n){return this.httpClient.request({method:"GET",url:i0`service/${e}/${t}`,options:n})}heartbeat(e,t,n){return this.httpClient.request({method:"PUT",url:i0`service/${e}/${t}`,options:n})}}class iQ{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:i0`asset`,data:e,options:t})}delete(e,t){return this.httpClient.request({method:"DELETE",url:i0`asset`,queryParams:e,options:t})}writeAttributeValues(e,t){return this.httpClient.request({method:"PUT",url:i0`asset/attributes`,data:e,options:t})}writeAttributeEvents(e,t){return this.httpClient.request({method:"PUT",url:i0`asset/attributes/timestamp`,data:e,options:t})}updateNoneParent(e,t){return this.httpClient.request({method:"DELETE",url:i0`asset/parent`,queryParams:e,options:t})}getPartial(e,t){return this.httpClient.request({method:"GET",url:i0`asset/partial/${e}`,options:t})}queryAssets(e,t){return this.httpClient.request({method:"POST",url:i0`asset/query`,data:e,options:t})}queryAssetTree(e,t){return this.httpClient.request({method:"POST",url:i0`asset/tree`,data:e,options:t})}getCurrentUserAssets(e){return this.httpClient.request({method:"GET",url:i0`asset/user/current`,options:e})}createUserAssetLinks(e,t){return this.httpClient.request({method:"POST",url:i0`asset/user/link`,data:e,options:t})}getUserAssetLinks(e,t){return this.httpClient.request({method:"GET",url:i0`asset/user/link`,queryParams:e,options:t})}deleteUserAssetLinks(e,t){return this.httpClient.request({method:"POST",url:i0`asset/user/link/delete`,data:e,options:t})}deleteAllUserAssetLinks(e,t,n){return this.httpClient.request({method:"DELETE",url:i0`asset/user/link/${e}/${t}`,options:n})}deleteUserAssetLink(e,t,n,i){return this.httpClient.request({method:"DELETE",url:i0`asset/user/link/${e}/${t}/${n}`,options:i})}get(e,t){return this.httpClient.request({method:"GET",url:i0`asset/${e}`,options:t})}update(e,t,n){return this.httpClient.request({method:"PUT",url:i0`asset/${e}`,data:t,options:n})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName(e,t,n,i){return this.httpClient.request({method:"PUT",url:i0`asset/${e}/attribute/${t}`,data:n,options:i})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName_timestamp(e,t,n,i,o){return this.httpClient.request({method:"PUT",url:i0`asset/${e}/attribute/${t}/${n}`,data:i,options:o})}updateParent(e,t,n){return this.httpClient.request({method:"PUT",url:i0`asset/${e}/child`,queryParams:t,options:n})}}function i0(e,...t){let n="";for(let i=0;i<t.length;i++)n+=e[i],n+=encodeURIComponent(t[i]);return n+e[e.length-1]}class i1{constructor(e,t=iS().create()){this._rulesResource=new i5(e,t),this._gatewayServiceResource=new i3(e,t),this._assetDatapointResource=new i4(e,t),this._dashboardResource=new i6(e,t),this._assetPredictedDatapointResource=new i8(e,t),this._provisioningResource=new i7(e,t),this._flowResource=new i9(e,t),this._agentResource=new oe(e,t),this._syslogResource=new ot(e,t),this._userResource=new on(e,t),this._alarmResource=new oi(e,t),this._configurationResource=new oo(e,t),this._statusResource=new or(e,t),this._consoleResource=new oa(e,t),this._mapResource=new os(e,t),this._notificationResource=new ol(e,t),this._gatewayClientResource=new oc(e,t),this._assetModelResource=new od(e,t),this._realmResource=new ou(e,t),this._appResource=new om(e,t),this._externalServiceResource=new of(e,t),this._assetResource=new op(e,t),this._assetResource=new op(e,t)}get RulesResource(){return this._rulesResource}get GatewayServiceResource(){return this._gatewayServiceResource}get AssetDatapointResource(){return this._assetDatapointResource}get DashboardResource(){return this._dashboardResource}get AssetPredictedDatapointResource(){return this._assetPredictedDatapointResource}get ProvisioningResource(){return this._provisioningResource}get FlowResource(){return this._flowResource}get AgentResource(){return this._agentResource}get SyslogResource(){return this._syslogResource}get UserResource(){return this._userResource}get AlarmResource(){return this._alarmResource}get ConfigurationResource(){return this._configurationResource}get StatusResource(){return this._statusResource}get ConsoleResource(){return this._consoleResource}get MapResource(){return this._mapResource}get NotificationResource(){return this._notificationResource}get GatewayClientResource(){return this._gatewayClientResource}get AssetModelResource(){return this._assetModelResource}get RealmResource(){return this._realmResource}get AppResource(){return this._appResource}get ExternalServiceResource(){return this._externalServiceResource}get AssetResource(){return this._assetResource}}class i2{constructor(e){this.axios=e}request(e){let t={};t.method=e.method,t.url=e.url,t.params=e.queryParams,t.data=e.data,function(e,t){if(void 0!=t)for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}(t,e.options);let n=e.copyFn;return this.axios.request(t).then(e=>(n&&e.data&&(e.originalData=e.data,e.data=n(e.data)),e))}}class i5 extends iL{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class i3 extends iI{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class i4 extends iO{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class i6 extends iR{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class i8 extends iY{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class i7 extends iP{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class i9 extends iN{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class oe extends iB{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class ot extends iH{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class on extends iz{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class oi extends ij{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class oo extends iU{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class or extends iW{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class oa extends iV{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class os extends iG{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class ol extends i${constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class oc extends iq{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class od extends iX{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class ou extends iK{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class om extends iJ{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class of extends iZ{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}class op extends iQ{constructor(e,t=iS().create()){t.defaults.baseURL=e,super(new i2(t))}}let oh=iS().isAxiosError,ob=new class{get api(){return this._client}constructor(){this._axiosInstance=iS().create(),this._axiosInstance.defaults.headers.common["Content-Type"]="application/json",this._axiosInstance.interceptors.request.use(e=>(e.paramsSerializer=e=>ib().stringify(e,{arrayFormat:"repeat"}),e))}get axiosInstance(){return this._axiosInstance}get baseUrl(){return this._baseUrl}setTimeout(e){this._axiosInstance.defaults.timeout=e}addRequestInterceptor(e){this._axiosInstance.interceptors.request.use(e)}initialise(e){this._baseUrl=e,this._client=new i1(e,this._axiosInstance)}};var og=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})};!function(e){e.DISCONNECTED="DISCONNECTED",e.CONNECTED="CONNECTED",e.CONNECTING="CONNECTING"}(ef||(ef={}));let o_="SUBSCRIBED:",oy="UNAUTHORIZED:",ov="TRIGGERED:",oF="EVENT:";class ox{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=ow.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=ef.DISCONNECTED,this._connectingDeferred=null,this._statusCallbacks=[],this._pendingSubscription=null,this._queuedSubscriptions=[],this._subscriptionMap=new Map,this._assetEventCallbackMap=new Map,this._attributeEventCallbackMap=new Map,this._unloading=!1}get status(){return this._status}subscribeStatusChange(e){this._statusCallbacks.push(e)}unsubscribeStatusChange(e){!function(e,t){if(0===e.length)return;let n=e.indexOf(t);n>=0&&e.splice(n,1)}(this._statusCallbacks,e)}connect(){return(this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this._status===ef.CONNECTED)?Promise.resolve(!0):(this._disconnectRequested=!1,this._connectingDeferred||(this._onStatusChanged(ef.CONNECTING),this._connectingDeferred=new iy,this._doConnect().then(e=>{if(this._connectingDeferred){let t=this._connectingDeferred;this._connectingDeferred=null,e?(console.debug("Connected to event service: "+this.endpointUrl),this._reconnectDelayMillis=ow.MIN_RECONNECT_DELAY,this._onStatusChanged(ef.CONNECTED),window.setTimeout(()=>{this._onConnect()},0)):(console.debug("Failed to connect to event service: "+this.endpointUrl),this._scheduleReconnect()),t.resolve(e)}})),this._connectingDeferred.promise)}disconnect(){console.debug("Disconnecting from event service: "+this.endpointUrl),this._disconnectRequested||(this._disconnectRequested=!0,this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this.status!==ef.DISCONNECTED&&this._doDisconnect())}subscribe(e,t){let n={eventSubscription:e,callback:t,deferred:new iy};return null!=this._pendingSubscription||this._status!==ef.CONNECTED?(this._queuedSubscriptions.push(n),n.deferred.promise):(this._pendingSubscription=n,this._doSubscribe(e).then(e=>{if(this._pendingSubscription){let t=this._pendingSubscription;this._pendingSubscription=null,this._subscriptionMap.set(e,t),this._processNextSubscription();let n=t.deferred;t.deferred=null,n&&n.resolve(e)}},e=>{if(this._pendingSubscription){let t=this._pendingSubscription;this._pendingSubscription=null,this._processNextSubscription();let n=t.deferred;t.deferred=null,n&&n.reject(e)}}),this._pendingSubscription.deferred.promise)}unsubscribe(e){return og(this,void 0,void 0,function*(){if(this._subscriptionMap.delete(e))return void this._doUnsubscribe(e);if(this._assetEventCallbackMap.delete(e)){if(this._assetEventPromise&&0===this._assetEventCallbackMap.size){let e=yield this._assetEventPromise;this._assetEventPromise=void 0,this.unsubscribe(e)}return}if(this._attributeEventCallbackMap.delete(e)){if(this._attributeEventPromise&&0===this._attributeEventCallbackMap.size){let e=yield this._attributeEventPromise;this._attributeEventPromise=void 0,this.unsubscribe(e)}return}})}sendEvent(e){this._status===ef.CONNECTED&&this._doSend(e)}sendEventWithReply(e){return this._status!==ef.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(e)}subscribeAssetEvents(e,t,n){return og(this,void 0,void 0,function*(){let i=e&&"string"!=typeof e[0]?e.map(e=>e.id):e,o="AssetEvent"+ox._subscriptionCounter++;if(!this._assetEventPromise){let e;o9.authenticated||(e={filterType:"asset",realm:o9.displayRealm});let t={eventType:"asset",filter:e};this._assetEventPromise=this.subscribe(t,e=>{this._assetEventCallbackMap.forEach(t=>t(e))})}return this._assetEventCallbackMap.set(o,e=>{let t=e.asset.id;i?i.find(e=>t===e)&&n(e):e.asset.realm===o9.displayRealm&&n(e)}),this._assetEventPromise.then(()=>{try{if(i&&t){let e={messageID:"read-assets:"+i.join(",")+":"+o,eventType:"read-assets",assetQuery:{ids:i}};this.sendEventWithReply(e).then(e=>{e.assets&&this._assetEventCallbackMap.has(o)&&e.assets.forEach(e=>{n({eventType:"asset",asset:e,cause:"READ"})})})}}catch(t){throw console.error("Failed to subscribe to asset events for assets: "+e),o&&this.unsubscribe(o),t}return o})})}subscribeAttributeEvents(e,t,n){return og(this,void 0,void 0,function*(){let i=e&&"string"!=typeof e[0],o=i?e.map(e=>e.id):e,r=i?e:void 0,a="AttributeEvent"+ox._subscriptionCounter++;if(!this._attributeEventPromise){let e;o9.authenticated||(e={filterType:"asset",realm:o9.displayRealm});let t={eventType:"attribute",filter:e};this._attributeEventPromise=this.subscribe(t,e=>{this._attributeEventCallbackMap.forEach(t=>t(e))})}let s=t=>{let r=t.ref;i?e.forEach(e=>{r.id===e.id&&r.name===e.name&&n(t)}):o?o.find(e=>r.id===e)&&n(t):t.realm===o9.displayRealm&&n(t)};return this._attributeEventCallbackMap.set(a,s),this._attributeEventPromise.then(()=>{try{if(t&&o){let e={messageID:"read-assets:"+o.join(",")+":"+a,eventType:"read-assets",assetQuery:{ids:o}};this.sendEventWithReply(e).then(e=>{e.assets&&this._attributeEventCallbackMap.has(a)&&e.assets.forEach(e=>{e.attributes&&Object.entries(e.attributes).forEach(([t,n])=>{(!r||r.find(n=>n.id===e.id&&n.name===t))&&s({eventType:"attribute",timestamp:n.timestamp,value:n.value,ref:{id:e.id,name:t}})})})})}}catch(t){throw console.error("Failed to subscribe to asset events for assets: "+e),a&&this.unsubscribe(a),t}return a})})}_processNextSubscription(){this._status===ef.CONNECTED&&0!==this._queuedSubscriptions.length&&setTimeout(()=>{let e=this._queuedSubscriptions.shift();e&&this.subscribe(e.eventSubscription,e.callback).then(t=>{let n=e.deferred;e.deferred=null,n&&n.resolve(t)},t=>{let n=e.deferred;e.deferred=null,n&&n.reject(t)})},0)}_onStatusChanged(e){e!==this._status&&(console.debug("Event provider status changed: "+e),this._status=e,this._unloading||window.setTimeout(()=>{this._statusCallbacks.forEach(t=>t(e))},0))}_onMessageReceived(e,t){let n=this._subscriptionMap.get(e);n&&n.callback(t)}_onConnect(){if(Object.keys(this._subscriptionMap).length>0){for(let e in this._subscriptionMap)this._subscriptionMap.has(e)&&this._queuedSubscriptions.unshift(this._subscriptionMap.get(e));this._subscriptionMap.clear()}this._processNextSubscription()}_onDisconnect(){this._status===ef.CONNECTED&&this._onStatusChanged(ef.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(ef.CONNECTING),this._scheduleReconnect()}_scheduleReconnect(){this._reconnectTimer||!this._disconnectRequested&&(console.debug("Event provider scheduling reconnect in "+this._reconnectDelayMillis+"ms"),this._reconnectTimer=window.setTimeout(()=>{this._disconnectRequested||this.connect()},this._reconnectDelayMillis),this._reconnectDelayMillis<ow.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(ow.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}ox.MIN_RECONNECT_DELAY=0,ox.MAX_RECONNECT_DELAY=3e4,ox._subscriptionCounter=0;class ow extends ox{get endpointUrl(){return this._endpointUrl}constructor(e){super(),this._webSocket=void 0,this._connectDeferred=null,this._subscribeDeferred=null,this._repliesDeferred=new Map,this._endpointUrl=(e.startsWith("https:")?"wss":"ws")+"://"+e.substr(e.indexOf("://")+3)+"/websocket/events",window.addEventListener("beforeunload",()=>{this._unloading=!0,this.disconnect()})}_doConnect(){let e=this._endpointUrl+"?Realm="+o9.config.realm;return o9.authenticated&&(e+="&Authorization="+o9.getAuthorizationHeader()),this._webSocket=new WebSocket(e),this._connectDeferred=new iy,this._webSocket.onopen=()=>{if(this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.resolve(!0)}},this._webSocket.onerror=e=>{if(this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.resolve(!1)}else console.debug("Event provider error"),this._beforeDisconnect()},this._webSocket.onclose=()=>{if(this._webSocket=void 0,this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.resolve(!1)}else this._beforeDisconnect()},this._webSocket.onmessage=e=>{let t=e.data;if(t&&t.startsWith(o_)){let e=JSON.parse(t.substring(o_.length)),n=this._subscribeDeferred;this._subscribeDeferred=null,n&&n.resolve(e.subscriptionId)}else if(t.startsWith(oy)){let e=JSON.parse(t.substring(oy.length)),n=this._subscribeDeferred;this._subscribeDeferred=null,n&&(console.warn("Unauthorized event subscription: "+JSON.stringify(e,null,2)),n.reject("Unauthorized"))}else if(t.startsWith(ov)){let e=JSON.parse(t.substring(ov.length));e.events&&e.events.forEach(t=>{this._onMessageReceived(e.subscriptionId,t)})}else if(t.startsWith(oF)){let e=JSON.parse(t.substring(oF.length));if(e.messageID){let t=this._repliesDeferred.get(e.messageID);this._repliesDeferred.delete(e.messageID),t&&t.resolve(e)}}},this._connectDeferred.promise}_beforeDisconnect(){this._onDisconnect()}_doDisconnect(){var e;null==(e=this._webSocket)||e.close(),this._subscribeDeferred=null,this._repliesDeferred.clear()}_doSubscribe(e){return this._webSocket?this._subscribeDeferred?Promise.reject("There's already a pending subscription"):(this._subscribeDeferred=new iy,e.subscriptionId||(e.subscriptionId=ow._subscriptionCounter+++""),this._webSocket.send("SUBSCRIBE:"+JSON.stringify(e)),this._subscribeDeferred.promise):Promise.reject("Not connected")}_doUnsubscribe(e){this._webSocket&&this._webSocket.send("UNSUBSCRIBE:"+JSON.stringify({subscriptionId:e}))}_doSend(e){let t=oF+JSON.stringify(e);this._webSocket.send(t)}_doSendWithReply(e){if(e.messageID||(e.messageID=(new Date().getTime()+10*Math.random()).toString(10)),this._repliesDeferred.has(e.messageID))return Promise.reject("There's already a pending send and reply with this ID");let t=new iy;return this._repliesDeferred.set(e.messageID,t),this._webSocket.send(oF+JSON.stringify(e)),t.promise}}function ok(e){return(ok="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}ow._subscriptionCounter=1;var oE=[],oT=oE.forEach,oM=oE.slice;function oA(e){return oT.call(oM.call(arguments,1),function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e}function oC(){return"function"==typeof XMLHttpRequest||("undefined"==typeof XMLHttpRequest?"undefined":ok(XMLHttpRequest))==="object"}var oD=n(6850),oS=n.t(oD,2);function oL(e){return(oL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"function"==typeof fetch&&(ep="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),oC()&&("undefined"!=typeof global&&global.XMLHttpRequest?eh=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(eh=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?eb=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(eb=window.ActiveXObject)),ep||!oS||eh||eb||(ep=oD||oS),"function"!=typeof ep&&(ep=void 0);var oI=function(e,t){if(t&&"object"===oL(t)){var n="";for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},oO=function(e,t,n){ep(e,t).then(function(e){if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then(function(t){n(null,{status:e.status,data:t})}).catch(n)}).catch(n)},oR=!1,oY=function(e,t,n,i){e.queryStringParams&&(t=oI(t,e.queryStringParams));var o=oA({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);n&&(o["Content-Type"]="application/json");var r="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,a=oA({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o},oR?{}:r);try{oO(t,a,i)}catch(e){if(!r||0===Object.keys(r).length||!e.message||0>e.message.indexOf("not implemented"))return i(e);try{Object.keys(r).forEach(function(e){delete a[e]}),oO(t,a,i),oR=!0}catch(e){i(e)}}},oP=function(e,t,n,i){n&&"object"===oL(n)&&(n=oI("",n).slice(1)),e.queryStringParams&&(t=oI(t,e.queryStringParams));try{(o=eh?new eh:new eb("MSXML2.XMLHTTP.3.0")).open(n?"POST":"GET",t,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,n&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var o,r=e.customHeaders;if(r="function"==typeof r?r():r)for(var a in r)o.setRequestHeader(a,r[a]);o.onreadystatechange=function(){o.readyState>3&&i(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(n)}catch(e){console&&console.log(e)}};let oN=function(e,t,n,i){return("function"==typeof n&&(i=n,n=void 0),i=i||function(){},ep)?oY(e,t,n,i):oC()||"function"==typeof ActiveXObject?oP(e,t,n,i):void i(Error("No fetch and no xhr implementation found!"))};var oB=function(){var e;function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.services=e,this.options=n,this.allOptions=i,this.type="backend",this.init(e,n,i)}return e=[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=oA(n,this.options||{},{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){var i,o;return i={},o=n||"",t in i?Object.defineProperty(i,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[t]=o,i},request:oN,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}),this.allOptions=i,this.services&&this.options.reloadInterval&&setInterval(function(){return t.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(e,t,n){this._readAny(e,e,t,t,n)}},{key:"read",value:function(e,t,n){this._readAny([e],e,[t],t,n)}},{key:"_readAny",value:function(e,t,n,i,o){var r,a,s=this,l=this.options.loadPath;"function"==typeof this.options.loadPath&&(l=this.options.loadPath(e,n)),(l=(a=r=l)&&"function"==typeof a.then?r:Promise.resolve(r)).then(function(r){if(!r)return o(null,{});var a=s.services.interpolator.interpolate(r,{lng:e.join("+"),ns:n.join("+")});s.loadUrl(a,o,t,i)})}},{key:"loadUrl",value:function(e,t,n,i){var o=this;this.options.request(this.options,e,void 0,function(r,a){var s,l;if(a&&(a.status>=500&&a.status<600||!a.status))return t("failed loading "+e+"; status code: "+a.status,!0);if(a&&a.status>=400&&a.status<500)return t("failed loading "+e+"; status code: "+a.status,!1);if(!a&&r&&r.message&&r.message.indexOf("Failed to fetch")>-1)return t("failed loading "+e+": "+r.message,!0);if(r)return t(r,!1);try{s="string"==typeof a.data?o.options.parse(a.data,n,i):a.data}catch(t){l="failed parsing "+e+" to json"}if(l)return t(l,!1);t(null,s)})}},{key:"create",value:function(e,t,n,i,o){var r=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var a=this.options.parsePayload(t,n,i),s=0,l=[],c=[];e.forEach(function(n){var i=r.options.addPath;"function"==typeof r.options.addPath&&(i=r.options.addPath(n,t));var d=r.services.interpolator.interpolate(i,{lng:n,ns:t});r.options.request(r.options,d,a,function(t,n){s+=1,l.push(t),c.push(n),s===e.length&&o&&o(l,c)})})}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,i=t.languageUtils,o=t.logger,r=n.language;if(!r||"cimode"!==r.toLowerCase()){var a=[],s=function(e){i.toResolveHierarchy(e).forEach(function(e){0>a.indexOf(e)&&a.push(e)})};s(r),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return s(e)}),a.forEach(function(t){e.allOptions.ns.forEach(function(e){n.read(t,e,"read",null,null,function(i,r){i&&o.warn("loading namespace ".concat(e," for language ").concat(t," failed"),i),!i&&r&&o.log("loaded namespace ".concat(e," for language ").concat(t),r),n.loaded("".concat(t,"|").concat(e),i,r)})})})}}}],function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}();oB.type="backend";let oH={ATTRIBUTE:1,CHILD:2},oz=e=>(...t)=>({_$litDirective$:e,values:t});class oj{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}class oU extends oj{constructor(e){if(super(e),this.it=tZ,e.type!==oH.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===tZ||null==e)return this._t=void 0,this.it=e;if(e===tJ)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}oU.directiveName="unsafeHTML",oU.resultType=1,oz(oU);class oW extends oU{}oW.directiveName="unsafeSVG",oW.resultType=2;let oV=oz(oW),oG={size:24,icons:{logo:'<path style=\'pointer-events: var(--or-icon-pointer-events, none);\' fill="#C4D600" d="m11.96125,23.85096c-6.56773,0 -11.90971,-5.34202 -11.90971,-11.90862l2.49411,0c0,5.19176 4.22389,9.41568 9.41561,9.41568c5.19053,0 9.41561,-4.22392 9.41561,-9.41568c0,-5.19176 -4.22389,-9.41568 -9.41561,-9.41568l0,-2.49413c6.56655,0 11.90971,5.34439 11.90971,11.9098c0,6.5666 -5.34316,11.90862 -11.90971,11.90862l0,0z" /><path fill="#4E9D2D" d="m10.25094,20.38647c-2.26848,-0.47231 -4.21822,-1.80199 -5.48741,-3.74009s-1.70892,-4.25777 -1.23545,-6.52625c0.47347,-2.26965 1.80315,-4.21822 3.74242,-5.48857c1.93926,-1.27035 4.25661,-1.70892 6.52625,-1.23545c4.68471,0.97719 7.70121,5.5828 6.72286,10.26635l-2.39994,-0.49907c0.70149,-3.36085 -1.4623,-6.66585 -4.82431,-7.36734c-1.62866,-0.33969 -3.29105,-0.02559 -4.68238,0.88645c-1.39134,0.91088 -2.34526,2.3092 -2.68495,3.93786c-0.33853,1.62633 -0.02443,3.28988 0.88645,4.68122c0.91088,1.39134 2.3092,2.34526 3.93786,2.68379l-0.50139,2.4011l0,0z"/><path fill="#1D5632"d="m12.03064,17.49616c-0.09524,0 -0.19048,-0.00116 -0.28457,-0.00465c-1.49833,-0.0755 -2.87818,-0.72942 -3.88636,-1.84097c-1.00818,-1.11271 -1.52156,-2.54948 -1.44722,-4.05013l2.44378,0.12196c-0.04181,0.84557 0.24856,1.65745 0.81769,2.28466c0.56681,0.62721 1.34733,0.99656 2.1929,1.03838c0.84208,0.03833 1.65629,-0.2474 2.2835,-0.81653c0.62837,-0.56797 0.99656,-1.34617 1.03954,-2.19174c0.08711,-1.74573 -1.26371,-3.23708 -3.00943,-3.3242l0.12196,-2.44378c3.09422,0.15332 5.4869,2.79455 5.33358,5.88877c-0.07434,1.49949 -0.72942,2.87818 -1.84097,3.8852c-1.04186,0.94313 -2.36945,1.45303 -3.7644,1.45303l0,0z"/>',"logo-plain":"m11.9925,23.91349c-6.58498,0 -11.94099,-5.35605 -11.94099,-11.9399l2.50066,0c0,5.20539 4.23498,9.44041 9.44033,9.44041c5.20416,0 9.44033,-4.23502 9.44033,-9.44041c0,-5.20539 -4.23498,-9.44041 -9.44033,-9.44041l0,-2.50068c6.5838,0 11.94099,5.35842 11.94099,11.94108c0,6.58385 -5.35719,11.9399 -11.94099,11.9399l0,0zm-1.80787,-3.27769c-2.31323,-0.48163 -4.30141,-1.83755 -5.59563,-3.81389s-1.74263,-4.34178 -1.25982,-6.65502c0.48281,-2.31443 1.83872,-4.30145 3.81623,-5.59686c1.97751,-1.29542 4.34056,-1.74264 6.65497,-1.25983c4.77711,0.99647 7.8531,5.69295 6.85545,10.46891l-2.44727,-0.50891c0.71532,-3.42716 -1.49114,-6.79738 -4.91946,-7.5127c-1.66078,-0.34639 -3.35596,-0.0261 -4.77474,0.90394c-1.41878,0.92886 -2.39152,2.35476 -2.73791,4.01555c-0.3452,1.65842 -0.02491,3.3548 0.90394,4.77359c0.92885,1.41879 2.35475,2.39154 4.01552,2.73675l-0.51128,2.44848l0,0zm1.81499,-2.92536c-0.09727,0 -0.19455,-0.00119 -0.29064,-0.00475c-1.53029,-0.07711 -2.93958,-0.74498 -3.96926,-1.88025c-1.02968,-1.13646 -1.55401,-2.60388 -1.47809,-4.13655l2.49591,0.12456c-0.04271,0.86361 0.25386,1.69282 0.83513,2.33341c0.5789,0.64059 1.37607,1.01783 2.23968,1.06053c0.86005,0.03915 1.69162,-0.25268 2.33221,-0.83395c0.64177,-0.58009 1.01782,-1.3749 1.06171,-2.23851c0.08897,-1.78298 -1.29066,-3.30616 -3.07362,-3.39513l0.12456,-2.49593c3.16022,0.15659 5.60394,2.85419 5.44735,6.01443c-0.07592,1.53149 -0.74498,2.9396 -1.88024,3.9681c-1.06408,0.96326 -2.41999,1.48403 -3.8447,1.48403l0,0z",marker:'<ellipse fill="#000" opacity="0.2" ry="1.5" rx="4" cy="22.5" cx="12" /><path style=\'pointer-events: var(--or-icon-pointer-events, none);\' d="m11.999999,0a8.437501,8.344057 0 0 1 8.437501,8.344057c0,6.500779 -5.798864,6.280799 -8.437501,14.412461c-2.638637,-8.131662 -8.437501,-7.911683 -8.437501,-14.412461a8.437501,8.344057 0 0 1 8.437501,-8.344057z" />'}};var o$=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let oq=n(7319);class oX extends CustomEvent{constructor(){super(oX.NAME,{bubbles:!0,composed:!0})}}oX.NAME="or-iconset-added";let oK=new class{constructor(){this._icons={}}addIconSet(e,t){this._icons[e]=t,this._defaultIconSet||(this._defaultIconSet=t),t.onAdd&&t.onAdd(),window.dispatchEvent(new oX)}getIconSet(e){return this._icons[e]}getIconTemplate(e){if(!e)return tK``;let t=(e||"").split(":"),n=t.pop(),i=t.pop(),o=this._defaultIconSet;return(i&&(o=this.getIconSet(i)),n&&o)?o.getIconTemplate(n):tK``}},oJ=class extends nr{constructor(){super(...arguments),this._handler=e=>{this._updateIcon()}}static get styles(){return[tf`
|
|
13
13
|
:host {
|
|
14
14
|
--internal-or-icon-width: var(--or-icon-width, 24px);
|
|
15
15
|
--internal-or-icon-height: var(--or-icon-height, 24px);
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
viewBox="0 0 ${t} ${t}" preserveAspectRatio="xMidYMid meet" focusable="false">
|
|
58
58
|
${oV(i.startsWith("<")?i:'<path xmlns="http://www.w3.org/2000/svg" d="'+i+'" />')}
|
|
59
59
|
</svg>
|
|
60
|
-
`:tK``},onAdd:void 0})))}getConsoleAppConfig(){return o4(this,void 0,void 0,function*(){var e;try{let t=yield fetch((null!=(e=o7.managerUrl)?e:"")+"/consoleappconfig/"+o7.displayRealm+".json");return this._consoleAppConfig=yield t.json(),!0}catch(e){return!0}})}getConsolePreferredLanguage(){return o4(this,arguments,void 0,function*(e=this.console){return e.retrieveData("LANGUAGE")})}getUserPreferredLanguage(){return o4(this,arguments,void 0,function*(e=this._keycloak){if(e&&e.authenticated){let t=(null==e?void 0:e.profile)||(yield null==e?void 0:e.loadUserProfile());if(null==t?void 0:t.attributes){let e=new Map(Object.entries(t.attributes));if(e.has("locale")){let t=e.get("locale");if("string"==typeof t[0])return t[0]}console.warn("Could not get user language from keycloak: no user attributes were found.")}else console.warn("Could not get user language from keycloak: no valid keycloak user profile was found.")}})}updateKeycloakUserLanguage(e){return o4(this,arguments,void 0,function*(e,t=this.rest){return this.authenticated?t?void(yield t.api.UserResource.updateCurrentUserLocale(e,{headers:{"Content-Type":"application/json"}})):void console.warn("Tried updating user language, but the REST API is not initialized yet."):void console.warn("Tried updating user language, but the user is not authenticated.")})}logout(e){this._authenticated&&(this._authenticated=!0,this._keycloak?(this.isMobile()&&this.console.storeData("REFRESH_TOKEN",null),this._keycloakUpdateTokenInterval&&(window.clearTimeout(this._keycloakUpdateTokenInterval),this._keycloakUpdateTokenInterval=void 0),this._keycloak.logout(e&&""!==e?{redirectUri:e}:void 0)):this._basicIdentity&&(this._basicIdentity=void 0,e?window.location.href=e:window.location.reload()))}login(e){switch(this._config.auth){case"BASIC":e&&e.credentials&&(this._config.credentials=Object.assign({},e.credentials)),this.doBasicLogin();break;case"KEYCLOAK":if(this._keycloak){let t={};e&&e.redirectUrl&&""!==e.redirectUrl&&(t.redirectUri=e.redirectUrl),(null==e?void 0:e.action)&&""!==e.action&&(t.action=e.action),this.isMobile()&&(t.scope="offline_access"),this._keycloak.login(t)}}}initialiseBasicAuth(){return o4(this,void 0,void 0,function*(){return this.config.basicLoginProvider?(this.config.autoLogin&&(this._readyCallback=()=>this.doBasicLogin()),!0):(console.debug("No basicLoginProvider defined on config so cannot display login UI"),!1)})}doBasicLogin(){return o4(this,void 0,void 0,function*(){var e,t,n,i;if(!this.config.basicLoginProvider)return;let o={username:(null==(e=this.config.credentials)?void 0:e.username)?null==(t=this.config.credentials)?void 0:t.username:"",password:(null==(n=this.config.credentials)?void 0:n.password)?null==(i=this.config.credentials)?void 0:i.password:"",cancel:!1},r=!1;for(this._basicIdentity={roles:void 0,token:void 0,user:void 0};!r;){if((o=yield this.config.basicLoginProvider(o.username,o.password)).cancel){console.debug("Basic authentication cancelled by user");break}if(!o.username||!o.password)continue;this._basicIdentity.token=btoa(o.username+":"+o.password);let e=!1;try{let t=yield ob.api.UserResource.getCurrent();200===t.status&&(e=!0,this._basicIdentity.user=t.data),e||401!==t.status&&403!==t.status||console.debug("Basic authentication invalid credentials, trying again")}catch(e){console.error("Basic auth failed: ",e)}if(e){console.debug("Basic authentication successful"),r=!0;let e=yield ob.api.UserResource.getCurrentUserClientRoles(this.clientId);this._basicIdentity.roles=e.data}else{console.debug("Unknown response so aborting"),this._basicIdentity=void 0;break}}r&&this._onAuthenticated()})}isSuperUser(){return!!(this.getRealm()&&"master"===this.getRealm()&&this.hasRealmRole("admin"))}isRestrictedUser(){return!!this.hasRealmRole("restricted_user")}getApiBaseUrl(){return this._config.managerUrl+"/api/"+this._config.realm+"/"}getAppName(){let e=location.pathname.split("/");return e.length>=1?e[1]:""}hasRealmRole(e){return this.isKeycloak()&&this._keycloak.hasRealmRole(e)}hasRole(e,t=this._config.clientId){let n=this.roles;return n&&n.has(t)&&n.get(t).indexOf(e)>=0}getAuthorizationHeader(){return this.getKeycloakToken()?"Bearer "+this.getKeycloakToken():this.getBasicToken()?"Basic "+this.getBasicToken():void 0}getKeycloakToken(){if(this.isKeycloak())return this._keycloak.token}getBasicToken(){return this._basicIdentity?this._basicIdentity.token:void 0}getRealm(){if(this._config)return this._config.realm}isMobile(){return this.console&&this.console.isMobile}isKeycloak(){return!!this._keycloak}_onAuthenticated(){this._authenticated=!0}loadAndInitialiseKeycloak(){return o4(this,void 0,void 0,function*(){var e,t,n,i;try{this._keycloak=new o1({clientId:this._config.clientId,realm:this._config.realm,url:this._config.keycloakUrl});let o=yield this._getNativeOfflineRefreshToken(),r=yield this._keycloak.init({checkLoginIframe:!1,onLoad:"check-sso"});if(!r&&o)try{console.error("SETTING OFFLINE TOKEN"),this._keycloak.refreshToken=o,r=yield this._updateKeycloakAccessToken()}catch(e){console.error("Failed to authenticate using offline token")}if(r)this._name=null==(e=this._keycloak.tokenParsed)?void 0:e.name,this._username=null==(t=this._keycloak.tokenParsed)?void 0:t.preferred_username,this._createTokenUpdateInterval(),this.isMobile()&&(null==(i=null==(n=this._keycloak)?void 0:n.refreshTokenParsed)?void 0:i.typ)==="Offline"&&(console.debug("Storing offline refresh token"),this.console.storeData("REFRESH_TOKEN",this._keycloak.refreshToken)),this._onAuthenticated();else if(this.config.autoLogin)return this.login(),!1;return!0}catch(e){return this._authenticated=!1,this._setError(eg.AUTH_FAILED),console.error("Failed to initialise Keycloak: "+e),!1}})}_createTokenUpdateInterval(){this._keycloakUpdateTokenInterval||(this._keycloakUpdateTokenInterval=window.setInterval(()=>o4(this,void 0,void 0,function*(){yield this._updateKeycloakAccessToken().catch(()=>{console.debug("Keycloak failed to refresh the access token"),this._onDisconnect()})}),1e4))}_updateKeycloakAccessToken(){return o4(this,void 0,void 0,function*(){let e=yield this._keycloak.updateToken(20);return console.debug("Access token update success, refreshed from server: "+e),e&&this._onAuthenticated(),e})}_getNativeOfflineRefreshToken(){return o4(this,void 0,void 0,function*(){if(this.isMobile())return yield this.console.retrieveData("REFRESH_TOKEN")})}_emitEvent(e){window.setTimeout(()=>{for(let t of this._listeners)t(e)},0)}_setError(e){this._error=e,this._emitEvent(e_.ERROR),console.warn("Error set: "+e)}_clearWebHistory(){var e;null==(e=this.console)||e._doSendGenericMessage("CLEAR_WEB_HISTORY",void 0)}_onDisconnect(){return o4(this,void 0,void 0,function*(){this._disconnected||(console.debug("Disconnected"),this._disconnected=!0,this._keycloakUpdateTokenInterval&&(window.clearTimeout(this._keycloakUpdateTokenInterval),this._keycloakUpdateTokenInterval=void 0),this._emitEvent(e_.OFFLINE),this.reconnect())})}_onReconnected(){console.debug("Reconnected"),this._disconnected=!1,this._createTokenUpdateInterval(),this._emitEvent(e_.ONLINE)}reconnect(){return o4(this,arguments,void 0,function*(e=3e3){if(!this._disconnected)return;this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=void 0);let t=()=>o4(this,void 0,void 0,function*(){var e;if(console.debug("Attempting reconnect"),!(yield this.isKeycloakReachable()))return console.debug("Keycloak is unreachable"),!1;console.debug("Keycloak is reachable"),console.debug("Checking keycloak access token");try{yield this._updateKeycloakAccessToken()}catch(t){let e=yield this._getNativeOfflineRefreshToken();this._keycloak.refreshToken=e;try{yield this._updateKeycloakAccessToken()}catch(e){console.debug("Cannot update access token so sending to login"),this.login();return}return console.debug("Keycloak access token is valid"),!0}let t=this.events&&this.events.status===ef.CONNECTING;return console.debug("If event provider offline then attempting reconnect: offline="+t),!t||(yield null==(e=this.events)?void 0:e.connect())}),n=yield t();if(void 0!==n){if(!n){console.debug("Scheduling another reconnect attempt in (ms): "+(e=Math.min(o8.MAX_RECONNECT_DELAY,e+3e3))),this._reconnectTimer=window.setTimeout(()=>this.reconnect(e),e);return}this._onReconnected()}})}isKeycloakReachable(){return o4(this,arguments,void 0,function*(e=2e3){let t=new AbortController,n=setTimeout(()=>t.abort(),e);try{let e=this._keycloak.endpoints.token(),n=yield fetch(e,{method:"OPTIONS",signal:t.signal});return 200===n.status}catch(e){return!1}finally{clearTimeout(n)}})}}o8.MAX_RECONNECT_DELAY=45e3;let o7=new o8,o9=o7;var re=function(e,t){return(re=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function rt(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}re(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create,Object.create;var rn=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},ri=new function(){this.browser=new rn,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(ri.wxa=!0,ri.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?ri.worker=!0:!ri.hasGlobalWindow||"Deno"in window||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Node.js")>-1?(ri.node=!0,ri.svgSupported=!0):function(e,t){var n=t.browser,i=e.match(/Firefox\/([\d.]+)/),o=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),r=e.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(e);if(i&&(n.firefox=!0,n.version=i[1]),o&&(n.ie=!0,n.version=o[1]),r&&(n.edge=!0,n.version=r[1],n.newEdge=+r[1].split(".")[0]>18),a&&(n.weChat=!0),t.svgSupported="undefined"!=typeof SVGRect,t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported="undefined"!=typeof document){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}(navigator.userAgent,ri);var ro="12px sans-serif",rr=function(e){var t={};if("undefined"==typeof JSON)return t;for(var n=0;n<e.length;n++){var i=String.fromCharCode(n+32),o=(e.charCodeAt(n)-20)/100;t[i]=o}return t}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),ra={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(){var e,t;return function(n,i){if(!e){var o=ra.createCanvas();e=o&&o.getContext("2d")}if(e)return t!==i&&(t=e.font=i||ro),e.measureText(n);n=n||"",i=i||ro;var r=/((?:\d+)?\.?\d*)px/.exec(i),a=r&&+r[1]||12,s=0;if(i.indexOf("mono")>=0)s=a*n.length;else for(var l=0;l<n.length;l++){var c=rr[n[l]];s+=null==c?a:c*a}return{width:s}}}(),loadImage:function(e,t,n){var i=new Image;return i.onload=t,i.onerror=n,i.src=e,i}},rs=rC(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),rl=rC(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),rc=Object.prototype.toString,rd=Array.prototype,ru=rd.forEach,rm=rd.filter,rf=rd.slice,rp=rd.map,rh=(function(){}).constructor,rb=rh?rh.prototype:null,rg="__proto__",r_=2311;function ry(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];"undefined"!=typeof console&&console.error.apply(console,e)}function rv(e){if(null==e||"object"!=typeof e)return e;var t=e,n=rc.call(e);if("[object Array]"===n){if(!e[rJ]){t=[];for(var i=0,o=e.length;i<o;i++)t[i]=rv(e[i])}}else if(rl[n]){if(!e[rJ]){var r=e.constructor;if(r.from)t=r.from(e);else{t=new r(e.length);for(var i=0,o=e.length;i<o;i++)t[i]=e[i]}}}else if(!rs[n]&&!e[rJ]&&!rj(e))for(var a in t={},e)e.hasOwnProperty(a)&&a!==rg&&(t[a]=rv(e[a]));return t}function rF(e,t,n){if(!rB(t)||!rB(e))return n?rv(t):e;for(var i in t)if(t.hasOwnProperty(i)&&i!==rg){var o=e[i],r=t[i];!(rB(r)&&rB(o))||rO(r)||rO(o)||rj(r)||rj(o)||rH(r)||rH(o)||r[rJ]||o[rJ]?!n&&i in e||(e[i]=rv(t[i])):rF(o,r,n)}return e}function rx(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==rg&&(e[n]=t[n]);return e}function rw(e,t,n){for(var i=rS(t),o=0,r=i.length;o<r;o++){var a=i[o];(n?null!=t[a]:null==e[a])&&(e[a]=t[a])}return e}function rk(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n}return -1}function rE(e,t,n){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(t),o=0;o<i.length;o++){var r=i[o];"constructor"!==r&&(n?null!=t[r]:null==e[r])&&(e[r]=t[r])}else rw(e,t,n)}function rT(e){return!!e&&"string"!=typeof e&&"number"==typeof e.length}function rM(e,t,n){if(e&&t)if(e.forEach&&e.forEach===ru)e.forEach(t,n);else if(e.length===+e.length)for(var i=0,o=e.length;i<o;i++)t.call(n,e[i],i,e);else for(var r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function rA(e,t,n){if(!e)return[];if(!t)return r$(e);if(e.map&&e.map===rp)return e.map(t,n);for(var i=[],o=0,r=e.length;o<r;o++)i.push(t.call(n,e[o],o,e));return i}function rC(e,t,n,i){if(e&&t){for(var o=0,r=e.length;o<r;o++)n=t.call(i,n,e[o],o,e);return n}}function rD(e,t,n){if(!e)return[];if(!t)return r$(e);if(e.filter&&e.filter===rm)return e.filter(t,n);for(var i=[],o=0,r=e.length;o<r;o++)t.call(n,e[o],o,e)&&i.push(e[o]);return i}function rS(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}ra.createCanvas;var rL=rb&&rR(rb.bind)?rb.call.bind(rb.bind):function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return function(){return e.apply(t,n.concat(rf.call(arguments)))}};function rI(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(rf.call(arguments)))}}function rO(e){return Array.isArray?Array.isArray(e):"[object Array]"===rc.call(e)}function rR(e){return"function"==typeof e}function rY(e){return"string"==typeof e}function rP(e){return"[object String]"===rc.call(e)}function rN(e){return"number"==typeof e}function rB(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function rH(e){return!!rs[rc.call(e)]}function rz(e){return!!rl[rc.call(e)]}function rj(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}function rU(e){return null!=e.colorStops}function rW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,i=e.length;n<i;n++)if(null!=e[n])return e[n]}function rV(e,t){return null!=e?e:t}function rG(e,t,n){return null!=e?e:null!=t?t:n}function r$(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return rf.apply(e,t)}function rq(e){if("number"==typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e}function rX(e,t){if(!e)throw Error(t)}function rK(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var rJ="__ec_primitive__",rZ=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return rS(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),rQ="function"==typeof Map,r0=function(){function e(t){var n=rO(t);this.data=rQ?new Map:new rZ;var i=this;function o(e,t){n?i.set(e,t):i.set(t,e)}t instanceof e?t.each(o):t&&rM(t,o)}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,i){e.call(t,n,i)})},e.prototype.keys=function(){var e=this.data.keys();return rQ?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function r1(e){return new r0(e)}function r2(e,t){var n;if(Object.create)n=Object.create(e);else{var i=function(){};i.prototype=e,n=new i}return t&&rx(n,t),n}function r5(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function r3(e,t){return e.hasOwnProperty(t)}function r4(){}var r6=180/Math.PI;Number.EPSILON;var r8=function(e,t){return(r8=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function r7(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r8(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function r9(e,t){return null==e&&(e=0),null==t&&(t=0),[e,t]}function ae(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function at(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function an(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}Object.create,Object.create;var ai=function(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])};function ao(e,t,n){var i=t[0],o=t[1];return e[0]=n[0]*i+n[2]*o+n[4],e[1]=n[1]*i+n[3]*o+n[5],e}function ar(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function aa(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var as=function(e,t){this.target=e,this.topTarget=t&&t.topTarget},al=function(){function e(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new as(t,e),"dragstart",e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,i=e.offsetY,o=n-this._x,r=i-this._y;this._x=n,this._y=i,t.drift(o,r,e),this.handler.dispatchToElement(new as(t,e),"drag",e.event);var a=this.handler.findHover(n,i,t).target,s=this._dropTarget;this._dropTarget=a,t!==a&&(s&&a!==s&&this.handler.dispatchToElement(new as(s,e),"dragleave",e.event),a&&a!==s&&this.handler.dispatchToElement(new as(a,e),"dragenter",e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new as(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new as(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},e}(),ac=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,i){this._$handlers||(this._$handlers={});var o=this._$handlers;if("function"==typeof t&&(i=n,n=t,t=null),!n||!e)return this;var r=this._$eventProcessor;null!=t&&r&&r.normalizeQuery&&(t=r.normalizeQuery(t)),o[e]||(o[e]=[]);for(var a=0;a<o[e].length;a++)if(o[e][a].h===n)return this;var s={h:n,query:t,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},l=o[e].length-1,c=o[e][l];return c&&c.callAtLast?o[e].splice(l,0,s):o[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var i=[],o=0,r=n[e].length;o<r;o++)n[e][o].h!==t&&i.push(n[e][o]);n[e]=i}n[e]&&0===n[e].length&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[e],o=this._$eventProcessor;if(i)for(var r=t.length,a=i.length,s=0;s<a;s++){var l=i[s];if(!o||!o.filter||null==l.query||o.filter(e,l.query))switch(r){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,t[0]);break;case 2:l.h.call(l.ctx,t[0],t[1]);break;default:l.h.apply(l.ctx,t)}}return o&&o.afterTrigger&&o.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[e],o=this._$eventProcessor;if(i)for(var r=t.length,a=t[r-1],s=i.length,l=0;l<s;l++){var c=i[l];if(!o||!o.filter||null==c.query||o.filter(e,c.query))switch(r){case 0:c.h.call(a);break;case 1:c.h.call(a,t[0]);break;case 2:c.h.call(a,t[0],t[1]);break;default:c.h.apply(a,t.slice(1,r-1))}}return o&&o.afterTrigger&&o.afterTrigger(e),this},e}(),ad=Math.log(2);function au(e,t,n,i,o,r){var a=i+"-"+o,s=e.length;if(r.hasOwnProperty(a))return r[a];if(1===t){var l=Math.round(Math.log((1<<s)-1&~o)/ad);return e[n][l]}for(var c=i|1<<n,d=n+1;i&1<<d;)d++;for(var u=0,m=0,f=0;m<s;m++){var p=1<<m;!(p&o)&&(u+=(f%2?-1:1)*e[n][m]*au(e,t-1,d,c,o|p,r),f++)}return r[a]=u,u}function am(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],i={},o=au(n,8,0,0,0,i);if(0!==o){for(var r=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==r[s]&&(r[s]=0),r[s]+=((a+s)%2?-1:1)*au(n,7,+(0===a),1<<a,1<<s,i)/o*t[a];return function(e,t,n){var i=t*r[6]+n*r[7]+1;e[0]=(t*r[0]+n*r[1]+r[2])/i,e[1]=(t*r[3]+n*r[4]+r[5])/i}}}var af="___zrEVENTSAVED",ap=[];function ah(e,t,n,i,o){if(t.getBoundingClientRect&&ri.domSupported&&!ab(t)){var r=t[af]||(t[af]={}),a=function(e,t,n){for(var i=n?"invTrans":"trans",o=t[i],r=t.srcCoords,a=[],s=[],l=!0,c=0;c<4;c++){var d=e[c].getBoundingClientRect(),u=2*c,m=d.left,f=d.top;a.push(m,f),l=l&&r&&m===r[u]&&f===r[u+1],s.push(e[c].offsetLeft,e[c].offsetTop)}return l&&o?o:(t.srcCoords=a,t[i]=n?am(s,a):am(a,s))}(function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var i=["left","right"],o=["top","bottom"],r=0;r<4;r++){var a=document.createElement("div"),s=a.style,l=r%2,c=(r>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",o[c]+":0",i[1-l]+":auto",o[1-c]+":auto",""].join("!important;"),e.appendChild(a),n.push(a)}return t.clearMarkers=function(){rM(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}(t,r),r,o);if(a)return a(e,n,i),!0}return!1}function ab(e){return"CANVAS"===e.nodeName.toUpperCase()}var ag=/([&<>"'])/g,a_={"&":"&","<":"<",">":">",'"':""","'":"'"};function ay(e){return null==e?"":(e+"").replace(ag,function(e,t){return a_[t]})}var av=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,aF=[],ax=ri.browser.firefox&&39>+ri.browser.version.split(".")[0];function aw(e,t,n,i){return n=n||{},i?ak(e,t,n):ax&&null!=t.layerX&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):null!=t.offsetX?(n.zrX=t.offsetX,n.zrY=t.offsetY):ak(e,t,n),n}function ak(e,t,n){if(ri.domSupported&&e.getBoundingClientRect){var i=t.clientX,o=t.clientY;if(ab(e)){var r=e.getBoundingClientRect();n.zrX=i-r.left,n.zrY=o-r.top;return}if(ah(aF,e,i,o)){n.zrX=aF[0],n.zrY=aF[1];return}}n.zrX=n.zrY=0}function aE(e){return e||window.event}function aT(e,t,n){if(null!=(t=aE(t)).zrX)return t;var i=t.type;if(i&&i.indexOf("touch")>=0){var o="touchend"!==i?t.targetTouches[0]:t.changedTouches[0];o&&aw(e,o,t,n)}else{aw(e,t,t,n);var r=function(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,i=e.deltaY;return null==n||null==i?t:3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(t);t.zrDelta=r?r/120:-(t.detail||0)/3}var a=t.button;return null==t.which&&void 0!==a&&av.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}var aM=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function aA(e){return 2===e.which||3===e.which}var aC=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var i=e.touches;if(i){for(var o={points:[],touches:[],target:t,event:e},r=0,a=i.length;r<a;r++){var s=i[r],l=aw(n,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},e.prototype._recognize=function(e){for(var t in aS)if(aS.hasOwnProperty(t)){var n=aS[t](this._track,e);if(n)return n}},e}();function aD(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}var aS={pinch:function(e,t){var n=e.length;if(n){var i=(e[n-1]||{}).points,o=(e[n-2]||{}).points||i;if(o&&o.length>1&&i&&i.length>1){var r=aD(i)/aD(o);isFinite(r)||(r=1),t.pinchScale=r;var a=[(i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return t.pinchX=a[0],t.pinchY=a[1],{type:"pinch",target:e[0].target,event:t}}}}};function aL(){return[1,0,0,1,0,0]}function aI(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function aO(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function aR(e,t,n){var i=t[0]*n[0]+t[2]*n[1],o=t[1]*n[0]+t[3]*n[1],r=t[0]*n[2]+t[2]*n[3],a=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=i,e[1]=o,e[2]=r,e[3]=a,e[4]=s,e[5]=l,e}function aY(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function aP(e,t,n,i){void 0===i&&(i=[0,0]);var o=t[0],r=t[2],a=t[4],s=t[1],l=t[3],c=t[5],d=Math.sin(n),u=Math.cos(n);return e[0]=o*u+s*d,e[1]=-o*d+s*u,e[2]=r*u+l*d,e[3]=-r*d+u*l,e[4]=u*(a-i[0])+d*(c-i[1])+i[0],e[5]=u*(c-i[1])-d*(a-i[0])+i[1],e}function aN(e,t){var n=t[0],i=t[2],o=t[4],r=t[1],a=t[3],s=t[5],l=n*a-r*i;return l?(l=1/l,e[0]=a*l,e[1]=-r*l,e[2]=-i*l,e[3]=n*l,e[4]=(i*s-a*o)*l,e[5]=(r*o-n*s)*l,e):null}let aB=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,i){e.x=t.x+n.x*i,e.y=t.y+n.y*i},e.lerp=function(e,t,n,i){var o=1-i;e.x=o*t.x+i*n.x,e.y=o*t.y+i*n.y},e}();var aH=Math.min,az=Math.max,aj=Math.abs,aU=["x","y"],aW=["width","height"],aV=new aB,aG=new aB,a$=new aB,aq=new aB,aX=a5(),aK=aX.minTv,aJ=aX.maxTv,aZ=[0,0],aQ=function(){function e(t,n,i,o){e.set(this,t,n,i,o)}return e.set=function(e,t,n,i,o){return i<0&&(t+=i,i=-i),o<0&&(n+=o,o=-o),e.x=t,e.y=n,e.width=i,e.height=o,e},e.prototype.union=function(e){var t=aH(e.x,this.x),n=aH(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=az(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=az(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t,n,i,o=e.width/this.width,r=e.height/this.height,a=aL();return aY(a,a,[-this.x,-this.y]),n=(t=[o,r])[0],i=t[1],a[0]=a[0]*n,a[1]=a[1]*i,a[2]=a[2]*n,a[3]=a[3]*i,a[4]=a[4]*n,a[5]=a[5]*i,aY(a,a,[e.x,e.y]),a},e.prototype.intersect=function(t,n,i){return e.intersect(this,t,n,i)},e.intersect=function(t,n,i,o){i&&aB.set(i,0,0);var r=o&&o.outIntersectRect||null,a=o&&o.clamp;if(r&&(r.x=r.y=r.width=r.height=NaN),!t||!n)return!1;t instanceof e||(t=e.set(a0,t.x,t.y,t.width,t.height)),n instanceof e||(n=e.set(a1,n.x,n.y,n.width,n.height));var s=!!i;aX.reset(o,s);var l=aX.touchThreshold,c=t.x+l,d=t.x+t.width-l,u=t.y+l,m=t.y+t.height-l,f=n.x+l,p=n.x+n.width-l,h=n.y+l,b=n.y+n.height-l;if(c>d||u>m||f>p||h>b)return!1;var g=!(d<f||p<c||m<h||b<u);return(s||r)&&(aZ[0]=1/0,aZ[1]=0,a2(c,d,f,p,0,s,r,a),a2(u,m,h,b,1,s,r,a),s&&aB.copy(i,g?aX.useDir?aX.dirMinTv:aK:aJ)),g},e.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return 0===this.width||0===this.height},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(t,n,i){if(!i){t!==n&&e.copy(t,n);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var o=i[0],r=i[3],a=i[4],s=i[5];t.x=n.x*o+a,t.y=n.y*r+s,t.width=n.width*o,t.height=n.height*r,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}aV.x=a$.x=n.x,aV.y=aq.y=n.y,aG.x=aq.x=n.x+n.width,aG.y=a$.y=n.y+n.height,aV.transform(i),aq.transform(i),aG.transform(i),a$.transform(i),t.x=aH(aV.x,aG.x,a$.x,aq.x),t.y=aH(aV.y,aG.y,a$.y,aq.y);var l=az(aV.x,aG.x,a$.x,aq.x),c=az(aV.y,aG.y,a$.y,aq.y);t.width=l-t.x,t.height=c-t.y},e}(),a0=new aQ(0,0,0,0),a1=new aQ(0,0,0,0);function a2(e,t,n,i,o,r,a,s){var l=aj(t-n),c=aj(i-e),d=aH(l,c),u=aU[o],m=aU[1-o],f=aW[o];t<n||i<e?l<c?(r&&(aJ[u]=-l),s&&(a[u]=t,a[f]=0)):(r&&(aJ[u]=c),s&&(a[u]=e,a[f]=0)):(a&&(a[u]=az(e,n),a[f]=aH(t,i)-a[u]),r&&(d<aZ[0]||aX.useDir)&&(aZ[0]=aH(d,aZ[0]),(l<c||!aX.bidirectional)&&(aK[u]=l,aK[m]=0,aX.useDir&&aX.calcDirMTV()),(l>=c||!aX.bidirectional)&&(aK[u]=-c,aK[m]=0,aX.useDir&&aX.calcDirMTV())))}function a5(){var e=0,t=new aB,n=new aB,i={minTv:new aB,maxTv:new aB,useDir:!1,dirMinTv:new aB,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(o,r){i.touchThreshold=0,o&&null!=o.touchThreshold&&(i.touchThreshold=az(0,o.touchThreshold)),i.negativeSize=!1,r&&(i.minTv.set(1/0,1/0),i.maxTv.set(0,0),i.useDir=!1,o&&null!=o.direction&&(i.useDir=!0,i.dirMinTv.copy(i.minTv),n.copy(i.minTv),e=o.direction,i.bidirectional=null==o.bidirectional||!!o.bidirectional,i.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var r=i.minTv,a=i.dirMinTv,s=r.y*r.y+r.x*r.x,l=Math.sin(e),c=Math.cos(e),d=l*r.y+c*r.x;if(o(d)){o(r.x)&&o(r.y)&&a.set(0,0);return}if(n.x=s*c/d,n.y=s*l/d,o(n.x)&&o(n.y))return void a.set(0,0);(i.bidirectional||t.dot(n)>0)&&n.len()<a.len()&&a.copy(n)}};function o(e){return 1e-10>aj(e)}return i}let a3=aQ;var a4="silent";function a6(){aM(this.event)}var a8=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return r7(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(ac),a7=function(e,t){this.x=e,this.y=t},a9=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],se=new a3(0,0,0,0),st=function(e){function t(t,n,i,o,r){var a=e.call(this)||this;return a._hovered=new a7(0,0),a.storage=t,a.painter=n,a.painterRoot=o,a._pointerSize=r,i=i||new a8,a.proxy=null,a.setHandlerProxy(i),a._draggingMgr=new al(a),a}return r7(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(rM(a9,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,i=si(this,t,n),o=this._hovered,r=o.target;r&&!r.__zr&&(r=(o=this.findHover(o.x,o.y)).target);var a=this._hovered=i?new a7(t,n):this.findHover(t,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),r&&s!==r&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(a,"mousemove",e),s&&s!==r&&this.dispatchToElement(a,"mouseover",e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new a7(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){var i=(e=e||{}).target;if(!i||!i.silent){for(var o,r="on"+t,a={type:t,event:n,target:(o=e).target,topTarget:o.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:a6};i&&(i[r]&&(a.cancelBubble=!!i[r].call(i,a)),i.trigger(t,a),i=i.__hostTarget?i.__hostTarget:i.parent,!a.cancelBubble););!a.cancelBubble&&(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){"function"==typeof e[r]&&e[r].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var i=this.storage.getDisplayList(),o=new a7(e,t);if(sn(i,o,e,t,n),this._pointerSize&&!o.target){for(var r=[],a=this._pointerSize,s=a/2,l=new a3(e-s,t-s,a,a),c=i.length-1;c>=0;c--){var d=i[c];d===n||d.ignore||d.ignoreCoarsePointer||d.parent&&d.parent.ignoreCoarsePointer||(se.copy(d.getBoundingRect()),d.transform&&se.applyTransform(d.transform),se.intersect(l)&&r.push(d))}if(r.length){for(var u=Math.PI/12,m=2*Math.PI,f=0;f<s;f+=4)for(var p=0;p<m;p+=u)if(sn(r,o,e+f*Math.cos(p),t+f*Math.sin(p),n),o.target)return o}}return o},t.prototype.processGesture=function(e,t){this._gestureMgr||(this._gestureMgr=new aC);var n=this._gestureMgr;"start"===t&&n.clear();var i=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),i){var o=i.type;e.gestureEvent=o;var r=new a7;r.target=i.target,this.dispatchToElement(r,o,i.event)}},t}(ac);function sn(e,t,n,i,o){for(var r=e.length-1;r>=0;r--){var a=e[r],s=void 0;if(a!==o&&!a.ignore&&(s=function(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var i=e,o=void 0,r=!1;i;){if(i.ignoreClip&&(r=!0),!r){var a=i.getClipPath();if(a&&!a.contain(t,n))return!1}i.silent&&(o=!0);var s=i.__hostTarget;i=s?i.ignoreHostSilent?null:s:i.parent}return!o||a4}return!1}(a,n,i))&&(t.topTarget||(t.topTarget=a),s!==a4)){t.target=a;break}}}function si(e,t,n){var i=e.painter;return t<0||t>i.getWidth()||n<0||n>i.getHeight()}function so(e,t,n,i){var o=t+1;if(o===n)return 1;if(0>i(e[o++],e[t])){for(;o<n&&0>i(e[o],e[o-1]);)o++;var r=e,a=t,s=o;for(s--;a<s;){var l=r[a];r[a++]=r[s],r[s--]=l}}else for(;o<n&&i(e[o],e[o-1])>=0;)o++;return o-t}function sr(e,t,n,i,o){for(i===t&&i++;i<n;i++){for(var r,a=e[i],s=t,l=i;s<l;)0>o(a,e[r=s+l>>>1])?l=r:s=r+1;var c=i-s;switch(c){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;c>0;)e[s+c]=e[s+c-1],c--}e[s]=a}}function sa(e,t,n,i,o,r){var a=0,s=0,l=1;if(r(e,t[n+o])>0){for(s=i-o;l<s&&r(e,t[n+o+l])>0;)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s),a+=o,l+=o}else{for(s=o+1;l<s&&0>=r(e,t[n+o-l]);)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s);var c=a;a=o-l,l=o-c}for(a++;a<l;){var d=a+(l-a>>>1);r(e,t[n+d])>0?a=d+1:l=d}return l}function ss(e,t,n,i,o,r){var a=0,s=0,l=1;if(0>r(e,t[n+o])){for(s=o+1;l<s&&0>r(e,t[n+o-l]);)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s);var c=a;a=o-l,l=o-c}else{for(s=i-o;l<s&&r(e,t[n+o+l])>=0;)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s),a+=o,l+=o}for(a++;a<l;){var d=a+(l-a>>>1);0>r(e,t[n+d])?l=d:a=d+1}return l}function sl(e,t,n,i){n||(n=0),i||(i=e.length);var o=i-n;if(!(o<2)){var r=0;if(o<32){r=so(e,n,i,t),sr(e,n,i,n+r,t);return}var a=function(e,t){var n,i,o=7,r=0,a=[];function s(s){var l=n[s],c=i[s],d=n[s+1],u=i[s+1];i[s]=c+u,s===r-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),r--;var m=ss(e[d],e,l,c,0,t);l+=m,0!=(c-=m)&&0!==(u=sa(e[l+c-1],e,d,u,u-1,t))&&(c<=u?function(n,i,r,s){var l,c,d,u=0;for(u=0;u<i;u++)a[u]=e[n+u];var m=0,f=r,p=n;if(e[p++]=e[f++],0==--s){for(u=0;u<i;u++)e[p+u]=a[m+u];return}if(1===i){for(u=0;u<s;u++)e[p+u]=e[f+u];e[p+s]=a[m];return}for(var h=o;;){l=0,c=0,d=!1;do if(0>t(e[f],a[m])){if(e[p++]=e[f++],c++,l=0,0==--s){d=!0;break}}else if(e[p++]=a[m++],l++,c=0,1==--i){d=!0;break}while((l|c)<h);if(d)break;do{if(0!==(l=ss(e[f],a,m,i,0,t))){for(u=0;u<l;u++)e[p+u]=a[m+u];if(p+=l,m+=l,(i-=l)<=1){d=!0;break}}if(e[p++]=e[f++],0==--s){d=!0;break}if(0!==(c=sa(a[m],e,f,s,0,t))){for(u=0;u<c;u++)e[p+u]=e[f+u];if(p+=c,f+=c,0==(s-=c)){d=!0;break}}if(e[p++]=a[m++],1==--i){d=!0;break}h--}while(l>=7||c>=7);if(d)break;h<0&&(h=0),h+=2}if((o=h)<1&&(o=1),1===i){for(u=0;u<s;u++)e[p+u]=e[f+u];e[p+s]=a[m]}else if(0===i)throw Error();else for(u=0;u<i;u++)e[p+u]=a[m+u]}(l,c,d,u):function(n,i,r,s){var l=0;for(l=0;l<s;l++)a[l]=e[r+l];var c=n+i-1,d=s-1,u=r+s-1,m=0,f=0;if(e[u--]=e[c--],0==--i){for(l=0,m=u-(s-1);l<s;l++)e[m+l]=a[l];return}if(1===s){for(u-=i,c-=i,f=u+1,m=c+1,l=i-1;l>=0;l--)e[f+l]=e[m+l];e[u]=a[d];return}for(var p=o;;){var h=0,b=0,g=!1;do if(0>t(a[d],e[c])){if(e[u--]=e[c--],h++,b=0,0==--i){g=!0;break}}else if(e[u--]=a[d--],b++,h=0,1==--s){g=!0;break}while((h|b)<p);if(g)break;do{if(0!=(h=i-ss(a[d],e,n,i,i-1,t))){for(u-=h,c-=h,i-=h,f=u+1,m=c+1,l=h-1;l>=0;l--)e[f+l]=e[m+l];if(0===i){g=!0;break}}if(e[u--]=a[d--],1==--s){g=!0;break}if(0!=(b=s-sa(e[c],a,0,s,s-1,t))){for(u-=b,d-=b,s-=b,f=u+1,m=d+1,l=0;l<b;l++)e[f+l]=a[m+l];if(s<=1){g=!0;break}}if(e[u--]=e[c--],0==--i){g=!0;break}p--}while(h>=7||b>=7);if(g)break;p<0&&(p=0),p+=2}if((o=p)<1&&(o=1),1===s){for(u-=i,c-=i,f=u+1,m=c+1,l=i-1;l>=0;l--)e[f+l]=e[m+l];e[u]=a[d]}else if(0===s)throw Error();else for(l=0,m=u-(s-1);l<s;l++)e[m+l]=a[l]}(l,c,d,u))}return n=[],i=[],{mergeRuns:function(){for(;r>1;){var e=r-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;s(e)}},forceMergeRuns:function(){for(;r>1;){var e=r-2;e>0&&i[e-1]<i[e+1]&&e--,s(e)}},pushRun:function(e,t){n[r]=e,i[r]=t,r+=1}}}(e,t),s=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(o);do{if((r=so(e,n,i,t))<s){var l=o;l>s&&(l=s),sr(e,n,n+l,n+r,t),r=l}a.pushRun(n,r),a.mergeRuns(),o-=r,n+=r}while(0!==o);a.forceMergeRuns()}}rM(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){st.prototype[e]=function(t){var n,i,o=t.zrX,r=t.zrY,a=si(this,o,r);if("mouseup"===e&&a||(i=(n=this.findHover(o,r)).target),"mousedown"===e)this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if("mouseup"===e)this._upEl=i;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||an(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}});var sc=!1;function sd(){sc||(sc=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function su(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var sm=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=su}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,i=0,o=t.length;i<o;i++)this._updateAndAddDisplayable(t[i],null,e);n.length=this._displayListLen,sl(n,su)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.update(),e.afterUpdate();var i=e.getClipPath(),o=t&&t.length,r=0,a=e.__clipPaths;if(!e.ignoreClip&&(o||i)){if(a||(a=e.__clipPaths=[]),o)for(var s=0;s<t.length;s++)a[r++]=t[s];for(var l=i,c=e;l;)l.parent=c,l.updateTransform(),a[r++]=l,c=l,l=l.getClipPath()}if(a&&(a.length=r),e.childrenRef){for(var d=e.childrenRef(),u=0;u<d.length;u++){var m=d[u];e.__dirty&&(m.__dirty|=1),this._updateAndAddDisplayable(m,a,n)}e.__dirty=0}else isNaN(e.z)&&(sd(),e.z=0),isNaN(e.z2)&&(sd(),e.z2=0),isNaN(e.zlevel)&&(sd(),e.zlevel=0),this._displayList[this._displayListLen++]=e;var f=e.getDecalElement&&e.getDecalElement();f&&this._updateAndAddDisplayable(f,a,n);var p=e.getTextGuideLine();p&&this._updateAndAddDisplayable(p,a,n);var h=e.getTextContent();h&&this._updateAndAddDisplayable(h,a,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var i=rk(this._roots,e);i>=0&&this._roots.splice(i,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}();ey=ri.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var sf={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(e-=1))*Math.sin(2*Math.PI*(e-t)/.4)))},elasticOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin(2*Math.PI*(e-t)/.4)+1)},elasticInOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),(e*=2)<1)?-.5*(n*Math.pow(2,10*(e-=1))*Math.sin(2*Math.PI*(e-t)/.4)):n*Math.pow(2,-10*(e-=1))*Math.sin(2*Math.PI*(e-t)/.4)*.5+1},backIn:function(e){return e*e*(2.70158*e-1.70158)},backOut:function(e){return--e*e*(2.70158*e+1.70158)+1},backInOut:function(e){return(e*=2)<1?e*e*(3.5949095*e-2.5949095)*.5:.5*((e-=2)*e*(3.5949095*e+2.5949095)+2)},bounceIn:function(e){return 1-sf.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*sf.bounceIn(2*e):.5*sf.bounceOut(2*e-1)+.5}},sp=Math.pow,sh=Math.sqrt,sb=sh(3),sg=1/3,s_=r9(),sy=r9(),sv=r9();function sF(e){return e>-1e-8&&e<1e-8}function sx(e){return e>1e-8||e<-1e-8}function sw(e,t,n,i,o){var r=1-o;return r*r*(r*e+3*o*t)+o*o*(o*i+3*r*n)}function sk(e,t,n,i,o){var r=1-o;return 3*(((t-e)*r+2*(n-t)*o)*r+(i-n)*o*o)}function sE(e,t,n,i,o,r){var a=i+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),c=e-o,d=s*s-3*a*l,u=s*l-9*a*c,m=l*l-3*s*c,f=0;if(sF(d)&&sF(u))if(sF(s))r[0]=0;else{var p=-l/s;p>=0&&p<=1&&(r[f++]=p)}else{var h=u*u-4*d*m;if(sF(h)){var b=u/d,p=-s/a+b,g=-b/2;p>=0&&p<=1&&(r[f++]=p),g>=0&&g<=1&&(r[f++]=g)}else if(h>0){var _=sh(h),y=d*s+1.5*a*(-u+_),v=d*s+1.5*a*(-u-_),p=(-s-((y=y<0?-sp(-y,sg):sp(y,sg))+(v=v<0?-sp(-v,sg):sp(v,sg))))/(3*a);p>=0&&p<=1&&(r[f++]=p)}else{var F=Math.acos((2*d*s-3*a*u)/(2*sh(d*d*d)))/3,x=sh(d),w=Math.cos(F),p=(-s-2*x*w)/(3*a),g=(-s+x*(w+sb*Math.sin(F)))/(3*a),k=(-s+x*(w-sb*Math.sin(F)))/(3*a);p>=0&&p<=1&&(r[f++]=p),g>=0&&g<=1&&(r[f++]=g),k>=0&&k<=1&&(r[f++]=k)}}return f}function sT(e,t,n,i,o){var r=6*n-12*t+6*e,a=9*t+3*i-3*e-9*n,s=3*t-3*e,l=0;if(sF(a)){if(sx(r)){var c=-s/r;c>=0&&c<=1&&(o[l++]=c)}}else{var d=r*r-4*a*s;if(sF(d))o[0]=-r/(2*a);else if(d>0){var u=sh(d),c=(-r+u)/(2*a),m=(-r-u)/(2*a);c>=0&&c<=1&&(o[l++]=c),m>=0&&m<=1&&(o[l++]=m)}}return l}function sM(e,t,n,i,o,r){var a=(t-e)*o+e,s=(n-t)*o+t,l=(i-n)*o+n,c=(s-a)*o+a,d=(l-s)*o+s,u=(d-c)*o+c;r[0]=e,r[1]=a,r[2]=c,r[3]=u,r[4]=u,r[5]=d,r[6]=l,r[7]=i}function sA(e,t,n,i){var o=1-i;return o*(o*e+2*i*t)+i*i*n}function sC(e,t,n,i){return 2*((1-i)*(t-e)+i*(n-t))}function sD(e,t,n){var i=e+n-2*t;return 0===i?.5:(e-t)/i}function sS(e,t,n,i,o){var r=(t-e)*i+e,a=(n-t)*i+t,s=(a-r)*i+r;o[0]=e,o[1]=r,o[2]=s,o[3]=s,o[4]=a,o[5]=n}var sL=/cubic-bezier\(([0-9,\.e ]+)\)/;function sI(e){var t=e&&sL.exec(e);if(t){var n=t[1].split(","),i=+rK(n[0]),o=+rK(n[1]),r=+rK(n[2]),a=+rK(n[3]);if(isNaN(i+o+r+a))return;var s=[];return function(e){return e<=0?0:e>=1?1:sE(0,i,r,1,e,s)&&sw(0,o,a,1,s[0])}}}var sO=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||r4,this.ondestroy=e.ondestroy||r4,this.onrestart=e.onrestart||r4,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var n=this._life,i=e-this._startTime-this._pausedTime,o=i/n;o<0&&(o=0),o=Math.min(o,1);var r=this.easingFunc,a=r?r(o):o;if(this.onframe(a),1===o)if(!this.loop)return!0;else this._startTime=e-i%n,this._pausedTime=0,this.onrestart();return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=rR(e)?e:sf[e]||sI(e)},e}(),sR=function(e){this.value=e},sY=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new sR(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),sP=function(){function e(e){this._list=new sY,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,i=this._map,o=null;if(null==i[e]){var r=n.len(),a=this._lastRemovedEntry;if(r>=this._maxSize&&r>0){var s=n.head;n.remove(s),delete i[s.key],o=s.value,this._lastRemovedEntry=s}a?a.value=t:a=new sR(t),a.key=e,n.insertEntry(a),i[e]=a}return o},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),sN={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 sB(e){return(e=Math.round(e))<0?0:e>255?255:e}function sH(e){return e<0?0:e>1?1:e}function sz(e){return e.length&&"%"===e.charAt(e.length-1)?sB(parseFloat(e)/100*255):sB(parseInt(e,10))}function sj(e){return e.length&&"%"===e.charAt(e.length-1)?sH(parseFloat(e)/100):sH(parseFloat(e))}function sU(e,t,n){return(n<0?n+=1:n>1&&(n-=1),6*n<1)?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function sW(e,t,n,i,o){return e[0]=t,e[1]=n,e[2]=i,e[3]=o,e}function sV(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var sG=new sP(20),s$=null;function sq(e,t){s$&&sV(s$,t),s$=sG.put(e,s$||t.slice())}function sX(e,t){if(e){t=t||[];var n=sG.get(e);if(n)return sV(t,n);var i=(e+="").replace(/ /g,"").toLowerCase();if(i in sN)return sV(t,sN[i]),sq(e,t),t;var o=i.length;if("#"===i.charAt(0)){if(4===o||5===o){var r=parseInt(i.slice(1,4),16);return r>=0&&r<=4095?(sW(t,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),sq(e,t),t):void sW(t,0,0,0,1)}if(7===o||9===o){var r=parseInt(i.slice(1,7),16);return r>=0&&r<=0xffffff?(sW(t,(0xff0000&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),sq(e,t),t):void sW(t,0,0,0,1)}return}var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var l=i.substr(0,a),c=i.substr(a+1,s-(a+1)).split(","),d=1;switch(l){case"rgba":if(4!==c.length)return 3===c.length?sW(t,+c[0],+c[1],+c[2],1):sW(t,0,0,0,1);d=sj(c.pop());case"rgb":if(c.length>=3)return sW(t,sz(c[0]),sz(c[1]),sz(c[2]),3===c.length?d:sj(c[3])),sq(e,t),t;return void sW(t,0,0,0,1);case"hsla":if(4!==c.length)return void sW(t,0,0,0,1);return c[3]=sj(c[3]),sK(c,t),sq(e,t),t;case"hsl":if(3!==c.length)return void sW(t,0,0,0,1);return sK(c,t),sq(e,t),t;default:return}}sW(t,0,0,0,1)}}function sK(e,t){var n=(parseFloat(e[0])%360+360)%360/360,i=sj(e[1]),o=sj(e[2]),r=o<=.5?o*(i+1):o+i-o*i,a=2*o-r;return sW(t=t||[],sB(255*sU(a,r,n+1/3)),sB(255*sU(a,r,n)),sB(255*sU(a,r,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function sJ(e,t){var n=sX(e);if(n){for(var i=0;i<3;i++)t<0?n[i]=n[i]*(1-t)|0:n[i]=(255-n[i])*t+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return sQ(n,4===n.length?"rgba":"rgb")}}function sZ(e,t,n,i){var o,r=sX(e);if(e)return r=function(e){if(e){var t,n,i=e[0]/255,o=e[1]/255,r=e[2]/255,a=Math.min(i,o,r),s=Math.max(i,o,r),l=s-a,c=(s+a)/2;if(0===l)t=0,n=0;else{n=c<.5?l/(s+a):l/(2-s-a);var d=((s-i)/6+l/2)/l,u=((s-o)/6+l/2)/l,m=((s-r)/6+l/2)/l;i===s?t=m-u:o===s?t=1/3+d-m:r===s&&(t=2/3+u-d),t<0&&(t+=1),t>1&&(t-=1)}var f=[360*t,n,c];return null!=e[3]&&f.push(e[3]),f}}(r),null!=t&&(r[0]=(o=Math.round(o=rR(t)?t(r[0]):t))<0?0:o>360?360:o),null!=n&&(r[1]=sj(rR(n)?n(r[1]):n)),null!=i&&(r[2]=sj(rR(i)?i(r[2]):i)),sQ(sK(r),"rgba")}function sQ(e,t){if(e&&e.length){var n=e[0]+","+e[1]+","+e[2];return("rgba"===t||"hsva"===t||"hsla"===t)&&(n+=","+e[3]),t+"("+n+")"}}function s0(e,t){var n=sX(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var s1=new sP(100);function s2(e){if(rY(e)){var t=s1.get(e);return t||(t=sJ(e,-.1),s1.put(e,t)),t}if(rU(e)){var n=rx({},e);return n.colorStops=rA(e.colorStops,function(e){return{offset:e.offset,color:sJ(e.color,-.1)}}),n}return e}ri.hasGlobalWindow&&rR(window.btoa);var s5=Array.prototype.slice;function s3(e,t,n,i){for(var o,r=t.length,a=0;a<r;a++)e[a]=(o=t[a],(n[a]-o)*i+o);return e}function s4(e,t,n,i){for(var o=t.length,r=0;r<o;r++)e[r]=t[r]+n[r]*i;return e}function s6(e,t,n,i){for(var o=t.length,r=o&&t[0].length,a=0;a<o;a++){e[a]||(e[a]=[]);for(var s=0;s<r;s++)e[a][s]=t[a][s]+n[a][s]*i}return e}function s8(e){if(rT(e)){var t=e.length;if(rT(e[0])){for(var n=[],i=0;i<t;i++)n.push(s5.call(e[i]));return n}return s5.call(e)}return e}function s7(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=null==e[3]?1:e[3],"rgba("+e.join(",")+")"}function s9(e){return 4===e||5===e}function le(e){return 1===e||2===e}var lt=[0,0,0,0],ln=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var i=this.keyframes,o=i.length,r=!1,a=6,s=t;if(rT(t)){var l=rT(t&&t[0])?2:1;a=l,(1!==l||rN(t[0]))&&(2!==l||rN(t[0][0]))||(r=!0)}else if(rN(t)&&t==t)a=0;else if(rY(t))if(isNaN(+t)){var c=sX(t);c&&(s=c,a=3)}else a=0;else if(rU(t)){var d=rx({},s);(d.colorStops=rA(t.colorStops,function(e){return{offset:e.offset,color:sX(e.color)}}),"linear"===t.type)?a=4:"radial"===t.type&&(a=5),s=d}0===o?this.valType=a:(a!==this.valType||6===a)&&(r=!0),this.discrete=this.discrete||r;var u={time:e,value:s,rawValue:t,percent:0};return n&&(u.easing=n,u.easingFunc=rR(n)?n:sf[n]||sI(n)),i.push(u),u},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var i=this.valType,o=n.length,r=n[o-1],a=this.discrete,s=le(i),l=s9(i),c=0;c<o;c++){var d=n[c],u=d.value,m=r.value;d.percent=d.time/e,!a&&(s&&c!==o-1?function(e,t,n){if(e.push&&t.push){var i=e.length,o=t.length;if(i!==o)if(i>o)e.length=o;else for(var r=i;r<o;r++)e.push(1===n?t[r]:s5.call(t[r]));for(var a=e[0]&&e[0].length,r=0;r<e.length;r++)if(1===n)isNaN(e[r])&&(e[r]=t[r]);else for(var s=0;s<a;s++)isNaN(e[r][s])&&(e[r][s]=t[r][s])}}(u,m,i):l&&function(e,t){for(var n=e.length,i=t.length,o=n>i?t:e,r=Math.min(n,i),a=o[r-1]||{color:[0,0,0,0],offset:0},s=r;s<Math.max(n,i);s++)o.push({offset:a.offset,color:a.color.slice()})}(u.colorStops,m.colorStops))}if(!a&&5!==i&&t&&this.needsAnimate()&&t.needsAnimate()&&i===t.valType&&!t._finished){this._additiveTrack=t;for(var f=n[0].value,c=0;c<o;c++)0===i?n[c].additiveValue=n[c].value-f:3===i?n[c].additiveValue=s4([],n[c].value,f,-1):le(i)&&(n[c].additiveValue=1===i?s4([],n[c].value,f,-1):s6([],n[c].value,f,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,i,o,r=null!=this._additiveTrack,a=r?"additiveValue":"value",s=this.valType,l=this.keyframes,c=l.length,d=this.propName,u=3===s,m=this._lastFr,f=Math.min;if(1===c)i=o=l[0];else{if(t<0)n=0;else if(t<this._lastFrP){for(n=f(m+1,c-1);n>=0&&!(l[n].percent<=t);n--);n=f(n,c-2)}else{for(n=m;n<c&&!(l[n].percent>t);n++);n=f(n-1,c-2)}o=l[n+1],i=l[n]}if(i&&o){this._lastFr=n,this._lastFrP=t;var p=o.percent-i.percent,h=0===p?1:f((t-i.percent)/p,1);o.easingFunc&&(h=o.easingFunc(h));var b=r?this._additiveValue:u?lt:e[d];if((le(s)||u)&&!b&&(b=this._additiveValue=[]),this.discrete)e[d]=h<1?i.rawValue:o.rawValue;else if(le(s))1===s?s3(b,i[a],o[a],h):function(e,t,n,i){for(var o=t.length,r=o&&t[0].length,a=0;a<o;a++){e[a]||(e[a]=[]);for(var s,l=0;l<r;l++)e[a][l]=(s=t[a][l],(n[a][l]-s)*i+s)}}(b,i[a],o[a],h);else if(s9(s)){var g,_,y,v,F,x=i[a],w=o[a],k=4===s;(e[d]={type:k?"linear":"radial",x:(g=x.x,(w.x-g)*h+g),y:(_=x.y,(w.y-_)*h+_),colorStops:rA(x.colorStops,function(e,t){var n,i=w.colorStops[t];return{offset:(n=e.offset,(i.offset-n)*h+n),color:s7(s3([],e.color,i.color,h))}}),global:w.global},k)?(e[d].x2=(y=x.x2,(w.x2-y)*h+y),e[d].y2=(v=x.y2,(w.y2-v)*h+v)):e[d].r=(F=x.r,(w.r-F)*h+F)}else if(u)s3(b,i[a],o[a],h),r||(e[d]=s7(b));else{var E,T=(E=i[a],(o[a]-E)*h+E);r?this._additiveValue=T:e[d]=T}r&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,i=this._additiveValue;0===t?e[n]=e[n]+i:3===t?(sX(e[n],lt),s4(lt,lt,i,1),e[n]=s7(lt)):1===t?s4(e[n],e[n],i,1):2===t&&s6(e[n],e[n],i,1)},e}(),li=function(){function e(e,t,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&i)return void ry("Can' use additive animation on looped animation.");this._additiveAnimators=i,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,rS(t),n)},e.prototype.whenWithKeys=function(e,t,n,i){for(var o=this._tracks,r=0;r<n.length;r++){var a=n[r],s=o[a];if(!s){s=o[a]=new ln(a);var l=void 0,c=this._getAdditiveTrack(a);if(c){var d=c.keyframes,u=d[d.length-1];l=u&&u.value,3===c.valType&&l&&(l=s7(l))}else l=this._target[a];if(null==l)continue;e>0&&s.addKeyframe(0,s8(l),i),this._trackKeys.push(a)}s.addKeyframe(e,s8(t[a]),i)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var o=n[i].getTrack(e);o&&(t=o)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],i=this._maxTime||0,o=0;o<this._trackKeys.length;o++){var r=this._trackKeys[o],a=this._tracks[r],s=this._getAdditiveTrack(r),l=a.keyframes,c=l.length;if(a.prepare(i,s),a.needsAnimate())if(!this._allowDiscrete&&a.discrete){var d=l[c-1];d&&(t._target[a.propName]=d.rawValue),a.setFinished()}else n.push(a)}if(n.length||this._force){var u=new sO({life:i,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var i=t._additiveAnimators;if(i){for(var o=!1,r=0;r<i.length;r++)if(i[r]._clip){o=!0;break}o||(t._additiveAnimators=null)}for(var r=0;r<n.length;r++)n[r].step(t._target,e);var a=t._onframeCbs;if(a)for(var r=0;r<a.length;r++)a[r](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=u,this.animation&&this.animation.addClip(u),e&&u.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return rA(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,o=0;o<e.length;o++){var r=n[e[o]];r&&!r.isFinished()&&(t?r.step(this._target,1):1===this._started&&r.step(this._target,0),r.setFinished())}for(var a=!0,o=0;o<i.length;o++)if(!n[i[o]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},e.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var i=0;i<t.length;i++){var o=t[i],r=this._tracks[o];if(!(!r||r.isFinished())){var a=r.keyframes,s=a[n?0:a.length-1];s&&(e[o]=s8(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t=t||rS(e);for(var n=0;n<t.length;n++){var i=t[n],o=this._tracks[i];if(o){var r=o.keyframes;if(r.length>1){var a=r.pop();o.addKeyframe(a.time,e[i]),o.prepare(this._maxTime,o.getAdditiveTrack())}}}},e}();function lo(){return new Date().getTime()}var lr=function(e){function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,n.stage=(t=t||{}).stage||{},n}return r7(t,e),t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=lo()-this._pausedTime,n=t-this._time,i=this._head;i;){var o=i.next;i.step(t,n)&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=t,!e&&(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,ey(function t(){e._running&&(ey(t),e._paused||e.update())})},t.prototype.start=function(){this._running||(this._time=lo(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=lo(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=lo()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return null==this._head},t.prototype.animate=function(e,t){t=t||{},this.start();var n=new li(e,t.loop);return this.addAnimator(n),n},t}(ac),la=ri.domSupported,ls=function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=rA(e,function(e){var n=e.replace("mouse","pointer");return t.hasOwnProperty(n)?n:e});return{mouse:e,touch:["touchstart","touchend","touchmove"],pointer:n}}(),ll={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},lc=!1;function ld(e){var t=e.pointerType;return"pen"===t||"touch"===t}function lu(e){e&&(e.zrByTouch=!0)}function lm(e,t){for(var n=t,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return i}var lf=function(e,t){this.stopPropagation=r4,this.stopImmediatePropagation=r4,this.preventDefault=r4,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY},lp={mousedown:function(e){e=aT(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=aT(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=aT(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){lm(this,(e=aT(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){lc=!0,e=aT(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){lc||(e=aT(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){lu(e=aT(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),lp.mousemove.call(this,e),lp.mousedown.call(this,e)},touchmove:function(e){lu(e=aT(this.dom,e)),this.handler.processGesture(e,"change"),lp.mousemove.call(this,e)},touchend:function(e){lu(e=aT(this.dom,e)),this.handler.processGesture(e,"end"),lp.mouseup.call(this,e),new Date-this.__lastTouchMoment<300&&lp.click.call(this,e)},pointerdown:function(e){lp.mousedown.call(this,e)},pointermove:function(e){ld(e)||lp.mousemove.call(this,e)},pointerup:function(e){lp.mouseup.call(this,e)},pointerout:function(e){ld(e)||lp.mouseout.call(this,e)}};rM(["click","dblclick","contextmenu"],function(e){lp[e]=function(t){t=aT(this.dom,t),this.trigger(e,t)}});var lh={pointermove:function(e){ld(e)||lh.mousemove.call(this,e)},pointerup:function(e){lh.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function lb(e,t,n,i){var o;e.mounted[t]=n,e.listenerOpts[t]=i,o=e.domTarget,o.addEventListener(t,n,i)}function lg(e){var t,n,i,o=e.mounted;for(var r in o)o.hasOwnProperty(r)&&(t=e.domTarget,n=o[r],i=e.listenerOpts[r],t.removeEventListener(r,n,i));e.mounted={}}var l_=function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t},ly=function(e){function t(t,n){var i,o,r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new l_(t,lp),la&&(r._globalHandlerScope=new l_(document,lh)),o=(i=r._localHandlerScope).domHandlers,ri.pointerEventsSupported?rM(ls.pointer,function(e){lb(i,e,function(t){o[e].call(r,t)})}):(ri.touchEventsSupported&&rM(ls.touch,function(e){lb(i,e,function(t){o[e].call(r,t),i.touching=!0,null!=i.touchTimer&&(clearTimeout(i.touchTimer),i.touchTimer=null),i.touchTimer=setTimeout(function(){i.touching=!1,i.touchTimer=null},700)})}),rM(ls.mouse,function(e){lb(i,e,function(t){t=aE(t),i.touching||o[e].call(r,t)})})),r}return r7(t,e),t.prototype.dispose=function(){lg(this._localHandlerScope),la&&lg(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,la&&this.__pointerCapturing^e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?function(e,t){ri.pointerEventsSupported?rM(ll.pointer,n):ri.touchEventsSupported||rM(ll.mouse,n);function n(n){lb(t,n,function(i){if(!lm(e,(i=aE(i)).target)){var o;o=i,i=aT(e.dom,new lf(e,o),!0),t.domHandlers[n].call(e,i)}},{capture:!0})}}(this,t):lg(t)}},t}(ac),lv=1;ri.hasGlobalWindow&&(lv=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var lF=lv,lx="#333",lw="#ccc";function lk(e){return e>5e-5||e<-5e-5}var lE=[],lT=[],lM=aL(),lA=Math.abs,lC=function(){var e;function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},t.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},t.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},t.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},t.prototype.needLocalTransform=function(){return lk(this.rotation)||lk(this.x)||lk(this.y)||lk(this.scaleX-1)||lk(this.scaleY-1)||lk(this.skewX)||lk(this.skewY)},t.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(aI(n),this.invTransform=null);return}n=n||aL(),t?this.getLocalTransform(n):aI(n),e&&(t?aR(n,e,n):aO(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},t.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(lE);var n=lE[0]<0?-1:1,i=lE[1]<0?-1:1,o=((lE[0]-n)*t+n)/lE[0]||0,r=((lE[1]-i)*t+i)/lE[1]||0;e[0]*=o,e[1]*=o,e[2]*=r,e[3]*=r}this.invTransform=this.invTransform||aL(),aN(this.invTransform,e)},t.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},t.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),o=Math.PI/2+i-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(o),t=Math.sqrt(t),this.skewX=o,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||aL(),aR(lT,e.invTransform,t),t=lT);var n=this.originX,i=this.originY;(n||i)&&(lM[4]=n,lM[5]=i,aR(lT,t,lM),lT[4]-=n,lT[5]-=i,t=lT),this.setLocalTransform(t)}},t.prototype.getGlobalScale=function(e){var t=this.transform;return(e=e||[],t)?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1])):(e[0]=1,e[1]=1),e},t.prototype.transformCoordToLocal=function(e,t){var n=[e,t],i=this.invTransform;return i&&ao(n,n,i),n},t.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],i=this.transform;return i&&ao(n,n,i),n},t.prototype.getLineScale=function(){var e=this.transform;return e&&lA(e[0]-1)>1e-10&&lA(e[3]-1)>1e-10?Math.sqrt(lA(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){lS(this,e)},t.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,i=e.originY||0,o=e.scaleX,r=e.scaleY,a=e.anchorX,s=e.anchorY,l=e.rotation||0,c=e.x,d=e.y,u=e.skewX?Math.tan(e.skewX):0,m=e.skewY?Math.tan(-e.skewY):0;if(n||i||a||s){var f=n+a,p=i+s;t[4]=-f*o-u*p*r,t[5]=-p*r-m*f*o}else t[4]=t[5]=0;return t[0]=o,t[3]=r,t[1]=m*o,t[2]=u*r,l&&aP(t,t,l),t[4]+=n+c,t[5]+=i+d,t},t.initDefaultProps=void((e=t.prototype).scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0),t}(),lD=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function lS(e,t){for(var n=0;n<lD.length;n++){var i=lD[n];e[i]=t[i]}}function lL(e){ev||(ev=new sP(100)),e=e||ro;var t=ev.get(e);return t||(t={font:e,strWidthCache:new sP(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:ra.measureText("国",e).width,asciiCharWidth:ra.measureText("a",e).width},ev.put(e,t)),t}var lI=0;function lO(e,t){return e.asciiWidthMapTried||(e.asciiWidthMap=function(e){if(!(lI>=5)){e=e||ro;for(var t=[],n=+new Date,i=0;i<=127;i++)t[i]=ra.measureText(String.fromCharCode(i),e).width;var o=new Date-n;return o>16?lI=5:o>2&&lI++,t}}(e.font),e.asciiWidthMapTried=!0),0<=t&&t<=127?null!=e.asciiWidthMap?e.asciiWidthMap[t]:e.asciiCharWidth:e.stWideCharWidth}function lR(e,t){var n=e.strWidthCache,i=n.get(t);return null==i&&(i=ra.measureText(t,e.font).width,n.put(t,i)),i}function lY(e,t,n,i){var o=lR(lL(t),e),r=lH(t);return new a3(lN(0,o,n),lB(0,r,i),o,r)}function lP(e,t,n,i){var o=((e||"")+"").split("\n");if(1===o.length)return lY(o[0],t,n,i);for(var r=new a3(0,0,0,0),a=0;a<o.length;a++){var s=lY(o[a],t,n,i);0===a?r.copy(s):r.union(s)}return r}function lN(e,t,n,i){return"right"===n?i?e+=t:e-=t:"center"===n&&(i?e+=t/2:e-=t/2),e}function lB(e,t,n,i){return"middle"===n?i?e+=t/2:e-=t/2:"bottom"===n&&(i?e+=t:e-=t),e}function lH(e){return lL(e).stWideCharWidth}function lz(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function lj(e,t,n){var i=t.position||"inside",o=null!=t.distance?t.distance:5,r=n.height,a=n.width,s=r/2,l=n.x,c=n.y,d="left",u="top";if(i instanceof Array)l+=lz(i[0],n.width),c+=lz(i[1],n.height),d=null,u=null;else switch(i){case"left":l-=o,c+=s,d="right",u="middle";break;case"right":l+=o+a,c+=s,u="middle";break;case"top":l+=a/2,c-=o,d="center",u="bottom";break;case"bottom":l+=a/2,c+=r+o,d="center";break;case"inside":l+=a/2,c+=s,d="center",u="middle";break;case"insideLeft":l+=o,c+=s,u="middle";break;case"insideRight":l+=a-o,c+=s,d="right",u="middle";break;case"insideTop":l+=a/2,c+=o,d="center";break;case"insideBottom":l+=a/2,c+=r-o,d="center",u="bottom";break;case"insideTopLeft":l+=o,c+=o;break;case"insideTopRight":l+=a-o,c+=o,d="right";break;case"insideBottomLeft":l+=o,c+=r-o,u="bottom";break;case"insideBottomRight":l+=a-o,c+=r-o,d="right",u="bottom"}return(e=e||{}).x=l,e.y=c,e.align=d,e.verticalAlign=u,e}var lU="__zr_normal__",lW=lD.concat(["ignore"]),lV=rC(lD,function(e,t){return e[t]=!0,e},{ignore:!1}),lG={},l$=new a3(0,0,0,0),lq=[],lX=function(){function e(e){this.id=r_++,this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,o=t.innerTransformable,r=void 0,a=void 0,s=!1;o.parent=i?this:null;var l=!1;o.copyTransform(t);var c=null!=n.position,d=n.autoOverflowArea,u=void 0;if((d||c)&&(u=l$,n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),i||u.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(lG,n,u):lj(lG,n,u),o.x=lG.x,o.y=lG.y,r=lG.align,a=lG.verticalAlign;var m=n.origin;if(m&&null!=n.rotation){var f=void 0,p=void 0;"center"===m?(f=.5*u.width,p=.5*u.height):(f=lz(m[0],u.width),p=lz(m[1],u.height)),l=!0,o.originX=-o.x+f+(i?0:u.x),o.originY=-o.y+p+(i?0:u.y)}}null!=n.rotation&&(o.rotation=n.rotation);var h=n.offset;h&&(o.x+=h[0],o.y+=h[1],l||(o.originX=-h[0],o.originY=-h[1]));var b=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(d){var g=b.overflowRect=b.overflowRect||new a3(0,0,0,0);o.getLocalTransform(lq),aN(lq,lq),a3.copy(g,u),g.applyTransform(lq)}else b.overflowRect=null;var _=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,y=void 0,v=void 0,F=void 0;_&&this.canBeInsideText()?(y=n.insideFill,v=n.insideStroke,(null==y||"auto"===y)&&(y=this.getInsideTextFill()),(null==v||"auto"===v)&&(v=this.getInsideTextStroke(y),F=!0)):(y=n.outsideFill,v=n.outsideStroke,(null==y||"auto"===y)&&(y=this.getOutsideFill()),(null==v||"auto"===v)&&(v=this.getOutsideStroke(y),F=!0)),((y=y||"#000")!==b.fill||v!==b.stroke||F!==b.autoStroke||r!==b.align||a!==b.verticalAlign)&&(s=!0,b.fill=y,b.stroke=v,b.autoStroke=F,b.align=r,b.verticalAlign=a,t.setDefaultTextStyle(b)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(e){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?lw:lx},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&sX(t);n||(n=[255,255,255,1]);for(var i=n[3],o=this.__zr.isDarkMode(),r=0;r<3;r++)n[r]=n[r]*i+255*!o*(1-i);return n[3]=1,sQ(n,"rgba")},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){"textConfig"===e?this.setTextConfig(t):"textContent"===e?this.setTextContent(t):"clipPath"===e?this.setClipPath(t):"extra"===e?(this.extra=this.extra||{},rx(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if("string"==typeof e)this.attrKV(e,t);else if(rB(e))for(var n=rS(e),i=0;i<n.length;i++){var o=n[i];this.attrKV(o,e[o])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],o=i.__fromStateTransition;if(!i.getLoop()&&(!o||o===lU)){var r=i.targetName,a=r?t[r]:t;i.saveTo(a)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,lW)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var i=0;i<n.length;i++){var o=n[i];null==e[o]||o in t||(t[o]=this[o])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(lU,!1,e)},e.prototype.useState=function(e,t,n,i){var o,r=e===lU;if(this.hasState()||!r){var a=this.currentStates,s=this.stateTransition;if(!(rk(a,e)>=0)||!t&&1!==a.length){if(this.stateProxy&&!r&&(o=this.stateProxy(e)),o||(o=this.states&&this.states[e]),!o&&!r)return void ry("State "+e+" not exists.");r||this.saveCurrentToNormalState(o);var l=!!(o&&o.hoverLayer||i);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,o,this._normalState,t,!n&&!this.__inHover&&s&&s.duration>0,s);var c=this._textContent,d=this._textGuide;return c&&c.useState(e,t,n,l),d&&d.useState(e,t,n,l),r?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),o}}},e.prototype.useStates=function(e,t,n){if(e.length){var i=[],o=this.currentStates,r=e.length,a=r===o.length;if(a){for(var s=0;s<r;s++)if(e[s]!==o[s]){a=!1;break}}if(!a){for(var s=0;s<r;s++){var l=e[s],c=void 0;this.stateProxy&&(c=this.stateProxy(l,e)),c||(c=this.states[l]),c&&i.push(c)}var d=i[r-1],u=!!(d&&d.hoverLayer||n);u&&this._toggleHoverLayerFlag(!0);var m=this._mergeStates(i),f=this.stateTransition;this.saveCurrentToNormalState(m),this._applyStateObj(e.join(","),m,this._normalState,!1,!t&&!this.__inHover&&f&&f.duration>0,f);var p=this._textContent,h=this._textGuide;p&&p.useStates(e,t,u),h&&h.useStates(e,t,u),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!u&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}}else this.clearStates()},e.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=rk(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var i=this.currentStates.slice(),o=rk(i,e),r=rk(i,t)>=0;o>=0?r?i.splice(o,1):i[o]=t:n&&!r&&i.push(t),this.useStates(i)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t,n={},i=0;i<e.length;i++){var o=e[i];rx(n,o),o.textConfig&&rx(t=t||{},o.textConfig)}return t&&(n.textConfig=t),n},e.prototype._applyStateObj=function(e,t,n,i,o,r){var a=!(t&&i);t&&t.textConfig?(this.textConfig=rx({},i?this.textConfig:n.textConfig),rx(this.textConfig,t.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,c=0;c<lW.length;c++){var d=lW[c],u=o&&lV[d];t&&null!=t[d]?u?(l=!0,s[d]=t[d]):this[d]=t[d]:a&&null!=n[d]&&(u?(l=!0,s[d]=n[d]):this[d]=n[d])}if(!o)for(var c=0;c<this.animators.length;c++){var m=this.animators[c],f=m.targetName;m.getLoop()||m.__changeFinalValue(f?(t||n)[f]:t||n)}l&&this._transitionState(e,s,r)},e.prototype._attachComponent=function(e){if((!e.__zr||e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new lC,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),rx(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var i=new li(e?this[e]:this,t,n);return e&&(i.targetName=e),this.addAnimator(i,e),i},e.prototype.addAnimator=function(e,t){var n=this.__zr,i=this;e.during(function(){i.updateDuringAnimation(t)}).done(function(){var t=i.animators,n=rk(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,i=n.length,o=[],r=0;r<i;r++){var a=n[r];e&&e!==a.scope?o.push(a):a.stop(t)}return this.animators=o,this},e.prototype.animateTo=function(e,t,n){lK(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){lK(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,i){for(var o=lK(this,t,n,i),r=0;r<o.length;r++)o[r].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=function(){var t=e.prototype;function n(e,n,i,o){Object.defineProperty(t,e,{get:function(){return this[n]||r(this,this[n]=[]),this[n]},set:function(e){this[i]=e[0],this[o]=e[1],this[n]=e,r(this,e)}});function r(e,t){Object.defineProperty(t,0,{get:function(){return e[i]},set:function(t){e[i]=t}}),Object.defineProperty(t,1,{get:function(){return e[o]},set:function(t){e[o]=t}})}}t.type="element",t.name="",t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=1,Object.defineProperty&&(n("position","_legacyPos","x","y"),n("scale","_legacyScale","scaleX","scaleY"),n("origin","_legacyOrigin","originX","originY"))}(),e}();function lK(e,t,n,i,o){var r=[];!function e(t,n,i,o,r,a,s,l){for(var c=rS(o),d=r.duration,u=r.delay,m=r.additive,f=r.setToFinal,p=!rB(a),h=t.animators,b=[],g=0;g<c.length;g++){var _=c[g],y=o[_];if(null!=y&&null!=i[_]&&(p||a[_]))if(!rB(y)||rT(y)||rU(y))b.push(_);else{if(n){l||(i[_]=y,t.updateDuringAnimation(n));continue}e(t,_,i[_],y,r,a&&a[_],s,l)}else l||(i[_]=y,t.updateDuringAnimation(n),b.push(_))}var v=b.length;if(!m&&v)for(var F=0;F<h.length;F++){var x=h[F];if(x.targetName===n&&x.stopTracks(b)){var w=rk(h,x);h.splice(w,1)}}if(r.force||(v=(b=rD(b,function(e){var t,n;return!((t=o[e])===(n=i[e])||rT(t)&&rT(n)&&function(e,t){var n=e.length;if(n!==t.length)return!1;for(var i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}(t,n))})).length),v>0||r.force&&!s.length){var k=void 0,E=void 0,T=void 0;if(l){E={},f&&(k={});for(var F=0;F<v;F++){var _=b[F];E[_]=i[_],f?k[_]=o[_]:i[_]=o[_]}}else if(f){T={};for(var F=0;F<v;F++){var _=b[F];T[_]=s8(i[_]),function(e,t,n){if(rT(t[n]))if(rT(e[n])||(e[n]=[]),rz(t[n])){var i=t[n].length;e[n].length!==i&&(e[n]=new t[n].constructor(i),lJ(e[n],t[n],i))}else{var o=t[n],r=e[n],a=o.length;if(rT(o[0]))for(var s=o[0].length,l=0;l<a;l++)r[l]?lJ(r[l],o[l],s):r[l]=Array.prototype.slice.call(o[l]);else lJ(r,o,a);r.length=o.length}else e[n]=t[n]}(i,o,_)}}var x=new li(i,!1,!1,m?rD(h,function(e){return e.targetName===n}):null);x.targetName=n,r.scope&&(x.scope=r.scope),f&&k&&x.whenWithKeys(0,k,b),T&&x.whenWithKeys(0,T,b),x.whenWithKeys(null==d?500:d,l?E:o,b).delay(u||0),t.addAnimator(x,n),s.push(x)}}(e,"",e,t,n=n||{},i,r,o);var a=r.length,s=!1,l=n.done,c=n.aborted,d=function(){s=!0,--a<=0&&(s?l&&l():c&&c())},u=function(){--a<=0&&(s?l&&l():c&&c())};!a&&l&&l(),r.length>0&&n.during&&r[0].during(function(e,t){n.during(t)});for(var m=0;m<r.length;m++){var f=r[m];d&&f.done(d),u&&f.aborted(u),n.force&&f.duration(n.duration),f.start(n.easing)}return r}function lJ(e,t,n){for(var i=0;i<n;i++)e[i]=t[i]}rE(lX,ac),rE(lX,lC);var lZ=function(e){function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return r7(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,i=n.indexOf(t);i>=0&&(n.splice(i,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=rk(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,i=n[t];if(e&&e!==this&&e.parent!==this&&e!==i){n[t]=e,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,i=rk(n,e);return i<0||(n.splice(i,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var i=e[n];t&&i.removeSelfFromZr(t),i.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,i=0;i<n.length;i++){var o=n[i];e.call(t,o,i)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var i=this._children[n],o=e.call(t,i);i.isGroup&&!o&&i.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(t)},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(t)},t.prototype.getBoundingRect=function(e){for(var t=new a3(0,0,0,0),n=e||this._children,i=[],o=null,r=0;r<n.length;r++){var a=n[r];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),l=a.getLocalTransform(i);l?(a3.applyTransform(t,s,l),(o=o||t.clone()).union(t)):(o=o||s.clone()).union(s)}}return o||t},t}(lX);lZ.prototype.type="group";let lQ=lZ;var l0={},l1={},l2=function(){function e(e,t,n){var i,o=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var r=new sm,a=n.renderer||"canvas";l0[a]||(a=rS(l0)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var s=new l0[a](t,r,n,e),l=n.ssr||s.ssrOnly;this.storage=r,this.painter=s;var c=ri.node||ri.worker||l?null:new ly(s.getViewportRoot(),s.root),d=n.useCoarsePointer;(null==d||"auto"===d?ri.touchEventsSupported:!!d)&&(i=rV(n.pointerSize,44)),this.handler=new st(r,s,c,s.root,i),this.animation=new lr({stage:{update:l?null:function(){return o._flush(!0)}}}),l||this.animation.start()}return e.prototype.add=function(e){!this._disposed&&e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){!this._disposed&&e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=function(e){if(!e)return!1;if("string"==typeof e)return .4>s0(e,1);if(e.colorStops){for(var t=e.colorStops,n=0,i=t.length,o=0;o<i;o++)n+=s0(t[o].color,1);return(n/=i)<.4}return!1}(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!1)},e.prototype._flush=function(e){var t,n=lo();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var i=lo();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){!this._disposed&&(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},e.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof lQ&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){if(!this._disposed){var e;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,e=this.id,delete l1[e]}},e}();function l5(e,t){var n=new l2(r_++,e,t);return l1[n.id]=n,n}var l3=Math.min,l4=Math.max,l6=Math.abs;function l8(e,t,n,i){var o=t[0],r=t[1],a=n[0],s=n[1],l=r-o,c=s-a;if(0===l)return 0===c?a:(a+s)/2;if(i){if(l>0){if(e<=o)return a;else if(e>=r)return s}else if(e>=o)return a;else if(e<=r)return s}else{if(e===o)return a;if(e===r)return s}return(e-o)/l*c+a}var l7=function(e,t,n){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return l9(e,t,n)};function l9(e,t,n){return rY(e)?e.replace(/^\s+|\s+$/g,"").match(/%$/)?parseFloat(e)/100*t+(n||0):parseFloat(e):null==e?NaN:+e}function ce(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function ct(e){return e.sort(function(e,t){return e-t}),e}function cn(e){if(isNaN(e*=1))return 0;if(e>1e-14){for(var t,n,i,o,r,a=1,s=0;s<15;s++,a*=10)if(Math.round(e*a)/a===e)return s}return i=(n=(t=e.toString().toLowerCase()).indexOf("e"))>0?+t.slice(n+1):0,o=n>0?n:t.length,Math.max(0,((r=t.indexOf("."))<0?0:o-1-r)-i)}function ci(e,t){var n=Math.log,i=Math.LN10,o=Math.min(Math.max(-Math.floor(n(e[1]-e[0])/i)+Math.round(n(l6(t[1]-t[0]))/i),0),20);return isFinite(o)?o:20}function co(e){var t=2*Math.PI;return(e%t+t)%t}function cr(e){return e>-1e-4&&e<1e-4}var ca=/^(?:(\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 cs(e){if(e instanceof Date)return e;if(rY(e)){var t=ca.exec(e);if(!t)return new Date(NaN);if(!t[8])return new Date(+t[1],(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0);var n=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(n-=t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return null==e?new Date(NaN):new Date(Math.round(e))}function cl(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function cc(e,t){var n=cl(e),i=Math.pow(10,n),o=e/i;return e=(t?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10)*i,n>=-20?+e.toFixed(n<0?-n:0):e}function cd(e){var t=parseFloat(e);return t==e&&(0!==t||!rY(e)||0>=e.indexOf("x"))?t:NaN}function cu(){return Math.round(9*Math.random())}function cm(e,t){return null==e?t:null==t?e:e*t/function e(t,n){return 0===n?t:e(n,t%n)}(e,t)}var cf="series\0";function cp(e){return e instanceof Array?e:null==e?[]:[e]}function ch(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var i=0,o=n.length;i<o;i++){var r=n[i];!e.emphasis[t].hasOwnProperty(r)&&e[t].hasOwnProperty(r)&&(e.emphasis[t][r]=e[t][r])}}}var cb=["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 cg(e){return!rB(e)||rO(e)||e instanceof Date?e:e.value}function c_(e,t,n){var i=cv(t[e],null),o=cv(n[e],null);return null!=i&&null!=o&&i===o}function cy(e){return cv(e,"")}function cv(e,t){return null==e?t:rY(e)?e:rN(e)||rP(e)?e+"":t}function cF(e){var t=e.name;return!!(t&&t.indexOf(cf))}function cx(e){return e&&null!=e.id&&0===cy(e.id).indexOf("\0_ec_\0")}function cw(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?rO(t.dataIndex)?rA(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?rO(t.name)?rA(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function ck(){var e="__ec_inner_"+cE++;return function(t){return t[e]||(t[e]={})}}var cE=cu();function cT(e,t,n){var i=cM(t,n),o=i.mainTypeSpecified,r=i.queryOptionMap,a=i.others,s=n?n.defaultMainType:null;return!o&&s&&r.set(s,{}),r.each(function(t,i){var o=cD(e,i,t,{useDefault:s===i,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone});a[i+"Models"]=o.models,a[i+"Model"]=o.models[0]}),a}function cM(e,t){if(rY(e)){var n,i={};i[e+"Index"]=0,n=i}else n=e;var o=r1(),r={},a=!1;return rM(n,function(e,n){if("dataIndex"===n||"dataIndexInside"===n){r[n]=e;return}var i=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=i[1],l=(i[2]||"").toLowerCase();!s||!l||t&&t.includeMainTypes&&0>rk(t.includeMainTypes,s)||(a=a||!!s,(o.get(s)||o.set(s,{}))[l]=e)}),{mainTypeSpecified:a,queryOptionMap:o,others:r}}var cA={useDefault:!0,enableAll:!1,enableNone:!1},cC={useDefault:!1,enableAll:!0,enableNone:!0};function cD(e,t,n,i){i=i||cA;var o=n.index,r=n.id,a=n.name,s={models:null,specified:null!=o||null!=r||null!=a};if(!s.specified){var l=void 0;return s.models=i.useDefault&&(l=e.getComponent(t))?[l]:[],s}if("none"===o||!1===o)if(i.enableNone)return s.models=[],s;else o=-1;return"all"===o&&(o=i.enableAll?r=a=null:-1),s.models=e.queryComponents({mainType:t,index:o,id:r,name:a}),s}function cS(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}!function(){function e(){}e.prototype.reset=function(e,t,n,i){return this._list=e,this._step=i=i||1,this._idx=t,this._end=null!=n?n:i>0?e.length:0,this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)&&(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0)}}();var cL="___EC__COMPONENT__CONTAINER___",cI="___EC__EXTENDED_CLASS___";function cO(e){var t={main:"",sub:""};if(e){var n=e.split(".");t.main=n[0]||"",t.sub=n[1]||""}return t}function cR(e,t){e.$constructor=e,e.extend=function(e){var t,n,i=this;if(rR(t=i)&&/^class\s/.test(Function.prototype.toString.call(t)))n=function(e){function t(){return e.apply(this,arguments)||this}return rt(t,e),t}(i);else{var o=n=function(){(e.$constructor||i).apply(this,arguments)},r=o.prototype;function a(){}for(var s in a.prototype=this.prototype,o.prototype=new a,r)r.hasOwnProperty(s)&&(o.prototype[s]=r[s]);o.prototype.constructor=o,o.superClass=this}return rx(n.prototype,e),n[cI]=!0,n.extend=this.extend,n.superCall=cN,n.superApply=cB,n.superClass=i,n}}function cY(e,t){e.extend=t.extend}var cP=Math.round(10*Math.random());function cN(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return this.superClass.prototype[t].apply(e,n)}function cB(e,t,n){return this.superClass.prototype[t].apply(e,n)}function cH(e){var t={};e.registerClass=function(e){var n=e.type||e.prototype.type;if(n){rX(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n),'componentType "'+n+'" illegal'),e.prototype.type=n;var i,o,r=cO(n);r.sub?r.sub!==cL&&(((o=t[(i=r).main])&&o[cL]||((o=t[i.main]={})[cL]=!0),o)[r.sub]=e):t[r.main]=e}return e},e.getClass=function(e,n,i){var o=t[e];if(o&&o[cL]&&(o=n?o[n]:null),i&&!o)throw Error(n?"Component "+e+"."+(n||"")+" is used but not imported.":e+".type should be specified.");return o},e.getClassesByMainType=function(e){var n=cO(e),i=[],o=t[n.main];return o&&o[cL]?rM(o,function(e,t){t!==cL&&i.push(e)}):i.push(o),i},e.hasClass=function(e){return!!t[cO(e).main]},e.getAllClassMainTypes=function(){var e=[];return rM(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[cO(e).main];return n&&n[cL]}}function cz(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t=t||!1,function(n,i,o){for(var r={},a=0;a<e.length;a++){var s=e[a][1];if(!(i&&rk(i,s)>=0||o&&0>rk(o,s))){var l=n.getShallow(s,t);null!=l&&(r[e[a][0]]=l)}}return r}}var cj=cz([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),cU=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return cj(this,e,t)},e}(),cW=new sP(50);function cV(e,t,n,i,o){if(!e)return t;if("string"!=typeof e)return e;if(t&&t.__zrImageSrc===e||!n)return t;var r=cW.get(e),a={hostEl:n,cb:i,cbPayload:o};return r?c$(t=r.image)||r.pending.push(a):((t=ra.loadImage(e,cG,cG)).__zrImageSrc=e,cW.put(e,t.__cachedImgObj={image:t,pending:[a]})),t}function cG(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function c$(e){return e&&e.width&&e.height}var cq=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function cX(e,t,n,i){var o=rx({},i=i||{});n=rV(n,"..."),o.maxIterations=rV(i.maxIterations,2);var r=o.minChar=rV(i.minChar,0),a=o.fontMeasureInfo=lL(t),s=a.asciiCharWidth;o.placeholder=rV(i.placeholder,"");for(var l=e=Math.max(0,e-1),c=0;c<r&&l>=s;c++)l-=s;var d=lR(a,n);return d>l&&(n="",d=0),l=e-d,o.ellipsis=n,o.ellipsisWidth=d,o.contentWidth=l,o.containerWidth=e,o}function cK(e,t,n){var i=n.containerWidth,o=n.contentWidth,r=n.fontMeasureInfo;if(!i){e.textLine="",e.isTruncated=!1;return}var a=lR(r,t);if(a<=i){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(a<=o||s>=n.maxIterations){t+=n.ellipsis;break}var l=0===s?function(e,t,n){for(var i=0,o=0,r=e.length;o<r&&i<t;o++)i+=lO(n,e.charCodeAt(o));return o}(t,o,r):a>0?Math.floor(t.length*o/a):0;a=lR(r,t=t.substr(0,l))}""===t&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}var cJ=function(){},cZ=function(e){this.tokens=[],e&&(this.tokens=e)},cQ=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1};function c0(e,t,n,i,o){var r,a,s=""===t,l=o&&n.rich[o]||{},c=e.lines,d=l.font||n.font,u=!1;if(i){var m=l.padding,f=m?m[1]+m[3]:0;if(null!=l.width&&"auto"!==l.width){var p=lz(l.width,i.width)+f;c.length>0&&p+i.accumWidth>i.width&&(r=t.split("\n"),u=!0),i.accumWidth=p}else{var h=c2(t,d,i.width,i.breakAll,i.accumWidth);i.accumWidth=h.accumWidth+f,a=h.linesWidths,r=h.lines}}r||(r=t.split("\n"));for(var b=lL(d),g=0;g<r.length;g++){var _=r[g],y=new cJ;if(y.styleName=o,y.text=_,y.isLineHolder=!_&&!s,"number"==typeof l.width?y.width=l.width:y.width=a?a[g]:lR(b,_),g||u)c.push(new cZ([y]));else{var v=(c[c.length-1]||(c[0]=new cZ)).tokens,F=v.length;1===F&&v[0].isLineHolder?v[0]=y:(_||!F||s)&&v.push(y)}}}var c1=rC(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function c2(e,t,n,i,o){for(var r=[],a=[],s="",l="",c=0,d=0,u=lL(t),m=0;m<e.length;m++){var f=e.charAt(m);if("\n"===f){l&&(s+=l,d+=c),r.push(s),a.push(d),s="",l="",c=0,d=0;continue}var p=lO(u,f.charCodeAt(0)),h=!i&&!function(e){var t;return(!((t=e.charCodeAt(0))>=32)||!(t<=591))&&(!(t>=880)||!(t<=4351))&&(!(t>=4608)||!(t<=5119))&&(!(t>=7680)||!(t<=8303))||!!c1[e]}(f);if(r.length?d+p>n:o+d+p>n){d?(s||l)&&(h?(s||(s=l,l="",d=c=0),r.push(s),a.push(d-c),l+=f,c+=p,s="",d=c):(l&&(s+=l,l="",c=0),r.push(s),a.push(d),s=f,d=p)):h?(r.push(l),a.push(c),l=f,c=p):(r.push(f),a.push(p));continue}d+=p,h?(l+=f,c+=p):(l&&(s+=l,l="",c=0),s+=f)}return l&&(s+=l),s&&(r.push(s),a.push(d)),1===r.length&&(d+=o),{accumWidth:d,lines:r,linesWidths:a}}function c5(e,t,n,i,o,r){if(e.baseX=n,e.baseY=i,e.outerWidth=e.outerHeight=null,t){var a=2*t.width,s=2*t.height;a3.set(c3,lN(n,a,o),lB(i,s,r),a,s),a3.intersect(t,c3,null,c4);var l=c4.outIntersectRect;e.outerWidth=l.width,e.outerHeight=l.height,e.baseX=lN(l.x,l.width,o,!0),e.baseY=lB(l.y,l.height,r,!0)}}var c3=new a3(0,0,0,0),c4={outIntersectRect:{},clamp:!0};function c6(e){return null!=e?e+="":e=""}function c8(e,t,n,i){var o=new a3(lN(e.x||0,t,e.textAlign),lB(e.y||0,n,e.textBaseline),t,n),r=null!=i?i:c7(e)?e.lineWidth:0;return r>0&&(o.x-=r/2,o.y-=r/2,o.width+=r,o.height+=r),o}function c7(e){var t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0}var c9="__zr_style_"+Math.round(10*Math.random()),de={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},dt={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};de[c9]=!0;var dn=["z","z2","invisible"],di=["invisible"],dr=function(e){var t;function n(t){return e.call(this,t)||this}return r7(n,e),n.prototype._init=function(t){for(var n=rS(t),i=0;i<n.length;i++){var o=n[i];"style"===o?this.useStyle(t[o]):e.prototype.attrKV.call(this,o,t[o])}this.style||this.useStyle({})},n.prototype.beforeBrush=function(){},n.prototype.afterBrush=function(){},n.prototype.innerBeforeBrush=function(){},n.prototype.innerAfterBrush=function(){},n.prototype.shouldBePainted=function(e,t,n,i){var o,r,a,s=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&(o=this,r=e,a=t,da.copy(o.getBoundingRect()),o.transform&&da.applyTransform(o.transform),ds.width=r,ds.height=a,!da.intersect(ds))||s&&!s[0]&&!s[3])return!1;if(n&&this.__clipPaths&&this.__clipPaths.length){for(var l=0;l<this.__clipPaths.length;++l)if(this.__clipPaths[l].isZeroArea())return!1}if(i&&this.parent)for(var c=this.parent;c;){if(c.ignore)return!1;c=c.parent}return!0},n.prototype.contain=function(e,t){return this.rectContain(e,t)},n.prototype.traverse=function(e,t){e.call(t,this)},n.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},n.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),i=this.style,o=i.shadowBlur||0,r=i.shadowOffsetX||0,a=i.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new a3(0,0,0,0)),t?a3.applyTransform(e,n,t):e.copy(n),(o||r||a)&&(e.width+=2*o+Math.abs(r),e.height+=2*o+Math.abs(a),e.x=Math.min(e.x,e.x+r-o),e.y=Math.min(e.y,e.y+a-o));var s=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-s),e.y=Math.floor(e.y-s),e.width=Math.ceil(e.width+1+2*s),e.height=Math.ceil(e.height+1+2*s))}return e},n.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new a3(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},n.prototype.getPrevPaintRect=function(){return this._prevPaintRect},n.prototype.animateStyle=function(e){return this.animate("style",e)},n.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():this.markRedraw()},n.prototype.attrKV=function(t,n){"style"!==t?e.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},n.prototype.setStyle=function(e,t){return"string"==typeof e?this.style[e]=t:rx(this.style,e),this.dirtyStyle(),this},n.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},n.prototype.dirty=function(){this.dirtyStyle()},n.prototype.styleChanged=function(){return!!(2&this.__dirty)},n.prototype.styleUpdated=function(){this.__dirty&=-3},n.prototype.createStyle=function(e){return r2(de,e)},n.prototype.useStyle=function(e){e[c9]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},n.prototype.isStyleObject=function(e){return e[c9]},n.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,dn)},n.prototype._applyStateObj=function(t,n,i,o,r,a){e.prototype._applyStateObj.call(this,t,n,i,o,r,a);var s,l=!(n&&o);if(n&&n.style?r?o?s=n.style:(s=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(s,n.style)):(s=this._mergeStyle(this.createStyle(),o?this.style:i.style),this._mergeStyle(s,n.style)):l&&(s=i.style),s)if(r){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var d=rS(c),u=0;u<d.length;u++){var m=d[u];m in s&&(s[m]=s[m],this.style[m]=c[m])}for(var f=rS(s),u=0;u<f.length;u++){var m=f[u];this.style[m]=this.style[m]}this._transitionState(t,{style:s},a,this.getAnimationStyleProps())}else this.useStyle(s);for(var p=this.__inHover?di:dn,u=0;u<p.length;u++){var m=p[u];n&&null!=n[m]?this[m]=n[m]:l&&null!=i[m]&&(this[m]=i[m])}},n.prototype._mergeStates=function(t){for(var n,i=e.prototype._mergeStates.call(this,t),o=0;o<t.length;o++){var r=t[o];r.style&&(n=n||{},this._mergeStyle(n,r.style))}return n&&(i.style=n),i},n.prototype._mergeStyle=function(e,t){return rx(e,t),e},n.prototype.getAnimationStyleProps=function(){return dt},n.initDefaultProps=void((t=n.prototype).type="displayable",t.invisible=!1,t.z=0,t.z2=0,t.zlevel=0,t.culling=!1,t.cursor="pointer",t.rectHover=!1,t.incremental=!1,t._rect=null,t.dirtyRectTolerance=0,t.__dirty=3),n}(lX),da=new a3(0,0,0,0),ds=new a3(0,0,0,0),dl=Math.min,dc=Math.max,dd=Math.sin,du=Math.cos,dm=2*Math.PI,df=r9(),dp=r9(),dh=r9();function db(e,t,n){if(0!==e.length){for(var i=e[0],o=i[0],r=i[0],a=i[1],s=i[1],l=1;l<e.length;l++)o=dl(o,(i=e[l])[0]),r=dc(r,i[0]),a=dl(a,i[1]),s=dc(s,i[1]);t[0]=o,t[1]=a,n[0]=r,n[1]=s}}function dg(e,t,n,i,o,r){o[0]=dl(e,n),o[1]=dl(t,i),r[0]=dc(e,n),r[1]=dc(t,i)}var d_=[],dy=[],dv={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},dF=[],dx=[],dw=[],dk=[],dE=[],dT=[],dM=Math.min,dA=Math.max,dC=Math.cos,dD=Math.sin,dS=Math.abs,dL=Math.PI,dI=2*dL,dO="undefined"!=typeof Float32Array,dR=[];function dY(e){return Math.round(e/dL*1e8)/1e8%2*dL}var dP=function(){var e;function t(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(e,t,n){(n=n||0)>0&&(this._ux=dS(n/lF/e)||0,this._uy=dS(n/lF/t)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},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._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(dv.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},t.prototype.lineTo=function(e,t){var n=dS(e-this._xi),i=dS(t-this._yi),o=n>this._ux||i>this._uy;if(this.addData(dv.L,e,t),this._ctx&&o&&this._ctx.lineTo(e,t),o)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var r=n*n+i*i;r>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=r)}return this},t.prototype.bezierCurveTo=function(e,t,n,i,o,r){return this._drawPendingPt(),this.addData(dv.C,e,t,n,i,o,r),this._ctx&&this._ctx.bezierCurveTo(e,t,n,i,o,r),this._xi=o,this._yi=r,this},t.prototype.quadraticCurveTo=function(e,t,n,i){return this._drawPendingPt(),this.addData(dv.Q,e,t,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(e,t,n,i,o,r){this._drawPendingPt(),dR[0]=i,dR[1]=o,(a=dY(dR[0]))<0&&(a+=dI),s=a-dR[0],l=dR[1]+s,!r&&l-a>=dI?l=a+dI:r&&a-l>=dI?l=a-dI:!r&&a>l?l=a+(dI-dY(a-l)):r&&a<l&&(l=a-(dI-dY(l-a))),dR[0]=a,dR[1]=l,i=dR[0];var a,s,l,c=(o=dR[1])-i;return this.addData(dv.A,e,t,n,n,i,c,0,+!r),this._ctx&&this._ctx.arc(e,t,n,i,o,r),this._xi=dC(o)*n+e,this._yi=dD(o)*n+t,this},t.prototype.arcTo=function(e,t,n,i,o){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,i,o),this},t.prototype.rect=function(e,t,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,i),this.addData(dv.R,e,t,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(dv.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&dO&&(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t}},t.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var t=e.length,n=0,i=this._len,o=0;o<t;o++)n+=e[o].len();var r=this.data;if(dO&&(r instanceof Float32Array||!r)&&(this.data=new Float32Array(i+n),i>0&&r))for(var a=0;a<i;a++)this.data[a]=r[a];for(var o=0;o<t;o++)for(var s=e[o].data,a=0;a<s.length;a++)this.data[i++]=s[a];this._len=i}},t.prototype.addData=function(e,t,n,i,o,r,a,s,l){if(this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var d=0;d<arguments.length;d++)c[this._len++]=arguments[d]}},t.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},t.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,dO&&this._len>11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){dw[0]=dw[1]=dE[0]=dE[1]=Number.MAX_VALUE,dk[0]=dk[1]=dT[0]=dT[1]=-Number.MAX_VALUE;var e,t=this.data,n=0,i=0,o=0,r=0;for(e=0;e<this._len;){var a=t[e++],s=1===e;switch(s&&(n=t[e],i=t[e+1],o=n,r=i),a){case dv.M:n=o=t[e++],i=r=t[e++],dE[0]=o,dE[1]=r,dT[0]=o,dT[1]=r;break;case dv.L:dg(n,i,t[e],t[e+1],dE,dT),n=t[e++],i=t[e++];break;case dv.C:!function(e,t,n,i,o,r,a,s,l,c){var d=sT(e,n,o,a,d_);l[0]=1/0,l[1]=1/0,c[0]=-1/0,c[1]=-1/0;for(var u=0;u<d;u++){var m=sw(e,n,o,a,d_[u]);l[0]=dl(m,l[0]),c[0]=dc(m,c[0])}d=sT(t,i,r,s,dy);for(var u=0;u<d;u++){var f=sw(t,i,r,s,dy[u]);l[1]=dl(f,l[1]),c[1]=dc(f,c[1])}l[0]=dl(e,l[0]),c[0]=dc(e,c[0]),l[0]=dl(a,l[0]),c[0]=dc(a,c[0]),l[1]=dl(t,l[1]),c[1]=dc(t,c[1]),l[1]=dl(s,l[1]),c[1]=dc(s,c[1])}(n,i,t[e++],t[e++],t[e++],t[e++],t[e],t[e+1],dE,dT),n=t[e++],i=t[e++];break;case dv.Q:!function(e,t,n,i,o,r,a,s){var l=dc(dl(sD(e,n,o),1),0),c=dc(dl(sD(t,i,r),1),0),d=sA(e,n,o,l),u=sA(t,i,r,c);a[0]=dl(e,o,d),a[1]=dl(t,r,u),s[0]=dc(e,o,d),s[1]=dc(t,r,u)}(n,i,t[e++],t[e++],t[e],t[e+1],dE,dT),n=t[e++],i=t[e++];break;case dv.A:var l=t[e++],c=t[e++],d=t[e++],u=t[e++],m=t[e++],f=t[e++]+m;e+=1;var p=!t[e++];s&&(o=dC(m)*d+l,r=dD(m)*u+c),function(e,t,n,i,o,r,a,s,l){var c=Math.abs(o-r);if(c%dm<1e-4&&c>1e-4){s[0]=e-n,s[1]=t-i,l[0]=e+n,l[1]=t+i;return}if(df[0]=du(o)*n+e,df[1]=dd(o)*i+t,dp[0]=du(r)*n+e,dp[1]=dd(r)*i+t,ar(s,df,dp),aa(l,df,dp),(o%=dm)<0&&(o+=dm),(r%=dm)<0&&(r+=dm),o>r&&!a?r+=dm:o<r&&a&&(o+=dm),a){var d=r;r=o,o=d}for(var u=0;u<r;u+=Math.PI/2)u>o&&(dh[0]=du(u)*n+e,dh[1]=dd(u)*i+t,ar(s,dh,s),aa(l,dh,l))}(l,c,d,u,m,f,p,dE,dT),n=dC(f)*d+l,i=dD(f)*u+c;break;case dv.R:dg(o=n=t[e++],r=i=t[e++],o+t[e++],r+t[e++],dE,dT);break;case dv.Z:n=o,i=r}ar(dw,dw,dE),aa(dk,dk,dT)}return 0===e&&(dw[0]=dw[1]=dk[0]=dk[1]=0),new a3(dw[0],dw[1],dk[0]-dw[0],dk[1]-dw[1])},t.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,i=this._uy,o=0,r=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,c=0,d=0,u=0;u<t;){var m=e[u++],f=1===u;f&&(o=e[u],r=e[u+1],a=o,s=r);var p=-1;switch(m){case dv.M:o=a=e[u++],r=s=e[u++];break;case dv.L:var h=e[u++],b=e[u++],g=h-o,_=b-r;(dS(g)>n||dS(_)>i||u===t-1)&&(p=Math.sqrt(g*g+_*_),o=h,r=b);break;case dv.C:var y=e[u++],v=e[u++],h=e[u++],b=e[u++],F=e[u++],x=e[u++];p=function(e,t,n,i,o,r,a,s,l){for(var c=e,d=t,u=0,m=1;m<=10;m++){var f=.1*m,p=sw(e,n,o,a,f),h=sw(t,i,r,s,f),b=p-c,g=h-d;u+=Math.sqrt(b*b+g*g),c=p,d=h}return u}(o,r,y,v,h,b,F,x,10),o=F,r=x;break;case dv.Q:var y=e[u++],v=e[u++],h=e[u++],b=e[u++];p=function(e,t,n,i,o,r,a){for(var s=e,l=t,c=0,d=1;d<=10;d++){var u=.1*d,m=sA(e,n,o,u),f=sA(t,i,r,u),p=m-s,h=f-l;c+=Math.sqrt(p*p+h*h),s=m,l=f}return c}(o,r,y,v,h,b,10),o=h,r=b;break;case dv.A:var w=e[u++],k=e[u++],E=e[u++],T=e[u++],M=e[u++],A=e[u++],C=A+M;u+=1,f&&(a=dC(M)*E+w,s=dD(M)*T+k),p=dA(E,T)*dM(dI,Math.abs(A)),o=dC(C)*E+w,r=dD(C)*T+k;break;case dv.R:a=o=e[u++],s=r=e[u++],p=2*e[u++]+2*e[u++];break;case dv.Z:var g=a-o,_=s-r;p=Math.sqrt(g*g+_*_),o=a,r=s}p>=0&&(l[d++]=p,c+=p)}return this._pathLen=c,c},t.prototype.rebuildPath=function(e,t){var n,i,o,r,a,s,l,c,d,u,m=this.data,f=this._ux,p=this._uy,h=this._len,b=t<1,g=0,_=0,y=0;if(!b||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,c=t*this._pathLen))t:for(var v=0;v<h;){var F=m[v++],x=1===v;switch(x&&(o=m[v],r=m[v+1],n=o,i=r),F!==dv.L&&y>0&&(e.lineTo(d,u),y=0),F){case dv.M:n=o=m[v++],i=r=m[v++],e.moveTo(o,r);break;case dv.L:a=m[v++],s=m[v++];var w=dS(a-o),k=dS(s-r);if(w>f||k>p){if(b){var E=l[_++];if(g+E>c){var T=(c-g)/E;e.lineTo(o*(1-T)+a*T,r*(1-T)+s*T);break t}g+=E}e.lineTo(a,s),o=a,r=s,y=0}else{var M=w*w+k*k;M>y&&(d=a,u=s,y=M)}break;case dv.C:var A=m[v++],C=m[v++],D=m[v++],S=m[v++],L=m[v++],I=m[v++];if(b){var E=l[_++];if(g+E>c){var T=(c-g)/E;sM(o,A,D,L,T,dF),sM(r,C,S,I,T,dx),e.bezierCurveTo(dF[1],dx[1],dF[2],dx[2],dF[3],dx[3]);break t}g+=E}e.bezierCurveTo(A,C,D,S,L,I),o=L,r=I;break;case dv.Q:var A=m[v++],C=m[v++],D=m[v++],S=m[v++];if(b){var E=l[_++];if(g+E>c){var T=(c-g)/E;sS(o,A,D,T,dF),sS(r,C,S,T,dx),e.quadraticCurveTo(dF[1],dx[1],dF[2],dx[2]);break t}g+=E}e.quadraticCurveTo(A,C,D,S),o=D,r=S;break;case dv.A:var O=m[v++],R=m[v++],Y=m[v++],P=m[v++],N=m[v++],B=m[v++],H=m[v++],z=!m[v++],j=Y>P?Y:P,U=dS(Y-P)>.001,W=N+B,V=!1;if(b){var E=l[_++];g+E>c&&(W=N+B*(c-g)/E,V=!0),g+=E}if(U&&e.ellipse?e.ellipse(O,R,Y,P,H,N,W,z):e.arc(O,R,j,N,W,z),V)break t;x&&(n=dC(N)*Y+O,i=dD(N)*P+R),o=dC(W)*Y+O,r=dD(W)*P+R;break;case dv.R:n=o=m[v],i=r=m[v+1],a=m[v++],s=m[v++];var G=m[v++],$=m[v++];if(b){var E=l[_++];if(g+E>c){var q=c-g;e.moveTo(a,s),e.lineTo(a+dM(q,G),s),(q-=G)>0&&e.lineTo(a+G,s+dM(q,$)),(q-=$)>0&&e.lineTo(a+dA(G-q,0),s+$),(q-=G)>0&&e.lineTo(a,s+dA($-q,0));break t}g+=E}e.rect(a,s,G,$);break;case dv.Z:if(b){var E=l[_++];if(g+E>c){var T=(c-g)/E;e.lineTo(o*(1-T)+n*T,r*(1-T)+i*T);break t}g+=E}e.closePath(),o=n,r=i}}},t.prototype.clone=function(){var e=new t,n=this.data;return e.data=n.slice?n.slice():Array.prototype.slice.call(n),e._len=this._len,e},t.prototype.canSave=function(){return!!this._saveData},t.CMD=dv,t.initDefaultProps=void((e=t.prototype)._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0),t}();function dN(e,t,n,i,o,r,a){if(0===o)return!1;var s=0,l=e;if(a>t+o&&a>i+o||a<t-o&&a<i-o||r>e+o&&r>n+o||r<e-o&&r<n-o)return!1;if(e===n)return Math.abs(r-e)<=o/2;s=(t-i)/(e-n);var c=s*r-a+(l=(e*i-n*t)/(e-n));return c*c/(s*s+1)<=o/2*o/2}var dB=2*Math.PI;function dH(e){return(e%=dB)<0&&(e+=dB),e}var dz=2*Math.PI;function dj(e,t,n,i,o,r){if(r>t&&r>i||r<t&&r<i||i===t)return 0;var a=(r-t)/(i-t),s=i<t?1:-1;(1===a||0===a)&&(s=i<t?.5:-.5);var l=a*(n-e)+e;return l===o?1/0:l>o?s:0}var dU=dP.CMD,dW=2*Math.PI,dV=[-1,-1,-1],dG=[-1,-1];function d$(e,t,n,i,o){for(var r,a,s=e.data,l=e.len(),c=0,d=0,u=0,m=0,f=0,p=0;p<l;){var h,b,g,_,y,v,F,x,w,k,E,T,M,A,C=s[p++],D=1===p;switch(C===dU.M&&p>1&&!n&&(c+=dj(d,u,m,f,i,o)),D&&(d=s[p],u=s[p+1],m=d,f=u),C){case dU.M:m=s[p++],f=s[p++],d=m,u=f;break;case dU.L:if(n){if(dN(d,u,s[p],s[p+1],t,i,o))return!0}else c+=dj(d,u,s[p],s[p+1],i,o)||0;d=s[p++],u=s[p++];break;case dU.C:if(n){if(h=d,b=u,g=s[p++],_=s[p++],y=s[p++],v=s[p++],F=s[p],x=s[p+1],0!==t&&(!(o>b+t)||!(o>_+t)||!(o>v+t)||!(o>x+t))&&(!(o<b-t)||!(o<_-t)||!(o<v-t)||!(o<x-t))&&(!(i>h+t)||!(i>g+t)||!(i>y+t)||!(i>F+t))&&(!(i<h-t)||!(i<g-t)||!(i<y-t)||!(i<F-t))&&function(e,t,n,i,o,r,a,s,l,c,d){var u,m,f,p,h,b=.005,g=1/0;s_[0]=l,s_[1]=c;for(var _=0;_<1;_+=.05)sy[0]=sw(e,n,o,a,_),sy[1]=sw(t,i,r,s,_),(p=ai(s_,sy))<g&&(u=_,g=p);g=1/0;for(var y=0;y<32&&!(b<1e-4);y++)m=u-b,f=u+b,sy[0]=sw(e,n,o,a,m),sy[1]=sw(t,i,r,s,m),p=ai(sy,s_),m>=0&&p<g?(u=m,g=p):(sv[0]=sw(e,n,o,a,f),sv[1]=sw(t,i,r,s,f),h=ai(sv,s_),f<=1&&h<g?(u=f,g=h):b*=.5);return sh(g)}(h,b,g,_,y,v,F,x,i,o,0)<=t/2)return!0}else c+=function(e,t,n,i,o,r,a,s,l,c){if(c>t&&c>i&&c>r&&c>s||c<t&&c<i&&c<r&&c<s)return 0;var d=sE(t,i,r,s,c,dV);if(0===d)return 0;for(var u=0,m=-1,f=void 0,p=void 0,h=0;h<d;h++){var b=dV[h],g=0===b||1===b?.5:1;sw(e,n,o,a,b)<l||(m<0&&(m=sT(t,i,r,s,dG),dG[1]<dG[0]&&m>1&&function(){var e=dG[0];dG[0]=dG[1],dG[1]=e}(),f=sw(t,i,r,s,dG[0]),m>1&&(p=sw(t,i,r,s,dG[1]))),2===m?b<dG[0]?u+=f<t?g:-g:b<dG[1]?u+=p<f?g:-g:u+=s<p?g:-g:b<dG[0]?u+=f<t?g:-g:u+=s<f?g:-g)}return u}(d,u,s[p++],s[p++],s[p++],s[p++],s[p],s[p+1],i,o)||0;d=s[p++],u=s[p++];break;case dU.Q:if(n){if(w=d,k=u,E=s[p++],T=s[p++],M=s[p],A=s[p+1],0!==t&&(!(o>k+t)||!(o>T+t)||!(o>A+t))&&(!(o<k-t)||!(o<T-t)||!(o<A-t))&&(!(i>w+t)||!(i>E+t)||!(i>M+t))&&(!(i<w-t)||!(i<E-t)||!(i<M-t))&&function(e,t,n,i,o,r,a,s,l){var c,d=.005,u=1/0;s_[0]=a,s_[1]=s;for(var m=0;m<1;m+=.05){sy[0]=sA(e,n,o,m),sy[1]=sA(t,i,r,m);var f=ai(s_,sy);f<u&&(c=m,u=f)}u=1/0;for(var p=0;p<32&&!(d<1e-4);p++){var h=c-d,b=c+d;sy[0]=sA(e,n,o,h),sy[1]=sA(t,i,r,h);var f=ai(sy,s_);if(h>=0&&f<u)c=h,u=f;else{sv[0]=sA(e,n,o,b),sv[1]=sA(t,i,r,b);var g=ai(sv,s_);b<=1&&g<u?(c=b,u=g):d*=.5}}return sh(u)}(w,k,E,T,M,A,i,o,0)<=t/2)return!0}else c+=function(e,t,n,i,o,r,a,s){if(s>t&&s>i&&s>r||s<t&&s<i&&s<r)return 0;var l=function(e,t,n,i,o){var r=e-2*t+n,a=2*(t-e),s=e-i,l=0;if(sF(r)){if(sx(a)){var c=-s/a;c>=0&&c<=1&&(o[l++]=c)}}else{var d=a*a-4*r*s;if(sF(d)){var c=-a/(2*r);c>=0&&c<=1&&(o[l++]=c)}else if(d>0){var u=sh(d),c=(-a+u)/(2*r),m=(-a-u)/(2*r);c>=0&&c<=1&&(o[l++]=c),m>=0&&m<=1&&(o[l++]=m)}}return l}(t,i,r,s,dV);if(0===l)return 0;var c=sD(t,i,r);if(c>=0&&c<=1){for(var d=0,u=sA(t,i,r,c),m=0;m<l;m++){var f=0===dV[m]||1===dV[m]?.5:1,p=sA(e,n,o,dV[m]);p<a||(dV[m]<c?d+=u<t?f:-f:d+=r<u?f:-f)}return d}var f=0===dV[0]||1===dV[0]?.5:1,p=sA(e,n,o,dV[0]);return p<a?0:r<t?f:-f}(d,u,s[p++],s[p++],s[p],s[p+1],i,o)||0;d=s[p++],u=s[p++];break;case dU.A:var S=s[p++],L=s[p++],I=s[p++],O=s[p++],R=s[p++],Y=s[p++];p+=1;var P=!!(1-s[p++]);r=Math.cos(R)*I+S,a=Math.sin(R)*O+L,D?(m=r,f=a):c+=dj(d,u,r,a,i,o);var N=(i-S)*O/I+S;if(n){if(function(e,t,n,i,o,r,a,s,l){if(0===a)return!1;var c=Math.sqrt((s-=e)*s+(l-=t)*l);if(c-a>n||c+a<n)return!1;if(Math.abs(i-o)%dz<1e-4)return!0;if(r){var d=i;i=dH(o),o=dH(d)}else i=dH(i),o=dH(o);i>o&&(o+=dz);var u=Math.atan2(l,s);return u<0&&(u+=dz),u>=i&&u<=o||u+dz>=i&&u+dz<=o}(S,L,O,R,R+Y,P,t,N,o))return!0}else c+=function(e,t,n,i,o,r,a,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);dV[0]=-l,dV[1]=l;var c=Math.abs(i-o);if(c<1e-4)return 0;if(c>=dW-1e-4){i=0,o=dW;var d=r?1:-1;return a>=dV[0]+e&&a<=dV[1]+e?d:0}if(i>o){var u=i;i=o,o=u}i<0&&(i+=dW,o+=dW);for(var m=0,f=0;f<2;f++){var p=dV[f];if(p+e>a){var h=Math.atan2(s,p),d=r?1:-1;h<0&&(h=dW+h),(h>=i&&h<=o||h+dW>=i&&h+dW<=o)&&(h>Math.PI/2&&h<1.5*Math.PI&&(d=-d),m+=d)}}return m}(S,L,O,R,R+Y,P,N,o);d=Math.cos(R+Y)*I+S,u=Math.sin(R+Y)*O+L;break;case dU.R:m=d=s[p++],f=u=s[p++];var B=s[p++],H=s[p++];if(r=m+B,a=f+H,n){if(dN(m,f,r,f,t,i,o)||dN(r,f,r,a,t,i,o)||dN(r,a,m,a,t,i,o)||dN(m,a,m,f,t,i,o))return!0}else c+=dj(r,f,r,a,i,o),c+=dj(m,a,m,f,i,o);break;case dU.Z:if(n){if(dN(d,u,m,f,t,i,o))return!0}else c+=dj(d,u,m,f,i,o);d=m,u=f}}return n||1e-4>Math.abs(u-f)||(c+=dj(d,u,m,f,i,o)||0),0!==c}var dq=rw({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},de),dX={style:rw({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},dt.style)},dK=lD.concat(["invisible","culling","z","z2","zlevel","parent"]);let dJ=function(e){var t;function n(t){return e.call(this,t)||this}return r7(n,e),n.prototype.update=function(){var t=this;e.prototype.update.call(this);var i=this.style;if(i.decal){var o=this._decalEl=this._decalEl||new n;o.buildPath===n.prototype.buildPath&&(o.buildPath=function(e){t.buildPath(e,t.shape)}),o.silent=!0;var r=o.style;for(var a in i)r[a]!==i[a]&&(r[a]=i[a]);r.fill=i.fill?i.decal:null,r.decal=null,r.shadowColor=null,i.strokeFirst&&(r.stroke=null);for(var s=0;s<dK.length;++s)o[dK[s]]=this[dK[s]];o.__dirty|=1}else this._decalEl&&(this._decalEl=null)},n.prototype.getDecalElement=function(){return this._decalEl},n.prototype._init=function(t){var n=rS(t);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var o=0;o<n.length;o++){var r=n[o],a=t[r];"style"===r?this.style?rx(this.style,a):this.useStyle(a):"shape"===r?rx(this.shape,a):e.prototype.attrKV.call(this,r,a)}this.style||this.useStyle({})},n.prototype.getDefaultStyle=function(){return null},n.prototype.getDefaultShape=function(){return{}},n.prototype.canBeInsideText=function(){return this.hasFill()},n.prototype.getInsideTextFill=function(){var e=this.style.fill;if("none"!==e){if(rY(e)){var t=s0(e,0);return t>.5?lx:t>.2?"#eee":lw}else if(e)return lw}return lx},n.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(rY(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==.4>s0(e,0))return t}},n.prototype.buildPath=function(e,t,n){},n.prototype.pathUpdated=function(){this.__dirty&=-5},n.prototype.getUpdatedPathProxy=function(e){return this.path||this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},n.prototype.createPathProxy=function(){this.path=new dP(!1)},n.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0},n.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},n.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||4&this.__dirty)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var r=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){r.copy(e);var a=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(r.width+=s/a,r.height+=s/a,r.x-=s/a/2,r.y-=s/a/2)}return r}return e},n.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),i=this.getBoundingRect(),o=this.style;if(e=n[0],t=n[1],i.contain(e,t)){var r=this.path;if(this.hasStroke()){var a=o.lineWidth,s=o.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),d$(r,a/s,!0,e,t)))return!0}if(this.hasFill())return d$(r,0,!1,e,t)}return!1},n.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},n.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},n.prototype.animateShape=function(e){return this.animate("shape",e)},n.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():"shape"===e?this.dirtyShape():this.markRedraw()},n.prototype.attrKV=function(t,n){"shape"===t?this.setShape(n):e.prototype.attrKV.call(this,t,n)},n.prototype.setShape=function(e,t){var n=this.shape;return n||(n=this.shape={}),"string"==typeof e?n[e]=t:rx(n,e),this.dirtyShape(),this},n.prototype.shapeChanged=function(){return!!(4&this.__dirty)},n.prototype.createStyle=function(e){return r2(dq,e)},n.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=rx({},this.shape))},n.prototype._applyStateObj=function(t,n,i,o,r,a){e.prototype._applyStateObj.call(this,t,n,i,o,r,a);var s,l=!(n&&o);if(n&&n.shape?r?o?s=n.shape:(s=rx({},i.shape),rx(s,n.shape)):(s=rx({},o?this.shape:i.shape),rx(s,n.shape)):l&&(s=i.shape),s)if(r){this.shape=rx({},this.shape);for(var c={},d=rS(s),u=0;u<d.length;u++){var m=d[u];"object"==typeof s[m]?this.shape[m]=s[m]:c[m]=s[m]}this._transitionState(t,{shape:c},a)}else this.shape=s,this.dirtyShape()},n.prototype._mergeStates=function(t){for(var n,i=e.prototype._mergeStates.call(this,t),o=0;o<t.length;o++){var r=t[o];r.shape&&(n=n||{},this._mergeStyle(n,r.shape))}return n&&(i.shape=n),i},n.prototype.getAnimationStyleProps=function(){return dX},n.prototype.isZeroArea=function(){return!1},n.extend=function(e){var t=function(t){function n(n){var i=t.call(this,n)||this;return e.init&&e.init.call(i,n),i}return r7(n,t),n.prototype.getDefaultStyle=function(){return rv(e.style)},n.prototype.getDefaultShape=function(){return rv(e.shape)},n}(n);for(var i in e)"function"==typeof e[i]&&(t.prototype[i]=e[i]);return t},n.initDefaultProps=void((t=n.prototype).type="path",t.strokeContainThreshold=5,t.segmentIgnoreThreshold=0,t.subPixelOptimize=!1,t.autoBatch=!1,t.__dirty=7),n}(dr);var dZ=rw({strokeFirst:!0,font:ro,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},dq),dQ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r7(t,e),t.prototype.hasStroke=function(){return c7(this.style)},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.createStyle=function(e){return r2(dZ,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e,t,n;return this._rect||(this._rect=(t=c6((e=this.style).text),n=e.font,c8(e,lR(lL(n),t),lH(n),null))),this._rect},t.initDefaultProps=void(t.prototype.dirtyRectTolerance=10),t}(dr);dQ.prototype.type="tspan";var d0=rw({x:0,y:0},de),d1={style:rw({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},dt.style)},d2=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r7(t,e),t.prototype.createStyle=function(e){return r2(d0,e)},t.prototype._getSize=function(e){var t,n=this.style,i=n[e];if(null!=i)return i;var o=(t=n.image)&&"string"!=typeof t&&t.width&&t.height?n.image:this.__image;if(!o)return 0;var r="width"===e?"height":"width",a=n[r];return null==a?o[e]:o[e]/o[r]*a},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return d1},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new a3(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(dr);d2.prototype.type="image";let d5=d2;var d3=Math.round;function d4(e,t,n){if(t){var i=t.x1,o=t.x2,r=t.y1,a=t.y2;e.x1=i,e.x2=o,e.y1=r,e.y2=a;var s=n&&n.lineWidth;return s&&(d3(2*i)===d3(2*o)&&(e.x1=e.x2=d8(i,s,!0)),d3(2*r)===d3(2*a)&&(e.y1=e.y2=d8(r,s,!0))),e}}function d6(e,t,n){if(t){var i=t.x,o=t.y,r=t.width,a=t.height;e.x=i,e.y=o,e.width=r,e.height=a;var s=n&&n.lineWidth;return s&&(e.x=d8(i,s,!0),e.y=d8(o,s,!0),e.width=Math.max(d8(i+r,s,!1)-e.x,+(0!==r)),e.height=Math.max(d8(o+a,s,!1)-e.y,+(0!==a))),e}}function d8(e,t,n){if(!t)return e;var i=d3(2*e);return(i+d3(t))%2==0?i/2:(i+(n?1:-1))/2}var d7=function(){this.x=0,this.y=0,this.width=0,this.height=0},d9={},ue=function(e){function t(t){return e.call(this,t)||this}return r7(t,e),t.prototype.getDefaultShape=function(){return new d7},t.prototype.buildPath=function(e,t){if(this.subPixelOptimize){var n,i,o,r,a,s,l,c,d,u,m,f,p,h,b,g=d6(d9,t,this.style);f=g.x,p=g.y,h=g.width,b=g.height,g.r=t.r,t=g}else f=t.x,p=t.y,h=t.width,b=t.height;t.r?(l=(n=t).x,c=n.y,d=n.width,u=n.height,m=n.r,d<0&&(l+=d,d=-d),u<0&&(c+=u,u=-u),"number"==typeof m?i=o=r=a=m:m instanceof Array?1===m.length?i=o=r=a=m[0]:2===m.length?(i=r=m[0],o=a=m[1]):3===m.length?(i=m[0],o=a=m[1],r=m[2]):(i=m[0],o=m[1],r=m[2],a=m[3]):i=o=r=a=0,i+o>d&&(s=i+o,i*=d/s,o*=d/s),r+a>d&&(s=r+a,r*=d/s,a*=d/s),o+r>u&&(s=o+r,o*=u/s,r*=u/s),i+a>u&&(s=i+a,i*=u/s,a*=u/s),e.moveTo(l+i,c),e.lineTo(l+d-o,c),0!==o&&e.arc(l+d-o,c+o,o,-Math.PI/2,0),e.lineTo(l+d,c+u-r),0!==r&&e.arc(l+d-r,c+u-r,r,0,Math.PI/2),e.lineTo(l+a,c+u),0!==a&&e.arc(l+a,c+u-a,a,Math.PI/2,Math.PI),e.lineTo(l,c+i),0!==i&&e.arc(l+i,c+i,i,Math.PI,1.5*Math.PI)):e.rect(f,p,h,b)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(dJ);ue.prototype.type="rect";let ut=ue;var un={fill:"#000"},ui={},uo={style:rw({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},dt.style)},ur=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=un,n.attr(t),n}return r7(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){var e;this._childCursor=0,ud(e=this.style),rM(e.rich,ud),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new a3(0,0,0,0),t=this._children,n=[],i=null,o=0;o<t.length;o++){var r=t[o],a=r.getBoundingRect(),s=r.getLocalTransform(n);s?(e.copy(a),e.applyTransform(s),(i=i||e.clone()).union(e)):(i=i||a.clone()).union(a)}this._rect=i||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||un},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,i=e.rich||n&&{};return rx(e,t),n&&i?(this._mergeRich(i,n),e.rich=i):i&&(e.rich=i),e},t.prototype._mergeRich=function(e,t){for(var n=rS(t),i=0;i<n.length;i++){var o=n[i];e[o]=e[o]||{},rx(e[o],t[o])}},t.prototype.getAnimationStyleProps=function(){return uo},t.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return t&&t instanceof e||(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||ro,n=e.padding,i=this._defaultStyle,o=e.x||0,r=e.y||0,a=e.align||i.align||"left",s=e.verticalAlign||i.verticalAlign||"top";c5(ui,i.overflowRect,o,r,a,s),o=ui.baseX,r=ui.baseY;var l=function(e,t,n,i){var o,r=c6(e),a=t.overflow,s=t.padding,l=s?s[1]+s[3]:0,c=s?s[0]+s[2]:0,d=t.font,u=lH(d),m=rV(t.lineHeight,u),f="truncate"===t.lineOverflow,p=!1,h=t.width;null==h&&null!=n&&(h=n-l);var b=t.height;null==b&&null!=i&&(b=i-c);var g=(o=null!=h&&("break"===a||"breakAll"===a)?r?c2(r,t.font,h,"breakAll"===a,0).lines:[]:r?r.split("\n"):[]).length*m;if(null==b&&(b=g),g>b&&f){var _=Math.floor(b/m);p=p||o.length>_,g=(o=o.slice(0,_)).length*m}if(r&&"truncate"===a&&null!=h)for(var y=cX(h,d,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),v={},F=0;F<o.length;F++)cK(v,o[F],y),o[F]=v.textLine,p=p||v.isTruncated;for(var x=b,w=0,k=lL(d),F=0;F<o.length;F++)w=Math.max(lR(k,o[F]),w);null==h&&(h=w);var E=h;return x+=c,{lines:o,height:b,outerWidth:E+=l,outerHeight:x,lineHeight:m,calculatedLineHeight:u,contentWidth:w,contentHeight:g,width:h,isTruncated:p}}(up(e),e,ui.outerWidth,ui.outerHeight),c=uh(e),d=!!e.backgroundColor,u=l.outerHeight,m=l.outerWidth,f=l.lines,p=l.lineHeight;this.isTruncated=!!l.isTruncated;var h=o,b=lB(r,l.contentHeight,s);if(c||n){var g=lN(o,m,a),_=lB(r,u,s);c&&this._renderBackground(e,e,g,_,m,u)}b+=p/2,n&&(h=uf(o,a,n),"top"===s?b+=n[0]:"bottom"===s&&(b-=n[2]));for(var y=0,v=!1,F=!1,x=um("fill"in e?e.fill:(F=!0,i.fill)),w=uu("stroke"in e?e.stroke:d||i.autoStroke&&!F?null:(y=2,v=!0,i.stroke)),k=e.textShadowBlur>0,E=0;E<f.length;E++){var T=this._getOrCreateChild(dQ),M=T.createStyle();T.useStyle(M),M.text=f[E],M.x=h,M.y=b,a&&(M.textAlign=a),M.textBaseline="middle",M.opacity=e.opacity,M.strokeFirst=!0,k&&(M.shadowBlur=e.textShadowBlur||0,M.shadowColor=e.textShadowColor||"transparent",M.shadowOffsetX=e.textShadowOffsetX||0,M.shadowOffsetY=e.textShadowOffsetY||0),M.stroke=w,M.fill=x,w&&(M.lineWidth=e.lineWidth||y,M.lineDash=e.lineDash,M.lineDashOffset=e.lineDashOffset||0),M.font=t,uc(M,e),b+=p,T.setBoundingRect(c8(M,l.contentWidth,l.calculatedLineHeight,v?0:null))}},t.prototype._updateRichTexts=function(){var e=this.style,t=this._defaultStyle,n=e.align||t.align,i=e.verticalAlign||t.verticalAlign,o=e.x||0,r=e.y||0;c5(ui,t.overflowRect,o,r,n,i),o=ui.baseX,r=ui.baseY;var a=function(e,t,n,i,o){var r,a=new cQ,s=c6(e);if(!s)return a;var l=t.padding,c=l?l[1]+l[3]:0,d=l?l[0]+l[2]:0,u=t.width;null==u&&null!=n&&(u=n-c);var m=t.height;null==m&&null!=i&&(m=i-d);for(var f=t.overflow,p=("break"===f||"breakAll"===f)&&null!=u?{width:u,accumWidth:0,breakAll:"breakAll"===f}:null,h=cq.lastIndex=0;null!=(r=cq.exec(s));){var b=r.index;b>h&&c0(a,s.substring(h,b),t,p),c0(a,r[2],t,p,r[1]),h=cq.lastIndex}h<s.length&&c0(a,s.substring(h,s.length),t,p);var g=[],_=0,y=0,v="truncate"===f,F="truncate"===t.lineOverflow,x={};function w(e,t,n){e.width=t,e.lineHeight=n,_+=n,y=Math.max(y,t)}e:for(var k=0;k<a.lines.length;k++){for(var E=a.lines[k],T=0,M=0,A=0;A<E.tokens.length;A++){var C=E.tokens[A],D=C.styleName&&t.rich[C.styleName]||{},S=C.textPadding=D.padding,L=S?S[1]+S[3]:0,I=C.font=D.font||t.font;C.contentHeight=lH(I);var O=rV(D.height,C.contentHeight);if(C.innerHeight=O,S&&(O+=S[0]+S[2]),C.height=O,C.lineHeight=rG(D.lineHeight,t.lineHeight,O),C.align=D&&D.align||o,C.verticalAlign=D&&D.verticalAlign||"middle",F&&null!=m&&_+C.lineHeight>m){var R=a.lines.length;A>0?(E.tokens=E.tokens.slice(0,A),w(E,M,T),a.lines=a.lines.slice(0,k+1)):a.lines=a.lines.slice(0,k),a.isTruncated=a.isTruncated||a.lines.length<R;break e}var Y=D.width,P=null==Y||"auto"===Y;if("string"==typeof Y&&"%"===Y.charAt(Y.length-1))C.percentWidth=Y,g.push(C),C.contentWidth=lR(lL(I),C.text);else{if(P){var N=D.backgroundColor,B=N&&N.image;B&&c$(B=function(e){if("string"!=typeof e)return e;var t=cW.get(e);return t&&t.image}(B))&&(C.width=Math.max(C.width,B.width*O/B.height))}var H=v&&null!=u?u-M:null;null!=H&&H<C.width?!P||H<L?(C.text="",C.width=C.contentWidth=0):(!function(e,t,n,i,o,r){if(!n){e.text="",e.isTruncated=!1;return}var a=(t+"").split("\n");r=cX(n,i,o,r);for(var s=!1,l={},c=0,d=a.length;c<d;c++)cK(l,a[c],r),a[c]=l.textLine,s=s||l.isTruncated;e.text=a.join("\n"),e.isTruncated=s}(x,C.text,H-L,I,t.ellipsis,{minChar:t.truncateMinChar}),C.text=x.text,a.isTruncated=a.isTruncated||x.isTruncated,C.width=C.contentWidth=lR(lL(I),C.text)):C.contentWidth=lR(lL(I),C.text)}C.width+=L,M+=C.width,D&&(T=Math.max(T,C.lineHeight))}w(E,M,T)}a.outerWidth=a.width=rV(u,y),a.outerHeight=a.height=rV(m,_),a.contentHeight=_,a.contentWidth=y,a.outerWidth+=c,a.outerHeight+=d;for(var k=0;k<g.length;k++){var C=g[k],z=C.percentWidth;C.width=parseInt(z,10)/100*a.width}return a}(up(e),e,ui.outerWidth,ui.outerHeight,n),s=a.width,l=a.outerWidth,c=a.outerHeight,d=e.padding;this.isTruncated=!!a.isTruncated;var u=lN(o,l,n),m=lB(r,c,i),f=u,p=m;d&&(f+=d[3],p+=d[0]);var h=f+s;uh(e)&&this._renderBackground(e,e,u,m,l,c);for(var b=!!e.backgroundColor,g=0;g<a.lines.length;g++){for(var _=a.lines[g],y=_.tokens,v=y.length,F=_.lineHeight,x=_.width,w=0,k=f,E=h,T=v-1,M=void 0;w<v&&(!(M=y[w]).align||"left"===M.align);)this._placeToken(M,e,F,p,k,"left",b),x-=M.width,k+=M.width,w++;for(;T>=0&&"right"===(M=y[T]).align;)this._placeToken(M,e,F,p,E,"right",b),x-=M.width,E-=M.width,T--;for(k+=(s-(k-f)-(h-E)-x)/2;w<=T;)M=y[w],this._placeToken(M,e,F,p,k+M.width/2,"center",b),k+=M.width,w++;p+=F}},t.prototype._placeToken=function(e,t,n,i,o,r,a){var s=t.rich[e.styleName]||{};s.text=e.text;var l=e.verticalAlign,c=i+n/2;"top"===l?c=i+e.height/2:"bottom"===l&&(c=i+n-e.height/2),!e.isLineHolder&&uh(s)&&this._renderBackground(s,t,"right"===r?o-e.width:"center"===r?o-e.width/2:o,c-e.height/2,e.width,e.height);var d=!!s.backgroundColor,u=e.textPadding;u&&(o=uf(o,r,u),c-=e.height/2-u[0]-e.innerHeight/2);var m=this._getOrCreateChild(dQ),f=m.createStyle();m.useStyle(f);var p=this._defaultStyle,h=!1,b=0,g=!1,_=um("fill"in s?s.fill:"fill"in t?t.fill:(h=!0,p.fill)),y=uu("stroke"in s?s.stroke:"stroke"in t?t.stroke:d||a||p.autoStroke&&!h?null:(b=2,g=!0,p.stroke)),v=s.textShadowBlur>0||t.textShadowBlur>0;f.text=e.text,f.x=o,f.y=c,v&&(f.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,f.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",f.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,f.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),f.textAlign=r,f.textBaseline="middle",f.font=e.font||ro,f.opacity=rG(s.opacity,t.opacity,1),uc(f,s),y&&(f.lineWidth=rG(s.lineWidth,t.lineWidth,b),f.lineDash=rV(s.lineDash,t.lineDash),f.lineDashOffset=t.lineDashOffset||0,f.stroke=y),_&&(f.fill=_),m.setBoundingRect(c8(f,e.contentWidth,e.contentHeight,g?0:null))},t.prototype._renderBackground=function(e,t,n,i,o,r){var a,s,l=e.backgroundColor,c=e.borderWidth,d=e.borderColor,u=l&&l.image,m=l&&!u,f=e.borderRadius,p=this;if(m||e.lineHeight||c&&d){(a=this._getOrCreateChild(ut)).useStyle(a.createStyle()),a.style.fill=null;var h=a.shape;h.x=n,h.y=i,h.width=o,h.height=r,h.r=f,a.dirtyShape()}if(m){var b=a.style;b.fill=l||null,b.fillOpacity=rV(e.fillOpacity,1)}else if(u){(s=this._getOrCreateChild(d5)).onload=function(){p.dirtyStyle()};var g=s.style;g.image=l.image,g.x=n,g.y=i,g.width=o,g.height=r}if(c&&d){var b=a.style;b.lineWidth=c,b.stroke=d,b.strokeOpacity=rV(e.strokeOpacity,1),b.lineDash=e.borderDash,b.lineDashOffset=e.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(b.strokeFirst=!0,b.lineWidth*=2)}var _=(a||s).style;_.shadowBlur=e.shadowBlur||0,_.shadowColor=e.shadowColor||"transparent",_.shadowOffsetX=e.shadowOffsetX||0,_.shadowOffsetY=e.shadowOffsetY||0,_.opacity=rG(e.opacity,t.opacity,1)},t.makeFont=function(e){var t,n,i="";return(null!=(t=e).fontSize||t.fontFamily||t.fontWeight)&&(i=[e.fontStyle,e.fontWeight,"string"==typeof(n=e.fontSize)&&(-1!==n.indexOf("px")||-1!==n.indexOf("rem")||-1!==n.indexOf("em"))?n:isNaN(+n)?"12px":n+"px",e.fontFamily||"sans-serif"].join(" ")),i&&rK(i)||e.textFont||e.font},t}(dr),ua={left:!0,right:1,center:1},us={top:1,bottom:1,middle:1},ul=["fontStyle","fontWeight","fontSize","fontFamily"];function uc(e,t){for(var n=0;n<ul.length;n++){var i=ul[n],o=t[i];null!=o&&(e[i]=o)}}function ud(e){if(e){e.font=ur.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||ua[t]?t:"left";var n=e.verticalAlign;"center"===n&&(n="middle"),e.verticalAlign=null==n||us[n]?n:"top",e.padding&&(e.padding=rq(e.padding))}}function uu(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function um(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function uf(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function up(e){var t=e.text;return null!=t&&(t+=""),t}function uh(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}let ub=ur;var ug=ck(),u_=function(e,t,n,i){if(i){var o=ug(i);o.dataIndex=n,o.dataType=t,o.seriesIndex=e,o.ssrType="chart","group"===i.type&&i.traverse(function(i){var o=ug(i);o.seriesIndex=e,o.dataIndex=n,o.dataType=t,o.ssrType="chart"})}},uy=1,uv={},uF=ck(),ux=ck(),uw=["emphasis","blur","select"],uk=["normal","emphasis","blur","select"],uE="highlight",uT="downplay",uM="select",uA="unselect",uC="toggleSelect",uD="selectchanged";function uS(e){return null!=e&&"none"!==e}function uL(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function uI(e){uL(e,"emphasis",2)}function uO(e){2===e.hoverState&&uL(e,"normal",0)}function uR(e){uL(e,"blur",1)}function uY(e){1===e.hoverState&&uL(e,"normal",0)}function uP(e){e.selected=!0}function uN(e){e.selected=!1}function uB(e,t,n){t(e,n),e.isGroup&&e.traverse(function(e){t(e,n)})}function uH(e,t){var n,i,o,r,a,s=this.states[e];if(this.style){if("emphasis"===e)return function(e,t,n,i){var o=n&&rk(n,"select")>=0,r=!1;if(e instanceof dJ){var a=uF(e),s=o&&a.selectFill||a.normalFill,l=o&&a.selectStroke||a.normalStroke;if(uS(s)||uS(l)){var c=(i=i||{}).style||{};"inherit"===c.fill?(r=!0,i=rx({},i),(c=rx({},c)).fill=s):!uS(c.fill)&&uS(s)?(r=!0,i=rx({},i),(c=rx({},c)).fill=s2(s)):!uS(c.stroke)&&uS(l)&&(r||(i=rx({},i),c=rx({},c)),c.stroke=s2(l)),i.style=c}}if(i&&null==i.z2){r||(i=rx({},i));var d=e.z2EmphasisLift;i.z2=e.z2+(null!=d?d:10)}return i}(this,0,t,s);else if("blur"===e)return n=s,i=rk(this.currentStates,e)>=0,o=this.style.opacity,r=i?null:function(e,t,n,i){for(var o=e.style,r={},a=0;a<t.length;a++){var s=t[a],l=o[s];r[s]=null==l?i&&i[s]:l}for(var a=0;a<e.animators.length;a++){var c=e.animators[a];c.__fromStateTransition&&0>c.__fromStateTransition.indexOf(n)&&"style"===c.targetName&&c.saveTo(r,t)}return r}(this,["opacity"],e,{opacity:1}),null==(a=(n=n||{}).style||{}).opacity&&(n=rx({},n),a=rx({opacity:i?o:.1*r.opacity},a),n.style=a),n;else if("select"===e){var l=s;if(l&&null==l.z2){l=rx({},l);var c=this.z2SelectLift;l.z2=this.z2+(null!=c?c:9)}return l}}return s}function uz(e){e.stateProxy=uH;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=uH),n&&(n.stateProxy=uH)}function uj(e,t){uG(e,t)||e.__highByOuter||uB(e,uI)}function uU(e,t){uG(e,t)||e.__highByOuter||uB(e,uO)}function uW(e,t){e.__highByOuter|=1<<(t||0),uB(e,uI)}function uV(e,t){(e.__highByOuter&=~(1<<(t||0)))||uB(e,uO)}function uG(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function u$(e){var t=e.getModel(),n=[],i=[];t.eachComponent(function(t,o){var r=ux(o),a="series"===t,s=a?e.getViewOfSeriesModel(o):e.getViewOfComponentModel(o);a||i.push(s),r.isBlured&&(s.group.traverse(function(e){uY(e)}),a&&n.push(o)),r.isBlured=!1}),rM(i,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function uq(e,t,n,i){var o=i.getModel();function r(e,t){for(var n=0;n<t.length;n++){var i=e.getItemGraphicEl(t[n]);i&&uB(i,uY)}}if((n=n||"coordinateSystem",null!=e)&&t&&"none"!==t){var a=o.getSeriesByIndex(e),s=a.coordinateSystem;s&&s.master&&(s=s.master);var l=[];o.eachSeries(function(e){var o=a===e,c=e.coordinateSystem;c&&c.master&&(c=c.master);var d=c&&s?c===s:o;if(!("series"===n&&!o||"coordinateSystem"===n&&!d||"series"===t&&o)){if(i.getViewOfSeriesModel(e).group.traverse(function(e){e.__highByOuter&&o&&"self"===t||uR(e)}),rT(t))r(e.getData(),t);else if(rB(t))for(var u=rS(t),m=0;m<u.length;m++)r(e.getData(u[m]),t[u[m]]);l.push(e),ux(e).isBlured=!0}}),o.eachComponent(function(e,t){if("series"!==e){var n=i.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(l,!0,o)}})}}function uX(e,t,n){if(null!=e&&null!=t){var i=n.getModel().getComponent(e,t);if(i){ux(i).isBlured=!0;var o=n.getViewOfComponentModel(i);o&&o.focusBlurEnabled&&o.group.traverse(function(e){uR(e)})}}}function uK(e,t,n,i){var o,r={focusSelf:!1,dispatchers:null};if(null==e||"series"===e||null==t||null==n)return r;var a=i.getModel().getComponent(e,t);if(!a)return r;var s=i.getViewOfComponentModel(a);if(!s||!s.findHighDownDispatchers)return r;for(var l=s.findHighDownDispatchers(n),c=0;c<l.length;c++)if("self"===ug(l[c]).focus){o=!0;break}return{focusSelf:o,dispatchers:l}}function uJ(e){rM(e.getAllData(),function(t){var n=t.data,i=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,i)?uB(t,uP):uB(t,uN)})})}function uZ(e,t,n){var i,o,r,a;u1(e,!0),uB(e,uz),i=e,o=t,r=n,a=ug(i),null!=o?(a.focus=o,a.blurScope=r):a.focus&&(a.focus=null)}var uQ=["emphasis","blur","select"],u0={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function u1(e,t){var n=!1===t;e.highDownSilentOnTouch&&(e.__highDownSilentOnTouch=e.highDownSilentOnTouch),(!n||e.__highDownDispatcher)&&(e.__highByOuter=e.__highByOuter||0,e.__highDownDispatcher=!n)}function u2(e){return!!(e&&e.__highDownDispatcher)}function u5(e){var t=e.type;return t===uM||t===uA||t===uC}function u3(e){var t=e.type;return t===uE||t===uT}var u4={};function u6(e,t,n){var i,o=e.labelFetcher,r=e.labelDataIndex,a=e.labelDimIndex,s=t.normal;o&&(i=o.getFormattedLabel(r,"normal",null,a,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null)),null==i&&(i=rR(e.defaultText)?e.defaultText(r,e,n):e.defaultText);for(var l={normal:i},c=0;c<uw.length;c++){var d=uw[c],u=t[d];l[d]=rV(o?o.getFormattedLabel(r,d,null,a,u&&u.get("formatter")):null,i)}return l}function u8(e,t,n,i,o){var r={};return function(e,t,n,i,o){n=n||u4;var r,a=t.ecModel,s=a&&a.option.textStyle,l=function(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||u4).rich;if(n){t=t||{};for(var i=rS(n),o=0;o<i.length;o++)t[i[o]]=1}e=e.parentModel}return t}(t);if(l){r={};var c="richInheritPlainLabel",d=rV(t.get(c),a?a.get(c):void 0);for(var u in l)if(l.hasOwnProperty(u)){var m=t.getModel(["rich",u]);mn(r[u]={},m,s,t,d,n,i,o,!1,!0)}}r&&(e.rich=r);var f=t.get("overflow");f&&(e.overflow=f);var p=t.get("lineOverflow");p&&(e.lineOverflow=p);var h=t.get("minMargin");if(null!=h)e.margin=[h=rN(h)?h/2:0,h,h,h],e.__marginType=mo.minMargin;else{var b=t.get("textMargin");null!=b&&(e.margin=rq(b),e.__marginType=mo.textMargin)}mn(e,t,s,null,null,n,i,o,!0,!1)}(r,e,n,i,o),t&&rx(r,t),r}function u7(e,t,n){t=t||{};var i,o={},r=e.getShallow("rotate"),a=rV(e.getShallow("distance"),n?null:5),s=e.getShallow("offset");return"outside"===(i=e.getShallow("position")||(n?null:"inside"))&&(i=t.defaultOutsidePosition||"top"),null!=i&&(o.position=i),null!=s&&(o.offset=s),null!=r&&(o.rotation=r*=Math.PI/180),null!=a&&(o.distance=a),o.outsideFill="inherit"===e.get("color")?t.inheritColor||null:"auto",null!=t.autoOverflowArea&&(o.autoOverflowArea=t.autoOverflowArea),null!=t.layoutRect&&(o.layoutRect=t.layoutRect),o}var u9=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],me=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],mt=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function mn(e,t,n,i,o,r,a,s,l,c){n=!a&&n||u4;var d=r&&r.inheritColor,u=t.getShallow("color"),m=t.getShallow("textBorderColor"),f=rV(t.getShallow("opacity"),n.opacity);("inherit"===u||"auto"===u)&&(u=d||null),("inherit"===m||"auto"===m)&&(m=d||null),s||(u=u||n.color,m=m||n.textBorderColor),null!=u&&(e.fill=u),null!=m&&(e.stroke=m);var p=rV(t.getShallow("textBorderWidth"),n.textBorderWidth);null!=p&&(e.lineWidth=p);var h=rV(t.getShallow("textBorderType"),n.textBorderType);null!=h&&(e.lineDash=h);var b=rV(t.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=b&&(e.lineDashOffset=b),a||null!=f||c||(f=r&&r.defaultOpacity),null!=f&&(e.opacity=f),a||s||null!=e.fill||!r.inheritColor||(e.fill=r.inheritColor);for(var g=0;g<u9.length;g++){var _=u9[g],y=!1!==o&&i?rG(t.getShallow(_),i.getShallow(_),n[_]):rV(t.getShallow(_),n[_]);null!=y&&(e[_]=y)}for(var g=0;g<me.length;g++){var _=me[g],y=t.getShallow(_);null!=y&&(e[_]=y)}if(null==e.verticalAlign){var v=t.getShallow("baseline");null!=v&&(e.verticalAlign=v)}if(!l||!r.disableBox){for(var g=0;g<mt.length;g++){var _=mt[g],y=t.getShallow(_);null!=y&&(e[_]=y)}var F=t.getShallow("borderType");null!=F&&(e.borderDash=F),("auto"===e.backgroundColor||"inherit"===e.backgroundColor)&&d&&(e.backgroundColor=d),("auto"===e.borderColor||"inherit"===e.borderColor)&&d&&(e.borderColor=d)}}var mi=ck(),mo={minMargin:1,textMargin:2},mr=["textStyle","color"],ma=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],ms=new ub,ml=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(mr):null)},e.prototype.getFont=function(){var e,t,n;return e={fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},n=(t=this.ecModel)&&t.getModel("textStyle"),rK([e.fontStyle||n&&n.getShallow("fontStyle")||"",e.fontWeight||n&&n.getShallow("fontWeight")||"",(e.fontSize||n&&n.getShallow("fontSize")||12)+"px",e.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<ma.length;n++)t[ma[n]]=this.getShallow(ma[n]);return ms.useStyle(t),ms.update(),ms.getBoundingRect()},e}(),mc=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],md=cz(mc),mu=function(){function e(){}return e.prototype.getLineStyle=function(e){return md(this,e)},e}(),mm=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],mf=cz(mm),mp=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return mf(this,e,t)},e}(),mh=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o]},e.prototype.mergeOption=function(e,t){rF(this.option,e,!0)},e.prototype.get=function(e,t){return null==e?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var n=this.option,i=null==n?n:n[e];if(null==i&&!t){var o=this.parentModel;o&&(i=o.getShallow(e))}return i},e.prototype.getModel=function(t,n){var i=null!=t,o=i?this.parsePath(t):null;return new e(i?this._doGet(o):this.option,n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(o)),this.ecModel)},e.prototype.isEmpty=function(){return null==this.option},e.prototype.restoreData=function(){},e.prototype.clone=function(){return new this.constructor(rv(this.option))},e.prototype.parsePath=function(e){return"string"==typeof e?e.split("."):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!ri.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;else if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var i=0;i<e.length&&(!e[i]||null!=(n=n&&"object"==typeof n?n[e[i]]:null));i++);return null==n&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},e}();cR(mh),function(e){var t=["__\0is_clz",cP++].join("_");e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}(mh),rE(mh,mu),rE(mh,mp),rE(mh,cU),rE(mh,ml);var mb=Math.round(10*Math.random());function mg(e){return[e||"",mb++].join("_")}function m_(e,t){return rF(rF({},e,!0),t,!0)}var my={},mv={},mF=ri.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage||"EN").toUpperCase().indexOf("ZH")>-1?"ZH":"EN";function mx(e,t){mv[e=e.toUpperCase()]=new mh(t),my[e]=t}function mw(){return null}mx("EN",{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:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},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:". "}}}}),mx("ZH",{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:"旭日图",custom:"自定义图表",chart:"图表"}},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:""}}}});var mk={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},mE={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},mT="{yyyy}-{MM}-{dd}",mM={year:"{yyyy}",month:"{yyyy}-{MM}",day:mT,hour:mT+" "+mE.hour,minute:mT+" "+mE.minute,second:mT+" "+mE.second,millisecond:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},mA=["year","month","day","hour","minute","second","millisecond"],mC=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function mD(e,t){return e+="","0000".substr(0,t-e.length)+e}function mS(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function mL(e,t,n,i){var o=cs(e),r=o[mR(n)](),a=o[mY(n)]()+1,s=Math.floor((a-1)/3)+1,l=o[mP(n)](),c=o["get"+(n?"UTC":"")+"Day"](),d=o[mN(n)](),u=(d-1)%12+1,m=o[mB(n)](),f=o[mH(n)](),p=o[mz(n)](),h=d>=12?"pm":"am",b=h.toUpperCase(),g=(i instanceof mh?i:mv[i||mF]||mv.EN).getModel("time"),_=g.get("month"),y=g.get("monthAbbr"),v=g.get("dayOfWeek"),F=g.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,h+"").replace(/{A}/g,b+"").replace(/{yyyy}/g,r+"").replace(/{yy}/g,mD(r%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[a-1]).replace(/{MMM}/g,y[a-1]).replace(/{MM}/g,mD(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,mD(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,v[c]).replace(/{ee}/g,F[c]).replace(/{e}/g,c+"").replace(/{HH}/g,mD(d,2)).replace(/{H}/g,d+"").replace(/{hh}/g,mD(u+"",2)).replace(/{h}/g,u+"").replace(/{mm}/g,mD(m,2)).replace(/{m}/g,m+"").replace(/{ss}/g,mD(f,2)).replace(/{s}/g,f+"").replace(/{SSS}/g,mD(p,3)).replace(/{S}/g,p+"")}function mI(e,t){var n=cs(e),i=n[mY(t)]()+1,o=n[mP(t)](),r=n[mN(t)](),a=n[mB(t)](),s=n[mH(t)](),l=0===n[mz(t)](),c=l&&0===s,d=c&&0===a,u=d&&0===r,m=u&&1===o;if(m&&1===i)return"year";if(m)return"month";if(u)return"day";if(d)return"hour";if(c)return"minute";else if(l)return"second";else return"millisecond"}function mO(e,t,n){switch(t){case"year":e[mj(n)](0);case"month":e[mU(n)](1);case"day":e[mW(n)](0);case"hour":e[mV(n)](0);case"minute":e[mG(n)](0);case"second":e[m$(n)](0)}return e}function mR(e){return e?"getUTCFullYear":"getFullYear"}function mY(e){return e?"getUTCMonth":"getMonth"}function mP(e){return e?"getUTCDate":"getDate"}function mN(e){return e?"getUTCHours":"getHours"}function mB(e){return e?"getUTCMinutes":"getMinutes"}function mH(e){return e?"getUTCSeconds":"getSeconds"}function mz(e){return e?"getUTCMilliseconds":"getMilliseconds"}function mj(e){return e?"setUTCMonth":"setMonth"}function mU(e){return e?"setUTCDate":"setDate"}function mW(e){return e?"setUTCHours":"setHours"}function mV(e){return e?"setUTCMinutes":"setMinutes"}function mG(e){return e?"setUTCSeconds":"setSeconds"}function m$(e){return e?"setUTCMilliseconds":"setMilliseconds"}function mq(e){if(isNaN(cd(e)))return rY(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function mX(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}function mK(e,t,n){function i(e){return e&&rK(e)?e:"-"}function o(e){return!!(null!=e&&!isNaN(e)&&isFinite(e))}var r="time"===t,a=e instanceof Date;if(r||a){var s=r?cs(e):e;if(!isNaN(+s))return mL(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return rP(e)?i(e):rN(e)&&o(e)?e+"":"-";var l=cd(e);return o(l)?mq(l):rP(e)?i(e):"boolean"==typeof e?e+"":"-"}var mJ=["a","b","c","d","e","f","g"],mZ=function(e,t){return"{"+e+(null==t?"":t)+"}"};function mQ(e,t,n){rO(t)||(t=[t]);var i=t.length;if(!i)return"";for(var o=t[0].$vars||[],r=0;r<o.length;r++){var a=mJ[r];e=e.replace(mZ(a),mZ(a,0))}for(var s=0;s<i;s++)for(var l=0;l<o.length;l++){var c=t[s][o[l]];e=e.replace(mZ(mJ[l],s),n?ay(c):c)}return e}function m0(e,t){return t=t||"transparent",rY(e)?e:rB(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var m1={},m2={},m5=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){function n(n,i){var o=[];return rM(n,function(n,i){var r=n.create(e,t);o=o.concat(r||[])}),o}this._nonSeriesBoxMasterList=n(m1,!0),this._normalMasterList=n(m2,!1)},e.prototype.update=function(e,t){rM(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if("matrix"===e||"calendar"===e){m1[e]=t;return}m2[e]=t},e.get=function(e){return m2[e]||m1[e]},e}(),m3={coord:1,coord2:2},m4=r1(),m6={none:0,dataCoordSys:1,boxCoordSys:2},m8=["left","right","top","bottom","width","height"],m7=[["width","left","right"],["height","top","bottom"]];function m9(e,t,n,i,o){var r=0,a=0;null==i&&(i=1/0),null==o&&(o=1/0);var s=0;t.eachChild(function(l,c){var d,u,m=l.getBoundingRect(),f=t.childAt(c+1),p=f&&f.getBoundingRect();if("horizontal"===e){var h=m.width+(p?-p.x+m.x:0);(d=r+h)>i||l.newline?(r=0,d=h,a+=s+n,s=m.height):s=Math.max(s,m.height)}else{var b=m.height+(p?-p.y+m.y:0);(u=a+b)>o||l.newline?(r+=s+n,a=0,u=b,s=m.width):s=Math.max(s,m.width)}l.newline||(l.x=r,l.y=a,l.markRedraw(),"horizontal"===e?r=d+n:a=u+n)})}function fe(e,t,n){n=rq(n||0);var i=t.width,o=t.height,r=l7(e.left,i),a=l7(e.top,o),s=l7(e.right,i),l=l7(e.bottom,o),c=l7(e.width,i),d=l7(e.height,o),u=n[2]+n[0],m=n[1]+n[3],f=e.aspect;switch(isNaN(c)&&(c=i-s-m-r),isNaN(d)&&(d=o-l-u-a),null!=f&&(isNaN(c)&&isNaN(d)&&(f>i/o?c=.8*i:d=.8*o),isNaN(c)&&(c=f*d),isNaN(d)&&(d=c/f)),isNaN(r)&&(r=i-s-c-m),isNaN(a)&&(a=o-l-d-u),e.left||e.right){case"center":r=i/2-c/2-n[3];break;case"right":r=i-c-m}switch(e.top||e.bottom){case"middle":case"center":a=o/2-d/2-n[0];break;case"bottom":a=o-d-u}r=r||0,a=a||0,isNaN(c)&&(c=i-m-r-(s||0)),isNaN(d)&&(d=o-u-a-(l||0));var p=new a3((t.x||0)+r+n[3],(t.y||0)+a+n[0],c,d);return p.margin=n,p}rI(m9,"vertical"),rI(m9,"horizontal");var ft={rect:1,point:2};function fn(e,t,n){var i,o,r,a,s=e.boxCoordinateSystem;if(s){var l=function(e){var t=e.getShallow("coord",!0),n=m3.coord;if(null==t){var i=m4.get(e.type);i&&i.getCoord2&&(n=m3.coord2,t=i.getCoord2(e))}return{coord:t,from:n}}(e),c=l.coord,d=l.from;if(s.dataToLayout){r=ft.rect,a=d;var u=s.dataToLayout(c);i=u.contentRect||u.rect}else n&&n.enableLayoutOnlyByCenter&&s.dataToPoint&&(r=ft.point,a=d,o=s.dataToPoint(c))}return null==r&&(r=ft.rect),r===ft.rect&&(i||(i={x:0,y:0,width:t.getWidth(),height:t.getHeight()}),o=[i.x+i.width/2,i.y+i.height/2]),{type:r,refContainer:i,refPoint:o,boxCoordFrom:a}}function fi(e){var t=e.layoutMode||e.constructor.layoutMode;return rB(t)?t:t?{type:t}:null}function fo(e,t,n){var i=n&&n.ignoreSize;rO(i)||(i=[i,i]);var o=a(m7[0],0),r=a(m7[1],1);function a(n,o){var r={},a=0,l={},c=0;if(rM(n,function(t){l[t]=e[t]}),rM(n,function(e){r3(t,e)&&(r[e]=l[e]=t[e]),s(r,e)&&a++,s(l,e)&&c++}),i[o])return s(t,n[1])?l[n[2]]=null:s(t,n[2])&&(l[n[1]]=null),l;if(2===c||!a)return l;if(a>=2)return r;for(var d=0;d<n.length;d++){var u=n[d];if(!r3(r,u)&&r3(e,u)){r[u]=e[u];break}}return r}function s(e,t){return null!=e[t]&&"auto"!==e[t]}function l(e,t,n){rM(e,function(e){t[e]=n[e]})}l(m7[0],e,o),l(m7[1],e,r)}function fr(e){var t,n;return t={},(n=e)&&t&&rM(m8,function(e){r3(n,e)&&(t[e]=n[e])}),t}var fa=ck(),fs=function(e){var t;function n(t,n,i){var o=e.call(this,t,n,i)||this;return o.uid=mg("ec_cpt_model"),o}return rt(n,e),n.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},n.prototype.mergeDefaultAndTheme=function(e,t){var n=fi(this),i=n?fr(e):{};rF(e,t.getTheme().get(this.mainType)),rF(e,this.getDefaultOption()),n&&fo(e,i,n)},n.prototype.mergeOption=function(e,t){rF(this.option,e,!0);var n=fi(this);n&&fo(this.option,e,n)},n.prototype.optionUpdated=function(e,t){},n.prototype.getDefaultOption=function(){var e=this.constructor;if(!(e&&e[cI]))return e.defaultOption;var t=fa(this);if(!t.defaultOption){for(var n=[],i=e;i;){var o=i.prototype.defaultOption;o&&n.push(o),i=i.superClass}for(var r={},a=n.length-1;a>=0;a--)r=rF(r,n[a],!0);t.defaultOption=r}return t.defaultOption},n.prototype.getReferringComponents=function(e,t){return cD(this.ecModel,e,{index:this.get(e+"Index",!0),id:this.get(e+"Id",!0)},t)},n.prototype.getBoxLayoutParams=function(){return{left:this.getShallow("left",!1),top:this.getShallow("top",!1),right:this.getShallow("right",!1),bottom:this.getShallow("bottom",!1),width:this.getShallow("width",!1),height:this.getShallow("height",!1)}},n.prototype.getZLevelKey=function(){return""},n.prototype.setZLevel=function(e){this.option.zlevel=e},n.protoInitialize=void((t=n.prototype).type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0),n}(mh);cY(fs,mh),cH(fs),function(e){var t={};e.registerSubTypeDefaulter=function(e,n){t[cO(e).main]=n},e.determineSubType=function(n,i){var o=i.type;if(!o){var r=cO(n).main;e.hasSubTypes(n)&&t[r]&&(o=t[r](i))}return o}}(fs),function(e,t){e.topologicalTravel=function(e,i,o,r){if(e.length){var a,s,l,c=(s={},l=[],rM(a=i,function(e){var i,o,r,c=n(s,e),d=(i=c.originalDeps=t(e),o=a,r=[],rM(i,function(e){rk(o,e)>=0&&r.push(e)}),r);c.entryCount=d.length,0===c.entryCount&&l.push(e),rM(d,function(t){0>rk(c.predecessor,t)&&c.predecessor.push(t);var i=n(s,t);0>rk(i.successor,t)&&i.successor.push(e)})}),{graph:s,noEntryList:l}),d=c.graph,u=c.noEntryList,m={};for(rM(e,function(e){m[e]=!0});u.length;){var f=u.pop(),p=d[f],h=!!m[f];h&&(o.call(r,f,p.originalDeps.slice()),delete m[f]),rM(p.successor,h?g:b)}rM(m,function(){throw Error("")})}function b(e){d[e].entryCount--,0===d[e].entryCount&&u.push(e)}function g(e){m[e]=!0,b(e)}};function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}}(fs,function(e){var t=[];return rM(fs.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=rA(t,function(e){return cO(e).main}),"dataset"!==e&&0>=rk(t,"dataset")&&t.unshift("dataset"),t});var fl={color:{},darkColor:{},size:{}},fc=fl.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};for(var fd in rx(fc,{primary:fc.neutral80,secondary:fc.neutral70,tertiary:fc.neutral60,quaternary:fc.neutral50,disabled:fc.neutral20,border:fc.neutral30,borderTint:fc.neutral20,borderShade:fc.neutral40,background:fc.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:fc.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:fc.neutral70,axisLineTint:fc.neutral40,axisTick:fc.neutral70,axisTickMinor:fc.neutral60,axisLabel:fc.neutral70,axisSplitLine:fc.neutral15,axisMinorSplitLine:fc.neutral05}),fc)if(fc.hasOwnProperty(fd)){var fu=fc[fd];"theme"===fd?fl.darkColor.theme=fc.theme.slice():"highlight"===fd?fl.darkColor.highlight="rgba(255,231,130,0.4)":0===fd.indexOf("accent")?fl.darkColor[fd]=sZ(fu,null,function(e){return .5*e},function(e){return Math.min(1,1.3-e)}):fl.darkColor[fd]=sZ(fu,null,function(e){return .9*e},function(e){return 1-Math.pow(e,1.5)})}fl.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var fm="";"undefined"!=typeof navigator&&(fm=navigator.platform||"");var ff="rgba(0, 0, 0, 0.2)",fp=fl.color.theme["0"],fh=sZ(fp,null,null,.9);let fb={darkMode:"auto",colorBy:"series",color:fl.color.theme,gradientColor:[fh,fp],aria:{decal:{decals:[{color:ff,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:ff,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:ff,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:ff,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:ff,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:ff,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:fm.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 fg=r1(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),f_="original",fy="arrayRows",fv="objectRows",fF="keyedColumns",fx="typedArray",fw="unknown",fk="column",fE={Must:1,Might:2,Not:3},fT=ck();function fM(e,t,n){var i,o,r={},a=fA(t);if(!a||!e)return r;var s=[],l=[],c=fT(t.ecModel).datasetMap,d=a.uid+"_"+n.seriesLayoutBy;rM(e=e.slice(),function(t,n){var a=rB(t)?t:e[n]={name:t};"ordinal"===a.type&&null==i&&(i=n,o=f(a)),r[a.name]=[]});var u=c.get(d)||c.set(d,{categoryWayDim:o,valueWayDim:0});function m(e,t,n){for(var i=0;i<n;i++)e.push(t+i)}function f(e){var t=e.dimsDef;return t?t.length:1}return rM(e,function(e,t){var n=e.name,o=f(e);if(null==i){var a=u.valueWayDim;m(r[n],a,o),m(l,a,o),u.valueWayDim+=o}else if(i===t)m(r[n],0,o),m(s,0,o);else{var a=u.categoryWayDim;m(r[n],a,o),m(l,a,o),u.categoryWayDim+=o}}),s.length&&(r.itemName=s),l.length&&(r.seriesName=l),r}function fA(e){if(!e.get("data",!0))return cD(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},cA).models[0]}function fC(e,t){return function(e,t,n,i,o,r){var a,s,l;if(rz(e))return fE.Not;if(i){var c=i[r];rB(c)?(s=c.name,l=c.type):rY(c)&&(s=c)}if(null!=l)return"ordinal"===l?fE.Must:fE.Not;if(t===fy)if("row"===n){for(var d=e[r],u=0;u<(d||[]).length&&u<5;u++)if(null!=(a=h(d[o+u])))return a}else for(var u=0;u<e.length&&u<5;u++){var m=e[o+u];if(m&&null!=(a=h(m[r])))return a}else if(t===fv){if(!s)return fE.Not;for(var u=0;u<e.length&&u<5;u++){var f=e[u];if(f&&null!=(a=h(f[s])))return a}}else if(t===fF){if(!s)return fE.Not;var d=e[s];if(!d||rz(d))return fE.Not;for(var u=0;u<d.length&&u<5;u++)if(null!=(a=h(d[u])))return a}else if(t===f_)for(var u=0;u<e.length&&u<5;u++){var f=e[u],p=cg(f);if(!rO(p))return fE.Not;if(null!=(a=h(p[r])))return a}function h(e){var t=rY(e);return null!=e&&Number.isFinite(Number(e))&&""!==e?t?fE.Might:fE.Not:t&&"-"!==e?fE.Must:void 0}return fE.Not}(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}var fD=r1(),fS=ck();ck();var fL=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){return function(e,t,n,i,o,r,a){var s=t(r=r||e),l=s.paletteIdx||0,c=s.paletteNameMap=s.paletteNameMap||{};if(c.hasOwnProperty(o))return c[o];var d=null!=a&&i?function(e,t){for(var n=e.length,i=0;i<n;i++)if(e[i].length>t)return e[i];return e[n-1]}(i,a):n;if((d=d||n)&&d.length){var u=d[l];return o&&(c[o]=u),s.paletteIdx=(l+1)%d.length,u}}(this,fS,cp(this.get("color",!0)),this.get("colorLayer",!0),e,t,n)},e.prototype.clearColorPalette=function(){var e,t;e=this,(t=fS)(e).paletteIdx=0,t(e).paletteNameMap={}},e}(),fI="\0_ec_inner",fO=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return rt(t,e),t.prototype.init=function(e,t,n,i,o,r){i=i||{},this.option=null,this._theme=new mh(i),this._locale=new mh(o),this._optionManager=r},t.prototype.setOption=function(e,t,n){var i=fP(t);this._optionManager.setOption(e,n,i),this._resetOption(null,i)},t.prototype.resetOption=function(e,t){return this._resetOption(e,fP(t))},t.prototype._resetOption=function(e,t){var n=!1,i=this._optionManager;if(!e||"recreate"===e){var o=i.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(o,t)):ew(this,o),n=!0}if(("timeline"===e||"media"===e)&&this.restoreData(),!e||"recreate"===e||"timeline"===e){var r=i.getTimelineOption(this);r&&(n=!0,this._mergeOption(r,t))}if(!e||"recreate"===e||"media"===e){var a=i.getMediaOption(this);a.length&&rM(a,function(e){n=!0,this._mergeOption(e,t)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,i=this._componentsMap,o=this._componentsCount,r=[],a=r1(),s=t&&t.replaceMergeMainTypeMap;fT(this).datasetMap=r1(),rM(e,function(e,t){null!=e&&(fs.hasClass(t)?t&&(r.push(t),a.set(t,!0)):n[t]=null==n[t]?rv(e):rF(n[t],e,!0))}),s&&s.each(function(e,t){fs.hasClass(t)&&!a.get(t)&&(r.push(t),a.set(t,!0))}),fs.topologicalTravel(r,fs.getAllClassMainTypes(),function(t){var r,a,l,c,d,u,m,f,p,h,b,g,_,y,v,F,x,w,k,E,T=function(e,t,n){var i=fD.get(t);if(!i)return n;var o=i(e);return o?n.concat(o):n}(this,t,cp(e[t])),M=i.get(t),A=M?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",C=(_=M,y=T,v="normalMerge"===A,F="replaceMerge"===A,x="replaceAll"===A,_=_||[],y=(y||[]).slice(),w=r1(),rM(y,function(e,t){if(!rB(e)){y[t]=null;return}}),k=function(e,t,n){var i=[];if("replaceAll"===n)return i;for(var o=0;o<e.length;o++){var r=e[o];r&&null!=r.id&&t.set(r.id,o),i.push({existing:"replaceMerge"===n||cx(r)?null:r,newOption:null,keyInfo:null,brandNew:null})}return i}(_,w,A),(v||F)&&(r=k,a=_,l=w,rM(c=y,function(e,t){if(e&&null!=e.id){var n=cy(e.id),i=l.get(n);if(null!=i){var o=r[i];rX(!o.newOption,'Duplicated option on id "'+n+'".'),o.newOption=e,o.existing=a[i],c[t]=null}}})),v&&(d=k,rM(u=y,function(e,t){if(e&&null!=e.name)for(var n=0;n<d.length;n++){var i=d[n].existing;if(!d[n].newOption&&i&&(null==i.id||null==e.id)&&!cx(e)&&!cx(i)&&c_("name",i,e)){d[n].newOption=e,u[t]=null;return}}})),v||F?(m=k,f=y,p=F,rM(f,function(e){if(e){for(var t,n=0;(t=m[n])&&(t.newOption||cx(t.existing)||t.existing&&null!=e.id&&!c_("id",e,t.existing));)n++;t?(t.newOption=e,t.brandNew=p):m.push({newOption:e,brandNew:p,existing:null,keyInfo:null}),n++}})):x&&(h=k,rM(y,function(e){h.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})})),b=k,g=r1(),rM(b,function(e){var t=e.existing;t&&g.set(t.id,e)}),rM(b,function(e){var t=e.newOption;rX(!t||null==t.id||!g.get(t.id)||g.get(t.id)===e,"id duplicates: "+(t&&t.id)),t&&null!=t.id&&g.set(t.id,e),e.keyInfo||(e.keyInfo={})}),rM(b,function(e,t){var n=e.existing,i=e.newOption,o=e.keyInfo;if(rB(i)){if(o.name=null!=i.name?cy(i.name):n?n.name:cf+t,n)o.id=cy(n.id);else if(null!=i.id)o.id=cy(i.id);else{var r=0;do o.id="\0"+o.name+"\0"+r++;while(g.get(o.id))}g.set(o.id,e)}}),k);rM(C,function(e){var n,i,o,r,a=e.newOption;rB(a)&&(e.keyInfo.mainType=t,e.keyInfo.subType=(n=t,i=a,o=e.existing,r=fs,i.type?i.type:o?o.subType:r.determineSubType(n,i)))}),n[t]=null,i.set(t,null),o.set(t,0);var D=[],S=[],L=0;rM(C,function(e,n){var i=e.existing,o=e.newOption;if(o){var r="series"===t,a=fs.getClass(t,e.keyInfo.subType,!r);if(!a)return;if("tooltip"===t){if(E)return;E=!0}if(i&&i.constructor===a)i.name=e.keyInfo.name,i.mergeOption(o,this),i.optionUpdated(o,!1);else{var s=rx({componentIndex:n},e.keyInfo);rx(i=new a(o,this,this,s),s),e.brandNew&&(i.__requireNewView=!0),i.init(o,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(D.push(i.option),S.push(i),L++):(D.push(void 0),S.push(void 0))},this),n[t]=D,i.set(t,S),o.set(t,L),"series"===t&&eF(this)},this),this._seriesIndices||eF(this)},t.prototype.getOption=function(){var e=rv(this.option);return rM(e,function(t,n){if(fs.hasClass(n)){for(var i=cp(t),o=i.length,r=!1,a=o-1;a>=0;a--)i[a]&&!cx(i[a])?r=!0:(i[a]=null,!r&&o--);i.length=o,e[n]=i}}),delete e[fI],e},t.prototype.setTheme=function(e){this._theme=new mh(e),this._resetOption("recreate",null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var i=n[t||0];if(i)return i;if(null==t){for(var o=0;o<n.length;o++)if(n[o])return n[o]}}},t.prototype.queryComponents=function(e){var t,n=e.mainType;if(!n)return[];var i=e.index,o=e.id,r=e.name,a=this._componentsMap.get(n);return a&&a.length?(null!=i?(t=[],rM(cp(i),function(e){a[e]&&t.push(a[e])})):t=null!=o?fR("id",o,a):null!=r?fR("name",r,a):rD(a,function(e){return!!e}),fY(t,e)):[]},t.prototype.findComponents=function(e){var t,n,i,o,r,a=e.query,s=e.mainType,l=(t=a,n=s+"Index",i=s+"Id",o=s+"Name",t&&(null!=t[n]||null!=t[i]||null!=t[o])?{mainType:s,index:t[n],id:t[i],name:t[o]}:null);return r=fY(l?this.queryComponents(l):rD(this._componentsMap.get(s),function(e){return!!e}),e),e.filter?rD(r,e.filter):r},t.prototype.eachComponent=function(e,t,n){var i=this._componentsMap;if(rR(e))i.each(function(n,i){for(var o=0;n&&o<n.length;o++){var r=n[o];r&&e.call(t,i,r,r.componentIndex)}});else for(var o=rY(e)?i.get(e):rB(e)?this.findComponents(e):null,r=0;o&&r<o.length;r++){var a=o[r];a&&t.call(n,a,a.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=cv(e,null);return rD(this._componentsMap.get("series"),function(e){return!!e&&null!=t&&e.name===t})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return rD(this._componentsMap.get("series"),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return rD(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,t){ex(this),rM(this._seriesIndices,function(n){var i=this._componentsMap.get("series")[n];e.call(t,i,n)},this)},t.prototype.eachRawSeries=function(e,t){rM(this._componentsMap.get("series"),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){ex(this),rM(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];o.subType===e&&t.call(n,o,i)},this)},t.prototype.eachRawSeriesByType=function(e,t,n){return rM(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return ex(this),null==this._seriesIndicesMap.get(e.componentIndex)},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){ex(this);var n=[];rM(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];e.call(t,o,i)&&n.push(i)},this),this._seriesIndices=n,this._seriesIndicesMap=r1(n)},t.prototype.restoreData=function(e){eF(this);var t=this._componentsMap,n=[];t.each(function(e,t){fs.hasClass(t)&&n.push(t)}),fs.topologicalTravel(n,fs.getAllClassMainTypes(),function(n){rM(t.get(n),function(t){t&&("series"!==n||!function(e,t){if(t){var n=t.seriesIndex,i=t.seriesId,o=t.seriesName;return null!=n&&e.componentIndex!==n||null!=i&&e.id!==i||null!=o&&e.name!==o}}(t,e))&&t.restoreData()})})},t.internalField=void(eF=function(e){var t=e._seriesIndices=[];rM(e._componentsMap.get("series"),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=r1(t)},ex=function(e){},ew=function(e,t){e.option={},e.option[fI]=1,e._componentsMap=r1({series:[]}),e._componentsCount=r1();var n,i,o,r=t.aria;rB(r)&&null==r.enabled&&(r.enabled=!0),n=t,i=e._theme.option,o=n.color&&!n.colorLayer,rM(i,function(e,t){"colorLayer"===t&&o||"color"===t&&n.color||fs.hasClass(t)||("object"==typeof e?n[t]=n[t]?rF(n[t],e,!1):rv(e):null==n[t]&&(n[t]=e))}),rF(t,fb,!1),e._mergeOption(t,null)}),t}(mh);function fR(e,t,n){if(rO(t)){var i=r1();return rM(t,function(e){null!=e&&null!=cv(e,null)&&i.set(e,!0)}),rD(n,function(t){return t&&i.get(t[e])})}var o=cv(t,null);return rD(n,function(t){return t&&null!=o&&t[e]===o})}function fY(e,t){return t.hasOwnProperty("subType")?rD(e,function(e){return e&&e.subType===t.subType}):e}function fP(e){var t=r1();return e&&rM(cp(e.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}rE(fO,fL);var fN=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"];let fB=function(e){rM(fN,function(t){this[t]=rL(e[t],e)},this)};var fH=/^(min|max)?(.+)$/,fz=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(rM(cp(e.series),function(e){e&&e.data&&rz(e.data)&&(e.data[rJ]=!0)}),rM(cp(e.dataset),function(e){e&&e.source&&rz(e.source)&&(e.source[rJ]=!0)})),e=rv(e);var i=this._optionBackup,o=function(e,t,n){var i,o,r=[],a=e.baseOption,s=e.timeline,l=e.options,c=e.media,d=!!e.media,u=!!(l||s||a&&a.timeline);function m(e){rM(t,function(t){t(e,n)})}return a?(o=a).timeline||(o.timeline=s):((u||d)&&(e.options=e.media=null),o=e),d&&rO(c)&&rM(c,function(e){e&&e.option&&(e.query?r.push(e):i||(i=e))}),m(o),rM(l,function(e){return m(e)}),rM(r,function(e){return m(e.option)}),{baseOption:o,timelineOptions:l||[],mediaDefault:i,mediaList:r}}(e,t,!i);this._newBaseOption=o.baseOption,i?(o.timelineOptions.length&&(i.timelineOptions=o.timelineOptions),o.mediaList.length&&(i.mediaList=o.mediaList),o.mediaDefault&&(i.mediaDefault=o.mediaDefault)):this._optionBackup=o},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],rv(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var i=e.getComponent("timeline");i&&(t=rv(n[i.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t,n,i=this._api.getWidth(),o=this._api.getHeight(),r=this._mediaList,a=this._mediaDefault,s=[],l=[];if(!r.length&&!a)return l;for(var c=0,d=r.length;c<d;c++)(function(e,t,n){var i={width:t,height:n,aspectratio:t/n},o=!0;return rM(e,function(e,t){var n=t.match(fH);if(n&&n[1]&&n[2]){var r,a,s,l=n[1];r=i[n[2].toLowerCase()],a=e,("min"===(s=l)?r>=a:"max"===s?r<=a:r===a)||(o=!1)}}),o})(r[c].query,i,o)&&s.push(c);return!s.length&&a&&(s=[-1]),s.length&&(t=s,n=this._currentMediaIndices,t.join(",")!==n.join(","))&&(l=rA(s,function(e){return rv(-1===e?a.option:r[e].option)})),this._currentMediaIndices=s,l},e}(),fj=rB,fU=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function fW(e){var t=e&&e.itemStyle;if(t)for(var n=0,i=fU.length;n<i;n++){var o=fU[n],r=t.normal,a=t.emphasis;r&&r[o]&&(e[o]=e[o]||{},e[o].normal?rF(e[o].normal,r[o]):e[o].normal=r[o],r[o]=null),a&&a[o]&&(e[o]=e[o]||{},e[o].emphasis?rF(e[o].emphasis,a[o]):e[o].emphasis=a[o],a[o]=null)}}function fV(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var i=e[t].normal,o=e[t].emphasis;i&&(n?(e[t].normal=e[t].emphasis=null,rw(e[t],i)):e[t]=i),o&&(e.emphasis=e.emphasis||{},e.emphasis[t]=o,o.focus&&(e.emphasis.focus=o.focus),o.blurScope&&(e.emphasis.blurScope=o.blurScope))}}function fG(e){fV(e,"itemStyle"),fV(e,"lineStyle"),fV(e,"areaStyle"),fV(e,"label"),fV(e,"labelLine"),fV(e,"upperLabel"),fV(e,"edgeLabel")}function f$(e,t){var n=fj(e)&&e[t],i=fj(n)&&n.textStyle;if(i)for(var o=0,r=cb.length;o<r;o++){var a=cb[o];i.hasOwnProperty(a)&&(n[a]=i[a])}}function fq(e){e&&(fG(e),f$(e,"label"),e.emphasis&&f$(e.emphasis,"label"))}function fX(e){return rO(e)?e:e?[e]:[]}function fK(e){return(rO(e)?e[0]:e)||{}}function fJ(e){e&&rM(fZ,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var fZ=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],fQ=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],f0=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function f1(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<f0.length;n++){var i=f0[n][1],o=f0[n][0];null!=t[i]&&(t[o]=t[i])}}function f2(e){e&&"edge"===e.alignTo&&null!=e.margin&&null==e.edgeDistance&&(e.edgeDistance=e.margin)}function f5(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function f3(e,t){var n;rM(fX(e.series),function(e){fj(e)&&function(e){if(fj(e)){fW(e),fG(e),f$(e,"label"),f$(e,"upperLabel"),f$(e,"edgeLabel"),e.emphasis&&(f$(e.emphasis,"label"),f$(e.emphasis,"upperLabel"),f$(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(fW(t),fq(t));var n=e.markLine;n&&(fW(n),fq(n));var i=e.markArea;i&&fq(i);var o=e.data;if("graph"===e.type){o=o||e.nodes;var r=e.links||e.edges;if(r&&!rz(r))for(var a=0;a<r.length;a++)fq(r[a]);rM(e.categories,function(e){fG(e)})}if(o&&!rz(o))for(var a=0;a<o.length;a++)fq(o[a]);if((t=e.markPoint)&&t.data)for(var s=t.data,a=0;a<s.length;a++)fq(s[a]);if((n=e.markLine)&&n.data)for(var l=n.data,a=0;a<l.length;a++)rO(l[a])?(fq(l[a][0]),fq(l[a][1])):fq(l[a]);"gauge"===e.type?(f$(e,"axisLabel"),f$(e,"title"),f$(e,"detail")):"treemap"===e.type?(fV(e.breadcrumb,"itemStyle"),rM(e.levels,function(e){fG(e)})):"tree"===e.type&&fG(e.leaves)}}(e)}),n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"],t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),rM(n,function(t){rM(fX(e[t]),function(e){e&&(f$(e,"axisLabel"),f$(e.axisPointer,"label"))})}),rM(fX(e.parallel),function(e){var t=e&&e.parallelAxisDefault;f$(t,"axisLabel"),f$(t&&t.axisPointer,"label")}),rM(fX(e.calendar),function(e){fV(e,"itemStyle"),f$(e,"dayLabel"),f$(e,"monthLabel"),f$(e,"yearLabel")}),rM(fX(e.radar),function(e){f$(e,"name"),e.name&&null==e.axisName&&(e.axisName=e.name,delete e.name),null!=e.nameGap&&null==e.axisNameGap&&(e.axisNameGap=e.nameGap,delete e.nameGap)}),rM(fX(e.geo),function(e){fj(e)&&(fq(e),rM(fX(e.regions),function(e){fq(e)}))}),rM(fX(e.timeline),function(e){fq(e),fV(e,"label"),fV(e,"itemStyle"),fV(e,"controlStyle",!0);var t=e.data;rO(t)&&rM(t,function(e){rB(e)&&(fV(e,"label"),fV(e,"itemStyle"))})}),rM(fX(e.toolbox),function(e){fV(e,"iconStyle"),rM(e.feature,function(e){fV(e,"iconStyle")})}),f$(fK(e.axisPointer),"label"),f$(fK(e.tooltip).axisPointer,"label"),e.series=cp(e.series),rM(e.series,function(e){if(rB(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===t||"gauge"===t){null!=e.clockWise&&(e.clockwise=e.clockWise),f2(e.label);var n=e.data;if(n&&!rz(n))for(var i=0;i<n.length;i++)f2(n[i]);null!=e.hoverOffset&&(e.emphasis=e.emphasis||{},e.emphasis.scaleSize=null)}else if("gauge"===t){var o=function(e,t){for(var n=t.split(","),i=e,o=0;o<n.length&&null!=(i=i&&i[n[o]]);o++);return i}(e,"pointer.color");null!=o&&function(e,t,n,i){for(var o,r=t.split(","),a=e,s=0;s<r.length-1;s++)null==a[o=r[s]]&&(a[o]={}),a=a[o];null==a[r[s]]&&(a[r[s]]=n)}(e,"itemStyle.color",o)}else if("bar"===t){f1(e),f1(e.backgroundStyle),f1(e.emphasis);var n=e.data;if(n&&!rz(n))for(var i=0;i<n.length;i++)"object"==typeof n[i]&&(f1(n[i]),f1(n[i]&&n[i].emphasis))}else if("sunburst"===t){var r=e.highlightPolicy;r&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=r)),f5(e),function e(t,n){if(t)for(var i=0;i<t.length;i++)n(t[i]),t[i]&&e(t[i].children,n)}(e.data,f5)}else"graph"===t||"sankey"===t?e&&null!=e.focusNodeAdjacency&&(e.emphasis=e.emphasis||{},null==e.emphasis.focus&&(e.emphasis.focus="adjacency")):"map"===t&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&rw(e,e.mapLocation));null!=e.hoverAnimation&&(e.emphasis=e.emphasis||{},e.emphasis&&null==e.emphasis.scale&&(e.emphasis.scale=e.hoverAnimation)),fJ(e)}}),e.dataRange&&(e.visualMap=e.dataRange),rM(fQ,function(t){var n=e[t];n&&(rO(n)||(n=[n]),rM(n,function(e){fJ(e)}))})}var f4=function(e){this.data=e.data||(e.sourceFormat===fF?{}:[]),this.sourceFormat=e.sourceFormat||fw,this.seriesLayoutBy=e.seriesLayoutBy||fk,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var i=t[n];null==i.type&&fC(this,n)===fE.Must&&(i.type="ordinal")}};function f6(e){return e instanceof f4}function f8(e,t,n){n=n||f9(e);var i=t.seriesLayoutBy,o=function(e,t,n,i,o){if(!e)return{dimensionsDefine:pe(o),startIndex:a,dimensionsDetectedCount:r};if(t===fy){var r,a;"auto"===i||null==i?pt(function(e){null!=e&&"-"!==e&&(rY(e)?null==a&&(a=1):a=0)},n,e,10):a=rN(i)?i:+!!i,o||1!==a||(o=[],pt(function(e,t){o[t]=null!=e?e+"":""},n,e,1/0)),r=o?o.length:"row"===n?e.length:e[0]?e[0].length:null}else if(t===fv)o||(o=function(e){for(var t,n=0;n<e.length&&!(t=e[n++]););if(t)return rS(t)}(e));else if(t===fF)o||(o=[],rM(e,function(e,t){o.push(t)}));else if(t===f_){var s=cg(e[0]);r=rO(s)&&s.length||1}return{startIndex:a,dimensionsDefine:pe(o),dimensionsDetectedCount:r}}(e,n,i,t.sourceHeader,t.dimensions);return new f4({data:e,sourceFormat:n,seriesLayoutBy:i,dimensionsDefine:o.dimensionsDefine,startIndex:o.startIndex,dimensionsDetectedCount:o.dimensionsDetectedCount,metaRawOption:rv(t)})}function f7(e){return new f4({data:e,sourceFormat:rz(e)?fx:f_})}function f9(e){var t=fw;if(rz(e))t=fx;else if(rO(e)){0===e.length&&(t=fy);for(var n=0,i=e.length;n<i;n++){var o=e[n];if(null!=o){if(rO(o)||rz(o)){t=fy;break}else if(rB(o)){t=fv;break}}}}else if(rB(e)){for(var r in e)if(r3(e,r)&&rT(e[r])){t=fF;break}}return t}function pe(e){if(e){var t=r1();return rA(e,function(e,n){var i={name:(e=rB(e)?e:{name:e}).name,displayName:e.displayName,type:e.type};if(null==i.name)return i;i.name+="",null==i.displayName&&(i.displayName=i.name);var o=t.get(i.name);return o?i.name+="-"+o.count++:t.set(i.name,{count:1}),i})}}function pt(e,t,n,i){if("row"===t)for(var o=0;o<n.length&&o<i;o++)e(n[o]?n[o][0]:null,o);else for(var r=n[0]||[],o=0;o<r.length&&o<i;o++)e(r[o],o)}function pn(e){var t=e.sourceFormat;return t===fv||t===fF}var pi={},po="undefined"!=typeof console&&console.warn&&console.log;function pr(e,t){!function(e,t,n){if(po){if(n){if(pi[t])return;pi[t]=!0}console[e]("[ECharts] "+t)}}("error",e,t)}function pa(e){throw Error(e)}var ps=function(){var e;function t(e,t){var n=f6(e)?e:f7(e);this._source=n;var i=this._data=n.data,o=n.sourceFormat;n.seriesLayoutBy,o===fx&&(this._offset=0,this._dimSize=t,this._data=i),eC(this,i,n)}return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(e,t){},t.prototype.appendData=function(e){},t.prototype.clean=function(){},t.protoInitialize=void((e=t.prototype).pure=!1,e.persistent=!0),t.internalField=function(){eC=function(e,o,r){var a=r.sourceFormat,s=r.seriesLayoutBy,l=r.startIndex,c=r.dimensionsDefine;rx(e,eA[ph(a,s)]),a===fx?(e.getItem=t,e.count=i,e.fillStorage=n):(e.getItem=rL(function(e,t){return pd[ph(e,t)]}(a,s),null,o,l,c),e.count=rL(function(e,t){return pm[ph(e,t)]}(a,s),null,o,l,c))};var e,t=function(e,t){e-=this._offset,t=t||[];for(var n=this._data,i=this._dimSize,o=i*e,r=0;r<i;r++)t[r]=n[o+r];return t},n=function(e,t,n,i){for(var o=this._data,r=this._dimSize,a=0;a<r;a++){for(var s=i[a],l=null==s[0]?1/0:s[0],c=null==s[1]?-1/0:s[1],d=t-e,u=n[a],m=0;m<d;m++){var f=o[m*r+a];u[e+m]=f,f<l&&(l=f),f>c&&(c=f)}s[0]=l,s[1]=c}},i=function(){return this._data?this._data.length/this._dimSize:0};function o(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}(e={})[fy+"_"+fk]={pure:!0,appendData:o},e[fy+"_row"]={pure:!0,appendData:function(){throw Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[fv]={pure:!0,appendData:o},e[fF]={pure:!0,appendData:function(e){var t=this._data;rM(e,function(e,n){for(var i=t[n]||(t[n]=[]),o=0;o<(e||[]).length;o++)i.push(e[o])})}},e[f_]={appendData:o},e[fx]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},eA=e}(),t}(),pl=function(e){rO(e)||pr("series.data or dataset.source must be an array.")};(ek={})[fy+"_"+fk]=pl,ek[fy+"_row"]=pl,ek[fv]=pl,ek[fF]=function(e,t){for(var n=0;n<t.length;n++)null==t[n].name&&pr("dimension name must not be null/undefined.")},ek[f_]=pl;var pc=function(e,t,n,i){return e[i]},pd=((eE={})[fy+"_"+fk]=function(e,t,n,i){return e[i+t]},eE[fy+"_row"]=function(e,t,n,i,o){i+=t;for(var r=o||[],a=0;a<e.length;a++){var s=e[a];r[a]=s?s[i]:null}return r},eE[fv]=pc,eE[fF]=function(e,t,n,i,o){for(var r=o||[],a=0;a<n.length;a++){var s=n[a].name,l=null!=s?e[s]:null;r[a]=l?l[i]:null}return r},eE[f_]=pc,eE),pu=function(e,t,n){return e.length},pm=((eT={})[fy+"_"+fk]=function(e,t,n){return Math.max(0,e.length-t)},eT[fy+"_row"]=function(e,t,n){var i=e[0];return i?Math.max(0,i.length-t):0},eT[fv]=pu,eT[fF]=function(e,t,n){var i=n[0].name,o=null!=i?e[i]:null;return o?o.length:0},eT[f_]=pu,eT),pf=function(e,t,n){return e[t]},pp=((eM={})[fy]=pf,eM[fv]=function(e,t,n){return e[n]},eM[fF]=pf,eM[f_]=function(e,t,n){var i=cg(e);return i instanceof Array?i[t]:i},eM[fx]=pf,eM);function ph(e,t){return e===fy?e+"_"+t:e}function pb(e,t,n){if(e){var i=e.getRawDataItem(t);if(null!=i){var o=e.getStore(),r=o.getSource().sourceFormat;if(null!=n){var a=e.getDimensionIndex(n),s=o.getDimensionProperty(a);return pp[r](i,a,s)}var l=i;return r===f_&&(l=cg(i)),l}}}var pg=/\{@(.+?)\}/g,p_=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),i=this.getRawValue(e,t),o=n.getRawIndex(e),r=n.getName(e),a=n.getRawDataItem(e),s=n.getItemVisual(e,"style"),l=s&&s[n.getItemVisual(e,"drawType")||"fill"],c=s&&s.stroke,d=this.mainType,u="series"===d,m=n.userOutput&&n.userOutput.get();return{componentType:d,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:u?this.subType:null,seriesIndex:this.seriesIndex,seriesId:u?this.id:null,seriesName:u?this.name:null,name:r,dataIndex:o,data:a,dataType:t,value:i,color:l,borderColor:c,dimensionNames:m?m.fullDimensions:null,encode:m?m.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(e,t,n,i,o,r){t=t||"normal";var a=this.getData(n),s=this.getDataParams(e,n);return(r&&(s.value=r.interpolatedValue),null!=i&&rO(s.value)&&(s.value=s.value[i]),o||(o=a.getItemModel(e).get("normal"===t?["label","formatter"]:[t,"label","formatter"])),rR(o))?(s.status=t,s.dimensionIndex=i,o(s)):rY(o)?mQ(o,s).replace(pg,function(t,n){var i=n.length,o=n;"["===o.charAt(0)&&"]"===o.charAt(i-1)&&(o=+o.slice(1,i-1));var s=pb(a,e,o);if(r&&rO(r.interpolatedValue)){var l=a.getDimensionIndex(o);l>=0&&(s=r.interpolatedValue[l])}return null!=s?s+"":""}):void 0},e.prototype.getRawValue=function(e,t){return pb(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function py(e){var t,n;return rB(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function pv(e){return new pF(e)}var pF=function(){function e(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t,n,i,o,r=this._upstream,a=e&&e.skip;if(this._dirty&&r){var s=this.context;s.data=s.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!a&&(i=this._plan(this.context));var l=((t=this._modBy)>=1||(t=1),t),c=this._modDataCount||0,d=((n=e&&e.modBy)>=1||(n=1),n),u=e&&e.modDataCount||0;(l!==d||c!==u)&&(i="reset"),(this._dirty||"reset"===i)&&(this._dirty=!1,o=this._doReset(a)),this._modBy=d,this._modDataCount=u;var m=e&&e.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(null!=m?this._dueIndex+m:1/0,this._dueEnd);if(!a&&(o||f<p)){var h=this._progress;if(rO(h))for(var b=0;b<h.length;b++)this._doProgress(h[b],f,p,d,u);else this._doProgress(h,f,p,d,u)}this._dueIndex=p;var g=null!=this._settedOutputEnd?this._settedOutputEnd:p;this._outputDueEnd=g}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,i,o){px.reset(t,n,i,o),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:px.next},this.context)},e.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!e&&this._reset&&((t=this._reset(this.context))&&t.progress&&(n=t.forceFirstProgress,t=t.progress),rO(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var t,n,i=this._downstream;return i&&i.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),px=function(){var e,t,n,i,o,r={reset:function(l,c,d,u){t=l,e=c,n=d,o=Math.ceil((i=u)/n),r.next=n>1&&i>0?s:a}};return r;function a(){return t<e?t++:null}function s(){var r=t%o*n+Math.ceil(t/o),a=t>=e?null:r<i?r:t;return t++,a}}();function pw(e,t){var n=t&&t.type;return"ordinal"===n?e:("time"!==n||rN(e)||null==e||"-"===e||(e=+cs(e)),null==e||""===e?NaN:Number(e))}r1({number:function(e){return parseFloat(e)},time:function(e){return+cs(e)},trim:function(e){return rY(e)?rK(e):e}});var pk={lt:function(e,t){return e<t},lte:function(e,t){return e<=t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t}};(function(e,t){rN(t)||pa(""),this._opFn=pk[e],this._rvalFloat=cd(t)}).prototype.evaluate=function(e){return rN(e)?this._opFn(e,this._rvalFloat):this._opFn(cd(e),this._rvalFloat)};var pE=function(){function e(e,t){var n="desc"===e;this._resultLT=n?1:-1,null==t&&(t=n?"min":"max"),this._incomparable="min"===t?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=rN(e)?e:cd(e),i=rN(t)?t:cd(t),o=isNaN(n),r=isNaN(i);if(o&&(n=this._incomparable),r&&(i=this._incomparable),o&&r){var a=rY(e),s=rY(t);a&&(n=s?e:0),s&&(i=a?t:0)}return n<i?this._resultLT:n>i?-this._resultLT:0},e}();(function(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=cd(t)}).prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&("number"===n||"number"===this._rvalTypeof)&&(t=cd(e)===this._rvalFloat)}return this._isEQ?t:!t};var pT=function(){function e(){}return e.prototype.getRawData=function(){throw Error("not supported")},e.prototype.getRawDataItem=function(e){throw Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return pw(e,t)},e}();function pM(e){return pL(e.sourceFormat)||pa(""),e.data}function pA(e){var t=e.sourceFormat,n=e.data;if(pL(t)||pa(""),t===fy){for(var i=[],o=0,r=n.length;o<r;o++)i.push(n[o].slice());return i}if(t===fv){for(var i=[],o=0,r=n.length;o<r;o++)i.push(rx({},n[o]));return i}}function pC(e,t,n){if(null!=n){if(rN(n)||!isNaN(n)&&!r3(t,n))return e[n];else if(r3(t,n))return t[n]}}function pD(e){return rv(e)}var pS=r1();function pL(e){return e===fy||e===fv}var pI="undefined",pO=typeof Uint32Array===pI?Array:Uint32Array,pR=typeof Uint16Array===pI?Array:Uint16Array,pY=typeof Int32Array===pI?Array:Int32Array,pP=typeof Float64Array===pI?Array:Float64Array,pN={float:pP,int:pY,ordinal:Array,number:Array,time:pP};function pB(e){return e>65535?pO:pR}function pH(){return[1/0,-1/0]}function pz(e,t,n,i,o){var r=pN[n||"float"];if(o){var a=e[t],s=a&&a.length;if(s!==i){for(var l=new r(i),c=0;c<s;c++)l[c]=a[c];e[t]=l}}else e[t]=new r(i)}var pj=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=r1()}return e.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=e.getSource(),o=this.defaultDimValueGetter=eD[i.sourceFormat];this._dimValueGetter=n||o,this._rawExtent=[],pn(i),this._dimensions=rA(t,function(e){return{type:e.type,property:e.property}}),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,i=this._dimensions,o=n.get(e);if(null!=o){if(i[o].type===t)return o}else o=i.length;return i[o]={type:t},n.set(e,o),this._chunks[o]=new pN[t||"float"](this._rawCount),this._rawExtent[o]=pH(),o},e.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],i=this._dimensions[e],o=this._rawExtent,r=i.ordinalOffset||0,a=n.length;0===r&&(o[e]=pH());for(var s=o[e],l=r;l<a;l++){var c=n[l]=t.parseAndCollect(n[l]);isNaN(c)||(s[0]=Math.min(c,s[0]),s[1]=Math.max(c,s[1]))}i.ordinalMeta=t,i.ordinalOffset=a,i.type="ordinal"},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var i=t.count();return t.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,i=this._dimensions,o=i.length,r=this._rawExtent,a=this.count(),s=a+Math.max(e.length,t||0),l=0;l<o;l++){var c=i[l];pz(n,l,c.type,s,!0)}for(var d=[],u=a;u<s;u++)for(var m=u-a,f=0;f<o;f++){var c=i[f],p=eD.arrayRows.call(this,e[m]||d,c.property,m,f);n[f][u]=p;var h=r[f];p<h[0]&&(h[0]=p),p>h[1]&&(h[1]=p)}return this._rawCount=this._count=s,{start:a,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var i=this._provider,o=this._chunks,r=this._dimensions,a=r.length,s=this._rawExtent,l=rA(r,function(e){return e.property}),c=0;c<a;c++){var d=r[c];s[c]||(s[c]=pH()),pz(o,c,d.type,t,n)}if(i.fillStorage)i.fillStorage(e,t,o,s);else for(var u=[],m=e;m<t;m++){u=i.getItem(m,u);for(var f=0;f<a;f++){var p=o[f],h=this._dimValueGetter(u,l[f],m,f);p[m]=h;var b=s[f];h<b[0]&&(b[0]=h),h>b[1]&&(b[1]=h)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},e.prototype.getValues=function(e,t){var n=[],i=[];if(null==t){t=e,e=[];for(var o=0;o<this._dimensions.length;o++)i.push(o)}else i=e;for(var o=0,r=i.length;o<r;o++)n.push(this.get(i[o],t));return n},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},e.prototype.getSum=function(e){var t=this._chunks[e],n=0;if(t)for(var i=0,o=this.count();i<o;i++){var r=this.get(e,i);isNaN(r)||(n+=r)}return n},e.prototype.getMedian=function(e){var t=[];this.each([e],function(e){isNaN(e)||t.push(e)});var n=t.sort(function(e,t){return e-t}),i=this.count();return 0===i?0:i%2==1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},e.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return -1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&n<this._count&&n===e)return e;for(var i=0,o=this._count-1;i<=o;){var r=(i+o)/2|0;if(t[r]<e)i=r+1;else{if(!(t[r]>e))return r;o=r-1}}return -1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,i=this._count;if(n===Array){e=new n(i);for(var o=0;o<i;o++)e[o]=t[o]}else e=new n(t.buffer,0,i)}else{var n=pB(this._rawCount);e=new n(this.count());for(var o=0;o<e.length;o++)e[o]=o}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),i=n.count(),o=new(pB(n._rawCount))(i),r=[],a=e.length,s=0,l=e[0],c=n._chunks,d=0;d<i;d++){var u=void 0,m=n.getRawIndex(d);if(0===a)u=t(d);else if(1===a)u=t(c[l][m],d);else{for(var f=0;f<a;f++)r[f]=c[e[f]][m];r[f]=d,u=t.apply(null,r)}u&&(o[s++]=m)}return s<i&&(n._indices=o),n._count=s,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var i=rS(e),o=i.length;if(!o)return this;var r=t.count(),a=new(pB(t._rawCount))(r),s=0,l=i[0],c=e[l][0],d=e[l][1],u=t._chunks,m=!1;if(!t._indices){var f=0;if(1===o){for(var p=u[i[0]],h=0;h<n;h++){var b=p[h];(b>=c&&b<=d||isNaN(b))&&(a[s++]=f),f++}m=!0}else if(2===o){for(var p=u[i[0]],g=u[i[1]],_=e[i[1]][0],y=e[i[1]][1],h=0;h<n;h++){var b=p[h],v=g[h];(b>=c&&b<=d||isNaN(b))&&(v>=_&&v<=y||isNaN(v))&&(a[s++]=f),f++}m=!0}}if(!m)if(1===o)for(var h=0;h<r;h++){var F=t.getRawIndex(h),b=u[i[0]][F];(b>=c&&b<=d||isNaN(b))&&(a[s++]=F)}else for(var h=0;h<r;h++){for(var x=!0,F=t.getRawIndex(h),w=0;w<o;w++){var k=i[w],b=u[k][F];(b<e[k][0]||b>e[k][1])&&(x=!1)}x&&(a[s++]=t.getRawIndex(h))}return s<r&&(t._indices=a),t._count=s,t._extent=[],t._updateGetRawIdx(),t},e.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.prototype._updateDims=function(e,t,n){for(var i=e._chunks,o=[],r=t.length,a=e.count(),s=[],l=e._rawExtent,c=0;c<t.length;c++)l[t[c]]=pH();for(var d=0;d<a;d++){for(var u=e.getRawIndex(d),m=0;m<r;m++)s[m]=i[t[m]][u];s[r]=d;var f=n&&n.apply(null,s);if(null!=f){"object"!=typeof f&&(o[0]=f,f=o);for(var c=0;c<f.length;c++){var p=t[c],h=f[c],b=l[p],g=i[p];g&&(g[u]=h),h<b[0]&&(b[0]=h),h>b[1]&&(b[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n,i,o,r=this.clone([e],!0),a=r._chunks[e],s=this.count(),l=0,c=Math.floor(1/t),d=this.getRawIndex(0),u=new(pB(this._rawCount))(Math.min((Math.ceil(s/c)+2)*2,s));u[l++]=d;for(var m=1;m<s-1;m+=c){for(var f=Math.min(m+c,s-1),p=Math.min(m+2*c,s),h=(p+f)/2,b=0,g=f;g<p;g++){var _=this.getRawIndex(g),y=a[_];isNaN(y)||(b+=y)}b/=p-f;var v=m,F=Math.min(m+c,s),x=m-1,w=a[d];n=-1,o=v;for(var k=-1,E=0,g=v;g<F;g++){var _=this.getRawIndex(g),y=a[_];if(isNaN(y)){E++,k<0&&(k=_);continue}(i=Math.abs((x-h)*(y-w)-(x-g)*(b-w)))>n&&(n=i,o=_)}E>0&&E<F-v&&(u[l++]=Math.min(k,o),o=Math.max(k,o)),u[l++]=o,d=o}return u[l++]=this.getRawIndex(s-1),r._count=l,r._indices=u,r.getRawIndex=this._getRawIdx,r},e.prototype.minmaxDownSample=function(e,t){for(var n=this.clone([e],!0),i=n._chunks,o=Math.floor(1/t),r=i[e],a=this.count(),s=new(pB(this._rawCount))(2*Math.ceil(a/o)),l=0,c=0;c<a;c+=o){var d=c,u=r[this.getRawIndex(d)],m=c,f=r[this.getRawIndex(m)],p=o;c+o>a&&(p=a-c);for(var h=0;h<p;h++){var b=r[this.getRawIndex(c+h)];b<u&&(u=b,d=c+h),b>f&&(f=b,m=c+h)}var g=this.getRawIndex(d),_=this.getRawIndex(m);d<m?(s[l++]=g,s[l++]=_):(s[l++]=_,s[l++]=g)}return n._count=l,n._indices=s,n._updateGetRawIdx(),n},e.prototype.downSample=function(e,t,n,i){for(var o=this.clone([e],!0),r=o._chunks,a=[],s=Math.floor(1/t),l=r[e],c=this.count(),d=o._rawExtent[e]=pH(),u=new(pB(this._rawCount))(Math.ceil(c/s)),m=0,f=0;f<c;f+=s){s>c-f&&(a.length=s=c-f);for(var p=0;p<s;p++){var h=this.getRawIndex(f+p);a[p]=l[h]}var b=n(a),g=this.getRawIndex(Math.min(f+i(a,b)||0,c-1));l[g]=b,b<d[0]&&(d[0]=b),b>d[1]&&(d[1]=b),u[m++]=g}return o._count=m,o._indices=u,o._updateGetRawIdx(),o},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,i=this._chunks,o=0,r=this.count();o<r;o++){var a=this.getRawIndex(o);switch(n){case 0:t(o);break;case 1:t(i[e[0]][a],o);break;case 2:t(i[e[0]][a],i[e[1]][a],o);break;default:for(var s=0,l=[];s<n;s++)l[s]=i[e[s]][a];l[s]=o,t.apply(null,l)}}},e.prototype.getDataExtent=function(e){var t,n=this._chunks[e],i=pH();if(!n)return i;var o=this.count();if(!this._indices)return this._rawExtent[e].slice();if(t=this._extent[e])return t.slice();for(var r=(t=i)[0],a=t[1],s=0;s<o;s++){var l=n[this.getRawIndex(s)];l<r&&(r=l),l>a&&(a=l)}return t=[r,a],this._extent[e]=t,t},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],i=this._chunks,o=0;o<i.length;o++)n.push(i[o][t]);return n},e.prototype.clone=function(t,n){var i=new e,o=this._chunks,r=t&&rC(t,function(e,t){return e[t]=!0,e},{});if(r)for(var a=0;a<o.length;a++)i._chunks[a]=r[a]?function(e){var t=e.constructor;return t===Array?e.slice():new t(e)}(o[a]):o[a];else i._chunks=o;return this._copyCommonProps(i),n||(i._indices=this._cloneIndices()),i._updateGetRawIdx(),i},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=rv(this._extent),e._rawExtent=rv(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var i=0;i<n;i++)t[i]=this._indices[i]}else t=new e(this._indices);return t}return null},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,i){return pw(e[i],this._dimensions[i])}eD={arrayRows:e,objectRows:function(e,t,n,i){return pw(e[t],this._dimensions[i])},keyedColumns:e,original:function(e,t,n,i){var o=e&&(null==e.value?e:e.value);return pw(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(e,t,n,i){return e[i]}}}(),e}(),pU=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,n=this._sourceHost,i=this._getUpstreamSourceManagers(),o=!!i.length;if(pW(n)){var r=void 0,a=void 0,s=void 0;if(o){var l=i[0];l.prepareSource(),r=(s=l.getSource()).data,a=s.sourceFormat,t=[l._getVersionSign()]}else a=rz(r=n.get("data",!0))?fx:f_,t=[];var c=this._getSourceMetaRawOption()||{},d=s&&s.metaRawOption||{},u=rV(c.seriesLayoutBy,d.seriesLayoutBy)||null,m=rV(c.sourceHeader,d.sourceHeader),f=rV(c.dimensions,d.dimensions);e=u!==d.seriesLayoutBy||!!m!=!!d.sourceHeader||f?[f8(r,{seriesLayoutBy:u,sourceHeader:m,dimensions:f},a)]:[]}else if(o){var p=this._applyTransform(i);e=p.sourceList,t=p.upstreamSignList}else e=[f8(n.get("source",!0),this._getSourceMetaRawOption(),null)],t=[];this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n,i=this._sourceHost,o=i.get("transform",!0),r=i.get("fromTransformResult",!0);null!=r&&1!==e.length&&pV("");var a=[],s=[];return(rM(e,function(e){e.prepareSource();var t=e.getSource(r||0);null==r||t||pV(""),a.push(t),s.push(e._getVersionSign())}),o)?n=function(e,t,n){var i=cp(e),o=i.length;o||pa("");for(var r=0;r<o;r++)t=function(e,t,n,i){t.length||pa(""),rB(e)||pa("");var o=e.type,r=pS.get(o);r||pa("");var a=rA(t,function(e){return function(e,t){var n=new pT,i=e.data,o=n.sourceFormat=e.sourceFormat,r=e.startIndex;e.seriesLayoutBy!==fk&&pa("");var a=[],s={},l=e.dimensionsDefine;if(l)rM(l,function(e,t){var n=e.name,i={index:t,name:n,displayName:e.displayName};a.push(i),null!=n&&(r3(s,n)&&pa(""),s[n]=i)});else for(var c=0;c<e.dimensionsDetectedCount||0;c++)a.push({index:c});var d=pd[ph(o,fk)];t.__isBuiltIn&&(n.getRawDataItem=function(e){return d(i,r,a,e)},n.getRawData=rL(pM,null,e)),n.cloneRawData=rL(pA,null,e),n.count=rL(pm[ph(o,fk)],null,i,r,a);var u=pp[o];n.retrieveValue=function(e,t){return m(d(i,r,a,e),t)};var m=n.retrieveValueFromItem=function(e,t){if(null!=e){var n=a[t];if(n)return u(e,t,n.name)}};return n.getDimensionInfo=rL(pC,null,a,s),n.cloneAllDimensionInfo=rL(pD,null,a),n}(e,r)});return rA(cp(r.transform({upstream:a[0],upstreamList:a,config:rv(e.config)})),function(e,n){rB(e)||pa(""),e.data||pa(""),pL(f9(e.data))||pa("");var i,o=t[0];if(o&&0===n&&!e.dimensions){var r=o.startIndex;r&&(e.data=o.data.slice(0,r).concat(e.data)),i={seriesLayoutBy:fk,sourceHeader:r,dimensions:o.metaRawOption.dimensions}}else i={seriesLayoutBy:fk,sourceHeader:0,dimensions:e.dimensions};return f8(e.data,i,null)})}(i[r],t,0,0),r!==o-1&&(t.length=Math.max(t.length,1));return t}(o,a,{datasetIndex:i.componentIndex}):null!=r&&(n=[new f4({data:(t=a[0]).data,sourceFormat:t.sourceFormat,seriesLayoutBy:t.seriesLayoutBy,dimensionsDefine:rv(t.dimensionsDefine),startIndex:t.startIndex,dimensionsDetectedCount:t.dimensionsDetectedCount})]),{sourceList:n,upstreamSignList:s}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},e.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var i=this._storeList,o=i[0];o||(o=i[0]={});var r=o[n];if(!r){var a=this._getUpstreamSourceManagers()[0];pW(this._sourceHost)&&a?r=a._innerGetDataStore(e,t,n):(r=new pj).initData(new ps(t,e.length),e),o[n]=r}return r},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(pW(e)){var t=fA(e);return t?[t.getSourceManager()]:[]}return rA(e.get("transform",!0)||e.get("fromTransformResult",!0)?cD(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},cA).models:[],function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e,t,n,i=this._sourceHost;return pW(i)?(e=i.get("seriesLayoutBy",!0),t=i.get("sourceHeader",!0),n=i.get("dimensions",!0)):this._getUpstreamSourceManagers().length||(e=i.get("seriesLayoutBy",!0),t=i.get("sourceHeader",!0),n=i.get("dimensions",!0)),{seriesLayoutBy:e,sourceHeader:t,dimensions:n}},e}();function pW(e){return"series"===e.mainType}function pV(e){throw Error(e)}function pG(e){var t=e.lineHeight;return null==t?"line-height:1":"line-height:"+ay(t+"")+"px"}function p$(e,t){var n=e.color||fl.color.tertiary,i=e.fontSize||12,o=e.fontWeight||"400",r=e.color||fl.color.secondary,a=e.fontSize||14,s=e.fontWeight||"900";return"html"===t?{nameStyle:"font-size:"+ay(i+"")+"px;color:"+ay(n)+";font-weight:"+ay(o+""),valueStyle:"font-size:"+ay(a+"")+"px;color:"+ay(r)+";font-weight:"+ay(s+"")}:{nameStyle:{fontSize:i,fill:n,fontWeight:o},valueStyle:{fontSize:a,fill:r,fontWeight:s}}}var pq=[0,10,20,30],pX=["","\n","\n\n","\n\n\n"];function pK(e,t){return t.type=e,t}function pJ(e){return"section"===e.type}function pZ(e,t,n,i){var o,r=t.noHeader,a={html:pq[o=function e(t){if(pJ(t)){var n=0,i=t.blocks.length,o=i>1||i>0&&!t.noHeader;return rM(t.blocks,function(t){var i=e(t);i>=n&&(n=i+ +(o&&(!i||pJ(t)&&!t.noHeader)))}),n}return 0}(t)],richText:pX[o]},s=[],l=t.blocks||[];rX(!l||rO(l)),l=l||[];var c=e.orderMode;if(t.sortBlocks&&c){l=l.slice();var d={valueAsc:"asc",valueDesc:"desc"};if(r3(d,c)){var u=new pE(d[c],null);l.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else"seriesDesc"===c&&l.reverse()}rM(l,function(n,o){var r=t.valueFormatter,l=(pJ(n)?pZ:pQ)(r?rx(rx({},e),{valueFormatter:r}):e,n,o>0?a.html:0,i);null!=l&&s.push(l)});var m="richText"===e.renderMode?s.join(a.richText):p1(i,s.join(""),r?n:a.html);if(r)return m;var f=mK(t.header,"ordinal",e.useUTC),p=p$(i,e.renderMode).nameStyle,h=pG(i);return"richText"===e.renderMode?p2(e,f,p)+a.richText+m:p1(i,'<div style="'+p+";"+h+';">'+ay(f)+"</div>"+m,n)}function pQ(e,t,n,i){var o=e.renderMode,r=t.noName,a=t.noValue,s=!t.markerType,l=t.name,c=e.useUTC,d=t.valueFormatter||e.valueFormatter||function(e){return rA(e=rO(e)?e:[e],function(e,t){return mK(e,rO(F)?F[t]:F,c)})};if(!r||!a){var u,m,f,p,h,b,g,_,y=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||fl.color.secondary,o),v=r?"":mK(l,"ordinal",c),F=t.valueType,x=a?[]:d(t.value,t.dataIndex),w=!s||!r,k=!s&&r,E=p$(i,o),T=E.nameStyle,M=E.valueStyle;return"richText"===o?(s?"":y)+(r?"":p2(e,v,T))+(a?"":(u=e,m=x,f=w,p=k,h=[M],f&&h.push({padding:[0,0,0,p?10:20],align:"right"}),u.markupStyleCreator.wrapRichTextStyle(rO(m)?m.join(" "):m,h))):p1(i,(s?"":y)+(r?"":'<span style="'+T+";"+(s?"":"margin-left:2px")+'">'+ay(v)+"</span>")+(a?"":(b=x,g=w,_=k,'<span style="'+(g?"float:right;margin-left:"+(_?"10px":"20px"):"")+";"+M+'">'+rA(b=rO(b)?b:[b],function(e){return ay(e)}).join(" ")+"</span>")),n)}}function p0(e,t,n,i,o,r){if(e)return(pJ(e)?pZ:pQ)({useUTC:o,renderMode:n,orderMode:i,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,r)}function p1(e,t,n){return'<div style="margin: '+n+"px 0 0;"+pG(e)+';">'+t+'<div style="clear:both"></div></div>'}function p2(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function p5(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var p3=function(){function e(){this.richTextStyles={},this._nextStyleNameId=cu()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var i,o,r,a,s,l,c="richText"===n?this._generateStyleName():null,d=(a=(r=rY(i={color:t,type:e,renderMode:n,markerId:c})?{color:i,extraCssText:o}:i||{}).color,s=r.type,o=r.extraCssText,l=r.renderMode||"html",a?"html"===l?"subItem"===s?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+ay(a)+";"+(o||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+ay(a)+";"+(o||"")+'"></span>':{renderMode:l,content:"{"+(r.markerId||"markerX")+"|} ",style:"subItem"===s?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}:"");return rY(d)?d:(this.richTextStyles[c]=d.style,d.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};rO(t)?rM(t,function(e){return rx(n,e)}):rx(n,t);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},e}(),p4=ck();function p6(e,t){return e.getName(t)||e.getId(t)}var p8="__universalTransitionEnabled",p7=function(e){var t;function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return rt(n,e),n.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=pv({count:he,reset:ht}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(p4(this).sourceManager=new pU(this)).prepareSource();var i=this.getInitialData(e,n);hi(i,this),this.dataTask.context.data=i,p4(this).dataBeforeProcessed=i,p9(this),this._initSelectedMapFromData(i)},n.prototype.mergeDefaultAndTheme=function(e,t){var n=fi(this),i=n?fr(e):{},o=this.subType;fs.hasClass(o)&&(o+="Series"),rF(e,t.getTheme().get(this.subType)),rF(e,this.getDefaultOption()),ch(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&fo(e,i,n)},n.prototype.mergeOption=function(e,t){e=rF(this.option,e,!0),this.fillDataTextStyle(e.data);var n=fi(this);n&&fo(this.option,e,n);var i=p4(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(e,t);hi(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,p4(this).dataBeforeProcessed=o,p9(this),this._initSelectedMapFromData(o)},n.prototype.fillDataTextStyle=function(e){if(e&&!rz(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&ch(e[n],"label",t)},n.prototype.getInitialData=function(e,t){},n.prototype.appendData=function(e){this.getRawData().appendData(e.data)},n.prototype.getData=function(e){var t=hr(this);if(!t)return p4(this).data;var n=t.context.data;return null!=e&&n.getLinkedData?n.getLinkedData(e):n},n.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},n.prototype.setData=function(e){var t=hr(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}p4(this).data=e},n.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return r1(e)},n.prototype.getSourceManager=function(){return p4(this).sourceManager},n.prototype.getSource=function(){return this.getSourceManager().getSource()},n.prototype.getRawData=function(){return p4(this).dataBeforeProcessed},n.prototype.getColorBy=function(){return this.get("colorBy")||"series"},n.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},n.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},n.prototype.indicesOfNearest=function(e,t,n,i){var o=this.getData(),r=this.coordinateSystem,a=r&&r.getAxis(e);if(!r||!a)return[];var s=a.dataToCoord(n);null==i&&(i=1/0);var l=[],c=1/0,d=-1,u=0;return o.each(t,function(e,t){var n=s-a.dataToCoord(e),o=Math.abs(n);o<=i&&((o<c||o===c&&n>=0&&d<0)&&(c=o,d=n,u=0),n===d&&(l[u++]=t))}),l.length=u,l},n.prototype.formatTooltip=function(e,t,n){return function(e){var t,n,i,o,r=e.series,a=e.dataIndex,s=e.multipleSeries,l=r.getData(),c=l.mapDimensionsAll("defaultedTooltip"),d=c.length,u=r.getRawValue(a),m=rO(u),f=m0(r.getData().getItemVisual(a,"style")[r.visualDrawType]);if(d>1||m&&!d){var p=function(e,t,n,i,o){var r=t.getData(),a=rC(e,function(e,t,n){var i=r.getDimensionInfo(n);return e=e||i&&!1!==i.tooltip&&null!=i.displayName},!1),s=[],l=[],c=[];function d(e,t){var n=r.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(a?c.push(pK("nameValue",{markerType:"subItem",markerColor:o,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return i.length?rM(i,function(e){d(pb(r,n,e),e)}):rM(e,d),{inlineValues:s,inlineValueTypes:l,blocks:c}}(u,r,a,c,f);t=p.inlineValues,n=p.inlineValueTypes,i=p.blocks,o=p.inlineValues[0]}else if(d){var h=l.getDimensionInfo(c[0]);o=t=pb(l,a,c[0]),n=h.type}else o=t=m?u[0]:u;var b=cF(r),g=b&&r.name||"",_=l.getName(a),y=s?g:_;return pK("section",{header:g,noHeader:s||!b,sortParam:o,blocks:[pK("nameValue",{markerType:"item",markerColor:f,name:y,noName:!rK(y),value:t,valueType:n,dataIndex:a})].concat(i||[])})}({series:this,dataIndex:e,multipleSeries:t})},n.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(ri.node&&!(e&&e.ssr))return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),!!t},n.prototype.restoreData=function(){this.dataTask.dirty()},n.prototype.getColorFromPalette=function(e,t,n){var i=this.ecModel,o=fL.prototype.getColorFromPalette.call(this,e,t,n);return o||(o=i.getColorFromPalette(e,t,n)),o},n.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},n.prototype.getProgressive=function(){return this.get("progressive")},n.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},n.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},n.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,o=this.getData(t);if("series"===i||"all"===n){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var r=0;r<e.length;r++){var a=p6(o,e[r]);n[a]=!1,this._selectedDataIndicesMap[a]=-1}}},n.prototype.toggleSelect=function(e,t){for(var n=[],i=0;i<e.length;i++)n[0]=e[i],this.isSelected(e[i],t)?this.unselect(n,t):this.select(n,t)},n.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=rS(e),n=[],i=0;i<t.length;i++){var o=e[t[i]];o>=0&&n.push(o)}return n},n.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(t);return("all"===n||n[p6(i,e)])&&!i.getItemModel(e).get(["select","disabled"])},n.prototype.isUniversalTransitionEnabled=function(){if(this[p8])return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},n.prototype._innerSelect=function(e,t){var n,i,o=this.option,r=o.selectedMode,a=t.length;if(r&&a){if("series"===r)o.selectedMap="all";else if("multiple"===r){rB(o.selectedMap)||(o.selectedMap={});for(var s=o.selectedMap,l=0;l<a;l++){var c=t[l],d=p6(e,c);s[d]=!0,this._selectedDataIndicesMap[d]=e.getRawIndex(c)}}else if("single"===r||!0===r){var u=t[a-1],d=p6(e,u);(n={})[d]=!0,o.selectedMap=n,this._selectedDataIndicesMap=((i={})[d]=e.getRawIndex(u),i)}}},n.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each(function(n){var i=e.getRawDataItem(n);i&&i.selected&&t.push(n)}),t.length>0&&this._innerSelect(e,t)}},n.registerClass=function(e){return fs.registerClass(e)},n.protoInitialize=void((t=n.prototype).type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"),n}(fs);function p9(e){var t,n,i,o=e.name;cF(e)||(e.name=(n=(t=e.getRawData()).mapDimensionsAll("seriesName"),i=[],rM(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&i.push(n.displayName)}),i.join(" ")||o))}function he(e){return e.model.getRawData().count()}function ht(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),hn}function hn(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function hi(e,t){rM(function(e,t){for(var n=new e.constructor(e.length+t.length),i=0;i<e.length;i++)n[i]=e[i];for(var o=e.length,i=0;i<t.length;i++)n[i+o]=t[i];return n}(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,rI(ho,t))})}function ho(e,t){var n=hr(e);return n&&n.setOutputEnd((t||this).count()),t}function hr(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var i=n.currentTask;if(i){var o=i.agentStubMap;o&&(i=o.get(e.uid))}return i}}rE(p7,p_),rE(p7,fL),cY(p7,fs);var ha=function(){function e(){this.group=new lQ,this.uid=mg("viewComponent")}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,i){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,i){},e.prototype.updateLayout=function(e,t,n,i){},e.prototype.updateVisual=function(e,t,n,i){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();function hs(){var e=ck();return function(t){var n=e(t),i=t.pipelineContext,o=!!n.large,r=!!n.progressiveRender,a=n.large=!!(i&&i.large),s=n.progressiveRender=!!(i&&i.progressiveRender);return(o!==a||r!==s)&&"reset"}}cR(ha),cH(ha);var hl=dP.CMD,hc=[[],[],[]],hd=Math.sqrt,hu=Math.atan2;function hm(e,t){if(t){var n,i,o,r,a,s,l=e.data,c=e.len(),d=hl.M,u=hl.C,m=hl.L,f=hl.R,p=hl.A,h=hl.Q;for(o=0,r=0;o<c;){switch(n=l[o++],r=o,i=0,n){case d:case m:i=1;break;case u:i=3;break;case h:i=2;break;case p:var b=t[4],g=t[5],_=hd(t[0]*t[0]+t[1]*t[1]),y=hd(t[2]*t[2]+t[3]*t[3]),v=hu(-t[1]/y,t[0]/_);l[o]*=_,l[o++]+=b,l[o]*=y,l[o++]+=g,l[o++]*=_,l[o++]*=y,l[o++]+=v,l[o++]+=v,o+=2,r=o;break;case f:s[0]=l[o++],s[1]=l[o++],ao(s,s,t),l[r++]=s[0],l[r++]=s[1],s[0]+=l[o++],s[1]+=l[o++],ao(s,s,t),l[r++]=s[0],l[r++]=s[1]}for(a=0;a<i;a++){var F=hc[a];F[0]=l[o++],F[1]=l[o++],ao(F,F,t),l[r++]=F[0],l[r++]=F[1]}}e.increaseVersion()}}var hf=Math.sqrt,hp=Math.sin,hh=Math.cos,hb=Math.PI;function hg(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function h_(e,t){return(e[0]*t[0]+e[1]*t[1])/(hg(e)*hg(t))}function hy(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(h_(e,t))}function hv(e,t,n,i,o,r,a,s,l,c,d){var u=hb/180*l,m=hh(u)*(e-n)/2+hp(u)*(t-i)/2,f=-1*hp(u)*(e-n)/2+hh(u)*(t-i)/2,p=m*m/(a*a)+f*f/(s*s);p>1&&(a*=hf(p),s*=hf(p));var h=(o===r?-1:1)*hf((a*a*(s*s)-a*a*(f*f)-s*s*(m*m))/(a*a*(f*f)+s*s*(m*m)))||0,b=h*a*f/s,g=-(h*s)*m/a,_=(e+n)/2+hh(u)*b-hp(u)*g,y=(t+i)/2+hp(u)*b+hh(u)*g,v=hy([1,0],[(m-b)/a,(f-g)/s]),F=[(m-b)/a,(f-g)/s],x=[(-1*m-b)/a,(-1*f-g)/s],w=hy(F,x);if(-1>=h_(F,x)&&(w=hb),h_(F,x)>=1&&(w=0),w<0){var k=Math.round(w/hb*1e6)/1e6;w=2*hb+k%2*hb}d.addData(c,_,y,a,s,v,w,u,r)}var hF=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,hx=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,hw=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r7(t,e),t.prototype.applyTransform=function(e){},t}(dJ);function hk(e){return null!=e.setData}function hE(e,t){var n=function(e){var t,n=new dP;if(!e)return n;var i=0,o=0,r=0,a=0,s=dP.CMD,l=e.match(hF);if(!l)return n;for(var c=0;c<l.length;c++){for(var d=l[c],u=d.charAt(0),m=void 0,f=d.match(hx)||[],p=f.length,h=0;h<p;h++)f[h]=parseFloat(f[h]);for(var b=0;b<p;){var g=void 0,_=void 0,y=void 0,v=void 0,F=void 0,x=void 0,w=void 0,k=i,E=o,T=void 0,M=void 0;switch(u){case"l":i+=f[b++],o+=f[b++],m=s.L,n.addData(m,i,o);break;case"L":i=f[b++],o=f[b++],m=s.L,n.addData(m,i,o);break;case"m":i+=f[b++],o+=f[b++],m=s.M,n.addData(m,i,o),r=i,a=o,u="l";break;case"M":i=f[b++],o=f[b++],m=s.M,n.addData(m,i,o),r=i,a=o,u="L";break;case"h":i+=f[b++],m=s.L,n.addData(m,i,o);break;case"H":i=f[b++],m=s.L,n.addData(m,i,o);break;case"v":o+=f[b++],m=s.L,n.addData(m,i,o);break;case"V":o=f[b++],m=s.L,n.addData(m,i,o);break;case"C":m=s.C,n.addData(m,f[b++],f[b++],f[b++],f[b++],f[b++],f[b++]),i=f[b-2],o=f[b-1];break;case"c":m=s.C,n.addData(m,f[b++]+i,f[b++]+o,f[b++]+i,f[b++]+o,f[b++]+i,f[b++]+o),i+=f[b-2],o+=f[b-1];break;case"S":g=i,_=o,T=n.len(),M=n.data,t===s.C&&(g+=i-M[T-4],_+=o-M[T-3]),m=s.C,k=f[b++],E=f[b++],i=f[b++],o=f[b++],n.addData(m,g,_,k,E,i,o);break;case"s":g=i,_=o,T=n.len(),M=n.data,t===s.C&&(g+=i-M[T-4],_+=o-M[T-3]),m=s.C,k=i+f[b++],E=o+f[b++],i+=f[b++],o+=f[b++],n.addData(m,g,_,k,E,i,o);break;case"Q":k=f[b++],E=f[b++],i=f[b++],o=f[b++],m=s.Q,n.addData(m,k,E,i,o);break;case"q":k=f[b++]+i,E=f[b++]+o,i+=f[b++],o+=f[b++],m=s.Q,n.addData(m,k,E,i,o);break;case"T":g=i,_=o,T=n.len(),M=n.data,t===s.Q&&(g+=i-M[T-4],_+=o-M[T-3]),i=f[b++],o=f[b++],m=s.Q,n.addData(m,g,_,i,o);break;case"t":g=i,_=o,T=n.len(),M=n.data,t===s.Q&&(g+=i-M[T-4],_+=o-M[T-3]),i+=f[b++],o+=f[b++],m=s.Q,n.addData(m,g,_,i,o);break;case"A":y=f[b++],v=f[b++],F=f[b++],x=f[b++],w=f[b++],k=i,E=o,i=f[b++],hv(k,E,i,o=f[b++],x,w,y,v,F,m=s.A,n);break;case"a":y=f[b++],v=f[b++],F=f[b++],x=f[b++],w=f[b++],k=i,E=o,i+=f[b++],hv(k,E,i,o+=f[b++],x,w,y,v,F,m=s.A,n)}}("z"===u||"Z"===u)&&(m=s.Z,n.addData(m),i=r,o=a),t=m}return n.toStatic(),n}(e),i=rx({},t);return i.buildPath=function(e){var t=hk(e);if(t&&e.canSave()){e.appendPath(n);var i=e.getContext();i&&e.rebuildPath(i,1)}else{var i=t?e.getContext():e;i&&n.rebuildPath(i,1)}},i.applyTransform=function(e){hm(n,e),this.dirtyShape()},i}function hT(e,t){t=t||{};var n=new dJ;return e.shape&&n.setShape(e.shape),n.setStyle(e.style),t.bakeTransform?hm(n.path,e.getComputedTransform()):t.toLocal?n.setLocalTransform(e.getComputedTransform()):n.copyTransform(e),n.buildPath=e.buildPath,n.applyTransform=n.applyTransform,n.z=e.z,n.z2=e.z2,n.zlevel=e.zlevel,n}var hM=function(){this.cx=0,this.cy=0,this.r=0},hA=function(e){function t(t){return e.call(this,t)||this}return r7(t,e),t.prototype.getDefaultShape=function(){return new hM},t.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI)},t}(dJ);hA.prototype.type="circle";let hC=hA;var hD=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},hS=function(e){function t(t){return e.call(this,t)||this}return r7(t,e),t.prototype.getDefaultShape=function(){return new hD},t.prototype.buildPath=function(e,t){var n=t.cx,i=t.cy,o=t.rx,r=t.ry,a=.5522848*o,s=.5522848*r;e.moveTo(n-o,i),e.bezierCurveTo(n-o,i-s,n-a,i-r,n,i-r),e.bezierCurveTo(n+a,i-r,n+o,i-s,n+o,i),e.bezierCurveTo(n+o,i+s,n+a,i+r,n,i+r),e.bezierCurveTo(n-a,i+r,n-o,i+s,n-o,i),e.closePath()},t}(dJ);hS.prototype.type="ellipse";let hL=hS;var hI=Math.PI,hO=2*hI,hR=Math.sin,hY=Math.cos,hP=Math.acos,hN=Math.atan2,hB=Math.abs,hH=Math.sqrt,hz=Math.max,hj=Math.min;function hU(e,t,n,i,o,r,a){var s=e-n,l=t-i,c=(a?r:-r)/hH(s*s+l*l),d=c*l,u=-c*s,m=e+d,f=t+u,p=n+d,h=i+u,b=(m+p)/2,g=(f+h)/2,_=p-m,y=h-f,v=_*_+y*y,F=o-r,x=m*h-p*f,w=(y<0?-1:1)*hH(hz(0,F*F*v-x*x)),k=(x*y-_*w)/v,E=(-x*_-y*w)/v,T=(x*y+_*w)/v,M=(-x*_+y*w)/v,A=k-b,C=E-g,D=T-b,S=M-g;return A*A+C*C>D*D+S*S&&(k=T,E=M),{cx:k,cy:E,x0:-d,y0:-u,x1:k*(o/F-1),y1:E*(o/F-1)}}var hW=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},hV=function(e){function t(t){return e.call(this,t)||this}return r7(t,e),t.prototype.getDefaultShape=function(){return new hW},t.prototype.buildPath=function(e,t){!function(e,t){var n,i=hz(t.r,0),o=hz(t.r0||0,0),r=i>0,a=o>0;if(r||a){if(r||(i=o,o=0),o>i){var s=i;i=o,o=s}var l=t.startAngle,c=t.endAngle;if(!(isNaN(l)||isNaN(c))){var d=t.cx,u=t.cy,m=!!t.clockwise,f=hB(c-l),p=f>hO&&f%hO;if(p>1e-4&&(f=p),i>1e-4)if(f>hO-1e-4)e.moveTo(d+i*hY(l),u+i*hR(l)),e.arc(d,u,i,l,c,!m),o>1e-4&&(e.moveTo(d+o*hY(c),u+o*hR(c)),e.arc(d,u,o,c,l,m));else{var h=void 0,b=void 0,g=void 0,_=void 0,y=void 0,v=void 0,F=void 0,x=void 0,w=void 0,k=void 0,E=void 0,T=void 0,M=void 0,A=void 0,C=void 0,D=void 0,S=i*hY(l),L=i*hR(l),I=o*hY(c),O=o*hR(c),R=f>1e-4;if(R){var Y=t.cornerRadius;Y&&(h=(n=function(e){var t;if(rO(e)){var n=e.length;if(!n)return e;t=1===n?[e[0],e[0],0,0]:2===n?[e[0],e[0],e[1],e[1]]:3===n?e.concat(e[2]):e}else t=[e,e,e,e];return t}(Y))[0],b=n[1],g=n[2],_=n[3]);var P=hB(i-o)/2;if(y=hj(P,g),v=hj(P,_),F=hj(P,h),x=hj(P,b),E=w=hz(y,v),T=k=hz(F,x),(w>1e-4||k>1e-4)&&(M=i*hY(c),A=i*hR(c),C=o*hY(l),D=o*hR(l),f<hI)){var N=function(e,t,n,i,o,r,a,s){var l=n-e,c=i-t,d=a-o,u=s-r,m=u*l-d*c;if(!(m*m<1e-4))return m=(d*(t-r)-u*(e-o))/m,[e+m*l,t+m*c]}(S,L,C,D,M,A,I,O);if(N){var B=S-N[0],H=L-N[1],z=M-N[0],j=A-N[1],U=1/hR(hP((B*z+H*j)/(hH(B*B+H*H)*hH(z*z+j*j)))/2),W=hH(N[0]*N[0]+N[1]*N[1]);E=hj(w,(i-W)/(U+1)),T=hj(k,(o-W)/(U-1))}}}if(R)if(E>1e-4){var V=hj(g,E),G=hj(_,E),$=hU(C,D,S,L,i,V,m),q=hU(M,A,I,O,i,G,m);e.moveTo(d+$.cx+$.x0,u+$.cy+$.y0),E<w&&V===G?e.arc(d+$.cx,u+$.cy,E,hN($.y0,$.x0),hN(q.y0,q.x0),!m):(V>0&&e.arc(d+$.cx,u+$.cy,V,hN($.y0,$.x0),hN($.y1,$.x1),!m),e.arc(d,u,i,hN($.cy+$.y1,$.cx+$.x1),hN(q.cy+q.y1,q.cx+q.x1),!m),G>0&&e.arc(d+q.cx,u+q.cy,G,hN(q.y1,q.x1),hN(q.y0,q.x0),!m))}else e.moveTo(d+S,u+L),e.arc(d,u,i,l,c,!m);else e.moveTo(d+S,u+L);if(o>1e-4&&R)if(T>1e-4){var V=hj(h,T),G=hj(b,T),$=hU(I,O,M,A,o,-G,m),q=hU(S,L,C,D,o,-V,m);e.lineTo(d+$.cx+$.x0,u+$.cy+$.y0),T<k&&V===G?e.arc(d+$.cx,u+$.cy,T,hN($.y0,$.x0),hN(q.y0,q.x0),!m):(G>0&&e.arc(d+$.cx,u+$.cy,G,hN($.y0,$.x0),hN($.y1,$.x1),!m),e.arc(d,u,o,hN($.cy+$.y1,$.cx+$.x1),hN(q.cy+q.y1,q.cx+q.x1),m),V>0&&e.arc(d+q.cx,u+q.cy,V,hN(q.y1,q.x1),hN(q.y0,q.x0),!m))}else e.lineTo(d+I,u+O),e.arc(d,u,o,c,l,m);else e.lineTo(d+I,u+O)}else e.moveTo(d,u);e.closePath()}}}(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(dJ);hV.prototype.type="sector";let hG=hV;var h$=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},hq=function(e){function t(t){return e.call(this,t)||this}return r7(t,e),t.prototype.getDefaultShape=function(){return new h$},t.prototype.buildPath=function(e,t){var n=t.cx,i=t.cy,o=2*Math.PI;e.moveTo(n+t.r,i),e.arc(n,i,t.r,0,o,!1),e.moveTo(n+t.r0,i),e.arc(n,i,t.r0,0,o,!0)},t}(dJ);hq.prototype.type="ring";let hX=hq;function hK(e,t,n){var i=t.smooth,o=t.points;if(o&&o.length>=2){if(i){var r=function(e,t,n,i){var o,r,a,s,l=[],c=[],d=[],u=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var m=0,f=e.length;m<f;m++)ar(a,a,e[m]),aa(s,s,e[m]);ar(a,a,i[0]),aa(s,s,i[1])}for(var m=0,f=e.length;m<f;m++){var p,h,b,g=e[m];if(n)o=e[m?m-1:f-1],r=e[(m+1)%f];else if(0===m||m===f-1){l.push([(p=e[m])[0],p[1]]);continue}else o=e[m-1],r=e[m+1];h=r,b=o,c[0]=h[0]-b[0],c[1]=h[1]-b[1],at(c,c,t);var _=an(g,o),y=an(g,r),v=_+y;0!==v&&(_/=v,y/=v),at(d,c,-_),at(u,c,y);var F=ae([],g,d),x=ae([],g,u);i&&(aa(F,F,a),ar(F,F,s),aa(x,x,a),ar(x,x,s)),l.push(F),l.push(x)}return n&&l.push(l.shift()),l}(o,i,n,t.smoothConstraint);e.moveTo(o[0][0],o[0][1]);for(var a=o.length,s=0;s<(n?a:a-1);s++){var l=r[2*s],c=r[2*s+1],d=o[(s+1)%a];e.bezierCurveTo(l[0],l[1],c[0],c[1],d[0],d[1])}}else{e.moveTo(o[0][0],o[0][1]);for(var s=1,u=o.length;s<u;s++)e.lineTo(o[s][0],o[s][1])}n&&e.closePath()}}var hJ=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},hZ=function(e){function t(t){return e.call(this,t)||this}return r7(t,e),t.prototype.getDefaultShape=function(){return new hJ},t.prototype.buildPath=function(e,t){hK(e,t,!0)},t}(dJ);hZ.prototype.type="polygon";let hQ=hZ;var h0=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},h1=function(e){function t(t){return e.call(this,t)||this}return r7(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new h0},t.prototype.buildPath=function(e,t){hK(e,t,!1)},t}(dJ);h1.prototype.type="polyline";let h2=h1;var h5={},h3=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},h4=function(e){function t(t){return e.call(this,t)||this}return r7(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new h3},t.prototype.buildPath=function(e,t){if(this.subPixelOptimize){var n,i,o,r,a=d4(h5,t,this.style);n=a.x1,i=a.y1,o=a.x2,r=a.y2}else n=t.x1,i=t.y1,o=t.x2,r=t.y2;var s=t.percent;0!==s&&(e.moveTo(n,i),s<1&&(o=n*(1-s)+o*s,r=i*(1-s)+r*s),e.lineTo(o,r))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(dJ);h4.prototype.type="line";let h6=h4;var h8=[],h7=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function h9(e,t,n){var i=e.cpx2,o=e.cpy2;return null!=i||null!=o?[(n?sk:sw)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?sk:sw)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?sC:sA)(e.x1,e.cpx1,e.x2,t),(n?sC:sA)(e.y1,e.cpy1,e.y2,t)]}var be=function(e){function t(t){return e.call(this,t)||this}return r7(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new h7},t.prototype.buildPath=function(e,t){var n=t.x1,i=t.y1,o=t.x2,r=t.y2,a=t.cpx1,s=t.cpy1,l=t.cpx2,c=t.cpy2,d=t.percent;0!==d&&(e.moveTo(n,i),null==l||null==c?(d<1&&(sS(n,a,o,d,h8),a=h8[1],o=h8[2],sS(i,s,r,d,h8),s=h8[1],r=h8[2]),e.quadraticCurveTo(a,s,o,r)):(d<1&&(sM(n,a,l,o,d,h8),a=h8[1],l=h8[2],o=h8[3],sM(i,s,c,r,d,h8),s=h8[1],c=h8[2],r=h8[3]),e.bezierCurveTo(a,s,l,c,o,r)))},t.prototype.pointAt=function(e){return h9(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t,n=h9(this.shape,e,!0),i=Math.sqrt((t=n)[0]*t[0]+t[1]*t[1]);return 0===i?(n[0]=0,n[1]=0):(n[0]=n[0]/i,n[1]=n[1]/i),n},t}(dJ);be.prototype.type="bezier-curve";let bt=be;var bn=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},bi=function(e){function t(t){return e.call(this,t)||this}return r7(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new bn},t.prototype.buildPath=function(e,t){var n=t.cx,i=t.cy,o=Math.max(t.r,0),r=t.startAngle,a=t.endAngle,s=t.clockwise,l=Math.cos(r),c=Math.sin(r);e.moveTo(l*o+n,c*o+i),e.arc(n,i,o,r,a,!s)},t}(dJ);bi.prototype.type="arc";let bo=bi,br=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="compound",t}return r7(t,e),t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t=t||e[n].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],i=0;i<n.length;i++)n[i].buildPath(e,n[i].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),dJ.prototype.getBoundingRect.call(this)},t}(dJ);var ba=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}();let bs=function(e){function t(t,n,i,o,r,a){var s=e.call(this,r)||this;return s.x=null==t?0:t,s.y=null==n?0:n,s.x2=null==i?1:i,s.y2=null==o?0:o,s.type="linear",s.global=a||!1,s}return r7(t,e),t}(ba),bl=function(e){function t(t,n,i,o,r){var a=e.call(this,o)||this;return a.x=null==t?.5:t,a.y=null==n?.5:n,a.r=null==i?.5:i,a.type="radial",a.global=r||!1,a}return r7(t,e),t}(ba);var bc=Math.min,bd=Math.max,bu=Math.abs,bm=[0,0],bf=[0,0],bp=a5(),bh=bp.minTv,bb=bp.maxTv;let bg=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new aB;for(var n=0;n<2;n++)this._axes[n]=new aB;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var n=this._corners,i=this._axes,o=e.x,r=e.y,a=o+e.width,s=r+e.height;if(n[0].set(o,r),n[1].set(a,r),n[2].set(a,s),n[3].set(o,s),t)for(var l=0;l<4;l++)n[l].transform(t);aB.sub(i[0],n[1],n[0]),aB.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var l=0;l<2;l++)this._origin[l]=i[l].dot(n[0])},e.prototype.intersect=function(e,t,n){var i=!0,o=!t;return(t&&aB.set(t,0,0),bp.reset(n,!o),!this._intersectCheckOneSide(this,e,o,1)&&(i=!1,o)||!this._intersectCheckOneSide(e,this,o,-1)&&(i=!1,o))?i:(o||bp.negativeSize||aB.copy(t,i?bp.useDir?bp.dirMinTv:bh:bb),i)},e.prototype._intersectCheckOneSide=function(e,t,n,i){for(var o=!0,r=0;r<2;r++){var a=e._axes[r];if(e._getProjMinMaxOnAxis(r,e._corners,bm),e._getProjMinMaxOnAxis(r,t._corners,bf),bp.negativeSize||bm[1]<bf[0]||bm[0]>bf[1]){if(o=!1,bp.negativeSize||n)return o;var s=bu(bf[0]-bm[1]),l=bu(bm[0]-bf[1]);bc(s,l)>bb.len()&&(s<l?aB.scale(bb,a,-s*i):aB.scale(bb,a,l*i))}else if(!n){var s=bu(bf[0]-bm[1]),l=bu(bm[0]-bf[1]);(bp.useDir||bc(s,l)<bh.len())&&((s<l||!bp.bidirectional)&&(aB.scale(bh,a,s*i),bp.useDir&&bp.calcDirMTV()),(s>=l||!bp.bidirectional)&&(aB.scale(bh,a,-l*i),bp.useDir&&bp.calcDirMTV()))}}return o},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var i=this._axes[e],o=this._origin,r=t[0].dot(i)+o[e],a=r,s=r,l=1;l<t.length;l++){var c=t[l].dot(i)+o[e];a=bc(c,a),s=bd(c,s)}n[0]=a+bp.touchThreshold,n[1]=s-bp.touchThreshold,bp.negativeSize=n[1]<n[0]},e}();var b_=[];let by=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return r7(t,e),t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(var t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var t=this._displayables[e];t.parent=this,t.update(),t.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var t=this._temporaryDisplayables[e];t.parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new a3(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(b_)),e.union(i)}this._rect=e}return this._rect},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1])){for(var i=0;i<this._displayables.length;i++)if(this._displayables[i].contain(e,t))return!0}return!1},t}(dr);var bv=ck();function bF(e,t,n,i,o){if(t&&t.ecModel){var r,a=t.ecModel.getUpdatePayload();r=a&&a.animation}var s=t&&t.isAnimationEnabled(),l="update"===e;if(!s)return null;var c=void 0,d=void 0,u=void 0;return i?(c=rV(i.duration,200),d=rV(i.easing,"cubicOut"),u=0):(c=t.getShallow(l?"animationDurationUpdate":"animationDuration"),d=t.getShallow(l?"animationEasingUpdate":"animationEasing"),u=t.getShallow(l?"animationDelayUpdate":"animationDelay")),r&&(null!=r.duration&&(c=r.duration),null!=r.easing&&(d=r.easing),null!=r.delay&&(u=r.delay)),rR(u)&&(u=u(n,o)),rR(c)&&(c=c(n)),{duration:c||0,delay:u,easing:d}}function bx(e,t,n,i,o,r,a){var s,l=!1;rR(o)?(a=r,r=o,o=null):rB(o)&&(r=o.cb,a=o.during,l=o.isFrom,s=o.removeOpt,o=o.dataIndex);var c="leave"===e;c||t.stopAnimation("leave");var d=bF(e,i,o,c?s||{}:null,i&&i.getAnimationDelayParams?i.getAnimationDelayParams(t,o):null);if(d&&d.duration>0){var u={duration:d.duration,delay:d.delay||0,easing:d.easing,done:r,force:!!r||!!a,setToFinal:!c,scope:e,during:a};l?t.animateFrom(n,u):t.animateTo(n,u)}else t.stopAnimation(),l||t.attr(n),a&&a(1),r&&r()}function bw(e,t,n,i,o,r){bx("update",e,t,n,i,o,r)}function bk(e,t,n,i,o,r){bx("enter",e,t,n,i,o,r)}function bE(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++)if("leave"===e.animators[t].scope)return!0;return!1}function bT(e,t,n,i,o,r){bE(e)||bx("leave",e,t,n,i,o,r)}function bM(e,t,n,i){e.removeTextContent(),e.removeTextGuideLine(),bT(e,{style:{opacity:0}},t,n,i)}function bA(e,t,n){function i(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||bM(e,t,n,i)}):bM(e,t,n,i)}var bC={},bD=["x","y"],bS=["width","height"];function bL(e){return dJ.extend(e)}var bI=function(e,t){var n=hE(e,t),i=hw;function o(e){var t=i.call(this,e)||this;return t.applyTransform=n.applyTransform,t.buildPath=n.buildPath,t}return r7(o,i),o};function bO(e,t){return bI(e,t)}function bR(e,t){bC[e]=t}function bY(e){if(bC.hasOwnProperty(e))return bC[e]}function bP(e,t,n,i){var o=new hw(hE(e,t));return n&&("center"===i&&(n=bB(n,o.getBoundingRect())),bz(o,n)),o}function bN(e,t,n){var i=new d5({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var o={width:e.width,height:e.height};i.setStyle(bB(t,o))}}});return i}function bB(e,t){var n,i=t.width/t.height,o=e.height*i;return n=o<=e.width?e.height:(o=e.width)/i,{x:e.x+e.width/2-o/2,y:e.y+e.height/2-n/2,width:o,height:n}}var bH=function(e,t){for(var n=[],i=e.length,o=0;o<i;o++){var r=e[o];n.push(r.getUpdatedPathProxy(!0))}var a=new dJ(t);return a.createPathProxy(),a.buildPath=function(e){if(hk(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},a};function bz(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function bj(e,t){return d4(e,e,{lineWidth:t}),e}function bU(e,t){return d6(e,e,t),e}var bW=d8;function bV(e,t){for(var n=aI([]);e&&e!==t;)aR(n,e.getLocalTransform(),n),e=e.parent;return n}function bG(e,t,n){return t&&!rT(t)&&(t=lC.getLocalTransform(t)),n&&(t=aN([],t)),ao([],e,t)}function b$(e,t,n){var i=0===t[4]||0===t[5]||0===t[0]?1:l6(2*t[4]/t[0]),o=0===t[4]||0===t[5]||0===t[2]?1:l6(2*t[4]/t[2]),r=["left"===e?-i:"right"===e?i:0,"top"===e?-o:"bottom"===e?o:0];return l6((r=bG(r,t,n))[0])>l6(r[1])?r[0]>0?"right":"left":r[1]>0?"bottom":"top"}function bq(e,t,n){if(e&&t){var i,o=(i={},e.traverse(function(e){!e.isGroup&&e.anid&&(i[e.anid]=e)}),i);t.traverse(function(e){if(!e.isGroup&&e.anid){var t=o[e.anid];if(t){var i=r(e);e.attr(r(t)),bw(e,i,n,ug(e).dataIndex)}}})}function r(e){var t={x:e.x,y:e.y,rotation:e.rotation};return null!=e.shape&&(t.shape=rv(e.shape)),t}}function bX(e,t){return rA(e,function(e){var n=e[0];n=l3(n=l4(n,t.x),t.x+t.width);var i=e[1];return[n,i=l3(i=l4(i,t.y),t.y+t.height)]})}function bK(e,t){var n=l4(e.x,t.x),i=l3(e.x+e.width,t.x+t.width),o=l4(e.y,t.y),r=l3(e.y+e.height,t.y+t.height);if(i>=n&&r>=o)return{x:n,y:o,width:i-n,height:r-o}}function bJ(e,t,n){var i=rx({rectHover:!0},t),o=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(o.image=e.slice(8),rw(o,n),new d5(i)):bP(e.replace("path://",""),i,n,"center")}function bZ(e,t,n,i,o){for(var r=0,a=o[o.length-1];r<o.length;r++){var s=o[r];if(bQ(e,t,n,i,s[0],s[1],a[0],a[1]))return!0;a=s}}function bQ(e,t,n,i,o,r,a,s){var l,c=n-e,d=i-t,u=a-o,m=s-r,f=u*d-c*m;if((l=f)<=1e-6&&l>=-1e-6)return!1;var p=e-o,h=t-r,b=(p*d-c*h)/f;if(b<0||b>1)return!1;var g=(p*m-u*h)/f;return!(g<0)&&!(g>1)}function b0(e,t,n,i,o){return null==t||(rN(t)?b1[0]=b1[1]=b1[2]=b1[3]=t:(b1[0]=t[0],b1[1]=t[1],b1[2]=t[2],b1[3]=t[3]),i&&(b1[0]=l4(0,b1[0]),b1[1]=l4(0,b1[1]),b1[2]=l4(0,b1[2]),b1[3]=l4(0,b1[3])),n&&(b1[0]=-b1[0],b1[1]=-b1[1],b1[2]=-b1[2],b1[3]=-b1[3]),b2(e,b1,"x","width",3,1,o&&o[0]||0),b2(e,b1,"y","height",0,2,o&&o[1]||0)),e}var b1=[0,0,0,0];function b2(e,t,n,i,o,r,a){var s=t[r]+t[o],l=e[i];e[i]+=s,a=l4(0,l3(a,l)),e[i]<a?(e[i]=a,e[n]+=t[o]>=0?-t[o]:t[r]>=0?l+t[r]:l6(s)>1e-8?(l-a)*t[o]/s:0):e[n]-=t[o]}function b5(e){var t=e.itemTooltipOption,n=e.componentModel,i=e.itemName,o=rY(t)?{formatter:t}:t,r=n.mainType,a=n.componentIndex,s={componentType:r,name:i,$vars:["name"]};s[r+"Index"]=a;var l=e.formatterParamsExtra;l&&rM(rS(l),function(e){r3(s,e)||(s[e]=l[e],s.$vars.push(e))});var c=ug(e.el);c.componentMainType=r,c.componentIndex=a,c.tooltipConfig={name:i,option:rw({content:i,encodeHTMLContent:!0,formatterParams:s},o)}}function b3(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function b4(e,t){if(e)if(rO(e))for(var n=0;n<e.length;n++)b3(e[n],t);else b3(e,t)}function b6(e){return!e||l6(e[1])<b8&&l6(e[2])<b8||l6(e[0])<b8&&l6(e[3])<b8}var b8=1e-5;function b7(e,t){return e?a3.copy(e,t):t.clone()}function b9(e,t){return t?aO(e||aL(),t):void 0}function ge(e){return{z:e.get("z")||0,zlevel:e.get("zlevel")||0}}function gt(e){var t=-1/0,n=1/0;function i(e){if(e&&!e.isGroup){var t=e.currentStates;if(t.length)for(var n=0;n<t.length;n++)o(e.states[t[n]]);o(e)}}function o(e){if(e){var i=e.z2;i>t&&(t=i),i<n&&(n=i)}}return b3(e,function(e){i(e),i(e.getTextContent()),i(e.getTextGuideLine())}),n>t&&(n=t=0),{min:n,max:t}}function gn(e,t,n){!function e(t,n,i,o){if(t.ignoreModelZ)return o;var r=t.getTextContent(),a=t.getTextGuideLine();if(t.isGroup)for(var s=t.childrenRef(),l=0;l<s.length;l++)o=l4(e(s[l],n,i,o),o);else t.z=n,t.zlevel=i,o=l4(t.z2||0,o);if(r&&(r.z=n,r.zlevel=i,isFinite(o)&&(r.z2=o+2)),a){var c=t.textGuideLineConfig;a.z=n,a.zlevel=i,isFinite(o)&&(a.z2=o+(c&&c.showAbove?1:-1))}return o}(e,t,n,-1/0)}bC.circle=hC,bC.ellipse=hL,bC.sector=hG,bC.ring=hX,bC.polygon=hQ,bC.polyline=h2,bC.rect=ut,bC.line=h6,bC.bezierCurve=bt,bC.arc=bo;var gi=ck(),go=hs(),gr=function(){function e(){this.group=new lQ,this.uid=mg("viewChart"),this.renderTask=pv({plan:gl,reset:gc}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,i){},e.prototype.highlight=function(e,t,n,i){var o=e.getData(i&&i.dataType);o&&gs(o,i,"emphasis")},e.prototype.downplay=function(e,t,n,i){var o=e.getData(i&&i.dataType);o&&gs(o,i,"normal")},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,i){this.render(e,t,n,i)},e.prototype.updateLayout=function(e,t,n,i){this.render(e,t,n,i)},e.prototype.updateVisual=function(e,t,n,i){this.render(e,t,n,i)},e.prototype.eachRendered=function(e){b4(this.group,e)},e.markUpdateMethod=function(e,t){gi(e).updateMethod=t},e.protoInitialize=void(e.prototype.type="chart"),e}();function ga(e,t,n){e&&u2(e)&&("emphasis"===t?uW:uV)(e,n)}function gs(e,t,n){var i,o,r=cw(e,t),a=t&&null!=t.highlightKey?(null==(o=uv[i=t.highlightKey])&&uy<=32&&(o=uv[i]=uy++),o):null;null!=r?rM(cp(r),function(t){ga(e.getItemGraphicEl(t),n,a)}):e.eachItemGraphicEl(function(e){ga(e,n,a)})}function gl(e){return go(e.model)}function gc(e){var t=e.model,n=e.ecModel,i=e.api,o=e.payload,r=t.pipelineContext.progressiveRender,a=e.view,s=o&&gi(o).updateMethod,l=r?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](t,n,i,o),gd[l]}cR(gr,["dispose"]),cH(gr);var gd={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},gu="\0__throttleOriginMethod",gm="\0__throttleRate",gf="\0__throttleType";function gp(e,t,n){var i,o,r,a,s,l=0,c=0,d=null;function u(){c=new Date().getTime(),d=null,e.apply(r,a||[])}t=t||0;var m=function(){for(var e=[],m=0;m<arguments.length;m++)e[m]=arguments[m];i=new Date().getTime(),r=this,a=e;var f=s||t,p=s||n;s=null,o=i-(p?l:c)-f,clearTimeout(d),p?d=setTimeout(u,f):o>=0?u():d=setTimeout(u,-o),l=i};return m.clear=function(){d&&(clearTimeout(d),d=null)},m.debounceNextCall=function(e){s=e},m}function gh(e,t,n,i){var o=e[t];if(o){var r=o[gu]||o,a=o[gf];if(o[gm]!==n||a!==i){if(null==n||!i)return e[t]=r;(o=e[t]=gp(r,n,"debounce"===i))[gu]=r,o[gf]=i,o[gm]=n}return o}}function gb(e,t){var n=e[t];n&&n[gu]&&(n.clear&&n.clear(),e[t]=n[gu])}var gg=ck(),g_={itemStyle:cz(mm,!0),lineStyle:cz(mc,!0)},gy={lineStyle:"stroke",itemStyle:"fill"};function gv(e,t){var n=e.visualStyleMapper||g_[t];return n||(console.warn("Unknown style type '"+t+"'."),g_.itemStyle)}function gF(e,t){var n=e.visualDrawType||gy[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var gx=new mh,gw=Math.PI,gk=function(){function e(e,t,n,i){this._stageTaskMap=r1(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,o=!t&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,r=i&&i.modDataCount,a=null!=r?Math.ceil(r/o):null;return{step:o,modBy:a,modDataCount:r}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),i=e.getData().count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&i>=n.threshold,r=e.get("large")&&i>=e.get("largeThreshold"),a="mod"===e.get("progressiveChunkMode")?i:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:a,large:r}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=r1();e.eachSeries(function(e){var i=e.getProgressive(),o=e.uid;n.set(o,{id:o,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:i&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),t._pipe(e,e.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;rM(this._allHandlers,function(i){var o=e.get(i.uid)||e.set(i.uid,{});rX(!(i.reset&&i.overallReset),""),i.reset&&this._createSeriesStageTask(i,o,t,n),i.overallReset&&this._createOverallStageTask(i,o,t,n)},this)},e.prototype.prepareView=function(e,t,n,i){var o=e.renderTask,r=o.context;r.model=t,r.ecModel=n,r.api=i,o.__block=!e.incrementalPrepareRender,this._pipe(t,o)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,i){i=i||{};var o=!1,r=this;function a(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}rM(e,function(e,s){if(!i.visualType||i.visualType===e.visualType){var l=r._stageTaskMap.get(e.uid),c=l.seriesTaskMap,d=l.overallTask;if(d){var u,m=d.agentStubMap;m.each(function(e){a(i,e)&&(e.dirty(),u=!0)}),u&&d.dirty(),r.updatePayload(d,n);var f=r.getPerformArgs(d,i.block);m.each(function(e){e.perform(f)}),d.perform(f)&&(o=!0)}else c&&c.each(function(s,l){a(i,s)&&s.dirty();var c=r.getPerformArgs(s,i.block);c.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),r.updatePayload(s,n),s.perform(c)&&(o=!0)})}}),this.unfinished=o||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,i){var o=this,r=t.seriesTaskMap,a=t.seriesTaskMap=r1(),s=e.seriesType,l=e.getTargetSeries;function c(t){var s=t.uid,l=a.set(s,r&&r.get(s)||pv({plan:gC,reset:gD,count:gI}));l.context={model:t,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:o},o._pipe(t,l)}e.createOnAllSeries?n.eachRawSeries(c):s?n.eachRawSeriesByType(s,c):l&&l(n,i).each(c)},e.prototype._createOverallStageTask=function(e,t,n,i){var o=this,r=t.overallTask=t.overallTask||pv({reset:gE});r.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:o};var a=r.agentStubMap,s=r.agentStubMap=r1(),l=e.seriesType,c=e.getTargetSeries,d=!0,u=!1;function m(e){var t=e.uid,n=s.set(t,a&&a.get(t)||(u=!0,pv({reset:gT,onDirty:gA})));n.context={model:e,overallProgress:d},n.agent=r,n.__block=d,o._pipe(e,n)}rX(!e.createOnAllSeries,""),l?n.eachRawSeriesByType(l,m):c?c(n,i).each(m):(d=!1,rM(n.getSeries(),m)),u&&r.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,i=this._pipelineMap.get(n);i.head||(i.head=t),i.tail&&i.tail.pipe(t),i.tail=t,t.__idxInPipeline=i.count++,t.__pipeline=i},e.wrapStageHandler=function(e,t){return rR(e)&&(e={overallReset:e,seriesType:function(e){eS=null;try{e(gO,gR)}catch(e){}return eS}(e)}),e.uid=mg("stageHandler"),t&&(e.visualType=t),e},e}();function gE(e){e.overallReset(e.ecModel,e.api,e.payload)}function gT(e){return e.overallProgress&&gM}function gM(){this.agent.dirty(),this.getDownstream().dirty()}function gA(){this.agent&&this.agent.dirty()}function gC(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function gD(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=cp(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?rA(t,function(e,t){return gL(t)}):gS}var gS=gL(0);function gL(e){return function(t,n){var i=n.data,o=n.resetDefines[e];if(o&&o.dataEach)for(var r=t.start;r<t.end;r++)o.dataEach(i,r);else o&&o.progress&&o.progress(t,i)}}function gI(e){return e.data.count()}var gO={},gR={};function gY(e,t){for(var n in t.prototype)e[n]=r4}gY(gO,fO),gY(gR,fB),gO.eachSeriesByType=gO.eachRawSeriesByType=function(e){eS=e},gO.eachComponent=function(e){"series"===e.mainType&&e.subType&&(eS=e.subType)};var gP=fl.darkColor,gN=gP.background,gB=function(){return{axisLine:{lineStyle:{color:gP.axisLine}},splitLine:{lineStyle:{color:gP.axisSplitLine}},splitArea:{areaStyle:{color:[gP.backgroundTint,gP.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:gP.axisMinorSplitLine}},axisLabel:{color:gP.axisLabel},axisName:{}}},gH={label:{color:gP.secondary},itemStyle:{borderColor:gP.borderTint},dividerLineStyle:{color:gP.border}},gz={darkMode:!0,color:gP.theme,backgroundColor:gN,axisPointer:{lineStyle:{color:gP.border},crossStyle:{color:gP.borderShade},label:{color:gP.tertiary}},legend:{textStyle:{color:gP.secondary},pageTextStyle:{color:gP.tertiary}},textStyle:{color:gP.secondary},title:{textStyle:{color:gP.primary},subtextStyle:{color:gP.quaternary}},toolbox:{iconStyle:{borderColor:gP.accent50}},tooltip:{backgroundColor:gP.neutral20,defaultBorderColor:gP.border,textStyle:{color:gP.tertiary}},dataZoom:{borderColor:gP.accent10,textStyle:{color:gP.tertiary},brushStyle:{color:gP.backgroundTint},handleStyle:{color:gP.neutral00,borderColor:gP.accent20},moveHandleStyle:{color:gP.accent40},emphasis:{handleStyle:{borderColor:gP.accent50}},dataBackground:{lineStyle:{color:gP.accent30},areaStyle:{color:gP.accent20}},selectedDataBackground:{lineStyle:{color:gP.accent50},areaStyle:{color:gP.accent30}}},visualMap:{textStyle:{color:gP.secondary},handleStyle:{borderColor:gP.neutral30}},timeline:{lineStyle:{color:gP.accent10},label:{color:gP.tertiary},controlStyle:{color:gP.accent30,borderColor:gP.accent30}},calendar:{itemStyle:{color:gP.neutral00,borderColor:gP.neutral20},dayLabel:{color:gP.tertiary},monthLabel:{color:gP.secondary},yearLabel:{color:gP.secondary}},matrix:{x:gH,y:gH,backgroundColor:{borderColor:gP.axisLine},body:{itemStyle:{borderColor:gP.borderTint}}},timeAxis:gB(),logAxis:gB(),valueAxis:gB(),categoryAxis:gB(),line:{symbol:"circle"},graph:{color:gP.theme},gauge:{title:{color:gP.secondary},axisLine:{lineStyle:{color:[[1,gP.neutral05]]}},axisLabel:{color:gP.axisLabel},detail:{color:gP.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:gP.background}},radar:function(){var e=gB();return e.axisName={color:gP.axisLabel},e.axisLine.lineStyle.color=gP.neutral20,e}(),treemap:{breadcrumb:{itemStyle:{color:gP.neutral20,textStyle:{color:gP.secondary}},emphasis:{itemStyle:{color:gP.neutral30}}}},sunburst:{itemStyle:{borderColor:gP.background}},map:{itemStyle:{borderColor:gP.border,areaColor:gP.neutral10},label:{color:gP.tertiary},emphasis:{label:{color:gP.primary},itemStyle:{areaColor:gP.highlight}},select:{label:{color:gP.primary},itemStyle:{areaColor:gP.highlight}}},geo:{itemStyle:{borderColor:gP.border,areaColor:gP.neutral10},emphasis:{label:{color:gP.primary},itemStyle:{areaColor:gP.highlight}},select:{label:{color:gP.primary},itemStyle:{color:gP.highlight}}}};gz.categoryAxis.splitLine.show=!1;var gj=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},i={};if(rY(e)){var o=cO(e);t.mainType=o.main||null,t.subType=o.sub||null}else{var r=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};rM(e,function(e,o){for(var s=!1,l=0;l<r.length;l++){var c=r[l],d=o.lastIndexOf(c);if(d>0&&d===o.length-c.length){var u=o.slice(0,d);"data"!==u&&(t.mainType=u,t[c.toLowerCase()]=e,s=!0)}}a.hasOwnProperty(o)&&(n[o]=e,s=!0),s||(i[o]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:i}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,o=n.packedEvent,r=n.model,a=n.view;if(!r||!a)return!0;var s=t.cptQuery,l=t.dataQuery;return c(s,r,"mainType")&&c(s,r,"subType")&&c(s,r,"index","componentIndex")&&c(s,r,"name")&&c(s,r,"id")&&c(l,o,"name")&&c(l,o,"dataIndex")&&c(l,o,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,t.otherQuery,i,o));function c(e,t,n,i){return null==e[n]||t[i||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),gU=["symbol","symbolSize","symbolRotate","symbolOffset"],gW=gU.concat(["symbolKeepAspect"]);function gV(e,t,n,i,o){var r=e+t;n.isSilent(r)||i.eachComponent({mainType:"series",subType:"pie"},function(e){for(var t=e.seriesIndex,i=e.option.selectedMap,a=o.selected,s=0;s<a.length;s++)if(a[s].seriesIndex===t){var l=e.getData(),c=cw(l,o.fromActionPayload);n.trigger(r,{type:r,seriesId:e.id,name:rO(c)?l.getName(c[0]):l.getName(c),selected:rY(i)?i:rx({},i)})}})}function gG(e,t,n){for(var i;e&&(!t(e)||(i=e,!n));)e=e.__hostTarget||e.parent;return i}var g$=Math.round(9*Math.random()),gq="function"==typeof Object.defineProperty,gX=function(){function e(){this._id="__ec_inner_"+g$++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return gq?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return!!this.has(e)&&(delete this._guard(e)[this._id],!0)},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},e}(),gK=dJ.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,i=t.cy,o=t.width/2,r=t.height/2;e.moveTo(n,i-r),e.lineTo(n+o,i+r),e.lineTo(n-o,i+r),e.closePath()}}),gJ=dJ.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,i=t.cy,o=t.width/2,r=t.height/2;e.moveTo(n,i-r),e.lineTo(n+o,i),e.lineTo(n,i+r),e.lineTo(n-o,i),e.closePath()}}),gZ=dJ.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,i=t.y,o=t.width/5*3,r=Math.max(o,t.height),a=o/2,s=a*a/(r-a),l=i-r+a+s,c=Math.asin(s/a),d=Math.cos(c)*a,u=Math.sin(c),m=Math.cos(c),f=.6*a,p=.7*a;e.moveTo(n-d,l+s),e.arc(n,l,a,Math.PI-c,2*Math.PI+c),e.bezierCurveTo(n+d-u*f,l+s+m*f,n,i-p,n,i),e.bezierCurveTo(n,i-p,n-d+u*f,l+s+m*f,n-d,l+s),e.closePath()}}),gQ=dJ.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,i=t.width,o=t.x,r=t.y,a=i/3*2;e.moveTo(o,r),e.lineTo(o+a,r+n),e.lineTo(o,r+n/4*3),e.lineTo(o-a,r+n),e.lineTo(o,r),e.closePath()}}),g0={line:function(e,t,n,i,o){o.x1=e,o.y1=t+i/2,o.x2=e+n,o.y2=t+i/2},rect:function(e,t,n,i,o){o.x=e,o.y=t,o.width=n,o.height=i},roundRect:function(e,t,n,i,o){o.x=e,o.y=t,o.width=n,o.height=i,o.r=Math.min(n,i)/4},square:function(e,t,n,i,o){var r=Math.min(n,i);o.x=e,o.y=t,o.width=r,o.height=r},circle:function(e,t,n,i,o){o.cx=e+n/2,o.cy=t+i/2,o.r=Math.min(n,i)/2},diamond:function(e,t,n,i,o){o.cx=e+n/2,o.cy=t+i/2,o.width=n,o.height=i},pin:function(e,t,n,i,o){o.x=e+n/2,o.y=t+i/2,o.width=n,o.height=i},arrow:function(e,t,n,i,o){o.x=e+n/2,o.y=t+i/2,o.width=n,o.height=i},triangle:function(e,t,n,i,o){o.cx=e+n/2,o.cy=t+i/2,o.width=n,o.height=i}},g1={};rM({line:h6,rect:ut,roundRect:ut,square:ut,circle:hC,diamond:gJ,pin:gZ,arrow:gQ,triangle:gK},function(e,t){g1[t]=new e});var g2=dJ.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var i=lj(e,t,n),o=this.shape;return o&&"pin"===o.symbolType&&"inside"===t.position&&(i.y=n.y+.4*n.height),i},buildPath:function(e,t,n){var i=t.symbolType;if("none"!==i){var o=g1[i];o||(o=g1[i="rect"]),g0[i](t.x,t.y,t.width,t.height,o.shape),o.buildPath(e,o.shape,n)}}});function g5(e,t){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||fl.color.neutral00,n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=e:n.fill=e,this.markRedraw()}}function g3(e,t,n,i,o,r,a){var s,l=0===e.indexOf("empty");return l&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(s=0===e.indexOf("image://")?bN(e.slice(8),new a3(t,n,i,o),a?"center":"cover"):0===e.indexOf("path://")?bP(e.slice(7),{},new a3(t,n,i,o),a?"center":"cover"):new g2({shape:{symbolType:e,x:t,y:n,width:i,height:o}})).__isEmptyBrush=l,s.setColor=g5,r&&s.setColor(r),s}function g4(e){return isFinite(e)}function g6(e,t,n){for(var i,o,r,a,s,l,c,d,u,m,f="radial"===t.type?(r=Math.min(i=n.width,o=n.height),a=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r,t.global||(a=a*i+n.x,s=s*o+n.y,l*=r),a=g4(a)?a:.5,s=g4(s)?s:.5,l=l>=0&&g4(l)?l:.5,e.createRadialGradient(a,s,0,a,s,l)):(c=null==t.x?0:t.x,d=null==t.x2?1:t.x2,u=null==t.y?0:t.y,m=null==t.y2?0:t.y2,t.global||(c=c*n.width+n.x,d=d*n.width+n.x,u=u*n.height+n.y,m=m*n.height+n.y),c=g4(c)?c:0,d=g4(d)?d:1,u=g4(u)?u:0,m=g4(m)?m:0,e.createLinearGradient(c,u,d,m)),p=t.colorStops,h=0;h<p.length;h++)f.addColorStop(p[h].offset,p[h].color);return f}function g8(e){return parseInt(e,10)}function g7(e,t,n){var i=["width","height"][t],o=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=n[i]&&"auto"!==n[i])return parseFloat(n[i]);var s=document.defaultView.getComputedStyle(e);return(e[o]||g8(s[i])||g8(e.style[i]))-(g8(s[r])||0)-(g8(s[a])||0)|0}function g9(e){var t,n,i=e.style,o=i.lineDash&&i.lineWidth>0&&(t=i.lineDash,n=i.lineWidth,t&&"solid"!==t&&n>0?"dashed"===t?[4*n,2*n]:"dotted"===t?[n]:rN(t)?[t]:rO(t)?t:null:null),r=i.lineDashOffset;if(o){var a=i.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&1!==a&&(o=rA(o,function(e){return e/a}),r/=a)}return[o,r]}var _e=new dP(!0);function _t(e){var t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0}function _n(e){return"string"==typeof e&&"none"!==e}function _i(e){var t=e.fill;return null!=t&&"none"!==t}function _o(e,t){if(null!=t.fillOpacity&&1!==t.fillOpacity){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function _r(e,t){if(null!=t.strokeOpacity&&1!==t.strokeOpacity){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function _a(e,t,n){var i=cV(t.image,t.__image,n);if(c$(i)){var o=e.createPattern(i,t.repeat||"repeat");if("function"==typeof DOMMatrix&&o&&o.setTransform){var r=new DOMMatrix;r.translateSelf(t.x||0,t.y||0),r.rotateSelf(0,0,(t.rotation||0)*r6),r.scaleSelf(t.scaleX||1,t.scaleY||1),o.setTransform(r)}return o}}var _s=["shadowBlur","shadowOffsetX","shadowOffsetY"],_l=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function _c(e,t,n,i,o){var r=!1;if(!i&&t===(n=n||{}))return!1;if(i||t.opacity!==n.opacity){_m(e,o),r=!0;var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?de.opacity:a}(i||t.blend!==n.blend)&&(r||(_m(e,o),r=!0),e.globalCompositeOperation=t.blend||de.blend);for(var s=0;s<_s.length;s++){var l=_s[s];(i||t[l]!==n[l])&&(r||(_m(e,o),r=!0),e[l]=e.dpr*(t[l]||0))}return(i||t.shadowColor!==n.shadowColor)&&(r||(_m(e,o),r=!0),e.shadowColor=t.shadowColor||de.shadowColor),r}function _d(e,t,n,i,o){var r=_f(t,o.inHover),a=i?null:n&&_f(n,o.inHover)||{};if(r===a)return!1;var s=_c(e,r,a,i,o);if((i||r.fill!==a.fill)&&(s||(_m(e,o),s=!0),_n(r.fill)&&(e.fillStyle=r.fill)),(i||r.stroke!==a.stroke)&&(s||(_m(e,o),s=!0),_n(r.stroke)&&(e.strokeStyle=r.stroke)),(i||r.opacity!==a.opacity)&&(s||(_m(e,o),s=!0),e.globalAlpha=null==r.opacity?1:r.opacity),t.hasStroke()){var l=r.lineWidth/(r.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==l&&(s||(_m(e,o),s=!0),e.lineWidth=l)}for(var c=0;c<_l.length;c++){var d=_l[c],u=d[0];(i||r[u]!==a[u])&&(s||(_m(e,o),s=!0),e[u]=r[u]||d[1])}return s}function _u(e,t){var n=t.transform,i=e.dpr||1;n?e.setTransform(i*n[0],i*n[1],i*n[2],i*n[3],i*n[4],i*n[5]):e.setTransform(i,0,0,i,0,0)}function _m(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function _f(e,t){return t&&e.__hoverStyle||e.style}function _p(e,t){_h(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function _h(e,t,n,i){var o,r=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1)){t.__dirty&=-2,t.__isRendered=!1;return}var a=t.__clipPaths,s=n.prevElClipPaths,l=!1,c=!1;if(!s||function(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(a,s)){if(s&&s.length&&(_m(e,n),e.restore(),c=l=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),a&&a.length){_m(e,n),e.save();for(var d=!1,u=0;u<a.length;u++){var m=a[u];d=d||m.isZeroArea(),_u(e,m),e.beginPath(),m.buildPath(e,m.shape),e.clip()}n.allClipped=d,l=!0}n.prevElClipPaths=a}if(n.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var f=n.prevEl;f||(c=l=!0);var p=t instanceof dJ&&t.autoBatch&&(g=_i(b=t.style),_=_t(b),!(b.lineDash||!(g^_)||g&&"string"!=typeof b.fill||_&&"string"!=typeof b.stroke||b.strokePercent<1||b.strokeOpacity<1||b.fillOpacity<1));!l&&(y=f.transform,r&&y?r[0]===y[0]&&r[1]===y[1]&&r[2]===y[2]&&r[3]===y[3]&&r[4]===y[4]&&r[5]===y[5]:+(!r&&!y))?p||_m(e,n):(_m(e,n),_u(e,t));var h=_f(t,n.inHover);if(t instanceof dJ)1!==n.lastDrawType&&(c=!0,n.lastDrawType=1),_d(e,t,f,c,n),p&&(n.batchFill||n.batchStroke)||e.beginPath(),function(e,t,n,i){var o,r,a,s=_t(n),l=_i(n),c=n.strokePercent,d=c<1,u=!t.path;(!t.silent||d)&&u&&t.createPathProxy();var m=t.path||_e,f=t.__dirty;if(!i){var p=n.fill,h=n.stroke,b=l&&!!p.colorStops,g=s&&!!h.colorStops,_=l&&!!p.image,y=s&&!!h.image,v=void 0,F=void 0,x=void 0,w=void 0,k=void 0;(b||g)&&(k=t.getBoundingRect()),b&&(v=f?g6(e,p,k):t.__canvasFillGradient,t.__canvasFillGradient=v),g&&(F=f?g6(e,h,k):t.__canvasStrokeGradient,t.__canvasStrokeGradient=F),_&&(x=f||!t.__canvasFillPattern?_a(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),y&&(w=f||!t.__canvasStrokePattern?_a(e,h,t):t.__canvasStrokePattern,t.__canvasStrokePattern=w),b?e.fillStyle=v:_&&(x?e.fillStyle=x:l=!1),g?e.strokeStyle=F:y&&(w?e.strokeStyle=w:s=!1)}var E=t.getGlobalScale();m.setScale(E[0],E[1],t.segmentIgnoreThreshold),e.setLineDash&&n.lineDash&&(r=(o=g9(t))[0],a=o[1]);var T=!0;(u||4&f)&&(m.setDPR(e.dpr),d?m.setContext(null):(m.setContext(e),T=!1),m.reset(),t.buildPath(m,t.shape,i),m.toStatic(),t.pathUpdated()),T&&m.rebuildPath(e,d?c:1),r&&(e.setLineDash(r),e.lineDashOffset=a),!i&&(n.strokeFirst?(s&&_r(e,n),l&&_o(e,n)):(l&&_o(e,n),s&&_r(e,n))),r&&e.setLineDash([])}(e,t,h,p),p&&(n.batchFill=h.fill||"",n.batchStroke=h.stroke||"");else if(t instanceof dQ){3!==n.lastDrawType&&(c=!0,n.lastDrawType=3),_d(e,t,f,c,n);var b,g,_,y,v,F=h.text;if(null!=F&&(F+=""),F){e.font=h.font||ro,e.textAlign=h.textAlign,e.textBaseline=h.textBaseline;var x=void 0,w=void 0;e.setLineDash&&h.lineDash&&(x=(v=g9(t))[0],w=v[1]),x&&(e.setLineDash(x),e.lineDashOffset=w),h.strokeFirst?(_t(h)&&e.strokeText(F,h.x,h.y),_i(h)&&e.fillText(F,h.x,h.y)):(_i(h)&&e.fillText(F,h.x,h.y),_t(h)&&e.strokeText(F,h.x,h.y)),x&&e.setLineDash([])}}else t instanceof d5?(2!==n.lastDrawType&&(c=!0,n.lastDrawType=2),o=c,_c(e,_f(t,n.inHover),f&&_f(f,n.inHover),o,n),function(e,t,n){var i=t.__image=cV(n.image,t.__image,t,t.onload);if(i&&c$(i)){var o=n.x||0,r=n.y||0,a=t.getWidth(),s=t.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 c=n.sx||0,d=n.sy||0;e.drawImage(i,c,d,n.sWidth,n.sHeight,o,r,a,s)}else if(n.sx&&n.sy){var c=n.sx,d=n.sy,u=a-c,m=s-d;e.drawImage(i,c,d,u,m,o,r,a,s)}else e.drawImage(i,o,r,a,s)}}(e,t,h)):t.getTemporalDisplayables&&(4!==n.lastDrawType&&(c=!0,n.lastDrawType=4),function(e,t,n){var i,o,r=t.getDisplayables(),a=t.getTemporalDisplayables();e.save();var s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(i=t.getCursor(),o=r.length;i<o;i++){var l=r[i];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),_h(e,l,s,i===o-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),s.prevEl=l}for(var c=0,d=a.length;c<d;c++){var l=a[c];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),_h(e,l,s,c===d-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),s.prevEl=l}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}(e,t,n));p&&i&&_m(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}var _b=new gX,_g=new sP(100),__=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function _y(e,t){if("none"===e)return null;var n=t.getDevicePixelRatio(),i=t.getZr(),o="svg"===i.painter.type;e.dirty&&_b.delete(e);var r=_b.get(e);if(r)return r;var a=rw(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===a.backgroundColor&&(a.backgroundColor=null);var s={repeat:"repeat"};return function(e){for(var t,r,s=[n],l=!0,c=0;c<__.length;++c){var d=a[__[c]];if(null!=d&&!rO(d)&&!rY(d)&&!rN(d)&&"boolean"!=typeof d){l=!1;break}s.push(d)}if(l){t=s.join(",")+(o?"-svg":"");var u=_g.get(t);u&&(o?e.svgElement=u:e.image=u)}var m=function e(t){if(!t||0===t.length)return[[0,0]];if(rN(t)){var n=Math.ceil(t);return[[n,n]]}for(var i=!0,o=0;o<t.length;++o)if(!rN(t[o])){i=!1;break}if(i)return e([t]);for(var r=[],o=0;o<t.length;++o)if(rN(t[o])){var n=Math.ceil(t[o]);r.push([n,n])}else{var n=rA(t[o],function(e){return Math.ceil(e)});n.length%2==1?r.push(n.concat(n)):r.push(n)}return r}(a.dashArrayX),f=function(e){if(!e||"object"==typeof e&&0===e.length)return[0,0];if(rN(e)){var t=Math.ceil(e);return[t,t]}var n=rA(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}(a.dashArrayY),p=function e(t){if(!t||0===t.length)return[["rect"]];if(rY(t))return[[t]];for(var n=!0,i=0;i<t.length;++i)if(!rY(t[i])){n=!1;break}if(n)return e([t]);for(var o=[],i=0;i<t.length;++i)rY(t[i])?o.push([t[i]]):o.push(t[i]);return o}(a.symbol),h=rA(m,function(e){return _v(e)}),b=_v(f),g=!o&&ra.createCanvas(),_=o&&{tag:"g",attrs:{},key:"dcl",children:[]},y=function(){for(var e=1,t=0,n=h.length;t<n;++t)e=cm(e,h[t]);for(var i=1,t=0,n=p.length;t<n;++t)i=cm(i,p[t].length);e*=i;var o=b*h.length*p.length;return{width:Math.max(1,Math.min(e,a.maxTileWidth)),height:Math.max(1,Math.min(o,a.maxTileHeight))}}();g&&(g.width=y.width*n,g.height=y.height*n,r=g.getContext("2d")),function(){r&&(r.clearRect(0,0,g.width,g.height),a.backgroundColor&&(r.fillStyle=a.backgroundColor,r.fillRect(0,0,g.width,g.height)));for(var e=0,t=0;t<f.length;++t)e+=f[t];if(!(e<=0))for(var s=-b,l=0,c=0,d=0;s<y.height;){if(l%2==0){for(var u=c/2%p.length,h=0,v=0,F=0;h<2*y.width;){for(var x=0,t=0;t<m[d].length;++t)x+=m[d][t];if(x<=0)break;if(v%2==0){var w=(1-a.symbolSize)*.5,k=h+m[d][v]*w,E=s+f[l]*w,T=m[d][v]*a.symbolSize,M=f[l]*a.symbolSize,A=F/2%p[u].length;!function(e,t,s,l,c){var d=o?1:n,u=g3(c,e*d,t*d,s*d,l*d,a.color,a.symbolKeepAspect);if(o){var m=i.painter.renderOneToVNode(u);m&&_.children.push(m)}else _p(r,u)}(k,E,T,M,p[u][A])}h+=m[d][v],++F,++v===m[d].length&&(v=0)}++d===m.length&&(d=0)}s+=f[l],++c,++l===f.length&&(l=0)}}(),l&&_g.put(t,g||_),e.image=g,e.svgElement=_,e.svgWidth=y.width,e.svgHeight=y.height}(s),s.rotation=a.rotation,s.scaleX=s.scaleY=o?1:1/n,_b.set(e,s),e.dirty=!1,s}function _v(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?2*t:t}var _F=new ac,_x={},_w="__flagInMainProcess",_k="__mainProcessVersion",_E="__pendingUpdate",_T="__needsUpdateStatus",_M=/^[a-zA-Z0-9_]+$/,_A="__connectUpdateStatus";function _C(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this.isDisposed()?void this.id:_S(this,e,t)}}function _D(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return _S(this,e,t)}}function _S(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),ac.prototype[t].apply(e,n)}var _L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return rt(t,e),t}(ac),_I=_L.prototype;_I.on=_D("on"),_I.off=_D("off");var _O=function(e){function t(t,n,i){var o=e.call(this,new gj)||this;o._chartsViews=[],o._chartsMap={},o._componentsViews=[],o._componentsMap={},o._pendingActions=[],i=i||{},o._dom=t,o[_k]=1,i.ssr;var r=o._zr=l5(t,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:rV(i.useDirtyRect,!1),useCoarsePointer:rV(i.useCoarsePointer,"auto"),pointerSize:i.pointerSize});o._ssr=i.ssr,o._throttledZrFlush=gp(rL(r.flush,r),17),o._updateTheme(n),o._locale=function(e){if(!rY(e))return rF(rv(e),rv(my.EN),!1);var t=my[e.toUpperCase()]||{};return"ZH"===e||"EN"===e?rv(t):rF(rv(t),rv(my.EN),!1)}(i.locale||mF),o._coordSysMgr=new m5;var a=o._api=eG(o);function s(e,t){return e.__prio-t.__prio}return sl(_j,s),sl(_H,s),o._scheduler=new gk(o,a,_H,_j),o._messageCenter=new _L,o._initEvents(),o.resize=rL(o.resize,o),r.animation.on("frame",o._onframe,o),ez(r,o),ej(r,o),o[rJ]=!0,o}return rt(t,e),t.prototype._onframe=function(){if(!this._disposed){eX(this);var e=this._scheduler;if(this[_E]){var t=this[_E].silent;this[_w]=!0,eK(this);try{eL(this),eR.update.call(this,null,this[_E].updateParams)}catch(e){throw this[_w]=!1,this[_E]=null,e}this._zr.flush(),this[_w]=!1,this[_E]=null,eB.call(this,t),eH.call(this,t)}else if(e.unfinished){var n=1,i=this._model,o=this._api;e.unfinished=!1;do{var r=+new Date;e.performSeriesTasks(i),e.performDataProcessorTasks(i),eP(this,i),e.performVisualTasks(i),eV(this,this._model,o,"remain",{}),n-=new Date-r}while(n>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[_w]){if(this._disposed)return void this.id;if(rB(t)&&(n=t.lazyUpdate,i=t.silent,o=t.replaceMerge,r=t.transition,t=t.notMerge),this[_w]=!0,eK(this),!this._model||t){var i,o,r,a=new fz(this._api),s=this._theme,l=this._model=new fO;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(e,{replaceMerge:o},_z);var c={seriesTransition:r,optionChanged:!0};if(n)this[_E]={silent:i,updateParams:c},this[_w]=!1,this.getZr().wakeUp();else{try{eL(this),eR.update.call(this,null,c)}catch(e){throw this[_E]=null,this[_w]=!1,e}this._ssr||this._zr.flush(),this[_E]=null,this[_w]=!1,eB.call(this,i),eH.call(this,i)}}},t.prototype.setTheme=function(e,t){if(!this[_w]){if(this._disposed)return void this.id;var n=this._model;if(n){var i=t&&t.silent,o=null;this[_E]&&(null==i&&(i=this[_E].silent),o=this[_E].updateParams,this[_E]=null),this[_w]=!0,eK(this);try{this._updateTheme(e),n.setTheme(this._theme),eL(this),eR.update.call(this,{type:"setTheme"},o)}catch(e){throw this[_w]=!1,e}this[_w]=!1,eB.call(this,i),eH.call(this,i)}}},t.prototype._updateTheme=function(e){rY(e)&&(e=_U[e]),e&&((e=rv(e))&&f3(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||ri.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e=e||{},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e=e||{},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return rM(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed)return void this.id;var t=(e=e||{}).excludeComponents,n=this._model,i=[],o=this;rM(t,function(e){n.eachComponent({mainType:e},function(e){var t=o._componentsMap[e.__viewId];t.group.ignore||(i.push(t),t.group.ignore=!0)})});var r="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return rM(i,function(e){e.group.ignore=!1}),r},t.prototype.getConnectedDataURL=function(e){if(this._disposed)return void this.id;var t="svg"===e.type,n=this.group,i=Math.min,o=Math.max,r=1/0;if(!_G[n])return this.getDataURL(e);var a=r,s=r,l=-r,c=-r,d=[],u=e&&e.pixelRatio||this.getDevicePixelRatio();rM(_V,function(r,u){if(r.group===n){var m=t?r.getZr().painter.getSvgDom().innerHTML:r.renderToCanvas(rv(e)),f=r.getDom().getBoundingClientRect();a=i(f.left,a),s=i(f.top,s),l=o(f.right,l),c=o(f.bottom,c),d.push({dom:m,left:f.left,top:f.top})}}),a*=u,s*=u,l*=u,c*=u;var m=l-a,f=c-s,p=ra.createCanvas(),h=l5(p,{renderer:t?"svg":"canvas"});if(h.resize({width:m,height:f}),!t)return e.connectedBackgroundColor&&h.add(new ut({shape:{x:0,y:0,width:m,height:f},style:{fill:e.connectedBackgroundColor}})),rM(d,function(e){var t=new d5({style:{x:e.left*u-a,y:e.top*u-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),p.toDataURL("image/"+(e&&e.type||"png"));var b="";return rM(d,function(e){var t=e.left-a,n=e.top-s;b+='<g transform="translate('+t+","+n+')">'+e.dom+"</g>"}),h.painter.getSvgRoot().innerHTML=b,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()},t.prototype.convertToPixel=function(e,t,n){return eY(this,"convertToPixel",e,t,n)},t.prototype.convertToLayout=function(e,t,n){return eY(this,"convertToLayout",e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return eY(this,"convertFromPixel",e,t,n)},t.prototype.containPixel=function(e,t){var n;return this._disposed?void this.id:(rM(cT(this._model,e),function(e,i){i.indexOf("Models")>=0&&rM(e,function(e){var o=e.coordinateSystem;if(o&&o.containPoint)n=n||!!o.containPoint(t);else if("seriesModels"===i){var r=this._chartsMap[e.__viewId];r&&r.containPoint&&(n=n||r.containPoint(t,e))}},this)},this),!!n)},t.prototype.getVisual=function(e,t){var n=cT(this._model,e,{defaultMainType:"series"}),i=n.seriesModel.getData(),o=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?i.indexOfRawIndex(n.dataIndex):null;return null!=o?function(e,t,n){switch(n){case"color":return e.getItemVisual(t,"style")[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,n)}}(i,o,t):function(e,t){switch(t){case"color":return e.getVisual("style")[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t)}}(i,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e,t,n=this;rM(_Y,function(e){var t=function(t){var i,o=n.getModel(),r=t.target;if("globalout"===e?i={}:r&&gG(r,function(e){var t=ug(e);if(t&&null!=t.dataIndex){var n=t.dataModel||o.getSeriesByIndex(t.seriesIndex);return i=n&&n.getDataParams(t.dataIndex,t.dataType,r)||{},!0}if(t.eventData)return i=rx({},t.eventData),!0},!0),i){var a=i.componentType,s=i.componentIndex;("markLine"===a||"markPoint"===a||"markArea"===a)&&(a="series",s=i.seriesIndex);var l=a&&null!=s&&o.getComponent(a,s),c=l&&n["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];i.event=t,i.type=e,n._$eventProcessor.eventInfo={targetEl:r,packedEvent:i,model:l,view:c},n.trigger(e,i)}};t.zrEventfulCallAtLast=!0,n._zr.on(e,t,n)});var i=this._messageCenter;rM(_B,function(e,t){i.on(t,function(e){n.trigger(t,e)})}),e=this,t=this._api,i.on("selectchanged",function(n){var i=t.getModel();n.isFromClick?(gV("map","selectchanged",e,i,n),gV("pie","selectchanged",e,i,n)):"select"===n.fromAction?(gV("map","selected",e,i,n),gV("pie","selected",e,i,n)):"unselect"===n.fromAction&&(gV("map","unselected",e,i,n),gV("pie","unselected",e,i,n))})},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed)return void this.id;this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)return void this.id;this._disposed=!0,this.getDom()&&cS(this.getDom(),_q,"");var e=this._api,t=this._model;rM(this._componentsViews,function(n){n.dispose(t,e)}),rM(this._chartsViews,function(n){n.dispose(t,e)}),this._zr.dispose(),this._dom=this._model=this._chartsMap=this._componentsMap=this._chartsViews=this._componentsViews=this._scheduler=this._api=this._zr=this._throttledZrFlush=this._theme=this._coordSysMgr=this._messageCenter=null,delete _V[this.id]},t.prototype.resize=function(e){if(!this[_w]){if(this._disposed)return void this.id;this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),i=e&&e.silent;this[_E]&&(null==i&&(i=this[_E].silent),n=!0,this[_E]=null),this[_w]=!0,eK(this);try{n&&eL(this),eR.update.call(this,{type:"resize",animation:rx({duration:0},e&&e.animation)})}catch(e){throw this[_w]=!1,e}this[_w]=!1,eB.call(this,i),eH.call(this,i)}}},t.prototype.showLoading=function(e,t){if(this._disposed)return void this.id;if(rB(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),_W[e]){var n=_W[e](this._api,t),i=this._zr;this._loadingFX=n,i.add(n)}},t.prototype.hideLoading=function(){if(this._disposed)return void this.id;this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=rx({},e);return t.type=_N[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)return void this.id;if((rB(t)||(t={silent:!!t}),_P[e.type])&&this._model){if(this[_w])return void this._pendingActions.push(e);var n=t.silent;eN.call(this,e,n);var i=t.flush;i?this._zr.flush():!1!==i&&ri.browser.weChat&&this._throttledZrFlush(),eB.call(this,n),eH.call(this,n)}},t.prototype.updateLabelLayout=function(){_F.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)return void this.id;var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){function e(e){e.clearColorPalette(),e.eachSeries(function(e){e.clearColorPalette()})}function t(e){for(var t=[],n=e.currentStates,i=0;i<n.length;i++){var o=n[i];"emphasis"!==o&&"blur"!==o&&"select"!==o&&t.push(o)}e.selected&&e.states.select&&t.push("select"),2===e.hoverState&&e.states.emphasis?t.push("emphasis"):1===e.hoverState&&e.states.blur&&t.push("blur"),e.useStates(t)}function n(e,t){if(!e.preventAutoZ){var n=ge(e);t.eachRendered(function(e){return gn(e,n.z,n.zlevel),!0})}}function i(e,t){t.eachRendered(function(e){if(!bE(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&(e.stateTransition=null),t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&(e.prevStates=null)}})}function o(e,n){var i=e.getModel("stateAnimation"),o=e.isAnimationEnabled(),r=i.get("duration"),a=r>0?{duration:r,delay:i.get("delay"),easing:i.get("easing")}:null;n.eachRendered(function(e){if(e.states&&e.states.emphasis&&!bE(e)){if(e instanceof dJ&&((n=uF(e)).normalFill=e.style.fill,n.normalStroke=e.style.stroke,n.selectFill=(i=e.states.select||{}).style&&i.style.fill||null,n.selectStroke=i.style&&i.style.stroke||null),e.__dirty){var n,i,r=e.prevStates;r&&e.useStates(r)}if(o){e.stateTransition=a;var s=e.getTextContent(),l=e.getTextGuideLine();s&&(s.stateTransition=a),l&&(l.stateTransition=a)}e.__dirty&&t(e)}})}eL=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),eI(e,!0),eI(e,!1),t.plan()},eI=function(e,t){for(var n=e._model,i=e._scheduler,o=t?e._componentsViews:e._chartsViews,r=t?e._componentsMap:e._chartsMap,a=e._zr,s=e._api,l=0;l<o.length;l++)o[l].__alive=!1;function c(e){var l=e.__requireNewView;e.__requireNewView=!1;var c="_ec_"+e.id+"_"+e.type,d=!l&&r[c];if(!d){var u=cO(e.type);(d=new(t?ha.getClass(u.main,u.sub):gr.getClass(u.sub))).init(n,s),r[c]=d,o.push(d),a.add(d.group)}e.__viewId=d.__id=c,d.__alive=!0,d.__model=e,d.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},t||i.prepareView(d,e,n,s)}t?n.eachComponent(function(e,t){"series"!==e&&c(t)}):n.eachSeries(c);for(var l=0;l<o.length;){var d=o[l];d.__alive?l++:(t||d.renderTask.dispose(),a.remove(d.group),d.dispose(n,s),o.splice(l,1),r[d.__id]===d&&delete r[d.__id],d.__id=d.group.__ecComponentInfo=null)}},eO=function(e,t,n,i,o){var r,a=e._model;if(a.setUpdatePayload(n),!i)return void rM([].concat(e._componentsViews).concat(e._chartsViews),d);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};o&&(l.subType=o);var c=n.excludeSeriesId;function d(i){i&&i.__alive&&i[t]&&i[t](i.__model,a,e._api,n)}null!=c&&(r=r1(),rM(cp(c),function(e){var t=cv(e,null);null!=t&&r.set(t,!0)})),a&&a.eachComponent(l,function(t){if(!(r&&null!=r.get(t.id))){if(u3(n))if(t instanceof p7)n.type!==uE||n.notBlur||t.get(["emphasis","disabled"])||function(e,t,n){var i=e.seriesIndex,o=e.getData(t.dataType);if(o){var r=cw(o,t);r=(rO(r)?r[0]:r)||0;var a=o.getItemGraphicEl(r);if(!a)for(var s=o.count(),l=0;!a&&l<s;)a=o.getItemGraphicEl(l++);if(a){var c=ug(a);uq(i,c.focus,c.blurScope,n)}else{var d=e.get(["emphasis","focus"]),u=e.get(["emphasis","blurScope"]);null!=d&&uq(i,d,u,n)}}}(t,n,e._api);else{var i=uK(t.mainType,t.componentIndex,n.name,e._api),o=i.focusSelf,a=i.dispatchers;n.type===uE&&o&&!n.notBlur&&uX(t.mainType,t.componentIndex,e._api),a&&rM(a,function(e){n.type===uE?uW(e):uV(e)})}else if(u5(n)&&t instanceof p7){if(e._api,u5(n)){var s=n.dataType,l=cw(t.getData(s),n);rO(l)||(l=[l]),t[n.type===uC?"toggleSelect":n.type===uM?"select":"unselect"](l,s)}uJ(t),eq(e)}}},e),a&&a.eachComponent(l,function(t){r&&null!=r.get(t.id)||d(e["series"===i?"_chartsMap":"_componentsMap"][t.__viewId])},e)},eR={prepareAndUpdate:function(e){eL(this),eR.update.call(this,e,e&&{optionChanged:null!=e.newOption})},update:function(t,n){var i=this._model,o=this._api,r=this._zr,a=this._coordSysMgr,s=this._scheduler;if(i){i.setUpdatePayload(t),s.restoreData(i,t),s.performSeriesTasks(i),a.create(i,o),s.performDataProcessorTasks(i,t),eP(this,i),a.update(i,o),e(i),s.performVisualTasks(i,t);var l=i.get("backgroundColor")||"transparent";r.setBackgroundColor(l);var c=i.get("darkMode");null!=c&&"auto"!==c&&r.setDarkMode(c),eU(this,i,o,t,n),_F.trigger("afterupdate",i,o)}},updateTransform:function(t){var n=this,i=this._model,o=this._api;if(i){i.setUpdatePayload(t);var r=[];i.eachComponent(function(e,a){if("series"!==e){var s=n.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,i,o,t);l&&l.update&&r.push(s)}else r.push(s)}});var a=r1();i.eachSeries(function(e){var r=n._chartsMap[e.__viewId];if(r.updateTransform){var s=r.updateTransform(e,i,o,t);s&&s.update&&a.set(e.uid,1)}else a.set(e.uid,1)}),e(i),this._scheduler.performVisualTasks(i,t,{setDirty:!0,dirtyMap:a}),eV(this,i,o,t,{},a),_F.trigger("afterupdate",i,o)}},updateView:function(t){var n=this._model;n&&(n.setUpdatePayload(t),gr.markUpdateMethod(t,"updateView"),e(n),this._scheduler.performVisualTasks(n,t,{setDirty:!0}),eU(this,n,this._api,t,{}),_F.trigger("afterupdate",n,this._api))},updateVisual:function(t){var n=this,i=this._model;i&&(i.setUpdatePayload(t),i.eachSeries(function(e){e.getData().clearAllVisual()}),gr.markUpdateMethod(t,"updateVisual"),e(i),this._scheduler.performVisualTasks(i,t,{visualType:"visual",setDirty:!0}),i.eachComponent(function(e,o){if("series"!==e){var r=n.getViewOfComponentModel(o);r&&r.__alive&&r.updateVisual(o,i,n._api,t)}}),i.eachSeries(function(e){n._chartsMap[e.__viewId].updateVisual(e,i,n._api,t)}),_F.trigger("afterupdate",i,this._api))},updateLayout:function(e){eR.update.call(this,e)}},eY=function(e,t,n,i,o){if(e._disposed)return void e.id;for(var r,a=e._model,s=e._coordSysMgr.getCoordinateSystems(),l=cT(a,n),c=0;c<s.length;c++){var d=s[c];if(d[t]&&null!=(r=d[t](a,l,i,o)))return r}},eP=function(e,t){var n=e._chartsMap,i=e._scheduler;t.eachSeries(function(e){i.updateStreamModes(e,n[e.__viewId])})},eN=function(e,t){var n,i=this,o=this.getModel(),r=e.type,a=e.escapeConnect,s=_P[r],l=(s.update||"update").split(":"),c=l.pop(),d=null!=l[0]&&cO(l[0]);this[_w]=!0,eK(this);var u=[e],m=!1;e.batch&&(m=!0,u=rA(e.batch,function(t){return(t=rw(rx({},t),e)).batch=null,t}));var f=[],p=[],h=s.nonRefinedEventType,b=u5(e),g=u3(e);if(g&&u$(this._api),rM(u,function(t){var r=s.action(t,o,i._api);if(s.refineEvent?p.push(r):n=r,(n=n||rx({},t)).type=h,f.push(n),g){var a=cM(e),l=a.queryOptionMap;eO(i,c,t,a.mainTypeSpecified?l.keys()[0]:"series"),eq(i)}else b?(eO(i,c,t,"series"),eq(i)):d&&eO(i,c,t,d.main,d.sub)}),"none"!==c&&!g&&!b&&!d)try{this[_E]?(eL(this),eR.update.call(this,e),this[_E]=null):eR[c].call(this,e)}catch(e){throw this[_w]=!1,e}if(n=m?{type:h,escapeConnect:a,batch:f}:f[0],this[_w]=!1,!t){var _=void 0;if(s.refineEvent){var y=s.refineEvent(p,e,o,this._api).eventContent;rX(rB(y)),(_=rw({type:s.refinedEventType},y)).fromAction=e.type,_.fromActionPayload=e,_.escapeConnect=!0}var v=this._messageCenter;v.trigger(n.type,n),_&&v.trigger(_.type,_)}},eB=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();eN.call(this,n,e)}},eH=function(e){e||this.trigger("updated")},ez=function(e,t){e.on("rendered",function(n){t.trigger("rendered",n),!e.animation.isFinished()||t[_E]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")})},ej=function(e,t){e.on("mouseover",function(e){var n,i,o,r,a,s=gG(e.target,u2);s&&(n=t._api,r=(o=uK((i=ug(s)).componentMainType,i.componentIndex,i.componentHighDownName,n)).dispatchers,a=o.focusSelf,r?(a&&uX(i.componentMainType,i.componentIndex,n),rM(r,function(t){return uj(t,e)})):(uq(i.seriesIndex,i.focus,i.blurScope,n),"self"===i.focus&&uX(i.componentMainType,i.componentIndex,n),uj(s,e)),eq(t))}).on("mouseout",function(e){var n,i,o,r=gG(e.target,u2);r&&(u$(n=t._api),(o=uK((i=ug(r)).componentMainType,i.componentIndex,i.componentHighDownName,n).dispatchers)?rM(o,function(t){return uU(t,e)}):uU(r,e),eq(t))}).on("click",function(e){var n=gG(e.target,function(e){return null!=ug(e).dataIndex},!0);if(n){var i=n.selected?"unselect":"select",o=ug(n);t._api.dispatchAction({type:i,dataType:o.dataType,dataIndexInside:o.dataIndex,seriesIndex:o.seriesIndex,isFromClick:!0})}})},eU=function(e,t,n,i,o){!function(e){var t=[],n=[],i=!1;if(e.eachComponent(function(e,o){var r=o.get("zlevel")||0,a=o.get("z")||0,s=o.getZLevelKey();i=i||!!s,("series"===e?n:t).push({zlevel:r,z:a,idx:o.componentIndex,type:e,key:s})}),i){var o,r,a=t.concat(n);sl(a,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),rM(a,function(t){var n=e.getComponent(t.type,t.idx),i=t.zlevel,a=t.key;null!=o&&(i=Math.max(o,i)),a?(i===o&&a!==r&&i++,r=a):r&&(i===o&&i++,r=""),o=i,n.setZLevel(i)})}}(t),eW(e,t,n,i,o),rM(e._chartsViews,function(e){e.__alive=!1}),eV(e,t,n,i,o),rM(e._chartsViews,function(e){e.__alive||e.remove(t,n)})},eW=function(e,t,r,a,s,l){rM(l||e._componentsViews,function(e){var s=e.__model;i(s,e),e.render(s,t,r,a),n(s,e),o(s,e)})},eV=function(e,t,r,a,s,l){var c,d,u,m,f=e._scheduler;s=rx(s||{},{updatedSeries:t.getSeries()}),_F.trigger("series:beforeupdate",t,r,s);var p=!1;t.eachSeries(function(t){var n,o,r,s=e._chartsMap[t.__viewId];s.__alive=!0;var c=s.renderTask;f.updatePayload(c,a),i(t,s),l&&l.get(t.uid)&&c.dirty(),c.perform(f.getPerformArgs(c))&&(p=!0),s.group.silent=!!t.get("silent"),n=t,o=s,r=n.get("blendMode")||null,o.eachRendered(function(e){e.isGroup||(e.style.blend=r)}),uJ(t)}),f.unfinished=p||f.unfinished,_F.trigger("series:layoutlabels",t,r,s),_F.trigger("series:transition",t,r,s),t.eachSeries(function(t){var i=e._chartsMap[t.__viewId];n(t,i),o(t,i)}),c=e,d=t,u=c._zr.storage,m=0,u.traverse(function(e){!e.isGroup&&m++}),!(m>d.get("hoverLayerThreshold"))||ri.node||ri.worker||d.eachSeries(function(e){if(!e.preventUsingHoverLayer){var t=c._chartsMap[e.__viewId];t.__alive&&t.eachRendered(function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)})}}),_F.trigger("series:afterupdate",t,r,s)},eq=function(e){e[_T]=!0,e.getZr().wakeUp()},eK=function(e){e[_k]=(e[_k]+1)%1e3},eX=function(e){e[_T]&&(e.getZr().storage.traverse(function(e){bE(e)||t(e)}),e[_T]=!1)},eG=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return rt(n,t),n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(null!=n)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){uW(t,n),eq(e)},n.prototype.leaveEmphasis=function(t,n){uV(t,n),eq(e)},n.prototype.enterBlur=function(t){uB(t,uR),eq(e)},n.prototype.leaveBlur=function(t){uB(t,uY),eq(e)},n.prototype.enterSelect=function(t){uB(t,uP),eq(e)},n.prototype.leaveSelect=function(t){uB(t,uN),eq(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getMainProcessVersion=function(){return e[_k]},n}(fB))(e)},e$=function(e){function t(e,t){for(var n=0;n<e.length;n++)e[n][_A]=t}rM(_N,function(n,i){e._messageCenter.on(i,function(n){if(_G[e.group]&&0!==e[_A]&&(!n||!n.escapeConnect)){var i=e.makeActionFromEvent(n),o=[];rM(_V,function(t){t!==e&&t.group===e.group&&o.push(t)}),t(o,0),rM(o,function(e){1!==e[_A]&&e.dispatchAction(i)}),t(o,2)}})})}}(),t}(ac),_R=_O.prototype;_R.on=_C("on"),_R.off=_C("off"),_R.one=function(e,t,n){var i=this;this.on.call(this,e,function n(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];t&&t.apply&&t.apply(this,o),i.off(e,n)},n)};var _Y=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"],_P={},_N={},_B={},_H=[],_z=[],_j=[],_U={},_W={},_V={},_G={},_$=new Date-0,_q="_echarts_instance_";function _X(e){0>rk(_z,e)&&_z.push(e)}function _K(e,t){_1(_H,e,t,2e3)}function _J(e,t){_F.on(e,t)}function _Z(e,t,n){function i(e){return e.toLowerCase()}rR(t)&&(n=t,t=""),rB(e)?(o=e.type,l=e.event,a=e.update,s=e.publishNonRefinedEvent,n||(n=e.action),r=e.refineEvent):(o=e,l=t);var o,r,a,s,l=i(l||o),c=r?i(o):l;_P[o]||(rX(_M.test(o)&&_M.test(l)),r&&rX(l!==o),_P[o]={actionType:o,refinedEventType:l,nonRefinedEventType:c,update:a,action:n,refineEvent:r},_B[l]=1,r&&s&&(_B[c]=1),_N[c]=o)}function _Q(e,t){_1(_j,e,t,3e3,"visual")}var _0=[];function _1(e,t,n,i,o){if((rR(t)||rB(t))&&(n=t,t=i),!(rk(_0,n)>=0)){_0.push(n);var r=gk.wrapStageHandler(n,o);r.__prio=t,r.__raw=n,e.push(r)}}function _2(e,t,n,i){var o;return{eventContent:{selected:(o=[],n.eachSeries(function(e){rM(e.getAllData(),function(t){t.data;var n=t.type,i=e.getSelectedDataIndices();if(i.length>0){var r={dataIndex:i,seriesIndex:e.seriesIndex};null!=n&&(r.dataType=n),o.push(r)}})}),o),isFromClick:t.isFromClick||!1}}}_Q(2e3,{createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),i=e.visualStyleAccessPath||"itemStyle",o=e.getModel(i),r=gv(e,i)(o),a=o.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=gF(e,i),l=r[s],c=rR(l)?l:null,d="auto"===r.fill||"auto"===r.stroke;if(!r[s]||c||d){var u=e.getColorFromPalette(e.name,null,t.getSeriesCount());r[s]||(r[s]=u,n.setVisual("colorFromPalette",!0)),r.fill="auto"===r.fill||rR(r.fill)?u:r.fill,r.stroke="auto"===r.stroke||rR(r.stroke)?u:r.stroke}if(n.setVisual("style",r),n.setVisual("drawType",s),!t.isSeriesFiltered(e)&&c)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var i=e.getDataParams(n),o=rx({},r);o[s]=c(i),t.setItemVisual(n,"style",o)}}}}),_Q(4500,{createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var n=e.getData(),i=e.visualStyleAccessPath||"itemStyle",o=gv(e,i),r=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[i]){gx.option=n[i];var a=o(gx);rx(e.ensureUniqueItemVisual(t,"style"),a),gx.option.decal&&(e.setItemVisual(t,"decal",gx.option.decal),gx.option.decal.dirty=!0),r in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}}),_Q(4500,{performRawSeries:!0,overallReset:function(e){var t=r1();e.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var i=e.type+"-"+n,o=t.get(i);o||(o={},t.set(i,o)),gg(e).scope=o}}),e.eachSeries(function(t){if(!(t.isColorBySeries()||e.isSeriesFiltered(t))){var n=t.getRawData(),i={},o=t.getData(),r=gg(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=gF(t,a);o.each(function(e){i[o.getRawIndex(e)]=e}),n.each(function(e){var a=i[e];if(o.getItemVisual(a,"colorFromPalette")){var l=o.ensureUniqueItemVisual(a,"style"),c=n.getName(e)||e+"",d=n.count();l[s]=t.getColorFromPalette(c,r,d)}})}})}}),_Q(2e3,{createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var i={},o={},r=!1,a=0;a<gU.length;a++){var s=gU[a],l=e.get(s);rR(l)?(r=!0,o[s]=l):i[s]=l}if(i.symbol=i.symbol||e.defaultSymbol,n.setVisual(rx({legendIcon:e.legendIcon||i.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},i)),!t.isSeriesFiltered(e)){var c=rS(o);return{dataEach:r?function(t,n){for(var i=e.getRawValue(n),r=e.getDataParams(n),a=0;a<c.length;a++){var s=c[a];t.setItemVisual(n,s,o[s](i,r))}}:null}}}}}),_Q(4500,{createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(e.hasSymbolVisual&&!t.isSeriesFiltered(e))return{dataEach:e.getData().hasItemOption?function(e,t){for(var n=e.getItemModel(t),i=0;i<gW.length;i++){var o=gW[i],r=n.getShallow(o,!0);null!=r&&e.setItemVisual(t,o,r)}}:null}}}),_Q(7e3,function(e,t){e.eachRawSeries(function(n){if(!e.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each(function(e){var n=i.getItemVisual(e,"decal");n&&(i.ensureUniqueItemVisual(e,"style").decal=_y(n,t))});var o=i.getVisual("decal");o&&(i.getVisual("style").decal=_y(o,t))}})}),_X(f3),_K(900,function(e){var t=r1();e.eachSeries(function(e){var n=e.get("stack");if(n){var i=t.get(n)||t.set(n,[]),o=e.getData(),r={stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:e};if(!r.stackedDimension||!(r.isStackedByIndex||r.stackedByDimension))return;i.push(r)}}),t.each(function(e){var t;0!==e.length&&("seriesDesc"===(e[0].seriesModel.get("stackOrder")||"seriesAsc")&&e.reverse(),rM(e,function(t,n){t.data.setCalculationInfo("stackedOnSeries",n>0?e[n-1].seriesModel:null)}),rM(t=e,function(e,n){var i=[],o=[NaN,NaN],r=[e.stackResultDimension,e.stackedOverDimension],a=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";a.modify(r,function(r,c,d){var u,m,f=a.get(e.stackedDimension,d);if(isNaN(f))return o;s?m=a.getRawIndex(d):u=a.get(e.stackedByDimension,d);for(var p=NaN,h=n-1;h>=0;h--){var b=t[h];if(s||(m=b.data.rawIndexOf(b.stackedByDimension,u)),m>=0){var g=b.data.getByRawIndex(b.stackResultDimension,m);if("all"===l||"positive"===l&&g>0||"negative"===l&&g<0||"samesign"===l&&f>=0&&g>0||"samesign"===l&&f<=0&&g<0){f=function(e,t){var n=Math.max(cn(e),cn(t)),i=e+t;return n>20?i:ce(i,n)}(f,g),p=g;break}}}return i[0]=f,i[1]=p,i})}))})}),_W.default=function(e,t){rw(t=t||{},{text:"loading",textColor:fl.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:fl.color.theme["0"],spinnerRadius:10,lineWidth:5,zlevel:0});var n,i=new lQ,o=new ut({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});i.add(o);var r=new ub({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new ut({style:{fill:"none"},textContent:r,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return i.add(a),t.showSpinner&&((n=new bo({shape:{startAngle:-gw/2,endAngle:-gw/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*gw/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*gw/2}).delay(300).start("circularInOut"),i.add(n)),i.resize=function(){var i=r.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&i?10:0)-i)/2-(t.showSpinner&&i?0:5+i/2)+(t.showSpinner?0:i/2)+(i?0:s),c=e.getHeight()/2;t.showSpinner&&n.setShape({cx:l,cy:c}),a.setShape({x:l-s,y:c-s,width:2*s,height:2*s}),o.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},i.resize(),i},_Z({type:uE,event:uE,update:uE},r4),_Z({type:uT,event:uT,update:uT},r4),_Z({type:uM,event:uD,update:uM,action:r4,refineEvent:_2,publishNonRefinedEvent:!0}),_Z({type:uA,event:uD,update:uA,action:r4,refineEvent:_2,publishNonRefinedEvent:!0}),_Z({type:uC,event:uD,update:uC,action:r4,refineEvent:_2,publishNonRefinedEvent:!0}),_U.default={},_U.dark=gz;var _5={},_3=[],_4={registerPreprocessor:_X,registerProcessor:_K,registerPostInit:function(e){_J("afterinit",e)},registerPostUpdate:function(e){_J("afterupdate",e)},registerUpdateLifecycle:_J,registerAction:_Z,registerCoordinateSystem:function(e,t){m5.register(e,t)},registerLayout:function(e,t){_1(_j,e,t,1e3,"layout")},registerVisual:_Q,registerTransform:function(e){var t=(e=rv(e)).type;t||pa("");var n=t.split(":");2!==n.length&&pa("");var i=!1;"echarts"===n[0]&&(t=n[1],i=!0),e.__isBuiltIn=i,pS.set(t,e)},registerLoading:function(e,t){_W[e]=t},registerMap:function(e,t,n){var i=_x.registerMap;i&&i(e,t,n)},registerImpl:function(e,t){_x[e]=t},PRIORITY:{PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:4500,ARIA:6e3,DECAL:7e3}},ComponentModel:fs,ComponentView:ha,SeriesModel:p7,ChartView:gr,registerComponentModel:function(e){fs.registerClass(e)},registerComponentView:function(e){ha.registerClass(e)},registerSeriesModel:function(e){p7.registerClass(e)},registerChartView:function(e){gr.registerClass(e)},registerCustomSeries:function(e,t){_5[e]=t},registerSubTypeDefaulter:function(e,t){fs.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){l0[e]=t}};function _6(e){if(rO(e))return void rM(e,function(e){_6(e)});rk(_3,e)>=0||(_3.push(e),rR(e)&&(e={install:e}),e.install(_4))}var _8={left:0,right:0,top:0,bottom:0},_7=["25%","25%"],_9=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return rt(t,e),t.prototype.mergeDefaultAndTheme=function(t,n){var i=fr(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&t.outerBounds&&fo(t.outerBounds,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&fo(this.option.outerBounds,t.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:_8,outerBoundsContain:"all",outerBoundsClampWidth:"25%",outerBoundsClampHeight:"25%",backgroundColor:fl.color.transparent,borderWidth:1,borderColor:fl.color.neutral30},t}(fs),ye=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),yt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return rt(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",cA).models[0]},t.type="cartesian2dAxis",t}(fs);rE(yt,ye);var yn={show:!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:fl.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},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,color:fl.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:fl.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[fl.color.backgroundTint,fl.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:fl.color.neutral00,borderColor:fl.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},yi=rF({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},yn),yo=rF({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:fl.color.axisMinorSplitLine,width:1}}},yn),yr=rF({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},yo),ya=rw({logBase:10},yo);let ys={category:yi,value:yo,time:yr,log:ya};var yl=0,yc=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++yl,this._onCollect=e.onCollect}return e.createByAxisModel=function(t){var n=t.option,i=n.data,o=i&&rA(i,yd);return new e({categories:o,needCollect:!o,deduplication:!1!==n.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!rY(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var i=this._getOrCreateMap();return null==(t=i.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,i.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=r1(this.categories))},e}();function yd(e){return rB(e)&&null!=e.value?e.value:e+""}var yu={value:1,category:1,time:1,log:1};function ym(e,t,n,i){rM(yu,function(o,r){var a=rF(rF({},ys[r],!0),i,!0),s=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t+"Axis."+r,n}return rt(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=fi(this),i=n?fr(e):{};rF(e,t.getTheme().get(r+"Axis")),rF(e,this.getDefaultOption()),e.type=yf(e),n&&fo(e,i,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=yc.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){return{breaks:[]}},n.type=t+"Axis."+r,n.defaultOption=a,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",yf)}function yf(e){return e.type||(e.data?"category":"value")}function yp(e){return"interval"===e.type||"log"===e.type}function yh(e){var t=Math.pow(10,cl(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,ce(n*t)}function yb(e){return cn(e)+2}function yg(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function y_(e,t){return e>=t[0]&&e<=t[1]}var yy=function(){function e(){this.normalize=yv,this.scale=yF}return e.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=rL(e.normalize,e),this.scale=rL(e.scale,e)):(this.normalize=yv,this.scale=yF)},e}();function yv(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function yF(e,t){return e*(t[1]-t[0])+t[0]}function yx(e,t,n){var i=Math.log(e);return[Math.log(n?t[0]:Math.max(0,t[0]))/i,Math.log(n?t[1]:Math.max(0,t[1]))/i]}var yw=function(){function e(e){this._calculator=new yy,this._setting=e||{},this._extent=[1/0,-1/0];var t=mw();t&&(this._brkCtx=t.createScaleBreakContext(),this._brkCtx.update(this._extent))}return e.prototype.getSetting=function(e){return this._setting[e]},e.prototype._innerUnionExtent=function(e){var t=this._extent;this._innerSetExtent(e[0]<t[0]?e[0]:t[0],e[1]>t[1]?e[1]:t[1])},e.prototype.unionExtentFromData=function(e,t){this._innerUnionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){this._innerSetExtent(e,t)},e.prototype._innerSetExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t),this._brkCtx&&this._brkCtx.update(n)},e.prototype.setBreaksFromOption=function(e){var t=mw();t&&this._innerSetBreak(t.parseAxisBreakOption(e,rL(this.parse,this)))},e.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},e.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.hasBreaks=function(){return!!this._brkCtx&&this._brkCtx.hasBreaks()},e.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();cH(yw);var yk=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new yc({})),rO(i)&&(i=new yc({categories:rA(i,function(e){return rB(e)?e.value:e})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return rt(t,e),t.prototype.parse=function(e){return null==e?NaN:rY(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return y_(e,this._extent)&&e>=0&&e<this._ordinalMeta.categories.length},t.prototype.normalize=function(e){return e=this._getTickNumber(e),this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(this._calculator.scale(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null==e){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,r=this._ordinalMeta.categories.length,a=Math.min(r,t.length);o<a;++o){var s=t[o];n[o]=s,i[s]=o}for(var l=0;o<r;++o){for(;null!=i[l];)l++;n.push(l),i[l]=o}},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return null==n?"":n+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(yw);yw.registerClass(yk);var yE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return rt(t,e),t.prototype.parse=function(e){return null==e||""===e?NaN:Number(e)},t.prototype.contain=function(e){return y_(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=yb(e)},t.prototype.getTicks=function(e){e=e||{};var t=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,r=mw(),a=[];if(!t)return a;if("only_break"===e.breakTicks&&r)return r.addBreaksToTicks(a,this._brkCtx.breaks,this._extent),a;n[0]<i[0]&&(e.expandToNicedExtent?a.push({value:ce(i[0]-t,o)}):a.push({value:n[0]}));for(var s=function(e,n){return Math.round((n-e)/t)},l=i[0];l<=i[1];){if(a.push({value:l}),l=ce(l+t,o),this._brkCtx){var c=this._brkCtx.calcNiceTickMultiple(l,s);c>=0&&(l=ce(l+c*t,o))}if(a.length>0&&l===a[a.length-1].value)break;if(a.length>1e4)return[]}var d=a.length?a[a.length-1].value:i[1];return n[1]>d&&(e.expandToNicedExtent?a.push({value:ce(d+t,o)}):a.push({value:n[1]})),r&&r.pruneTicksByBreak(e.pruneByBreak,a,this._brkCtx.breaks,function(e){return e.value},this._interval,this._extent),"none"!==e.breakTicks&&r&&r.addBreaksToTicks(a,this._brkCtx.breaks,this._extent),a},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks({expandToNicedExtent:!0}),n=[],i=this.getExtent(),o=1;o<t.length;o++){var r=t[o],a=t[o-1];if(!a.break&&!r.break){for(var s=0,l=[],c=(r.value-a.value)/e,d=yb(c);s<e-1;){var u=ce(a.value+(s+1)*c,d);u>i[0]&&u<i[1]&&l.push(u),s++}var m=mw();m&&m.pruneTicksByBreak("auto",l,this._getNonTransBreaks(),function(e){return e},this._interval,i),n.push(l)}}return n},t.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.getLabel=function(e,t){if(null==e)return"";var n=t&&t.precision;return null==n?n=cn(e.value)||0:"auto"===n&&(n=this._intervalPrecision),mq(ce(e.value,n,!0))},t.prototype.calcNiceTicks=function(e,t,n){e=e||5;var i=this._extent.slice(),o=this._getExtentSpanWithBreaks();if(isFinite(o)){o<0&&(o=-o,i.reverse(),this._innerSetExtent(i[0],i[1]),i=this._extent.slice());var r,a,s,l,c,d,u,m,f=(s=i,l=o,c=e,u=(d={}).interval=cc(l/c,!0),null!=t&&u<t&&(u=d.interval=t),null!=n&&u>n&&(u=d.interval=n),m=d.intervalPrecision=yb(u),r=d.niceTickExtent=[ce(Math.ceil(s[0]/u)*u,m),ce(Math.floor(s[1]/u)*u,m)],a=s,isFinite(r[0])||(r[0]=a[0]),isFinite(r[1])||(r[1]=a[1]),yg(r,0,a),yg(r,1,a),r[0]>r[1]&&(r[0]=r[1]),d);this._intervalPrecision=f.intervalPrecision,this._interval=f.interval,this._niceExtent=f.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var t=this._extent.slice();if(t[0]===t[1])if(0!==t[0]){var n=Math.abs(t[0]);e.fixMax||(t[1]+=n/2),t[0]-=n/2}else t[1]=1;isFinite(t[1]-t[0])||(t[0]=0,t[1]=1),this._innerSetExtent(t[0],t[1]),t=this._extent.slice(),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var i=this._interval,o=this._intervalPrecision;e.fixMin||(t[0]=ce(Math.floor(t[0]/i)*i,o)),e.fixMax||(t[1]=ce(Math.ceil(t[1]/i)*i,o)),this._innerSetExtent(t[0],t[1])},t.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},t.type="interval",t}(yw);yw.registerClass(yE);var yT=ck(),yM={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},yA=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=yS(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return rV(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=pn(this.source),n=!(e>30),i="",o=[],r=0,a=0;r<e;r++){var s=void 0,l=void 0,c=void 0,d=this.dimensions[a];if(d&&d.storeDimIndex===r)s=t?d.name:null,l=d.type,c=d.ordinalMeta,a++;else{var u=this.getSourceDimension(r);u&&(s=t?u.name:null,l=u.type)}o.push({property:s,type:l,ordinalMeta:c}),!t||null==s||d&&d.isCalculationCoord||(i+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),i+="$",i+=yM[l]||"f",c&&(i+=c.uid),i+="$"}var m=this.source;return{dimensions:o,hash:[m.seriesLayoutBy,m.startIndex,i].join("$$")}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var i=void 0,o=this.dimensions[n];if(o&&o.storeDimIndex===t)o.isCalculationCoord||(i=o.name),n++;else{var r=this.getSourceDimension(t);r&&(i=r.name)}e.push(i)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function yC(e){return e instanceof yA}function yD(e){for(var t=r1(),n=0;n<(e||[]).length;n++){var i=e[n],o=rB(i)?i.name:i;null!=o&&null==t.get(o)&&t.set(o,n)}return t}function yS(e){var t=yT(e);return t.dimNameMap||(t.dimNameMap=yD(e.dimensionsDefine))}function yL(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}var yI="undefined"!=typeof Float32Array,yO=yI?Float32Array:Array;function yR(e){return rO(e)?yI?new Float32Array(e):e:new yO(e)}function yY(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function yP(e){return e.dim+e.index}function yN(e,t){var n=[];return t.eachSeriesByType(e,function(e){yz(e)&&n.push(e)}),n}function yB(e){var t,n,i=function(e){var t={};rM(e,function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var i=e.getData(),o=n.dim+"_"+n.index,r=i.getDimensionIndex(i.mapDimension(n.dim)),a=i.getStore(),s=0,l=a.count();s<l;++s){var c=a.get(r,s);t[o]?t[o].push(c):t[o]=[c]}});var n={};for(var i in t)if(t.hasOwnProperty(i)){var o=t[i];if(o){o.sort(function(e,t){return e-t});for(var r=null,a=1;a<o.length;++a){var s=o[a]-o[a-1];s>0&&(r=null===r?s:Math.min(r,s))}n[i]=r}}return n}(e),o=[];return rM(e,function(e){var t,n=e.coordinateSystem.getBaseAxis(),r=n.getExtent();if("category"===n.type)t=n.getBandWidth();else if("value"===n.type||"time"===n.type){var a=i[n.dim+"_"+n.index],s=Math.abs(r[1]-r[0]),l=n.scale.getExtent(),c=Math.abs(l[1]-l[0]);t=a?s/c*a:s}else{var d=e.getData();t=Math.abs(r[1]-r[0])/d.count()}var u=l7(e.get("barWidth"),t),m=l7(e.get("barMaxWidth"),t),f=l7(e.get("barMinWidth")||(yj(e)?.5:1),t),p=e.get("barGap"),h=e.get("barCategoryGap"),b=e.get("defaultBarGap");o.push({bandWidth:t,barWidth:u,barMaxWidth:m,barMinWidth:f,barGap:p,barCategoryGap:h,defaultBarGap:b,axisKey:yP(n),stackId:yY(e)})}),t={},rM(o,function(e,n){var i=e.axisKey,o=e.bandWidth,r=t[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:e.defaultBarGap||0,stacks:{}},a=r.stacks;t[i]=r;var s=e.stackId;!a[s]&&r.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(r.remainedWidth,l),r.remainedWidth-=l);var c=e.barMaxWidth;c&&(a[s].maxWidth=c);var d=e.barMinWidth;d&&(a[s].minWidth=d);var u=e.barGap;null!=u&&(r.gap=u);var m=e.barCategoryGap;null!=m&&(r.categoryGap=m)}),n={},rM(t,function(e,t){n[t]={};var i,o=e.stacks,r=e.bandWidth,a=e.categoryGap;null==a&&(a=Math.max(35-4*rS(o).length,15)+"%");var s=l7(a,r),l=l7(e.gap,1),c=e.remainedWidth,d=e.autoWidthCount,u=(c-s)/(d+(d-1)*l);u=Math.max(u,0),rM(o,function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){var i=e.width;t&&(i=Math.min(i,t)),n&&(i=Math.max(i,n)),e.width=i,c-=i+l*i,d--}else{var i=u;t&&t<i&&(i=Math.min(t,c)),n&&n>i&&(i=n),i!==u&&(e.width=i,c-=i+l*i,d--)}}),u=Math.max(u=(c-s)/(d+(d-1)*l),0);var m=0;rM(o,function(e,t){e.width||(e.width=u),i=e,m+=e.width*(1+l)}),i&&(m-=i.width*l);var f=-m/2;rM(o,function(e,i){n[t][i]=n[t][i]||{bandWidth:r,offset:f,width:e.width},f+=e.width*(1+l)})}),n}function yH(e,t){var n=yN(e,t),i=yB(n);rM(n,function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),o=yY(e),r=i[yP(n)][o],a=r.offset,s=r.width;t.setLayout({bandWidth:r.bandWidth,offset:a,size:s})})}function yz(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function yj(e){return e.pipelineContext&&e.pipelineContext.large}var yU=function(e,t,n,i){for(;n<i;){var o=n+i>>>1;e[o][1]<t?n=o+1:i=o}return n},yW=function(e){function t(t){var n=e.call(this,t)||this;return n.type="time",n}return rt(t,e),t.prototype.getLabel=function(e){var t=this.getSetting("useUTC");return mL(e.value,mM[function(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(mS(this._minLevelUnit))]||mM.second,t,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,t,n){var i=this.getSetting("useUTC");return function(e,t,n,i,o){var r=null;if(rY(n))r=n;else if(rR(n)){var a={time:e.time,level:e.time.level},s=mw();s&&s.makeAxisLabelFormatterParamBreak(a,e.break),r=n(e.value,t,a)}else{var l=e.time;if(l){var c=n[l.lowerTimeUnit][l.upperTimeUnit];r=c[Math.min(l.level,c.length-1)]||""}else{var d=mI(e.value,o);r=n[d][d][0]}}return mL(new Date(e.value),r,o,i)}(e,t,n,this.getSetting("locale"),i)},t.prototype.getTicks=function(e){e=e||{};var t=this._interval,n=this._extent,i=mw(),o=[];if(!t)return o;var r=this.getSetting("useUTC");if(i&&"only_break"===e.breakTicks)return mw().addBreaksToTicks(o,this._brkCtx.breaks,this._extent),o;var a=mI(n[1],r);o.push({value:n[0],time:{level:0,upperTimeUnit:a,lowerTimeUnit:a}});var s=function(e,t,n,i,o,r){for(var a=0,s=[],l=[],c=0,d=0,u=0;u<mC.length;++u){var m,f=mS(mC[u]);if((m=mC[u])===mS(m)&&(!function(e,o,s){var l=[],c=!o.length;if(!yG(mS(e),i[0],i[1],n)){c&&(o=[{value:(f=i[0],p=Math.max(0,rk(mA,e)-1),mO(new Date(f),mA[p],n).getTime())},{value:i[1]}]);for(var d=0;d<o.length-1;d++){var u=o[d].value,m=o[d+1].value;if(u!==m){var f,p,h,b,g,_=void 0,y=void 0,v=void 0;switch(e){case"year":_=Math.max(1,Math.round(t/864e5/365)),y=mR(n),v=n?"setUTCFullYear":"setFullYear";break;case"half-year":case"quarter":case"month":_=(h=t/2592e6)>6?6:h>3?3:h>2?2:1,y=mY(n),v=mj(n);break;case"week":case"half-week":case"day":_=(b=t/864e5)>16?16:b>7.5?7:b>3.5?4:b>1.5?2:1,y=mP(n),v=mU(n);break;case"half-day":case"quarter-day":case"hour":_=(g=t/36e5)>12?12:g>6?6:g>3.5?4:g>2?2:1,y=mN(n),v=mW(n);break;case"minute":_=y$(t,!0),y=mB(n),v=mV(n);break;case"second":_=y$(t,!1),y=mH(n),v=mG(n);break;case"millisecond":_=cc(t,!0),y=mz(n),v=m$(n)}m>=i[0]&&u<=i[1]&&function(e,t,n,o,s,l,c){for(var d,u,m,f=((d=new Date(0))[s](1),u=d.getTime(),d[s](1+e),m=d.getTime()-u,function(e,t){return Math.max(0,Math.round((t-e)/m))}),p=t,h=new Date(p);p<n&&p<=i[1]&&(c.push({value:p}),!(a++>1e4));)if(h[s](h[o]()+e),p=h.getTime(),r){var b=r.calcNiceTickMultiple(p,f);b>0&&(h[s](h[o]()+b*e),p=h.getTime())}c.push({value:p,notAdd:!0})}(_,u,m,y,v,0,l),"year"===e&&s.length>1&&0===d&&s.unshift({value:s[0].value-_})}}for(var d=0;d<l.length;d++)s.push(l[d])}}(mC[u],s[s.length-1]||[],l),f!==(mC[u+1]?mS(mC[u+1]):null))){if(l.length){d=c,l.sort(function(e,t){return e.value-t.value});for(var p=[],h=0;h<l.length;++h){var b=l[h].value;(0===h||l[h-1].value!==b)&&(p.push(l[h]),b>=i[0]&&b<=i[1]&&c++)}var g=o/t;if(c>1.5*g&&d>g/1.5||(s.push(p),c>g||e===mC[u]))break}l=[]}}for(var _=rD(rA(s,function(e){return rD(e,function(e){return e.value>=i[0]&&e.value<=i[1]&&!e.notAdd})}),function(e){return e.length>0}),y=[],v=_.length-1,u=0;u<_.length;++u)for(var F=_[u],x=0;x<F.length;++x){var w=mI(F[x].value,n);y.push({value:F[x].value,time:{level:v-u,upperTimeUnit:w,lowerTimeUnit:w}})}y.sort(function(e,t){return e.value-t.value});for(var k=[],u=0;u<y.length;++u)(0===u||y[u].value!==y[u-1].value)&&k.push(y[u]);return k}(this._minLevelUnit,this._approxInterval,r,n,this._getExtentSpanWithBreaks(),this._brkCtx);o=o.concat(s);var l=mI(n[1],r);o.push({value:n[1],time:{level:0,upperTimeUnit:l,lowerTimeUnit:l}});var c=this.getSetting("useUTC"),d=mA.length-1,u=0;return rM(o,function(e){d=Math.min(d,rk(mA,e.time.upperTimeUnit)),u=Math.max(u,e.time.level)}),i&&mw().pruneTicksByBreak(e.pruneByBreak,o,this._brkCtx.breaks,function(e){return e.value},this._approxInterval,this._extent),i&&"none"!==e.breakTicks&&mw().addBreaksToTicks(o,this._brkCtx.breaks,this._extent,function(e){for(var t=Math.max(rk(mA,mI(e.vmin,c)),rk(mA,mI(e.vmax,c))),n=0,i=0;i<mA.length;i++)if(!yG(mA[i],e.vmin,e.vmax,c)){n=i;break}var o=Math.min(n,d);return{level:u,lowerTimeUnit:mA[Math.max(o,t)],upperTimeUnit:mA[o]}}),o},t.prototype.calcNiceExtent=function(e){var t=this.getExtent();if(t[0]===t[1]&&(t[0]-=864e5,t[1]+=864e5),t[1]===-1/0&&t[0]===1/0){var n=new Date;t[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),t[0]=t[1]-864e5}this._innerSetExtent(t[0],t[1]),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,t,n){e=e||10;var i=this._getExtentSpanWithBreaks();this._approxInterval=i/e,null!=t&&this._approxInterval<t&&(this._approxInterval=t),null!=n&&this._approxInterval>n&&(this._approxInterval=n);var o=yV.length,r=Math.min(yU(yV,this._approxInterval,0,o),o-1);this._interval=yV[r][1],this._intervalPrecision=yb(this._interval),this._minLevelUnit=yV[Math.max(r-1,0)][0]},t.prototype.parse=function(e){return rN(e)?e:+cs(e)},t.prototype.contain=function(e){return y_(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.type="time",t}(yE),yV=[["second",1e3],["minute",6e4],["hour",36e5],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",15768e6],["year",31536e6]];function yG(e,t,n,i){return mO(new Date(t),e,i).getTime()===mO(new Date(n),e,i).getTime()}function y$(e,t){return(e/=t?6e4:1e3)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}yw.registerClass(yW);var yq=Math.floor,yX=Math.ceil,yK=Math.pow,yJ=Math.log,yZ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new yE,t}return rt(t,e),t.prototype.getTicks=function(t){t=t||{};var n=this._extent.slice(),i=this._originalScale.getExtent(),o=e.prototype.getTicks.call(this,t),r=this.base,a=this._originalScale._innerGetBreaks(),s=mw();return rA(o,function(e){var t,o=e.value,l=null,c=yK(r,o);if(o===n[0]&&this._fixMin?l=i[0]:o===n[1]&&this._fixMax&&(l=i[1]),s){var d=s.getTicksLogTransformBreak(e,r,a,yQ);t=d.vBreak,null==l&&(l=d.brkRoundingCriterion)}return null!=l&&(c=yQ(c,l)),{value:c,break:t}},this)},t.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},t.prototype.setExtent=function(t,n){this._originalScale.setExtent(t,n);var i=yx(this.base,[t,n]);e.prototype.setExtent.call(this,i[0],i[1])},t.prototype.getExtent=function(){var t=this.base,n=e.prototype.getExtent.call(this);n[0]=yK(t,n[0]),n[1]=yK(t,n[1]);var i=this._originalScale.getExtent();return this._fixMin&&(n[0]=yQ(n[0],i[0])),this._fixMax&&(n[1]=yQ(n[1],i[1])),n},t.prototype.unionExtentFromData=function(e,t){this._originalScale.unionExtentFromData(e,t);var n=yx(this.base,e.getApproximateExtent(t),!0);this._innerUnionExtent(n)},t.prototype.calcNiceTicks=function(e){e=e||10;var t=this._extent.slice(),n=this._getExtentSpanWithBreaks();if(isFinite(n)&&!(n<=0)){var i=Math.pow(10,cl(n));for(e/n*i<=.5&&(i*=10);!isNaN(i)&&1>Math.abs(i)&&Math.abs(i)>0;)i*=10;var o=[ce(yX(t[0]/i)*i),ce(yq(t[1]/i)*i)];this._interval=i,this._intervalPrecision=yb(i),this._niceExtent=o}},t.prototype.calcNiceExtent=function(t){e.prototype.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},t.prototype.contain=function(t){return t=yJ(t)/yJ(this.base),e.prototype.contain.call(this,t)},t.prototype.normalize=function(t){return t=yJ(t)/yJ(this.base),e.prototype.normalize.call(this,t)},t.prototype.scale=function(t){return t=e.prototype.scale.call(this,t),yK(this.base,t)},t.prototype.setBreaksFromOption=function(e){var t=mw();if(t){var n=t.logarithmicParseBreaksFromOption(e,this.base,rL(this.parse,this)),i=n.parsedOriginal,o=n.parsedLogged;this._originalScale._innerSetBreak(i),this._innerSetBreak(o)}},t.type="log",t}(yE);function yQ(e,t){return ce(e,cn(t))}yw.registerClass(yZ);var y0=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal="ordinal"===e.type;this._needCrossZero="interval"===e.type&&t.getNeedCrossZero&&t.getNeedCrossZero();var o=t.get("min",!0);null==o&&(o=t.get("startValue",!0));var r=this._modelMinRaw=o;rR(r)?this._modelMinNum=y3(e,r({min:n[0],max:n[1]})):"dataMin"!==r&&(this._modelMinNum=y3(e,r));var a=this._modelMaxRaw=t.get("max",!0);if(rR(a)?this._modelMaxNum=y3(e,a({min:n[0],max:n[1]})):"dataMax"!==a&&(this._modelMaxNum=y3(e,a)),i)this._axisDataLen=t.getCategories().length;else{var s=t.get("boundaryGap"),l=rO(s)?s:[s||0,s||0];"boolean"==typeof l[0]||"boolean"==typeof l[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[lz(l[0],1),lz(l[1],1)]}},e.prototype.calculate=function(){var e,t,n=this._isOrdinal,i=this._dataMin,o=this._dataMax,r=this._axisDataLen,a=this._boundaryGapInner,s=n?null:o-i||Math.abs(i),l="dataMin"===this._modelMinRaw?i:this._modelMinNum,c="dataMax"===this._modelMaxRaw?o:this._modelMaxNum,d=null!=l,u=null!=c;null==l&&(l=n?r?0:NaN:i-a[0]*s),null==c&&(c=n?r?r-1:NaN:o+a[1]*s),null!=l&&isFinite(l)||(l=NaN),null!=c&&isFinite(c)||(c=NaN);var m=(e=l)!=e||(t=c)!=t||n&&!r;this._needCrossZero&&(l>0&&c>0&&!d&&(l=0),l<0&&c<0&&!u&&(c=0));var f=this._determinedMin,p=this._determinedMax;return null!=f&&(l=f,d=!0),null!=p&&(c=p,u=!0),{min:l,max:c,minFixed:d,maxFixed:u,isBlank:m}},e.prototype.modifyDataMinMax=function(e,t){this[y2[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){this[y1[e]]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),y1={min:"_determinedMin",max:"_determinedMax"},y2={min:"_dataMin",max:"_dataMax"};function y5(e,t,n){var i=e.rawExtentInfo;return i||(i=new y0(e,t,n),e.rawExtentInfo=i),i}function y3(e,t){return null==t?null:t!=t?NaN:e.parse(t)}function y4(e,t){var n=e.type,i=y5(e,t,e.getExtent()).calculate();e.setBlank(i.isBlank);var o=i.min,r=i.max,a=t.ecModel;if(a&&"time"===n){var s=yN("bar",a),l=!1;if(rM(s,function(e){l=l||e.getBaseAxis()===t.axis}),l){var c=function(e,t,n,i){var o=n.axis.getExtent(),r=Math.abs(o[1]-o[0]),a=function(e,t,n){if(e&&t)return e[yP(t)]}(i,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;rM(a,function(e){s=Math.min(e.offset,s)});var l=-1/0;rM(a,function(e){l=Math.max(e.offset+e.width,l)});var c=(s=Math.abs(s))+(l=Math.abs(l)),d=t-e,u=d/(1-(s+l)/r)-d;return t+=l/c*u,{min:e-=s/c*u,max:t}}(o,r,t,yB(s));o=c.min,r=c.max}}return{extent:[o,r],fixMin:i.minFixed,fixMax:i.maxFixed}}function y6(e,t){var n=y4(e,t),i=n.extent,o=t.get("splitNumber");e instanceof yZ&&(e.base=t.get("logBase"));var r=e.type,a=t.get("interval"),s="interval"===r||"time"===r;e.setBreaksFromOption(vo(t)),e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:o,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:s?t.get("minInterval"):null,maxInterval:s?t.get("maxInterval"):null}),null!=a&&e.setInterval&&e.setInterval(a)}function y8(e){var t=e.getLabelModel().get("formatter");if("time"===e.type){var n,i,o,r=rY(t)||rR(t)?t:(n=(n=t)||{},i={},o=!0,rM(mA,function(e){o&&(o=null==n[e])}),rM(mA,function(e,t){var r=n[e];i[e]={};for(var a=null,s=t;s>=0;s--){var l=mA[s],c=rB(r)&&!rO(r)?r[l]:r,d=void 0;rO(c)?a=(d=c.slice())[0]||"":rY(c)?d=[a=c]:(null==a?a=mE[e]:mk[l].test(a)||(a=i[l][l][0]+" "+a),d=[a],o&&(d[1]="{primary|"+a+"}")),i[e][l]=d}}),i);return function(t,n){return e.scale.getFormattedLabel(t,n,r)}}if(rY(t))return function(n){var i=e.scale.getLabel(n);return t.replace("{value}",null!=i?i:"")};if(!rR(t))return function(t){return e.scale.getLabel(t)};if("category"===e.type)return function(n,i){return t(y7(e,n),n.value-e.scale.getExtent()[0],null)};var a=mw();return function(n,i){var o=null;return a&&(o=a.makeAxisLabelFormatterParamBreak(o,n.break)),t(y7(e,n),i,o)}}function y7(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function y9(e){var t=e.get("interval");return null==t?"auto":t}function ve(e){return"category"===e.type&&0===y9(e.getLabelModel())}function vt(e,t){var n={};return rM(e.mapDimensionsAll(t),function(t){n[yL(e,t)?e.getCalculationInfo("stackResultDimension"):t]=!0}),rS(n)}function vn(e){return"middle"===e||"center"===e}function vi(e){return e.getShallow("show")}function vo(e){var t,n=e.get("breaks",!0);if(null!=n){return mw()&&("x"===(t=e.axis).dim||"y"===t.dim||"z"===t.dim||"single"===t.dim)&&"category"!==t.type?n:void 0}}var vr=function(){function e(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return rA(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),rD(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),va=["x","y"];function vs(e){return("interval"===e.type||"time"===e.type)&&!e.hasBreaks()}var vl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=va,t}return rt(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(vs(e)&&vs(t)){var n=e.getExtent(),i=t.getExtent(),o=this.dataToPoint([n[0],i[0]]),r=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(r[0]-o[0])/a,c=(r[1]-o[1])/s,d=o[0]-n[0]*l,u=o[1]-i[0]*c,m=this._transform=[l,0,0,c,d,u];this._invTransform=aN([],m)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),i=this.dataToPoint(t),o=this.getArea(),r=new a3(n[0],n[1],i[0]-n[0],i[1]-n[1]);return o.intersect(r)},t.prototype.dataToPoint=function(e,t,n){n=n||[];var i=e[0],o=e[1];if(this._transform&&null!=i&&isFinite(i)&&null!=o&&isFinite(o))return ao(n,e,this._transform);var r=this.getAxis("x"),a=this.getAxis("y");return n[0]=r.toGlobalCoord(r.dataToCoord(i,t)),n[1]=a.toGlobalCoord(a.dataToCoord(o,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),r=i.getExtent(),a=n.parse(e[0]),s=i.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(o[0],o[1]),a),Math.max(o[0],o[1])),t[1]=Math.min(Math.max(Math.min(r[0],r[1]),s),Math.max(r[0],r[1])),t},t.prototype.pointToData=function(e,t,n){if(n=n||[],this._invTransform)return ao(n,e,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(e[0]),t),n[1]=o.coordToData(o.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},t.prototype.getArea=function(e){e=e||0;var t=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(t[0],t[1])-e,o=Math.min(n[0],n[1])-e,r=Math.max(t[0],t[1])-i+e,a=Math.max(n[0],n[1])-o+e;return new a3(i,o,r,a)},t}(vr),vc=ck(),vd=ck(),vu={estimate:1,determine:2};function vm(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function vf(e,t){var n=rA(t,function(t){return e.scale.parse(t)});return"time"===e.type&&n.length>0&&(n.sort(),n.unshift(n[0]),n.push(n[n.length-1])),n}function vp(e,t,n){var i,o,r=vb(e),a=y9(t),s=n.kind===vu.estimate;if(!s){var l=v_(r,a);if(l)return l}rR(a)?i=vw(e,a):(o="auto"===a?function(e,t){if(t.kind===vu.estimate){var n=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return vd(e).autoInterval=n,!0}),n}var i=vd(e).autoInterval;return null!=i?i:vd(e).autoInterval=e.calculateCategoryInterval(t)}(e,n):a,i=vx(e,o));var c={labels:i,labelCategoryInterval:o};return s?n.out.noPxChangeTryDetermine.push(function(){return vy(r,a,c),!0}):vy(r,a,c),c}var vh=vg("axisTick"),vb=vg("axisLabel");function vg(e){return function(t){return vd(t)[e]||(vd(t)[e]={list:[]})}}function v_(e,t){for(var n=0;n<e.list.length;n++)if(e.list[n].key===t)return e.list[n].value}function vy(e,t,n){return e.list.push({key:t,value:n}),n}function vv(e,t,n){return null==vF(e,t,n)}function vF(e,t,n){var i=vc(e.model),o=e.getExtent(),r=i.lastAutoInterval,a=i.lastTickCount;if(null!=r&&null!=a&&1>=Math.abs(r-t)&&1>=Math.abs(a-n)&&r>t&&i.axisExtent0===o[0]&&i.axisExtent1===o[1])return r;i.lastTickCount=n,i.lastAutoInterval=t,i.axisExtent0=o[0],i.axisExtent1=o[1]}function vx(e,t,n){var i=y8(e),o=e.scale,r=o.getExtent(),a=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),c=r[0],d=o.count();0!==c&&l>1&&d/l>2&&(c=Math.round(Math.ceil(c/l)*l));var u=ve(e),m=a.get("showMinLabel")||u,f=a.get("showMaxLabel")||u;m&&c!==r[0]&&h(r[0]);for(var p=c;p<=r[1];p+=l)h(p);function h(e){var t={value:e};s.push(n?e:{formattedLabel:i(t),rawLabel:o.getLabel(t),tickValue:e,time:void 0,break:void 0})}return f&&p-l!==r[1]&&h(r[1]),s}function vw(e,t,n){var i=e.scale,o=y8(e),r=[];return rM(i.getTicks(),function(e){var a=i.getLabel(e),s=e.value;t(e.value,a)&&r.push(n?s:{formattedLabel:o(e),rawLabel:a,tickValue:s,time:void 0,break:void 0})}),r}var vk=[0,1];function vE(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}var vT=function(e){function t(t,n,i,o,r){var a=e.call(this,t,n,i)||this;return a.index=0,a.type=o||"value",a.position=r||"bottom",a}return rt(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[+("x"!==this.dim)]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return e>=n&&e<=i},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return ci(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this._extent,i=this.scale;return e=i.normalize(i.parse(e)),this.onBand&&"ordinal"===i.type&&vE(n=n.slice(),i.count()),l8(e,vk,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&vE(n=n.slice(),i.count());var o=l8(e,n,vk,t);return this.scale.scale(o)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=function(e,t,n){var i=e.getTickModel().get("customValues");if(i){var o=e.scale.getExtent();return{ticks:rD(vf(e,i),function(e){return e>=o[0]&&e<=o[1]})}}return"category"===e.type?function(e,t){var n,i,o=vh(e),r=y9(t),a=v_(o,r);if(a)return a;if((!t.get("show")||e.scale.isBlank())&&(n=[]),rR(r))n=vw(e,r,!0);else if("auto"===r){var s=vp(e,e.getLabelModel(),vm(vu.determine));i=s.labelCategoryInterval,n=rA(s.labels,function(e){return e.tickValue})}else n=vx(e,i=r,!0);return vy(o,r,{ticks:n,tickCategoryInterval:i})}(e,t):{ticks:rA(e.scale.getTicks(n),function(e){return e.value})}}(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,i=rA(n,function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}},this);return function(e,t,n,i){var o,r,a=t.length;if(e.onBand&&!n&&a){var s=e.getExtent();if(1===a)t[0].coord=s[0],t[0].onBand=!0,o=t[1]={coord:s[1],tickValue:t[0].tickValue,onBand:!0};else{var l=t[a-1].tickValue-t[0].tickValue,c=(t[a-1].coord-t[0].coord)/l;rM(t,function(e){e.coord-=c/2,e.onBand=!0});var d=e.scale.getExtent();r=1+d[1]-t[a-1].tickValue,o={coord:t[a-1].coord+c*r,tickValue:d[1]+1,onBand:!0},t.push(o)}var u=s[0]>s[1];m(t[0].coord,s[0])&&(i?t[0].coord=s[0]:t.shift()),i&&m(s[0],t[0].coord)&&t.unshift({coord:s[0],onBand:!0}),m(s[1],o.coord)&&(i?o.coord=s[1]:t.pop()),i&&m(o.coord,s[1])&&t.push({coord:s[1],onBand:!0})}function m(e,t){return e=ce(e),t=ce(t),u?e>t:e<t}}(this,i,t.get("alignWithLabel"),e.clamp),i},e.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick").get("splitNumber");return e>0&&e<100||(e=5),rA(this.scale.getMinorTicks(e),function(e){return rA(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return function(e,t){var n,i,o,r,a,s,l,c=e.getLabelModel().get("customValues");if(c){var d=y8(e),u=e.scale.getExtent();return{labels:rA(rD(vf(e,c),function(e){return e>=u[0]&&e<=u[1]}),function(t){var n={value:t};return{formattedLabel:d(n),rawLabel:e.scale.getLabel(n),tickValue:t,time:void 0,break:void 0}})}}return"category"===e.type?(n=e,i=t,o=n.getLabelModel(),r=vp(n,o,i),!o.get("show")||n.scale.isBlank()?{labels:[]}:r):(s=(a=e).scale.getTicks(),l=y8(a),{labels:rA(s,function(e,t){return{formattedLabel:l(e,t),rawLabel:a.scale.getLabel(e),tickValue:e.value,time:e.time,break:e.break}})})}(this,e=e||vm(vu.determine)).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+ +!!this.onBand;return 0===n&&(n=1),Math.abs(Math.abs(e[1]-e[0]))/n},e.prototype.calculateCategoryInterval=function(e){return function(e,t){var n,i,o=t.kind,r=(i=(n=e).getLabelModel(),{axisRotate:n.getRotate?n.getRotate():n.isHorizontal&&!n.isHorizontal()?90:0,labelRotate:i.get("rotate")||0,font:i.getFont()}),a=y8(e),s=(r.axisRotate-r.labelRotate)/180*Math.PI,l=e.scale,c=l.getExtent(),d=l.count();if(c[1]-c[0]<1)return 0;var u=1;d>40&&(u=Math.max(1,Math.floor(d/40)));for(var m=c[0],f=e.dataToCoord(m+1)-e.dataToCoord(m),p=Math.abs(f*Math.cos(s)),h=Math.abs(f*Math.sin(s)),b=0,g=0;m<=c[1];m+=u){var _=0,y=0,v=lP(a({value:m}),r.font,"center","top");_=1.3*v.width,y=1.3*v.height,b=Math.max(b,_,7),g=Math.max(g,y,7)}var F=b/p,x=g/h;isNaN(F)&&(F=1/0),isNaN(x)&&(x=1/0);var w=Math.max(0,Math.floor(Math.min(F,x)));if(o===vu.estimate)return t.out.noPxChangeTryDetermine.push(rL(vv,null,e,w,d)),w;var k=vF(e,w,d);return null!=k?k:w}(this,e=e||vm(vu.determine))},e}()),vM=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"];function vA(e,t,n){n=n||3,t?e.dirty|=n:e.dirty&=~n}function vC(e,t){return t=t||3,null==e.dirty||!!(e.dirty&t)}function vD(e){if(e)return vC(e)&&function(e,t,n){var i=t.getComputedTransform();e.transform=b9(e.transform,i);var o=e.localRect=b7(e.localRect,t.getBoundingRect()),r=t.style,a=r.margin,s=n&&n.marginForce,l=n&&n.minMarginForce,c=n&&n.marginDefault,d=r.__marginType;null==d&&c&&(a=c,d=mo.textMargin);for(var u=0;u<4;u++)vS[u]=d===mo.minMargin&&l&&null!=l[u]?l[u]:s&&null!=s[u]?s[u]:a?a[u]:0;d===mo.textMargin&&b0(o,vS,!1,!1);var m=e.rect=b7(e.rect,o);i&&m.applyTransform(i),d===mo.minMargin&&b0(m,vS,!1,!1),e.axisAligned=b6(i),(e.label=e.label||{}).ignore=t.ignore,vA(e,!1),vA(e,!0,2)}(e,e.label,e),e}var vS=[0,0,0,0];function vL(e,t){for(var n=0;n<vM.length;n++){var i=vM[n];null==e[i]&&(e[i]=t[i])}return vD(e)}function vI(e){var t=e.obb;return(!t||vC(e,2))&&(e.obb=t=t||new bg,t.fromBoundingRect(e.localRect,e.transform),vA(e,!1,2)),t}function vO(e,t,n,i){return!!e&&!!t&&(!e.label||!e.label.ignore)&&(!t.label||!t.label.ignore)&&!!e.rect.intersect(t.rect,n,i)&&(!!e.axisAligned&&!!t.axisAligned||vI(e).intersect(vI(t),n,i))}var vR=Math.PI,vY=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],vP=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],vN=ck(),vB=ck(),vH=function(){function e(e){this.recordMap={},this.resolveAxisNameOverlap=e}return e.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,i=this.recordMap,o=i[t]||(i[t]=[]);return o[n]||(o[n]={ready:{}})},e}(),vz=aL(),vj=new a3(0,0,0,0),vU=function(e,t,n,i,o,r){if(vn(e.nameLocation)){var a,s,l=r.stOccupiedRect;l&&vW((a={},s=r.transGroup.transform,a.transform=b9(a.transform,s),a.localRect=b7(a.localRect,l),a.rect=b7(a.rect,l),s&&a.rect.applyTransform(s),a.axisAligned=b6(s),a.obb=void 0,(a.label=a.label||{}).ignore=!1,a),i,o)}else vV(r.labelInfoList,r.dirVec,i,o)};function vW(e,t,n){var i=new aB;vO(e,t,i,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&function(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var i=e.rect;i&&(i.x+=t.x,i.y+=t.y);var o=e.obb;o&&o.fromBoundingRect(e.localRect,n)}}(t,i)}function vV(e,t,n,i){for(var o=aB.dot(i,t)>=0,r=0,a=e.length;r<a;r++){var s=e[o?r:a-1-r];s.label.ignore||vW(s,n,i)}}var vG=function(){function e(e,t,n,i){this.group=new lQ,this._axisModel=e,this._api=t,this._local={},this._shared=i||new vH(vU),this._resetCfgDetermined(n)}return e.prototype.updateCfg=function(e){var t=this._cfg.raw;t.position=e.position,t.labelOffset=e.labelOffset,this._resetCfgDetermined(t)},e.prototype.__getRawCfg=function(){return this._cfg.raw},e.prototype._resetCfgDetermined=function(e){var t=this._axisModel,n=t.getDefaultOption?t.getDefaultOption():{},i=rV(e.axisName,t.get("name")),o=t.get("nameMoveOverlap");(null==o||"auto"===o)&&(o=rV(e.defaultNameMoveOverlap,!0));var r={raw:e,position:e.position,rotation:e.rotation,nameDirection:rV(e.nameDirection,1),tickDirection:rV(e.tickDirection,1),labelDirection:rV(e.labelDirection,1),labelOffset:rV(e.labelOffset,0),silent:rV(e.silent,!0),axisName:i,nameLocation:rG(t.get("nameLocation"),n.nameLocation,"end"),shouldNameMoveOverlap:!!i&&o,optionHideOverlap:t.get(["axisLabel","hideOverlap"]),showMinorTicks:t.get(["minorTick","show"])};this._cfg=r;var a=new lQ({x:r.position[0],y:r.position[1],rotation:r.rotation});a.updateTransform(),this._transformGroup=a;var s=this._shared.ensureRecord(t);s.transGroup=this._transformGroup,s.dirVec=new aB(Math.cos(-r.rotation),Math.sin(-r.rotation))},e.prototype.build=function(e,t){var n=this;return e||(e={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),rM(v$,function(i){e[i]&&vq[i](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,t||{})}),this},e.innerTextLayout=function(e,t,n){var i,o,r=co(t-e);return cr(r)?(o=n>0?"top":"bottom",i="center"):cr(r-vR)?(o=n>0?"bottom":"top",i="center"):(o="middle",i=r>0&&r<vR?n>0?"right":"left":n>0?"left":"right"),{rotation:r,textAlign:i,textVerticalAlign:o}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},e}(),v$=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],vq={axisLine:function(e,t,n,i,o,r,a){var s=i.get(["axisLine","show"]);if("auto"===s&&(s=!0,null!=e.raw.axisLineAutoShow&&(s=!!e.raw.axisLineAutoShow)),s){var l=i.axis.getExtent(),c=r.transform,d=[l[0],0],u=[l[1],0],m=d[0]>u[0];c&&(ao(d,d,c),ao(u,u,c));var f=rx({lineCap:"round"},i.getModel(["axisLine","lineStyle"]).getLineStyle()),p={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:f};if(i.get(["axisLine","breakLine"])&&i.axis.scale.hasBreaks())null.buildAxisBreakLine(i,o,r,p);else{var h=new h6(rx({shape:{x1:d[0],y1:d[1],x2:u[0],y2:u[1]}},p));bj(h.shape,h.style.lineWidth),h.anid="line",o.add(h)}var b=i.get(["axisLine","symbol"]);if(null!=b){var g=i.get(["axisLine","symbolSize"]);rY(b)&&(b=[b,b]),(rY(g)||rN(g))&&(g=[g,g]);var _=function(e,t){if(null!=e)return rO(e)||(e=[e,e]),[l7(e[0],t[0])||0,l7(rV(e[1],e[0]),t[1])||0]}(i.get(["axisLine","symbolOffset"])||0,g),y=g[0],v=g[1];rM([{rotate:e.rotation+Math.PI/2,offset:_[0],r:0},{rotate:e.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((d[0]-u[0])*(d[0]-u[0])+(d[1]-u[1])*(d[1]-u[1]))}],function(t,n){if("none"!==b[n]&&null!=b[n]){var i=g3(b[n],-y/2,-v/2,y,v,f.stroke,!0),r=t.r+t.offset,a=m?u:d;i.attr({rotation:t.rotate,x:a[0]+r*Math.cos(e.rotation),y:a[1]-r*Math.sin(e.rotation),silent:!0,z2:11}),o.add(i)}})}}},axisTickLabelEstimate:function(e,t,n,i,o,r,a,s){vZ(t,o,s)&&vX(e,t,n,i,o,r,a,vu.estimate)},axisTickLabelDetermine:function(e,t,n,i,o,r,a,s){vZ(t,o,s)&&vX(e,t,n,i,o,r,a,vu.determine);var l,c,d,u=function(e,t,n,i){var o=i.axis,r=i.getModel("axisTick"),a=r.get("show");if("auto"===a&&(a=!0,null!=e.raw.axisTickAutoShow&&(a=!!e.raw.axisTickAutoShow)),!a||o.scale.isBlank())return[];for(var s=r.getModel("lineStyle"),l=e.tickDirection*r.get("length"),c=vJ(o.getTicksCoords(),n.transform,l,rw(s.getLineStyle(),{stroke:i.get(["axisLine","lineStyle","color"])}),"ticks"),d=0;d<c.length;d++)t.add(c[d]);return c}(e,o,r,i);l=e,c=t.labelLayoutList,d=u,l.showMinorTicks||rM(c,function(e){if(e&&e.label.ignore)for(var t=0;t<d.length;t++){var n=d[t],i=vB(n),o=vN(e.label);if(null!=i.tickValue&&!i.onBand&&i.tickValue===o.tickValue)return void vK(n)}}),function(e,t,n,i,o){var r=i.axis,a=i.getModel("minorTick");if(!(!e.showMinorTicks||r.scale.isBlank())){var s=r.getMinorTicksCoords();if(s.length)for(var l=a.getModel("lineStyle"),c=o*a.get("length"),d=rw(l.getLineStyle(),rw(i.getModel("axisTick").getLineStyle(),{stroke:i.get(["axisLine","lineStyle","color"])})),u=0;u<s.length;u++)for(var m=vJ(s[u],n.transform,c,d,"minorticks_"+u),f=0;f<m.length;f++)t.add(m[f])}}(e,o,r,i,e.tickDirection)},axisName:function(e,t,n,i,o,r,a,s){var l,c,d=n.ensureRecord(i);t.nameEl&&(o.remove(t.nameEl),t.nameEl=d.nameLayout=d.nameLocation=null);var u=e.axisName;if(u){var m,f,p,h,b,g,_,y,v,F=e.nameLocation,x=e.nameDirection,w=i.getModel("nameTextStyle"),k=i.get("nameGap")||0,E=i.axis.getExtent(),T=i.axis.inverse?-1:1,M=new aB(0,0),A=new aB(0,0);"start"===F?(M.x=E[0]-T*k,A.x=-T):"end"===F?(M.x=E[1]+T*k,A.x=T):(M.x=(E[0]+E[1])/2,M.y=e.labelOffset+x*k,A.y=x);var C=aL();A.transform(aP(C,C,e.rotation));var D=i.get("nameRotate");null!=D&&(D=D*vR/180),vn(F)?l=vG.innerTextLayout(e.rotation,null!=D?D:e.rotation,x):(m=e.rotation,f=F,p=D||0,h=E,_=co(p-m),y=h[0]>h[1],v="start"===f&&!y||"start"!==f&&y,cr(_-vR/2)?(g=v?"bottom":"top",b="center"):cr(_-1.5*vR)?(g=v?"top":"bottom",b="center"):(g="middle",b=_<1.5*vR&&_>vR/2?v?"left":"right":v?"right":"left"),l={rotation:_,textAlign:b,textVerticalAlign:g},null!=(c=e.raw.axisNameAvailableWidth)&&(isFinite(c=Math.abs(c/Math.sin(l.rotation)))||(c=null)));var S=w.getFont(),L=i.get("nameTruncate",!0)||{},I=L.ellipsis,O=rW(e.raw.nameTruncateMaxWidth,L.maxWidth,c),R=s.nameMarginLevel||0,Y=new ub({x:M.x,y:M.y,rotation:l.rotation,silent:vG.isLabelSilent(i),style:u8(w,{text:u,font:S,overflow:"truncate",width:O,ellipsis:I,fill:w.getTextColor()||i.get(["axisLine","lineStyle","color"]),align:w.get("align")||l.textAlign,verticalAlign:w.get("verticalAlign")||l.textVerticalAlign}),z2:1});if(b5({el:Y,componentModel:i,itemName:u}),Y.__fullText=u,Y.anid="name",i.get("triggerEvent")){var P=vG.makeAxisEventDataBase(i);P.targetType="axisName",P.name=u,ug(Y).eventData=P}r.add(Y),Y.updateTransform(),t.nameEl=Y;var N=d.nameLayout=vD({label:Y,priority:Y.z2,defaultAttr:{ignore:Y.ignore},marginDefault:vn(F)?vY[R]:vP[R]});if(d.nameLocation=F,o.add(Y),Y.decomposeTransform(),e.shouldNameMoveOverlap&&N){var B=n.ensureRecord(i);n.resolveAxisNameOverlap(e,n,i,N,A,B)}}}};function vX(e,t,n,i,o,r,a,s){vQ(t)||function(e,t,n,i,o,r){var a=o.axis,s=rW(e.raw.axisLabelShow,o.get(["axisLabel","show"])),l=new lQ;n.add(l);var c=vm(i);if(!s||a.scale.isBlank())return v0(t,[],l,c);var d=o.getModel("axisLabel"),u=a.getViewLabels(c),m=(rW(e.raw.labelRotate,d.get("rotate"))||0)*vR/180,f=vG.innerTextLayout(e.rotation,m,e.labelDirection),p=o.getCategories&&o.getCategories(!0),h=[],b=o.get("triggerEvent"),g=1/0,_=-1/0;rM(u,function(e,t){var n,i="ordinal"===a.scale.type?a.scale.getRawOrdinalNumber(e.tickValue):e.tickValue,s=e.formattedLabel,c=e.rawLabel,m=d;if(p&&p[i]){var y=p[i];rB(y)&&y.textStyle&&(m=new mh(y.textStyle,d,o.ecModel))}var v=m.getTextColor()||o.get(["axisLine","lineStyle","color"]),F=m.getShallow("align",!0)||f.textAlign,x=rV(m.getShallow("alignMinLabel",!0),F),w=rV(m.getShallow("alignMaxLabel",!0),F),k=m.getShallow("verticalAlign",!0)||m.getShallow("baseline",!0)||f.textVerticalAlign,E=rV(m.getShallow("verticalAlignMinLabel",!0),k),T=rV(m.getShallow("verticalAlignMaxLabel",!0),k),M=10+((null==(n=e.time)?void 0:n.level)||0);g=Math.min(g,M),_=Math.max(_,M);var A=new ub({x:0,y:0,rotation:0,silent:vG.isLabelSilent(o),z2:M,style:u8(m,{text:s,align:0===t?x:t===u.length-1?w:F,verticalAlign:0===t?E:t===u.length-1?T:k,fill:rR(v)?v("category"===a.type?c:"value"===a.type?i+"":i,t):v})});A.anid="label_"+i;var C=vN(A);if(C.break=e.break,C.tickValue=i,C.layoutRotation=f.rotation,b5({el:A,componentModel:o,itemName:s,formatterParamsExtra:{isTruncated:function(){return A.isTruncated},value:c,tickIndex:t}}),b){var D,S,L,I,O=vG.makeAxisEventDataBase(o);O.targetType="axisLabel",O.value=c,O.tickIndex=t,e.break&&(O.break={start:e.break.parsedBreak.vmin,end:e.break.parsedBreak.vmax}),"category"===a.type&&(O.dataIndex=i),ug(A).eventData=O,e.break&&(D=o,S=r,L=A,I=e.break,L.on("click",function(e){var t={type:"expandAxisBreak",breaks:[{start:I.parsedBreak.breakOption.start,end:I.parsedBreak.breakOption.end}]};t[D.axis.dim+"AxisIndex"]=D.componentIndex,S.dispatchAction(t)}))}h.push(A),l.add(A)}),v0(t,rA(h,function(e){return{label:e,priority:vN(e).break?e.z2+(_-g+1):e.z2,defaultAttr:{ignore:e.ignore}}}),l,c)}(e,t,o,s,i,a);var l,c,d,u,m,f=t.labelLayoutList;l=e,c=i,d=f,u=r,m=c.get(["axisLabel","margin"]),rM(d,function(e,t){var n=vD(e);if(n){var i=n.label,o=vN(i);n.suggestIgnore=i.ignore,i.ignore=!1,lS(v1,v2),v1.x=c.axis.dataToCoord(o.tickValue),v1.y=l.labelOffset+l.labelDirection*m,v1.rotation=o.layoutRotation,u.add(v1),v1.updateTransform(),u.remove(v1),v1.decomposeTransform(),lS(i,v1),i.markRedraw(),vA(n,!0),vD(n)}}),function(e,t,n){var i=mw();if(i){var o=i.retrieveAxisBreakPairs(n,function(e){return e&&vN(e.label).break},!0),r=e.get(["breakLabelLayout","moveOverlap"],!0);(!0===r||"auto"===r)&&rM(o,function(i){null.adjustBreakLabelPair(e.axis.inverse,t,[vD(n[i[0]]),vD(n[i[1]])])})}}(i,e.rotation,f);var p=e.optionHideOverlap;(function(e,t,n){if(!ve(e.axis)){var i=e.get(["axisLabel","showMinLabel"]),o=e.get(["axisLabel","showMaxLabel"]),r=t.length;a(i,0,1),a(o,r-1,r-2)}function a(e,i,o){var r=vD(t[i]),a=vD(t[o]);if(r&&a){if(!1===e||r.suggestIgnore)return void vK(r.label);if(a.suggestIgnore)return void vK(a.label);if(!n){var s=[0,0,0,0];r=vL({marginForce:s},r),a=vL({marginForce:s},a)}vO(r,a,null,{touchThreshold:.1})&&(e?vK(a.label):vK(r.label))}}})(i,f,p),p&&function(e){var t=[];function n(e){if(!e.ignore){var t=e.ensureState("emphasis");null==t.ignore&&(t.ignore=!1)}e.ignore=!0}e.sort(function(e,t){return!!t.suggestIgnore-!!e.suggestIgnore||t.priority-e.priority});for(var i=0;i<e.length;i++){var o=vD(e[i]);if(!o.label.ignore){for(var r=o.label,a=o.labelLine,s=!1,l=0;l<t.length;l++)if(vO(o,t[l],null,{touchThreshold:.05})){s=!0;break}s?(n(r),a&&n(a)):t.push(o)}}}(rD(f,function(e){return e&&!e.label.ignore})),function(e,t,n,i){var o,r=n.axis,a=t.ensureRecord(n),s=[],l=!!e.axisName&&vn(e.nameLocation);rM(i,function(e){var t=vD(e);if(t&&!t.label.ignore){s.push(t);var n=a.transGroup;l&&(n.transform?aN(vz,n.transform):aI(vz),t.transform&&aR(vz,vz,t.transform),a3.copy(vj,t.localRect),vj.applyTransform(vz),o?o.union(vj):a3.copy(o=new a3(0,0,0,0),vj))}});var c=Math.abs(a.dirVec.x)>.1?"x":"y",d=a.transGroup[c];if(s.sort(function(e,t){return Math.abs(e.label[c]-d)-Math.abs(t.label[c]-d)}),l&&o){var u=r.getExtent(),m=Math.min(u[0],u[1]),f=Math.max(u[0],u[1])-m;o.union(new a3(m,0,f,1))}a.stOccupiedRect=o,a.labelInfoList=s}(e,n,i,f)}function vK(e){e&&(e.ignore=!0)}function vJ(e,t,n,i,o){for(var r=[],a=[],s=[],l=0;l<e.length;l++){var c=e[l].coord;a[0]=c,a[1]=0,s[0]=c,s[1]=n,t&&(ao(a,a,t),ao(s,s,t));var d=new h6({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:i,z2:2,autoBatch:!0,silent:!0});bj(d.shape,d.style.lineWidth),d.anid=o+"_"+e[l].tickValue,r.push(d);var u=vB(d);u.onBand=!!e[l].onBand,u.tickValue=e[l].tickValue}return r}function vZ(e,t,n){if(vQ(e)){var i=e.axisLabelsCreationContext.out.noPxChangeTryDetermine;if(n.noPxChange){for(var o=!0,r=0;r<i.length;r++)o=o&&i[r]();if(o)return!1}i.length&&(t.remove(e.labelGroup),v0(e,null,null,null))}return!0}function vQ(e){return!!e.labelLayoutList}function v0(e,t,n,i){e.labelLayoutList=t,e.labelGroup=n,e.axisLabelsCreationContext=i}var v1=new ut,v2=new ut;function v5(e,t,n){n=n||{};var i=t.axis,o={},r=i.getAxesOnZeroOf()[0],a=i.position,s=r?"onZero":a,l=i.dim,c=[e.x,e.x+e.width,e.y,e.y+e.height],d={left:0,right:1,top:0,bottom:1,onZero:2},u=t.get("offset")||0,m="x"===l?[c[2]-u,c[3]+u]:[c[0]-u,c[1]+u];if(r){var f=r.toGlobalCoord(r.dataToCoord(0));m[d.onZero]=Math.max(Math.min(f,m[1]),m[0])}o.position=["y"===l?m[d[s]]:c[0],"x"===l?m[d[s]]:c[3]],o.rotation=Math.PI/2*("x"!==l),o.labelDirection=o.tickDirection=o.nameDirection=({top:-1,bottom:1,left:-1,right:1})[a],o.labelOffset=r?m[d[a]]-m[d.onZero]:0,t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),rW(n.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var p=t.get(["axisLabel","rotate"]);return o.labelRotate="top"===s?-p:p,o.z2=1,o}function v3(e){var t={xAxisModel:null,yAxisModel:null};return rM(t,function(n,i){var o=i.replace(/Model$/,""),r=e.getReferringComponents(o,cA).models[0];t[i]=r}),t}var v4=[[3,1],[0,2]],v6=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=va,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;function i(e){var t,n=rS(e),i=n.length;if(i){for(var o=[],r=i-1;r>=0;r--){var a=e[+n[r]],s=a.model,l=a.scale;yp(l)&&s.get("alignTicks")&&null==s.get("interval")?o.push(a):(y6(l,s),yp(l)&&(t=a))}o.length&&(t||y6((t=o.pop()).scale,t.model),rM(o,function(e){!function(e,t,n){var i=yE.prototype,o=i.getTicks.call(n),r=i.getTicks.call(n,{expandToNicedExtent:!0}),a=o.length-1,s=i.getInterval.call(n),l=y4(e,t),c=l.extent,d=l.fixMin,u=l.fixMax;"log"===e.type&&(c=yx(e.base,c,!0)),e.setBreaksFromOption(vo(t)),e.setExtent(c[0],c[1]),e.calcNiceExtent({splitNumber:a,fixMin:d,fixMax:u});var m=i.getExtent.call(e);d&&(c[0]=m[0]),u&&(c[1]=m[1]);var f=i.getInterval.call(e),p=c[0],h=c[1];if(d&&u)f=(h-p)/a;else if(d)for(h=c[0]+f*a;h<c[1]&&isFinite(h)&&isFinite(c[1]);)f=yh(f),h=c[0]+f*a;else if(u)for(p=c[1]-f*a;p>c[0]&&isFinite(p)&&isFinite(c[0]);)f=yh(f),p=c[1]-f*a;else{e.getTicks().length-1>a&&(f=yh(f));var b=f*a;(p=ce((h=Math.ceil(c[1]/f)*f)-b))<0&&c[0]>=0?(p=0,h=ce(b)):h>0&&c[1]<=0&&(h=0,p=-ce(b))}var g=(o[0].value-r[0].value)/s,_=(o[a].value-r[a].value)/s;i.setExtent.call(e,p+f*g,h+f*_),i.setInterval.call(e,f),(g||_)&&i.setNiceExtent.call(e,p+f,h-f)}(e.scale,e.model,t.scale)}))}}this._updateScale(e,this.model),i(n.x),i(n.y);var o={};rM(n.x,function(e){v7(n,"y",e,o)}),rM(n.y,function(e){v7(n,"x",e,o)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var i=fn(e,t),o=this._rect=fe(e.getBoxLayoutParams(),i.refContainer),r=this._axesMap,a=this._coordsList,s=e.get("containLabel");if(Fe(r,o),!n){var l=(d=o,u=a,m=r,f=s,p=t,h=new vH(Fo),rM(m,function(e){return rM(e,function(e){vi(e.model)&&(e.axisBuilder=function(e,t,n,i,o,r){for(var a=v5(e,n),s=!1,l=!1,c=0;c<t.length;c++)yp(t[c].getOtherAxis(n.axis).scale)&&(s=l=!0,"category"===n.axis.type&&n.axis.onBand&&(l=!1));return a.axisLineAutoShow=s,a.axisTickAutoShow=l,a.defaultNameMoveOverlap=r,new vG(n,i,a,o)}(d,u,e.model,p,h,!f))})}),h),c=void 0;if(s)eJ?(eJ(this._axesList,o),Fe(r,o)):c=Fn(o.clone(),"axisLabel",null,o,r,l,i);else{var d,u,m,f,p,h,b,g,_,y,v,F,x=(b=e,g=o,_=i,"same"===(v=b.get("outerBoundsMode",!0))?y=g.clone():(null==v||"auto"===v)&&(y=fe(b.get("outerBounds",!0)||_8,_.refContainer)),{outerBoundsRect:y,parsedOuterBoundsContain:null==(F=b.get("outerBoundsContain",!0))||"auto"===F||0>rk(["all","axisLabel"],F)?"all":F,outerBoundsClamp:[l9(rV(b.get("outerBoundsClampWidth",!0),_7["0"]),g.width),l9(rV(b.get("outerBoundsClampHeight",!0),_7["1"]),g.height)]}),w=x.outerBoundsRect,k=x.parsedOuterBoundsContain,E=x.outerBoundsClamp;w&&(c=Fn(w,k,E,o,r,l,i))}Fi(o,r,vu.determine,null,c,i)}rM(this._coordsList,function(e){e.calcAffineTransform()})},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(null!=n)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}rB(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,o=this._coordsList;i<o.length;i++)if(o[i].getAxis("x").index===e||o[i].getAxis("y").index===t)return o[i]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var i=this._findConvertTarget(t);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var i=this._findConvertTarget(t);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t,n,i=e.seriesModel,o=e.xAxisModel||i&&i.getReferringComponents("xAxis",cA).models[0],r=e.yAxisModel||i&&i.getReferringComponents("yAxis",cA).models[0],a=e.gridModel,s=this._coordsList;return i?0>rk(s,t=i.coordinateSystem)&&(t=null):o&&r?t=this.getCartesian(o.componentIndex,r.componentIndex):o?n=this.getAxis("x",o.componentIndex):r?n=this.getAxis("y",r.componentIndex):a&&a.coordinateSystem===this&&(t=this._coordsList[0]),{cartesian:t,axis:n}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var i=this,o=this,r={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},s={x:0,y:0};if(t.eachComponent("xAxis",l("x"),this),t.eachComponent("yAxis",l("y"),this),!s.x||!s.y){this._axesMap={},this._axesList=[];return}function l(t){return function(n,i){if(v8(n,e)){var l=n.get("position");"x"===t?"top"!==l&&"bottom"!==l&&(l=r.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=r.left?"right":"left"),r[l]=!0;var c=new vT(t,function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new yk({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new yW({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(yw.getClass(t)||yE)}}(n),[0,0],n.get("type"),l),d="category"===c.type;c.onBand=d&&n.get("boundaryGap"),c.inverse=n.get("inverse"),n.axis=c,c.model=n,c.grid=o,c.index=i,o._axesList.push(c),a[t][i]=c,s[t]++}}}this._axesMap=a,rM(a.x,function(t,n){rM(a.y,function(o,r){var a="x"+n+"y"+r,s=new vl(a);s.master=i,s.model=e,i._coordsMap[a]=s,i._coordsList.push(s),s.addAxis(t),s.addAxis(o)})})},e.prototype._updateScale=function(e,t){function n(e,t){rM(vt(e,t.dim),function(n){t.scale.unionExtentFromData(e,n)})}rM(this._axesList,function(e){if(e.scale.setExtent(1/0,-1/0),"category"===e.type){var t=e.model.get("categorySortInfo");e.scale.setSortInfo(t)}}),e.eachSeries(function(e){if(e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type){var i=v3(e),o=i.xAxisModel,r=i.yAxisModel;if(v8(o,t)&&v8(r,t)){var a=this.getCartesian(o.componentIndex,r.componentIndex),s=e.getData(),l=a.getAxis("x"),c=a.getAxis("y");n(s,l),n(s,c)}}},this)},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return rM(this.getCartesians(),function(i){var o=null!=e&&"auto"!==e?i.getAxis(e):i.getBaseAxis(),r=i.getOtherAxis(o);0>rk(t,o)&&t.push(o),0>rk(n,r)&&n.push(r)}),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var i=[];return t.eachComponent("grid",function(o,r){var a=new e(o,t,n);a.name="grid_"+r,a.resize(o,n,!0),o.coordinateSystem=a,i.push(a)}),t.eachSeries(function(e){!function(e){var t=e.targetModel,n=e.coordSysType,i=e.coordSysProvider,o=e.isDefaultDataCoordSys;e.allowNotFound;var r=function(e,t){var n=e.getShallow("coordinateSystem"),i=e.getShallow("coordinateSystemUsage",!0),o=m6.none;if(n){var r="series"===e.mainType;(null==i&&(i=r?"data":"box"),"data"===i)?(o=m6.dataCoordSys,r||(o=m6.none)):"box"!==i||(o=m6.boxCoordSys,r||m1[n])||(o=m6.none)}return{coordSysType:n,kind:o}}(t,0),a=r.kind,s=r.coordSysType;if(o&&a!==m6.dataCoordSys&&(a=m6.dataCoordSys,s=n),a!==m6.none&&s===n){var l=i(n,t);l&&(a===m6.dataCoordSys?t.coordinateSystem=l:t.boxCoordinateSystem=l)}}({targetModel:e,coordSysType:"cartesian2d",coordSysProvider:function(){var t=v3(e),n=t.xAxisModel,i=t.yAxisModel;return n.getCoordSysModel().coordinateSystem.getCartesian(n.componentIndex,i.componentIndex)}})}),i},e.dimensions=va,e}();function v8(e,t){return e.getCoordSysModel()===t}function v7(e,t,n,i){n.getAxesOnZeroOf=function(){return o?[o]:[]};var o,r=e[t],a=n.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)v9(r[l])&&(o=r[l]);else for(var c in r)if(r.hasOwnProperty(c)&&v9(r[c])&&!i[d(r[c])]){o=r[c];break}o&&(i[d(o)]=!0)}function d(e){return e.dim+"_"+e.index}}function v9(e){var t,n,i;return e&&"category"!==e.type&&"time"!==e.type&&(n=(t=e.scale.getExtent())[0],i=t[1],!(n>0&&i>0||n<0&&i<0))}function Fe(e,t){rM(e.x,function(e){return Ft(e,t.x,t.width)}),rM(e.y,function(e){return Ft(e,t.y,t.height)})}function Ft(e,t,n){var i,o,r=[0,n],a=+!!e.inverse;e.setExtent(r[a],r[1-a]),o=(i=e.getExtent())[0]+i[1],e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return o-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return o-e+t}}function Fn(e,t,n,i,o,r,a){Fi(i,o,vu.estimate,t,!1,a);var s=[0,0,0,0];c(0),c(1),d(i,0,NaN),d(i,1,NaN);var l=null==function(e,t,n){if(e&&t){for(var i=0,o=e.length;i<o;i++)if(t.call(void 0,e[i],i,e))return e[i]}}(s,function(e){return e>0});return b0(i,s,!0,!0,n),Fe(o,i),l;function c(e){rM(o[bD[e]],function(t){if(vi(t.model)){var n=r.ensureRecord(t.model),i=n.labelInfoList;if(i)for(var o=0;o<i.length;o++){var a=i[o],s=t.scale.normalize(vN(a.label).tickValue);s=1===e?1-s:s,d(a.rect,e,s),d(a.rect,1-e,NaN)}var l=n.nameLayout;if(l){var s=vn(n.nameLocation)?.5:NaN;d(l.rect,e,s),d(l.rect,1-e,NaN)}}})}function d(t,n,i){var o=e[bD[n]]-t[bD[n]],r=t[bS[n]]+t[bD[n]]-(e[bS[n]]+e[bD[n]]);o=u(o,1-i),r=u(r,i);var a=v4[n][0],l=v4[n][1];s[a]=l4(s[a],o),s[l]=l4(s[l],r)}function u(e,t){return e>0&&t==t&&t>1e-4&&(e/=t),e}}function Fi(e,t,n,i,o,r){var a=n===vu.determine;rM(t,function(t){return rM(t,function(t){if(vi(t.model)){var n,i;n=t.axisBuilder,i=v5(e,t.model),n.updateCfg(i),t.axisBuilder.build(a?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:o})}})});var s={x:0,y:0};function l(t){s[bD[1-t]]=e[bS[t]]<=.5*r.refContainer[bS[t]]?0:1-t==1?2:1}l(0),l(1),rM(t,function(e,t){return rM(e,function(e){vi(e.model)&&(("all"===i||a)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),a&&e.axisBuilder.build({axisLine:!0}))})})}var Fo=function(e,t,n,i,o,r){var a="x"===n.axis.dim?"y":"x";vU(e,t,n,i,o,r),vn(e.nameLocation)||rM(t.recordMap[a],function(e){e&&e.labelInfoList&&e.dirVec&&vV(e.labelInfoList,e.dirVec,i,o)})};function Fr(e,t){return"all"===e||rO(e)&&rk(e,t)>=0||e===t}function Fa(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[Fl(e)]}function Fs(e){return!!e.get(["handle","show"])}function Fl(e){return e.type+"||"+e.id}var Fc={},Fd=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.prototype.render=function(t,n,i,o){this.axisPointerClass&&function(e){var t=Fa(e);if(t){var n=t.axisPointerModel,i=t.axis.scale,o=n.option,r=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=Fs(n);null==r&&(o.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),o.value=a,s&&(o.status=t.axis.scale.isBlank()?"hide":"show")}}(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,i,!0)},t.prototype.updateAxisPointer=function(e,t,n,i){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,i){var o=t.getAxisPointerClass(this.axisPointerClass);if(o){var r,a=(r=Fa(e))&&r.axisPointerModel;a?(this._axisPointer||(this._axisPointer=new o)).render(e,a,n,i):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){Fc[e]=t},t.getAxisPointerClass=function(e){return e&&Fc[e]},t.type="axis",t}(ha),Fu=ck(),Fm=["splitArea","splitLine","minorSplitLine","breakArea"],Ff=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="CartesianAxisPointer",n}return rt(t,e),t.prototype.render=function(t,n,i,o){this.group.removeAll();var r=this._axisGroup;this._axisGroup=new lQ,this.group.add(this._axisGroup),vi(t)&&(this._axisGroup.add(t.axis.axisBuilder.group),rM(Fm,function(e){t.get([e,"show"])&&Fp[e](this,this._axisGroup,t,t.getCoordSysModel(),i)},this),o&&"changeAxisOrder"===o.type&&o.isInitSort||bq(r,this._axisGroup,t),e.prototype.render.call(this,t,n,i,o))},t.prototype.remove=function(){Fu(this).splitAreaColors=null},t.type="cartesianAxis",t}(Fd),Fp={splitLine:function(e,t,n,i,o){var r=n.axis;if(!r.scale.isBlank()){var a=n.getModel("splitLine"),s=a.getModel("lineStyle"),l=s.get("color"),c=!1!==a.get("showMinLine"),d=!1!==a.get("showMaxLine");l=rO(l)?l:[l];for(var u=i.coordinateSystem.getRect(),m=r.isHorizontal(),f=0,p=r.getTicksCoords({tickModel:a,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),h=[],b=[],g=s.getLineStyle(),_=0;_<p.length;_++){var y=r.toGlobalCoord(p[_].coord);if((0!==_||c)&&(_!==p.length-1||d)){var v=p[_].tickValue;m?(h[0]=y,h[1]=u.y,b[0]=y,b[1]=u.y+u.height):(h[0]=u.x,h[1]=y,b[0]=u.x+u.width,b[1]=y);var F=f++%l.length,x=new h6({anid:null!=v?"line_"+v:null,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:b[0],y2:b[1]},style:rw({stroke:l[F]},g),silent:!0});bj(x.shape,g.lineWidth),t.add(x)}}}},minorSplitLine:function(e,t,n,i,o){var r=n.axis,a=n.getModel("minorSplitLine").getModel("lineStyle"),s=i.coordinateSystem.getRect(),l=r.isHorizontal(),c=r.getMinorTicksCoords();if(c.length)for(var d=[],u=[],m=a.getLineStyle(),f=0;f<c.length;f++)for(var p=0;p<c[f].length;p++){var h=r.toGlobalCoord(c[f][p].coord);l?(d[0]=h,d[1]=s.y,u[0]=h,u[1]=s.y+s.height):(d[0]=s.x,d[1]=h,u[0]=s.x+s.width,u[1]=h);var b=new h6({anid:"minor_line_"+c[f][p].tickValue,autoBatch:!0,shape:{x1:d[0],y1:d[1],x2:u[0],y2:u[1]},style:m,silent:!0});bj(b.shape,m.lineWidth),t.add(b)}},splitArea:function(e,t,n,i,o){!function(e,t,n,i){var o=n.axis;if(!o.scale.isBlank()){var r=n.getModel("splitArea"),a=r.getModel("areaStyle"),s=a.get("color"),l=i.coordinateSystem.getRect(),c=o.getTicksCoords({tickModel:r,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(c.length){var d=s.length,u=Fu(e).splitAreaColors,m=r1(),f=0;if(u)for(var p=0;p<c.length;p++){var h=u.get(c[p].tickValue);if(null!=h){f=(h+(d-1)*p)%d;break}}var b=o.toGlobalCoord(c[0].coord),g=a.getAreaStyle();s=rO(s)?s:[s];for(var p=1;p<c.length;p++){var _=o.toGlobalCoord(c[p].coord),y=void 0,v=void 0,F=void 0,x=void 0;o.isHorizontal()?(y=b,v=l.y,F=_-y,x=l.height,b=y+F):(y=l.x,v=b,F=l.width,x=_-v,b=v+x);var w=c[p-1].tickValue;null!=w&&m.set(w,f),t.add(new ut({anid:null!=w?"area_"+w:null,shape:{x:y,y:v,width:F,height:x},style:rw({fill:s[f]},g),autoBatch:!0,silent:!0})),f=(f+1)%d}Fu(e).splitAreaColors=m}}}(e,t,n,i)},breakArea:function(e,t,n,i,o){n.axis.scale}},Fh=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.type="xAxis",t}(Ff),Fb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=Fh.type,t}return rt(t,e),t.type="yAxis",t}(Ff),Fg=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="grid",t}return rt(t,e),t.prototype.render=function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new ut({shape:e.coordinateSystem.getRect(),style:rw({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(ha),F_={offset:0};function Fy(e){e.registerComponentView(Fg),e.registerComponentModel(_9),e.registerCoordinateSystem("cartesian2d",v6),ym(e,"x",yt,F_),ym(e,"y",yt,F_),e.registerComponentView(Fh),e.registerComponentView(Fb),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}var Fv=ck();function FF(e,t,n,i){!function e(t,n){if(!(rB(t)&&rB(n)))return t===n;var i=!0;return rM(n,function(n,o){i=i&&e(t[o],n)}),!!i}(Fv(n).lastProp,i)&&(Fv(n).lastProp=i,t?bw(n,i,e):(n.stopAnimation(),n.attr(i)))}function Fx(e,t){e[t.get(["label","show"])?"show":"hide"]()}function Fw(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function Fk(e,t,n){var i=t.get("z"),o=t.get("zlevel");e&&e.traverse(function(e){"group"!==e.type&&(null!=i&&(e.z=i),null!=o&&(e.zlevel=o),e.silent=n)})}function FE(e,t,n,i,o){e=t.scale.parse(e);var r=t.scale.getLabel({value:e},{precision:o.precision}),a=o.formatter;if(a){var s={value:y7(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};rM(i,function(e){var t=n.getSeriesByIndex(e.seriesIndex),i=e.dataIndexInside,o=t&&t.getDataParams(i);o&&s.seriesData.push(o)}),rY(a)?r=a.replace("{value}",r):rR(a)&&(r=a(s))}return r}function FT(e,t,n){var i=aL();return aP(i,i,n.rotation),aY(i,i,n.position),bG([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}var FM=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return rt(t,e),t.prototype.makeElOption=function(e,t,n,i,o){var r,a,s,l,c,d,u,m,f,p,h,b,g,_,y,v,F,x,w,k=n.axis,E=k.grid,T=i.get("type"),M=FA(E,k).getOtherAxis(k).getGlobalExtent(),A=k.toGlobalCoord(k.dataToCoord(t,!0));if(T&&"none"!==T){var C,D,S,L=(D=i.get("type"),S=i.getModel(D+"Style"),"line"===D?(C=S.getLineStyle()).fill=null:"shadow"===D&&((C=S.getAreaStyle()).stroke=null),C),I=FC[T](k,A,M);I.style=L,e.graphicKey=I.type,e.pointer=I}var O=v5(E.getRect(),n);u=vG.innerTextLayout(O.rotation,0,O.labelDirection),O.labelMargin=i.get(["label","margin"]),m={position:FT(n.axis,t,O),align:u.textAlign,verticalAlign:u.textVerticalAlign},f=FE(i.get("value"),n.axis,n.ecModel,i.get("seriesDataIndices"),{precision:i.get(["label","precision"]),formatter:i.get(["label","formatter"])}),h=rq((p=i.getModel("label")).get("padding")||0),g=lP(f,b=p.getFont()),_=m.position,y=g.width+h[1]+h[3],v=g.height+h[0]+h[2],"right"===(F=m.align)&&(_[0]-=y),"center"===F&&(_[0]-=y/2),"bottom"===(x=m.verticalAlign)&&(_[1]-=v),"middle"===x&&(_[1]-=v/2),r=_,a=y,s=v,c=(l=o).getWidth(),d=l.getHeight(),r[0]=Math.min(r[0]+a,c)-a,r[1]=Math.min(r[1]+s,d)-s,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0),(w=p.get("backgroundColor"))&&"auto"!==w||(w=n.get(["axisLine","lineStyle","color"])),e.label={x:_[0],y:_[1],style:u8(p,{text:f,font:b,fill:p.getTextColor(),padding:h,backgroundColor:w}),z2:10}},t.prototype.getHandleTransform=function(e,t,n){var i=v5(t.axis.grid.getRect(),t,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=FT(t.axis,e,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,i){var o=n.axis,r=o.grid,a=o.getGlobalExtent(!0),s=FA(r,o).getOtherAxis(o).getGlobalExtent(),l=+("x"!==o.dim),c=[e.x,e.y];c[l]+=t[l],c[l]=Math.min(a[1],c[l]),c[l]=Math.max(a[0],c[l]);var d=(s[1]+s[0])/2,u=[d,d];return u[l]=c[l],{x:c[0],y:c[1],rotation:e.rotation,cursorPoint:u,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},t}(function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,i){var o=t.get("value"),r=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,i||this._lastValue!==o||this._lastStatus!==r){this._lastValue=o,this._lastStatus=r;var a=this._group,s=this._handle;if(!r||"hide"===r){a&&a.hide(),s&&s.hide();return}a&&a.show(),s&&s.show();var l={};this.makeElOption(l,o,e,t,n);var c=l.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var d=this._moveAnimation=this.determineAnimation(e,t);if(a){var u=rI(FF,t,d);this.updatePointerEl(a,l,u),this.updateLabelEl(a,l,u,t)}else a=this._group=new lQ,this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);Fk(a,t,!0),this._renderHandle(o)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get("animation"),i=e.axis,o="category"===i.type,r=t.get("snap");if(!r&&!o)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(o&&i.getBandWidth()>a)return!0;if(r){var s=Fa(e).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},e.prototype.makeElOption=function(e,t,n,i,o){},e.prototype.createPointerEl=function(e,t,n,i){var o=t.pointer;if(o){var r=Fv(e).pointerEl=new ta[o.type](rv(t.pointer));e.add(r)}},e.prototype.createLabelEl=function(e,t,n,i){if(t.label){var o=Fv(e).labelEl=new ub(rv(t.label));e.add(o),Fx(o,i)}},e.prototype.updatePointerEl=function(e,t,n){var i=Fv(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),n(i,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,i){var o=Fv(e).labelEl;o&&(o.setStyle(t.label.style),n(o,{x:t.label.x,y:t.label.y}),Fx(o,i))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,i=this._api.getZr(),o=this._handle,r=n.getModel("handle"),a=n.get("status");if(!r.get("show")||!a||"hide"===a){o&&i.remove(o),this._handle=null;return}this._handle||(t=!0,o=this._handle=bJ(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){aM(e.event)},onmousedown:rL(this._onHandleDragMove,this,0,0),drift:rL(this._onHandleDragMove,this),ondragend:rL(this._onHandleDragEnd,this)}),i.add(o)),Fk(o,n,!1),o.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=r.get("size");rO(s)||(s=[s,s]),o.scaleX=s[0]/2,o.scaleY=s[1]/2,gh(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){FF(this._axisPointerModel,!t&&this._moveAnimation,this._handle,Fw(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(Fw(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(Fw(i)),Fv(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,i=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),gb(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},e}());function FA(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var FC={line:function(e,t,n){var i,o,r;return{type:"Line",subPixelOptimize:!0,shape:(i=[t,n[0]],o=[t,n[1]],{x1:i[r=(r=FD(e))||0],y1:i[1-r],x2:o[r],y2:o[1-r]})}},shadow:function(e,t,n){var i,o,r,a=Math.max(1,e.getBandWidth()),s=n[1]-n[0];return{type:"Rect",shape:(i=[t-a/2,n[0]],o=[a,s],{x:i[r=(r=FD(e))||0],y:i[1-r],width:o[r],height:o[1-r]})}}};function FD(e){return+("x"!==e.dim)}var FS=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:fl.color.border,width:1,type:"dashed"},shadowStyle:{color:fl.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:fl.color.neutral00,padding:[5,7,5,7],backgroundColor:fl.color.accent60,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:fl.color.accent40,throttle:40}},t}(fs),FL=ck();function FI(e,t,n){if(!ri.node){var i=t.getZr();FL(i).records||(FL(i).records={}),function(e,t){FL(e).initialized||(FL(e).initialized=!0,n("click",rI(FR,"click")),n("mousemove",rI(FR,"mousemove")),n("globalout",FO));function n(n,i){e.on(n,function(n){var o,r,a,s,l,c,d,u,m=(o=t,r={showTip:[],hideTip:[]},{dispatchAction:a=function(e){var t=r[e.type];t?t.push(e):(e.dispatchAction=a,o.dispatchAction(e))},pendings:r});rM(FL(e).records,function(e){e&&i(e,n,m.dispatchAction)}),s=m.pendings,l=t,d=s.showTip.length,u=s.hideTip.length,d?c=s.showTip[d-1]:u&&(c=s.hideTip[u-1]),c&&(c.dispatchAction=null,l.dispatchAction(c))})}}(i,t),(FL(i).records[e]||(FL(i).records[e]={})).handler=n}}function FO(e,t,n){e.handler("leave",null,n)}function FR(e,t,n,i){t.handler(e,n,i)}function FY(e,t){if(!ri.node){var n=t.getZr();(FL(n).records||{})[e]&&(FL(n).records[e]=null)}}var FP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.prototype.render=function(e,t,n){var i=t.getComponent("tooltip"),o=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";FI("axisPointer",n,function(e,t,n){"none"!==o&&("leave"===e||o.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){FY("axisPointer",t)},t.prototype.dispose=function(e,t){FY("axisPointer",t)},t.type="axisPointer",t}(ha);function FN(e,t){var n,i=[],o=e.seriesIndex;if(null==o||!(n=t.getSeriesByIndex(o)))return{point:[]};var r=n.getData(),a=cw(r,e);if(null==a||a<0||rO(a))return{point:[]};var s=r.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(e.isStacked){var c=l.getBaseAxis(),d=l.getOtherAxis(c).dim,u=c.dim,m=+("x"===d||"radius"===d),f=r.mapDimension(u),p=[];p[m]=r.get(f,a),p[1-m]=r.get(r.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(p)||[]}else i=l.dataToPoint(r.getValues(rA(l.dimensions,function(e){return r.mapDimension(e)}),a))||[];else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),i=[h.x+h.width/2,h.y+h.height/2]}return{point:i,el:s}}var FB=ck();function FH(e,t,n){var i=e.currTrigger,o=[e.x,e.y],r=e.dispatchAction||rL(n.dispatchAction,n),a=t.getComponent("axisPointer").coordSysAxesInfo;if(a){FV(o)&&(o=FN({seriesIndex:e.seriesIndex,dataIndex:e.dataIndex},t).point);var s,l,c,d,u,m,f,p,h,b,g,_=FV(o),y=e.axesInfo,v=a.axesInfo,F="leave"===i||FV(o),x={},w={},k={list:[],map:{}},E={showPointer:rI(Fj,w),showTooltip:rI(FU,k)};rM(a.coordSysMap,function(e,t){var n=_||e.containPoint(o);rM(a.coordSysAxesInfo[t],function(e,t){var i=e.axis,r=function(e,t){for(var n=0;n<(e||[]).length;n++){var i=e[n];if(t.axis.dim===i.axisDim&&t.axis.model.componentIndex===i.axisIndex)return i}}(y,e);if(!F&&n&&(!y||r)){var a=r&&r.value;null!=a||_||(a=i.pointToData(o)),null!=a&&Fz(e,a,E,!1,x)}})});var T={};return rM(v,function(e,t){var n=e.linkGroup;n&&!w[t]&&rM(n.axesInfo,function(t,i){var o=w[i];if(t!==e&&o){var r=o.value;n.mapper&&(r=e.axis.scale.parse(n.mapper(r,FW(t),FW(e)))),T[e.key]=r}})}),rM(T,function(e,t){Fz(v[t],e,E,!0,x)}),s=w,l=v,c=x.axesInfo=[],rM(l,function(e,t){var n=e.axisPointerModel.option,i=s[t];i?(e.useHandle||(n.status="show"),n.value=i.value,n.seriesDataIndices=(i.payloadBatch||[]).slice()):e.useHandle||(n.status="hide"),"show"===n.status&&c.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:n.value})}),function(e,t,n,i){if(FV(t)||!e.list.length)return i({type:"hideTip"});var o=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:e.list})}(k,o,e,r),d=v,m=(u=n).getZr(),f="axisPointerLastHighlights",p=FB(m)[f]||{},h=FB(m)[f]={},rM(d,function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&rM(n.seriesDataIndices,function(e){h[e.seriesIndex+" | "+e.dataIndex]=e})}),b=[],g=[],rM(p,function(e,t){h[t]||g.push(e)}),rM(h,function(e,t){p[t]||b.push(e)}),g.length&&u.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:g}),b.length&&u.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:b}),x}}function Fz(e,t,n,i,o){var r=e.axis;if(!r.scale.isBlank()&&r.containData(t)){if(!e.involveSeries)return void n.showPointer(e,t);var a,s,l,c,d,u,m,f,p=(a=t,c=(l=(s=e).axis).dim,d=a,u=[],m=Number.MAX_VALUE,f=-1,rM(s.seriesModels,function(e,t){var n,i,o=e.getData().mapDimensionsAll(c);if(e.getAxisTooltipData){var r=e.getAxisTooltipData(o,a,l);i=r.dataIndices,n=r.nestestValue}else{if(!(i=e.indicesOfNearest(c,o[0],a,"category"===l.type?.5:null)).length)return;n=e.getData().get(o[0],i[0])}if(null!=n&&isFinite(n)){var s=a-n,p=Math.abs(s);p<=m&&((p<m||s>=0&&f<0)&&(m=p,f=s,d=n,u.length=0),rM(i,function(t){u.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:u,snapToValue:d}),h=p.payloadBatch,b=p.snapToValue;h[0]&&null==o.seriesIndex&&rx(o,h[0]),!i&&e.snap&&r.containData(b)&&null!=b&&(t=b),n.showPointer(e,t,h),n.showTooltip(e,p,b)}}function Fj(e,t,n,i){e[t.key]={value:n,payloadBatch:i}}function FU(e,t,n,i){var o=n.payloadBatch,r=t.axis,a=r.model,s=t.axisPointerModel;if(t.triggerTooltip&&o.length){var l=t.coordSys.model,c=Fl(l),d=e.map[c];d||(d=e.map[c]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(d)),d.dataByAxis.push({axisDim:r.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:o.slice()})}}function FW(e){var t=e.axis.model,n={},i=n.axisDim=e.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=t.componentIndex,n.axisName=n[i+"AxisName"]=t.name,n.axisId=n[i+"AxisId"]=t.id,n}function FV(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function FG(e){Fd.registerAxisPointerClass("CartesianAxisPointer",FM),e.registerComponentModel(FS),e.registerComponentView(FP),e.registerPreprocessor(function(e){if(e){e.axisPointer&&0!==e.axisPointer.length||(e.axisPointer={});var t=e.axisPointer.link;t&&!rO(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(e,t){var n,i,o,r,a,s,l,c,d;e.getComponent("axisPointer").coordSysAxesInfo=(i=n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}},o=e,r=t,a=o.getComponent("tooltip"),l=(s=o.getComponent("axisPointer")).get("link",!0)||[],c=[],rM(r.getCoordinateSystems(),function(e){if(e.axisPointerEnabled){var t=Fl(e.model),n=i.coordSysAxesInfo[t]={};i.coordSysMap[t]=e;var r=e.model.getModel("tooltip",a);if(rM(e.getAxes(),rI(f,!1,null)),e.getTooltipAxes&&a&&r.get("show")){var d="axis"===r.get("trigger"),u="cross"===r.get(["axisPointer","type"]),m=e.getTooltipAxes(r.get(["axisPointer","axis"]));(d||u)&&rM(m.baseAxes,rI(f,!u||"cross",d)),u&&rM(m.otherAxes,rI(f,"cross",!1))}}function f(t,a,d){var u=d.model.getModel("axisPointer",s),m=u.get("show");if(m&&("auto"!==m||t||Fs(u))){null==a&&(a=u.get("triggerTooltip"));var f=(u=t?function(e,t,n,i,o,r){var a=t.getModel("axisPointer"),s={};rM(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(e){s[e]=rv(a.get(e))}),s.snap="category"!==e.type&&!!r,"cross"===a.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===o){var c=a.get(["label","show"]);if(l.show=null==c||c,!r){var d=s.lineStyle=a.get("crossStyle");d&&rw(l,d.textStyle)}}return e.model.getModel("axisPointer",new mh(s,n,i))}(d,r,s,o,t,a):u).get("snap"),p=u.get("triggerEmphasis"),h=Fl(d.model),b=a||f||"category"===d.type,g=i.axesInfo[h]={key:h,axis:d,coordSys:e,axisPointerModel:u,triggerTooltip:a,triggerEmphasis:p,involveSeries:b,snap:f,useHandle:Fs(u),seriesModels:[],linkGroup:null};n[h]=g,i.seriesInvolved=i.seriesInvolved||b;var _=function(e,t){for(var n=t.model,i=t.dim,o=0;o<e.length;o++){var r=e[o]||{};if(Fr(r[i+"AxisId"],n.id)||Fr(r[i+"AxisIndex"],n.componentIndex)||Fr(r[i+"AxisName"],n.name))return o}}(l,d);if(null!=_){var y=c[_]||(c[_]={axesInfo:{}});y.axesInfo[h]=g,y.mapper=l[_].mapper,g.linkGroup=y}}}}),n.seriesInvolved&&(d=n,e.eachSeries(function(e){var t=e.coordinateSystem,n=e.get(["tooltip","trigger"],!0),i=e.get(["tooltip","show"],!0);t&&t.model&&"none"!==n&&!1!==n&&"item"!==n&&!1!==i&&!1!==e.get(["axisPointer","show"],!0)&&rM(d.coordSysAxesInfo[Fl(t.model)],function(n){var i=n.axis;t.getAxis(i.dim)===i&&(n.seriesModels.push(e),null==n.seriesDataCount&&(n.seriesDataCount=0),n.seriesDataCount+=e.getData().count())})})),n)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},FH)}var F$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:fl.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:fl.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:fl.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:fl.color.tertiary,fontSize:14}},t}(fs);function Fq(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function FX(e){if(ri.domSupported){for(var t=document.documentElement.style,n=0,i=e.length;n<i;n++)if(e[n]in t)return e[n]}}var FK=FX(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function FJ(e,t){if(!e)return t;t=mX(t,!0);var n=e.indexOf(t);return(e=-1===n?t:"-"+e.slice(0,n)+"-"+t).toLowerCase()}var FZ=FJ(FX(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),FQ=FJ(FK,"transform"),F0="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(ri.transform3dSupported?"will-change:transform;":"");function F1(e,t,n){var i=e.toFixed(0)+"px",o=t.toFixed(0)+"px";if(!ri.transformSupported)return n?"top:"+o+";left:"+i+";":[["top",o],["left",i]];var r=ri.transform3dSupported,a="translate"+(r?"3d":"")+"("+i+","+o+(r?",0":"")+")";return n?"top:0;left:0;"+FQ+":"+a+";":[["top",0],["left",0],[FK,a]]}function F2(e,t,n,i,o){var r=t&&t.painter;if(n){var a=r&&r.getViewportRoot();a&&ah(ap,a,i,o,!0)&&ah(e,n,ap[0],ap[1])}else{e[0]=i,e[1]=o;var s=r&&r.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var F5=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,ri.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=e.getZr(),o=t.appendTo,r=o&&(rY(o)?document.querySelector(o):rj(o)?o:rR(o)&&o(e.getDom()));F2(this._styleCoord,i,r,e.getWidth()/2,e.getHeight()/2),(r||e.getDom()).appendChild(n),this._api=e,this._container=r;var a=this;n.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!a._enterable){var t=i.handler;aT(i.painter.getViewportRoot(),e,!0),t.dispatch("mousemove",e)}},n.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t,n,i=this._api.getDom(),o=(t="position",(n=i.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(i))?t?n[t]:n:null),r=i.style;"absolute"!==r.position&&"absolute"!==o&&(r.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n,i,o,r,a,s,l,c,d,u,m,f,p,h,b,g,_,y,v,F,x,w,k,E,T=this.el,M=T.style,A=this._styleCoord;T.innerHTML?M.cssText=F0+(n=!this._firstShow,i=this._longHide,o=this._enableDisplayTransition,r=[],a=e.get("transitionDuration"),s=e.get("backgroundColor"),l=e.get("shadowBlur"),c=e.get("shadowColor"),d=e.get("shadowOffsetX"),u=e.get("shadowOffsetY"),m=e.getModel("textStyle"),f=p5(e,"html"),p=d+"px "+u+"px "+l+"px "+c,r.push("box-shadow:"+p),n&&a>0&&r.push((h="cubic-bezier(0.23,1,0.32,1)",b="",g="",o&&(g="opacity"+(b=" "+a/2+"s "+h)+",visibility"+b),i||(b=" "+a+"s "+h,g+=(g.length?",":"")+(ri.transformSupported?""+FQ+b:",left"+b+",top"+b)),FZ+":"+g)),s&&r.push("background-color:"+s),rM(["width","color","radius"],function(t){var n="border-"+t,i=mX(n),o=e.get(i);null!=o&&r.push(n+":"+o+("color"===t?"":"px"))}),r.push((_=[],y=m.get("fontSize"),(v=m.getTextColor())&&_.push("color:"+v),_.push("font:"+m.getFont()),F=rV(m.get("lineHeight"),Math.round(3*y/2)),y&&_.push("line-height:"+F+"px"),x=m.get("textShadowColor"),w=m.get("textShadowBlur")||0,k=m.get("textShadowOffsetX")||0,E=m.get("textShadowOffsetY")||0,x&&w&&_.push("text-shadow:"+k+"px "+E+"px "+w+"px "+x),rM(["decoration","align"],function(e){var t=m.get(e);t&&_.push("text-"+e+":"+t)}),_.join(";"))),null!=f&&r.push("padding:"+rq(f).join("px ")+"px"),r.join(";")+";")+F1(A[0],A[1],!0)+"border-color:"+m0(t)+";"+(e.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):M.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,i,o){var r=this.el;if(null==e){r.innerHTML="";return}var a="";if(rY(o)&&"item"===n.get("trigger")&&!Fq(n)&&(a=function(e,t,n){if(!rY(n)||"inside"===n)return"";var i,o,r=e.get("backgroundColor"),a=e.get("borderWidth");t=m0(t);var s=i="left"===(i=n)?"right":"right"===i?"left":"top"===i?"bottom":"top",l=Math.max(1.5*Math.round(a),6),c="",d=FQ+":";rk(["left","right"],s)>-1?(c+="top:50%",d+="translateY(-50%) rotate("+(o="left"===s?-225:-45)+"deg)"):(c+="left:50%",d+="translateX(-50%) rotate("+(o="top"===s?225:45)+"deg)");var u=o*Math.PI/180,m=l+a,f=m*Math.abs(Math.cos(u))+m*Math.abs(Math.sin(u));c+=";"+s+":-"+Math.round(((f-Math.SQRT2*a)/2+Math.SQRT2*a-(f-m)/2)*100)/100+"px";var p=t+" solid "+a+"px;";return'<div style="'+["position:absolute;width:"+l+"px;height:"+l+"px;z-index:-1;",c+";"+d+";","border-bottom:"+p,"border-right:"+p,"background-color:"+r+";"].join("")+'"></div>'}(n,i,o)),rY(e))r.innerHTML=e+a;else if(e){r.innerHTML="",rO(e)||(e=[e]);for(var s=0;s<e.length;s++)rj(e[s])&&e[s].parentNode!==r&&r.appendChild(e[s]);if(a&&r.childNodes.length){var l=document.createElement("div");l.innerHTML=a,r.appendChild(l)}}},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},e.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(F2(n,this._zr,this._container,e,t),null!=n[0]&&null!=n[1]){var i=this.el.style;rM(F1(n[0],n[1]),function(e){i[e[0]]=e[1]})}}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility="hidden",t.opacity="0"):t.display="none",ri.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(rL(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;!function(e,t){function n(e){var t=e[af];t&&(t.clearMarkers&&t.clearMarkers(),delete e[af])}e&&n(e),t&&n(t)}(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var n=t.parentNode;n&&n.removeChild(t)}this.el=this._container=null},e}(),F3=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),F8(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,i,o){var r=this;rB(e)&&pa(""),this.el&&this._zr.remove(this.el);var a=n.getModel("textStyle");this.el=new ub({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:p5(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),rM(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(e){r.el.style[e]=n.get(e)}),rM(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(e){r.el.style[e]=a.get(e)||0}),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})},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=F6(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var i=this._styleCoord;F8(i,this._zr,e,t),e=i[0],t=i[1];var o=n.style,r=F4(o.borderWidth||0),a=F6(o);n.x=e+r+a.left,n.y=t+r+a.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(rL(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function F4(e){return Math.max(0,e)}function F6(e){var t=F4(e.shadowBlur||0),n=F4(e.shadowOffsetX||0),i=F4(e.shadowOffsetY||0);return{left:F4(t-n),right:F4(t+n),top:F4(t-i),bottom:F4(t+i)}}function F8(e,t,n,i){e[0]=n,e[1]=i,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var F7=new ut({shape:{x:-1,y:-1,width:2,height:2}}),F9=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.prototype.init=function(e,t){if(!ri.node&&t.getDom()){var n,i=e.getComponent("tooltip"),o=this._renderMode="auto"===(n=i.get("renderMode"))?ri.domSupported?"html":"richText":n||"html";this._tooltipContent="richText"===o?new F3(t):new F5(t,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},t.prototype.render=function(e,t,n){if(!ri.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var i=this._tooltipContent;i.update(e),i.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&e.get("transitionDuration")?gh(this,"_updatePosition",50,"fixRate"):gb(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");FI("itemTooltip",this._api,rL(function(t,n,i){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,i):"leave"===t&&this._hide(i))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,i=e.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){n.isDisposed()||o.manuallyShowTip(e,t,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,i){if(i.from!==this.uid&&!ri.node&&n.getDom()){var o=xt(i,n);this._ticket="";var r=i.dataByCoordSys,a=function(e,t,n){var i,o=cM(e).queryOptionMap,r=o.keys()[0];if(r&&"series"!==r){var a=cD(t,r,o.get(r),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a&&(n.getViewOfComponentModel(a).group.traverse(function(t){var n=ug(t).tooltipConfig;if(n&&n.name===e.name)return i=t,!0}),i))return{componentMainType:r,componentIndex:a.componentIndex,el:i}}}(i,t,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&null!=i.x&&null!=i.y)F7.x=i.x,F7.y=i.y,F7.update(),ug(F7).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:F7},o);else if(r)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:r,tooltipOption:i.tooltipOption},o);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,i))return;var l=FN(i,t),c=l.point[0],d=l.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:l.el,position:i.position,positionDefault:"bottom"},o)}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},o))}},t.prototype.manuallyHideTip=function(e,t,n,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(xt(i,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,i){var o=i.seriesIndex,r=i.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=r&&null!=a){var s=t.getSeriesByIndex(o);if(s&&"axis"===xe([s.getData().getItemModel(r),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:r,position:i.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var i,o,r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if("legend"===ug(n).ssrType)return;this._lastDataByCoordSys=null,gG(n,function(e){if(e.tooltipDisabled)return i=o=null,!0;i||o||(null!=ug(e).dataIndex?i=e:null!=ug(e).tooltipConfig&&(o=e))},!0),i?this._showSeriesItemTooltip(e,i,t):o?this._showComponentItemTooltip(e,o,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=rL(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,i=this._tooltipModel,o=[t.offsetX,t.offsetY],r=xe([t.tooltipOption],i),a=this._renderMode,s=[],l=pK("section",{blocks:[],noHeader:!0}),c=[],d=new p3;rM(e,function(e){rM(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),o=e.value;if(t&&null!=o){var r=FE(o,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),u=pK("section",{header:r,noHeader:!rK(r),sortBlocks:!0,blocks:[]});l.blocks.push(u),rM(e.seriesDataIndices,function(l){var m=n.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,p=m.getDataParams(f);if(!(p.dataIndex<0)){p.axisDim=e.axisDim,p.axisIndex=e.axisIndex,p.axisType=e.axisType,p.axisId=e.axisId,p.axisValue=y7(t.axis,{value:o}),p.axisValueLabel=r,p.marker=d.makeTooltipMarker("item",m0(p.color),a);var h=py(m.formatTooltip(f,!0,null)),b=h.frag;if(b){var g=xe([m],i).get("valueFormatter");u.blocks.push(g?rx({valueFormatter:g},b):b)}h.text&&c.push(h.text),s.push(p)}})}})}),l.blocks.reverse(),c.reverse();var u=t.position,m=p0(l,d,a,r.get("order"),n.get("useUTC"),r.get("textStyle"));m&&c.unshift(m);var f="richText"===a?"\n\n":"<br/>",p=c.join(f);this._showOrMove(r,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(r,u,o[0],o[1],this._tooltipContent,s):this._showTooltipContent(r,p,s,Math.random()+"",o[0],o[1],u,null,d)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var i=this._ecModel,o=ug(t),r=o.seriesIndex,a=i.getSeriesByIndex(r),s=o.dataModel||a,l=o.dataIndex,c=o.dataType,d=s.getData(c),u=this._renderMode,m=e.positionDefault,f=xe([d.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,m?{position:m}:null),p=f.get("trigger");if(null==p||"item"===p){var h=s.getDataParams(l,c),b=new p3;h.marker=b.makeTooltipMarker("item",m0(h.color),u);var g=py(s.formatTooltip(l,!1,c)),_=f.get("order"),y=f.get("valueFormatter"),v=g.frag,F=v?p0(y?rx({valueFormatter:y},v):v,b,u,_,i.get("useUTC"),f.get("textStyle")):g.text,x="item_"+s.name+"_"+l;this._showOrMove(f,function(){this._showTooltipContent(f,F,h,x,e.offsetX,e.offsetY,e.position,e.target,b)}),n({type:"showTip",dataIndexInside:l,dataIndex:d.getRawIndex(l),seriesIndex:r,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var i="html"===this._renderMode,o=ug(t),r=o.tooltipConfig.option||{},a=r.encodeHTMLContent;if(rY(r)){var s=r;r={content:s,formatter:s},a=!0}a&&i&&r.content&&((r=rv(r)).content=ay(r.content));var l=[r],c=this._ecModel.getComponent(o.componentMainType,o.componentIndex);c&&l.push(c),l.push({formatter:r.content});var d=e.positionDefault,u=xe(l,this._tooltipModel,d?{position:d}:null),m=u.get("content"),f=Math.random()+"",p=new p3;this._showOrMove(u,function(){var n=rv(u.get("formatterParams")||{});this._showTooltipContent(u,m,n,f,e.offsetX,e.offsetY,e.position,t,p)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,i,o,r,a,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var c=this._tooltipContent;c.setEnterable(e.get("enterable"));var d=e.get("formatter");a=a||e.get("position");var u=t,m=this._getNearestPoint([o,r],n,e.get("trigger"),e.get("borderColor"),e.get("defaultBorderColor",!0)).color;if(d)if(rY(d)){var f=e.ecModel.get("useUTC"),p=rO(n)?n[0]:n,h=p&&p.axisType&&p.axisType.indexOf("time")>=0;u=d,h&&(u=mL(p.axisValue,u,f)),u=mQ(u,n,!0)}else if(rR(d)){var b=rL(function(t,i){t===this._ticket&&(c.setContent(i,l,e,m,a),this._updatePosition(e,a,o,r,c,n,s))},this);this._ticket=i,u=d(n,i,b)}else u=d;c.setContent(u,l,e,m,a),c.show(e,m),this._updatePosition(e,a,o,r,c,n,s)}},t.prototype._getNearestPoint=function(e,t,n,i,o){return"axis"===n||rO(t)?{color:i||o}:rO(t)?void 0:{color:i||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,i,o,r,a){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var c=o.getSize(),d=e.get("align"),u=e.get("verticalAlign"),m=a&&a.getBoundingRect().clone();if(a&&m.applyTransform(a.transform),rR(t)&&(t=t([n,i],r,o.el,m,{viewSize:[s,l],contentSize:c.slice()})),rO(t))n=l7(t[0],s),i=l7(t[1],l);else if(rB(t)){var f=t;f.width=c[0],f.height=c[1];var p=fe(f,{width:s,height:l});n=p.x,i=p.y,d=null,u=null}else if(rY(t)&&a){var h=function(e,t,n,i){var o=n[0],r=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,c=t.width,d=t.height;switch(e){case"inside":s=t.x+c/2-o/2,l=t.y+d/2-r/2;break;case"top":s=t.x+c/2-o/2,l=t.y-r-a;break;case"bottom":s=t.x+c/2-o/2,l=t.y+d+a;break;case"left":s=t.x-o-a,l=t.y+d/2-r/2;break;case"right":s=t.x+c+a,l=t.y+d/2-r/2}return[s,l]}(t,m,c,e.get("borderWidth"));n=h[0],i=h[1]}else{var b,g,_,y,v,F,x,w,k,E,h=(b=n,g=i,_=o,y=s,v=l,F=d?null:20,x=u?null:20,k=(w=_.getSize())[0],E=w[1],null!=F&&(b+k+F+2>y?b-=k+F:b+=F),null!=x&&(g+E+x>v?g-=E+x:g+=x),[b,g]);n=h[0],i=h[1]}if(d&&(n-=xn(d)?c[0]/2:"right"===d?c[0]:0),u&&(i-=xn(u)?c[1]/2:"bottom"===u?c[1]:0),Fq(e)){var T,M,A,C,D,S,L,I,h=(T=n,M=i,A=o,C=s,D=l,L=(S=A.getSize())[0],I=S[1],T=Math.min(T+L,C)-L,M=Math.min(M+I,D)-I,[T=Math.max(T,0),M=Math.max(M,0)]);n=h[0],i=h[1]}o.moveTo(n,i)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===e.length;return o&&rM(n,function(n,r){var a=n.dataByAxis||[],s=(e[r]||{}).dataByAxis||[];(o=o&&a.length===s.length)&&rM(a,function(e,n){var r=s[n]||{},a=e.seriesDataIndices||[],l=r.seriesDataIndices||[];(o=o&&e.value===r.value&&e.axisType===r.axisType&&e.axisId===r.axisId&&a.length===l.length)&&rM(a,function(e,t){var n=l[t];o=o&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),i&&rM(e.seriesDataIndices,function(e){var n=e.seriesIndex,r=t[n],a=i[n];r&&a&&a.data!==r.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!ri.node&&t.getDom()&&(gb(this,"_updatePosition"),this._tooltipContent.dispose(),FY("itemTooltip",t))},t.type="tooltip",t}(ha);function xe(e,t,n){var i,o=t.ecModel;n?(i=new mh(n,o,o),i=new mh(t.option,i,o)):i=t;for(var r=e.length-1;r>=0;r--){var a=e[r];a&&(a instanceof mh&&(a=a.get("tooltip",!0)),rY(a)&&(a={formatter:a}),a&&(i=new mh(a,i,o)))}return i}function xt(e,t){return e.dispatchAction||rL(t.dispatchAction,t)}function xn(e){return"center"===e||"middle"===e}var xi=["x","y","radius","angle","single"],xo=["cartesian2d","polar","singleAxis"];function xr(e){return e+"Axis"}function xa(e){var t=e.ecModel,n={infoList:[],infoMap:r1()};return e.eachTargetAxis(function(e,i){var o=t.getComponent(xr(e),i);if(o){var r=o.getCoordSysModel();if(r){var a=r.uid,s=n.infoMap.get(a);s||(s={model:r,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(o)}}}),n}var xs=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),xl=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return rt(t,e),t.prototype.init=function(e,t,n){var i=xc(e);this.settledOption=i,this.mergeDefaultAndTheme(e,n),this._doInit(i)},t.prototype.mergeOption=function(e){var t=xc(e);rF(this.option,e,!0),rF(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;rM([["start","startValue"],["end","endValue"]],function(e,i){"value"===this._rangePropMode[i]&&(t[e[0]]=n[e[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),t=this._targetAxisInfoMap=r1();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each(function(e){e.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return rM(xi,function(n){var i=this.getReferringComponents(xr(n),cC);if(i.specified){t=!0;var o=new xs;rM(i.models,function(e){o.add(e.componentIndex)}),e.set(n,o)}},this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,i=!0,o="vertical"===t?"y":"x",r=n.findComponents({mainType:o+"Axis"});if(a(r,o),i){var r=n.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}});a(r,"single")}function a(t,n){var o=t[0];if(o){var r=new xs;if(r.add(o.componentIndex),e.set(n,r),i=!1,"x"===n||"y"===n){var a=o.getReferringComponents("grid",cA).models[0];a&&rM(t,function(e){o.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",cA).models[0]&&r.add(e.componentIndex)})}}}i&&rM(xi,function(t){if(i){var o=n.findComponents({mainType:xr(t),filter:function(e){return"category"===e.get("type",!0)}});if(o[0]){var r=new xs;r.add(o[0].componentIndex),e.set(t,r),i=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){e||(e=t)},this),"y"===e?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");rM([["start","startValue"],["end","endValue"]],function(i,o){var r=null!=e[i[0]],a=null!=e[i[1]];r&&!a?t[o]="percent":!r&&a?t[o]="value":n?t[o]=n[o]:r&&(t[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(t,n){null==e&&(e=this.ecModel.getComponent(xr(t),n))},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,i){rM(n.indexList,function(n){e.call(t,i,n)})})},t.prototype.getAxisProxy=function(e,t){var n=this.getAxisModel(e,t);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(xr(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;rM([["start","startValue"],["end","endValue"]],function(i){(null!=e[i[0]]||null!=e[i[1]])&&(t[i[0]]=n[i[0]]=e[i[0]],t[i[1]]=n[i[1]]=e[i[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;rM(["start","startValue","end","endValue"],function(n){t[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,n=this._targetAxisInfoMap.keys(),i=0;i<n.length;i++)for(var o=n[i],r=this._targetAxisInfoMap.get(o),a=0;a<r.indexList.length;a++){var s=this.getAxisProxy(o,r.indexList[a]);if(s.hostedBy(this))return s;t||(t=s)}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(fs);function xc(e){var t={};return rM(["start","end","startValue","endValue","throttle"],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}var xd=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.type="dataZoom.inside",t.defaultOption=m_(xl.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(xl),xu=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.prototype.render=function(e,t,n,i){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type="dataZoom",t}(ha);function xm(e,t,n,i,o,r){e=e||0;var a,s=n[1]-n[0];if(null!=o&&(o=xp(o,[0,s])),null!=r&&(r=Math.max(r,null!=o?o:0)),"all"===i){var l=Math.abs(t[1]-t[0]);l=xp(l,[0,s]),o=r=xp(l,[o,r]),i=0}t[0]=xp(t[0],n),t[1]=xp(t[1],n);var c=xf(t,i);t[i]+=e;var d=o||0,u=n.slice();return c.sign<0?u[0]+=d:u[1]-=d,t[i]=xp(t[i],u),a=xf(t,i),null!=o&&(a.sign!==c.sign||a.span<o)&&(t[1-i]=t[i]+c.sign*o),a=xf(t,i),null!=r&&a.span>r&&(t[1-i]=t[i]+a.sign*r),t}function xf(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function xp(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var xh=ck();_Z({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},r4);var xb={axisPointer:1,tooltip:1,brush:1},xg=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var i=rL(n._mousedownHandler,n),o=rL(n._mousemoveHandler,n),r=rL(n._mouseupHandler,n),a=rL(n._mousewheelHandler,n),s=rL(n._pinchHandler,n);return n.enable=function(e,n){var l=n.zInfo,c=ge(l.component),d=c.z,u=c.zlevel,m={component:l.component,z:d,zlevel:u,z2:rV(l.z2,-1/0)},f=rx({},n.triggerInfo);this._opt=rw(rx({},n),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:m,triggerInfo:f}),null==e&&(e=!0),this._enabled&&this._controlType===e||(this._enabled=!0,this.disable(),(!0===e||"move"===e||"pan"===e)&&(xF(t,"mousedown",i,m),xF(t,"mousemove",o,m),xF(t,"mouseup",r,m)),(!0===e||"scale"===e||"zoom"===e)&&(xF(t,"mousewheel",a,m),xF(t,"pinch",s,m)))},n.disable=function(){this._enabled=!1,xx(t,"mousedown",i),xx(t,"mousemove",o),xx(t,"mouseup",r),xx(t,"mousewheel",a),xx(t,"pinch",s)},n}return rt(t,e),t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(e,t,n){var i=this._opt,o=i.zInfoParsed;if(function(e,t,n){var i=t.getComponentByElement(e.topTarget);if(!i||i===n||xb.hasOwnProperty(i.mainType))return!1;var o=i.coordinateSystem;if(!o||o.model===n)return!1;var r=ge(i),a=ge(n);return!(0>=(r.zlevel-a.zlevel||r.z-a.z))}(e,i.api,o.component))return!1;var r=i.triggerInfo,a=r.roamTrigger,s=!1;return"global"===a&&(s=!0),s||(s=r.isInSelf(e,t,n)),s&&r.isInClip&&!r.isInClip(e,t,n)&&(s=!1),s},t.prototype._decideCursorStyle=function(e,t,n,i){var o=e.target;return!o&&this._checkPointer(e,t,n)?"grab":i?o&&o.cursor||"default":void 0},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!(aA(e)||x_(e))){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,i=e.offsetY;this._checkPointer(e,n,i)&&(this._x=n,this._y=i,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){var t=this._zr;if(!("pinch"===e.gestureEvent||xh(t).globalPan||x_(e))){var n=e.offsetX,i=e.offsetY;if(!this._dragging||!xk("moveOnMouseMove",e,this._opt)){var o=this._decideCursorStyle(e,n,i,!1);o&&t.setCursorStyle(o);return}t.setCursorStyle("grabbing");var r=this._x,a=this._y,s=n-r,l=i-a;this._x=n,this._y=i,this._opt.preventDefaultMouseMove&&aM(e.event),e.__ecRoamConsumed=!0,xw(this,"pan","moveOnMouseMove",e,{dx:s,dy:l,oldX:r,oldY:a,newX:n,newY:i,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){if(!x_(e)){var t=this._zr;if(!aA(e)){this._dragging=!1;var n=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);n&&t.setCursorStyle(n)}}},t.prototype._mousewheelHandler=function(e){if(!x_(e)){var t=xk("zoomOnMouseWheel",e,this._opt),n=xk("moveOnMouseWheel",e,this._opt),i=e.wheelDelta,o=Math.abs(i),r=e.offsetX,a=e.offsetY;if(0!==i&&(t||n)){if(t){var s=o>3?1.4:o>1?1.2:1.1;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",e,{scale:i>0?s:1/s,originX:r,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:r,originY:a,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(xh(this._zr).globalPan||x_(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,i,o){e._checkPointer(i,o.originX,o.originY)&&(aM(i.event),i.__ecRoamConsumed=!0,xw(e,t,n,i,o))},t}(ac);function x_(e){return e.__ecRoamConsumed}var xy=ck();function xv(e){var t=xy(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function xF(e,t,n,i){for(var o,r,a,s=xv(e).roam,l=s[t]=s[t]||[],c=0;c<l.length;c++){var d=l[c].zInfoParsed;if(0>=(d.zlevel-i.zlevel||d.z-i.z||d.z2-i.z2))break}l.splice(c,0,{listener:n,zInfoParsed:i}),o=e,r=t,(a=xv(o)).uniform[r]||o.on(r,a.uniform[r]=function(e){var t=a.roam[r];if(t)for(var n=0;n<t.length;n++)t[n].listener(e)})}function xx(e,t,n){for(var i=xv(e).roam[t]||[],o=0;o<i.length;o++)if(i[o].listener===n){i.splice(o,1),i.length||function(e,t){var n=xv(e).uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}(e,t);return}}function xw(e,t,n,i,o){o.isAvailableBehavior=rL(xk,null,n,i),e.trigger(t,o)}function xk(e,t,n){var i=n[e];return!e||i&&(!rY(i)||t.event[i+"Key"])}var xE=ck();function xT(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function xM(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function xA(e,t,n,i){return e.coordinateSystem.containPoint([n,i])}var xC=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return rt(t,e),t.prototype.render=function(t,n,i){var o;if(e.prototype.render.apply(this,arguments),t.noTarget())return void this._clear();this.range=t.getPercentRange(),o={pan:rL(xD.pan,this),zoom:rL(xD.zoom,this),scrollMove:rL(xD.scrollMove,this)},xE(i).coordSysRecordMap.each(function(e){var n=e.dataZoomInfoMap.get(t.uid);n&&(n.getRange=o)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){!function(e,t){for(var n=xE(e).coordSysRecordMap,i=n.keys(),o=0;o<i.length;o++){var r=i[o],a=n.get(r),s=a.dataZoomInfoMap;if(s){var l=t.uid;s.get(l)&&(s.removeKey(l),s.keys().length||xT(n,a))}}}(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(xu),xD={zoom:function(e,t,n,i){var o=this.range,r=o.slice(),a=e.axisModels[0];if(a){var s=xL[t](null,[i.originX,i.originY],a,n,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(r[1]-r[0])+r[0],c=Math.max(1/i.scale,0);r[0]=(r[0]-l)*c+l,r[1]=(r[1]-l)*c+l;var d=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(xm(0,r,[0,100],0,d.minSpan,d.maxSpan),this.range=r,o[0]!==r[0]||o[1]!==r[1])return r}},pan:xS(function(e,t,n,i,o,r){var a=xL[i]([r.oldX,r.oldY],[r.newX,r.newY],t,o,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength}),scrollMove:xS(function(e,t,n,i,o,r){return xL[i]([0,0],[r.scrollDelta,r.scrollDelta],t,o,n).signal*(e[1]-e[0])*r.scrollDelta})};function xS(e){return function(t,n,i,o){var r=this.range,a=r.slice(),s=t.axisModels[0];if(s&&(xm(e(a,s,t,n,i,o),a,[0,100],"all"),this.range=a,r[0]!==a[0]||r[1]!==a[1]))return a}}var xL={grid:function(e,t,n,i,o){var r=n.axis,a={},s=o.model.coordinateSystem.getRect();return e=e||[0,0],"x"===r.dim?(a.pixel=t[0]-e[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=r.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=r.inverse?-1:1),a},polar:function(e,t,n,i,o){var r=n.axis,a={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),c=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(a.pixel=t[0]-e[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=r.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=c[1]-c[0],a.pixelStart=c[0],a.signal=r.inverse?-1:1),a},singleAxis:function(e,t,n,i,o){var r=n.axis,a=o.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===r.orient?(s.pixel=t[0]-e[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=r.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=r.inverse?-1:1),s}},xI=function(){function e(e,t,n,i){this._dimName=e,this._axisIndex=t,this.ecModel=i,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(rk(xo,t.get("coordinateSystem"))>=0){var n=xr(this._dimName),i=t.getReferringComponents(n,cA).models[0];i&&this._axisIndex===i.componentIndex&&e.push(t)}},this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return rv(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,n=this._dataExtent,i=this.getAxisModel().axis.scale,o=this._dataZoomModel.getRangePropMode(),r=[0,100],a=[],s=[];rM(["start","end"],function(l,c){var d=e[l],u=e[l+"Value"];"percent"===o[c]?(null==d&&(d=r[c]),u=i.parse(l8(d,r,n))):(t=!0,d=l8(u=null==u?n[c]:i.parse(u),n,r)),s[c]=null==u||isNaN(u)?n[c]:u,a[c]=null==d||isNaN(d)?r[c]:d}),ct(s),ct(a);var l=this._minMaxSpan;function c(e,t,n,o,r){var a=r?"Span":"ValueSpan";xm(0,e,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)t[s]=l8(e[s],n,o,!0),r&&(t[s]=i.parse(t[s]))}return t?c(s,a,n,r,!1):c(a,s,r,n,!0),{valueWindow:s,percentWindow:a}},e.prototype.reset=function(e){if(e===this._dataZoomModel){var t,n,i,o,r,a=this.getTargetSeriesModels();this._dataExtent=(t=this,n=this._dimName,i=[1/0,-1/0],rM(a,function(e){var t;t=e.getData(),t&&rM(vt(t,n),function(e){var n=t.getApproximateExtent(e);n[0]<i[0]&&(i[0]=n[0]),n[1]>i[1]&&(i[1]=n[1])})}),[(r=y5((o=t.getAxisModel()).axis.scale,o,i).calculate()).min,r.max]),this._updateMinMaxSpan();var s=this.calculateDataWindow(e.settledOption);this._valueWindow=s.valueWindow,this._percentWindow=s.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(e,t){if(e===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),o=e.get("filterMode"),r=this._valueWindow;"none"!==o&&rM(i,function(e){var t=e.getData(),i=t.mapDimensionsAll(n);if(i.length){if("weakFilter"===o){var a=t.getStore(),s=rA(i,function(e){return t.getDimensionIndex(e)},t);t.filterSelf(function(e){for(var t,n,o,l=0;l<i.length;l++){var c=a.get(s[l],e),d=!isNaN(c),u=c<r[0],m=c>r[1];if(d&&!u&&!m)return!0;d&&(o=!0),u&&(t=!0),m&&(n=!0)}return o&&t&&n})}else rM(i,function(n){if("empty"===o)e.setData(t=t.map(n,function(e){var t;return(t=e)>=r[0]&&t<=r[1]?e:NaN}));else{var i={};i[n]=r,t.selectRange(i)}});rM(i,function(e){t.setApproximateExtent(r,e)})}})}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;rM(["min","max"],function(i){var o=t.get(i+"Span"),r=t.get(i+"ValueSpan");null!=r&&(r=this.getAxisModel().axis.scale.parse(r)),null!=r?o=l8(n[0]+r,n,[0,100],!0):null!=o&&(r=l8(o,[0,100],n,!0)-n[0]),e[i+"Span"]=o,e[i+"ValueSpan"]=r},this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var i=ci(n,[0,500]);i=Math.min(i,20);var o=e.axis.scale.rawExtentInfo;0!==t[0]&&o.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==t[1]&&o.setDeterminedMinMax("max",+n[1].toFixed(i)),o.freeze()}},e}();let xO={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(i,o){var r=e.getComponent(xr(i),o);t(i,o,r,n)})})}t(function(e,t,n,i){n.__dzAxisProxy=null});var n=[];t(function(t,i,o,r){o.__dzAxisProxy||(o.__dzAxisProxy=new xI(t,i,r,e),n.push(o.__dzAxisProxy))});var i=r1();return rM(n,function(e){rM(e.getTargetSeriesModels(),function(e){i.set(e.uid,e)})}),i},overallReset:function(e,t){e.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(t,n){e.getAxisProxy(t,n).reset(e)}),e.eachTargetAxis(function(n,i){e.getAxisProxy(n,i).filterData(e,t)})}),e.eachComponent("dataZoom",function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getDataPercentWindow(),i=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}};var xR=!1;function xY(e){xR||(xR=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,xO),e.registerAction("dataZoom",function(e,t){rM(function(e,t){var n,i=r1(),o=[],r=r1();e.eachComponent({mainType:"dataZoom",query:t},function(e){r.get(e.uid)||s(e)});do n=!1,e.eachComponent("dataZoom",a);while(n);function a(e){var t;!r.get(e.uid)&&(t=!1,e.eachTargetAxis(function(e,n){var o=i.get(e);o&&o[n]&&(t=!0)}),t)&&(s(e),n=!0)}function s(e){r.set(e.uid,!0),o.push(e),e.eachTargetAxis(function(e,t){(i.get(e)||i.set(e,[]))[t]=!0})}return o}(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})}),e.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function xP(e){xY(e),e.registerComponentModel(xd),e.registerComponentView(xC),e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=xE(t),i=n.coordSysRecordMap||(n.coordSysRecordMap=r1());i.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(e){rM(xa(e).infoList,function(n){var o,r,a,s=n.model.uid,l=i.get(s)||i.set(s,(a=(r={model:o=n.model,containsPoint:rI(xA,o),dispatchAction:rI(xM,t),dataZoomInfoMap:null,controller:null}).controller=new xg(t.getZr()),rM(["pan","zoom","scrollMove"],function(e){a.on(e,function(t){var n=[];r.dataZoomInfoMap.each(function(i){if(t.isAvailableBehavior(i.model.option)){var o=(i.getRange||{})[e],a=o&&o(i.dzReferCoordSysInfo,r.model.mainType,r.controller,t);!i.model.get("disabled",!0)&&a&&n.push({dataZoomId:i.model.id,start:a[0],end:a[1]})}}),n.length&&r.dispatchAction(n)})}),r));(l.dataZoomInfoMap||(l.dataZoomInfoMap=r1())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),i.each(function(e){var n,o,r,a,s,l=e.controller,c=e.dataZoomInfoMap;if(c){var d=c.keys()[0];null!=d&&(s=c.get(d))}if(!s)return void xT(i,e);var u=(o="type_",r={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0,c.each(function(e){var t=e.model,i=!t.get("disabled",!0)&&(!t.get("zoomLock",!0)||"move");r[o+i]>r[o+n]&&(n=i),a=a&&t.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a,api:t,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}});l.enable(u.controlType,u.opt),gh(e,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var xN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=m_(xl.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:fl.color.accent10,borderRadius:0,backgroundColor:fl.color.transparent,dataBackground:{lineStyle:{color:fl.color.accent30,width:.5},areaStyle:{color:fl.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:fl.color.accent40,width:.5},areaStyle:{color:fl.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:fl.color.neutral00,borderColor:fl.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:fl.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:fl.color.tertiary},brushSelect:!0,brushStyle:{color:fl.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:fl.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(xl),xB="horizontal",xH="vertical",xz=["line","bar","candlestick","scatter"],xj={easing:"cubicOut",duration:100,delay:0},xU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return rt(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=rL(this._onBrush,this),this._onBrushEnd=rL(this._onBrushEnd,this)},t.prototype.render=function(t,n,i,o){if(e.prototype.render.apply(this,arguments),gh(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1===t.get("show"))return void this.group.removeAll();if(t.noTarget()){this._clear(),this.group.removeAll();return}o&&"dataZoom"===o.type&&o.from===this.uid||this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){gb(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new lQ;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect"),i=fn(e,t).refContainer,o=this._findCoordRect(),r=e.get("defaultLocationEdgeGap",!0)||0,a=this._orient===xB?{right:i.width-o.x-o.width,top:i.height-30-r-7*!!n,width:o.width,height:30}:{right:r,top:o.y,width:30,height:o.height},s=fr(e.option);rM(["right","top","width","height"],function(e){"ph"===s[e]&&(s[e]=a[e])});var l=fe(s,i);this._location={x:l.x,y:l.y},this._size=[l.width,l.height],this._orient===xH&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),r=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;r.attr(n!==xB||o?n===xB&&o?{scaleY:a?1:-1,scaleX:-1}:n!==xH||o?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=e.getBoundingRect([r]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,i=e.get("brushSelect");n.add(new ut({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new ut({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:rL(this._onClickPanel,this)}),r=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",r.on("mousemove",this._onBrush),r.on("mouseup",this._onBrushEnd)):(r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)),n.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=this._shadowSize||[],i=e.series,o=i.getRawData(),r=i.getShadowDim&&i.getShadowDim(),a=r&&o.getDimensionInfo(r)?i.getShadowDim():e.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(o!==this._shadowData||a!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var c,d=o.getDataExtent(e.thisDim),u=o.getDataExtent(a),m=(u[1]-u[0])*.3;u=[u[0]-m,u[1]+m];var f=[0,t[1]],p=[0,t[0]],h=[[t[0],0],[0,0]],b=[],g=p[1]/Math.max(1,o.count()-1),_=t[0]/(d[1]-d[0]),y="time"===e.thisAxis.type,v=-g,F=Math.round(o.count()/t[0]);o.each([e.thisDim,a],function(e,t,n){if(F>0&&n%F){y||(v+=g);return}v=y?(e-d[0])*_:v+g;var i=null==t||isNaN(t)||""===t,o=i?0:l8(t,u,f,!0);i&&!c&&n?(h.push([h[h.length-1][0],0]),b.push([b[b.length-1][0],0])):!i&&c&&(h.push([v,0]),b.push([v,0])),i||(h.push([v,o]),b.push([v,o])),c=i}),s=this._shadowPolygonPts=h,l=this._shadowPolylinePts=b}this._shadowData=o,this._shadowDim=a,this._shadowSize=[t[0],t[1]];for(var x=this.dataZoomModel,w=0;w<3;w++){var k=function(e){var t=x.getModel(e?"selectedDataBackground":"dataBackground"),n=new lQ,i=new hQ({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),o=new h2({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(o),n}(1===w);this._displayables.sliderGroup.add(k),this._displayables.dataShadowSegs.push(k)}}}},t.prototype._prepareDataShadowInfo=function(){var e,t=this.dataZoomModel,n=t.get("showDataShadow");if(!1!==n){var i=this.ecModel;return t.eachTargetAxis(function(o,r){rM(t.getAxisProxy(o,r).getTargetSeriesModels(),function(t){if(!e&&!(!0!==n&&0>rk(xz,t.get("type")))){var a,s=i.getComponent(xr(o),r).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[o],c=t.coordinateSystem;null!=l&&c.getOtherAxis&&(a=c.getOtherAxis(s).inverse),l=t.getData().mapDimension(l);var d=t.getData().mapDimension(o);e={thisAxis:s,series:t,thisDim:d,otherDim:l,otherAxisInverse:a}}},this)},this),e}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],i=t.handleLabels=[null,null],o=this._displayables.sliderGroup,r=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,c=a.get("brushSelect"),d=t.filler=new ut({silent:c,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});o.add(d),o.add(new ut({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:r[0],height:r[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:fl.color.transparent}})),rM([0,1],function(t){var r=a.get("handleIcon");!g1[r]&&0>r.indexOf("path://")&&0>r.indexOf("image://")&&(r="path://"+r);var s=g3(r,-1,0,2,2,null,!0);s.attr({cursor:"vertical"===this._orient?"ns-resize":"ew-resize",draggable:!0,drift:rL(this._onDragMove,this,t),ondragend:rL(this._onDragEnd,this),onmouseover:rL(this._showDataInfo,this,!0),onmouseout:rL(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),c=a.get("handleSize");this._handleHeight=l7(c,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),uZ(s);var d=a.get("handleColor");null!=d&&(s.style.fill=d),o.add(n[t]=s);var u=a.getModel("textStyle"),m=(a.get("handleLabel")||{}).show||!1;e.add(i[t]=new ub({silent:!0,invisible:!m,style:u8(u,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:u.getTextColor(),font:u.getFont()}),z2:10}))},this);var u=d;if(c){var m=l7(a.get("moveHandleSize"),r[1]),f=t.moveHandle=new ut({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:r[1]-.5,height:m}}),p=.8*m,h=t.moveHandleIcon=g3(a.get("moveHandleIcon"),-p/2,-p/2,p,p,fl.color.neutral00,!0);h.silent=!0,h.y=r[1]+m/2-.5,f.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var b=Math.min(r[1]/2,Math.max(m,10));(u=t.moveZone=new ut({invisible:!0,shape:{y:r[1]-b,height:m+b}})).on("mouseover",function(){s.enterEmphasis(f)}).on("mouseout",function(){s.leaveEmphasis(f)}),o.add(f),o.add(h),o.add(u)}u.attr({draggable:!0,cursor:"default",drift:rL(this._onDragMove,this,"all"),ondragstart:rL(this._showDataInfo,this,!0),ondragend:rL(this._onDragEnd,this),onmouseover:rL(this._showDataInfo,this,!0),onmouseout:rL(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[l8(e[0],[0,100],t,!0),l8(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),r=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];xm(t,i,o,n.get("zoomLock")?"all":e,null!=r.minSpan?l8(r.minSpan,a,o,!0):null,null!=r.maxSpan?l8(r.maxSpan,a,o,!0):null);var s=this._range,l=this._range=ct([l8(i[0],o,a,!0),l8(i[1],o,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,i=ct(n.slice()),o=this._size;rM([0,1],function(e){var i=t.handles[e],r=this._handleHeight;i.attr({scaleX:r/2,scaleY:r/2,x:n[e]+(e?-1:1),y:o[1]/2-r/2})},this),t.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var r={x:i[0],width:i[1]-i[0]};t.moveHandle&&(t.moveHandle.setShape(r),t.moveZone.setShape(r),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",r.x+r.width/2));for(var a=t.dataShadowSegs,s=[0,i[0],i[1],o[0]],l=0;l<a.length;l++){var c=a[l],d=c.getClipPath();d||(d=new ut,c.setClipPath(d)),d.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:o[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,i=n.handleLabels,o=this._orient,r=["",""];if(t.get("showDetail")){var a=t.findRepresentativeAxisProxy();if(a){var s=a.getAxisModel().axis,l=this._range,c=e?a.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:a.getDataValueWindow();r=[this._formatLabel(c[0],s),this._formatLabel(c[1],s)]}}var d=ct(this._handleEnds.slice());function u(e){var t=bV(n.handles[e].parent,this.group),a=b$(0===e?"right":"left",t),s=this._handleWidth/2+5,l=bG([d[e]+(0===e?-s:s),this._size[1]/2],t);i[e].setStyle({x:l[0],y:l[1],verticalAlign:o===xB?"middle":a,align:o===xB?a:"center",text:r[e]})}u.call(this,0),u.call(this,1)},t.prototype._formatLabel=function(e,t){var n=this.dataZoomModel,i=n.get("labelFormatter"),o=n.get("labelPrecision");(null==o||"auto"===o)&&(o=t.getPixelPrecision());var r=null==e||isNaN(e)?"":"category"===t.type||"time"===t.type?t.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(o,20));return rR(i)?i(e,r):rY(i)?i.replace("{value}",r):r},t.prototype._showDataInfo=function(e){var t=(this.dataZoomModel.get("handleLabel")||{}).show||!1,n=this.dataZoomModel.getModel(["emphasis","handleLabel"]).get("show")||!1,i=e||this._dragging?n:t,o=this._displayables,r=o.handleLabels;r[0].attr("invisible",!i),r[1].attr("invisible",!i),o.moveHandle&&this.api[i?"enterEmphasis":"leaveEmphasis"](o.moveHandle,1)},t.prototype._onDragMove=function(e,t,n,i){this._dragging=!0,aM(i.event);var o=bG([t,n],this._displayables.sliderGroup.getLocalTransform(),!0),r=this._updateInterval(e,o[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),r&&a&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),this.dataZoomModel.get("realtime")||this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0)&&!(n[0]>t[0])&&!(n[1]<0)&&!(n[1]>t[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,r=this._updateInterval("all",n[0]-o);this._updateView(),r&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new aB(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape;if(!(new Date-this._brushStartTime<200&&5>Math.abs(n.width))){var i=this._getViewExtent(),o=[0,100],r=this._handleEnds=[n.x,n.x+n.width],a=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();xm(0,r,i,0,null!=a.minSpan?l8(a.minSpan,o,i,!0):null,null!=a.maxSpan?l8(a.maxSpan,o,i,!0):null),this._range=ct([l8(r[0],i,o,!0),l8(r[1],i,o,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(aM(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new ut({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var r=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(e,t),l=a.transformCoordToLocal(r.x,r.y),c=this._size;s[0]=Math.max(Math.min(c[0],s[0]),0),o.setShape({x:l[0],y:0,width:s[0]-l[0],height:c[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?xj:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=xa(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var i=this.api.getWidth(),o=this.api.getHeight();e={x:.2*i,y:.2*o,width:.6*i,height:.6*o}}return e},t.type="dataZoom.slider",t}(xu);function xW(e){e.registerComponentModel(xN),e.registerComponentView(xU),xY(e)}var xV={average:function(e){for(var t=0,n=0,i=0;i<e.length;i++)!isNaN(e[i])&&(t+=e[i],n++);return 0===n?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},xG=function(e){return Math.round(e.length/2)};function x$(e){return null==e?0:e.length||1}function xq(e){return e}var xX=function(){function e(e,t,n,i,o,r){this._old=e,this._new=t,this._oldKeyGetter=n||xq,this._newKeyGetter=i||xq,this.context=o,this._diffModeMultiple="multiple"===r}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},i=Array(e.length),o=Array(t.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(t,n,o,"_newKeyGetter");for(var r=0;r<e.length;r++){var a=i[r],s=n[a],l=x$(s);if(l>1){var c=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(c,r)}else 1===l?(n[a]=null,this._update&&this._update(s,r)):this._remove&&this._remove(r)}this._performRestAdd(o,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},i={},o=[],r=[];this._initIndexMap(e,n,o,"_oldKeyGetter"),this._initIndexMap(t,i,r,"_newKeyGetter");for(var a=0;a<o.length;a++){var s=o[a],l=n[s],c=i[s],d=x$(l),u=x$(c);if(d>1&&1===u)this._updateManyToOne&&this._updateManyToOne(c,l),i[s]=null;else if(1===d&&u>1)this._updateOneToMany&&this._updateOneToMany(c,l),i[s]=null;else if(1===d&&1===u)this._update&&this._update(c,l),i[s]=null;else if(d>1&&u>1)this._updateManyToMany&&this._updateManyToMany(c,l),i[s]=null;else if(d>1)for(var m=0;m<d;m++)this._remove&&this._remove(l[m]);else this._remove&&this._remove(l)}this._performRestAdd(r,i)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var i=e[n],o=t[i],r=x$(o);if(r>1)for(var a=0;a<r;a++)this._add&&this._add(o[a]);else 1===r&&this._add&&this._add(o);t[i]=null}},e.prototype._initIndexMap=function(e,t,n,i){for(var o=this._diffModeMultiple,r=0;r<e.length;r++){var a="_ec_"+this[i](e[r],r);if(o||(n[r]=a),t){var s=t[a],l=x$(s);0===l?(t[a]=r,o&&n.push(a)):1===l?t[a]=[s,r]:s.push(r)}}},e}(),xK=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e}();function xJ(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}let xZ=function(e){this.otherDims={},null!=e&&rx(this,e)};var xQ=rB,x0="undefined"==typeof Int32Array?Array:Int32Array,x1=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],x2=["_approximateExtent"],x5=function(){function e(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,i=!1;yC(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var o={},r=[],a={},s=!1,l={},c=0;c<n.length;c++){var d=n[c],u=rY(d)?new xZ({name:d}):d instanceof xZ?d:new xZ(d),m=u.name;u.type=u.type||"float",u.coordDim||(u.coordDim=m,u.coordDimIndex=0);var f=u.otherDims=u.otherDims||{};r.push(m),o[m]=u,null!=l[m]&&(s=!0),u.createInvertedIndices&&(a[m]=[]);var p=c;rN(u.storeDimIndex)&&(p=u.storeDimIndex),0===f.itemName&&(this._nameDimIdx=p),0===f.itemId&&(this._idDimIdx=p),i&&(u.storeDimIndex=c)}if(this.dimensions=r,this._dimInfos=o,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=a,this._dimOmitted){var h=this._dimIdxToName=r1();rM(r,function(e){h.set(o[e].storeDimIndex,e)})}}return e.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(null==t)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(null!=n)return n;var i=this._schema.getSourceDimension(t);if(i)return i.name},e.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(null!=t)return t;if(null==e)return -1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},e.prototype._recognizeDimIndex=function(e){if(rN(e)||null!=e&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||0>this._schema.getSourceDimensionIndex(e)))return+e},e.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(null==t)return n.encodeFirstDimNotExtra[e];var i=n.encode[e];return i?i[t]:null},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var i,o,r,a,s,l,c,d,u,m,f,p,h,b=this;if(e instanceof pj&&(h=e),!h){var g=this.dimensions,_=f6(e)||rT(e)?new ps(e,g.length):e;h=new pj;var y=rA(g,function(e){return{type:b._dimInfos[e].type,property:e}});h.initData(_,y,n)}this._store=h,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,h.count()),this._dimSummary=(i=this,o=this._schema,a=(r={}).encode={},s=r1(),l=[],c=[],d={},rM(i.dimensions,function(e){var t=i.getDimensionInfo(e),n=t.coordDim;if(n){var o,r=t.coordDimIndex;xJ(a,n)[r]=e,t.isExtraCoord||(s.set(n,1),"ordinal"!==(o=t.type)&&"time"!==o&&(l[0]=e),xJ(d,n)[r]=i.getDimensionIndex(t.name)),t.defaultTooltip&&c.push(e)}fg.each(function(e,n){var i=xJ(a,n),o=t.otherDims[n];null!=o&&!1!==o&&(i[o]=t.name)})}),u=[],m={},s.each(function(e,t){var n=a[t];m[t]=n[0],u=u.concat(n)}),r.dataDimsOnCoord=u,r.dataDimIndicesOnCoord=rA(u,function(e){return i.getDimensionInfo(e).storeDimIndex}),r.encodeFirstDimNotExtra=m,(f=a.label)&&f.length&&(l=f.slice()),(p=a.tooltip)&&p.length?c=p.slice():c.length||(c=l.slice()),a.defaultedLabel=l,a.defaultedTooltip=c,r.userOutput=new xK(d,o),r),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t&&t.length),i=n.start,o=n.end,r=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var a=i;a<o;a++){var s=a-i;this._nameList[a]=t[s],r&&e3(this,a)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var i=this._dimInfos[t[n]];i.ordinalMeta&&e.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return null==this._idDimIdx&&e.getSource().sourceFormat!==fx&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList;if(n.getSource().sourceFormat===f_&&!n.pure)for(var r=[],a=e;a<t;a++){var s,l=n.getItem(a,r);if(!(!this.hasItemOption&&rB(s=l))||s instanceof Array||(this.hasItemOption=!0),l){var c=l.name;null==i[a]&&null!=c&&(i[a]=cv(c,null));var d=l.id;null==o[a]&&null!=d&&(o[a]=cv(d,null))}}if(this._shouldMakeIdFromName())for(var a=e;a<t;a++)e3(this,a);eZ(this)}},e.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){xQ(e)?rx(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return null==n&&null!=this._nameDimIdx&&(n=e0(this,this._nameDimIdx,t)),null==n&&(n=""),n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),i=this._store.getOrdinalMeta(e);return i?i.categories[n]:n},e.prototype.getId=function(e){return eQ(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,i=this._dimInfos[e];if(i)return n.get(i.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,i=this._dimInfos[e];if(i)return n.getByRawIndex(i.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,i=this._store;return rO(e)?i.getValues(rA(e,function(e){return n._getStoreDimIndex(e)}),t):i.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,i=t.length;n<i;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return -1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e],i=n&&n[t];return null==i||isNaN(i)?-1:i},e.prototype.each=function(e,t,n){rR(e)&&(n=t,t=e,e=[]);var i=n||this,o=rA(e1(e),this._getStoreDimIndex,this);this._store.each(o,i?rL(t,i):t)},e.prototype.filterSelf=function(e,t,n){rR(e)&&(n=t,t=e,e=[]);var i=n||this,o=rA(e1(e),this._getStoreDimIndex,this);return this._store=this._store.filter(o,i?rL(t,i):t),this},e.prototype.selectRange=function(e){var t=this,n={},i=rS(e),o=[];return rM(i,function(i){var r=t._getStoreDimIndex(i);n[r]=e[i],o.push(r)}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){rR(e)&&(n=t,t=e,e=[]),n=n||this;var i=[];return this.each(e,function(){i.push(t&&t.apply(this,arguments))},n),i},e.prototype.map=function(e,t,n,i){var o=n||i||this,r=rA(e1(e),this._getStoreDimIndex,this),a=e5(this);return a._store=this._store.map(r,o?rL(t,o):t),a},e.prototype.modify=function(e,t,n,i){var o=n||i||this,r=rA(e1(e),this._getStoreDimIndex,this);this._store.modify(r,o?rL(t,o):t)},e.prototype.downSample=function(e,t,n,i){var o=e5(this);return o._store=this._store.downSample(this._getStoreDimIndex(e),t,n,i),o},e.prototype.minmaxDownSample=function(e,t){var n=e5(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},e.prototype.lttbDownSample=function(e,t){var n=e5(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel;return new mh(this.getRawDataItem(e),t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new xX(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return eQ(e,t)},function(e){return eQ(t,e)})},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},xQ(e)?rx(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],i=n&&n[t];return null==i?this.getVisual(t):i},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var o=i[t];return null==o&&(rO(o=this.getVisual(t))?o=o.slice():xQ(o)&&(o=rx({},o)),i[t]=o),o},e.prototype.setItemVisual=function(e,t,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,xQ(t)?rx(i,t):i[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){xQ(e)?rx(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?rx(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){u_(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){rM(this._graphicEls,function(n,i){n&&e&&e.call(t,n,i)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:rA(this.dimensions,this._getDimInfo,this),this.hostModel)),e2(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];rR(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(r$(arguments)))})},e.internalField=void(eZ=function(e){var t=e._invertedIndicesMap;rM(t,function(n,i){var o=e._dimInfos[i],r=o.ordinalMeta,a=e._store;if(r){n=t[i]=new x0(r.categories.length);for(var s=0;s<n.length;s++)n[s]=-1;for(var s=0;s<a.count();s++)n[a.get(o.storeDimIndex,s)]=s}})},e0=function(e,t,n){return cv(e._getCategory(t,n),null)},eQ=function(e,t){var n=e._idList[t];return null==n&&null!=e._idDimIdx&&(n=e0(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n},e1=function(e){return rO(e)||(e=null!=e?[e]:[]),e},e5=function(t){var n=new e(t._schema?t._schema:rA(t.dimensions,t._getDimInfo,t),t.hostModel);return e2(n,t),n},e2=function(e,t){rM(x1.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,rM(x2,function(n){e[n]=rv(t[n])}),e._calculationInfo=rx({},t._calculationInfo)},e3=function(e,t){var n=e._nameList,i=e._idList,o=e._nameDimIdx,r=e._idDimIdx,a=n[t],s=i[t];if(null==a&&null!=o&&(n[t]=a=e0(e,o,t)),null==s&&null!=r&&(i[t]=s=e0(e,r,t)),null==s&&null!=a){var l=e._nameRepeatCount,c=l[a]=(l[a]||0)+1;s=a,c>1&&(s+="__ec__"+c),i[t]=s}}),e}(),x3=function(e){this.coordSysDims=[],this.axisMap=r1(),this.categoryAxisMap=r1(),this.coordSysName=e},x4={cartesian2d:function(e,t,n,i){var o=e.getReferringComponents("xAxis",cA).models[0],r=e.getReferringComponents("yAxis",cA).models[0];t.coordSysDims=["x","y"],n.set("x",o),n.set("y",r),x6(o)&&(i.set("x",o),t.firstCategoryDimIndex=0),x6(r)&&(i.set("y",r),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,i){var o=e.getReferringComponents("singleAxis",cA).models[0];t.coordSysDims=["single"],n.set("single",o),x6(o)&&(i.set("single",o),t.firstCategoryDimIndex=0)},polar:function(e,t,n,i){var o=e.getReferringComponents("polar",cA).models[0],r=o.findAxisModel("radiusAxis"),a=o.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",r),n.set("angle",a),x6(r)&&(i.set("radius",r),t.firstCategoryDimIndex=0),x6(a)&&(i.set("angle",a),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,i){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,i){var o=e.ecModel,r=o.getComponent("parallel",e.get("parallelIndex")),a=t.coordSysDims=r.dimensions.slice();rM(r.parallelAxisIndex,function(e,r){var s=o.getComponent("parallelAxis",e),l=a[r];n.set(l,s),x6(s)&&(i.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=r))})},matrix:function(e,t,n,i){var o=e.getReferringComponents("matrix",cA).models[0];t.coordSysDims=["x","y"];var r=o.getDimensionModel("x"),a=o.getDimensionModel("y");n.set("x",r),n.set("y",a),i.set("x",r),i.set("y",a)}};function x6(e){return"category"===e.get("type")}let x8=function(e,t,n){n=n||{};var i,o,r,a,s,l,c,d,u=t.getSourceManager(),m=!1;e?(m=!0,d=f7(e)):m=(d=u.getSource()).sourceFormat===f_;var f=function(e){var t=e.get("coordinateSystem"),n=new x3(t),i=x4[t];if(i)return i(e,n,n.axisMap,n.categoryAxisMap),n}(t),p=(o=t.get("coordinateSystem"),r=m5.get(o),f&&f.coordSysDims&&(i=rA(f.coordSysDims,function(e){var t,n={name:e},i=f.axisMap.get(e);return i&&(n.type="category"===(t=i.get("type"))?"ordinal":"time"===t?"time":"float"),n})),i||(i=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),i),h=n.useEncodeDefaulter,b=rR(h)?h:h?rI(fM,p,t):null,g=function(e,t){f6(e)||(e=f7(e));var n,i,o,r,a,s=(t=t||{}).coordDimensions||[],l=t.dimensionsDefine||e.dimensionsDefine||[],c=r1(),d=[],u=(n=e,i=s,o=l,r=t.dimensionsCount,a=Math.max(n.dimensionsDetectedCount||1,i.length,o.length,r||0),rM(i,function(e){var t;rB(e)&&(t=e.dimsDef)&&(a=Math.max(a,t.length))}),a),m=t.canOmitUnusedDimensions&&u>30,f=l===e.dimensionsDefine,p=f?yS(e):yD(l),h=t.encodeDefine;!h&&t.encodeDefaulter&&(h=t.encodeDefaulter(e,u));for(var b=r1(h),g=new pY(u),_=0;_<g.length;_++)g[_]=-1;function y(e){var t=g[e];if(t<0){var n=l[e],i=rB(n)?n:{name:n},o=new xZ,r=i.name;null!=r&&null!=p.get(r)&&(o.name=o.displayName=r),null!=i.type&&(o.type=i.type),null!=i.displayName&&(o.displayName=i.displayName);var a=d.length;return g[e]=a,o.storeDimIndex=e,d.push(o),o}return d[t]}if(!m)for(var _=0;_<u;_++)y(_);b.each(function(e,t){var n=cp(e).slice();if(1===n.length&&!rY(n[0])&&n[0]<0)return void b.set(t,!1);var i=b.set(t,[]);rM(n,function(e,n){var o=rY(e)?p.get(e):e;null!=o&&o<u&&(i[n]=o,F(y(o),t,n))})});var v=0;function F(e,t,n){null!=fg.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,c.set(t,!0))}rM(s,function(e){if(rY(e))o=e,i={};else{var t,n,i,o=(i=e).name,r=i.ordinalMeta;i.ordinalMeta=null,(i=rx({},i)).ordinalMeta=r,t=i.dimsDef,n=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var a=b.get(o);if(!1!==a){if(!(a=cp(a)).length)for(var s=0;s<(t&&t.length||1);s++){for(;v<u&&null!=y(v).coordDim;)v++;v<u&&a.push(v++)}rM(a,function(e,r){var a=y(e);if(f&&null!=i.type&&(a.type=i.type),F(rw(a,i),o,r),null==a.name&&t){var s=t[r];rB(s)||(s={name:s}),a.name=a.displayName=s.name,a.defaultTooltip=s.defaultTooltip}n&&rw(a.otherDims,n)})}});var x=t.generateCoord,w=t.generateCoordCount,k=null!=w;w=x?w||1:0;var E=x||"value";function T(e){null==e.name&&(e.name=e.coordDim)}if(m)rM(d,function(e){T(e)}),d.sort(function(e,t){return e.storeDimIndex-t.storeDimIndex});else for(var M=0;M<u;M++){var A=y(M);null==A.coordDim&&(A.coordDim=function(e,t,n){if(n||t.hasKey(e)){for(var i=0;t.hasKey(e+i);)i++;e+=i}return t.set(e,!0),e}(E,c,k),A.coordDimIndex=0,(!x||w<=0)&&(A.isExtraCoord=!0),w--),T(A),null==A.type&&(fC(e,M)===fE.Must||A.isExtraCoord&&(null!=A.otherDims.itemName||null!=A.otherDims.seriesName))&&(A.type="ordinal")}return function(e){for(var t=r1(),n=0;n<e.length;n++){var i=e[n],o=i.name,r=t.get(o)||0;r>0&&(i.name=o+(r-1)),r++,t.set(o,r)}}(d),new yA({source:e,dimensions:d,fullDimensionCount:u,dimensionOmitted:m})}(d,{coordDimensions:p,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:b,canOmitUnusedDimensions:!m}),_=(a=g.dimensions,s=n.createInvertedIndices,f&&rM(a,function(e,t){var n=e.coordDim,i=f.categoryAxisMap.get(n);i&&(null==l&&(l=t),e.ordinalMeta=i.getOrdinalMeta(),s&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(c=!0)}),c||null==l||(a[l].otherDims.itemName=0),l),y=m?null:u.getSharedDataStore(g),v=function(e,t,n){var i,o,r,a,s,l,c,d=(n=n||{}).byIndex,u=n.stackedCoordDimension;yC(t.schema)?(i=(o=t.schema).dimensions,r=t.store):i=t;var m=!!(e&&e.get("stack"));if(rM(i,function(e,t){rY(e)&&(i[t]=e={name:e}),m&&!e.isExtraCoord&&(d||a||!e.ordinalMeta||(a=e),s||"ordinal"===e.type||"time"===e.type||u&&u!==e.coordDim||(s=e))}),!s||d||a||(d=!0),s){l="__\0ecstackresult_"+e.id,c="__\0ecstackedover_"+e.id,a&&(a.createInvertedIndices=!0);var f=s.coordDim,p=s.type,h=0;rM(i,function(e){e.coordDim===f&&h++});var b={name:l,coordDim:f,coordDimIndex:h,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},g={name:c,coordDim:c,coordDimIndex:h+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(r&&(b.storeDimIndex=r.ensureCalculationDimension(c,p),g.storeDimIndex=r.ensureCalculationDimension(l,p)),o.appendCalculationDimension(b),o.appendCalculationDimension(g)):(i.push(b),i.push(g))}return{stackedDimension:s&&s.name,stackedByDimension:a&&a.name,isStackedByIndex:d,stackedOverDimension:c,stackResultDimension:l}}(t,{schema:g,store:y}),F=new x5(g,t);F.setCalculationInfo(v);var x=null!=_&&function(e){if(e.sourceFormat===f_)return!rO(cg(function(e){for(var t=0;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[])))}(d)?function(e,t,n,i){return i===_?n:this.defaultDimValueGetter(e,t,n,i)}:null;return F.hasItemOption=!1,F.initData(m?d:y,null,x),F};var x7=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.prototype.getInitialData=function(e,t){return x8(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(e),r=i.dataToPoint(o);if(n)rM(i.getAxes(),function(e,n){if("category"===e.type&&null!=t){var i=e.getTicksCoords(),a=e.getTickModel().get("alignWithLabel"),s=o[n],l="x1"===t[n]||"y1"===t[n];if(l&&!a&&(s+=1),!(i.length<2)){if(2===i.length){r[n]=e.toGlobalCoord(e.getExtent()[+!!l]);return}for(var c=void 0,d=void 0,u=1,m=0;m<i.length;m++){var f=i[m].coord,p=m===i.length-1?i[m-1].tickValue+u:i[m].tickValue;if(p===s){d=f;break}if(p<s)c=f;else if(null!=c&&p>s){d=(f+c)/2;break}1===m&&(u=p-i[0].tickValue)}null==d&&(c?c&&(d=i[i.length-1].coord):d=i[0].coord),r[n]=e.toGlobalCoord(d)}}});else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),c=+!i.getBaseAxis().isHorizontal();r[c]+=s+l/2}return r}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t}(p7);p7.registerClass(x7);var x9=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.prototype.getInitialData=function(){return x8(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=m_(x7.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:fl.color.primary,borderWidth:2}},realtimeSort:!1}),t}(x7),we=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},wt=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return rt(t,e),t.prototype.getDefaultShape=function(){return new we},t.prototype.buildPath=function(e,t){var n=t.cx,i=t.cy,o=Math.max(t.r0||0,0),r=Math.max(t.r,0),a=(r-o)*.5,s=o+a,l=t.startAngle,c=t.endAngle,d=t.clockwise,u=2*Math.PI,m=d?c-l<u:l-c<u;m||(l=c-(d?u:-u));var f=Math.cos(l),p=Math.sin(l),h=Math.cos(c),b=Math.sin(c);m?(e.moveTo(f*o+n,p*o+i),e.arc(f*s+n,p*s+i,a,-Math.PI+l,l,!d)):e.moveTo(f*r+n,p*r+i),e.arc(n,i,r,l,c,!d),e.arc(h*s+n,b*s+i,a,c-2*Math.PI,c-Math.PI,!d),0!==o&&e.arc(n,i,o,c,l,d)},t}(dJ);function wn(e,t,n){return t*Math.sin(e)*(n?-1:1)}function wi(e,t,n){return t*Math.cos(e)*(n?1:-1)}var wo=Math.max,wr=Math.min,wa=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return rt(t,e),t.prototype.render=function(e,t,n,i){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var o=e.get("coordinateSystem");("cartesian2d"===o||"polar"===o)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,i))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){b4(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(null==this._isLargeDraw||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,i){var o,r=this.group,a=e.getData(),s=this._data,l=e.coordinateSystem,c=l.getBaseAxis();"cartesian2d"===l.type?o=c.isHorizontal():"polar"===l.type&&(o="angle"===c.dim);var d=e.isAnimationEnabled()?e:null,u=function(e,t){var n=e.get("realtimeSort",!0),i=t.getBaseAxis();if(n&&"category"===i.type&&"cartesian2d"===t.type)return{baseAxis:i,otherAxis:t.getOtherAxis(i)}}(e,l);u&&this._enableRealtimeSort(u,a,n);var m=e.get("clip",!0)||u,f=function(e,t){var n=e.getArea&&e.getArea();if("cartesian2d"===e.type){var i=e.getBaseAxis();if("category"!==i.type||!i.onBand){var o=t.getLayout("bandWidth");i.isHorizontal()?(n.x-=o,n.width+=2*o):(n.y-=o,n.height+=2*o)}}return n}(l,a);r.removeClipPath();var p=e.get("roundCap",!0),h=e.get("showBackground",!0),b=e.getModel("backgroundStyle"),g=b.get("borderRadius")||0,_=[],y=this._backgroundEls,v=i&&i.isInitSort,F=i&&"changeAxisOrder"===i.type;function x(e){var t,n,i,r=wp[l.type](a,e);if(!r)return null;var s=(t=l,n=o,i=r,new("polar"===t.type?hG:ut)({shape:wF(n,i,t),silent:!0,z2:0}));return s.useStyle(b.getItemStyle()),"cartesian2d"===l.type?s.setShape("r",g):s.setShape("cornerRadius",g),_[e]=s,s}a.diff(s).add(function(t){var n=a.getItemModel(t),i=wp[l.type](a,t,n);if(i&&(h&&x(t),a.hasValue(t)&&wf[l.type](i))){var s=!1;m&&(s=ws[l.type](f,i));var b=wl[l.type](e,a,t,i,o,d,c.model,!1,p);u&&(b.forceLabelAnimation=!0),wb(b,a,t,n,i,e,o,"polar"===l.type),v?b.attr({shape:i}):u?wc(u,d,b,i,t,o,!1,!1):bk(b,{shape:i},e,t),a.setItemGraphicEl(t,b),r.add(b),b.ignore=s}}).update(function(t,n){var i=a.getItemModel(t),w=wp[l.type](a,t,i);if(w){if(h){var k,E=void 0;0===y.length?E=x(n):((E=y[n]).useStyle(b.getItemStyle()),"cartesian2d"===l.type?E.setShape("r",g):E.setShape("cornerRadius",g),_[t]=E);var T=wp[l.type](a,t);bw(E,{shape:wF(o,T,l)},d,t)}var M=s.getItemGraphicEl(n);if(!a.hasValue(t)||!wf[l.type](w))return void r.remove(M);var A=!1;if((m&&(A=ws[l.type](f,w))&&r.remove(M),M&&("sector"===M.type&&p||"sausage"===M.type&&!p)&&(M&&bA(M,e,n),M=null),M)?bv(k=M).oldStyle=k.style:M=wl[l.type](e,a,t,w,o,d,c.model,!0,p),u&&(M.forceLabelAnimation=!0),F){var C=M.getTextContent();if(C){var D=mi(C);null!=D.prevValue&&(D.prevValue=D.value)}}else wb(M,a,t,i,w,e,o,"polar"===l.type);v?M.attr({shape:w}):u?wc(u,d,M,w,t,o,!0,F):bw(M,{shape:w},e,t,null),a.setItemGraphicEl(t,M),M.ignore=A,r.add(M)}}).remove(function(t){var n=s.getItemGraphicEl(t);n&&bA(n,e,t)}).execute();var w=this._backgroundGroup||(this._backgroundGroup=new lQ);w.removeAll();for(var k=0;k<_.length;++k)w.add(_[k]);r.add(w),this._backgroundEls=_,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),wy(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),wy(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&function(e,t,n,i,o){if(e){if("polar"===e.type){var r,a,s,l;return a=ce((r=e.getArea()).r0,1),s=ce(r.r,1),l=new hG({shape:{cx:ce(e.cx,1),cy:ce(e.cy,1),r0:a,r:s,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}),t&&("angle"===e.getBaseAxis().dim?l.shape.endAngle=r.startAngle:l.shape.r=a,bk(l,{shape:{endAngle:r.endAngle,r:s}},n)),l}else if("cartesian2d"===e.type)return function(e,t,n,i,o){var r=e.getArea(),a=r.x,s=r.y,l=r.width,c=r.height,d=n.get(["lineStyle","width"])||0;a-=d/2,s-=d/2,l+=d,c+=d,l=Math.ceil(l),a!==Math.floor(a)&&(a=Math.floor(a),l++);var u=new ut({shape:{x:a,y:s,width:l,height:c}});if(t){var m=e.getBaseAxis(),f=m.isHorizontal(),p=m.inverse;f?(p&&(u.shape.x+=l),u.shape.width=0):(p||(u.shape.y+=c),u.shape.height=0);var h=rR(o)?function(e){o(e,u)}:null;bk(u,{shape:{width:l,height:c,x:a,y:s}},n,null,i,h)}return u}(e,t,n,void 0,void 0)}return null}(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var i=this;if(t.count()){var o=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var r=function(e){var n=t.getItemGraphicEl(e),i=n&&n.shape;return i&&Math.abs(o.isHorizontal()?i.height:i.width)||0};this._onRendered=function(){i._updateSortWithinSameData(t,r,o,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var i=[];return e.each(e.mapDimension(t.dim),function(e,t){var o=n(t);o=null==o?NaN:o,i.push({dataIndex:t,mappedValue:o,ordinalNumber:e})}),i.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:rA(i,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var i=n.scale,o=e.mapDimension(n.dim),r=Number.MAX_VALUE,a=0,s=i.getOrdinalMeta().categories.length;a<s;++a){var l=e.rawIndexOf(o,i.getRawOrdinalNumber(a)),c=l<0?5e-324:t(e.indexOfRawIndex(l));if(c>r)return!0;r=c}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,i=n.getExtent(),o=Math.max(0,i[0]),r=Math.min(i[1],n.getOrdinalMeta().categories.length-1);o<=r;++o)if(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,i){if(this._isOrderChangedWithinSameData(e,t,n)){var o=this._dataSort(e,n,t);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,t,n){var i=t.baseAxis,o=this._dataSort(e,i,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){bA(t,e,ug(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(gr),ws={cartesian2d:function(e,t){var n=t.width<0?-1:1,i=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height);var o=e.x+e.width,r=e.y+e.height,a=wo(t.x,e.x),s=wr(t.x+t.width,o),l=wo(t.y,e.y),c=wr(t.y+t.height,r),d=s<a,u=c<l;return t.x=d&&a>o?s:a,t.y=u&&l>r?c:l,t.width=d?0:s-a,t.height=u?0:c-l,n<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height),d||u},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var i=t.r;t.r=t.r0,t.r0=i}var o=wr(t.r,e.r),r=wo(t.r0,e.r0);t.r=o,t.r0=r;var a=o-r<0;if(n<0){var i=t.r;t.r=t.r0,t.r0=i}return a}},wl={cartesian2d:function(e,t,n,i,o,r,a,s,l){var c=new ut({shape:rx({},i),z2:1});return c.__dataIndex=n,c.name="item",r&&(c.shape[o?"height":"width"]=0),c},polar:function(e,t,n,i,o,r,a,s,l){var c,d,u=!o&&l?wt:hG,m=new u({shape:i,z2:1});if(m.name="item",c=wh(o),d=u===wt,m.calculateTextPosition=function(e,t,n){var i=t.position;if(!i||i instanceof Array)return lj(e,t,n);var o=c(i),r=null!=t.distance?t.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,m=a.r0,f=(u+m)/2,p=a.startAngle,h=a.endAngle,b=(p+h)/2,g=d?Math.abs(u-m)/2:0,_=Math.cos,y=Math.sin,v=s+u*_(p),F=l+u*y(p),x="left",w="top";switch(o){case"startArc":v=s+(m-r)*_(b),F=l+(m-r)*y(b),x="center",w="top";break;case"insideStartArc":v=s+(m+r)*_(b),F=l+(m+r)*y(b),x="center",w="bottom";break;case"startAngle":v=s+f*_(p)+wn(p,r+g,!1),F=l+f*y(p)+wi(p,r+g,!1),x="right",w="middle";break;case"insideStartAngle":v=s+f*_(p)+wn(p,-r+g,!1),F=l+f*y(p)+wi(p,-r+g,!1),x="left",w="middle";break;case"middle":v=s+f*_(b),F=l+f*y(b),x="center",w="middle";break;case"endArc":v=s+(u+r)*_(b),F=l+(u+r)*y(b),x="center",w="bottom";break;case"insideEndArc":v=s+(u-r)*_(b),F=l+(u-r)*y(b),x="center",w="top";break;case"endAngle":v=s+f*_(h)+wn(h,r+g,!0),F=l+f*y(h)+wi(h,r+g,!0),x="left",w="middle";break;case"insideEndAngle":v=s+f*_(h)+wn(h,-r+g,!0),F=l+f*y(h)+wi(h,-r+g,!0),x="right",w="middle";break;default:return lj(e,t,n)}return(e=e||{}).x=v,e.y=F,e.align=x,e.verticalAlign=w,e},r){var f=m.shape,p=o?"r":"endAngle",h={};f[p]=o?i.r0:i.startAngle,h[p]=i[p],(s?bw:bk)(m,{shape:h},r)}return m}};function wc(e,t,n,i,o,r,a,s){var l,c;r?(c={x:i.x,width:i.width},l={y:i.y,height:i.height}):(c={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(a?bw:bk)(n,{shape:l},t,o,null),(a?bw:bk)(n,{shape:c},t?e.baseAxis.model:null,o)}function wd(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var wu=["x","y","width","height"],wm=["cx","cy","r","startAngle","endAngle"],wf={cartesian2d:function(e){return!wd(e,wu)},polar:function(e){return!wd(e,wm)}},wp={cartesian2d:function(e,t,n){var i,o,r,a=e.getItemLayout(t);if(!a)return null;var s=n?(i=n,o=a,(r=i.get(["itemStyle","borderColor"]))&&"none"!==r?Math.min(i.get(["itemStyle","borderWidth"])||0,isNaN(o.width)?Number.MAX_VALUE:Math.abs(o.width),isNaN(o.height)?Number.MAX_VALUE:Math.abs(o.height)):0):0,l=a.width>0?1:-1,c=a.height>0?1:-1;return{x:a.x+l*s/2,y:a.y+c*s/2,width:a.width-l*s,height:a.height-c*s}},polar:function(e,t,n){var i=e.getItemLayout(t);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function wh(e){var t;return t=e?"Arc":"Angle",function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}function wb(e,t,n,i,o,r,a,s){var l,c,d,u=t.getItemVisual(n,"style");if(s){if(!r.get("roundCap")){var m=e.shape,f=function(e,t,n){var i=e.get("borderRadius");if(null==i)return n?{cornerRadius:0}:null;rO(i)||(i=[i,i,i,i]);var o=Math.abs(t.r||0-t.r0||0);return{cornerRadius:rA(i,function(e){return lz(e,o)})}}(i.getModel("itemStyle"),m,!0);rx(m,f),e.setShape(m)}}else{var p=i.get(["itemStyle","borderRadius"])||0;e.setShape("r",p)}e.useStyle(u);var h=i.getShallow("cursor");h&&e.attr("cursor",h);var b=s?a?o.r>=o.r0?"endArc":"startArc":o.endAngle>=o.startAngle?"endAngle":"startAngle":a?o.height>=0?"bottom":"top":o.width>=0?"right":"left",g=function(e,t){t=t||"label";for(var n={normal:e.getModel(t)},i=0;i<uw.length;i++){var o=uw[i];n[o]=e.getModel([o,t])}return n}(i);!function(e,t,n,i){n=n||u4;for(var o=e instanceof ub,r=!1,a=0;a<uk.length;a++){var s=t[uk[a]];if(s&&s.getShallow("show")){r=!0;break}}var l=o?e:e.getTextContent();if(r){!o&&(l||(l=new ub,e.setTextContent(l)),e.stateProxy&&(l.stateProxy=e.stateProxy));var c=u6(n,t),d=t.normal,u=!!d.getShallow("show"),m=u8(d,void 0,n,!1,!o);m.text=c.normal,o||e.setTextConfig(u7(d,n,!1));for(var a=0;a<uw.length;a++){var f=uw[a],s=t[f];if(s){var p=l.ensureState(f),h=!!rV(s.getShallow("show"),u);h!==u&&(p.ignore=!h),p.style=u8(s,void 0,n,!0,!o),p.style.text=c[f],o||(e.ensureState(f).textConfig=u7(s,n,!0))}}l.silent=!!d.getShallow("silent"),null!=l.style.x&&(m.x=l.style.x),null!=l.style.y&&(m.y=l.style.y),l.ignore=!u,l.useStyle(m),l.dirty(),n.enableTextSetter&&(mi(l).setLabelText=function(e){var i=u6(n,t,e);!function(e,t){for(var n=0;n<uw.length;n++){var i=uw[n],o=t[i],r=e.ensureState(i);r.style=r.style||{},r.style.text=o}var a=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(a,!0)}(l,i)})}else l&&(l.ignore=!0);e.dirty()}(e,g,{labelFetcher:r,labelDataIndex:n,defaultText:function(e,t){var n=e.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var o=pb(e,t,n[0]);return null!=o?o+"":null}if(i){for(var r=[],a=0;a<n.length;a++)r.push(pb(e,t,n[a]));return r.join(" ")}}(r.getData(),n),inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:b});var _=e.getTextContent();if(s&&_){var y=i.get(["label","position"]);e.textConfig.inside="middle"===y||null,function(e,t,n,i){if(rN(i))return e.setTextConfig({rotation:i});if(rO(t))return e.setTextConfig({rotation:0});var o,r=e.shape,a=r.clockwise?r.startAngle:r.endAngle,s=r.clockwise?r.endAngle:r.startAngle,l=n(t);switch(l){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":o=(a+s)/2;break;case"startAngle":case"insideStartAngle":o=a;break;case"endAngle":case"insideEndAngle":o=s;break;default:e.setTextConfig({rotation:0});return}var c=1.5*Math.PI-o;"middle"===l&&c>Math.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),e.setTextConfig({rotation:c})}(e,"outside"===y?b:y,wh(a),i.get(["label","rotate"]))}!function(e,t,n,i){if(e){var o=mi(e);o.prevValue=o.value,o.value=n;var r=t.normal;o.valueAnimation=r.get("valueAnimation"),o.valueAnimation&&(o.precision=r.get("precision"),o.defaultInterpolatedText=i,o.statesModels=t)}}(_,g,r.getRawValue(n),function(e){var n=t.mapDimensionsAll("defaultedLabel");if(!rO(e))return e+"";for(var i=[],o=0;o<n.length;o++){var r=t.getDimensionIndex(n[o]);r>=0&&i.push(e[r])}return i.join(" ")});var v=i.getModel(["emphasis"]);l=e,c=v.get("focus"),d=v.get("blurScope"),v.get("disabled")?u1(l,!1):uZ(l,c,d),!function(e,t,n,i){n=n||"itemStyle";for(var o=0;o<uQ.length;o++){var r=uQ[o],a=t.getModel([r,n]);e.ensureState(r).style=a[u0[n]]()}}(e,i),null!=o.startAngle&&null!=o.endAngle&&o.startAngle===o.endAngle&&(e.style.fill="none",e.style.stroke="none",rM(e.states,function(e){e.style&&(e.style.fill=e.style.stroke="none")}))}var wg=function(){},w_=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return rt(t,e),t.prototype.getDefaultShape=function(){return new wg},t.prototype.buildPath=function(e,t){for(var n=t.points,i=this.baseDimIdx,o=1-this.baseDimIdx,r=[],a=[],s=this.barWidth,l=0;l<n.length;l+=3)a[i]=s,a[o]=n[l+2],r[i]=n[l+i],r[o]=n[l+o],e.rect(r[0],r[1],a[0],a[1])},t}(dJ);function wy(e,t,n,i){var o=e.getData(),r=+!!o.getLayout("valueAxisHorizontal"),a=o.getLayout("largeDataIndices"),s=o.getLayout("size"),l=e.getModel("backgroundStyle"),c=o.getLayout("largeBackgroundPoints");if(c){var d=new w_({shape:{points:c},incremental:!!i,silent:!0,z2:0});d.baseDimIdx=r,d.largeDataIndices=a,d.barWidth=s,d.useStyle(l.getItemStyle()),t.add(d),n&&n.push(d)}var u=new w_({shape:{points:o.getLayout("largePoints")},incremental:!!i,ignoreCoarsePointer:!0,z2:1});u.baseDimIdx=r,u.largeDataIndices=a,u.barWidth=s,t.add(u),u.useStyle(o.getVisual("style")),u.style.stroke=null,ug(u).seriesIndex=e.seriesIndex,e.get("silent")||(u.on("mousedown",wv),u.on("mousemove",wv)),n&&n.push(u)}var wv=gp(function(e){var t=function(e,t,n){for(var i=e.baseDimIdx,o=1-i,r=e.shape.points,a=e.largeDataIndices,s=[],l=[],c=e.barWidth,d=0,u=r.length/3;d<u;d++){var m=3*d;if(l[i]=c,l[o]=r[m+2],s[i]=r[m+i],s[o]=r[m+o],l[o]<0&&(s[o]+=l[o],l[o]=-l[o]),t>=s[0]&&t<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[d]}return -1}(this,e.offsetX,e.offsetY);ug(this).dataIndex=t>=0?t:null},30,!1);function wF(e,t,n){if("cartesian2d"===n.type){var i=n.getArea();return{x:e?t.x:i.x,y:e?i.y:t.y,width:e?t.width:i.width,height:e?i.height:t.height}}var i=n.getArea();return{cx:i.cx,cy:i.cy,r0:e?i.r0:t.r0,r:e?i.r:t.r,startAngle:e?t.startAngle:0,endAngle:e?t.endAngle:2*Math.PI}}function ww(e,t,n){var i=ra.createCanvas(),o=t.getWidth(),r=t.getHeight(),a=i.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=o+"px",a.height=r+"px",i.setAttribute("data-zr-dom-id",e)),i.width=o*n,i.height=r*n,i}var wk=function(e){function t(t,n,i){var o,r=e.call(this)||this;r.motionBlur=!1,r.lastFrameAlpha=.7,r.dpr=1,r.virtual=!1,r.config={},r.incremental=!1,r.zlevel=0,r.maxRepaintRectCount=5,r.__dirty=!0,r.__firstTimePaint=!0,r.__used=!1,r.__drawIndex=0,r.__startIndex=0,r.__endIndex=0,r.__prevStartIndex=null,r.__prevEndIndex=null,i=i||lF,"string"==typeof t?o=ww(t,n,i):rB(t)&&(t=(o=t).id),r.id=t,r.dom=o;var a=o.style;return a&&(r5(o),o.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),r.painter=n,r.dpr=i,r}return r7(t,e),t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=ww("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o,r=[],a=this.maxRepaintRectCount,s=!1,l=new a3(0,0,0,0);function c(e){if(!(!e.isFinite()||e.isZero()))if(0===r.length){var t=new a3(0,0,0,0);t.copy(e),r.push(t)}else{for(var n=!1,i=1/0,o=0,c=0;c<r.length;++c){var d=r[c];if(d.intersect(e)){var u=new a3(0,0,0,0);u.copy(d),u.union(e),r[c]=u,n=!0;break}if(s){l.copy(e),l.union(d);var m=e.width*e.height,f=d.width*d.height,p=l.width*l.height-m-f;p<i&&(i=p,o=c)}}if(s&&(r[o].union(e),n=!0),!n){var t=new a3(0,0,0,0);t.copy(e),r.push(t)}s||(s=r.length>=a)}}for(var d=this.__startIndex;d<this.__endIndex;++d){var u=e[d];if(u){var m=u.shouldBePainted(n,i,!0,!0),f=u.__isRendered&&(1&u.__dirty||!m)?u.getPrevPaintRect():null;f&&c(f);var p=m&&(1&u.__dirty||!u.__isRendered)?u.getPaintRect():null;p&&c(p)}}for(var d=this.__prevStartIndex;d<this.__prevEndIndex;++d){var u=t[d],m=u&&u.shouldBePainted(n,i,!0,!0);if(u&&(!m||!u.__zr)&&u.__isRendered){var f=u.getPrevPaintRect();f&&c(f)}}do{o=!1;for(var d=0;d<r.length;){if(r[d].isZero()){r.splice(d,1);continue}for(var h=d+1;h<r.length;)r[d].intersect(r[h])?(o=!0,r[d].union(r[h]),r.splice(h,1)):h++;d++}}while(o);return this._paintRects=r,r},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,i=this.dom,o=i.style,r=this.domBack;o&&(o.width=e+"px",o.height=t+"px"),i.width=e*n,i.height=t*n,r&&(r.width=e*n,r.height=t*n,1!==n&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var i=this.dom,o=this.ctx,r=i.width,a=i.height;t=t||this.clearColor;var s=this.motionBlur&&!e,l=this.lastFrameAlpha,c=this.dpr,d=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,r/c,a/c));var u=this.domBack;function m(e,n,i,r){if(o.clearRect(e,n,i,r),t&&"transparent"!==t){var a=void 0;rU(t)?(a=(t.global||t.__width===i&&t.__height===r)&&t.__canvasGradient||g6(o,t,{x:0,y:0,width:i,height:r}),t.__canvasGradient=a,t.__width=i,t.__height=r):null!=t.image&&(t.scaleX=t.scaleX||c,t.scaleY=t.scaleY||c,a=_a(o,t,{dirty:function(){d.setUnpainted(),d.painter.refresh()}})),o.save(),o.fillStyle=a||t,o.fillRect(e,n,i,r),o.restore()}s&&(o.save(),o.globalAlpha=l,o.drawImage(u,e,n,i,r),o.restore())}!n||s?m(0,0,r,a):n.length&&rM(n,function(e){m(e.x*c,e.y*c,e.width*c,e.height*c)})},t}(ac),wE=function(){function e(e,t,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var o=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=rx({},n||{}),this.dpr=n.devicePixelRatio||lF,this._singleCanvas=o,this.root=e,e.style&&(r5(e),e.innerHTML=""),this.storage=t;var r=this._zlevelList;this._prevDisplayList=[];var a=this._layers;if(o){var s=e.width,l=e.height;null!=n.width&&(s=n.width),null!=n.height&&(l=n.height),this.dpr=n.devicePixelRatio||1,e.width=s*this.dpr,e.height=l*this.dpr,this._width=s,this._height=l;var c=new wk(e,this,this.dpr);c.__builtin__=!0,c.initContext(),a[314159]=c,c.zlevel=314159,r.push(314159),this._domRoot=e}else{this._width=g7(e,0,n),this._height=g7(e,1,n);var d,u,m,f=this._domRoot=(d=this._width,u=this._height,(m=document.createElement("div")).style.cssText=["position:relative","width:"+d+"px","height:"+u+"px","padding:0;margin:0;border-width:0"].join(";")+";",m);e.appendChild(f)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var o=0;o<i.length;o++){var r=i[o],a=this._layers[r];if(!a.__builtin__&&a.refresh){var s=0===o?this._backgroundColor:null;a.refresh(s)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(e){var t,n=e.length,i=this._hoverlayer;if(i&&i.clear(),n){for(var o={inHover:!0,viewWidth:this._width,viewHeight:this._height},r=0;r<n;r++){var a=e[r];a.__inHover&&(i||(i=this._hoverlayer=this.getLayer(1e5)),t||(t=i.ctx).save(),_h(t,a,o,r===n-1))}t&&t.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(1e5)},e.prototype.paintOne=function(e,t){_p(e,t)},e.prototype._paintList=function(e,t,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(e);var o=this._doPaintList(e,t,n),r=o.finished,a=o.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(e),r)this.eachLayer(function(e){e.afterBrush&&e.afterBrush()});else{var s=this;ey(function(){s._paintList(e,t,n,i)})}}},e.prototype._compositeManually=function(){var e=this.getLayer(314159).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer(function(i){i.virtual&&e.drawImage(i.dom,0,0,t,n)})},e.prototype._doPaintList=function(e,t,n){for(var i=this,o=[],r=this._opts.useDirtyRect,a=0;a<this._zlevelList.length;a++){var s=this._zlevelList[a],l=this._layers[s];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||n)&&o.push(l)}for(var c=!0,d=!1,u=this,m=0;m<o.length;m++)!function(a){var s,l=o[a],m=l.ctx,f=r&&l.createRepaintRects(e,t,u._width,u._height),p=n?l.__startIndex:l.__drawIndex,h=!n&&l.incremental&&Date.now,b=h&&Date.now(),g=l.zlevel===u._zlevelList[0]?u._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,g,f);else if(p===l.__startIndex){var _=e[p];_.incremental&&_.notClear&&!n||l.clear(!1,g,f)}-1===p&&(console.error("For some unknown reason. drawIndex is -1"),p=l.__startIndex);var y=function(t){var n={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(s=p;s<l.__endIndex;s++){var o=e[s];if(o.__inHover&&(d=!0),i._doPaintEl(o,l,r,t,n,s===l.__endIndex-1),h&&Date.now()-b>15)break}n.prevElClipPaths&&m.restore()};if(f)if(0===f.length)s=l.__endIndex;else for(var v=u.dpr,F=0;F<f.length;++F){var x=f[F];m.save(),m.beginPath(),m.rect(x.x*v,x.y*v,x.width*v,x.height*v),m.clip(),y(x),m.restore()}else m.save(),y(),m.restore();l.__drawIndex=s,l.__drawIndex<l.__endIndex&&(c=!1)}(m);return ri.wxa&&rM(this._layers,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),{finished:c,needsRefreshHover:d}},e.prototype._doPaintEl=function(e,t,n,i,o,r){var a=t.ctx;if(n){var s=e.getPaintRect();(!i||s&&s.intersect(i))&&(_h(a,e,o,r),e.setPrevPaintRect(s))}else _h(a,e,o,r)},e.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=314159);var n=this._layers[e];return n||((n=new wk("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?rF(n,this._layerConfig[e],!0):this._layerConfig[e-.01]&&rF(n,this._layerConfig[e-.01],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},e.prototype.insertLayer=function(e,t){var n=this._layers,i=this._zlevelList,o=i.length,r=this._domRoot,a=null,s=-1;if(!n[e]){if(t&&(t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh&&1)){if(o>0&&e>i[0]){for(s=0;s<o-1&&(!(i[s]<e)||!(i[s+1]>e));s++);a=n[i[s]]}if(i.splice(s+1,0,e),n[e]=t,!t.virtual)if(a){var l=a.dom;l.nextSibling?r.insertBefore(t.dom,l.nextSibling):r.appendChild(t.dom)}else r.firstChild?r.insertBefore(t.dom,r.firstChild):r.appendChild(t.dom);t.painter||(t.painter=this)}}},e.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,i=0;i<n.length;i++){var o=n[i];e.call(t,this._layers[o],o)}},e.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,i=0;i<n.length;i++){var o=n[i],r=this._layers[o];r.__builtin__&&e.call(t,r,o)}},e.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,i=0;i<n.length;i++){var o=n[i],r=this._layers[o];r.__builtin__||e.call(t,r,o)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(e){function t(e){a&&(a.__endIndex!==e&&(a.__dirty=!0),a.__endIndex=e)}if(this.eachBuiltinLayer(function(e,t){e.__dirty=e.__used=!1}),this._singleCanvas)for(var n,i,o=1;o<e.length;o++){var r=e[o];if(r.zlevel!==e[o-1].zlevel||r.incremental){this._needsManuallyCompositing=!0;break}}var a=null,s=0;for(i=0;i<e.length;i++){var r=e[i],l=r.zlevel,c=void 0;n!==l&&(n=l,s=0),r.incremental?((c=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,s=1):c=this.getLayer(l+.01*(s>0),this._needsManuallyCompositing),c.__builtin__||ry("ZLevel "+l+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==i&&(c.__dirty=!0),c.__startIndex=i,c.incremental?c.__drawIndex=-1:c.__drawIndex=i,t(i),a=c),1&r.__dirty&&!r.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=i))}t(i),this.eachBuiltinLayer(function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(e){e.clear()},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,rM(this._layers,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?rF(n[e],t,!0):n[e]=t;for(var i=0;i<this._zlevelList.length;i++){var o=this._zlevelList[i];(o===e||o===e+.01)&&rF(this._layers[o],n[e],!0)}}},e.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,i=t[e];i&&(i.dom.parentNode.removeChild(i.dom),delete t[e],n.splice(rk(n,e),1))},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,o=this.root;if(null!=e&&(i.width=e),null!=t&&(i.height=t),e=g7(o,0,i),t=g7(o,1,i),n.style.display="",this._width!==e||t!==this._height){for(var r in n.style.width=e+"px",n.style.height=t+"px",this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(314159).resize(e,t)}return this},e.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var t=new wk("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var i=t.dom.width,o=t.dom.height;this.eachLayer(function(e){e.__builtin__?n.drawImage(e.dom,0,0,i,o):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else for(var r={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,l=a.length;s<l;s++)_h(n,a[s],r,s===l-1);return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}(),wT=dP.CMD;function wM(e,t){return 1e-5>Math.abs(e-t)}function wA(e){var t,n,i,o,r,a=e.data,s=e.len(),l=[],c=0,d=0,u=0,m=0;function f(e,n){t&&t.length>2&&l.push(t),t=[e,n]}function p(e,n,i,o){wM(e,i)&&wM(n,o)||t.push(e,n,i,o,i,o)}for(var h=0;h<s;){var b=a[h++],g=1===h;switch(g&&(c=a[h],d=a[h+1],u=c,m=d,(b===wT.L||b===wT.C||b===wT.Q)&&(t=[u,m])),b){case wT.M:c=u=a[h++],d=m=a[h++],f(u,m);break;case wT.L:p(c,d,n=a[h++],i=a[h++]),c=n,d=i;break;case wT.C:t.push(a[h++],a[h++],a[h++],a[h++],c=a[h++],d=a[h++]);break;case wT.Q:n=a[h++],i=a[h++],o=a[h++],r=a[h++],t.push(c+2/3*(n-c),d+2/3*(i-d),o+2/3*(n-o),r+2/3*(i-r),o,r),c=o,d=r;break;case wT.A:var _=a[h++],y=a[h++],v=a[h++],F=a[h++],x=a[h++],w=a[h++]+x;h+=1;var k=!a[h++];n=Math.cos(x)*v+_,i=Math.sin(x)*F+y,g?f(u=n,m=i):p(c,d,n,i),c=Math.cos(w)*v+_,d=Math.sin(w)*F+y;for(var E=(k?-1:1)*Math.PI/2,T=x;k?T>w:T<w;T+=E){var M=k?Math.max(T+E,w):Math.min(T+E,w);!function(e,n,i,o,r,a){var s=4*Math.tan(Math.abs(n-e)/4)/3,l=n<e?-1:1,c=Math.cos(e),d=Math.sin(e),u=Math.cos(n),m=Math.sin(n),f=u*r+i,p=m*a+o,h=r*s*l,b=a*s*l;t.push(c*r+i-h*d,d*a+o+b*c,f+h*m,p-b*u,f,p)}(T,M,_,y,v,F)}break;case wT.R:u=c=a[h++],m=d=a[h++],n=u+a[h++],i=m+a[h++],f(n,m),p(n,m,n,i),p(n,i,u,i),p(u,i,u,m),p(u,m,n,m);break;case wT.Z:t&&p(c,d,u,m),c=u,d=m}}return t&&t.length>2&&l.push(t),l}function wC(e,t,n){var i=Math.ceil(Math.sqrt(Math.abs(e[t]/e[1-t])*n)),o=Math.floor(n/i);0===o&&(o=1,i=n);for(var r=[],a=0;a<i;a++)r.push(o);var s=n-i*o;if(s>0)for(var a=0;a<s;a++)r[a%i]+=1;return r}function wD(e,t,n){for(var i=e.r0,o=e.r,r=e.startAngle,a=Math.abs(e.endAngle-r),s=a*o,l=o-i,c=s>Math.abs(l),d=wC([s,l],+!c,t),u=(c?a:l)/d.length,m=0;m<d.length;m++)for(var f=(c?l:a)/d[m],p=0;p<d[m];p++){var h={};c?(h.startAngle=r+u*m,h.endAngle=r+u*(m+1),h.r0=i+f*p,h.r=i+f*(p+1)):(h.startAngle=r+f*p,h.endAngle=r+f*(p+1),h.r0=i+u*m,h.r=i+u*(m+1)),h.clockwise=e.clockwise,h.cx=e.cx,h.cy=e.cy,n.push(h)}}function wS(e,t){var n=e[e.length-1];n&&n[0]===t[0]&&n[1]===t[1]||e.push(t)}function wL(e){var t=e.points,n=[],i=[];db(t,n,i);var o=new a3(n[0],n[1],i[0]-n[0],i[1]-n[1]),r=o.width,a=o.height,s=o.x,l=o.y,c=new aB,d=new aB;return r>a?(c.x=d.x=s+r/2,c.y=l,d.y=l+a):(c.y=d.y=l+a/2,c.x=s,d.x=s+r),function(e,t,n){for(var i=e.length,o=[],r=0;r<i;r++){var a=e[r],s=e[(r+1)%i],l=function(e,t,n,i,o,r,a,s){var l=n-e,c=i-t,d=a-o,u=s-r,m=d*c-l*u;if(1e-6>Math.abs(m))return null;var f=((e-o)*u-d*(t-r))/m;return f<0||f>1?null:new aB(f*l+e,f*c+t)}(a[0],a[1],s[0],s[1],t.x,t.y,n.x,n.y);l&&o.push({projPt:function(e,t,n){var i=new aB;aB.sub(i,n,t),i.normalize();var o=new aB;return aB.sub(o,e,t),o.dot(i)}(l,t,n),pt:l,idx:r})}if(o.length<2)return[{points:e},{points:e}];o.sort(function(e,t){return e.projPt-t.projPt});var c=o[0],d=o[o.length-1];if(d.idx<c.idx){var u=c;c=d,d=u}for(var m=[c.pt.x,c.pt.y],f=[d.pt.x,d.pt.y],p=[m],h=[f],r=c.idx+1;r<=d.idx;r++)wS(p,e[r].slice());wS(p,f),wS(p,m);for(var r=d.idx+1;r<=c.idx+i;r++)wS(h,e[r%i].slice());return wS(h,m),wS(h,f),[{points:p},{points:h}]}(t,c,d)}function wI(e,t,n,i){if(1===n)i.push(t);else{var o=Math.floor(n/2),r=e(t);wI(e,r[0],o,i),wI(e,r[1],n-o,i)}return i}function wO(e,t){for(var n=e.length,i=e[n-2],o=e[n-1],r=[],a=0;a<t.length;)r[a++]=i,r[a++]=o;return r}function wR(e){for(var t=0,n=0,i=0,o=e.length,r=0,a=o-2;r<o;a=r,r+=2){var s=e[a],l=e[a+1],c=e[r],d=e[r+1],u=s*d-c*l;t+=u,n+=(s+c)*u,i+=(l+d)*u}return 0===t?[e[0]||0,e[1]||0]:[n/t/3,i/t/3,t]}function wY(e){return e.__isCombineMorphing}var wP="__mOriginal_";function wN(e,t,n){var i=wP+t,o=e[i]||e[t];e[i]||(e[i]=e[t]);var r=n.replace,a=n.after,s=n.before;e[t]=function(){var e,t=arguments;return s&&s.apply(this,t),e=r?r.apply(this,t):o.apply(this,t),a&&a.apply(this,t),e}}function wB(e,t){var n=wP+t;e[n]&&(e[t]=e[n],e[n]=null)}function wH(e,t){for(var n=0;n<e.length;n++)for(var i=e[n],o=0;o<i.length;){var r=i[o],a=i[o+1];i[o++]=t[0]*r+t[2]*a+t[4],i[o++]=t[1]*r+t[3]*a+t[5]}}function wz(e,t){var n=e.getUpdatedPathProxy(),i=t.getUpdatedPathProxy(),o=function(e,t){for(var n,i,o,r=[],a=[],s=0;s<Math.max(e.length,t.length);s++){var l=e[s],c=t[s],d=void 0,u=void 0;l?c?(d=(n=function(e,t){var n=e.length,i=t.length;if(n===i)return[e,t];for(var o=[],r=[],a=n<i?e:t,s=Math.min(n,i),l=Math.abs(i-n)/6,c=Math.ceil(l/((s-2)/6))+1,d=[a[0],a[1]],u=l,m=2;m<s;){var f=a[m-2],p=a[m-1],h=a[m++],b=a[m++],g=a[m++],_=a[m++],y=a[m++],v=a[m++];if(u<=0){d.push(h,b,g,_,y,v);continue}for(var F=Math.min(u,c-1)+1,x=1;x<=F;x++){var w=x/F;sM(f,h,g,y,w,o),sM(p,b,_,v,w,r),f=o[3],p=r[3],d.push(o[1],r[1],o[2],r[2],f,p),h=o[5],b=r[5],g=o[6],_=r[6]}u-=F-1}return a===e?[d,t]:[e,d]}(l,c))[0],u=n[1],i=d,o=u):(u=wO(o||l,l),d=l):(d=wO(i||c,c),u=c),r.push(d),a.push(u)}return[r,a]}(wA(n),wA(i)),r=o[0],a=o[1],s=e.getComputedTransform(),l=t.getComputedTransform();s&&wH(r,s),l&&wH(a,l),wN(t,"updateTransform",{replace:function(){this.transform=null}}),t.transform=null;var c=function(e,t,n,i){for(var o,r=[],a=0;a<e.length;a++){var s=e[a],l=t[a],c=wR(s),d=wR(l);null==o&&(o=c[2]<0!=d[2]<0);var u=[],m=[],f=0,p=1/0,h=[],b=s.length;o&&(s=function(e){for(var t=[],n=e.length,i=0;i<n;i+=2)t[i]=e[n-i-2],t[i+1]=e[n-i-1];return t}(s));for(var g=6*function(e,t,n,i){for(var o=(e.length-2)/6,r=1/0,a=0,s=e.length,l=s-2,c=0;c<o;c++){for(var d=6*c,u=0,m=0;m<s;m+=2){var f=0===m?d:(d+m-2)%l+2,p=e[f]-n[0],h=e[f+1]-n[1],b=t[m]-i[0],g=t[m+1]-i[1],_=b-p,y=g-h;u+=_*_+y*y}u<r&&(r=u,a=c)}return a}(s,l,c,d),_=b-2,y=0;y<_;y+=2){var v=(g+y)%_+2;u[y+2]=s[v]-c[0],u[y+3]=s[v+1]-c[1]}u[0]=s[g]-c[0],u[1]=s[g+1]-c[1];for(var F=i/10,x=-i/2;x<=i/2;x+=F){for(var w=Math.sin(x),k=Math.cos(x),E=0,y=0;y<s.length;y+=2){var T=u[y],M=u[y+1],A=l[y]-d[0],C=l[y+1]-d[1],D=A*k-C*w,S=A*w+C*k;h[y]=D,h[y+1]=S;var L=D-T,I=S-M;E+=L*L+I*I}if(E<p){p=E,f=x;for(var O=0;O<h.length;O++)m[O]=h[O]}}r.push({from:u,to:m,fromCp:c,toCp:d,rotation:-f})}return r}(r,a,10,Math.PI),d=[];wN(t,"buildPath",{replace:function(e){for(var n=t.__morphT,i=1-n,o=[],r=0;r<c.length;r++){var a=c[r],s=a.from,l=a.to,u=a.rotation*n,m=a.fromCp,f=a.toCp,p=Math.sin(u),h=Math.cos(u);o[0]=m[0]+n*(f[0]-m[0]),o[1]=m[1]+n*(f[1]-m[1]);for(var b=0;b<s.length;b+=2){var g=s[b],_=s[b+1],y=l[b],v=l[b+1],F=g*i+y*n,x=_*i+v*n;d[b]=F*h-x*p+o[0],d[b+1]=F*p+x*h+o[1]}var w=d[0],k=d[1];e.moveTo(w,k);for(var b=2;b<s.length;){var y=d[b++],v=d[b++],E=d[b++],T=d[b++],M=d[b++],A=d[b++];w===y&&k===v&&E===M&&T===A?e.lineTo(M,A):e.bezierCurveTo(y,v,E,T,M,A),w=M,k=A}}}})}function wj(e,t,n){if(!e||!t)return t;var i=n.done,o=n.during;return wz(e,t),t.__morphT=0,t.animateTo({__morphT:1},rw({during:function(e){t.dirtyShape(),o&&o(e)},done:function(){wB(t,"buildPath"),wB(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape(),i&&i()}},n)),t}function wU(e){var t=1/0,n=1/0,i=-1/0,o=-1/0,r=rA(e,function(e){var r=e.getBoundingRect(),a=e.getComputedTransform(),s=r.x+r.width/2+(a?a[4]:0),l=r.y+r.height/2+(a?a[5]:0);return t=Math.min(s,t),n=Math.min(l,n),i=Math.max(s,i),o=Math.max(l,o),[s,l]});return rA(r,function(r,a){return{cp:r,z:function(e,t,n,i,o,r){e=o===n?0:Math.round(32767*(e-n)/(o-n)),t=r===i?0:Math.round(32767*(t-i)/(r-i));for(var a,s=0,l=32768;l>0;l/=2){var c=0,d=0;(e&l)>0&&(c=1),(t&l)>0&&(d=1),s+=l*l*(3*c^d),0===d&&(1===c&&(e=l-1-e,t=l-1-t),a=e,e=t,t=a)}return s}(r[0],r[1],t,n,i,o),path:e[a]}}).sort(function(e,t){return e.z-t.z}).map(function(e){return e.path})}function wW(e){return function(e,t){var n,i=[],o=e.shape;switch(e.type){case"rect":!function(e,t,n){for(var i=e.width,o=e.height,r=i>o,a=wC([i,o],+!r,t),s=r?"width":"height",l=r?"height":"width",c=r?"x":"y",d=r?"y":"x",u=e[s]/a.length,m=0;m<a.length;m++)for(var f=e[l]/a[m],p=0;p<a[m];p++){var h={};h[c]=m*u,h[d]=p*f,h[s]=u,h[l]=f,h.x+=e.x,h.y+=e.y,n.push(h)}}(o,t,i),n=ut;break;case"sector":wD(o,t,i),n=hG;break;case"circle":wD({r0:0,r:o.r,startAngle:0,endAngle:2*Math.PI,cx:o.cx,cy:o.cy},t,i),n=hG;break;default:var r=e.getComputedTransform(),a=r?Math.sqrt(Math.max(r[0]*r[0]+r[1]*r[1],r[2]*r[2]+r[3]*r[3])):1,s=rA(function(e,t){var n=wA(e),i=[];t=t||1;for(var o=0;o<n.length;o++){var r=n[o],a=[],s=r[0],l=r[1];a.push(s,l);for(var c=2;c<r.length;){var d=r[c++],u=r[c++],m=r[c++],f=r[c++],p=r[c++],h=r[c++];!function e(t,n,i,o,r,a,s,l,c,d){if(wM(t,i)&&wM(n,o)&&wM(r,s)&&wM(a,l))return void c.push(s,l);var u=2/d,m=u*u,f=s-t,p=l-n,h=Math.sqrt(f*f+p*p);f/=h,p/=h;var b=i-t,g=o-n,_=r-s,y=a-l,v=b*b+g*g,F=_*_+y*y;if(v<m&&F<m)return void c.push(s,l);var x=f*b+p*g,w=-f*_-p*y;if(v-x*x<m&&x>=0&&F-w*w<m&&w>=0)return void c.push(s,l);var k=[],E=[];sM(t,i,r,s,.5,k),sM(n,o,a,l,.5,E),e(k[0],E[0],k[1],E[1],k[2],E[2],k[3],E[3],c,d),e(k[4],E[4],k[5],E[5],k[6],E[6],k[7],E[7],c,d)}(s,l,d,u,m,f,p,h,a,t),s=p,l=h}i.push(a)}return i}(e.getUpdatedPathProxy(),a),function(e){for(var t=[],n=0;n<e.length;)t.push([e[n++],e[n++]]);return t}),l=s.length;if(0===l)wI(wL,{points:s[0]},t,i);else if(l===t)for(var c=0;c<l;c++)i.push({points:s[c]});else{var d=0,u=rA(s,function(e){var t=[],n=[];db(e,t,n);var i=(n[1]-t[1])*(n[0]-t[0]);return d+=i,{poly:e,area:i}});u.sort(function(e,t){return t.area-e.area});for(var m=t,c=0;c<l;c++){var f=u[c];if(m<=0)break;var p=c===l-1?m:Math.ceil(f.area/d*t);p<0||(wI(wL,{points:f.poly},p,i),m-=p)}}n=hQ}if(!n){for(var h=[],b=0;b<t;b++)h.push(hT(e));return h}for(var g=[],c=0;c<i.length;c++){var _=new n;_.setShape(i[c]),_.setStyle(e.style),_.z=e.z,_.z2=e.z2,_.zlevel=e.zlevel,g.push(_)}return g}(e.path,e.count)}function wV(){return{fromIndividuals:[],toIndividuals:[],count:0}}function wG(e,t){for(var n=[],i=e.length,o=0;o<i;o++)n.push({one:e[o],many:[]});for(var o=0;o<t.length;o++){var r=t[o].length,a=void 0;for(a=0;a<r;a++)n[a%i].many.push(t[o][a])}for(var s=0,o=i-1;o>=0;o--)if(!n[o].many.length){var l=n[s].many;if(l.length<=1)if(!s)return n;else s=0;var r=l.length,c=Math.ceil(r/2);n[o].many=l.slice(c,r),n[s].many=l.slice(0,c),s++}return n}var w$={clone:function(e){for(var t=[],n=1-Math.pow(1-e.path.style.opacity,1/e.count),i=0;i<e.count;i++){var o=hT(e.path);o.setStyle("opacity",n),t.push(o)}return t},split:null};function wq(e,t,n,i,o,r){if(e.length&&t.length){var a,s,l=bF("update",i,o);if(l&&l.duration>0){var c=i.getModel("universalTransition").get("delay"),d=Object.assign({setToFinal:!0},l);rO(e[0])&&(a=e,s=t),rO(t[0])&&(a=t,s=e);for(var u=a?a===e:e.length>t.length,m=a?wG(s,a):wG(u?t:e,[u?e:t]),f=0,p=0;p<m.length;p++)f+=m[p].many.length;for(var h=0,p=0;p<m.length;p++)(function e(t,i,o,a,s){var l=t.many,u=t.one;if(1!==l.length||s)for(var m=rw({dividePath:w$[n],individualDelay:c&&function(e,t,n,i){return c(e+o,a)}},d),f=i?function(e,t,n){var i=[];!function e(t){for(var n=0;n<t.length;n++){var o=t[n];wY(o)?e(o.childrenRef()):o instanceof dJ&&i.push(o)}}(e);var o=i.length;if(!o)return wV();var r=(n.dividePath||wW)({path:t,count:o});if(r.length!==o)return console.error("Invalid morphing: unmatched splitted path"),wV();i=wU(i),r=wU(r);for(var a=n.done,s=n.during,l=n.individualDelay,c=new lC,d=0;d<o;d++){var u=i[d],m=r[d];m.parent=t,m.copyTransform(c),l||wz(u,m)}function f(e){for(var t=0;t<r.length;t++)r[t].addSelfToZr(e)}function p(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,wB(t,"addSelfToZr"),wB(t,"removeSelfFromZr")}t.__isCombineMorphing=!0,t.childrenRef=function(){return r},wN(t,"addSelfToZr",{after:function(e){f(e)}}),wN(t,"removeSelfFromZr",{after:function(e){for(var t=0;t<r.length;t++)r[t].removeSelfFromZr(e)}});var h=r.length;if(l)for(var b=h,g=function(){0==--b&&(p(),a&&a())},d=0;d<h;d++){var _=l?rw({delay:(n.delay||0)+l(d,h,i[d],r[d]),done:g},n):n;wj(i[d],r[d],_)}else t.__morphT=0,t.animateTo({__morphT:1},rw({during:function(e){for(var n=0;n<h;n++){var i=r[n];i.__morphT=t.__morphT,i.dirtyShape()}s&&s(e)},done:function(){p();for(var t=0;t<e.length;t++)wB(e[t],"updateTransform");a&&a()}},n));return t.__zr&&f(t.__zr),{fromIndividuals:i,toIndividuals:r,count:h}}(l,u,m):function(e,t,n){var i=t.length,o=[],r=n.dividePath||wW;if(wY(e)){!function e(t){for(var n=0;n<t.length;n++){var i=t[n];wY(i)?e(i.childrenRef()):i instanceof dJ&&o.push(i)}}(e.childrenRef());var a=o.length;if(a<i)for(var s=0,l=a;l<i;l++)o.push(hT(o[s++%a]));o.length=i}else{o=r({path:e,count:i});for(var c=e.getComputedTransform(),l=0;l<o.length;l++)o[l].setLocalTransform(c);if(o.length!==i)return console.error("Invalid morphing: unmatched splitted path"),wV()}o=wU(o),t=wU(t);for(var d=n.individualDelay,l=0;l<i;l++){var u=d?rw({delay:(n.delay||0)+d(l,i,o[l],t[l])},n):n;wj(o[l],t[l],u)}return{fromIndividuals:o,toIndividuals:t,count:t.length}}(u,l,m),p=f.fromIndividuals,h=f.toIndividuals,b=p.length,g=0;g<b;g++){var _=c?rw({delay:c(g,b)},d):d;r(p[g],h[g],i?l[g]:t.one,i?t.one:l[g],_)}else{var y=i?l[0]:u,v=i?u:l[0];if(wY(y))e({many:[y],one:v},!0,o,a,!0);else{var _=c?rw({delay:c(o,a)},d):d;wj(y,v,_),r(y,v,y,v,_)}}})(m[p],u,h,f),h+=m[p].many.length}}}function wX(e){if(!e)return[];if(rO(e)){for(var t=[],n=0;n<e.length;n++)t.push(wX(e[n]));return t}var i=[];return e.traverse(function(e){e instanceof dJ&&!e.disableMorphing&&!e.invisible&&!e.ignore&&i.push(e)}),i}var wK=ck();function wJ(e,t,n,i){var o=function(e,t){for(var n=e.dimensions,i=0;i<n.length;i++){var o=e.getDimensionInfo(n[i]);if(o&&0===o.otherDims[t])return n[i]}}(e,i?"itemChildGroupId":"itemGroupId");if(o){var r=e,a=t,s=o,l=r.getDimensionInfo(s),c=l&&l.ordinalMeta;if(l){var d=r.get(l.name,a);return c&&c.categories[d]||d+""}return}var u=e.getRawDataItem(t),m=i?"childGroupId":"groupId";return u&&u[m]?u[m]+"":i?void 0:n||e.getId(t)}function wZ(e){var t=[];return rM(e,function(e){var n=e.data,i=e.dataGroupId;if(!(n.count()>1e4))for(var o=n.getIndices(),r=0;r<o.length;r++)t.push({data:n,groupId:wJ(n,r,i,!1),childGroupId:wJ(n,r,i,!0),divide:e.divide,dataIndex:r})}),t}function wQ(e,t,n){e.traverse(function(e){e instanceof dJ&&bk(e,{style:{opacity:0}},t,{dataIndex:n,isFrom:!0})})}function w0(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function w1(e){e.stopAnimation(),e.isGroup&&e.traverse(function(e){e.stopAnimation()})}function w2(e,t,n){var i=wZ(e),o=wZ(t);function r(e,t,n,i,o){(n||e)&&t.animateFrom({style:n&&n!==e?rx(rx({},n.style),e.style):e.style},o)}var a=!1,s=0,l=r1(),c=r1();i.forEach(function(e){e.groupId&&l.set(e.groupId,!0),e.childGroupId&&c.set(e.childGroupId,!0)});for(var d=0;d<o.length;d++){var u=o[d].groupId;if(c.get(u)){s=1;break}var m=o[d].childGroupId;if(m&&l.get(m)){s=2;break}}function f(e,t){return function(n){var i=n.data,o=n.dataIndex;return t?i.getId(o):e?1===s?n.childGroupId:n.groupId:2===s?n.childGroupId:n.groupId}}var p=function(e,t){var n=e.length;if(n!==t.length)return!1;for(var i=0;i<n;i++){var o=e[i],r=t[i];if(o.data.getId(o.dataIndex)!==r.data.getId(r.dataIndex))return!1}return!0}(i,o),h={};if(!p)for(var d=0;d<o.length;d++){var b=o[d],g=b.data.getItemGraphicEl(b.dataIndex);g&&(h[g.id]=!0)}function _(e,t){var n,s=i[t],l=o[e],c=l.data.hostModel,d=s.data.getItemGraphicEl(s.dataIndex),u=l.data.getItemGraphicEl(l.dataIndex);if(d===u){u&&(n=bF("update",c,l.dataIndex))&&u.traverse(function(e){if(e instanceof dr){var t=bv(e).oldStyle;t&&e.animateFrom({style:t},n)}});return}d&&h[d.id]||u&&(w1(u),d?(w1(d),w0(d),a=!0,wq(wX(d),wX(u),l.divide,c,e,r)):wQ(u,c,e))}new xX(i,o,f(!0,p),f(!1,p),null,"multiple").update(_).updateManyToOne(function(e,t){var n=o[e],s=n.data,l=s.hostModel,c=s.getItemGraphicEl(n.dataIndex),d=rD(rA(t,function(e){return i[e].data.getItemGraphicEl(i[e].dataIndex)}),function(e){return e&&e!==c&&!h[e.id]});c&&(w1(c),d.length?(rM(d,function(e){w1(e),w0(e)}),a=!0,wq(wX(d),wX(c),n.divide,l,e,r)):wQ(c,l,n.dataIndex))}).updateOneToMany(function(e,t){var n=i[t],s=n.data.getItemGraphicEl(n.dataIndex);if(!s||!h[s.id]){var l=rD(rA(e,function(e){return o[e].data.getItemGraphicEl(o[e].dataIndex)}),function(e){return e&&e!==s}),c=o[e[0]].data.hostModel;l.length&&(rM(l,function(e){return w1(e)}),s?(w1(s),w0(s),a=!0,wq(wX(s),wX(l),n.divide,c,e[0],r)):rM(l,function(t){return wQ(t,c,e[0])}))}}).updateManyToMany(function(e,t){new xX(t,e,function(e){return i[e].data.getId(i[e].dataIndex)},function(e){return o[e].data.getId(o[e].dataIndex)}).update(function(n,i){_(e[n],t[i])}).execute()}).execute(),a&&rM(t,function(e){var t=e.data.hostModel,i=t&&n.getViewOfSeriesModel(t),o=bF("update",t,0);i&&t.isAnimationEnabled()&&o&&o.duration>0&&i.group.traverse(function(e){e instanceof dJ&&!e.animators.length&&e.animateFrom({style:{opacity:0}},o)})})}function w5(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function w3(e){return rO(e)?e.sort().join(","):e}function w4(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function w6(e,t){for(var n=0;n<e.length;n++)if(null!=t.seriesIndex&&t.seriesIndex===e[n].seriesIndex||null!=t.seriesId&&t.seriesId===e[n].id)return n}let{I:w8}={M:tL,P:tI,A:tO,C:1,L:t2,R:t4,D:tH,V:t3,I:t6,H:t8,N:t9,U:ne,B:t7,F:nt},w7=(e,t)=>void 0===t?void 0!==e?._$litType$:e?._$litType$===t,w9=()=>document.createComment(""),ke=(e,t,n)=>{let i=e._$AA.parentNode,o=void 0===t?e._$AB:t._$AA;if(void 0===n)n=new w8(i.insertBefore(w9(),o),i.insertBefore(w9(),o),e,e.options);else{let t=n._$AB.nextSibling,r=n._$AM,a=r!==e;if(a){let t;n._$AQ?.(e),n._$AM=e,void 0!==n._$AP&&(t=e._$AU)!==r._$AU&&n._$AP(t)}if(t!==o||a){let e=n._$AA;for(;e!==t;){let t=e.nextSibling;i.insertBefore(e,o),e=t}}}return n},kt={},kn=(e,t=kt)=>e._$AH=t,ki=(e,t)=>{let n=e._$AN;if(void 0===n)return!1;for(let e of n)e._$AO?.(t,!1),ki(e,t);return!0},ko=e=>{let t,n;do{if(void 0===(t=e._$AM))break;(n=t._$AN).delete(e),e=t}while(0===n?.size)},kr=e=>{for(let t;t=e._$AM;e=t){let n=t._$AN;if(void 0===n)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),kl(t)}};function ka(e){void 0!==this._$AN?(ko(this),this._$AM=e,kr(this)):this._$AM=e}function ks(e,t=!1,n=0){let i=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(t)if(Array.isArray(i))for(let e=n;e<i.length;e++)ki(i[e],!1),ko(i[e]);else null!=i&&(ki(i,!1),ko(i));else ki(this,e)}let kl=e=>{e.type==oH.CHILD&&(e._$AP??=ks,e._$AQ??=ka)};class kc extends oj{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),kr(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(ki(this,e),ko(this))}setValue(e){if(void 0===this._$Ct.strings)this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}let kd=()=>new ku;class ku{}let km=new WeakMap,kf=oz(class extends kc{render(e){return tZ}update(e,[t]){let n=t!==this.G;return n&&void 0!==this.G&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),tZ}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){let t=this.ht??globalThis,n=km.get(t);void 0===n&&(n=new WeakMap,km.set(t,n)),void 0!==n.get(this.G)&&this.G.call(this.ht,void 0),n.set(this.G,e),void 0!==e&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return"function"==typeof this.G?km.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),kp=oz(class extends oj{constructor(e){if(super(e),e.type!==oH.ATTRIBUTE||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(void 0===this.st){for(let n in this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e))),t)t[n]&&!this.nt?.has(n)&&this.st.add(n);return this.render(t)}let n=e.element.classList;for(let e of this.st)e in t||(n.remove(e),this.st.delete(e));for(let e in t){let i=!!t[e];i===this.st.has(e)||this.nt?.has(e)||(i?(n.add(e),this.st.add(e)):(n.remove(e),this.st.delete(e)))}return tJ}});function kh(e,t,n){return e?t(e):n?.(e)}class kb{constructor(e){this.G=e}disconnect(){this.G=void 0}reconnect(e){this.G=e}deref(){return this.G}}class kg{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){this.Y??=new Promise(e=>this.Z=e)}resume(){this.Z?.(),this.Y=this.Z=void 0}}let k_=e=>!(e=>null===e||"object"!=typeof e&&"function"!=typeof e)(e)&&"function"==typeof e.then,ky=oz(class extends kc{constructor(){super(...arguments),this._$Cwt=0x3fffffff,this._$Cbt=[],this._$CK=new kb(this),this._$CX=new kg}render(...e){return e.find(e=>!k_(e))??tJ}update(e,t){let n=this._$Cbt,i=n.length;this._$Cbt=t;let o=this._$CK,r=this._$CX;this.isConnected||this.disconnected();for(let e=0;e<t.length&&!(e>this._$Cwt);e++){let a=t[e];if(!k_(a))return this._$Cwt=e,a;e<i&&a===n[e]||(this._$Cwt=0x3fffffff,i=0,Promise.resolve(a).then(async e=>{for(;r.get();)await r.get();let t=o.deref();if(void 0!==t){let n=t._$Cbt.indexOf(a);n>-1&&n<t._$Cwt&&(t._$Cwt=n,t.setValue(e))}}))}return tJ}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}});var kv=function(e,t){return(kv=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function kF(e,t){function n(){this.constructor=e}kv(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var kx=function(){return(kx=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function kw(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function kk(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}(arguments[t]));return e}var kE=function(){function e(e){void 0===e&&(e={}),this.adapter=e}return Object.defineProperty(e,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.destroy=function(){},e}(),kT=function(){function e(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];this.root=e,this.initialize.apply(this,kk(n)),this.foundation=void 0===t?this.getDefaultFoundation():t,this.foundation.init(),this.initialSyncWithDOM()}return e.attachTo=function(t){return new e(t,new kE({}))},e.prototype.initialize=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.getDefaultFoundation=function(){throw Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},e.prototype.initialSyncWithDOM=function(){},e.prototype.destroy=function(){this.foundation.destroy()},e.prototype.listen=function(e,t,n){this.root.addEventListener(e,t,n)},e.prototype.unlisten=function(e,t,n){this.root.removeEventListener(e,t,n)},e.prototype.emit=function(e,t,n){var i;void 0===n&&(n=!1),"function"==typeof CustomEvent?i=new CustomEvent(e,{bubbles:n,detail:t}):(i=document.createEvent("CustomEvent")).initCustomEvent(e,n,!1,t),this.root.dispatchEvent(i)},e}();function kM(e){return void 0===e&&(e=window),!!function(e){void 0===e&&(e=window);var t=!1;try{var n={get passive(){return t=!0,!1}},i=function(){};e.document.addEventListener("test",i,n),e.document.removeEventListener("test",i,n)}catch(e){t=!1}return t}(e)&&{passive:!0}}function kA(e,t){if(e.closest)return e.closest(t);for(var n=e;n;){if(kC(n,t))return n;n=n.parentElement}return null}function kC(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}var kD={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},kS=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.shakeAnimationEndHandler_=function(){return i.handleShakeAnimationEnd_()},i}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return kD},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler_)},t.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler_)},t.prototype.getWidth=function(){return this.adapter.getWidth()},t.prototype.shake=function(e){var n=t.cssClasses.LABEL_SHAKE;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.float=function(e){var n=t.cssClasses,i=n.LABEL_FLOAT_ABOVE,o=n.LABEL_SHAKE;e?this.adapter.addClass(i):(this.adapter.removeClass(i),this.adapter.removeClass(o))},t.prototype.setRequired=function(e){var n=t.cssClasses.LABEL_REQUIRED;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.handleShakeAnimationEnd_=function(){var e=t.cssClasses.LABEL_SHAKE;this.adapter.removeClass(e)},t}(kE),kL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},t.prototype.shake=function(e){this.foundation.shake(e)},t.prototype.float=function(e){this.foundation.float(e)},t.prototype.setRequired=function(e){this.foundation.setRequired(e)},t.prototype.getWidth=function(){return this.foundation.getWidth()},t.prototype.getDefaultFoundation=function(){var e=this;return new kS({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},getWidth:function(){var t=e.root;if(null!==t.offsetParent)return t.scrollWidth;var n=t.cloneNode(!0);n.style.setProperty("position","absolute"),n.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(n);var i=n.scrollWidth;return document.documentElement.removeChild(n),i},registerInteractionHandler:function(t,n){return e.listen(t,n)},deregisterInteractionHandler:function(t,n){return e.unlisten(t,n)}})},t}(kT),kI={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},kO=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.transitionEndHandler_=function(e){return i.handleTransitionEnd(e)},i}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return kI},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler_)},t.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler_)},t.prototype.activate=function(){this.adapter.removeClass(kI.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(kI.LINE_RIPPLE_ACTIVE)},t.prototype.setRippleCenter=function(e){this.adapter.setStyle("transform-origin",e+"px center")},t.prototype.deactivate=function(){this.adapter.addClass(kI.LINE_RIPPLE_DEACTIVATING)},t.prototype.handleTransitionEnd=function(e){var t=this.adapter.hasClass(kI.LINE_RIPPLE_DEACTIVATING);"opacity"===e.propertyName&&t&&(this.adapter.removeClass(kI.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(kI.LINE_RIPPLE_DEACTIVATING))},t}(kE),kR=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},t.prototype.activate=function(){this.foundation.activate()},t.prototype.deactivate=function(){this.foundation.deactivate()},t.prototype.setRippleCenter=function(e){this.foundation.setRippleCenter(e)},t.prototype.getDefaultFoundation=function(){var e=this;return new kO({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},setStyle:function(t,n){return e.root.style.setProperty(t,n)},registerEventHandler:function(t,n){return e.listen(t,n)},deregisterEventHandler:function(t,n){return e.unlisten(t,n)}})},t}(kT),kY={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},kP={NOTCH_ELEMENT_PADDING:8},kN={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},kB=function(e){function t(n){return e.call(this,kx(kx({},t.defaultAdapter),n))||this}return kF(t,e),Object.defineProperty(t,"strings",{get:function(){return kY},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return kN},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return kP},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!0,configurable:!0}),t.prototype.notch=function(e){var n=t.cssClasses.OUTLINE_NOTCHED;e>0&&(e+=kP.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(e),this.adapter.addClass(n)},t.prototype.closeNotch=function(){var e=t.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(e),this.adapter.removeNotchWidthProperty()},t}(kE),kH=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){this.notchElement_=this.root.querySelector(kY.NOTCH_ELEMENT_SELECTOR);var e=this.root.querySelector("."+kS.cssClasses.ROOT);e?(e.style.transitionDuration="0s",this.root.classList.add(kN.OUTLINE_UPGRADED),requestAnimationFrame(function(){e.style.transitionDuration=""})):this.root.classList.add(kN.NO_LABEL)},t.prototype.notch=function(e){this.foundation.notch(e)},t.prototype.closeNotch=function(){this.foundation.closeNotch()},t.prototype.getDefaultFoundation=function(){var e=this;return new kB({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},setNotchWidthProperty:function(t){return e.notchElement_.style.setProperty("width",t+"px")},removeNotchWidthProperty:function(){return e.notchElement_.style.removeProperty("width")}})},t}(kT),kz={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},kj={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},kU={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},kW=["touchstart","pointerdown","mousedown","keydown"],kV=["touchend","pointerup","mouseup","contextmenu"],kG=[],k$=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.activationAnimationHasEnded_=!1,i.activationTimer_=0,i.fgDeactivationRemovalTimer_=0,i.fgScale_="0",i.frame_={width:0,height:0},i.initialSize_=0,i.layoutFrame_=0,i.maxRadius_=0,i.unboundedCoords_={left:0,top:0},i.activationState_=i.defaultActivationState_(),i.activationTimerCallback_=function(){i.activationAnimationHasEnded_=!0,i.runDeactivationUXLogicIfReady_()},i.activateHandler_=function(e){return i.activate_(e)},i.deactivateHandler_=function(){return i.deactivate_()},i.focusHandler_=function(){return i.handleFocus()},i.blurHandler_=function(){return i.handleBlur()},i.resizeHandler_=function(){return i.layout()},i}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return kz},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return kj},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return kU},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this,n=this.supportsPressRipple_();if(this.registerRootHandlers_(n),n){var i=t.cssClasses,o=i.ROOT,r=i.UNBOUNDED;requestAnimationFrame(function(){e.adapter.addClass(o),e.adapter.isUnbounded()&&(e.adapter.addClass(r),e.layoutInternal_())})}},t.prototype.destroy=function(){var e=this;if(this.supportsPressRipple_()){this.activationTimer_&&(clearTimeout(this.activationTimer_),this.activationTimer_=0,this.adapter.removeClass(t.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer_&&(clearTimeout(this.fgDeactivationRemovalTimer_),this.fgDeactivationRemovalTimer_=0,this.adapter.removeClass(t.cssClasses.FG_DEACTIVATION));var n=t.cssClasses,i=n.ROOT,o=n.UNBOUNDED;requestAnimationFrame(function(){e.adapter.removeClass(i),e.adapter.removeClass(o),e.removeCssVars_()})}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_()},t.prototype.activate=function(e){this.activate_(e)},t.prototype.deactivate=function(){this.deactivate_()},t.prototype.layout=function(){var e=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){e.layoutInternal_(),e.layoutFrame_=0})},t.prototype.setUnbounded=function(e){var n=t.cssClasses.UNBOUNDED;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.handleFocus=function(){var e=this;requestAnimationFrame(function(){return e.adapter.addClass(t.cssClasses.BG_FOCUSED)})},t.prototype.handleBlur=function(){var e=this;requestAnimationFrame(function(){return e.adapter.removeClass(t.cssClasses.BG_FOCUSED)})},t.prototype.supportsPressRipple_=function(){return this.adapter.browserSupportsCssVars()},t.prototype.defaultActivationState_=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},t.prototype.registerRootHandlers_=function(e){var t=this;e&&(kW.forEach(function(e){t.adapter.registerInteractionHandler(e,t.activateHandler_)}),this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler_)),this.adapter.registerInteractionHandler("focus",this.focusHandler_),this.adapter.registerInteractionHandler("blur",this.blurHandler_)},t.prototype.registerDeactivationHandlers_=function(e){var t=this;"keydown"===e.type?this.adapter.registerInteractionHandler("keyup",this.deactivateHandler_):kV.forEach(function(e){t.adapter.registerDocumentInteractionHandler(e,t.deactivateHandler_)})},t.prototype.deregisterRootHandlers_=function(){var e=this;kW.forEach(function(t){e.adapter.deregisterInteractionHandler(t,e.activateHandler_)}),this.adapter.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter.deregisterInteractionHandler("blur",this.blurHandler_),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler_)},t.prototype.deregisterDeactivationHandlers_=function(){var e=this;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler_),kV.forEach(function(t){e.adapter.deregisterDocumentInteractionHandler(t,e.deactivateHandler_)})},t.prototype.removeCssVars_=function(){var e=this,n=t.strings;Object.keys(n).forEach(function(t){0===t.indexOf("VAR_")&&e.adapter.updateCssVariable(n[t],null)})},t.prototype.activate_=function(e){var t=this;if(!this.adapter.isSurfaceDisabled()){var n=this.activationState_;if(!n.isActivated){var i=this.previousActivationEvent_;if(!(i&&void 0!==e&&i.type!==e.type)){if(n.isActivated=!0,n.isProgrammatic=void 0===e,n.activationEvent=e,n.wasActivatedByPointer=!n.isProgrammatic&&void 0!==e&&("mousedown"===e.type||"touchstart"===e.type||"pointerdown"===e.type),void 0!==e&&kG.length>0&&kG.some(function(e){return t.adapter.containsEventTarget(e)}))return void this.resetActivationState_();void 0!==e&&(kG.push(e.target),this.registerDeactivationHandlers_(e)),n.wasElementMadeActive=this.checkElementMadeActive_(e),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame(function(){kG=[],!n.wasElementMadeActive&&void 0!==e&&(" "===e.key||32===e.keyCode)&&(n.wasElementMadeActive=t.checkElementMadeActive_(e),n.wasElementMadeActive&&t.animateActivation_()),n.wasElementMadeActive||(t.activationState_=t.defaultActivationState_())})}}}},t.prototype.checkElementMadeActive_=function(e){return void 0===e||"keydown"!==e.type||this.adapter.isSurfaceActive()},t.prototype.animateActivation_=function(){var e=this,n=t.strings,i=n.VAR_FG_TRANSLATE_START,o=n.VAR_FG_TRANSLATE_END,r=t.cssClasses,a=r.FG_DEACTIVATION,s=r.FG_ACTIVATION,l=t.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var c="",d="";if(!this.adapter.isUnbounded()){var u=this.getFgTranslationCoordinates_(),m=u.startPoint,f=u.endPoint;c=m.x+"px, "+m.y+"px",d=f.x+"px, "+f.y+"px"}this.adapter.updateCssVariable(i,c),this.adapter.updateCssVariable(o,d),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter.removeClass(a),this.adapter.computeBoundingRect(),this.adapter.addClass(s),this.activationTimer_=setTimeout(function(){return e.activationTimerCallback_()},l)},t.prototype.getFgTranslationCoordinates_=function(){var e,t=this.activationState_,n=t.activationEvent;return{startPoint:e={x:(e=t.wasActivatedByPointer?function(e,t,n){if(!e)return{x:0,y:0};var i,o,r=t.x,a=t.y,s=r+n.left,l=a+n.top;return"touchstart"===e.type?(i=e.changedTouches[0].pageX-s,o=e.changedTouches[0].pageY-l):(i=e.pageX-s,o=e.pageY-l),{x:i,y:o}}(n,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame_.width/2,y:this.frame_.height/2}).x-this.initialSize_/2,y:e.y-this.initialSize_/2},endPoint:{x:this.frame_.width/2-this.initialSize_/2,y:this.frame_.height/2-this.initialSize_/2}}},t.prototype.runDeactivationUXLogicIfReady_=function(){var e=this,n=t.cssClasses.FG_DEACTIVATION,i=this.activationState_,o=i.hasDeactivationUXRun,r=i.isActivated;(o||!r)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter.addClass(n),this.fgDeactivationRemovalTimer_=setTimeout(function(){e.adapter.removeClass(n)},kU.FG_DEACTIVATION_MS))},t.prototype.rmBoundedActivationClasses_=function(){var e=t.cssClasses.FG_ACTIVATION;this.adapter.removeClass(e),this.activationAnimationHasEnded_=!1,this.adapter.computeBoundingRect()},t.prototype.resetActivationState_=function(){var e=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout(function(){return e.previousActivationEvent_=void 0},t.numbers.TAP_DELAY_MS)},t.prototype.deactivate_=function(){var e=this,t=this.activationState_;if(t.isActivated){var n=kx({},t);t.isProgrammatic?(requestAnimationFrame(function(){return e.animateDeactivation_(n)}),this.resetActivationState_()):(this.deregisterDeactivationHandlers_(),requestAnimationFrame(function(){e.activationState_.hasDeactivationUXRun=!0,e.animateDeactivation_(n),e.resetActivationState_()}))}},t.prototype.animateDeactivation_=function(e){var t=e.wasActivatedByPointer,n=e.wasElementMadeActive;(t||n)&&this.runDeactivationUXLogicIfReady_()},t.prototype.layoutInternal_=function(){this.frame_=this.adapter.computeBoundingRect();var e=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter.isUnbounded()?e:Math.sqrt(Math.pow(this.frame_.width,2)+Math.pow(this.frame_.height,2))+t.numbers.PADDING;var n=Math.floor(e*t.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&n%2!=0?this.initialSize_=n-1:this.initialSize_=n,this.fgScale_=""+this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()},t.prototype.updateLayoutCssVars_=function(){var e=t.strings,n=e.VAR_FG_SIZE,i=e.VAR_LEFT,o=e.VAR_TOP,r=e.VAR_FG_SCALE;this.adapter.updateCssVariable(n,this.initialSize_+"px"),this.adapter.updateCssVariable(r,this.fgScale_),this.adapter.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter.updateCssVariable(i,this.unboundedCoords_.left+"px"),this.adapter.updateCssVariable(o,this.unboundedCoords_.top+"px"))},t}(kE),kq=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.disabled=!1,t}return kF(t,e),t.attachTo=function(e,n){void 0===n&&(n={isUnbounded:void 0});var i=new t(e);return void 0!==n.isUnbounded&&(i.unbounded=n.isUnbounded),i},t.createAdapter=function(e){return{addClass:function(t){return e.root.classList.add(t)},browserSupportsCssVars:function(){return function(e,t){void 0===t&&(t=!1);var n=e.CSS,i=e4;if("boolean"==typeof e4&&!t)return e4;if(!(n&&"function"==typeof n.supports))return!1;var o=n.supports("--css-vars","yes"),r=n.supports("(--css-vars: yes)")&&n.supports("color","#00000000");return i=o||r,t||(e4=i),i}(window)},computeBoundingRect:function(){return e.root.getBoundingClientRect()},containsEventTarget:function(t){return e.root.contains(t)},deregisterDocumentInteractionHandler:function(e,t){return document.documentElement.removeEventListener(e,t,kM())},deregisterInteractionHandler:function(t,n){return e.root.removeEventListener(t,n,kM())},deregisterResizeHandler:function(e){return window.removeEventListener("resize",e)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return kC(e.root,":active")},isSurfaceDisabled:function(){return!!e.disabled},isUnbounded:function(){return!!e.unbounded},registerDocumentInteractionHandler:function(e,t){return document.documentElement.addEventListener(e,t,kM())},registerInteractionHandler:function(t,n){return e.root.addEventListener(t,n,kM())},registerResizeHandler:function(e){return window.addEventListener("resize",e)},removeClass:function(t){return e.root.classList.remove(t)},updateCssVariable:function(t,n){return e.root.style.setProperty(t,n)}}},Object.defineProperty(t.prototype,"unbounded",{get:function(){return!!this.unbounded_},set:function(e){this.unbounded_=!!e,this.setUnbounded_()},enumerable:!0,configurable:!0}),t.prototype.activate=function(){this.foundation.activate()},t.prototype.deactivate=function(){this.foundation.deactivate()},t.prototype.layout=function(){this.foundation.layout()},t.prototype.getDefaultFoundation=function(){return new k$(t.createAdapter(this))},t.prototype.initialSyncWithDOM=function(){var e=this.root;this.unbounded="mdcRippleIsUnbounded"in e.dataset},t.prototype.setUnbounded_=function(){this.foundation.setUnbounded(!!this.unbounded_)},t}(kT),kX={ROOT:"mdc-text-field-character-counter"},kK={ROOT_SELECTOR:"."+kX.ROOT},kJ=function(e){function t(n){return e.call(this,kx(kx({},t.defaultAdapter),n))||this}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return kX},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return kK},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{setContent:function(){}}},enumerable:!0,configurable:!0}),t.prototype.setCounterValue=function(e,t){e=Math.min(e,t),this.adapter.setContent(e+" / "+t)},t}(kE),kZ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!0,configurable:!0}),t.prototype.getDefaultFoundation=function(){var e=this;return new kJ({setContent:function(t){e.root.textContent=t}})},t}(kT),kQ={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},k0={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon"},k1={LABEL_SCALE:.75},k2=["pattern","min","max","required","step","minlength","maxlength"],k5=["color","date","datetime-local","month","range","time","week"],k3=["mousedown","touchstart"],k4=["click","keydown"],k6=function(e){function t(n,i){void 0===i&&(i={});var o=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return o.isFocused_=!1,o.receivedUserInput_=!1,o.isValid_=!0,o.useNativeValidation_=!0,o.validateOnValueChange_=!0,o.helperText_=i.helperText,o.characterCounter_=i.characterCounter,o.leadingIcon_=i.leadingIcon,o.trailingIcon_=i.trailingIcon,o.inputFocusHandler_=function(){return o.activateFocus()},o.inputBlurHandler_=function(){return o.deactivateFocus()},o.inputInputHandler_=function(){return o.handleInput()},o.setPointerXOffset_=function(e){return o.setTransformOrigin(e)},o.textFieldInteractionHandler_=function(){return o.handleTextFieldInteraction()},o.validationAttributeChangeHandler_=function(e){return o.handleValidationAttributeChange(e)},o}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return k0},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return kQ},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return k1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shouldAlwaysFloat_",{get:function(){var e=this.getNativeInput_().type;return k5.indexOf(e)>=0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat_||this.isFocused_||!!this.getValue()||this.isBadInput_()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shouldShake",{get:function(){return!this.isFocused_&&!this.isValid()&&!!this.getValue()},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver(function(){})},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this;this.adapter.hasLabel()&&this.getNativeInput_().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler_():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating_(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler_),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler_),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler_),k3.forEach(function(t){e.adapter.registerInputInteractionHandler(t,e.setPointerXOffset_)}),k4.forEach(function(t){e.adapter.registerTextFieldInteractionHandler(t,e.textFieldInteractionHandler_)}),this.validationObserver_=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler_),this.setCharacterCounter_(this.getValue().length)},t.prototype.destroy=function(){var e=this;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler_),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler_),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler_),k3.forEach(function(t){e.adapter.deregisterInputInteractionHandler(t,e.setPointerXOffset_)}),k4.forEach(function(t){e.adapter.deregisterTextFieldInteractionHandler(t,e.textFieldInteractionHandler_)}),this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver_)},t.prototype.handleTextFieldInteraction=function(){var e=this.adapter.getNativeInput();e&&e.disabled||(this.receivedUserInput_=!0)},t.prototype.handleValidationAttributeChange=function(e){var t=this;e.some(function(e){return k2.indexOf(e)>-1&&(t.styleValidity_(!0),t.adapter.setLabelRequired(t.getNativeInput_().required),!0)}),e.indexOf("maxlength")>-1&&this.setCharacterCounter_(this.getValue().length)},t.prototype.notchOutline=function(e){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(e){var t=this.adapter.getLabelWidth()*k1.LABEL_SCALE;this.adapter.notchOutline(t)}else this.adapter.closeOutline()},t.prototype.activateFocus=function(){this.isFocused_=!0,this.styleFocused_(this.isFocused_),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating_(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.helperText_&&(this.helperText_.isPersistent()||!this.helperText_.isValidation()||!this.isValid_)&&this.helperText_.showToScreenReader()},t.prototype.setTransformOrigin=function(e){if(!(this.isDisabled()||this.adapter.hasOutline())){var t=e.touches,n=t?t[0]:e,i=n.target.getBoundingClientRect(),o=n.clientX-i.left;this.adapter.setLineRippleTransformOrigin(o)}},t.prototype.handleInput=function(){this.autoCompleteFocus(),this.setCharacterCounter_(this.getValue().length)},t.prototype.autoCompleteFocus=function(){this.receivedUserInput_||this.activateFocus()},t.prototype.deactivateFocus=function(){this.isFocused_=!1,this.adapter.deactivateLineRipple();var e=this.isValid();this.styleValidity_(e),this.styleFocused_(this.isFocused_),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating_(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput_=!1)},t.prototype.getValue=function(){return this.getNativeInput_().value},t.prototype.setValue=function(e){if(this.getValue()!==e&&(this.getNativeInput_().value=e),this.setCharacterCounter_(e.length),this.validateOnValueChange_){var t=this.isValid();this.styleValidity_(t)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating_(this.shouldFloat),this.validateOnValueChange_&&this.adapter.shakeLabel(this.shouldShake))},t.prototype.isValid=function(){return this.useNativeValidation_?this.isNativeInputValid_():this.isValid_},t.prototype.setValid=function(e){this.isValid_=e,this.styleValidity_(e);var t=!e&&!this.isFocused_&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(t)},t.prototype.setValidateOnValueChange=function(e){this.validateOnValueChange_=e},t.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange_},t.prototype.setUseNativeValidation=function(e){this.useNativeValidation_=e},t.prototype.isDisabled=function(){return this.getNativeInput_().disabled},t.prototype.setDisabled=function(e){this.getNativeInput_().disabled=e,this.styleDisabled_(e)},t.prototype.setHelperTextContent=function(e){this.helperText_&&this.helperText_.setContent(e)},t.prototype.setLeadingIconAriaLabel=function(e){this.leadingIcon_&&this.leadingIcon_.setAriaLabel(e)},t.prototype.setLeadingIconContent=function(e){this.leadingIcon_&&this.leadingIcon_.setContent(e)},t.prototype.setTrailingIconAriaLabel=function(e){this.trailingIcon_&&this.trailingIcon_.setAriaLabel(e)},t.prototype.setTrailingIconContent=function(e){this.trailingIcon_&&this.trailingIcon_.setContent(e)},t.prototype.setCharacterCounter_=function(e){if(this.characterCounter_){var t=this.getNativeInput_().maxLength;if(-1===t)throw Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter_.setCounterValue(e,t)}},t.prototype.isBadInput_=function(){return this.getNativeInput_().validity.badInput||!1},t.prototype.isNativeInputValid_=function(){return this.getNativeInput_().validity.valid},t.prototype.styleValidity_=function(e){var n=t.cssClasses.INVALID;if(e?this.adapter.removeClass(n):this.adapter.addClass(n),this.helperText_){if(this.helperText_.setValidity(e),!this.helperText_.isValidation())return;var i=this.helperText_.isVisible(),o=this.helperText_.getId();i&&o?this.adapter.setInputAttr(kQ.ARIA_DESCRIBEDBY,o):this.adapter.removeInputAttr(kQ.ARIA_DESCRIBEDBY)}},t.prototype.styleFocused_=function(e){var n=t.cssClasses.FOCUSED;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.styleDisabled_=function(e){var n=t.cssClasses,i=n.DISABLED,o=n.INVALID;e?(this.adapter.addClass(i),this.adapter.removeClass(o)):this.adapter.removeClass(i),this.leadingIcon_&&this.leadingIcon_.setDisabled(e),this.trailingIcon_&&this.trailingIcon_.setDisabled(e)},t.prototype.styleFloating_=function(e){var n=t.cssClasses.LABEL_FLOATING;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.getNativeInput_=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},t}(kE),k8={HELPER_TEXT_PERSISTENT:"mdc-text-field-helper-text--persistent",HELPER_TEXT_VALIDATION_MSG:"mdc-text-field-helper-text--validation-msg",ROOT:"mdc-text-field-helper-text"},k7={ARIA_HIDDEN:"aria-hidden",ROLE:"role",ROOT_SELECTOR:"."+k8.ROOT},k9=function(e){function t(n){return e.call(this,kx(kx({},t.defaultAdapter),n))||this}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return k8},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return k7},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){}}},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this.adapter.getAttr("id")},t.prototype.isVisible=function(){return"true"!==this.adapter.getAttr(k7.ARIA_HIDDEN)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.isPersistent=function(){return this.adapter.hasClass(k8.HELPER_TEXT_PERSISTENT)},t.prototype.setPersistent=function(e){e?this.adapter.addClass(k8.HELPER_TEXT_PERSISTENT):this.adapter.removeClass(k8.HELPER_TEXT_PERSISTENT)},t.prototype.isValidation=function(){return this.adapter.hasClass(k8.HELPER_TEXT_VALIDATION_MSG)},t.prototype.setValidation=function(e){e?this.adapter.addClass(k8.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(k8.HELPER_TEXT_VALIDATION_MSG)},t.prototype.showToScreenReader=function(){this.adapter.removeAttr(k7.ARIA_HIDDEN)},t.prototype.setValidity=function(e){var t=this.adapter.hasClass(k8.HELPER_TEXT_PERSISTENT),n=this.adapter.hasClass(k8.HELPER_TEXT_VALIDATION_MSG)&&!e;n?(this.showToScreenReader(),this.adapter.setAttr(k7.ROLE,"alert")):this.adapter.removeAttr(k7.ROLE),t||n||this.hide_()},t.prototype.hide_=function(){this.adapter.setAttr(k7.ARIA_HIDDEN,"true")},t}(kE),Ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!0,configurable:!0}),t.prototype.getDefaultFoundation=function(){var e=this;return new k9({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){return e.root.setAttribute(t,n)},removeAttr:function(t){return e.root.removeAttribute(t)},setContent:function(t){e.root.textContent=t}})},t}(kT),Et={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"},En={ROOT:"mdc-text-field__icon"},Ei=["click","keydown"],Eo=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.savedTabIndex_=null,i.interactionHandler_=function(e){return i.handleInteraction(e)},i}return kF(t,e),Object.defineProperty(t,"strings",{get:function(){return Et},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return En},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this;this.savedTabIndex_=this.adapter.getAttr("tabindex"),Ei.forEach(function(t){e.adapter.registerInteractionHandler(t,e.interactionHandler_)})},t.prototype.destroy=function(){var e=this;Ei.forEach(function(t){e.adapter.deregisterInteractionHandler(t,e.interactionHandler_)})},t.prototype.setDisabled=function(e){this.savedTabIndex_&&(e?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex_),this.adapter.setAttr("role",Et.ICON_ROLE)))},t.prototype.setAriaLabel=function(e){this.adapter.setAttr("aria-label",e)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.handleInteraction=function(e){var t="Enter"===e.key||13===e.keyCode;("click"===e.type||t)&&(e.preventDefault(),this.adapter.notifyIconAction())},t}(kE),Er=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!0,configurable:!0}),t.prototype.getDefaultFoundation=function(){var e=this;return new Eo({getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){return e.root.setAttribute(t,n)},removeAttr:function(t){return e.root.removeAttribute(t)},setContent:function(t){e.root.textContent=t},registerInteractionHandler:function(t,n){return e.listen(t,n)},deregisterInteractionHandler:function(t,n){return e.unlisten(t,n)},notifyIconAction:function(){return e.emit(Eo.strings.ICON_EVENT,{},!0)}})},t}(kT),Ea=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e,t,n,i,o,r,a){void 0===e&&(e=function(e,t){return new kq(e,t)}),void 0===t&&(t=function(e){return new kR(e)}),void 0===n&&(n=function(e){return new Ee(e)}),void 0===i&&(i=function(e){return new kZ(e)}),void 0===o&&(o=function(e){return new Er(e)}),void 0===r&&(r=function(e){return new kL(e)}),void 0===a&&(a=function(e){return new kH(e)}),this.input_=this.root.querySelector(kQ.INPUT_SELECTOR);var s=this.root.querySelector(kQ.LABEL_SELECTOR);this.label_=s?r(s):null;var l=this.root.querySelector(kQ.LINE_RIPPLE_SELECTOR);this.lineRipple_=l?t(l):null;var c=this.root.querySelector(kQ.OUTLINE_SELECTOR);this.outline_=c?a(c):null;var d=k9.strings,u=this.root.nextElementSibling,m=u&&u.classList.contains(k0.HELPER_LINE),f=m&&u&&u.querySelector(d.ROOT_SELECTOR);this.helperText_=f?n(f):null;var p=kJ.strings,h=this.root.querySelector(p.ROOT_SELECTOR);!h&&m&&u&&(h=u.querySelector(p.ROOT_SELECTOR)),this.characterCounter_=h?i(h):null;var b=this.root.querySelector(kQ.LEADING_ICON_SELECTOR);this.leadingIcon_=b?o(b):null;var g=this.root.querySelector(kQ.TRAILING_ICON_SELECTOR);this.trailingIcon_=g?o(g):null,this.prefix_=this.root.querySelector(kQ.PREFIX_SELECTOR),this.suffix_=this.root.querySelector(kQ.SUFFIX_SELECTOR),this.ripple=this.createRipple_(e)},t.prototype.destroy=function(){this.ripple&&this.ripple.destroy(),this.lineRipple_&&this.lineRipple_.destroy(),this.helperText_&&this.helperText_.destroy(),this.characterCounter_&&this.characterCounter_.destroy(),this.leadingIcon_&&this.leadingIcon_.destroy(),this.trailingIcon_&&this.trailingIcon_.destroy(),this.label_&&this.label_.destroy(),this.outline_&&this.outline_.destroy(),e.prototype.destroy.call(this)},t.prototype.initialSyncWithDOM=function(){this.disabled=this.input_.disabled},Object.defineProperty(t.prototype,"value",{get:function(){return this.foundation.getValue()},set:function(e){this.foundation.setValue(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.foundation.isDisabled()},set:function(e){this.foundation.setDisabled(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return this.foundation.isValid()},set:function(e){this.foundation.setValid(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return this.input_.required},set:function(e){this.input_.required=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pattern",{get:function(){return this.input_.pattern},set:function(e){this.input_.pattern=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minLength",{get:function(){return this.input_.minLength},set:function(e){this.input_.minLength=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxLength",{get:function(){return this.input_.maxLength},set:function(e){e<0?this.input_.removeAttribute("maxLength"):this.input_.maxLength=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this.input_.min},set:function(e){this.input_.min=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this.input_.max},set:function(e){this.input_.max=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"step",{get:function(){return this.input_.step},set:function(e){this.input_.step=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"helperTextContent",{set:function(e){this.foundation.setHelperTextContent(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"leadingIconAriaLabel",{set:function(e){this.foundation.setLeadingIconAriaLabel(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"leadingIconContent",{set:function(e){this.foundation.setLeadingIconContent(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"trailingIconAriaLabel",{set:function(e){this.foundation.setTrailingIconAriaLabel(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"trailingIconContent",{set:function(e){this.foundation.setTrailingIconContent(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"useNativeValidation",{set:function(e){this.foundation.setUseNativeValidation(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"prefixText",{get:function(){return this.prefix_?this.prefix_.textContent:null},set:function(e){this.prefix_&&(this.prefix_.textContent=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"suffixText",{get:function(){return this.suffix_?this.suffix_.textContent:null},set:function(e){this.suffix_&&(this.suffix_.textContent=e)},enumerable:!0,configurable:!0}),t.prototype.focus=function(){this.input_.focus()},t.prototype.layout=function(){var e=this.foundation.shouldFloat;this.foundation.notchOutline(e)},t.prototype.getDefaultFoundation=function(){return new k6(kx(kx(kx(kx(kx({},this.getRootAdapterMethods_()),this.getInputAdapterMethods_()),this.getLabelAdapterMethods_()),this.getLineRippleAdapterMethods_()),this.getOutlineAdapterMethods_()),this.getFoundationMap_())},t.prototype.getRootAdapterMethods_=function(){var e=this;return{addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},registerTextFieldInteractionHandler:function(t,n){e.listen(t,n)},deregisterTextFieldInteractionHandler:function(t,n){e.unlisten(t,n)},registerValidationAttributeChangeHandler:function(t){var n=new MutationObserver(function(e){return t(e.map(function(e){return e.attributeName}).filter(function(e){return e}))});return n.observe(e.input_,{attributes:!0}),n},deregisterValidationAttributeChangeHandler:function(e){e.disconnect()}}},t.prototype.getInputAdapterMethods_=function(){var e=this;return{getNativeInput:function(){return e.input_},setInputAttr:function(t,n){e.input_.setAttribute(t,n)},removeInputAttr:function(t){e.input_.removeAttribute(t)},isFocused:function(){return document.activeElement===e.input_},registerInputInteractionHandler:function(t,n){e.input_.addEventListener(t,n,kM())},deregisterInputInteractionHandler:function(t,n){e.input_.removeEventListener(t,n,kM())}}},t.prototype.getLabelAdapterMethods_=function(){var e=this;return{floatLabel:function(t){return e.label_&&e.label_.float(t)},getLabelWidth:function(){return e.label_?e.label_.getWidth():0},hasLabel:function(){return!!e.label_},shakeLabel:function(t){return e.label_&&e.label_.shake(t)},setLabelRequired:function(t){return e.label_&&e.label_.setRequired(t)}}},t.prototype.getLineRippleAdapterMethods_=function(){var e=this;return{activateLineRipple:function(){e.lineRipple_&&e.lineRipple_.activate()},deactivateLineRipple:function(){e.lineRipple_&&e.lineRipple_.deactivate()},setLineRippleTransformOrigin:function(t){e.lineRipple_&&e.lineRipple_.setRippleCenter(t)}}},t.prototype.getOutlineAdapterMethods_=function(){var e=this;return{closeOutline:function(){return e.outline_&&e.outline_.closeNotch()},hasOutline:function(){return!!e.outline_},notchOutline:function(t){return e.outline_&&e.outline_.notch(t)}}},t.prototype.getFoundationMap_=function(){return{characterCounter:this.characterCounter_?this.characterCounter_.foundationForTextField:void 0,helperText:this.helperText_?this.helperText_.foundationForTextField:void 0,leadingIcon:this.leadingIcon_?this.leadingIcon_.foundationForTextField:void 0,trailingIcon:this.trailingIcon_?this.trailingIcon_.foundationForTextField:void 0}},t.prototype.createRipple_=function(e){var t=this,n=this.root.classList.contains(k0.TEXTAREA),i=this.root.classList.contains(k0.OUTLINED);if(n||i)return null;var o=kx(kx({},kq.createAdapter(this)),{isSurfaceActive:function(){return kC(t.input_,":active")},registerInteractionHandler:function(e,n){return t.input_.addEventListener(e,n,kM())},deregisterInteractionHandler:function(e,n){return t.input_.removeEventListener(e,n,kM())}});return e(this.root,new k$(o))},t}(kT),Es={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}},El={animationend:{cssProperty:"animation",prefixed:"webkitAnimationEnd",standard:"animationend"},animationiteration:{cssProperty:"animation",prefixed:"webkitAnimationIteration",standard:"animationiteration"},animationstart:{cssProperty:"animation",prefixed:"webkitAnimationStart",standard:"animationstart"},transitionend:{cssProperty:"transition",prefixed:"webkitTransitionEnd",standard:"transitionend"}};function Ec(e){return!!e.document&&"function"==typeof e.document.createElement}function Ed(e,t){if(Ec(e)&&t in Es){var n=e.document.createElement("div"),i=Es[t],o=i.standard,r=i.prefixed;return o in n.style?o:r}return t}function Eu(e,t){if(Ec(e)&&t in El){var n=e.document.createElement("div"),i=El[t],o=i.standard,r=i.prefixed;return i.cssProperty in n.style?o:r}return t}var Em={ANIM_CHECKED_INDETERMINATE:"mdc-checkbox--anim-checked-indeterminate",ANIM_CHECKED_UNCHECKED:"mdc-checkbox--anim-checked-unchecked",ANIM_INDETERMINATE_CHECKED:"mdc-checkbox--anim-indeterminate-checked",ANIM_INDETERMINATE_UNCHECKED:"mdc-checkbox--anim-indeterminate-unchecked",ANIM_UNCHECKED_CHECKED:"mdc-checkbox--anim-unchecked-checked",ANIM_UNCHECKED_INDETERMINATE:"mdc-checkbox--anim-unchecked-indeterminate",BACKGROUND:"mdc-checkbox__background",CHECKED:"mdc-checkbox--checked",CHECKMARK:"mdc-checkbox__checkmark",CHECKMARK_PATH:"mdc-checkbox__checkmark-path",DISABLED:"mdc-checkbox--disabled",INDETERMINATE:"mdc-checkbox--indeterminate",MIXEDMARK:"mdc-checkbox__mixedmark",NATIVE_CONTROL:"mdc-checkbox__native-control",ROOT:"mdc-checkbox",SELECTED:"mdc-checkbox--selected",UPGRADED:"mdc-checkbox--upgraded"},Ef={ARIA_CHECKED_ATTR:"aria-checked",ARIA_CHECKED_INDETERMINATE_VALUE:"mixed",DATA_INDETERMINATE_ATTR:"data-indeterminate",NATIVE_CONTROL_SELECTOR:".mdc-checkbox__native-control",TRANSITION_STATE_CHECKED:"checked",TRANSITION_STATE_INDETERMINATE:"indeterminate",TRANSITION_STATE_INIT:"init",TRANSITION_STATE_UNCHECKED:"unchecked"},Ep={ANIM_END_LATCH_MS:250},Eh=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.currentCheckState_=Ef.TRANSITION_STATE_INIT,i.currentAnimationClass_="",i.animEndLatchTimer_=0,i.enableAnimationEndHandler_=!1,i}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Em},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Ef},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return Ep},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},forceLayout:function(){},hasNativeControl:function(){return!1},isAttachedToDOM:function(){return!1},isChecked:function(){return!1},isIndeterminate:function(){return!1},removeClass:function(){},removeNativeControlAttr:function(){},setNativeControlAttr:function(){},setNativeControlDisabled:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.currentCheckState_=this.determineCheckState_(),this.updateAriaChecked_(),this.adapter.addClass(Em.UPGRADED)},t.prototype.destroy=function(){clearTimeout(this.animEndLatchTimer_)},t.prototype.setDisabled=function(e){this.adapter.setNativeControlDisabled(e),e?this.adapter.addClass(Em.DISABLED):this.adapter.removeClass(Em.DISABLED)},t.prototype.handleAnimationEnd=function(){var e=this;this.enableAnimationEndHandler_&&(clearTimeout(this.animEndLatchTimer_),this.animEndLatchTimer_=setTimeout(function(){e.adapter.removeClass(e.currentAnimationClass_),e.enableAnimationEndHandler_=!1},Ep.ANIM_END_LATCH_MS))},t.prototype.handleChange=function(){this.transitionCheckState_()},t.prototype.transitionCheckState_=function(){if(this.adapter.hasNativeControl()){var e=this.currentCheckState_,t=this.determineCheckState_();if(e!==t){this.updateAriaChecked_();var n=Ef.TRANSITION_STATE_UNCHECKED,i=Em.SELECTED;t===n?this.adapter.removeClass(i):this.adapter.addClass(i),this.currentAnimationClass_.length>0&&(clearTimeout(this.animEndLatchTimer_),this.adapter.forceLayout(),this.adapter.removeClass(this.currentAnimationClass_)),this.currentAnimationClass_=this.getTransitionAnimationClass_(e,t),this.currentCheckState_=t,this.adapter.isAttachedToDOM()&&this.currentAnimationClass_.length>0&&(this.adapter.addClass(this.currentAnimationClass_),this.enableAnimationEndHandler_=!0)}}},t.prototype.determineCheckState_=function(){var e=Ef.TRANSITION_STATE_INDETERMINATE,t=Ef.TRANSITION_STATE_CHECKED,n=Ef.TRANSITION_STATE_UNCHECKED;return this.adapter.isIndeterminate()?e:this.adapter.isChecked()?t:n},t.prototype.getTransitionAnimationClass_=function(e,n){var i=Ef.TRANSITION_STATE_INIT,o=Ef.TRANSITION_STATE_CHECKED,r=Ef.TRANSITION_STATE_UNCHECKED,a=t.cssClasses,s=a.ANIM_UNCHECKED_CHECKED,l=a.ANIM_UNCHECKED_INDETERMINATE,c=a.ANIM_CHECKED_UNCHECKED,d=a.ANIM_CHECKED_INDETERMINATE,u=a.ANIM_INDETERMINATE_CHECKED,m=a.ANIM_INDETERMINATE_UNCHECKED;switch(e){case i:if(n===r)return"";return n===o?u:m;case r:return n===o?s:l;case o:return n===r?c:d;default:return n===o?u:m}},t.prototype.updateAriaChecked_=function(){this.adapter.isIndeterminate()?this.adapter.setNativeControlAttr(Ef.ARIA_CHECKED_ATTR,Ef.ARIA_CHECKED_INDETERMINATE_VALUE):this.adapter.removeNativeControlAttr(Ef.ARIA_CHECKED_ATTR)},t}(kE),Eb=["checked","indeterminate"],Eg=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ripple_=t.createRipple_(),t}return kF(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"ripple",{get:function(){return this.ripple_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this.nativeControl_.checked},set:function(e){this.nativeControl_.checked=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"indeterminate",{get:function(){return this.nativeControl_.indeterminate},set:function(e){this.nativeControl_.indeterminate=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.nativeControl_.disabled},set:function(e){this.foundation.setDisabled(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.nativeControl_.value},set:function(e){this.nativeControl_.value=e},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){var e=Ef.DATA_INDETERMINATE_ATTR;this.nativeControl_.indeterminate="true"===this.nativeControl_.getAttribute(e),this.nativeControl_.removeAttribute(e)},t.prototype.initialSyncWithDOM=function(){var e=this;this.handleChange_=function(){return e.foundation.handleChange()},this.handleAnimationEnd_=function(){return e.foundation.handleAnimationEnd()},this.nativeControl_.addEventListener("change",this.handleChange_),this.listen(Eu(window,"animationend"),this.handleAnimationEnd_),this.installPropertyChangeHooks_()},t.prototype.destroy=function(){this.ripple_.destroy(),this.nativeControl_.removeEventListener("change",this.handleChange_),this.unlisten(Eu(window,"animationend"),this.handleAnimationEnd_),this.uninstallPropertyChangeHooks_(),e.prototype.destroy.call(this)},t.prototype.getDefaultFoundation=function(){var e=this;return new Eh({addClass:function(t){return e.root.classList.add(t)},forceLayout:function(){return e.root.offsetWidth},hasNativeControl:function(){return!!e.nativeControl_},isAttachedToDOM:function(){return!!e.root.parentNode},isChecked:function(){return e.checked},isIndeterminate:function(){return e.indeterminate},removeClass:function(t){e.root.classList.remove(t)},removeNativeControlAttr:function(t){e.nativeControl_.removeAttribute(t)},setNativeControlAttr:function(t,n){e.nativeControl_.setAttribute(t,n)},setNativeControlDisabled:function(t){e.nativeControl_.disabled=t}})},t.prototype.createRipple_=function(){var e=this,t=kx(kx({},kq.createAdapter(this)),{deregisterInteractionHandler:function(t,n){return e.nativeControl_.removeEventListener(t,n,kM())},isSurfaceActive:function(){return kC(e.nativeControl_,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(t,n){return e.nativeControl_.addEventListener(t,n,kM())}});return new kq(this.root,new k$(t))},t.prototype.installPropertyChangeHooks_=function(){var e=this,t=this.nativeControl_,n=Object.getPrototypeOf(t);Eb.forEach(function(i){var o=Object.getOwnPropertyDescriptor(n,i);if(E_(o)){var r=o.get,a={configurable:o.configurable,enumerable:o.enumerable,get:r,set:function(n){o.set.call(t,n),e.foundation.handleChange()}};Object.defineProperty(t,i,a)}})},t.prototype.uninstallPropertyChangeHooks_=function(){var e=this.nativeControl_,t=Object.getPrototypeOf(e);Eb.forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);E_(i)&&Object.defineProperty(e,n,i)})},Object.defineProperty(t.prototype,"nativeControl_",{get:function(){var e=Ef.NATIVE_CONTROL_SELECTOR,t=this.root.querySelector(e);if(!t)throw Error("Checkbox component requires a "+e+" element");return t},enumerable:!0,configurable:!0}),t}(kT);function E_(e){return!!e&&"function"==typeof e.set}var Ey={CHECKED:"mdc-switch--checked",DISABLED:"mdc-switch--disabled"},Ev={ARIA_CHECKED_ATTR:"aria-checked",NATIVE_CONTROL_SELECTOR:".mdc-switch__native-control",RIPPLE_SURFACE_SELECTOR:".mdc-switch__thumb-underlay"},EF=function(e){function t(n){return e.call(this,kx(kx({},t.defaultAdapter),n))||this}return kF(t,e),Object.defineProperty(t,"strings",{get:function(){return Ev},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return Ey},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNativeControlChecked:function(){},setNativeControlDisabled:function(){},setNativeControlAttr:function(){}}},enumerable:!0,configurable:!0}),t.prototype.setChecked=function(e){this.adapter.setNativeControlChecked(e),this.updateAriaChecked_(e),this.updateCheckedStyling_(e)},t.prototype.setDisabled=function(e){this.adapter.setNativeControlDisabled(e),e?this.adapter.addClass(Ey.DISABLED):this.adapter.removeClass(Ey.DISABLED)},t.prototype.handleChange=function(e){var t=e.target;this.updateAriaChecked_(t.checked),this.updateCheckedStyling_(t.checked)},t.prototype.updateCheckedStyling_=function(e){e?this.adapter.addClass(Ey.CHECKED):this.adapter.removeClass(Ey.CHECKED)},t.prototype.updateAriaChecked_=function(e){this.adapter.setNativeControlAttr(Ev.ARIA_CHECKED_ATTR,""+!!e)},t}(kE),Ex=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ripple_=t.createRipple_(),t}return kF(t,e),t.attachTo=function(e){return new t(e)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.ripple_.destroy(),this.nativeControl_.removeEventListener("change",this.changeHandler_)},t.prototype.initialSyncWithDOM=function(){var e=this;this.changeHandler_=function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return(t=e.foundation).handleChange.apply(t,kk(n))},this.nativeControl_.addEventListener("change",this.changeHandler_),this.checked=this.checked},t.prototype.getDefaultFoundation=function(){var e=this;return new EF({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},setNativeControlChecked:function(t){return e.nativeControl_.checked=t},setNativeControlDisabled:function(t){return e.nativeControl_.disabled=t},setNativeControlAttr:function(t,n){return e.nativeControl_.setAttribute(t,n)}})},Object.defineProperty(t.prototype,"ripple",{get:function(){return this.ripple_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this.nativeControl_.checked},set:function(e){this.foundation.setChecked(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.nativeControl_.disabled},set:function(e){this.foundation.setDisabled(e)},enumerable:!0,configurable:!0}),t.prototype.createRipple_=function(){var e=this,t=EF.strings.RIPPLE_SURFACE_SELECTOR,n=this.root.querySelector(t),i=kx(kx({},kq.createAdapter(this)),{addClass:function(e){return n.classList.add(e)},computeBoundingRect:function(){return n.getBoundingClientRect()},deregisterInteractionHandler:function(t,n){e.nativeControl_.removeEventListener(t,n,kM())},isSurfaceActive:function(){return kC(e.nativeControl_,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(t,n){e.nativeControl_.addEventListener(t,n,kM())},removeClass:function(e){n.classList.remove(e)},updateCssVariable:function(e,t){n.style.setProperty(e,t)}});return new kq(this.root,new k$(i))},Object.defineProperty(t.prototype,"nativeControl_",{get:function(){var e=EF.strings.NATIVE_CONTROL_SELECTOR;return this.root.querySelector(e)},enumerable:!0,configurable:!0}),t}(kT),Ew={DISABLED:"mdc-slider--disabled",DISCRETE:"mdc-slider--discrete",INPUT:"mdc-slider__input",RANGE:"mdc-slider--range",THUMB:"mdc-slider__thumb",THUMB_KNOB:"mdc-slider__thumb-knob",THUMB_TOP:"mdc-slider__thumb--top",THUMB_WITH_INDICATOR:"mdc-slider__thumb--with-indicator",TICK_MARKS:"mdc-slider--tick-marks",TICK_MARKS_CONTAINER:"mdc-slider__tick-marks",TICK_MARK_ACTIVE:"mdc-slider__tick-mark--active",TICK_MARK_INACTIVE:"mdc-slider__tick-mark--inactive",TRACK:"mdc-slider__track",TRACK_ACTIVE:"mdc-slider__track--active_fill",VALUE_INDICATOR_TEXT:"mdc-slider__value-indicator-text"},Ek={STEP_SIZE:1,THUMB_UPDATE_MIN_PX:5},EE={ARIA_VALUETEXT:"aria-valuetext",INPUT_DISABLED:"disabled",INPUT_MIN:"min",INPUT_MAX:"max",INPUT_VALUE:"value",INPUT_STEP:"step"},ET={CHANGE:"MDCSlider:change",INPUT:"MDCSlider:input"};!function(e){e[e.ACTIVE=0]="ACTIVE",e[e.INACTIVE=1]="INACTIVE"}(e6||(e6={})),function(e){e[e.START=1]="START",e[e.END=2]="END"}(e8||(e8={}));var EM="undefined"!=typeof window,EA=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.initialStylesRemoved=!1,i.isDisabled=!1,i.isDiscrete=!1,i.step=Ek.STEP_SIZE,i.hasTickMarks=!1,i.isRange=!1,i.thumb=null,i.downEventClientX=null,i.startThumbKnobWidth=0,i.endThumbKnobWidth=0,i}return kF(t,e),Object.defineProperty(t,"defaultAdapter",{get:function(){return{hasClass:function(){return!1},addClass:function(){},removeClass:function(){},addThumbClass:function(){},removeThumbClass:function(){},getAttribute:function(){return null},getInputValue:function(){return""},setInputValue:function(){},getInputAttribute:function(){return null},setInputAttribute:function(){return null},removeInputAttribute:function(){return null},focusInput:function(){},isInputFocused:function(){return!1},getThumbKnobWidth:function(){return 0},getThumbBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},isRTL:function(){return!1},setThumbStyleProperty:function(){},removeThumbStyleProperty:function(){},setTrackActiveStyleProperty:function(){},removeTrackActiveStyleProperty:function(){},setValueIndicatorText:function(){},getValueToAriaValueTextFn:function(){return null},updateTickMarks:function(){},setPointerCapture:function(){},emitChangeEvent:function(){},emitInputEvent:function(){},emitDragStartEvent:function(){},emitDragEndEvent:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){},registerThumbEventHandler:function(){},deregisterThumbEventHandler:function(){},registerInputEventHandler:function(){},deregisterInputEventHandler:function(){},registerBodyEventHandler:function(){},deregisterBodyEventHandler:function(){},registerWindowEventHandler:function(){},deregisterWindowEventHandler:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this;this.isDisabled=this.adapter.hasClass(Ew.DISABLED),this.isDiscrete=this.adapter.hasClass(Ew.DISCRETE),this.hasTickMarks=this.adapter.hasClass(Ew.TICK_MARKS),this.isRange=this.adapter.hasClass(Ew.RANGE);var t=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(EE.INPUT_MIN,this.isRange?e8.START:e8.END),EE.INPUT_MIN),n=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(EE.INPUT_MAX,e8.END),EE.INPUT_MAX),i=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(EE.INPUT_VALUE,e8.END),EE.INPUT_VALUE),o=this.isRange?this.convertAttributeValueToNumber(this.adapter.getInputAttribute(EE.INPUT_VALUE,e8.START),EE.INPUT_VALUE):t;this.validateProperties({min:t,max:n,value:i,valueStart:o}),this.min=t,this.max=n,this.value=i,this.valueStart=o,this.valueBeforeDownEvent=i,this.valueStartBeforeDownEvent=o;var r=this.adapter.getInputAttribute(EE.INPUT_STEP,e8.END);if(r&&(this.step=this.convertAttributeValueToNumber(r,EE.INPUT_STEP)),this.step<=0)throw Error("MDCSliderFoundation: step must be a positive number. Current step: "+this.step);this.mousedownOrTouchstartListener=this.handleMousedownOrTouchstart.bind(this),this.moveListener=this.handleMove.bind(this),this.pointerdownListener=this.handlePointerdown.bind(this),this.pointerupListener=this.handlePointerup.bind(this),this.thumbMouseenterListener=this.handleThumbMouseenter.bind(this),this.thumbMouseleaveListener=this.handleThumbMouseleave.bind(this),this.inputStartChangeListener=function(){e.handleInputChange(e8.START)},this.inputEndChangeListener=function(){e.handleInputChange(e8.END)},this.inputStartFocusListener=function(){e.handleInputFocus(e8.START)},this.inputEndFocusListener=function(){e.handleInputFocus(e8.END)},this.inputStartBlurListener=function(){e.handleInputBlur(e8.START)},this.inputEndBlurListener=function(){e.handleInputBlur(e8.END)},this.resizeListener=this.handleResize.bind(this),this.registerEventHandlers()},t.prototype.destroy=function(){this.deregisterEventHandlers()},t.prototype.getMin=function(){return this.min},t.prototype.getMax=function(){return this.max},t.prototype.getValue=function(){return this.value},t.prototype.setValue=function(e){if(this.isRange&&e<this.valueStart)throw Error("end thumb value ("+e+") must be >= start thumb value ("+this.valueStart+")");this.updateValue(e,e8.END)},t.prototype.getValueStart=function(){if(!this.isRange)throw Error("`valueStart` is only applicable for range sliders.");return this.valueStart},t.prototype.setValueStart=function(e){if(!this.isRange)throw Error("`valueStart` is only applicable for range sliders.");if(this.isRange&&e>this.value)throw Error("start thumb value ("+e+") must be <= end thumb value ("+this.value+")");this.updateValue(e,e8.START)},t.prototype.getStep=function(){return this.step},t.prototype.getDisabled=function(){return this.isDisabled},t.prototype.setDisabled=function(e){this.isDisabled=e,e?(this.adapter.addClass(Ew.DISABLED),this.isRange&&this.adapter.setInputAttribute(EE.INPUT_DISABLED,"",e8.START),this.adapter.setInputAttribute(EE.INPUT_DISABLED,"",e8.END)):(this.adapter.removeClass(Ew.DISABLED),this.isRange&&this.adapter.removeInputAttribute(EE.INPUT_DISABLED,e8.START),this.adapter.removeInputAttribute(EE.INPUT_DISABLED,e8.END))},t.prototype.getIsRange=function(){return this.isRange},t.prototype.layout=function(e){var t=(void 0===e?{}:e).skipUpdateUI;this.rect=this.adapter.getBoundingClientRect(),this.isRange&&(this.startThumbKnobWidth=this.adapter.getThumbKnobWidth(e8.START),this.endThumbKnobWidth=this.adapter.getThumbKnobWidth(e8.END)),t||this.updateUI()},t.prototype.handleResize=function(){this.layout()},t.prototype.handleDown=function(e){if(!this.isDisabled){this.valueStartBeforeDownEvent=this.valueStart,this.valueBeforeDownEvent=this.value;var t=null!=e.clientX?e.clientX:e.targetTouches[0].clientX;this.downEventClientX=t;var n=this.mapClientXOnSliderScale(t);this.thumb=this.getThumbFromDownEvent(t,n),null!==this.thumb&&(this.handleDragStart(e,n,this.thumb),this.isRange&&n>=this.valueStart&&n<=this.value||this.updateValue(n,this.thumb,{emitInputEvent:!0}))}},t.prototype.handleMove=function(e){if(!this.isDisabled){e.preventDefault();var t=null!=e.clientX?e.clientX:e.targetTouches[0].clientX,n=null!=this.thumb;if(this.thumb=this.getThumbFromMoveEvent(t),null!==this.thumb){var i=this.mapClientXOnSliderScale(t);n||(this.handleDragStart(e,i,this.thumb),this.adapter.emitDragStartEvent(i,this.thumb)),this.updateValue(i,this.thumb,{emitInputEvent:!0})}}},t.prototype.handleUp=function(){if(!this.isDisabled&&null!==this.thumb){var e=this.thumb===e8.START?this.valueStartBeforeDownEvent:this.valueBeforeDownEvent,t=this.thumb===e8.START?this.valueStart:this.value;e!==t&&this.adapter.emitChangeEvent(t,this.thumb),this.adapter.emitDragEndEvent(t,this.thumb),this.thumb=null}},t.prototype.handleThumbMouseenter=function(){this.isDiscrete&&this.isRange&&(this.adapter.addThumbClass(Ew.THUMB_WITH_INDICATOR,e8.START),this.adapter.addThumbClass(Ew.THUMB_WITH_INDICATOR,e8.END))},t.prototype.handleThumbMouseleave=function(){this.isDiscrete&&this.isRange&&(this.adapter.isInputFocused(e8.START)||this.adapter.isInputFocused(e8.END)||(this.adapter.removeThumbClass(Ew.THUMB_WITH_INDICATOR,e8.START),this.adapter.removeThumbClass(Ew.THUMB_WITH_INDICATOR,e8.END)))},t.prototype.handleMousedownOrTouchstart=function(e){var t=this,n="mousedown"===e.type?"mousemove":"touchmove";this.adapter.registerBodyEventHandler(n,this.moveListener);var i=function(){t.handleUp(),t.adapter.deregisterBodyEventHandler(n,t.moveListener),t.adapter.deregisterEventHandler("mouseup",i),t.adapter.deregisterEventHandler("touchend",i)};this.adapter.registerBodyEventHandler("mouseup",i),this.adapter.registerBodyEventHandler("touchend",i),this.handleDown(e)},t.prototype.handlePointerdown=function(e){this.adapter.setPointerCapture(e.pointerId),this.adapter.registerEventHandler("pointermove",this.moveListener),this.handleDown(e)},t.prototype.handleInputChange=function(e){var t=Number(this.adapter.getInputValue(e));e===e8.START?this.setValueStart(t):this.setValue(t)},t.prototype.handleInputFocus=function(e){if(this.isDiscrete&&(this.adapter.addThumbClass(Ew.THUMB_WITH_INDICATOR,e),this.isRange)){var t=e===e8.START?e8.END:e8.START;this.adapter.addThumbClass(Ew.THUMB_WITH_INDICATOR,t)}},t.prototype.handleInputBlur=function(e){if(this.isDiscrete&&(this.adapter.removeThumbClass(Ew.THUMB_WITH_INDICATOR,e),this.isRange)){var t=e===e8.START?e8.END:e8.START;this.adapter.removeThumbClass(Ew.THUMB_WITH_INDICATOR,t)}},t.prototype.handleDragStart=function(e,t,n){this.adapter.focusInput(n),e.preventDefault(),this.adapter.emitDragStartEvent(t,n)},t.prototype.getThumbFromDownEvent=function(e,t){if(!this.isRange)return e8.END;var n=this.adapter.getThumbBoundingClientRect(e8.START),i=this.adapter.getThumbBoundingClientRect(e8.END),o=e>=n.left&&e<=n.right,r=e>=i.left&&e<=i.right;return o&&r?null:o?e8.START:r?e8.END:t<this.valueStart?e8.START:t>this.value?e8.END:null},t.prototype.getThumbFromMoveEvent=function(e){if(null!==this.thumb)return this.thumb;if(null===this.downEventClientX)throw Error("`downEventClientX` is null after move event.");return Math.abs(this.downEventClientX-e)<Ek.THUMB_UPDATE_MIN_PX?this.thumb:e<this.downEventClientX?this.adapter.isRTL()?e8.END:e8.START:this.adapter.isRTL()?e8.START:e8.END},t.prototype.updateUI=function(e){this.updateThumbAndInputAttributes(e),this.updateThumbAndTrackUI(e),this.updateValueIndicatorUI(e),this.updateTickMarksUI()},t.prototype.updateThumbAndInputAttributes=function(e){if(e){var t=this.isRange&&e===e8.START?this.valueStart:this.value,n=String(t);this.adapter.setInputAttribute(EE.INPUT_VALUE,n,e),this.isRange&&e===e8.START?this.adapter.setInputAttribute(EE.INPUT_MIN,n,e8.END):this.isRange&&e===e8.END&&this.adapter.setInputAttribute(EE.INPUT_MAX,n,e8.START),this.adapter.getInputValue(e)!==n&&this.adapter.setInputValue(n,e);var i=this.adapter.getValueToAriaValueTextFn();i&&this.adapter.setInputAttribute(EE.ARIA_VALUETEXT,i(t),e)}},t.prototype.updateValueIndicatorUI=function(e){if(this.isDiscrete){var t=this.isRange&&e===e8.START?this.valueStart:this.value;this.adapter.setValueIndicatorText(t,e===e8.START?e8.START:e8.END),!e&&this.isRange&&this.adapter.setValueIndicatorText(this.valueStart,e8.START)}},t.prototype.updateTickMarksUI=function(){if(this.isDiscrete&&this.hasTickMarks){var e=(this.valueStart-this.min)/this.step,t=(this.value-this.valueStart)/this.step+1,n=(this.max-this.value)/this.step,i=Array.from({length:e}).fill(e6.INACTIVE),o=Array.from({length:t}).fill(e6.ACTIVE),r=Array.from({length:n}).fill(e6.INACTIVE);this.adapter.updateTickMarks(i.concat(o).concat(r))}},t.prototype.mapClientXOnSliderScale=function(e){var t=(e-this.rect.left)/this.rect.width;this.adapter.isRTL()&&(t=1-t);var n=this.min+t*(this.max-this.min);return n===this.max||n===this.min?n:this.quantize(n)},t.prototype.updateValue=function(e,t,n){var i=void 0===n?{}:n,o=i.emitInputEvent,r=i.emitChangeEvent;if(e=this.clampValue(e,t),this.isRange&&t===e8.START){if(this.valueStart===e)return;this.valueStart=e}else{if(this.value===e)return;this.value=e}this.updateUI(t),o&&this.adapter.emitInputEvent(t===e8.START?this.valueStart:this.value,t),r&&this.adapter.emitChangeEvent(t===e8.START?this.valueStart:this.value,t)},t.prototype.quantize=function(e){return Math.round(e/this.step)*this.step},t.prototype.clampValue=function(e,t){return(e=Math.min(Math.max(e,this.min),this.max),this.isRange&&t===e8.START&&e>this.value)?this.value:this.isRange&&t===e8.END&&e<this.valueStart?this.valueStart:e},t.prototype.updateThumbAndTrackUI=function(e){var t=this,n=this.max,i=this.min,o=(this.value-this.valueStart)/(n-i),r=o*this.rect.width,a=this.adapter.isRTL(),s=EM?Ed(window,"transform"):"transform";if(this.isRange){var l=this.adapter.isRTL()?(n-this.value)/(n-i)*this.rect.width:(this.valueStart-i)/(n-i)*this.rect.width,c=l+r;requestAnimationFrame(function(){!a&&e===e8.START||a&&e!==e8.START?(t.adapter.setTrackActiveStyleProperty("transform-origin","right"),t.adapter.setTrackActiveStyleProperty("left","unset"),t.adapter.setTrackActiveStyleProperty("right",t.rect.width-c+"px")):(t.adapter.setTrackActiveStyleProperty("transform-origin","left"),t.adapter.setTrackActiveStyleProperty("right","unset"),t.adapter.setTrackActiveStyleProperty("left",l+"px")),t.adapter.setTrackActiveStyleProperty(s,"scaleX("+o+")");var n=a?c:l,i=t.adapter.isRTL()?l:c;e!==e8.START&&e&&t.initialStylesRemoved||t.adapter.setThumbStyleProperty(s,"translateX("+n+"px)",e8.START),e!==e8.END&&e&&t.initialStylesRemoved||t.adapter.setThumbStyleProperty(s,"translateX("+i+"px)",e8.END),t.removeInitialStyles(a),t.updateOverlappingThumbsUI(n,i,e)})}else requestAnimationFrame(function(){var e=a?t.rect.width-r:r;t.adapter.setThumbStyleProperty(s,"translateX("+e+"px)",e8.END),t.adapter.setTrackActiveStyleProperty(s,"scaleX("+o+")"),t.removeInitialStyles(a)})},t.prototype.removeInitialStyles=function(e){if(!this.initialStylesRemoved){var t=e?"right":"left";this.adapter.removeThumbStyleProperty(t,e8.END),this.isRange&&this.adapter.removeThumbStyleProperty(t,e8.START),this.initialStylesRemoved=!0,this.resetTrackAndThumbAnimation()}},t.prototype.resetTrackAndThumbAnimation=function(){var e=this;if(this.isDiscrete){var t=EM?Ed(window,"transition"):"transition",n="all 0s ease 0s";this.adapter.setThumbStyleProperty(t,n,e8.END),this.isRange&&this.adapter.setThumbStyleProperty(t,n,e8.START),this.adapter.setTrackActiveStyleProperty(t,n),requestAnimationFrame(function(){e.adapter.removeThumbStyleProperty(t,e8.END),e.adapter.removeTrackActiveStyleProperty(t),e.isRange&&e.adapter.removeThumbStyleProperty(t,e8.START)})}},t.prototype.updateOverlappingThumbsUI=function(e,t,n){var i=!1;if(this.adapter.isRTL()){var o=e-this.startThumbKnobWidth/2;i=t+this.endThumbKnobWidth/2>=o}else i=e+this.startThumbKnobWidth/2>=t-this.endThumbKnobWidth/2;i?(this.adapter.addThumbClass(Ew.THUMB_TOP,n||e8.END),this.adapter.removeThumbClass(Ew.THUMB_TOP,n===e8.START?e8.END:e8.START)):(this.adapter.removeThumbClass(Ew.THUMB_TOP,e8.START),this.adapter.removeThumbClass(Ew.THUMB_TOP,e8.END))},t.prototype.convertAttributeValueToNumber=function(e,t){if(null===e)throw Error("MDCSliderFoundation: `"+t+"` must be non-null.");var n=Number(e);if(isNaN(n))throw Error("MDCSliderFoundation: `"+t+"` value is `"+e+"`, but must be a number.");return n},t.prototype.validateProperties=function(e){var t=e.min,n=e.max,i=e.value,o=e.valueStart;if(t>=n)throw Error("MDCSliderFoundation: min must be strictly less than max. "+("Current: [min: "+t+", max: ")+n+"]");if(this.isRange){if(i<t||i>n||o<t||o>n)throw Error("MDCSliderFoundation: values must be in [min, max] range. "+("Current values: [start value: "+o+", end value: ")+i+"]");if(o>i)throw Error("MDCSliderFoundation: start value must be <= end value. "+("Current values: [start value: "+o+", end value: ")+i+"]")}else if(i<t||i>n)throw Error("MDCSliderFoundation: value must be in [min, max] range. Current value: "+i)},t.prototype.registerEventHandlers=function(){this.adapter.registerWindowEventHandler("resize",this.resizeListener),t.SUPPORTS_POINTER_EVENTS?(this.adapter.registerEventHandler("pointerdown",this.pointerdownListener),this.adapter.registerEventHandler("pointerup",this.pointerupListener)):(this.adapter.registerEventHandler("mousedown",this.mousedownOrTouchstartListener),this.adapter.registerEventHandler("touchstart",this.mousedownOrTouchstartListener)),this.isRange&&(this.adapter.registerThumbEventHandler(e8.START,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(e8.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(e8.START,"change",this.inputStartChangeListener),this.adapter.registerInputEventHandler(e8.START,"focus",this.inputStartFocusListener),this.adapter.registerInputEventHandler(e8.START,"blur",this.inputStartBlurListener)),this.adapter.registerThumbEventHandler(e8.END,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(e8.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(e8.END,"change",this.inputEndChangeListener),this.adapter.registerInputEventHandler(e8.END,"focus",this.inputEndFocusListener),this.adapter.registerInputEventHandler(e8.END,"blur",this.inputEndBlurListener)},t.prototype.deregisterEventHandlers=function(){this.adapter.deregisterWindowEventHandler("resize",this.resizeListener),t.SUPPORTS_POINTER_EVENTS?(this.adapter.deregisterEventHandler("pointerdown",this.pointerdownListener),this.adapter.deregisterEventHandler("pointerup",this.pointerupListener)):(this.adapter.deregisterEventHandler("mousedown",this.mousedownOrTouchstartListener),this.adapter.deregisterEventHandler("touchstart",this.mousedownOrTouchstartListener)),this.isRange&&(this.adapter.deregisterThumbEventHandler(e8.START,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(e8.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(e8.START,"change",this.inputStartChangeListener),this.adapter.deregisterInputEventHandler(e8.START,"focus",this.inputStartFocusListener),this.adapter.deregisterInputEventHandler(e8.START,"blur",this.inputStartBlurListener)),this.adapter.deregisterThumbEventHandler(e8.END,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(e8.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(e8.END,"change",this.inputEndChangeListener),this.adapter.deregisterInputEventHandler(e8.END,"focus",this.inputEndFocusListener),this.adapter.deregisterInputEventHandler(e8.END,"blur",this.inputEndBlurListener)},t.prototype.handlePointerup=function(){this.handleUp(),this.adapter.deregisterEventHandler("pointermove",this.moveListener)},t.SUPPORTS_POINTER_EVENTS=EM&&!!window.PointerEvent,t}(kE),EC=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.skipInitialUIUpdate=!1,t.valueToAriaValueTextFn=null,t}return kF(t,e),t.attachTo=function(e,n){return void 0===n&&(n={}),new t(e,void 0,n)},t.prototype.getDefaultFoundation=function(){var e=this;return new EA({hasClass:function(t){return e.root.classList.contains(t)},addClass:function(t){e.root.classList.add(t)},removeClass:function(t){e.root.classList.remove(t)},addThumbClass:function(t,n){e.getThumbEl(n).classList.add(t)},removeThumbClass:function(t,n){e.getThumbEl(n).classList.remove(t)},getAttribute:function(t){return e.root.getAttribute(t)},getInputValue:function(t){return e.getInput(t).value},setInputValue:function(t,n){e.getInput(n).value=t},getInputAttribute:function(t,n){return e.getInput(n).getAttribute(t)},setInputAttribute:function(t,n,i){e.getInput(i).setAttribute(t,n)},removeInputAttribute:function(t,n){e.getInput(n).removeAttribute(t)},focusInput:function(t){e.getInput(t).focus()},isInputFocused:function(t){return e.getInput(t)===document.activeElement},getThumbKnobWidth:function(t){return e.getThumbEl(t).querySelector("."+Ew.THUMB_KNOB).getBoundingClientRect().width},getThumbBoundingClientRect:function(t){return e.getThumbEl(t).getBoundingClientRect()},getBoundingClientRect:function(){return e.root.getBoundingClientRect()},isRTL:function(){return"rtl"===getComputedStyle(e.root).direction},setThumbStyleProperty:function(t,n,i){e.getThumbEl(i).style.setProperty(t,n)},removeThumbStyleProperty:function(t,n){e.getThumbEl(n).style.removeProperty(t)},setTrackActiveStyleProperty:function(t,n){e.trackActive.style.setProperty(t,n)},removeTrackActiveStyleProperty:function(t){e.trackActive.style.removeProperty(t)},setValueIndicatorText:function(t,n){e.getThumbEl(n).querySelector("."+Ew.VALUE_INDICATOR_TEXT).textContent=String(t)},getValueToAriaValueTextFn:function(){return e.valueToAriaValueTextFn},updateTickMarks:function(t){var n=e.root.querySelector("."+Ew.TICK_MARKS_CONTAINER);n||((n=document.createElement("div")).classList.add(Ew.TICK_MARKS_CONTAINER),e.root.querySelector("."+Ew.TRACK).appendChild(n)),t.length!==n.children.length?(n.innerHTML="",e.addTickMarks(n,t)):e.updateTickMarks(n,t)},setPointerCapture:function(t){e.root.setPointerCapture(t)},emitChangeEvent:function(t,n){e.emit(ET.CHANGE,{value:t,thumb:n})},emitInputEvent:function(t,n){e.emit(ET.INPUT,{value:t,thumb:n})},emitDragStartEvent:function(t,n){e.getRipple(n).activate()},emitDragEndEvent:function(t,n){e.getRipple(n).deactivate()},registerEventHandler:function(t,n){e.listen(t,n)},deregisterEventHandler:function(t,n){e.unlisten(t,n)},registerThumbEventHandler:function(t,n,i){e.getThumbEl(t).addEventListener(n,i)},deregisterThumbEventHandler:function(t,n,i){e.getThumbEl(t).removeEventListener(n,i)},registerInputEventHandler:function(t,n,i){e.getInput(t).addEventListener(n,i)},deregisterInputEventHandler:function(t,n,i){e.getInput(t).removeEventListener(n,i)},registerBodyEventHandler:function(e,t){document.body.addEventListener(e,t)},deregisterBodyEventHandler:function(e,t){document.body.removeEventListener(e,t)},registerWindowEventHandler:function(e,t){window.addEventListener(e,t)},deregisterWindowEventHandler:function(e,t){window.removeEventListener(e,t)}})},t.prototype.initialize=function(e){var t=(void 0===e?{}:e).skipInitialUIUpdate;this.inputs=[].slice.call(this.root.querySelectorAll("."+Ew.INPUT)),this.thumbs=[].slice.call(this.root.querySelectorAll("."+Ew.THUMB)),this.trackActive=this.root.querySelector("."+Ew.TRACK_ACTIVE),this.ripples=this.createRipples(),t&&(this.skipInitialUIUpdate=!0)},t.prototype.initialSyncWithDOM=function(){this.foundation.layout({skipUpdateUI:this.skipInitialUIUpdate})},t.prototype.layout=function(){this.foundation.layout()},t.prototype.getValueStart=function(){return this.foundation.getValueStart()},t.prototype.setValueStart=function(e){this.foundation.setValueStart(e)},t.prototype.getValue=function(){return this.foundation.getValue()},t.prototype.setValue=function(e){this.foundation.setValue(e)},t.prototype.getDisabled=function(){return this.foundation.getDisabled()},t.prototype.setDisabled=function(e){this.foundation.setDisabled(e)},t.prototype.setValueToAriaValueTextFn=function(e){this.valueToAriaValueTextFn=e},t.prototype.getThumbEl=function(e){return e===e8.END?this.thumbs[this.thumbs.length-1]:this.thumbs[0]},t.prototype.getInput=function(e){return e===e8.END?this.inputs[this.inputs.length-1]:this.inputs[0]},t.prototype.getRipple=function(e){return e===e8.END?this.ripples[this.ripples.length-1]:this.ripples[0]},t.prototype.addTickMarks=function(e,t){for(var n=document.createDocumentFragment(),i=0;i<t.length;i++){var o=document.createElement("div"),r=t[i]===e6.ACTIVE?Ew.TICK_MARK_ACTIVE:Ew.TICK_MARK_INACTIVE;o.classList.add(r),n.appendChild(o)}e.appendChild(n)},t.prototype.updateTickMarks=function(e,t){for(var n=Array.from(e.children),i=0;i<n.length;i++)t[i]===e6.ACTIVE?(n[i].classList.add(Ew.TICK_MARK_ACTIVE),n[i].classList.remove(Ew.TICK_MARK_INACTIVE)):(n[i].classList.add(Ew.TICK_MARK_INACTIVE),n[i].classList.remove(Ew.TICK_MARK_ACTIVE))},t.prototype.createRipples=function(){for(var e=[],t=[].slice.call(this.root.querySelectorAll("."+Ew.THUMB)),n=this,i=0;i<t.length;i++)!function(i){var o=t[i],r=n.inputs[i],a=kx(kx({},kq.createAdapter(n)),{addClass:function(e){o.classList.add(e)},computeBoundingRect:function(){return o.getBoundingClientRect()},deregisterInteractionHandler:function(e,t){r.removeEventListener(e,t)},isSurfaceActive:function(){return kC(r,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(e,t){r.addEventListener(e,t)},removeClass:function(e){o.classList.remove(e)},updateCssVariable:function(e,t){o.style.setProperty(e,t)}}),s=new kq(o,new k$(a));s.unbounded=!0,e.push(s)}(i);return e},t}(kT),ED={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},ES={CLOSED_EVENT:"MDCMenuSurface:closed",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:'button:not(:disabled), [href]:not([aria-disabled="true"]), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'},EL={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67};!function(e){e[e.BOTTOM=1]="BOTTOM",e[e.CENTER=2]="CENTER",e[e.RIGHT=4]="RIGHT",e[e.FLIP_RTL=8]="FLIP_RTL"}(e7||(e7={})),function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=4]="TOP_RIGHT",e[e.BOTTOM_LEFT=1]="BOTTOM_LEFT",e[e.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",e[e.TOP_START=8]="TOP_START",e[e.TOP_END=12]="TOP_END",e[e.BOTTOM_START=9]="BOTTOM_START",e[e.BOTTOM_END=13]="BOTTOM_END"}(e9||(e9={}));var EI={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_DISABLED_CLASS:"mdc-list-item--disabled",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",LIST_ITEM_TEXT_CLASS:"mdc-list-item__text",LIST_ITEM_PRIMARY_TEXT_CLASS:"mdc-list-item__primary-text",ROOT:"mdc-list"},EO={ACTION_EVENT:"MDCList:action",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_DISABLED:"aria-disabled",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+EI.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+EI.LIST_ITEM_CLASS+" a\n ",FOCUSABLE_CHILD_ELEMENTS:"\n ."+EI.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+EI.LIST_ITEM_CLASS+" a,\n ."+EI.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+EI.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]'},ER={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300},EY={UNKNOWN:"Unknown",BACKSPACE:"Backspace",ENTER:"Enter",SPACEBAR:"Spacebar",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",END:"End",HOME:"Home",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",DELETE:"Delete",ESCAPE:"Escape"},EP=new Set;EP.add(EY.BACKSPACE),EP.add(EY.ENTER),EP.add(EY.SPACEBAR),EP.add(EY.PAGE_UP),EP.add(EY.PAGE_DOWN),EP.add(EY.END),EP.add(EY.HOME),EP.add(EY.ARROW_LEFT),EP.add(EY.ARROW_UP),EP.add(EY.ARROW_RIGHT),EP.add(EY.ARROW_DOWN),EP.add(EY.DELETE),EP.add(EY.ESCAPE);var EN={BACKSPACE:8,ENTER:13,SPACEBAR:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,DELETE:46,ESCAPE:27},EB=new Map;EB.set(EN.BACKSPACE,EY.BACKSPACE),EB.set(EN.ENTER,EY.ENTER),EB.set(EN.SPACEBAR,EY.SPACEBAR),EB.set(EN.PAGE_UP,EY.PAGE_UP),EB.set(EN.PAGE_DOWN,EY.PAGE_DOWN),EB.set(EN.END,EY.END),EB.set(EN.HOME,EY.HOME),EB.set(EN.ARROW_LEFT,EY.ARROW_LEFT),EB.set(EN.ARROW_UP,EY.ARROW_UP),EB.set(EN.ARROW_RIGHT,EY.ARROW_RIGHT),EB.set(EN.ARROW_DOWN,EY.ARROW_DOWN),EB.set(EN.DELETE,EY.DELETE),EB.set(EN.ESCAPE,EY.ESCAPE);var EH=new Set;function Ez(e){var t=e.key;if(EP.has(t))return t;var n=EB.get(e.keyCode);return n||EY.UNKNOWN}EH.add(EY.PAGE_UP),EH.add(EY.PAGE_DOWN),EH.add(EY.END),EH.add(EY.HOME),EH.add(EY.ARROW_LEFT),EH.add(EY.ARROW_UP),EH.add(EY.ARROW_RIGHT),EH.add(EY.ARROW_DOWN);var Ej=["input","button","textarea","select"],EU=function(e){var t=e.target;if(t){var n=(""+t.tagName).toLowerCase();-1===Ej.indexOf(n)&&e.preventDefault()}};function EW(e,t){var n,i=e.nextChar,o=e.focusItemAtIndex,r=e.sortedIndexByFirstChar,a=e.focusedItemIndex,s=e.skipFocus,l=e.isItemAtIndexDisabled;return clearTimeout(t.bufferClearTimeout),t.bufferClearTimeout=setTimeout(function(){EG(t)},ER.TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS),t.typeaheadBuffer=t.typeaheadBuffer+i,-1===(n=1===t.typeaheadBuffer.length?function(e,t,n,i){var o,r=i.typeaheadBuffer[0],a=e.get(r);if(!a)return -1;if(r===i.currentFirstChar&&a[i.sortedIndexCursor].index===t){i.sortedIndexCursor=(i.sortedIndexCursor+1)%a.length;var s=a[i.sortedIndexCursor].index;if(!n(s))return s}i.currentFirstChar=r;var l=-1;for(o=0;o<a.length;o++)if(!n(a[o].index)){l=o;break}for(;o<a.length;o++)if(a[o].index>t&&!n(a[o].index)){l=o;break}return -1!==l?(i.sortedIndexCursor=l,a[i.sortedIndexCursor].index):-1}(r,a,l,t):function(e,t,n){var i=n.typeaheadBuffer[0],o=e.get(i);if(!o)return -1;var r=o[n.sortedIndexCursor];if(0===r.text.lastIndexOf(n.typeaheadBuffer,0)&&!t(r.index))return r.index;for(var a=(n.sortedIndexCursor+1)%o.length,s=-1;a!==n.sortedIndexCursor;){var l=o[a],c=0===l.text.lastIndexOf(n.typeaheadBuffer,0),d=!t(l.index);if(c&&d){s=a;break}a=(a+1)%o.length}return -1!==s?(n.sortedIndexCursor=s,o[n.sortedIndexCursor].index):-1}(r,l,t))||s||o(n),n}function EV(e){return e.typeaheadBuffer.length>0}function EG(e){e.typeaheadBuffer=""}function E$(e,t){var n=e.event,i=e.isTargetListItem,o=e.focusedItemIndex,r=e.focusItemAtIndex,a=e.sortedIndexByFirstChar,s=e.isItemAtIndexDisabled,l="ArrowLeft"===Ez(n),c="ArrowUp"===Ez(n),d="ArrowRight"===Ez(n),u="ArrowDown"===Ez(n),m="Home"===Ez(n),f="End"===Ez(n),p="Enter"===Ez(n),h="Spacebar"===Ez(n);if(l||c||d||u||m||f||p)return -1;if(!h&&1===n.key.length){EU(n);var b={focusItemAtIndex:r,focusedItemIndex:o,nextChar:n.key.toLowerCase(),sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:s};return EW(b,t)}if(!h)return -1;if(i&&EU(n),i&&EV(t)){var b={focusItemAtIndex:r,focusedItemIndex:o,nextChar:" ",sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:s};return EW(b,t)}return -1}var Eq=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.wrapFocus_=!1,i.isVertical_=!0,i.isSingleSelectionList_=!1,i.selectedIndex_=ER.UNSET_INDEX,i.focusedItemIndex=ER.UNSET_INDEX,i.useActivatedClass_=!1,i.useSelectedAttr_=!1,i.ariaCurrentAttrValue_=null,i.isCheckboxList_=!1,i.isRadioList_=!1,i.hasTypeahead=!1,i.typeaheadState={bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""},i.sortedIndexByFirstChar=new Map,i}return kF(t,e),Object.defineProperty(t,"strings",{get:function(){return EO},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return EI},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return ER},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClassForElementIndex:function(){},focusItemAtIndex:function(){},getAttributeForElementIndex:function(){return null},getFocusedElementIndex:function(){return 0},getListItemCount:function(){return 0},hasCheckboxAtIndex:function(){return!1},hasRadioAtIndex:function(){return!1},isCheckboxCheckedAtIndex:function(){return!1},isFocusInsideList:function(){return!1},isRootFocused:function(){return!1},listItemAtIndexHasClass:function(){return!1},notifyAction:function(){},removeClassForElementIndex:function(){},setAttributeForElementIndex:function(){},setCheckedCheckboxOrRadioAtIndex:function(){},setTabIndexForListItemChildren:function(){},getPrimaryTextAtIndex:function(){return""}}},enumerable:!0,configurable:!0}),t.prototype.layout=function(){0!==this.adapter.getListItemCount()&&(this.adapter.hasCheckboxAtIndex(0)?this.isCheckboxList_=!0:this.adapter.hasRadioAtIndex(0)?this.isRadioList_=!0:this.maybeInitializeSingleSelection(),this.hasTypeahead&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex()))},t.prototype.setWrapFocus=function(e){this.wrapFocus_=e},t.prototype.setVerticalOrientation=function(e){this.isVertical_=e},t.prototype.setSingleSelection=function(e){this.isSingleSelectionList_=e,e&&this.maybeInitializeSingleSelection()},t.prototype.maybeInitializeSingleSelection=function(){for(var e=0;e<this.adapter.getListItemCount();e++){var t=this.adapter.listItemAtIndexHasClass(e,EI.LIST_ITEM_SELECTED_CLASS),n=this.adapter.listItemAtIndexHasClass(e,EI.LIST_ITEM_ACTIVATED_CLASS);if(t||n){n&&this.setUseActivatedClass(!0),this.isSingleSelectionList_=!0,this.selectedIndex_=e;return}}},t.prototype.setHasTypeahead=function(e){this.hasTypeahead=e,e&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex())},t.prototype.isTypeaheadInProgress=function(){return this.hasTypeahead&&EV(this.typeaheadState)},t.prototype.setUseActivatedClass=function(e){this.useActivatedClass_=e},t.prototype.setUseSelectedAttribute=function(e){this.useSelectedAttr_=e},t.prototype.getSelectedIndex=function(){return this.selectedIndex_},t.prototype.setSelectedIndex=function(e){this.isIndexValid_(e)&&(this.isCheckboxList_?this.setCheckboxAtIndex_(e):this.isRadioList_?this.setRadioAtIndex_(e):this.setSingleSelectionAtIndex_(e))},t.prototype.handleFocusIn=function(e,t){t>=0&&(this.focusedItemIndex=t,this.adapter.setAttributeForElementIndex(t,"tabindex","0"),this.adapter.setTabIndexForListItemChildren(t,"0"))},t.prototype.handleFocusOut=function(e,t){var n=this;t>=0&&(this.adapter.setAttributeForElementIndex(t,"tabindex","-1"),this.adapter.setTabIndexForListItemChildren(t,"-1")),setTimeout(function(){n.adapter.isFocusInsideList()||n.setTabindexToFirstSelectedOrFocusedItem()},0)},t.prototype.handleKeydown=function(e,t,n){var i=this,o="ArrowLeft"===Ez(e),r="ArrowUp"===Ez(e),a="ArrowRight"===Ez(e),s="ArrowDown"===Ez(e),l="Home"===Ez(e),c="End"===Ez(e),d="Enter"===Ez(e),u="Spacebar"===Ez(e),m="A"===e.key||"a"===e.key;if(this.adapter.isRootFocused()){if(r||c?(e.preventDefault(),this.focusLastElement()):(s||l)&&(e.preventDefault(),this.focusFirstElement()),this.hasTypeahead){var f={event:e,focusItemAtIndex:function(e){i.focusItemAtIndex(e)},focusedItemIndex:-1,isTargetListItem:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(e){return i.adapter.listItemAtIndexHasClass(e,EI.LIST_ITEM_DISABLED_CLASS)}};E$(f,this.typeaheadState)}return}var p=this.adapter.getFocusedElementIndex();if(-1!==p||!((p=n)<0)){if(this.isVertical_&&s||!this.isVertical_&&a)EU(e),this.focusNextElement(p);else if(this.isVertical_&&r||!this.isVertical_&&o)EU(e),this.focusPrevElement(p);else if(l)EU(e),this.focusFirstElement();else if(c)EU(e),this.focusLastElement();else if(m&&e.ctrlKey&&this.isCheckboxList_)e.preventDefault(),this.toggleAll(this.selectedIndex_===ER.UNSET_INDEX?[]:this.selectedIndex_);else if((d||u)&&t){var h=e.target;if(h&&"A"===h.tagName&&d||(EU(e),this.adapter.listItemAtIndexHasClass(p,EI.LIST_ITEM_DISABLED_CLASS)))return;this.isTypeaheadInProgress()||(this.isSelectableList_()&&this.setSelectedIndexOnAction_(p),this.adapter.notifyAction(p))}if(this.hasTypeahead){var f={event:e,focusItemAtIndex:function(e){i.focusItemAtIndex(e)},focusedItemIndex:this.focusedItemIndex,isTargetListItem:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(e){return i.adapter.listItemAtIndexHasClass(e,EI.LIST_ITEM_DISABLED_CLASS)}};E$(f,this.typeaheadState)}}},t.prototype.handleClick=function(e,t){e!==ER.UNSET_INDEX&&(this.adapter.listItemAtIndexHasClass(e,EI.LIST_ITEM_DISABLED_CLASS)||(this.isSelectableList_()&&this.setSelectedIndexOnAction_(e,t),this.adapter.notifyAction(e)))},t.prototype.focusNextElement=function(e){var t=this.adapter.getListItemCount(),n=e+1;if(n>=t)if(!this.wrapFocus_)return e;else n=0;return this.focusItemAtIndex(n),n},t.prototype.focusPrevElement=function(e){var t=e-1;if(t<0)if(!this.wrapFocus_)return e;else t=this.adapter.getListItemCount()-1;return this.focusItemAtIndex(t),t},t.prototype.focusFirstElement=function(){return this.focusItemAtIndex(0),0},t.prototype.focusLastElement=function(){var e=this.adapter.getListItemCount()-1;return this.focusItemAtIndex(e),e},t.prototype.focusInitialElement=function(){var e=this.getFirstSelectedOrFocusedItemIndex();return this.focusItemAtIndex(e),e},t.prototype.setEnabled=function(e,t){this.isIndexValid_(e)&&(t?(this.adapter.removeClassForElementIndex(e,EI.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(e,EO.ARIA_DISABLED,"false")):(this.adapter.addClassForElementIndex(e,EI.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(e,EO.ARIA_DISABLED,"true")))},t.prototype.setSingleSelectionAtIndex_=function(e){if(this.selectedIndex_!==e){var t=EI.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass_&&(t=EI.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex_!==ER.UNSET_INDEX&&this.adapter.removeClassForElementIndex(this.selectedIndex_,t),this.setAriaForSingleSelectionAtIndex_(e),this.setTabindexAtIndex(e),e!==ER.UNSET_INDEX&&this.adapter.addClassForElementIndex(e,t),this.selectedIndex_=e}},t.prototype.setAriaForSingleSelectionAtIndex_=function(e){this.selectedIndex_===ER.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter.getAttributeForElementIndex(e,EO.ARIA_CURRENT));var t=null!==this.ariaCurrentAttrValue_,n=t?EO.ARIA_CURRENT:EO.ARIA_SELECTED;if(this.selectedIndex_!==ER.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex_,n,"false"),e!==ER.UNSET_INDEX){var i=t?this.ariaCurrentAttrValue_:"true";this.adapter.setAttributeForElementIndex(e,n,i)}},t.prototype.getSelectionAttribute=function(){return this.useSelectedAttr_?EO.ARIA_SELECTED:EO.ARIA_CHECKED},t.prototype.setRadioAtIndex_=function(e){var t=this.getSelectionAttribute();this.adapter.setCheckedCheckboxOrRadioAtIndex(e,!0),this.selectedIndex_!==ER.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex_,t,"false"),this.adapter.setAttributeForElementIndex(e,t,"true"),this.selectedIndex_=e},t.prototype.setCheckboxAtIndex_=function(e){for(var t=this.getSelectionAttribute(),n=0;n<this.adapter.getListItemCount();n++){var i=!1;e.indexOf(n)>=0&&(i=!0),this.adapter.setCheckedCheckboxOrRadioAtIndex(n,i),this.adapter.setAttributeForElementIndex(n,t,i?"true":"false")}this.selectedIndex_=e},t.prototype.setTabindexAtIndex=function(e){this.focusedItemIndex===ER.UNSET_INDEX&&0!==e?this.adapter.setAttributeForElementIndex(0,"tabindex","-1"):this.focusedItemIndex>=0&&this.focusedItemIndex!==e&&this.adapter.setAttributeForElementIndex(this.focusedItemIndex,"tabindex","-1"),this.selectedIndex_ instanceof Array||this.selectedIndex_===e||this.adapter.setAttributeForElementIndex(this.selectedIndex_,"tabindex","-1"),e!==ER.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(e,"tabindex","0")},t.prototype.isSelectableList_=function(){return this.isSingleSelectionList_||this.isCheckboxList_||this.isRadioList_},t.prototype.setTabindexToFirstSelectedOrFocusedItem=function(){var e=this.getFirstSelectedOrFocusedItemIndex();this.setTabindexAtIndex(e)},t.prototype.getFirstSelectedOrFocusedItemIndex=function(){var e=this.focusedItemIndex>=0?this.focusedItemIndex:0;return this.isSelectableList_()&&("number"==typeof this.selectedIndex_&&this.selectedIndex_!==ER.UNSET_INDEX?e=this.selectedIndex_:this.selectedIndex_ instanceof Array&&this.selectedIndex_.length>0&&(e=this.selectedIndex_.reduce(function(e,t){return Math.min(e,t)}))),e},t.prototype.isIndexValid_=function(e){var t=this;if(e instanceof Array){if(!this.isCheckboxList_)throw Error("MDCListFoundation: Array of index is only supported for checkbox based list");return 0===e.length||e.some(function(e){return t.isIndexInRange_(e)})}if("number"!=typeof e)return!1;if(this.isCheckboxList_)throw Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+e);return this.isIndexInRange_(e)||this.isSingleSelectionList_&&e===ER.UNSET_INDEX},t.prototype.isIndexInRange_=function(e){var t=this.adapter.getListItemCount();return e>=0&&e<t},t.prototype.setSelectedIndexOnAction_=function(e,t){void 0===t&&(t=!0),this.isCheckboxList_?this.toggleCheckboxAtIndex_(e,t):this.setSelectedIndex(e)},t.prototype.toggleCheckboxAtIndex_=function(e,t){var n=this.getSelectionAttribute(),i=this.adapter.isCheckboxCheckedAtIndex(e);t&&(i=!i,this.adapter.setCheckedCheckboxOrRadioAtIndex(e,i)),this.adapter.setAttributeForElementIndex(e,n,i?"true":"false");var o=this.selectedIndex_===ER.UNSET_INDEX?[]:this.selectedIndex_.slice();i?o.push(e):o=o.filter(function(t){return t!==e}),this.selectedIndex_=o},t.prototype.focusItemAtIndex=function(e){this.adapter.focusItemAtIndex(e),this.focusedItemIndex=e},t.prototype.toggleAll=function(e){var t=this.adapter.getListItemCount();if(e.length===t)this.setCheckboxAtIndex_([]);else{for(var n=[],i=0;i<t;i++)(!this.adapter.listItemAtIndexHasClass(i,EI.LIST_ITEM_DISABLED_CLASS)||e.indexOf(i)>-1)&&n.push(i);this.setCheckboxAtIndex_(n)}},t.prototype.typeaheadMatchItem=function(e,t,n){var i=this;return void 0===n&&(n=!1),EW({focusItemAtIndex:function(e){i.focusItemAtIndex(e)},focusedItemIndex:t||this.focusedItemIndex,nextChar:e,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:n,isItemAtIndexDisabled:function(e){return i.adapter.listItemAtIndexHasClass(e,EI.LIST_ITEM_DISABLED_CLASS)}},this.typeaheadState)},t.prototype.typeaheadInitSortedIndex=function(){return function(e,t){for(var n=new Map,i=0;i<e;i++){var o=t(i).trim();if(o){var r=o[0].toLowerCase();n.has(r)||n.set(r,[]),n.get(r).push({text:o.toLowerCase(),index:i})}}return n.forEach(function(e){e.sort(function(e,t){return e.index-t.index})}),n}(this.adapter.getListItemCount(),this.adapter.getPrimaryTextAtIndex)},t.prototype.clearTypeaheadBuffer=function(){EG(this.typeaheadState)},t}(kE),EX=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),Object.defineProperty(t.prototype,"vertical",{set:function(e){this.foundation.setVerticalOrientation(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"listElements",{get:function(){return[].slice.call(this.root.querySelectorAll("."+EI.LIST_ITEM_CLASS))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wrapFocus",{set:function(e){this.foundation.setWrapFocus(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"typeaheadInProgress",{get:function(){return this.foundation.isTypeaheadInProgress()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasTypeahead",{set:function(e){this.foundation.setHasTypeahead(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"singleSelection",{set:function(e){this.foundation.setSingleSelection(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this.foundation.getSelectedIndex()},set:function(e){this.foundation.setSelectedIndex(e)},enumerable:!0,configurable:!0}),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){this.handleClick_=this.handleClickEvent_.bind(this),this.handleKeydown_=this.handleKeydownEvent_.bind(this),this.focusInEventListener_=this.handleFocusInEvent_.bind(this),this.focusOutEventListener_=this.handleFocusOutEvent_.bind(this),this.listen("keydown",this.handleKeydown_),this.listen("click",this.handleClick_),this.listen("focusin",this.focusInEventListener_),this.listen("focusout",this.focusOutEventListener_),this.layout(),this.initializeListType()},t.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown_),this.unlisten("click",this.handleClick_),this.unlisten("focusin",this.focusInEventListener_),this.unlisten("focusout",this.focusOutEventListener_)},t.prototype.layout=function(){var e=this.root.getAttribute(EO.ARIA_ORIENTATION);this.vertical=e!==EO.ARIA_ORIENTATION_HORIZONTAL,[].slice.call(this.root.querySelectorAll(".mdc-list-item:not([tabindex])")).forEach(function(e){e.setAttribute("tabindex","-1")}),[].slice.call(this.root.querySelectorAll(EO.FOCUSABLE_CHILD_ELEMENTS)).forEach(function(e){return e.setAttribute("tabindex","-1")}),this.foundation.layout()},t.prototype.getPrimaryText=function(e){var t=e.querySelector("."+EI.LIST_ITEM_PRIMARY_TEXT_CLASS);if(t)return t.textContent||"";var n=e.querySelector("."+EI.LIST_ITEM_TEXT_CLASS);return n&&n.textContent||""},t.prototype.initializeListType=function(){var e=this,t=this.root.querySelectorAll(EO.ARIA_ROLE_CHECKBOX_SELECTOR),n=this.root.querySelector(EO.ARIA_CHECKED_RADIO_SELECTOR);if(t.length){var i=this.root.querySelectorAll(EO.ARIA_CHECKED_CHECKBOX_SELECTOR);this.selectedIndex=[].map.call(i,function(t){return e.listElements.indexOf(t)})}else n&&(this.selectedIndex=this.listElements.indexOf(n))},t.prototype.setEnabled=function(e,t){this.foundation.setEnabled(e,t)},t.prototype.typeaheadMatchItem=function(e,t){return this.foundation.typeaheadMatchItem(e,t,!0)},t.prototype.getDefaultFoundation=function(){var e=this;return new Eq({addClassForElementIndex:function(t,n){var i=e.listElements[t];i&&i.classList.add(n)},focusItemAtIndex:function(t){var n=e.listElements[t];n&&n.focus()},getAttributeForElementIndex:function(t,n){return e.listElements[t].getAttribute(n)},getFocusedElementIndex:function(){return e.listElements.indexOf(document.activeElement)},getListItemCount:function(){return e.listElements.length},getPrimaryTextAtIndex:function(t){return e.getPrimaryText(e.listElements[t])},hasCheckboxAtIndex:function(t){return!!e.listElements[t].querySelector(EO.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(t){return!!e.listElements[t].querySelector(EO.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(t){return e.listElements[t].querySelector(EO.CHECKBOX_SELECTOR).checked},isFocusInsideList:function(){return e.root!==document.activeElement&&e.root.contains(document.activeElement)},isRootFocused:function(){return document.activeElement===e.root},listItemAtIndexHasClass:function(t,n){return e.listElements[t].classList.contains(n)},notifyAction:function(t){e.emit(EO.ACTION_EVENT,{index:t},!0)},removeClassForElementIndex:function(t,n){var i=e.listElements[t];i&&i.classList.remove(n)},setAttributeForElementIndex:function(t,n,i){var o=e.listElements[t];o&&o.setAttribute(n,i)},setCheckedCheckboxOrRadioAtIndex:function(t,n){var i=e.listElements[t].querySelector(EO.CHECKBOX_RADIO_SELECTOR);i.checked=n;var o=document.createEvent("Event");o.initEvent("change",!0,!0),i.dispatchEvent(o)},setTabIndexForListItemChildren:function(t,n){var i=e.listElements[t];[].slice.call(i.querySelectorAll(EO.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX)).forEach(function(e){return e.setAttribute("tabindex",n)})}})},t.prototype.getListItemIndex_=function(e){var t=kA(e.target,"."+EI.LIST_ITEM_CLASS+", ."+EI.ROOT);return t&&kC(t,"."+EI.LIST_ITEM_CLASS)?this.listElements.indexOf(t):-1},t.prototype.handleFocusInEvent_=function(e){var t=this.getListItemIndex_(e);this.foundation.handleFocusIn(e,t)},t.prototype.handleFocusOutEvent_=function(e){var t=this.getListItemIndex_(e);this.foundation.handleFocusOut(e,t)},t.prototype.handleKeydownEvent_=function(e){var t=this.getListItemIndex_(e),n=e.target;this.foundation.handleKeydown(e,n.classList.contains(EI.LIST_ITEM_CLASS),t)},t.prototype.handleClickEvent_=function(e){var t=this.getListItemIndex_(e),n=!kC(e.target,EO.CHECKBOX_RADIO_SELECTOR);this.foundation.handleClick(t,n)},t}(kT),EK=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.isSurfaceOpen=!1,i.isQuickOpen=!1,i.isHoistedElement=!1,i.isFixedPosition=!1,i.openAnimationEndTimerId=0,i.closeAnimationEndTimerId=0,i.animationRequestId=0,i.anchorCorner=e9.TOP_START,i.originCorner=e9.TOP_START,i.anchorMargin={top:0,right:0,bottom:0,left:0},i.position={x:0,y:0},i}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return ED},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ES},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return EL},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Corner",{get:function(){return e9},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyOpen:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=t.cssClasses,n=e.ROOT,i=e.OPEN;if(!this.adapter.hasClass(n))throw Error(n+" class required in root element.");this.adapter.hasClass(i)&&(this.isSurfaceOpen=!0)},t.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},t.prototype.setAnchorCorner=function(e){this.anchorCorner=e},t.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^e7.RIGHT},t.prototype.setAnchorMargin=function(e){this.anchorMargin.top=e.top||0,this.anchorMargin.right=e.right||0,this.anchorMargin.bottom=e.bottom||0,this.anchorMargin.left=e.left||0},t.prototype.setIsHoisted=function(e){this.isHoistedElement=e},t.prototype.setFixedPosition=function(e){this.isFixedPosition=e},t.prototype.setAbsolutePosition=function(e,t){this.position.x=this.isFinite(e)?e:0,this.position.y=this.isFinite(t)?t:0},t.prototype.setQuickOpen=function(e){this.isQuickOpen=e},t.prototype.isOpen=function(){return this.isSurfaceOpen},t.prototype.open=function(){var e=this;this.isSurfaceOpen||(this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(t.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(t.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame(function(){e.adapter.addClass(t.cssClasses.OPEN),e.dimensions=e.adapter.getInnerDimensions(),e.autoposition(),e.openAnimationEndTimerId=setTimeout(function(){e.openAnimationEndTimerId=0,e.adapter.removeClass(t.cssClasses.ANIMATING_OPEN),e.adapter.notifyOpen()},EL.TRANSITION_OPEN_DURATION)}),this.isSurfaceOpen=!0))},t.prototype.close=function(e){var n=this;void 0===e&&(e=!1),this.isSurfaceOpen&&(this.isQuickOpen?(this.isSurfaceOpen=!1,e||this.maybeRestoreFocus(),this.adapter.removeClass(t.cssClasses.OPEN),this.adapter.removeClass(t.cssClasses.IS_OPEN_BELOW),this.adapter.notifyClose()):(this.adapter.addClass(t.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){n.adapter.removeClass(t.cssClasses.OPEN),n.adapter.removeClass(t.cssClasses.IS_OPEN_BELOW),n.closeAnimationEndTimerId=setTimeout(function(){n.closeAnimationEndTimerId=0,n.adapter.removeClass(t.cssClasses.ANIMATING_CLOSED),n.adapter.notifyClose()},EL.TRANSITION_CLOSE_DURATION)}),this.isSurfaceOpen=!1,e||this.maybeRestoreFocus()))},t.prototype.handleBodyClick=function(e){var t=e.target;this.adapter.isElementInContainer(t)||this.close()},t.prototype.handleKeydown=function(e){var t=e.keyCode;("Escape"===e.key||27===t)&&this.close()},t.prototype.autoposition=function(){this.measurements=this.getAutoLayoutmeasurements();var e,n=this.getoriginCorner(),i=this.getMenuSurfaceMaxHeight(n),o=this.hasBit(n,e7.BOTTOM)?"bottom":"top",r=this.hasBit(n,e7.RIGHT)?"right":"left",a=this.getHorizontalOriginOffset(n),s=this.getVerticalOriginOffset(n),l=this.measurements,c=l.anchorSize,d=l.surfaceSize,u=((e={})[r]=a,e[o]=s,e);c.width/d.width>EL.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(r="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(u),this.adapter.setTransformOrigin(r+" "+o),this.adapter.setPosition(u),this.adapter.setMaxHeight(i?i+"px":""),this.hasBit(n,e7.BOTTOM)||this.adapter.addClass(t.cssClasses.IS_OPEN_BELOW)},t.prototype.getAutoLayoutmeasurements=function(){var e=this.adapter.getAnchorDimensions(),t=this.adapter.getBodyDimensions(),n=this.adapter.getWindowDimensions(),i=this.adapter.getWindowScroll();return e||(e={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:e,bodySize:t,surfaceSize:this.dimensions,viewportDistance:{top:e.top,right:n.width-e.right,bottom:n.height-e.bottom,left:e.left},viewportSize:n,windowScroll:i}},t.prototype.getoriginCorner=function(){var e,n,i,o,r=this.originCorner,a=this.measurements,s=a.viewportDistance,l=a.anchorSize,c=a.surfaceSize,d=t.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,e7.BOTTOM)?(e=s.top-d+l.height+this.anchorMargin.bottom,n=s.bottom-d-this.anchorMargin.bottom):(e=s.top-d+this.anchorMargin.top,n=s.bottom-d+l.height-this.anchorMargin.top),!(n-c.height>0)&&e>=n&&(r=this.setBit(r,e7.BOTTOM));var u=this.adapter.isRtl(),m=this.hasBit(this.anchorCorner,e7.FLIP_RTL),f=this.hasBit(this.anchorCorner,e7.RIGHT)||this.hasBit(r,e7.RIGHT),p=!1;(p=u&&m?!f:f)?(i=s.left+l.width+this.anchorMargin.right,o=s.right-this.anchorMargin.right):(i=s.left+this.anchorMargin.left,o=s.right+l.width-this.anchorMargin.left);var h=i-c.width>0,b=o-c.width>0,g=this.hasBit(r,e7.FLIP_RTL)&&this.hasBit(r,e7.RIGHT);return b&&g&&u||!h&&g?r=this.unsetBit(r,e7.RIGHT):(h&&p&&u||h&&!p&&f||!b&&i>=o)&&(r=this.setBit(r,e7.RIGHT)),r},t.prototype.getMenuSurfaceMaxHeight=function(e){var n=this.measurements.viewportDistance,i=0,o=this.hasBit(e,e7.BOTTOM),r=this.hasBit(this.anchorCorner,e7.BOTTOM),a=t.numbers.MARGIN_TO_EDGE;return o?(i=n.top+this.anchorMargin.top-a,r||(i+=this.measurements.anchorSize.height)):(i=n.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-a,r&&(i-=this.measurements.anchorSize.height)),i},t.prototype.getHorizontalOriginOffset=function(e){var t=this.measurements.anchorSize,n=this.hasBit(e,e7.RIGHT),i=this.hasBit(this.anchorCorner,e7.RIGHT);if(n){var o=i?t.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?o-(this.measurements.viewportSize.width-this.measurements.bodySize.width):o}return i?t.width-this.anchorMargin.right:this.anchorMargin.left},t.prototype.getVerticalOriginOffset=function(e){var t=this.measurements.anchorSize,n=this.hasBit(e,e7.BOTTOM),i=this.hasBit(this.anchorCorner,e7.BOTTOM);return n?i?t.height-this.anchorMargin.top:-this.anchorMargin.bottom:i?t.height+this.anchorMargin.bottom:this.anchorMargin.top},t.prototype.adjustPositionForHoistedElement=function(e){var t,n,i=this.measurements,o=i.windowScroll,r=i.viewportDistance,a=Object.keys(e);try{for(var s=kw(a),l=s.next();!l.done;l=s.next()){var c=l.value,d=e[c]||0;d+=r[c],this.isFixedPosition||("top"===c?d+=o.y:"bottom"===c?d-=o.y:"left"===c?d+=o.x:d-=o.x),e[c]=d}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}},t.prototype.maybeRestoreFocus=function(){var e=this.adapter.isFocused(),t=document.activeElement&&this.adapter.isElementInContainer(document.activeElement);(e||t)&&this.adapter.restoreFocus()},t.prototype.hasBit=function(e,t){return!!(e&t)},t.prototype.setBit=function(e,t){return e|t},t.prototype.unsetBit=function(e,t){return e^t},t.prototype.isFinite=function(e){return"number"==typeof e&&isFinite(e)},t}(kE),EJ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){var e=this,t=this.root.parentElement;this.anchorElement=t&&t.classList.contains(ED.ANCHOR)?t:null,this.root.classList.contains(ED.FIXED)&&this.setFixedPosition(!0),this.handleKeydown=function(t){e.foundation.handleKeydown(t)},this.handleBodyClick=function(t){e.foundation.handleBodyClick(t)},this.registerBodyClickListener=function(){document.body.addEventListener("click",e.handleBodyClick,{capture:!0})},this.deregisterBodyClickListener=function(){document.body.removeEventListener("click",e.handleBodyClick,{capture:!0})},this.listen("keydown",this.handleKeydown),this.listen(ES.OPENED_EVENT,this.registerBodyClickListener),this.listen(ES.CLOSED_EVENT,this.deregisterBodyClickListener)},t.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown),this.unlisten(ES.OPENED_EVENT,this.registerBodyClickListener),this.unlisten(ES.CLOSED_EVENT,this.deregisterBodyClickListener),e.prototype.destroy.call(this)},t.prototype.isOpen=function(){return this.foundation.isOpen()},t.prototype.open=function(){this.foundation.open()},t.prototype.close=function(e){void 0===e&&(e=!1),this.foundation.close(e)},Object.defineProperty(t.prototype,"quickOpen",{set:function(e){this.foundation.setQuickOpen(e)},enumerable:!0,configurable:!0}),t.prototype.setIsHoisted=function(e){this.foundation.setIsHoisted(e)},t.prototype.setMenuSurfaceAnchorElement=function(e){this.anchorElement=e},t.prototype.setFixedPosition=function(e){e?this.root.classList.add(ED.FIXED):this.root.classList.remove(ED.FIXED),this.foundation.setFixedPosition(e)},t.prototype.setAbsolutePosition=function(e,t){this.foundation.setAbsolutePosition(e,t),this.setIsHoisted(!0)},t.prototype.setAnchorCorner=function(e){this.foundation.setAnchorCorner(e)},t.prototype.setAnchorMargin=function(e){this.foundation.setAnchorMargin(e)},t.prototype.getDefaultFoundation=function(){var e=this;return new EK({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},hasAnchor:function(){return!!e.anchorElement},notifyClose:function(){return e.emit(EK.strings.CLOSED_EVENT,{})},notifyOpen:function(){return e.emit(EK.strings.OPENED_EVENT,{})},isElementInContainer:function(t){return e.root.contains(t)},isRtl:function(){return"rtl"===getComputedStyle(e.root).getPropertyValue("direction")},setTransformOrigin:function(t){var n,i,o=(n=window,void 0===i&&(i=!1),(void 0===te||i)&&(te="transform"in n.document.createElement("div").style?"transform":"webkitTransform"),te+"-origin");e.root.style.setProperty(o,t)},isFocused:function(){return document.activeElement===e.root},saveFocus:function(){e.previousFocus=document.activeElement},restoreFocus:function(){e.root.contains(document.activeElement)&&e.previousFocus&&e.previousFocus.focus&&e.previousFocus.focus()},getInnerDimensions:function(){return{width:e.root.offsetWidth,height:e.root.offsetHeight}},getAnchorDimensions:function(){return e.anchorElement?e.anchorElement.getBoundingClientRect():null},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(t){var n=e.root;n.style.left="left"in t?t.left+"px":"",n.style.right="right"in t?t.right+"px":"",n.style.top="top"in t?t.top+"px":"",n.style.bottom="bottom"in t?t.bottom+"px":""},setMaxHeight:function(t){e.root.style.maxHeight=t}})},t}(kT),EZ={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},EQ={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list",SELECTED_EVENT:"MDCMenu:selected"},E0={FOCUS_ROOT_INDEX:-1};!function(e){e[e.NONE=0]="NONE",e[e.LIST_ROOT=1]="LIST_ROOT",e[e.FIRST_ITEM=2]="FIRST_ITEM",e[e.LAST_ITEM=3]="LAST_ITEM"}(tt||(tt={}));var E1=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.closeAnimationEndTimerId_=0,i.defaultFocusState_=tt.LIST_ROOT,i}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return EZ},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return EQ},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return E0},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return -1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return -1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this.closeAnimationEndTimerId_&&clearTimeout(this.closeAnimationEndTimerId_),this.adapter.closeSurface()},t.prototype.handleKeydown=function(e){var t=e.key,n=e.keyCode;("Tab"===t||9===n)&&this.adapter.closeSurface(!0)},t.prototype.handleItemAction=function(e){var t=this,n=this.adapter.getElementIndex(e);n<0||(this.adapter.notifySelected({index:n}),this.adapter.closeSurface(),this.closeAnimationEndTimerId_=setTimeout(function(){var n=t.adapter.getElementIndex(e);n>=0&&t.adapter.isSelectableItemAtIndex(n)&&t.setSelectedIndex(n)},EK.numbers.TRANSITION_CLOSE_DURATION))},t.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState_){case tt.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case tt.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case tt.NONE:break;default:this.adapter.focusListRoot()}},t.prototype.setDefaultFocusState=function(e){this.defaultFocusState_=e},t.prototype.setSelectedIndex=function(e){if(this.validatedIndex_(e),!this.adapter.isSelectableItemAtIndex(e))throw Error("MDCMenuFoundation: No selection group at specified index.");var t=this.adapter.getSelectedSiblingOfItemAtIndex(e);t>=0&&(this.adapter.removeAttributeFromElementAtIndex(t,EQ.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(t,EZ.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(e,EZ.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(e,EQ.ARIA_CHECKED_ATTR,"true")},t.prototype.setEnabled=function(e,t){this.validatedIndex_(e),t?(this.adapter.removeClassFromElementAtIndex(e,EI.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(e,EQ.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(e,EI.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(e,EQ.ARIA_DISABLED_ATTR,"true"))},t.prototype.validatedIndex_=function(e){var t=this.adapter.getMenuItemCount();if(!(e>=0&&e<t))throw Error("MDCMenuFoundation: No list item at specified index.")},t}(kE),E2=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e,t){void 0===e&&(e=function(e){return new EJ(e)}),void 0===t&&(t=function(e){return new EX(e)}),this.menuSurfaceFactory_=e,this.listFactory_=t},t.prototype.initialSyncWithDOM=function(){var e=this;this.menuSurface_=this.menuSurfaceFactory_(this.root);var t=this.root.querySelector(EQ.LIST_SELECTOR);t?(this.list_=this.listFactory_(t),this.list_.wrapFocus=!0):this.list_=null,this.handleKeydown_=function(t){return e.foundation.handleKeydown(t)},this.handleItemAction_=function(t){return e.foundation.handleItemAction(e.items[t.detail.index])},this.handleMenuSurfaceOpened_=function(){return e.foundation.handleMenuSurfaceOpened()},this.menuSurface_.listen(EK.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.listen("keydown",this.handleKeydown_),this.listen(Eq.strings.ACTION_EVENT,this.handleItemAction_)},t.prototype.destroy=function(){this.list_&&this.list_.destroy(),this.menuSurface_.destroy(),this.menuSurface_.unlisten(EK.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.unlisten("keydown",this.handleKeydown_),this.unlisten(Eq.strings.ACTION_EVENT,this.handleItemAction_),e.prototype.destroy.call(this)},Object.defineProperty(t.prototype,"open",{get:function(){return this.menuSurface_.isOpen()},set:function(e){e?this.menuSurface_.open():this.menuSurface_.close()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wrapFocus",{get:function(){return!!this.list_&&this.list_.wrapFocus},set:function(e){this.list_&&(this.list_.wrapFocus=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasTypeahead",{set:function(e){this.list_&&(this.list_.hasTypeahead=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"typeaheadInProgress",{get:function(){return!!this.list_&&this.list_.typeaheadInProgress},enumerable:!0,configurable:!0}),t.prototype.typeaheadMatchItem=function(e,t){return this.list_?this.list_.typeaheadMatchItem(e,t):-1},t.prototype.layout=function(){this.list_&&this.list_.layout()},Object.defineProperty(t.prototype,"items",{get:function(){return this.list_?this.list_.listElements:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"singleSelection",{set:function(e){this.list_&&(this.list_.singleSelection=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this.list_?this.list_.selectedIndex:ER.UNSET_INDEX},set:function(e){this.list_&&(this.list_.selectedIndex=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"quickOpen",{set:function(e){this.menuSurface_.quickOpen=e},enumerable:!0,configurable:!0}),t.prototype.setDefaultFocusState=function(e){this.foundation.setDefaultFocusState(e)},t.prototype.setAnchorCorner=function(e){this.menuSurface_.setAnchorCorner(e)},t.prototype.setAnchorMargin=function(e){this.menuSurface_.setAnchorMargin(e)},t.prototype.setSelectedIndex=function(e){this.foundation.setSelectedIndex(e)},t.prototype.setEnabled=function(e,t){this.foundation.setEnabled(e,t)},t.prototype.getOptionByIndex=function(e){return e<this.items.length?this.items[e]:null},t.prototype.getPrimaryTextAtIndex=function(e){var t=this.getOptionByIndex(e);return t&&this.list_&&this.list_.getPrimaryText(t)||""},t.prototype.setFixedPosition=function(e){this.menuSurface_.setFixedPosition(e)},t.prototype.setIsHoisted=function(e){this.menuSurface_.setIsHoisted(e)},t.prototype.setAbsolutePosition=function(e,t){this.menuSurface_.setAbsolutePosition(e,t)},t.prototype.setAnchorElement=function(e){this.menuSurface_.anchorElement=e},t.prototype.getDefaultFoundation=function(){var e=this;return new E1({addClassToElementAtIndex:function(t,n){e.items[t].classList.add(n)},removeClassFromElementAtIndex:function(t,n){e.items[t].classList.remove(n)},addAttributeToElementAtIndex:function(t,n,i){e.items[t].setAttribute(n,i)},removeAttributeFromElementAtIndex:function(t,n){e.items[t].removeAttribute(n)},elementContainsClass:function(e,t){return e.classList.contains(t)},closeSurface:function(t){return e.menuSurface_.close(t)},getElementIndex:function(t){return e.items.indexOf(t)},notifySelected:function(t){return e.emit(EQ.SELECTED_EVENT,{index:t.index,item:e.items[t.index]})},getMenuItemCount:function(){return e.items.length},focusItemAtIndex:function(t){return e.items[t].focus()},focusListRoot:function(){return e.root.querySelector(EQ.LIST_SELECTOR).focus()},isSelectableItemAtIndex:function(t){return!!kA(e.items[t],"."+EZ.MENU_SELECTION_GROUP)},getSelectedSiblingOfItemAtIndex:function(t){var n=kA(e.items[t],"."+EZ.MENU_SELECTION_GROUP).querySelector("."+EZ.MENU_SELECTED_LIST_ITEM);return n?e.items.indexOf(n):-1}})},t}(kT),E5={ACTIVATED:"mdc-select--activated",DISABLED:"mdc-select--disabled",FOCUSED:"mdc-select--focused",INVALID:"mdc-select--invalid",MENU_INVALID:"mdc-select__menu--invalid",OUTLINED:"mdc-select--outlined",REQUIRED:"mdc-select--required",ROOT:"mdc-select",WITH_LEADING_ICON:"mdc-select--with-leading-icon"},E3={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",ARIA_SELECTED_ATTR:"aria-selected",CHANGE_EVENT:"MDCSelect:change",HIDDEN_INPUT_SELECTOR:'input[type="hidden"]',LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-select__icon",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",MENU_SELECTOR:".mdc-select__menu",OUTLINE_SELECTOR:".mdc-notched-outline",SELECTED_TEXT_SELECTOR:".mdc-select__selected-text",SELECT_ANCHOR_SELECTOR:".mdc-select__anchor",VALUE_ATTR:"data-value"},E4={LABEL_SCALE:.75,UNSET_INDEX:-1,CLICK_DEBOUNCE_TIMEOUT_MS:330},E6=function(e){function t(n,i){void 0===i&&(i={});var o=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return o.disabled=!1,o.isMenuOpen=!1,o.useDefaultValidation=!0,o.customValidity=!0,o.lastSelectedIndex=E4.UNSET_INDEX,o.clickDebounceTimeout=0,o.recentlyClicked=!1,o.leadingIcon=i.leadingIcon,o.helperText=i.helperText,o}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return E5},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return E4},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return E3},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},activateBottomLine:function(){},deactivateBottomLine:function(){},getSelectedIndex:function(){return -1},setSelectedIndex:function(){},hasLabel:function(){return!1},floatLabel:function(){},getLabelWidth:function(){return 0},setLabelRequired:function(){},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){},setRippleCenter:function(){},notifyChange:function(){},setSelectedText:function(){},isSelectAnchorFocused:function(){return!1},getSelectAnchorAttr:function(){return""},setSelectAnchorAttr:function(){},removeSelectAnchorAttr:function(){},addMenuClass:function(){},removeMenuClass:function(){},openMenu:function(){},closeMenu:function(){},getAnchorElement:function(){return null},setMenuAnchorElement:function(){},setMenuAnchorCorner:function(){},setMenuWrapFocus:function(){},focusMenuItemAtIndex:function(){},getMenuItemCount:function(){return 0},getMenuItemValues:function(){return[]},getMenuItemTextAtIndex:function(){return""},isTypeaheadInProgress:function(){return!1},typeaheadMatchItem:function(){return -1}}},enumerable:!0,configurable:!0}),t.prototype.getSelectedIndex=function(){return this.adapter.getSelectedIndex()},t.prototype.setSelectedIndex=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1),e>=this.adapter.getMenuItemCount()||(e===E4.UNSET_INDEX?this.adapter.setSelectedText(""):this.adapter.setSelectedText(this.adapter.getMenuItemTextAtIndex(e).trim()),this.adapter.setSelectedIndex(e),t&&this.adapter.closeMenu(),n||this.lastSelectedIndex===e||this.handleChange(),this.lastSelectedIndex=e)},t.prototype.setValue=function(e,t){void 0===t&&(t=!1);var n=this.adapter.getMenuItemValues().indexOf(e);this.setSelectedIndex(n,!1,t)},t.prototype.getValue=function(){var e=this.adapter.getSelectedIndex(),t=this.adapter.getMenuItemValues();return e!==E4.UNSET_INDEX?t[e]:""},t.prototype.getDisabled=function(){return this.disabled},t.prototype.setDisabled=function(e){this.disabled=e,this.disabled?(this.adapter.addClass(E5.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass(E5.DISABLED),this.leadingIcon&&this.leadingIcon.setDisabled(this.disabled),this.disabled?this.adapter.removeSelectAnchorAttr("tabindex"):this.adapter.setSelectAnchorAttr("tabindex","0"),this.adapter.setSelectAnchorAttr("aria-disabled",this.disabled.toString())},t.prototype.openMenu=function(){this.adapter.addClass(E5.ACTIVATED),this.adapter.openMenu(),this.isMenuOpen=!0,this.adapter.setSelectAnchorAttr("aria-expanded","true")},t.prototype.setHelperTextContent=function(e){this.helperText&&this.helperText.setContent(e)},t.prototype.layout=function(){if(this.adapter.hasLabel()){var e=this.getValue().length>0,t=this.adapter.hasClass(E5.FOCUSED),n=e||t,i=this.adapter.hasClass(E5.REQUIRED);this.notchOutline(n),this.adapter.floatLabel(n),this.adapter.setLabelRequired(i)}},t.prototype.layoutOptions=function(){var e=this.adapter.getMenuItemValues().indexOf(this.getValue());this.setSelectedIndex(e,!1,!0)},t.prototype.handleMenuOpened=function(){if(0!==this.adapter.getMenuItemValues().length){var e=this.getSelectedIndex();this.adapter.focusMenuItemAtIndex(e>=0?e:0)}},t.prototype.handleMenuClosed=function(){this.adapter.removeClass(E5.ACTIVATED),this.isMenuOpen=!1,this.adapter.setSelectAnchorAttr("aria-expanded","false"),this.adapter.isSelectAnchorFocused()||this.blur()},t.prototype.handleChange=function(){this.layout(),this.adapter.notifyChange(this.getValue()),this.adapter.hasClass(E5.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},t.prototype.handleMenuItemAction=function(e){this.setSelectedIndex(e,!0)},t.prototype.handleFocus=function(){this.adapter.addClass(E5.FOCUSED),this.layout(),this.adapter.activateBottomLine()},t.prototype.handleBlur=function(){this.isMenuOpen||this.blur()},t.prototype.handleClick=function(e){if(!this.disabled&&!this.recentlyClicked){if(this.setClickDebounceTimeout(),this.isMenuOpen)return void this.adapter.closeMenu();this.adapter.setRippleCenter(e),this.openMenu()}},t.prototype.handleKeydown=function(e){if(!this.isMenuOpen&&this.adapter.hasClass(E5.FOCUSED)){var t=Ez(e)===EY.ENTER,n=Ez(e)===EY.SPACEBAR,i=Ez(e)===EY.ARROW_UP,o=Ez(e)===EY.ARROW_DOWN;if(!n&&e.key&&1===e.key.length||n&&this.adapter.isTypeaheadInProgress()){var r=n?" ":e.key,a=this.adapter.typeaheadMatchItem(r,this.getSelectedIndex());a>=0&&this.setSelectedIndex(a),e.preventDefault();return}(t||n||i||o)&&(i&&this.getSelectedIndex()>0?this.setSelectedIndex(this.getSelectedIndex()-1):o&&this.getSelectedIndex()<this.adapter.getMenuItemCount()-1&&this.setSelectedIndex(this.getSelectedIndex()+1),this.openMenu(),e.preventDefault())}},t.prototype.notchOutline=function(e){if(this.adapter.hasOutline()){var t=this.adapter.hasClass(E5.FOCUSED);if(e){var n=E4.LABEL_SCALE,i=this.adapter.getLabelWidth()*n;this.adapter.notchOutline(i)}else t||this.adapter.closeOutline()}},t.prototype.setLeadingIconAriaLabel=function(e){this.leadingIcon&&this.leadingIcon.setAriaLabel(e)},t.prototype.setLeadingIconContent=function(e){this.leadingIcon&&this.leadingIcon.setContent(e)},t.prototype.setUseDefaultValidation=function(e){this.useDefaultValidation=e},t.prototype.setValid=function(e){this.useDefaultValidation||(this.customValidity=e),this.adapter.setSelectAnchorAttr("aria-invalid",(!e).toString()),e?(this.adapter.removeClass(E5.INVALID),this.adapter.removeMenuClass(E5.MENU_INVALID)):(this.adapter.addClass(E5.INVALID),this.adapter.addMenuClass(E5.MENU_INVALID)),this.syncHelperTextValidity(e)},t.prototype.isValid=function(){return this.useDefaultValidation&&this.adapter.hasClass(E5.REQUIRED)&&!this.adapter.hasClass(E5.DISABLED)?this.getSelectedIndex()!==E4.UNSET_INDEX&&(0!==this.getSelectedIndex()||!!this.getValue()):this.customValidity},t.prototype.setRequired=function(e){e?this.adapter.addClass(E5.REQUIRED):this.adapter.removeClass(E5.REQUIRED),this.adapter.setSelectAnchorAttr("aria-required",e.toString()),this.adapter.setLabelRequired(e)},t.prototype.getRequired=function(){return"true"===this.adapter.getSelectAnchorAttr("aria-required")},t.prototype.init=function(){var e=this.adapter.getAnchorElement();e&&(this.adapter.setMenuAnchorElement(e),this.adapter.setMenuAnchorCorner(e9.BOTTOM_START)),this.adapter.setMenuWrapFocus(!1),this.setDisabled(this.adapter.hasClass(E5.DISABLED)),this.syncHelperTextValidity(!this.adapter.hasClass(E5.INVALID)),this.layout(),this.layoutOptions()},t.prototype.blur=function(){this.adapter.removeClass(E5.FOCUSED),this.layout(),this.adapter.deactivateBottomLine(),this.adapter.hasClass(E5.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},t.prototype.syncHelperTextValidity=function(e){if(this.helperText){this.helperText.setValidity(e);var t=this.helperText.isVisible(),n=this.helperText.getId();t&&n?this.adapter.setSelectAnchorAttr(E3.ARIA_DESCRIBEDBY,n):this.adapter.removeSelectAnchorAttr(E3.ARIA_DESCRIBEDBY)}},t.prototype.setClickDebounceTimeout=function(){var e=this;clearTimeout(this.clickDebounceTimeout),this.clickDebounceTimeout=setTimeout(function(){e.recentlyClicked=!1},E4.CLICK_DEBOUNCE_TIMEOUT_MS),this.recentlyClicked=!0},t}(kE),E8={ARIA_HIDDEN:"aria-hidden",ROLE:"role"},E7={HELPER_TEXT_VALIDATION_MSG:"mdc-select-helper-text--validation-msg",HELPER_TEXT_VALIDATION_MSG_PERSISTENT:"mdc-select-helper-text--validation-msg-persistent"},E9=function(e){function t(n){return e.call(this,kx(kx({},t.defaultAdapter),n))||this}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return E7},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return E8},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setAttr:function(){},getAttr:function(){return null},removeAttr:function(){},setContent:function(){}}},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this.adapter.getAttr("id")},t.prototype.isVisible=function(){return"true"!==this.adapter.getAttr(E8.ARIA_HIDDEN)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.setValidation=function(e){e?this.adapter.addClass(E7.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(E7.HELPER_TEXT_VALIDATION_MSG)},t.prototype.setValidationMsgPersistent=function(e){e?this.adapter.addClass(E7.HELPER_TEXT_VALIDATION_MSG_PERSISTENT):this.adapter.removeClass(E7.HELPER_TEXT_VALIDATION_MSG_PERSISTENT)},t.prototype.setValidity=function(e){if(this.adapter.hasClass(E7.HELPER_TEXT_VALIDATION_MSG)){var t=this.adapter.hasClass(E7.HELPER_TEXT_VALIDATION_MSG_PERSISTENT);if(!e||t){this.showToScreenReader(),e?this.adapter.removeAttr(E8.ROLE):this.adapter.setAttr(E8.ROLE,"alert");return}this.adapter.removeAttr(E8.ROLE),this.hide()}},t.prototype.showToScreenReader=function(){this.adapter.removeAttr(E8.ARIA_HIDDEN)},t.prototype.hide=function(){this.adapter.setAttr(E8.ARIA_HIDDEN,"true")},t}(kE),Te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"foundationForSelect",{get:function(){return this.foundation},enumerable:!0,configurable:!0}),t.prototype.getDefaultFoundation=function(){var e=this;return new E9({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){return e.root.setAttribute(t,n)},removeAttr:function(t){return e.root.removeAttribute(t)},setContent:function(t){e.root.textContent=t}})},t}(kT),Tt={ICON_EVENT:"MDCSelect:icon",ICON_ROLE:"button"},Tn=["click","keydown"],Ti=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.savedTabIndex_=null,i.interactionHandler_=function(e){return i.handleInteraction(e)},i}return kF(t,e),Object.defineProperty(t,"strings",{get:function(){return Tt},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this;this.savedTabIndex_=this.adapter.getAttr("tabindex"),Tn.forEach(function(t){e.adapter.registerInteractionHandler(t,e.interactionHandler_)})},t.prototype.destroy=function(){var e=this;Tn.forEach(function(t){e.adapter.deregisterInteractionHandler(t,e.interactionHandler_)})},t.prototype.setDisabled=function(e){this.savedTabIndex_&&(e?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex_),this.adapter.setAttr("role",Tt.ICON_ROLE)))},t.prototype.setAriaLabel=function(e){this.adapter.setAttr("aria-label",e)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.handleInteraction=function(e){var t="Enter"===e.key||13===e.keyCode;("click"===e.type||t)&&this.adapter.notifyIconAction()},t}(kE),To=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"foundationForSelect",{get:function(){return this.foundation},enumerable:!0,configurable:!0}),t.prototype.getDefaultFoundation=function(){var e=this;return new Ti({getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){return e.root.setAttribute(t,n)},removeAttr:function(t){return e.root.removeAttribute(t)},setContent:function(t){e.root.textContent=t},registerInteractionHandler:function(t,n){return e.listen(t,n)},deregisterInteractionHandler:function(t,n){return e.unlisten(t,n)},notifyIconAction:function(){return e.emit(Ti.strings.ICON_EVENT,{},!0)}})},t}(kT),Tr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e,t,n,i,o,r){if(void 0===e&&(e=function(e){return new kL(e)}),void 0===t&&(t=function(e){return new kR(e)}),void 0===n&&(n=function(e){return new kH(e)}),void 0===i&&(i=function(e){return new E2(e)}),void 0===o&&(o=function(e){return new To(e)}),void 0===r&&(r=function(e){return new Te(e)}),this.selectAnchor=this.root.querySelector(E3.SELECT_ANCHOR_SELECTOR),this.selectedText=this.root.querySelector(E3.SELECTED_TEXT_SELECTOR),this.hiddenInput=this.root.querySelector(E3.HIDDEN_INPUT_SELECTOR),!this.selectedText)throw Error("MDCSelect: Missing required element: The following selector must be present: '"+E3.SELECTED_TEXT_SELECTOR+"'");if(this.selectAnchor.hasAttribute(E3.ARIA_CONTROLS)){var a=document.getElementById(this.selectAnchor.getAttribute(E3.ARIA_CONTROLS));a&&(this.helperText=r(a))}this.menuSetup(i);var s=this.root.querySelector(E3.LABEL_SELECTOR);this.label=s?e(s):null;var l=this.root.querySelector(E3.LINE_RIPPLE_SELECTOR);this.lineRipple=l?t(l):null;var c=this.root.querySelector(E3.OUTLINE_SELECTOR);this.outline=c?n(c):null;var d=this.root.querySelector(E3.LEADING_ICON_SELECTOR);d&&(this.leadingIcon=o(d)),this.root.classList.contains(E5.OUTLINED)||(this.ripple=this.createRipple())},t.prototype.initialSyncWithDOM=function(){var e=this;if(this.handleFocus=function(){e.foundation.handleFocus()},this.handleBlur=function(){e.foundation.handleBlur()},this.handleClick=function(t){e.selectAnchor.focus(),e.foundation.handleClick(e.getNormalizedXCoordinate(t))},this.handleKeydown=function(t){e.foundation.handleKeydown(t)},this.handleMenuItemAction=function(t){e.foundation.handleMenuItemAction(t.detail.index)},this.handleMenuOpened=function(){e.foundation.handleMenuOpened()},this.handleMenuClosed=function(){e.foundation.handleMenuClosed()},this.selectAnchor.addEventListener("focus",this.handleFocus),this.selectAnchor.addEventListener("blur",this.handleBlur),this.selectAnchor.addEventListener("click",this.handleClick),this.selectAnchor.addEventListener("keydown",this.handleKeydown),this.menu.listen(ES.CLOSED_EVENT,this.handleMenuClosed),this.menu.listen(ES.OPENED_EVENT,this.handleMenuOpened),this.menu.listen(EQ.SELECTED_EVENT,this.handleMenuItemAction),this.hiddenInput){if(this.hiddenInput.value){this.foundation.setValue(this.hiddenInput.value,!0),this.foundation.layout();return}this.hiddenInput.value=this.value}},t.prototype.destroy=function(){this.selectAnchor.removeEventListener("focus",this.handleFocus),this.selectAnchor.removeEventListener("blur",this.handleBlur),this.selectAnchor.removeEventListener("keydown",this.handleKeydown),this.selectAnchor.removeEventListener("click",this.handleClick),this.menu.unlisten(ES.CLOSED_EVENT,this.handleMenuClosed),this.menu.unlisten(ES.OPENED_EVENT,this.handleMenuOpened),this.menu.unlisten(EQ.SELECTED_EVENT,this.handleMenuItemAction),this.menu.destroy(),this.ripple&&this.ripple.destroy(),this.outline&&this.outline.destroy(),this.leadingIcon&&this.leadingIcon.destroy(),this.helperText&&this.helperText.destroy(),e.prototype.destroy.call(this)},Object.defineProperty(t.prototype,"value",{get:function(){return this.foundation.getValue()},set:function(e){this.foundation.setValue(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this.foundation.getSelectedIndex()},set:function(e){this.foundation.setSelectedIndex(e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.foundation.getDisabled()},set:function(e){this.foundation.setDisabled(e),this.hiddenInput&&(this.hiddenInput.disabled=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"leadingIconAriaLabel",{set:function(e){this.foundation.setLeadingIconAriaLabel(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"leadingIconContent",{set:function(e){this.foundation.setLeadingIconContent(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"helperTextContent",{set:function(e){this.foundation.setHelperTextContent(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"useDefaultValidation",{set:function(e){this.foundation.setUseDefaultValidation(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return this.foundation.isValid()},set:function(e){this.foundation.setValid(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return this.foundation.getRequired()},set:function(e){this.foundation.setRequired(e)},enumerable:!0,configurable:!0}),t.prototype.layout=function(){this.foundation.layout()},t.prototype.layoutOptions=function(){this.foundation.layoutOptions(),this.menu.layout(),this.menuItemValues=this.menu.items.map(function(e){return e.getAttribute(E3.VALUE_ATTR)||""}),this.hiddenInput&&(this.hiddenInput.value=this.value)},t.prototype.getDefaultFoundation=function(){return new E6(kx(kx(kx(kx({},this.getSelectAdapterMethods()),this.getCommonAdapterMethods()),this.getOutlineAdapterMethods()),this.getLabelAdapterMethods()),this.getFoundationMap())},t.prototype.menuSetup=function(e){this.menuElement=this.root.querySelector(E3.MENU_SELECTOR),this.menu=e(this.menuElement),this.menu.hasTypeahead=!0,this.menu.singleSelection=!0,this.menuItemValues=this.menu.items.map(function(e){return e.getAttribute(E3.VALUE_ATTR)||""})},t.prototype.createRipple=function(){var e=this,t=kx(kx({},kq.createAdapter({root:this.selectAnchor})),{registerInteractionHandler:function(t,n){e.selectAnchor.addEventListener(t,n)},deregisterInteractionHandler:function(t,n){e.selectAnchor.removeEventListener(t,n)}});return new kq(this.selectAnchor,new k$(t))},t.prototype.getSelectAdapterMethods=function(){var e=this;return{getMenuItemAttr:function(e,t){return e.getAttribute(t)},setSelectedText:function(t){e.selectedText.textContent=t},isSelectAnchorFocused:function(){return document.activeElement===e.selectAnchor},getSelectAnchorAttr:function(t){return e.selectAnchor.getAttribute(t)},setSelectAnchorAttr:function(t,n){e.selectAnchor.setAttribute(t,n)},removeSelectAnchorAttr:function(t){e.selectAnchor.removeAttribute(t)},addMenuClass:function(t){e.menuElement.classList.add(t)},removeMenuClass:function(t){e.menuElement.classList.remove(t)},openMenu:function(){e.menu.open=!0},closeMenu:function(){e.menu.open=!1},getAnchorElement:function(){return e.root.querySelector(E3.SELECT_ANCHOR_SELECTOR)},setMenuAnchorElement:function(t){e.menu.setAnchorElement(t)},setMenuAnchorCorner:function(t){e.menu.setAnchorCorner(t)},setMenuWrapFocus:function(t){e.menu.wrapFocus=t},getSelectedIndex:function(){var t=e.menu.selectedIndex;return t instanceof Array?t[0]:t},setSelectedIndex:function(t){e.menu.selectedIndex=t},focusMenuItemAtIndex:function(t){e.menu.items[t].focus()},getMenuItemCount:function(){return e.menu.items.length},getMenuItemValues:function(){return e.menuItemValues},getMenuItemTextAtIndex:function(t){return e.menu.getPrimaryTextAtIndex(t)},isTypeaheadInProgress:function(){return e.menu.typeaheadInProgress},typeaheadMatchItem:function(t,n){return e.menu.typeaheadMatchItem(t,n)}}},t.prototype.getCommonAdapterMethods=function(){var e=this;return{addClass:function(t){e.root.classList.add(t)},removeClass:function(t){e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},setRippleCenter:function(t){e.lineRipple&&e.lineRipple.setRippleCenter(t)},activateBottomLine:function(){e.lineRipple&&e.lineRipple.activate()},deactivateBottomLine:function(){e.lineRipple&&e.lineRipple.deactivate()},notifyChange:function(t){var n=e.selectedIndex;e.emit(E3.CHANGE_EVENT,{value:t,index:n},!0),e.hiddenInput&&(e.hiddenInput.value=t)}}},t.prototype.getOutlineAdapterMethods=function(){var e=this;return{hasOutline:function(){return!!e.outline},notchOutline:function(t){e.outline&&e.outline.notch(t)},closeOutline:function(){e.outline&&e.outline.closeNotch()}}},t.prototype.getLabelAdapterMethods=function(){var e=this;return{hasLabel:function(){return!!e.label},floatLabel:function(t){e.label&&e.label.float(t)},getLabelWidth:function(){return e.label?e.label.getWidth():0},setLabelRequired:function(t){e.label&&e.label.setRequired(t)}}},t.prototype.getNormalizedXCoordinate=function(e){var t=e.target.getBoundingClientRect();return(this.isTouchEvent(e)?e.touches[0].clientX:e.clientX)-t.left},t.prototype.isTouchEvent=function(e){return!!e.touches},t.prototype.getFoundationMap=function(){return{helperText:this.helperText?this.helperText.foundationForSelect:void 0,leadingIcon:this.leadingIcon?this.leadingIcon.foundationForSelect:void 0}},t}(kT),Ta={ROOT:"mdc-form-field"},Ts={LABEL_SELECTOR:".mdc-form-field > label"},Tl=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.click=function(){i.handleClick()},i}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Ta},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Ts},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.adapter.registerInteractionHandler("click",this.click)},t.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("click",this.click)},t.prototype.handleClick=function(){var e=this;this.adapter.activateInputRipple(),requestAnimationFrame(function(){e.adapter.deactivateInputRipple()})},t}(kE),Tc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},t.prototype.labelEl=function(){var e=Tl.strings.LABEL_SELECTOR;return this.root.querySelector(e)},t.prototype.getDefaultFoundation=function(){var e=this;return new Tl({activateInputRipple:function(){e.input&&e.input.ripple&&e.input.ripple.activate()},deactivateInputRipple:function(){e.input&&e.input.ripple&&e.input.ripple.deactivate()},deregisterInteractionHandler:function(t,n){var i=e.labelEl();i&&i.removeEventListener(t,n)},registerInteractionHandler:function(t,n){var i=e.labelEl();i&&i.addEventListener(t,n)}})},t}(kT),Td={ICON_BUTTON_ON:"mdc-icon-button--on",ROOT:"mdc-icon-button"},Tu={ARIA_LABEL:"aria-label",ARIA_PRESSED:"aria-pressed",DATA_ARIA_LABEL_OFF:"data-aria-label-off",DATA_ARIA_LABEL_ON:"data-aria-label-on",CHANGE_EVENT:"MDCIconButtonToggle:change"},Tm=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.hasToggledAriaLabel=!1,i}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Td},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Tu},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},hasClass:function(){return!1},notifyChange:function(){},removeClass:function(){},getAttr:function(){return null},setAttr:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this.adapter.getAttr(Tu.DATA_ARIA_LABEL_ON),t=this.adapter.getAttr(Tu.DATA_ARIA_LABEL_OFF);if(e&&t){if(null!==this.adapter.getAttr(Tu.ARIA_PRESSED))throw Error("MDCIconButtonToggleFoundation: Button should not set `aria-pressed` if it has a toggled aria label.");this.hasToggledAriaLabel=!0}else this.adapter.setAttr(Tu.ARIA_PRESSED,String(this.isOn()))},t.prototype.handleClick=function(){this.toggle(),this.adapter.notifyChange({isOn:this.isOn()})},t.prototype.isOn=function(){return this.adapter.hasClass(Td.ICON_BUTTON_ON)},t.prototype.toggle=function(e){if(void 0===e&&(e=!this.isOn()),e?this.adapter.addClass(Td.ICON_BUTTON_ON):this.adapter.removeClass(Td.ICON_BUTTON_ON),this.hasToggledAriaLabel){var t=e?this.adapter.getAttr(Tu.DATA_ARIA_LABEL_ON):this.adapter.getAttr(Tu.DATA_ARIA_LABEL_OFF);this.adapter.setAttr(Tu.ARIA_LABEL,t||"")}else this.adapter.setAttr(Tu.ARIA_PRESSED,""+e)},t}(kE),Tf=Tm.strings,Tp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rippleComponent=t.createRipple(),t}return kF(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){var e=this;this.handleClick=function(){e.foundation.handleClick()},this.listen("click",this.handleClick)},t.prototype.destroy=function(){this.unlisten("click",this.handleClick),this.ripple.destroy(),e.prototype.destroy.call(this)},t.prototype.getDefaultFoundation=function(){var e=this;return new Tm({addClass:function(t){return e.root.classList.add(t)},hasClass:function(t){return e.root.classList.contains(t)},notifyChange:function(t){e.emit(Tf.CHANGE_EVENT,t)},removeClass:function(t){return e.root.classList.remove(t)},getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){return e.root.setAttribute(t,n)}})},Object.defineProperty(t.prototype,"ripple",{get:function(){return this.rippleComponent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"on",{get:function(){return this.foundation.isOn()},set:function(e){this.foundation.toggle(e)},enumerable:!0,configurable:!0}),t.prototype.createRipple=function(){var e=new kq(this.root);return e.unbounded=!0,e},t}(kT);let Th="important",Tb=" !"+Th,Tg=oz(class extends oj{constructor(e){if(super(e),e.type!==oH.ATTRIBUTE||"style"!==e.name||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,n)=>{let i=e[n];return null==i?t:t+`${n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(e,[t]){let{style:n}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(let e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?n.removeProperty(e):n[e]=null);for(let e in t){let i=t[e];if(null!=i){this.ft.add(e);let t="string"==typeof i&&i.endsWith(Tb);e.includes("-")||t?n.setProperty(e,t?i.slice(0,-11):i,t?Th:""):n[e]=i}}return tJ}});var T_=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let Ty=n(3041),Tv=n(1526);class TF extends CustomEvent{constructor(e){super(TF.NAME,{detail:e,bubbles:!0,composed:!0})}}function Tx(e,t,n,i,o){switch(i=i||"listbox",e){case tn.RADIO:i="radiogroup";break;case tn.MULTI_CHECKBOX:i="group"}return tK`
|
|
60
|
+
`:tK``},onAdd:void 0})))}getConsoleAppConfig(){return o4(this,void 0,void 0,function*(){var e;try{let t=yield fetch((null!=(e=o7.managerUrl)?e:"")+"/consoleappconfig/"+o7.displayRealm+".json");return this._consoleAppConfig=yield t.json(),!0}catch(e){return!0}})}getConsolePreferredLanguage(){return o4(this,arguments,void 0,function*(e=this.console){return e.retrieveData("LANGUAGE")})}getUserPreferredLanguage(){return o4(this,arguments,void 0,function*(e=this._keycloak){if(e&&e.authenticated){let t=(null==e?void 0:e.profile)||(yield null==e?void 0:e.loadUserProfile());if(null==t?void 0:t.attributes){let e=new Map(Object.entries(t.attributes));if(e.has("locale")){let t=e.get("locale");if("string"==typeof t[0])return t[0]}console.warn("Could not get user language from keycloak: no user attributes were found.")}else console.warn("Could not get user language from keycloak: no valid keycloak user profile was found.")}})}updateKeycloakUserLanguage(e){return o4(this,arguments,void 0,function*(e,t=this.rest){return this.authenticated?t?void(yield t.api.UserResource.updateCurrentUserLocale(e,{headers:{"Content-Type":"application/json"}})):void console.warn("Tried updating user language, but the REST API is not initialized yet."):void console.warn("Tried updating user language, but the user is not authenticated.")})}logout(e){this._authenticated&&(this._authenticated=!0,this._keycloak?(this.isMobile()&&this.console.storeData("REFRESH_TOKEN",null),this._keycloakUpdateTokenInterval&&(window.clearTimeout(this._keycloakUpdateTokenInterval),this._keycloakUpdateTokenInterval=void 0),this._keycloak.logout(e&&""!==e?{redirectUri:e}:void 0)):this._basicIdentity&&(this._basicIdentity=void 0,e?window.location.href=e:window.location.reload()))}login(e){switch(this._config.auth){case"BASIC":e&&e.credentials&&(this._config.credentials=Object.assign({},e.credentials)),this.doBasicLogin();break;case"KEYCLOAK":if(this._keycloak){let t={};e&&e.redirectUrl&&""!==e.redirectUrl&&(t.redirectUri=e.redirectUrl),(null==e?void 0:e.action)&&""!==e.action&&(t.action=e.action),this.isMobile()&&(t.scope="offline_access"),this._keycloak.login(t)}}}initialiseBasicAuth(){return o4(this,void 0,void 0,function*(){return this.config.basicLoginProvider?(this.config.autoLogin&&(this._readyCallback=()=>this.doBasicLogin()),!0):(console.debug("No basicLoginProvider defined on config so cannot display login UI"),!1)})}doBasicLogin(){return o4(this,void 0,void 0,function*(){var e,t,n,i;if(!this.config.basicLoginProvider)return;let o={username:(null==(e=this.config.credentials)?void 0:e.username)?null==(t=this.config.credentials)?void 0:t.username:"",password:(null==(n=this.config.credentials)?void 0:n.password)?null==(i=this.config.credentials)?void 0:i.password:"",cancel:!1},r=!1;for(this._basicIdentity={roles:void 0,token:void 0,user:void 0};!r;){if((o=yield this.config.basicLoginProvider(o.username,o.password)).cancel){console.debug("Basic authentication cancelled by user");break}if(!o.username||!o.password)continue;this._basicIdentity.token=btoa(o.username+":"+o.password);let e=!1;try{let t=yield ob.api.UserResource.getCurrent();200===t.status&&(e=!0,this._basicIdentity.user=t.data),e||401!==t.status&&403!==t.status||console.debug("Basic authentication invalid credentials, trying again")}catch(e){console.error("Basic auth failed: ",e)}if(e){console.debug("Basic authentication successful"),r=!0;let e=yield ob.api.UserResource.getCurrentUserClientRoles(this.clientId);this._basicIdentity.roles=e.data}else{console.debug("Unknown response so aborting"),this._basicIdentity=void 0;break}}r&&this._onAuthenticated()})}isSuperUser(){return!!(this.getRealm()&&"master"===this.getRealm()&&this.hasRealmRole("admin"))}isRestrictedUser(){return!!this.hasRealmRole("restricted_user")}getApiBaseUrl(){return this._config.managerUrl+"/api/"+this._config.realm+"/"}getAppName(){let e=location.pathname.split("/");return e.length>=1?e[1]:""}hasRealmRole(e){return this.isKeycloak()&&this._keycloak.hasRealmRole(e)}hasRole(e,t=this._config.clientId){let n=this.roles;return n&&n.has(t)&&n.get(t).indexOf(e)>=0}getAuthorizationHeader(){return this.getKeycloakToken()?"Bearer "+this.getKeycloakToken():this.getBasicToken()?"Basic "+this.getBasicToken():void 0}getKeycloakToken(){if(this.isKeycloak())return this._keycloak.token}getBasicToken(){return this._basicIdentity?this._basicIdentity.token:void 0}getRealm(){if(this._config)return this._config.realm}isMobile(){return this.console&&this.console.isMobile}isKeycloak(){return!!this._keycloak}_onAuthenticated(){this._authenticated=!0}loadAndInitialiseKeycloak(){return o4(this,void 0,void 0,function*(){var e,t,n,i;try{this._keycloak=new o1({clientId:this._config.clientId,realm:this._config.realm,url:this._config.keycloakUrl});let o=yield this._getNativeOfflineRefreshToken(),r=yield this._keycloak.init({checkLoginIframe:!1,onLoad:"check-sso"});if(!r&&o)try{console.error("SETTING OFFLINE TOKEN"),this._keycloak.refreshToken=o,r=yield this._updateKeycloakAccessToken()}catch(e){console.error("Failed to authenticate using offline token")}if(r)this._name=null==(e=this._keycloak.tokenParsed)?void 0:e.name,this._username=null==(t=this._keycloak.tokenParsed)?void 0:t.preferred_username,this._createTokenUpdateInterval(),this.isMobile()&&(null==(i=null==(n=this._keycloak)?void 0:n.refreshTokenParsed)?void 0:i.typ)==="Offline"&&(console.debug("Storing offline refresh token"),this.console.storeData("REFRESH_TOKEN",this._keycloak.refreshToken)),this._onAuthenticated();else if(this.config.autoLogin)return this.login(),!1;return!0}catch(e){return this._authenticated=!1,this._setError(eg.AUTH_FAILED),console.error("Failed to initialise Keycloak: "+e),!1}})}_createTokenUpdateInterval(){this._keycloakUpdateTokenInterval||(this._keycloakUpdateTokenInterval=window.setInterval(()=>o4(this,void 0,void 0,function*(){yield this._updateKeycloakAccessToken().catch(()=>{console.debug("Keycloak failed to refresh the access token"),this._onDisconnect()})}),1e4))}_updateKeycloakAccessToken(){return o4(this,void 0,void 0,function*(){let e=yield this._keycloak.updateToken(20);return console.debug("Access token update success, refreshed from server: "+e),e&&this._onAuthenticated(),e})}_getNativeOfflineRefreshToken(){return o4(this,void 0,void 0,function*(){if(this.isMobile())return yield this.console.retrieveData("REFRESH_TOKEN")})}_emitEvent(e){window.setTimeout(()=>{for(let t of this._listeners)t(e)},0)}_setError(e){this._error=e,this._emitEvent(e_.ERROR),console.warn("Error set: "+e)}_clearWebHistory(){var e;this.isMobile()&&(null==(e=this.console)||e._doSendGenericMessage("CLEAR_WEB_HISTORY",void 0))}_onDisconnect(){return o4(this,void 0,void 0,function*(){this._disconnected||(console.debug("Disconnected"),this._disconnected=!0,this._keycloakUpdateTokenInterval&&(window.clearTimeout(this._keycloakUpdateTokenInterval),this._keycloakUpdateTokenInterval=void 0),this._emitEvent(e_.OFFLINE),this.reconnect())})}_onReconnected(){console.debug("Reconnected"),this._disconnected=!1,this._createTokenUpdateInterval(),this._emitEvent(e_.ONLINE)}reconnect(){return o4(this,arguments,void 0,function*(e=3e3){if(!this._disconnected)return;this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=void 0);let t=()=>o4(this,void 0,void 0,function*(){var e;if(console.debug("Attempting reconnect"),!(yield this.isKeycloakReachable()))return console.debug("Keycloak is unreachable"),!1;console.debug("Keycloak is reachable"),console.debug("Checking keycloak access token");try{yield this._updateKeycloakAccessToken()}catch(t){let e=yield this._getNativeOfflineRefreshToken();this._keycloak.refreshToken=e;try{yield this._updateKeycloakAccessToken()}catch(e){console.debug("Cannot update access token so sending to login"),this.login();return}return console.debug("Keycloak access token is valid"),!0}let t=this.events&&this.events.status===ef.CONNECTING;return console.debug("If event provider offline then attempting reconnect: offline="+t),!t||(yield null==(e=this.events)?void 0:e.connect())}),n=yield t();if(void 0!==n){if(!n){console.debug("Scheduling another reconnect attempt in (ms): "+(e=Math.min(o8.MAX_RECONNECT_DELAY,e+3e3))),this._reconnectTimer=window.setTimeout(()=>this.reconnect(e),e);return}this._onReconnected()}})}isKeycloakReachable(){return o4(this,arguments,void 0,function*(e=2e3){let t=new AbortController,n=setTimeout(()=>t.abort(),e);try{let e=this._keycloak.endpoints.token(),n=yield fetch(e,{method:"OPTIONS",signal:t.signal});return 200===n.status}catch(e){return!1}finally{clearTimeout(n)}})}}o8.MAX_RECONNECT_DELAY=45e3;let o7=new o8,o9=o7;var re=function(e,t){return(re=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function rt(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}re(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create,Object.create;var rn=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},ri=new function(){this.browser=new rn,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(ri.wxa=!0,ri.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?ri.worker=!0:!ri.hasGlobalWindow||"Deno"in window||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Node.js")>-1?(ri.node=!0,ri.svgSupported=!0):function(e,t){var n=t.browser,i=e.match(/Firefox\/([\d.]+)/),o=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),r=e.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(e);if(i&&(n.firefox=!0,n.version=i[1]),o&&(n.ie=!0,n.version=o[1]),r&&(n.edge=!0,n.version=r[1],n.newEdge=+r[1].split(".")[0]>18),a&&(n.weChat=!0),t.svgSupported="undefined"!=typeof SVGRect,t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported="undefined"!=typeof document){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}(navigator.userAgent,ri);var ro="12px sans-serif",rr=function(e){var t={};if("undefined"==typeof JSON)return t;for(var n=0;n<e.length;n++){var i=String.fromCharCode(n+32),o=(e.charCodeAt(n)-20)/100;t[i]=o}return t}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),ra={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(){var e,t;return function(n,i){if(!e){var o=ra.createCanvas();e=o&&o.getContext("2d")}if(e)return t!==i&&(t=e.font=i||ro),e.measureText(n);n=n||"",i=i||ro;var r=/((?:\d+)?\.?\d*)px/.exec(i),a=r&&+r[1]||12,s=0;if(i.indexOf("mono")>=0)s=a*n.length;else for(var l=0;l<n.length;l++){var c=rr[n[l]];s+=null==c?a:c*a}return{width:s}}}(),loadImage:function(e,t,n){var i=new Image;return i.onload=t,i.onerror=n,i.src=e,i}},rs=rC(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),rl=rC(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),rc=Object.prototype.toString,rd=Array.prototype,ru=rd.forEach,rm=rd.filter,rf=rd.slice,rp=rd.map,rh=(function(){}).constructor,rb=rh?rh.prototype:null,rg="__proto__",r_=2311;function ry(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];"undefined"!=typeof console&&console.error.apply(console,e)}function rv(e){if(null==e||"object"!=typeof e)return e;var t=e,n=rc.call(e);if("[object Array]"===n){if(!e[rJ]){t=[];for(var i=0,o=e.length;i<o;i++)t[i]=rv(e[i])}}else if(rl[n]){if(!e[rJ]){var r=e.constructor;if(r.from)t=r.from(e);else{t=new r(e.length);for(var i=0,o=e.length;i<o;i++)t[i]=e[i]}}}else if(!rs[n]&&!e[rJ]&&!rj(e))for(var a in t={},e)e.hasOwnProperty(a)&&a!==rg&&(t[a]=rv(e[a]));return t}function rF(e,t,n){if(!rB(t)||!rB(e))return n?rv(t):e;for(var i in t)if(t.hasOwnProperty(i)&&i!==rg){var o=e[i],r=t[i];!(rB(r)&&rB(o))||rO(r)||rO(o)||rj(r)||rj(o)||rH(r)||rH(o)||r[rJ]||o[rJ]?!n&&i in e||(e[i]=rv(t[i])):rF(o,r,n)}return e}function rx(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==rg&&(e[n]=t[n]);return e}function rw(e,t,n){for(var i=rS(t),o=0,r=i.length;o<r;o++){var a=i[o];(n?null!=t[a]:null==e[a])&&(e[a]=t[a])}return e}function rk(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n}return -1}function rE(e,t,n){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(t),o=0;o<i.length;o++){var r=i[o];"constructor"!==r&&(n?null!=t[r]:null==e[r])&&(e[r]=t[r])}else rw(e,t,n)}function rT(e){return!!e&&"string"!=typeof e&&"number"==typeof e.length}function rM(e,t,n){if(e&&t)if(e.forEach&&e.forEach===ru)e.forEach(t,n);else if(e.length===+e.length)for(var i=0,o=e.length;i<o;i++)t.call(n,e[i],i,e);else for(var r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function rA(e,t,n){if(!e)return[];if(!t)return r$(e);if(e.map&&e.map===rp)return e.map(t,n);for(var i=[],o=0,r=e.length;o<r;o++)i.push(t.call(n,e[o],o,e));return i}function rC(e,t,n,i){if(e&&t){for(var o=0,r=e.length;o<r;o++)n=t.call(i,n,e[o],o,e);return n}}function rD(e,t,n){if(!e)return[];if(!t)return r$(e);if(e.filter&&e.filter===rm)return e.filter(t,n);for(var i=[],o=0,r=e.length;o<r;o++)t.call(n,e[o],o,e)&&i.push(e[o]);return i}function rS(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}ra.createCanvas;var rL=rb&&rR(rb.bind)?rb.call.bind(rb.bind):function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return function(){return e.apply(t,n.concat(rf.call(arguments)))}};function rI(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(rf.call(arguments)))}}function rO(e){return Array.isArray?Array.isArray(e):"[object Array]"===rc.call(e)}function rR(e){return"function"==typeof e}function rY(e){return"string"==typeof e}function rP(e){return"[object String]"===rc.call(e)}function rN(e){return"number"==typeof e}function rB(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function rH(e){return!!rs[rc.call(e)]}function rz(e){return!!rl[rc.call(e)]}function rj(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}function rU(e){return null!=e.colorStops}function rW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,i=e.length;n<i;n++)if(null!=e[n])return e[n]}function rV(e,t){return null!=e?e:t}function rG(e,t,n){return null!=e?e:null!=t?t:n}function r$(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return rf.apply(e,t)}function rq(e){if("number"==typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e}function rX(e,t){if(!e)throw Error(t)}function rK(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var rJ="__ec_primitive__",rZ=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return rS(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),rQ="function"==typeof Map,r0=function(){function e(t){var n=rO(t);this.data=rQ?new Map:new rZ;var i=this;function o(e,t){n?i.set(e,t):i.set(t,e)}t instanceof e?t.each(o):t&&rM(t,o)}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,i){e.call(t,n,i)})},e.prototype.keys=function(){var e=this.data.keys();return rQ?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function r1(e){return new r0(e)}function r2(e,t){var n;if(Object.create)n=Object.create(e);else{var i=function(){};i.prototype=e,n=new i}return t&&rx(n,t),n}function r5(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function r3(e,t){return e.hasOwnProperty(t)}function r4(){}var r6=180/Math.PI;Number.EPSILON;var r8=function(e,t){return(r8=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function r7(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r8(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function r9(e,t){return null==e&&(e=0),null==t&&(t=0),[e,t]}function ae(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function at(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function an(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}Object.create,Object.create;var ai=function(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])};function ao(e,t,n){var i=t[0],o=t[1];return e[0]=n[0]*i+n[2]*o+n[4],e[1]=n[1]*i+n[3]*o+n[5],e}function ar(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function aa(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var as=function(e,t){this.target=e,this.topTarget=t&&t.topTarget},al=function(){function e(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new as(t,e),"dragstart",e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,i=e.offsetY,o=n-this._x,r=i-this._y;this._x=n,this._y=i,t.drift(o,r,e),this.handler.dispatchToElement(new as(t,e),"drag",e.event);var a=this.handler.findHover(n,i,t).target,s=this._dropTarget;this._dropTarget=a,t!==a&&(s&&a!==s&&this.handler.dispatchToElement(new as(s,e),"dragleave",e.event),a&&a!==s&&this.handler.dispatchToElement(new as(a,e),"dragenter",e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new as(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new as(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},e}(),ac=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,i){this._$handlers||(this._$handlers={});var o=this._$handlers;if("function"==typeof t&&(i=n,n=t,t=null),!n||!e)return this;var r=this._$eventProcessor;null!=t&&r&&r.normalizeQuery&&(t=r.normalizeQuery(t)),o[e]||(o[e]=[]);for(var a=0;a<o[e].length;a++)if(o[e][a].h===n)return this;var s={h:n,query:t,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},l=o[e].length-1,c=o[e][l];return c&&c.callAtLast?o[e].splice(l,0,s):o[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var i=[],o=0,r=n[e].length;o<r;o++)n[e][o].h!==t&&i.push(n[e][o]);n[e]=i}n[e]&&0===n[e].length&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[e],o=this._$eventProcessor;if(i)for(var r=t.length,a=i.length,s=0;s<a;s++){var l=i[s];if(!o||!o.filter||null==l.query||o.filter(e,l.query))switch(r){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,t[0]);break;case 2:l.h.call(l.ctx,t[0],t[1]);break;default:l.h.apply(l.ctx,t)}}return o&&o.afterTrigger&&o.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[e],o=this._$eventProcessor;if(i)for(var r=t.length,a=t[r-1],s=i.length,l=0;l<s;l++){var c=i[l];if(!o||!o.filter||null==c.query||o.filter(e,c.query))switch(r){case 0:c.h.call(a);break;case 1:c.h.call(a,t[0]);break;case 2:c.h.call(a,t[0],t[1]);break;default:c.h.apply(a,t.slice(1,r-1))}}return o&&o.afterTrigger&&o.afterTrigger(e),this},e}(),ad=Math.log(2);function au(e,t,n,i,o,r){var a=i+"-"+o,s=e.length;if(r.hasOwnProperty(a))return r[a];if(1===t){var l=Math.round(Math.log((1<<s)-1&~o)/ad);return e[n][l]}for(var c=i|1<<n,d=n+1;i&1<<d;)d++;for(var u=0,m=0,f=0;m<s;m++){var p=1<<m;!(p&o)&&(u+=(f%2?-1:1)*e[n][m]*au(e,t-1,d,c,o|p,r),f++)}return r[a]=u,u}function am(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],i={},o=au(n,8,0,0,0,i);if(0!==o){for(var r=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==r[s]&&(r[s]=0),r[s]+=((a+s)%2?-1:1)*au(n,7,+(0===a),1<<a,1<<s,i)/o*t[a];return function(e,t,n){var i=t*r[6]+n*r[7]+1;e[0]=(t*r[0]+n*r[1]+r[2])/i,e[1]=(t*r[3]+n*r[4]+r[5])/i}}}var af="___zrEVENTSAVED",ap=[];function ah(e,t,n,i,o){if(t.getBoundingClientRect&&ri.domSupported&&!ab(t)){var r=t[af]||(t[af]={}),a=function(e,t,n){for(var i=n?"invTrans":"trans",o=t[i],r=t.srcCoords,a=[],s=[],l=!0,c=0;c<4;c++){var d=e[c].getBoundingClientRect(),u=2*c,m=d.left,f=d.top;a.push(m,f),l=l&&r&&m===r[u]&&f===r[u+1],s.push(e[c].offsetLeft,e[c].offsetTop)}return l&&o?o:(t.srcCoords=a,t[i]=n?am(s,a):am(a,s))}(function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var i=["left","right"],o=["top","bottom"],r=0;r<4;r++){var a=document.createElement("div"),s=a.style,l=r%2,c=(r>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",o[c]+":0",i[1-l]+":auto",o[1-c]+":auto",""].join("!important;"),e.appendChild(a),n.push(a)}return t.clearMarkers=function(){rM(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}(t,r),r,o);if(a)return a(e,n,i),!0}return!1}function ab(e){return"CANVAS"===e.nodeName.toUpperCase()}var ag=/([&<>"'])/g,a_={"&":"&","<":"<",">":">",'"':""","'":"'"};function ay(e){return null==e?"":(e+"").replace(ag,function(e,t){return a_[t]})}var av=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,aF=[],ax=ri.browser.firefox&&39>+ri.browser.version.split(".")[0];function aw(e,t,n,i){return n=n||{},i?ak(e,t,n):ax&&null!=t.layerX&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):null!=t.offsetX?(n.zrX=t.offsetX,n.zrY=t.offsetY):ak(e,t,n),n}function ak(e,t,n){if(ri.domSupported&&e.getBoundingClientRect){var i=t.clientX,o=t.clientY;if(ab(e)){var r=e.getBoundingClientRect();n.zrX=i-r.left,n.zrY=o-r.top;return}if(ah(aF,e,i,o)){n.zrX=aF[0],n.zrY=aF[1];return}}n.zrX=n.zrY=0}function aE(e){return e||window.event}function aT(e,t,n){if(null!=(t=aE(t)).zrX)return t;var i=t.type;if(i&&i.indexOf("touch")>=0){var o="touchend"!==i?t.targetTouches[0]:t.changedTouches[0];o&&aw(e,o,t,n)}else{aw(e,t,t,n);var r=function(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,i=e.deltaY;return null==n||null==i?t:3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(t);t.zrDelta=r?r/120:-(t.detail||0)/3}var a=t.button;return null==t.which&&void 0!==a&&av.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}var aM=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function aA(e){return 2===e.which||3===e.which}var aC=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var i=e.touches;if(i){for(var o={points:[],touches:[],target:t,event:e},r=0,a=i.length;r<a;r++){var s=i[r],l=aw(n,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},e.prototype._recognize=function(e){for(var t in aS)if(aS.hasOwnProperty(t)){var n=aS[t](this._track,e);if(n)return n}},e}();function aD(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}var aS={pinch:function(e,t){var n=e.length;if(n){var i=(e[n-1]||{}).points,o=(e[n-2]||{}).points||i;if(o&&o.length>1&&i&&i.length>1){var r=aD(i)/aD(o);isFinite(r)||(r=1),t.pinchScale=r;var a=[(i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return t.pinchX=a[0],t.pinchY=a[1],{type:"pinch",target:e[0].target,event:t}}}}};function aL(){return[1,0,0,1,0,0]}function aI(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function aO(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function aR(e,t,n){var i=t[0]*n[0]+t[2]*n[1],o=t[1]*n[0]+t[3]*n[1],r=t[0]*n[2]+t[2]*n[3],a=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=i,e[1]=o,e[2]=r,e[3]=a,e[4]=s,e[5]=l,e}function aY(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function aP(e,t,n,i){void 0===i&&(i=[0,0]);var o=t[0],r=t[2],a=t[4],s=t[1],l=t[3],c=t[5],d=Math.sin(n),u=Math.cos(n);return e[0]=o*u+s*d,e[1]=-o*d+s*u,e[2]=r*u+l*d,e[3]=-r*d+u*l,e[4]=u*(a-i[0])+d*(c-i[1])+i[0],e[5]=u*(c-i[1])-d*(a-i[0])+i[1],e}function aN(e,t){var n=t[0],i=t[2],o=t[4],r=t[1],a=t[3],s=t[5],l=n*a-r*i;return l?(l=1/l,e[0]=a*l,e[1]=-r*l,e[2]=-i*l,e[3]=n*l,e[4]=(i*s-a*o)*l,e[5]=(r*o-n*s)*l,e):null}let aB=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,i){e.x=t.x+n.x*i,e.y=t.y+n.y*i},e.lerp=function(e,t,n,i){var o=1-i;e.x=o*t.x+i*n.x,e.y=o*t.y+i*n.y},e}();var aH=Math.min,az=Math.max,aj=Math.abs,aU=["x","y"],aW=["width","height"],aV=new aB,aG=new aB,a$=new aB,aq=new aB,aX=a5(),aK=aX.minTv,aJ=aX.maxTv,aZ=[0,0],aQ=function(){function e(t,n,i,o){e.set(this,t,n,i,o)}return e.set=function(e,t,n,i,o){return i<0&&(t+=i,i=-i),o<0&&(n+=o,o=-o),e.x=t,e.y=n,e.width=i,e.height=o,e},e.prototype.union=function(e){var t=aH(e.x,this.x),n=aH(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=az(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=az(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t,n,i,o=e.width/this.width,r=e.height/this.height,a=aL();return aY(a,a,[-this.x,-this.y]),n=(t=[o,r])[0],i=t[1],a[0]=a[0]*n,a[1]=a[1]*i,a[2]=a[2]*n,a[3]=a[3]*i,a[4]=a[4]*n,a[5]=a[5]*i,aY(a,a,[e.x,e.y]),a},e.prototype.intersect=function(t,n,i){return e.intersect(this,t,n,i)},e.intersect=function(t,n,i,o){i&&aB.set(i,0,0);var r=o&&o.outIntersectRect||null,a=o&&o.clamp;if(r&&(r.x=r.y=r.width=r.height=NaN),!t||!n)return!1;t instanceof e||(t=e.set(a0,t.x,t.y,t.width,t.height)),n instanceof e||(n=e.set(a1,n.x,n.y,n.width,n.height));var s=!!i;aX.reset(o,s);var l=aX.touchThreshold,c=t.x+l,d=t.x+t.width-l,u=t.y+l,m=t.y+t.height-l,f=n.x+l,p=n.x+n.width-l,h=n.y+l,b=n.y+n.height-l;if(c>d||u>m||f>p||h>b)return!1;var g=!(d<f||p<c||m<h||b<u);return(s||r)&&(aZ[0]=1/0,aZ[1]=0,a2(c,d,f,p,0,s,r,a),a2(u,m,h,b,1,s,r,a),s&&aB.copy(i,g?aX.useDir?aX.dirMinTv:aK:aJ)),g},e.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return 0===this.width||0===this.height},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(t,n,i){if(!i){t!==n&&e.copy(t,n);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var o=i[0],r=i[3],a=i[4],s=i[5];t.x=n.x*o+a,t.y=n.y*r+s,t.width=n.width*o,t.height=n.height*r,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}aV.x=a$.x=n.x,aV.y=aq.y=n.y,aG.x=aq.x=n.x+n.width,aG.y=a$.y=n.y+n.height,aV.transform(i),aq.transform(i),aG.transform(i),a$.transform(i),t.x=aH(aV.x,aG.x,a$.x,aq.x),t.y=aH(aV.y,aG.y,a$.y,aq.y);var l=az(aV.x,aG.x,a$.x,aq.x),c=az(aV.y,aG.y,a$.y,aq.y);t.width=l-t.x,t.height=c-t.y},e}(),a0=new aQ(0,0,0,0),a1=new aQ(0,0,0,0);function a2(e,t,n,i,o,r,a,s){var l=aj(t-n),c=aj(i-e),d=aH(l,c),u=aU[o],m=aU[1-o],f=aW[o];t<n||i<e?l<c?(r&&(aJ[u]=-l),s&&(a[u]=t,a[f]=0)):(r&&(aJ[u]=c),s&&(a[u]=e,a[f]=0)):(a&&(a[u]=az(e,n),a[f]=aH(t,i)-a[u]),r&&(d<aZ[0]||aX.useDir)&&(aZ[0]=aH(d,aZ[0]),(l<c||!aX.bidirectional)&&(aK[u]=l,aK[m]=0,aX.useDir&&aX.calcDirMTV()),(l>=c||!aX.bidirectional)&&(aK[u]=-c,aK[m]=0,aX.useDir&&aX.calcDirMTV())))}function a5(){var e=0,t=new aB,n=new aB,i={minTv:new aB,maxTv:new aB,useDir:!1,dirMinTv:new aB,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(o,r){i.touchThreshold=0,o&&null!=o.touchThreshold&&(i.touchThreshold=az(0,o.touchThreshold)),i.negativeSize=!1,r&&(i.minTv.set(1/0,1/0),i.maxTv.set(0,0),i.useDir=!1,o&&null!=o.direction&&(i.useDir=!0,i.dirMinTv.copy(i.minTv),n.copy(i.minTv),e=o.direction,i.bidirectional=null==o.bidirectional||!!o.bidirectional,i.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var r=i.minTv,a=i.dirMinTv,s=r.y*r.y+r.x*r.x,l=Math.sin(e),c=Math.cos(e),d=l*r.y+c*r.x;if(o(d)){o(r.x)&&o(r.y)&&a.set(0,0);return}if(n.x=s*c/d,n.y=s*l/d,o(n.x)&&o(n.y))return void a.set(0,0);(i.bidirectional||t.dot(n)>0)&&n.len()<a.len()&&a.copy(n)}};function o(e){return 1e-10>aj(e)}return i}let a3=aQ;var a4="silent";function a6(){aM(this.event)}var a8=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return r7(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(ac),a7=function(e,t){this.x=e,this.y=t},a9=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],se=new a3(0,0,0,0),st=function(e){function t(t,n,i,o,r){var a=e.call(this)||this;return a._hovered=new a7(0,0),a.storage=t,a.painter=n,a.painterRoot=o,a._pointerSize=r,i=i||new a8,a.proxy=null,a.setHandlerProxy(i),a._draggingMgr=new al(a),a}return r7(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(rM(a9,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,i=si(this,t,n),o=this._hovered,r=o.target;r&&!r.__zr&&(r=(o=this.findHover(o.x,o.y)).target);var a=this._hovered=i?new a7(t,n):this.findHover(t,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),r&&s!==r&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(a,"mousemove",e),s&&s!==r&&this.dispatchToElement(a,"mouseover",e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new a7(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){var i=(e=e||{}).target;if(!i||!i.silent){for(var o,r="on"+t,a={type:t,event:n,target:(o=e).target,topTarget:o.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:a6};i&&(i[r]&&(a.cancelBubble=!!i[r].call(i,a)),i.trigger(t,a),i=i.__hostTarget?i.__hostTarget:i.parent,!a.cancelBubble););!a.cancelBubble&&(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){"function"==typeof e[r]&&e[r].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var i=this.storage.getDisplayList(),o=new a7(e,t);if(sn(i,o,e,t,n),this._pointerSize&&!o.target){for(var r=[],a=this._pointerSize,s=a/2,l=new a3(e-s,t-s,a,a),c=i.length-1;c>=0;c--){var d=i[c];d===n||d.ignore||d.ignoreCoarsePointer||d.parent&&d.parent.ignoreCoarsePointer||(se.copy(d.getBoundingRect()),d.transform&&se.applyTransform(d.transform),se.intersect(l)&&r.push(d))}if(r.length){for(var u=Math.PI/12,m=2*Math.PI,f=0;f<s;f+=4)for(var p=0;p<m;p+=u)if(sn(r,o,e+f*Math.cos(p),t+f*Math.sin(p),n),o.target)return o}}return o},t.prototype.processGesture=function(e,t){this._gestureMgr||(this._gestureMgr=new aC);var n=this._gestureMgr;"start"===t&&n.clear();var i=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),i){var o=i.type;e.gestureEvent=o;var r=new a7;r.target=i.target,this.dispatchToElement(r,o,i.event)}},t}(ac);function sn(e,t,n,i,o){for(var r=e.length-1;r>=0;r--){var a=e[r],s=void 0;if(a!==o&&!a.ignore&&(s=function(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var i=e,o=void 0,r=!1;i;){if(i.ignoreClip&&(r=!0),!r){var a=i.getClipPath();if(a&&!a.contain(t,n))return!1}i.silent&&(o=!0);var s=i.__hostTarget;i=s?i.ignoreHostSilent?null:s:i.parent}return!o||a4}return!1}(a,n,i))&&(t.topTarget||(t.topTarget=a),s!==a4)){t.target=a;break}}}function si(e,t,n){var i=e.painter;return t<0||t>i.getWidth()||n<0||n>i.getHeight()}function so(e,t,n,i){var o=t+1;if(o===n)return 1;if(0>i(e[o++],e[t])){for(;o<n&&0>i(e[o],e[o-1]);)o++;var r=e,a=t,s=o;for(s--;a<s;){var l=r[a];r[a++]=r[s],r[s--]=l}}else for(;o<n&&i(e[o],e[o-1])>=0;)o++;return o-t}function sr(e,t,n,i,o){for(i===t&&i++;i<n;i++){for(var r,a=e[i],s=t,l=i;s<l;)0>o(a,e[r=s+l>>>1])?l=r:s=r+1;var c=i-s;switch(c){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;c>0;)e[s+c]=e[s+c-1],c--}e[s]=a}}function sa(e,t,n,i,o,r){var a=0,s=0,l=1;if(r(e,t[n+o])>0){for(s=i-o;l<s&&r(e,t[n+o+l])>0;)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s),a+=o,l+=o}else{for(s=o+1;l<s&&0>=r(e,t[n+o-l]);)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s);var c=a;a=o-l,l=o-c}for(a++;a<l;){var d=a+(l-a>>>1);r(e,t[n+d])>0?a=d+1:l=d}return l}function ss(e,t,n,i,o,r){var a=0,s=0,l=1;if(0>r(e,t[n+o])){for(s=o+1;l<s&&0>r(e,t[n+o-l]);)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s);var c=a;a=o-l,l=o-c}else{for(s=i-o;l<s&&r(e,t[n+o+l])>=0;)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s),a+=o,l+=o}for(a++;a<l;){var d=a+(l-a>>>1);0>r(e,t[n+d])?l=d:a=d+1}return l}function sl(e,t,n,i){n||(n=0),i||(i=e.length);var o=i-n;if(!(o<2)){var r=0;if(o<32){r=so(e,n,i,t),sr(e,n,i,n+r,t);return}var a=function(e,t){var n,i,o=7,r=0,a=[];function s(s){var l=n[s],c=i[s],d=n[s+1],u=i[s+1];i[s]=c+u,s===r-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),r--;var m=ss(e[d],e,l,c,0,t);l+=m,0!=(c-=m)&&0!==(u=sa(e[l+c-1],e,d,u,u-1,t))&&(c<=u?function(n,i,r,s){var l,c,d,u=0;for(u=0;u<i;u++)a[u]=e[n+u];var m=0,f=r,p=n;if(e[p++]=e[f++],0==--s){for(u=0;u<i;u++)e[p+u]=a[m+u];return}if(1===i){for(u=0;u<s;u++)e[p+u]=e[f+u];e[p+s]=a[m];return}for(var h=o;;){l=0,c=0,d=!1;do if(0>t(e[f],a[m])){if(e[p++]=e[f++],c++,l=0,0==--s){d=!0;break}}else if(e[p++]=a[m++],l++,c=0,1==--i){d=!0;break}while((l|c)<h);if(d)break;do{if(0!==(l=ss(e[f],a,m,i,0,t))){for(u=0;u<l;u++)e[p+u]=a[m+u];if(p+=l,m+=l,(i-=l)<=1){d=!0;break}}if(e[p++]=e[f++],0==--s){d=!0;break}if(0!==(c=sa(a[m],e,f,s,0,t))){for(u=0;u<c;u++)e[p+u]=e[f+u];if(p+=c,f+=c,0==(s-=c)){d=!0;break}}if(e[p++]=a[m++],1==--i){d=!0;break}h--}while(l>=7||c>=7);if(d)break;h<0&&(h=0),h+=2}if((o=h)<1&&(o=1),1===i){for(u=0;u<s;u++)e[p+u]=e[f+u];e[p+s]=a[m]}else if(0===i)throw Error();else for(u=0;u<i;u++)e[p+u]=a[m+u]}(l,c,d,u):function(n,i,r,s){var l=0;for(l=0;l<s;l++)a[l]=e[r+l];var c=n+i-1,d=s-1,u=r+s-1,m=0,f=0;if(e[u--]=e[c--],0==--i){for(l=0,m=u-(s-1);l<s;l++)e[m+l]=a[l];return}if(1===s){for(u-=i,c-=i,f=u+1,m=c+1,l=i-1;l>=0;l--)e[f+l]=e[m+l];e[u]=a[d];return}for(var p=o;;){var h=0,b=0,g=!1;do if(0>t(a[d],e[c])){if(e[u--]=e[c--],h++,b=0,0==--i){g=!0;break}}else if(e[u--]=a[d--],b++,h=0,1==--s){g=!0;break}while((h|b)<p);if(g)break;do{if(0!=(h=i-ss(a[d],e,n,i,i-1,t))){for(u-=h,c-=h,i-=h,f=u+1,m=c+1,l=h-1;l>=0;l--)e[f+l]=e[m+l];if(0===i){g=!0;break}}if(e[u--]=a[d--],1==--s){g=!0;break}if(0!=(b=s-sa(e[c],a,0,s,s-1,t))){for(u-=b,d-=b,s-=b,f=u+1,m=d+1,l=0;l<b;l++)e[f+l]=a[m+l];if(s<=1){g=!0;break}}if(e[u--]=e[c--],0==--i){g=!0;break}p--}while(h>=7||b>=7);if(g)break;p<0&&(p=0),p+=2}if((o=p)<1&&(o=1),1===s){for(u-=i,c-=i,f=u+1,m=c+1,l=i-1;l>=0;l--)e[f+l]=e[m+l];e[u]=a[d]}else if(0===s)throw Error();else for(l=0,m=u-(s-1);l<s;l++)e[m+l]=a[l]}(l,c,d,u))}return n=[],i=[],{mergeRuns:function(){for(;r>1;){var e=r-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;s(e)}},forceMergeRuns:function(){for(;r>1;){var e=r-2;e>0&&i[e-1]<i[e+1]&&e--,s(e)}},pushRun:function(e,t){n[r]=e,i[r]=t,r+=1}}}(e,t),s=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(o);do{if((r=so(e,n,i,t))<s){var l=o;l>s&&(l=s),sr(e,n,n+l,n+r,t),r=l}a.pushRun(n,r),a.mergeRuns(),o-=r,n+=r}while(0!==o);a.forceMergeRuns()}}rM(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){st.prototype[e]=function(t){var n,i,o=t.zrX,r=t.zrY,a=si(this,o,r);if("mouseup"===e&&a||(i=(n=this.findHover(o,r)).target),"mousedown"===e)this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if("mouseup"===e)this._upEl=i;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||an(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}});var sc=!1;function sd(){sc||(sc=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function su(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var sm=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=su}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,i=0,o=t.length;i<o;i++)this._updateAndAddDisplayable(t[i],null,e);n.length=this._displayListLen,sl(n,su)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.update(),e.afterUpdate();var i=e.getClipPath(),o=t&&t.length,r=0,a=e.__clipPaths;if(!e.ignoreClip&&(o||i)){if(a||(a=e.__clipPaths=[]),o)for(var s=0;s<t.length;s++)a[r++]=t[s];for(var l=i,c=e;l;)l.parent=c,l.updateTransform(),a[r++]=l,c=l,l=l.getClipPath()}if(a&&(a.length=r),e.childrenRef){for(var d=e.childrenRef(),u=0;u<d.length;u++){var m=d[u];e.__dirty&&(m.__dirty|=1),this._updateAndAddDisplayable(m,a,n)}e.__dirty=0}else isNaN(e.z)&&(sd(),e.z=0),isNaN(e.z2)&&(sd(),e.z2=0),isNaN(e.zlevel)&&(sd(),e.zlevel=0),this._displayList[this._displayListLen++]=e;var f=e.getDecalElement&&e.getDecalElement();f&&this._updateAndAddDisplayable(f,a,n);var p=e.getTextGuideLine();p&&this._updateAndAddDisplayable(p,a,n);var h=e.getTextContent();h&&this._updateAndAddDisplayable(h,a,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var i=rk(this._roots,e);i>=0&&this._roots.splice(i,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}();ey=ri.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var sf={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(e-=1))*Math.sin(2*Math.PI*(e-t)/.4)))},elasticOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin(2*Math.PI*(e-t)/.4)+1)},elasticInOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),(e*=2)<1)?-.5*(n*Math.pow(2,10*(e-=1))*Math.sin(2*Math.PI*(e-t)/.4)):n*Math.pow(2,-10*(e-=1))*Math.sin(2*Math.PI*(e-t)/.4)*.5+1},backIn:function(e){return e*e*(2.70158*e-1.70158)},backOut:function(e){return--e*e*(2.70158*e+1.70158)+1},backInOut:function(e){return(e*=2)<1?e*e*(3.5949095*e-2.5949095)*.5:.5*((e-=2)*e*(3.5949095*e+2.5949095)+2)},bounceIn:function(e){return 1-sf.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*sf.bounceIn(2*e):.5*sf.bounceOut(2*e-1)+.5}},sp=Math.pow,sh=Math.sqrt,sb=sh(3),sg=1/3,s_=r9(),sy=r9(),sv=r9();function sF(e){return e>-1e-8&&e<1e-8}function sx(e){return e>1e-8||e<-1e-8}function sw(e,t,n,i,o){var r=1-o;return r*r*(r*e+3*o*t)+o*o*(o*i+3*r*n)}function sk(e,t,n,i,o){var r=1-o;return 3*(((t-e)*r+2*(n-t)*o)*r+(i-n)*o*o)}function sE(e,t,n,i,o,r){var a=i+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),c=e-o,d=s*s-3*a*l,u=s*l-9*a*c,m=l*l-3*s*c,f=0;if(sF(d)&&sF(u))if(sF(s))r[0]=0;else{var p=-l/s;p>=0&&p<=1&&(r[f++]=p)}else{var h=u*u-4*d*m;if(sF(h)){var b=u/d,p=-s/a+b,g=-b/2;p>=0&&p<=1&&(r[f++]=p),g>=0&&g<=1&&(r[f++]=g)}else if(h>0){var _=sh(h),y=d*s+1.5*a*(-u+_),v=d*s+1.5*a*(-u-_),p=(-s-((y=y<0?-sp(-y,sg):sp(y,sg))+(v=v<0?-sp(-v,sg):sp(v,sg))))/(3*a);p>=0&&p<=1&&(r[f++]=p)}else{var F=Math.acos((2*d*s-3*a*u)/(2*sh(d*d*d)))/3,x=sh(d),w=Math.cos(F),p=(-s-2*x*w)/(3*a),g=(-s+x*(w+sb*Math.sin(F)))/(3*a),k=(-s+x*(w-sb*Math.sin(F)))/(3*a);p>=0&&p<=1&&(r[f++]=p),g>=0&&g<=1&&(r[f++]=g),k>=0&&k<=1&&(r[f++]=k)}}return f}function sT(e,t,n,i,o){var r=6*n-12*t+6*e,a=9*t+3*i-3*e-9*n,s=3*t-3*e,l=0;if(sF(a)){if(sx(r)){var c=-s/r;c>=0&&c<=1&&(o[l++]=c)}}else{var d=r*r-4*a*s;if(sF(d))o[0]=-r/(2*a);else if(d>0){var u=sh(d),c=(-r+u)/(2*a),m=(-r-u)/(2*a);c>=0&&c<=1&&(o[l++]=c),m>=0&&m<=1&&(o[l++]=m)}}return l}function sM(e,t,n,i,o,r){var a=(t-e)*o+e,s=(n-t)*o+t,l=(i-n)*o+n,c=(s-a)*o+a,d=(l-s)*o+s,u=(d-c)*o+c;r[0]=e,r[1]=a,r[2]=c,r[3]=u,r[4]=u,r[5]=d,r[6]=l,r[7]=i}function sA(e,t,n,i){var o=1-i;return o*(o*e+2*i*t)+i*i*n}function sC(e,t,n,i){return 2*((1-i)*(t-e)+i*(n-t))}function sD(e,t,n){var i=e+n-2*t;return 0===i?.5:(e-t)/i}function sS(e,t,n,i,o){var r=(t-e)*i+e,a=(n-t)*i+t,s=(a-r)*i+r;o[0]=e,o[1]=r,o[2]=s,o[3]=s,o[4]=a,o[5]=n}var sL=/cubic-bezier\(([0-9,\.e ]+)\)/;function sI(e){var t=e&&sL.exec(e);if(t){var n=t[1].split(","),i=+rK(n[0]),o=+rK(n[1]),r=+rK(n[2]),a=+rK(n[3]);if(isNaN(i+o+r+a))return;var s=[];return function(e){return e<=0?0:e>=1?1:sE(0,i,r,1,e,s)&&sw(0,o,a,1,s[0])}}}var sO=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||r4,this.ondestroy=e.ondestroy||r4,this.onrestart=e.onrestart||r4,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var n=this._life,i=e-this._startTime-this._pausedTime,o=i/n;o<0&&(o=0),o=Math.min(o,1);var r=this.easingFunc,a=r?r(o):o;if(this.onframe(a),1===o)if(!this.loop)return!0;else this._startTime=e-i%n,this._pausedTime=0,this.onrestart();return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=rR(e)?e:sf[e]||sI(e)},e}(),sR=function(e){this.value=e},sY=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new sR(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),sP=function(){function e(e){this._list=new sY,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,i=this._map,o=null;if(null==i[e]){var r=n.len(),a=this._lastRemovedEntry;if(r>=this._maxSize&&r>0){var s=n.head;n.remove(s),delete i[s.key],o=s.value,this._lastRemovedEntry=s}a?a.value=t:a=new sR(t),a.key=e,n.insertEntry(a),i[e]=a}return o},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),sN={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 sB(e){return(e=Math.round(e))<0?0:e>255?255:e}function sH(e){return e<0?0:e>1?1:e}function sz(e){return e.length&&"%"===e.charAt(e.length-1)?sB(parseFloat(e)/100*255):sB(parseInt(e,10))}function sj(e){return e.length&&"%"===e.charAt(e.length-1)?sH(parseFloat(e)/100):sH(parseFloat(e))}function sU(e,t,n){return(n<0?n+=1:n>1&&(n-=1),6*n<1)?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function sW(e,t,n,i,o){return e[0]=t,e[1]=n,e[2]=i,e[3]=o,e}function sV(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var sG=new sP(20),s$=null;function sq(e,t){s$&&sV(s$,t),s$=sG.put(e,s$||t.slice())}function sX(e,t){if(e){t=t||[];var n=sG.get(e);if(n)return sV(t,n);var i=(e+="").replace(/ /g,"").toLowerCase();if(i in sN)return sV(t,sN[i]),sq(e,t),t;var o=i.length;if("#"===i.charAt(0)){if(4===o||5===o){var r=parseInt(i.slice(1,4),16);return r>=0&&r<=4095?(sW(t,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),sq(e,t),t):void sW(t,0,0,0,1)}if(7===o||9===o){var r=parseInt(i.slice(1,7),16);return r>=0&&r<=0xffffff?(sW(t,(0xff0000&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),sq(e,t),t):void sW(t,0,0,0,1)}return}var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var l=i.substr(0,a),c=i.substr(a+1,s-(a+1)).split(","),d=1;switch(l){case"rgba":if(4!==c.length)return 3===c.length?sW(t,+c[0],+c[1],+c[2],1):sW(t,0,0,0,1);d=sj(c.pop());case"rgb":if(c.length>=3)return sW(t,sz(c[0]),sz(c[1]),sz(c[2]),3===c.length?d:sj(c[3])),sq(e,t),t;return void sW(t,0,0,0,1);case"hsla":if(4!==c.length)return void sW(t,0,0,0,1);return c[3]=sj(c[3]),sK(c,t),sq(e,t),t;case"hsl":if(3!==c.length)return void sW(t,0,0,0,1);return sK(c,t),sq(e,t),t;default:return}}sW(t,0,0,0,1)}}function sK(e,t){var n=(parseFloat(e[0])%360+360)%360/360,i=sj(e[1]),o=sj(e[2]),r=o<=.5?o*(i+1):o+i-o*i,a=2*o-r;return sW(t=t||[],sB(255*sU(a,r,n+1/3)),sB(255*sU(a,r,n)),sB(255*sU(a,r,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function sJ(e,t){var n=sX(e);if(n){for(var i=0;i<3;i++)t<0?n[i]=n[i]*(1-t)|0:n[i]=(255-n[i])*t+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return sQ(n,4===n.length?"rgba":"rgb")}}function sZ(e,t,n,i){var o,r=sX(e);if(e)return r=function(e){if(e){var t,n,i=e[0]/255,o=e[1]/255,r=e[2]/255,a=Math.min(i,o,r),s=Math.max(i,o,r),l=s-a,c=(s+a)/2;if(0===l)t=0,n=0;else{n=c<.5?l/(s+a):l/(2-s-a);var d=((s-i)/6+l/2)/l,u=((s-o)/6+l/2)/l,m=((s-r)/6+l/2)/l;i===s?t=m-u:o===s?t=1/3+d-m:r===s&&(t=2/3+u-d),t<0&&(t+=1),t>1&&(t-=1)}var f=[360*t,n,c];return null!=e[3]&&f.push(e[3]),f}}(r),null!=t&&(r[0]=(o=Math.round(o=rR(t)?t(r[0]):t))<0?0:o>360?360:o),null!=n&&(r[1]=sj(rR(n)?n(r[1]):n)),null!=i&&(r[2]=sj(rR(i)?i(r[2]):i)),sQ(sK(r),"rgba")}function sQ(e,t){if(e&&e.length){var n=e[0]+","+e[1]+","+e[2];return("rgba"===t||"hsva"===t||"hsla"===t)&&(n+=","+e[3]),t+"("+n+")"}}function s0(e,t){var n=sX(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var s1=new sP(100);function s2(e){if(rY(e)){var t=s1.get(e);return t||(t=sJ(e,-.1),s1.put(e,t)),t}if(rU(e)){var n=rx({},e);return n.colorStops=rA(e.colorStops,function(e){return{offset:e.offset,color:sJ(e.color,-.1)}}),n}return e}ri.hasGlobalWindow&&rR(window.btoa);var s5=Array.prototype.slice;function s3(e,t,n,i){for(var o,r=t.length,a=0;a<r;a++)e[a]=(o=t[a],(n[a]-o)*i+o);return e}function s4(e,t,n,i){for(var o=t.length,r=0;r<o;r++)e[r]=t[r]+n[r]*i;return e}function s6(e,t,n,i){for(var o=t.length,r=o&&t[0].length,a=0;a<o;a++){e[a]||(e[a]=[]);for(var s=0;s<r;s++)e[a][s]=t[a][s]+n[a][s]*i}return e}function s8(e){if(rT(e)){var t=e.length;if(rT(e[0])){for(var n=[],i=0;i<t;i++)n.push(s5.call(e[i]));return n}return s5.call(e)}return e}function s7(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=null==e[3]?1:e[3],"rgba("+e.join(",")+")"}function s9(e){return 4===e||5===e}function le(e){return 1===e||2===e}var lt=[0,0,0,0],ln=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var i=this.keyframes,o=i.length,r=!1,a=6,s=t;if(rT(t)){var l=rT(t&&t[0])?2:1;a=l,(1!==l||rN(t[0]))&&(2!==l||rN(t[0][0]))||(r=!0)}else if(rN(t)&&t==t)a=0;else if(rY(t))if(isNaN(+t)){var c=sX(t);c&&(s=c,a=3)}else a=0;else if(rU(t)){var d=rx({},s);(d.colorStops=rA(t.colorStops,function(e){return{offset:e.offset,color:sX(e.color)}}),"linear"===t.type)?a=4:"radial"===t.type&&(a=5),s=d}0===o?this.valType=a:(a!==this.valType||6===a)&&(r=!0),this.discrete=this.discrete||r;var u={time:e,value:s,rawValue:t,percent:0};return n&&(u.easing=n,u.easingFunc=rR(n)?n:sf[n]||sI(n)),i.push(u),u},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var i=this.valType,o=n.length,r=n[o-1],a=this.discrete,s=le(i),l=s9(i),c=0;c<o;c++){var d=n[c],u=d.value,m=r.value;d.percent=d.time/e,!a&&(s&&c!==o-1?function(e,t,n){if(e.push&&t.push){var i=e.length,o=t.length;if(i!==o)if(i>o)e.length=o;else for(var r=i;r<o;r++)e.push(1===n?t[r]:s5.call(t[r]));for(var a=e[0]&&e[0].length,r=0;r<e.length;r++)if(1===n)isNaN(e[r])&&(e[r]=t[r]);else for(var s=0;s<a;s++)isNaN(e[r][s])&&(e[r][s]=t[r][s])}}(u,m,i):l&&function(e,t){for(var n=e.length,i=t.length,o=n>i?t:e,r=Math.min(n,i),a=o[r-1]||{color:[0,0,0,0],offset:0},s=r;s<Math.max(n,i);s++)o.push({offset:a.offset,color:a.color.slice()})}(u.colorStops,m.colorStops))}if(!a&&5!==i&&t&&this.needsAnimate()&&t.needsAnimate()&&i===t.valType&&!t._finished){this._additiveTrack=t;for(var f=n[0].value,c=0;c<o;c++)0===i?n[c].additiveValue=n[c].value-f:3===i?n[c].additiveValue=s4([],n[c].value,f,-1):le(i)&&(n[c].additiveValue=1===i?s4([],n[c].value,f,-1):s6([],n[c].value,f,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,i,o,r=null!=this._additiveTrack,a=r?"additiveValue":"value",s=this.valType,l=this.keyframes,c=l.length,d=this.propName,u=3===s,m=this._lastFr,f=Math.min;if(1===c)i=o=l[0];else{if(t<0)n=0;else if(t<this._lastFrP){for(n=f(m+1,c-1);n>=0&&!(l[n].percent<=t);n--);n=f(n,c-2)}else{for(n=m;n<c&&!(l[n].percent>t);n++);n=f(n-1,c-2)}o=l[n+1],i=l[n]}if(i&&o){this._lastFr=n,this._lastFrP=t;var p=o.percent-i.percent,h=0===p?1:f((t-i.percent)/p,1);o.easingFunc&&(h=o.easingFunc(h));var b=r?this._additiveValue:u?lt:e[d];if((le(s)||u)&&!b&&(b=this._additiveValue=[]),this.discrete)e[d]=h<1?i.rawValue:o.rawValue;else if(le(s))1===s?s3(b,i[a],o[a],h):function(e,t,n,i){for(var o=t.length,r=o&&t[0].length,a=0;a<o;a++){e[a]||(e[a]=[]);for(var s,l=0;l<r;l++)e[a][l]=(s=t[a][l],(n[a][l]-s)*i+s)}}(b,i[a],o[a],h);else if(s9(s)){var g,_,y,v,F,x=i[a],w=o[a],k=4===s;(e[d]={type:k?"linear":"radial",x:(g=x.x,(w.x-g)*h+g),y:(_=x.y,(w.y-_)*h+_),colorStops:rA(x.colorStops,function(e,t){var n,i=w.colorStops[t];return{offset:(n=e.offset,(i.offset-n)*h+n),color:s7(s3([],e.color,i.color,h))}}),global:w.global},k)?(e[d].x2=(y=x.x2,(w.x2-y)*h+y),e[d].y2=(v=x.y2,(w.y2-v)*h+v)):e[d].r=(F=x.r,(w.r-F)*h+F)}else if(u)s3(b,i[a],o[a],h),r||(e[d]=s7(b));else{var E,T=(E=i[a],(o[a]-E)*h+E);r?this._additiveValue=T:e[d]=T}r&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,i=this._additiveValue;0===t?e[n]=e[n]+i:3===t?(sX(e[n],lt),s4(lt,lt,i,1),e[n]=s7(lt)):1===t?s4(e[n],e[n],i,1):2===t&&s6(e[n],e[n],i,1)},e}(),li=function(){function e(e,t,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&i)return void ry("Can' use additive animation on looped animation.");this._additiveAnimators=i,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,rS(t),n)},e.prototype.whenWithKeys=function(e,t,n,i){for(var o=this._tracks,r=0;r<n.length;r++){var a=n[r],s=o[a];if(!s){s=o[a]=new ln(a);var l=void 0,c=this._getAdditiveTrack(a);if(c){var d=c.keyframes,u=d[d.length-1];l=u&&u.value,3===c.valType&&l&&(l=s7(l))}else l=this._target[a];if(null==l)continue;e>0&&s.addKeyframe(0,s8(l),i),this._trackKeys.push(a)}s.addKeyframe(e,s8(t[a]),i)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var o=n[i].getTrack(e);o&&(t=o)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],i=this._maxTime||0,o=0;o<this._trackKeys.length;o++){var r=this._trackKeys[o],a=this._tracks[r],s=this._getAdditiveTrack(r),l=a.keyframes,c=l.length;if(a.prepare(i,s),a.needsAnimate())if(!this._allowDiscrete&&a.discrete){var d=l[c-1];d&&(t._target[a.propName]=d.rawValue),a.setFinished()}else n.push(a)}if(n.length||this._force){var u=new sO({life:i,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var i=t._additiveAnimators;if(i){for(var o=!1,r=0;r<i.length;r++)if(i[r]._clip){o=!0;break}o||(t._additiveAnimators=null)}for(var r=0;r<n.length;r++)n[r].step(t._target,e);var a=t._onframeCbs;if(a)for(var r=0;r<a.length;r++)a[r](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=u,this.animation&&this.animation.addClip(u),e&&u.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return rA(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,o=0;o<e.length;o++){var r=n[e[o]];r&&!r.isFinished()&&(t?r.step(this._target,1):1===this._started&&r.step(this._target,0),r.setFinished())}for(var a=!0,o=0;o<i.length;o++)if(!n[i[o]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},e.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var i=0;i<t.length;i++){var o=t[i],r=this._tracks[o];if(!(!r||r.isFinished())){var a=r.keyframes,s=a[n?0:a.length-1];s&&(e[o]=s8(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t=t||rS(e);for(var n=0;n<t.length;n++){var i=t[n],o=this._tracks[i];if(o){var r=o.keyframes;if(r.length>1){var a=r.pop();o.addKeyframe(a.time,e[i]),o.prepare(this._maxTime,o.getAdditiveTrack())}}}},e}();function lo(){return new Date().getTime()}var lr=function(e){function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,n.stage=(t=t||{}).stage||{},n}return r7(t,e),t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=lo()-this._pausedTime,n=t-this._time,i=this._head;i;){var o=i.next;i.step(t,n)&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=t,!e&&(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,ey(function t(){e._running&&(ey(t),e._paused||e.update())})},t.prototype.start=function(){this._running||(this._time=lo(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=lo(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=lo()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return null==this._head},t.prototype.animate=function(e,t){t=t||{},this.start();var n=new li(e,t.loop);return this.addAnimator(n),n},t}(ac),la=ri.domSupported,ls=function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=rA(e,function(e){var n=e.replace("mouse","pointer");return t.hasOwnProperty(n)?n:e});return{mouse:e,touch:["touchstart","touchend","touchmove"],pointer:n}}(),ll={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},lc=!1;function ld(e){var t=e.pointerType;return"pen"===t||"touch"===t}function lu(e){e&&(e.zrByTouch=!0)}function lm(e,t){for(var n=t,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return i}var lf=function(e,t){this.stopPropagation=r4,this.stopImmediatePropagation=r4,this.preventDefault=r4,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY},lp={mousedown:function(e){e=aT(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=aT(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=aT(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){lm(this,(e=aT(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){lc=!0,e=aT(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){lc||(e=aT(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){lu(e=aT(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),lp.mousemove.call(this,e),lp.mousedown.call(this,e)},touchmove:function(e){lu(e=aT(this.dom,e)),this.handler.processGesture(e,"change"),lp.mousemove.call(this,e)},touchend:function(e){lu(e=aT(this.dom,e)),this.handler.processGesture(e,"end"),lp.mouseup.call(this,e),new Date-this.__lastTouchMoment<300&&lp.click.call(this,e)},pointerdown:function(e){lp.mousedown.call(this,e)},pointermove:function(e){ld(e)||lp.mousemove.call(this,e)},pointerup:function(e){lp.mouseup.call(this,e)},pointerout:function(e){ld(e)||lp.mouseout.call(this,e)}};rM(["click","dblclick","contextmenu"],function(e){lp[e]=function(t){t=aT(this.dom,t),this.trigger(e,t)}});var lh={pointermove:function(e){ld(e)||lh.mousemove.call(this,e)},pointerup:function(e){lh.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function lb(e,t,n,i){var o;e.mounted[t]=n,e.listenerOpts[t]=i,o=e.domTarget,o.addEventListener(t,n,i)}function lg(e){var t,n,i,o=e.mounted;for(var r in o)o.hasOwnProperty(r)&&(t=e.domTarget,n=o[r],i=e.listenerOpts[r],t.removeEventListener(r,n,i));e.mounted={}}var l_=function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t},ly=function(e){function t(t,n){var i,o,r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new l_(t,lp),la&&(r._globalHandlerScope=new l_(document,lh)),o=(i=r._localHandlerScope).domHandlers,ri.pointerEventsSupported?rM(ls.pointer,function(e){lb(i,e,function(t){o[e].call(r,t)})}):(ri.touchEventsSupported&&rM(ls.touch,function(e){lb(i,e,function(t){o[e].call(r,t),i.touching=!0,null!=i.touchTimer&&(clearTimeout(i.touchTimer),i.touchTimer=null),i.touchTimer=setTimeout(function(){i.touching=!1,i.touchTimer=null},700)})}),rM(ls.mouse,function(e){lb(i,e,function(t){t=aE(t),i.touching||o[e].call(r,t)})})),r}return r7(t,e),t.prototype.dispose=function(){lg(this._localHandlerScope),la&&lg(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,la&&this.__pointerCapturing^e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?function(e,t){ri.pointerEventsSupported?rM(ll.pointer,n):ri.touchEventsSupported||rM(ll.mouse,n);function n(n){lb(t,n,function(i){if(!lm(e,(i=aE(i)).target)){var o;o=i,i=aT(e.dom,new lf(e,o),!0),t.domHandlers[n].call(e,i)}},{capture:!0})}}(this,t):lg(t)}},t}(ac),lv=1;ri.hasGlobalWindow&&(lv=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var lF=lv,lx="#333",lw="#ccc";function lk(e){return e>5e-5||e<-5e-5}var lE=[],lT=[],lM=aL(),lA=Math.abs,lC=function(){var e;function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},t.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},t.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},t.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},t.prototype.needLocalTransform=function(){return lk(this.rotation)||lk(this.x)||lk(this.y)||lk(this.scaleX-1)||lk(this.scaleY-1)||lk(this.skewX)||lk(this.skewY)},t.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(aI(n),this.invTransform=null);return}n=n||aL(),t?this.getLocalTransform(n):aI(n),e&&(t?aR(n,e,n):aO(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},t.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(lE);var n=lE[0]<0?-1:1,i=lE[1]<0?-1:1,o=((lE[0]-n)*t+n)/lE[0]||0,r=((lE[1]-i)*t+i)/lE[1]||0;e[0]*=o,e[1]*=o,e[2]*=r,e[3]*=r}this.invTransform=this.invTransform||aL(),aN(this.invTransform,e)},t.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},t.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),o=Math.PI/2+i-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(o),t=Math.sqrt(t),this.skewX=o,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||aL(),aR(lT,e.invTransform,t),t=lT);var n=this.originX,i=this.originY;(n||i)&&(lM[4]=n,lM[5]=i,aR(lT,t,lM),lT[4]-=n,lT[5]-=i,t=lT),this.setLocalTransform(t)}},t.prototype.getGlobalScale=function(e){var t=this.transform;return(e=e||[],t)?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1])):(e[0]=1,e[1]=1),e},t.prototype.transformCoordToLocal=function(e,t){var n=[e,t],i=this.invTransform;return i&&ao(n,n,i),n},t.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],i=this.transform;return i&&ao(n,n,i),n},t.prototype.getLineScale=function(){var e=this.transform;return e&&lA(e[0]-1)>1e-10&&lA(e[3]-1)>1e-10?Math.sqrt(lA(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){lS(this,e)},t.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,i=e.originY||0,o=e.scaleX,r=e.scaleY,a=e.anchorX,s=e.anchorY,l=e.rotation||0,c=e.x,d=e.y,u=e.skewX?Math.tan(e.skewX):0,m=e.skewY?Math.tan(-e.skewY):0;if(n||i||a||s){var f=n+a,p=i+s;t[4]=-f*o-u*p*r,t[5]=-p*r-m*f*o}else t[4]=t[5]=0;return t[0]=o,t[3]=r,t[1]=m*o,t[2]=u*r,l&&aP(t,t,l),t[4]+=n+c,t[5]+=i+d,t},t.initDefaultProps=void((e=t.prototype).scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0),t}(),lD=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function lS(e,t){for(var n=0;n<lD.length;n++){var i=lD[n];e[i]=t[i]}}function lL(e){ev||(ev=new sP(100)),e=e||ro;var t=ev.get(e);return t||(t={font:e,strWidthCache:new sP(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:ra.measureText("国",e).width,asciiCharWidth:ra.measureText("a",e).width},ev.put(e,t)),t}var lI=0;function lO(e,t){return e.asciiWidthMapTried||(e.asciiWidthMap=function(e){if(!(lI>=5)){e=e||ro;for(var t=[],n=+new Date,i=0;i<=127;i++)t[i]=ra.measureText(String.fromCharCode(i),e).width;var o=new Date-n;return o>16?lI=5:o>2&&lI++,t}}(e.font),e.asciiWidthMapTried=!0),0<=t&&t<=127?null!=e.asciiWidthMap?e.asciiWidthMap[t]:e.asciiCharWidth:e.stWideCharWidth}function lR(e,t){var n=e.strWidthCache,i=n.get(t);return null==i&&(i=ra.measureText(t,e.font).width,n.put(t,i)),i}function lY(e,t,n,i){var o=lR(lL(t),e),r=lH(t);return new a3(lN(0,o,n),lB(0,r,i),o,r)}function lP(e,t,n,i){var o=((e||"")+"").split("\n");if(1===o.length)return lY(o[0],t,n,i);for(var r=new a3(0,0,0,0),a=0;a<o.length;a++){var s=lY(o[a],t,n,i);0===a?r.copy(s):r.union(s)}return r}function lN(e,t,n,i){return"right"===n?i?e+=t:e-=t:"center"===n&&(i?e+=t/2:e-=t/2),e}function lB(e,t,n,i){return"middle"===n?i?e+=t/2:e-=t/2:"bottom"===n&&(i?e+=t:e-=t),e}function lH(e){return lL(e).stWideCharWidth}function lz(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function lj(e,t,n){var i=t.position||"inside",o=null!=t.distance?t.distance:5,r=n.height,a=n.width,s=r/2,l=n.x,c=n.y,d="left",u="top";if(i instanceof Array)l+=lz(i[0],n.width),c+=lz(i[1],n.height),d=null,u=null;else switch(i){case"left":l-=o,c+=s,d="right",u="middle";break;case"right":l+=o+a,c+=s,u="middle";break;case"top":l+=a/2,c-=o,d="center",u="bottom";break;case"bottom":l+=a/2,c+=r+o,d="center";break;case"inside":l+=a/2,c+=s,d="center",u="middle";break;case"insideLeft":l+=o,c+=s,u="middle";break;case"insideRight":l+=a-o,c+=s,d="right",u="middle";break;case"insideTop":l+=a/2,c+=o,d="center";break;case"insideBottom":l+=a/2,c+=r-o,d="center",u="bottom";break;case"insideTopLeft":l+=o,c+=o;break;case"insideTopRight":l+=a-o,c+=o,d="right";break;case"insideBottomLeft":l+=o,c+=r-o,u="bottom";break;case"insideBottomRight":l+=a-o,c+=r-o,d="right",u="bottom"}return(e=e||{}).x=l,e.y=c,e.align=d,e.verticalAlign=u,e}var lU="__zr_normal__",lW=lD.concat(["ignore"]),lV=rC(lD,function(e,t){return e[t]=!0,e},{ignore:!1}),lG={},l$=new a3(0,0,0,0),lq=[],lX=function(){function e(e){this.id=r_++,this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,o=t.innerTransformable,r=void 0,a=void 0,s=!1;o.parent=i?this:null;var l=!1;o.copyTransform(t);var c=null!=n.position,d=n.autoOverflowArea,u=void 0;if((d||c)&&(u=l$,n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),i||u.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(lG,n,u):lj(lG,n,u),o.x=lG.x,o.y=lG.y,r=lG.align,a=lG.verticalAlign;var m=n.origin;if(m&&null!=n.rotation){var f=void 0,p=void 0;"center"===m?(f=.5*u.width,p=.5*u.height):(f=lz(m[0],u.width),p=lz(m[1],u.height)),l=!0,o.originX=-o.x+f+(i?0:u.x),o.originY=-o.y+p+(i?0:u.y)}}null!=n.rotation&&(o.rotation=n.rotation);var h=n.offset;h&&(o.x+=h[0],o.y+=h[1],l||(o.originX=-h[0],o.originY=-h[1]));var b=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(d){var g=b.overflowRect=b.overflowRect||new a3(0,0,0,0);o.getLocalTransform(lq),aN(lq,lq),a3.copy(g,u),g.applyTransform(lq)}else b.overflowRect=null;var _=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,y=void 0,v=void 0,F=void 0;_&&this.canBeInsideText()?(y=n.insideFill,v=n.insideStroke,(null==y||"auto"===y)&&(y=this.getInsideTextFill()),(null==v||"auto"===v)&&(v=this.getInsideTextStroke(y),F=!0)):(y=n.outsideFill,v=n.outsideStroke,(null==y||"auto"===y)&&(y=this.getOutsideFill()),(null==v||"auto"===v)&&(v=this.getOutsideStroke(y),F=!0)),((y=y||"#000")!==b.fill||v!==b.stroke||F!==b.autoStroke||r!==b.align||a!==b.verticalAlign)&&(s=!0,b.fill=y,b.stroke=v,b.autoStroke=F,b.align=r,b.verticalAlign=a,t.setDefaultTextStyle(b)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(e){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?lw:lx},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&sX(t);n||(n=[255,255,255,1]);for(var i=n[3],o=this.__zr.isDarkMode(),r=0;r<3;r++)n[r]=n[r]*i+255*!o*(1-i);return n[3]=1,sQ(n,"rgba")},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){"textConfig"===e?this.setTextConfig(t):"textContent"===e?this.setTextContent(t):"clipPath"===e?this.setClipPath(t):"extra"===e?(this.extra=this.extra||{},rx(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if("string"==typeof e)this.attrKV(e,t);else if(rB(e))for(var n=rS(e),i=0;i<n.length;i++){var o=n[i];this.attrKV(o,e[o])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],o=i.__fromStateTransition;if(!i.getLoop()&&(!o||o===lU)){var r=i.targetName,a=r?t[r]:t;i.saveTo(a)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,lW)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var i=0;i<n.length;i++){var o=n[i];null==e[o]||o in t||(t[o]=this[o])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(lU,!1,e)},e.prototype.useState=function(e,t,n,i){var o,r=e===lU;if(this.hasState()||!r){var a=this.currentStates,s=this.stateTransition;if(!(rk(a,e)>=0)||!t&&1!==a.length){if(this.stateProxy&&!r&&(o=this.stateProxy(e)),o||(o=this.states&&this.states[e]),!o&&!r)return void ry("State "+e+" not exists.");r||this.saveCurrentToNormalState(o);var l=!!(o&&o.hoverLayer||i);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,o,this._normalState,t,!n&&!this.__inHover&&s&&s.duration>0,s);var c=this._textContent,d=this._textGuide;return c&&c.useState(e,t,n,l),d&&d.useState(e,t,n,l),r?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),o}}},e.prototype.useStates=function(e,t,n){if(e.length){var i=[],o=this.currentStates,r=e.length,a=r===o.length;if(a){for(var s=0;s<r;s++)if(e[s]!==o[s]){a=!1;break}}if(!a){for(var s=0;s<r;s++){var l=e[s],c=void 0;this.stateProxy&&(c=this.stateProxy(l,e)),c||(c=this.states[l]),c&&i.push(c)}var d=i[r-1],u=!!(d&&d.hoverLayer||n);u&&this._toggleHoverLayerFlag(!0);var m=this._mergeStates(i),f=this.stateTransition;this.saveCurrentToNormalState(m),this._applyStateObj(e.join(","),m,this._normalState,!1,!t&&!this.__inHover&&f&&f.duration>0,f);var p=this._textContent,h=this._textGuide;p&&p.useStates(e,t,u),h&&h.useStates(e,t,u),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!u&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}}else this.clearStates()},e.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=rk(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var i=this.currentStates.slice(),o=rk(i,e),r=rk(i,t)>=0;o>=0?r?i.splice(o,1):i[o]=t:n&&!r&&i.push(t),this.useStates(i)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t,n={},i=0;i<e.length;i++){var o=e[i];rx(n,o),o.textConfig&&rx(t=t||{},o.textConfig)}return t&&(n.textConfig=t),n},e.prototype._applyStateObj=function(e,t,n,i,o,r){var a=!(t&&i);t&&t.textConfig?(this.textConfig=rx({},i?this.textConfig:n.textConfig),rx(this.textConfig,t.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,c=0;c<lW.length;c++){var d=lW[c],u=o&&lV[d];t&&null!=t[d]?u?(l=!0,s[d]=t[d]):this[d]=t[d]:a&&null!=n[d]&&(u?(l=!0,s[d]=n[d]):this[d]=n[d])}if(!o)for(var c=0;c<this.animators.length;c++){var m=this.animators[c],f=m.targetName;m.getLoop()||m.__changeFinalValue(f?(t||n)[f]:t||n)}l&&this._transitionState(e,s,r)},e.prototype._attachComponent=function(e){if((!e.__zr||e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new lC,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),rx(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var i=new li(e?this[e]:this,t,n);return e&&(i.targetName=e),this.addAnimator(i,e),i},e.prototype.addAnimator=function(e,t){var n=this.__zr,i=this;e.during(function(){i.updateDuringAnimation(t)}).done(function(){var t=i.animators,n=rk(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,i=n.length,o=[],r=0;r<i;r++){var a=n[r];e&&e!==a.scope?o.push(a):a.stop(t)}return this.animators=o,this},e.prototype.animateTo=function(e,t,n){lK(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){lK(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,i){for(var o=lK(this,t,n,i),r=0;r<o.length;r++)o[r].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=function(){var t=e.prototype;function n(e,n,i,o){Object.defineProperty(t,e,{get:function(){return this[n]||r(this,this[n]=[]),this[n]},set:function(e){this[i]=e[0],this[o]=e[1],this[n]=e,r(this,e)}});function r(e,t){Object.defineProperty(t,0,{get:function(){return e[i]},set:function(t){e[i]=t}}),Object.defineProperty(t,1,{get:function(){return e[o]},set:function(t){e[o]=t}})}}t.type="element",t.name="",t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=1,Object.defineProperty&&(n("position","_legacyPos","x","y"),n("scale","_legacyScale","scaleX","scaleY"),n("origin","_legacyOrigin","originX","originY"))}(),e}();function lK(e,t,n,i,o){var r=[];!function e(t,n,i,o,r,a,s,l){for(var c=rS(o),d=r.duration,u=r.delay,m=r.additive,f=r.setToFinal,p=!rB(a),h=t.animators,b=[],g=0;g<c.length;g++){var _=c[g],y=o[_];if(null!=y&&null!=i[_]&&(p||a[_]))if(!rB(y)||rT(y)||rU(y))b.push(_);else{if(n){l||(i[_]=y,t.updateDuringAnimation(n));continue}e(t,_,i[_],y,r,a&&a[_],s,l)}else l||(i[_]=y,t.updateDuringAnimation(n),b.push(_))}var v=b.length;if(!m&&v)for(var F=0;F<h.length;F++){var x=h[F];if(x.targetName===n&&x.stopTracks(b)){var w=rk(h,x);h.splice(w,1)}}if(r.force||(v=(b=rD(b,function(e){var t,n;return!((t=o[e])===(n=i[e])||rT(t)&&rT(n)&&function(e,t){var n=e.length;if(n!==t.length)return!1;for(var i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}(t,n))})).length),v>0||r.force&&!s.length){var k=void 0,E=void 0,T=void 0;if(l){E={},f&&(k={});for(var F=0;F<v;F++){var _=b[F];E[_]=i[_],f?k[_]=o[_]:i[_]=o[_]}}else if(f){T={};for(var F=0;F<v;F++){var _=b[F];T[_]=s8(i[_]),function(e,t,n){if(rT(t[n]))if(rT(e[n])||(e[n]=[]),rz(t[n])){var i=t[n].length;e[n].length!==i&&(e[n]=new t[n].constructor(i),lJ(e[n],t[n],i))}else{var o=t[n],r=e[n],a=o.length;if(rT(o[0]))for(var s=o[0].length,l=0;l<a;l++)r[l]?lJ(r[l],o[l],s):r[l]=Array.prototype.slice.call(o[l]);else lJ(r,o,a);r.length=o.length}else e[n]=t[n]}(i,o,_)}}var x=new li(i,!1,!1,m?rD(h,function(e){return e.targetName===n}):null);x.targetName=n,r.scope&&(x.scope=r.scope),f&&k&&x.whenWithKeys(0,k,b),T&&x.whenWithKeys(0,T,b),x.whenWithKeys(null==d?500:d,l?E:o,b).delay(u||0),t.addAnimator(x,n),s.push(x)}}(e,"",e,t,n=n||{},i,r,o);var a=r.length,s=!1,l=n.done,c=n.aborted,d=function(){s=!0,--a<=0&&(s?l&&l():c&&c())},u=function(){--a<=0&&(s?l&&l():c&&c())};!a&&l&&l(),r.length>0&&n.during&&r[0].during(function(e,t){n.during(t)});for(var m=0;m<r.length;m++){var f=r[m];d&&f.done(d),u&&f.aborted(u),n.force&&f.duration(n.duration),f.start(n.easing)}return r}function lJ(e,t,n){for(var i=0;i<n;i++)e[i]=t[i]}rE(lX,ac),rE(lX,lC);var lZ=function(e){function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return r7(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,i=n.indexOf(t);i>=0&&(n.splice(i,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=rk(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,i=n[t];if(e&&e!==this&&e.parent!==this&&e!==i){n[t]=e,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,i=rk(n,e);return i<0||(n.splice(i,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var i=e[n];t&&i.removeSelfFromZr(t),i.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,i=0;i<n.length;i++){var o=n[i];e.call(t,o,i)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var i=this._children[n],o=e.call(t,i);i.isGroup&&!o&&i.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(t)},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(t)},t.prototype.getBoundingRect=function(e){for(var t=new a3(0,0,0,0),n=e||this._children,i=[],o=null,r=0;r<n.length;r++){var a=n[r];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),l=a.getLocalTransform(i);l?(a3.applyTransform(t,s,l),(o=o||t.clone()).union(t)):(o=o||s.clone()).union(s)}}return o||t},t}(lX);lZ.prototype.type="group";let lQ=lZ;var l0={},l1={},l2=function(){function e(e,t,n){var i,o=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var r=new sm,a=n.renderer||"canvas";l0[a]||(a=rS(l0)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var s=new l0[a](t,r,n,e),l=n.ssr||s.ssrOnly;this.storage=r,this.painter=s;var c=ri.node||ri.worker||l?null:new ly(s.getViewportRoot(),s.root),d=n.useCoarsePointer;(null==d||"auto"===d?ri.touchEventsSupported:!!d)&&(i=rV(n.pointerSize,44)),this.handler=new st(r,s,c,s.root,i),this.animation=new lr({stage:{update:l?null:function(){return o._flush(!0)}}}),l||this.animation.start()}return e.prototype.add=function(e){!this._disposed&&e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){!this._disposed&&e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=function(e){if(!e)return!1;if("string"==typeof e)return .4>s0(e,1);if(e.colorStops){for(var t=e.colorStops,n=0,i=t.length,o=0;o<i;o++)n+=s0(t[o].color,1);return(n/=i)<.4}return!1}(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!1)},e.prototype._flush=function(e){var t,n=lo();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var i=lo();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){!this._disposed&&(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},e.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof lQ&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){if(!this._disposed){var e;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,e=this.id,delete l1[e]}},e}();function l5(e,t){var n=new l2(r_++,e,t);return l1[n.id]=n,n}var l3=Math.min,l4=Math.max,l6=Math.abs;function l8(e,t,n,i){var o=t[0],r=t[1],a=n[0],s=n[1],l=r-o,c=s-a;if(0===l)return 0===c?a:(a+s)/2;if(i){if(l>0){if(e<=o)return a;else if(e>=r)return s}else if(e>=o)return a;else if(e<=r)return s}else{if(e===o)return a;if(e===r)return s}return(e-o)/l*c+a}var l7=function(e,t,n){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return l9(e,t,n)};function l9(e,t,n){return rY(e)?e.replace(/^\s+|\s+$/g,"").match(/%$/)?parseFloat(e)/100*t+(n||0):parseFloat(e):null==e?NaN:+e}function ce(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function ct(e){return e.sort(function(e,t){return e-t}),e}function cn(e){if(isNaN(e*=1))return 0;if(e>1e-14){for(var t,n,i,o,r,a=1,s=0;s<15;s++,a*=10)if(Math.round(e*a)/a===e)return s}return i=(n=(t=e.toString().toLowerCase()).indexOf("e"))>0?+t.slice(n+1):0,o=n>0?n:t.length,Math.max(0,((r=t.indexOf("."))<0?0:o-1-r)-i)}function ci(e,t){var n=Math.log,i=Math.LN10,o=Math.min(Math.max(-Math.floor(n(e[1]-e[0])/i)+Math.round(n(l6(t[1]-t[0]))/i),0),20);return isFinite(o)?o:20}function co(e){var t=2*Math.PI;return(e%t+t)%t}function cr(e){return e>-1e-4&&e<1e-4}var ca=/^(?:(\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 cs(e){if(e instanceof Date)return e;if(rY(e)){var t=ca.exec(e);if(!t)return new Date(NaN);if(!t[8])return new Date(+t[1],(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0);var n=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(n-=t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return null==e?new Date(NaN):new Date(Math.round(e))}function cl(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function cc(e,t){var n=cl(e),i=Math.pow(10,n),o=e/i;return e=(t?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10)*i,n>=-20?+e.toFixed(n<0?-n:0):e}function cd(e){var t=parseFloat(e);return t==e&&(0!==t||!rY(e)||0>=e.indexOf("x"))?t:NaN}function cu(){return Math.round(9*Math.random())}function cm(e,t){return null==e?t:null==t?e:e*t/function e(t,n){return 0===n?t:e(n,t%n)}(e,t)}var cf="series\0";function cp(e){return e instanceof Array?e:null==e?[]:[e]}function ch(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var i=0,o=n.length;i<o;i++){var r=n[i];!e.emphasis[t].hasOwnProperty(r)&&e[t].hasOwnProperty(r)&&(e.emphasis[t][r]=e[t][r])}}}var cb=["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 cg(e){return!rB(e)||rO(e)||e instanceof Date?e:e.value}function c_(e,t,n){var i=cv(t[e],null),o=cv(n[e],null);return null!=i&&null!=o&&i===o}function cy(e){return cv(e,"")}function cv(e,t){return null==e?t:rY(e)?e:rN(e)||rP(e)?e+"":t}function cF(e){var t=e.name;return!!(t&&t.indexOf(cf))}function cx(e){return e&&null!=e.id&&0===cy(e.id).indexOf("\0_ec_\0")}function cw(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?rO(t.dataIndex)?rA(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?rO(t.name)?rA(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function ck(){var e="__ec_inner_"+cE++;return function(t){return t[e]||(t[e]={})}}var cE=cu();function cT(e,t,n){var i=cM(t,n),o=i.mainTypeSpecified,r=i.queryOptionMap,a=i.others,s=n?n.defaultMainType:null;return!o&&s&&r.set(s,{}),r.each(function(t,i){var o=cD(e,i,t,{useDefault:s===i,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone});a[i+"Models"]=o.models,a[i+"Model"]=o.models[0]}),a}function cM(e,t){if(rY(e)){var n,i={};i[e+"Index"]=0,n=i}else n=e;var o=r1(),r={},a=!1;return rM(n,function(e,n){if("dataIndex"===n||"dataIndexInside"===n){r[n]=e;return}var i=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=i[1],l=(i[2]||"").toLowerCase();!s||!l||t&&t.includeMainTypes&&0>rk(t.includeMainTypes,s)||(a=a||!!s,(o.get(s)||o.set(s,{}))[l]=e)}),{mainTypeSpecified:a,queryOptionMap:o,others:r}}var cA={useDefault:!0,enableAll:!1,enableNone:!1},cC={useDefault:!1,enableAll:!0,enableNone:!0};function cD(e,t,n,i){i=i||cA;var o=n.index,r=n.id,a=n.name,s={models:null,specified:null!=o||null!=r||null!=a};if(!s.specified){var l=void 0;return s.models=i.useDefault&&(l=e.getComponent(t))?[l]:[],s}if("none"===o||!1===o)if(i.enableNone)return s.models=[],s;else o=-1;return"all"===o&&(o=i.enableAll?r=a=null:-1),s.models=e.queryComponents({mainType:t,index:o,id:r,name:a}),s}function cS(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}!function(){function e(){}e.prototype.reset=function(e,t,n,i){return this._list=e,this._step=i=i||1,this._idx=t,this._end=null!=n?n:i>0?e.length:0,this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)&&(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0)}}();var cL="___EC__COMPONENT__CONTAINER___",cI="___EC__EXTENDED_CLASS___";function cO(e){var t={main:"",sub:""};if(e){var n=e.split(".");t.main=n[0]||"",t.sub=n[1]||""}return t}function cR(e,t){e.$constructor=e,e.extend=function(e){var t,n,i=this;if(rR(t=i)&&/^class\s/.test(Function.prototype.toString.call(t)))n=function(e){function t(){return e.apply(this,arguments)||this}return rt(t,e),t}(i);else{var o=n=function(){(e.$constructor||i).apply(this,arguments)},r=o.prototype;function a(){}for(var s in a.prototype=this.prototype,o.prototype=new a,r)r.hasOwnProperty(s)&&(o.prototype[s]=r[s]);o.prototype.constructor=o,o.superClass=this}return rx(n.prototype,e),n[cI]=!0,n.extend=this.extend,n.superCall=cN,n.superApply=cB,n.superClass=i,n}}function cY(e,t){e.extend=t.extend}var cP=Math.round(10*Math.random());function cN(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return this.superClass.prototype[t].apply(e,n)}function cB(e,t,n){return this.superClass.prototype[t].apply(e,n)}function cH(e){var t={};e.registerClass=function(e){var n=e.type||e.prototype.type;if(n){rX(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n),'componentType "'+n+'" illegal'),e.prototype.type=n;var i,o,r=cO(n);r.sub?r.sub!==cL&&(((o=t[(i=r).main])&&o[cL]||((o=t[i.main]={})[cL]=!0),o)[r.sub]=e):t[r.main]=e}return e},e.getClass=function(e,n,i){var o=t[e];if(o&&o[cL]&&(o=n?o[n]:null),i&&!o)throw Error(n?"Component "+e+"."+(n||"")+" is used but not imported.":e+".type should be specified.");return o},e.getClassesByMainType=function(e){var n=cO(e),i=[],o=t[n.main];return o&&o[cL]?rM(o,function(e,t){t!==cL&&i.push(e)}):i.push(o),i},e.hasClass=function(e){return!!t[cO(e).main]},e.getAllClassMainTypes=function(){var e=[];return rM(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[cO(e).main];return n&&n[cL]}}function cz(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t=t||!1,function(n,i,o){for(var r={},a=0;a<e.length;a++){var s=e[a][1];if(!(i&&rk(i,s)>=0||o&&0>rk(o,s))){var l=n.getShallow(s,t);null!=l&&(r[e[a][0]]=l)}}return r}}var cj=cz([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),cU=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return cj(this,e,t)},e}(),cW=new sP(50);function cV(e,t,n,i,o){if(!e)return t;if("string"!=typeof e)return e;if(t&&t.__zrImageSrc===e||!n)return t;var r=cW.get(e),a={hostEl:n,cb:i,cbPayload:o};return r?c$(t=r.image)||r.pending.push(a):((t=ra.loadImage(e,cG,cG)).__zrImageSrc=e,cW.put(e,t.__cachedImgObj={image:t,pending:[a]})),t}function cG(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function c$(e){return e&&e.width&&e.height}var cq=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function cX(e,t,n,i){var o=rx({},i=i||{});n=rV(n,"..."),o.maxIterations=rV(i.maxIterations,2);var r=o.minChar=rV(i.minChar,0),a=o.fontMeasureInfo=lL(t),s=a.asciiCharWidth;o.placeholder=rV(i.placeholder,"");for(var l=e=Math.max(0,e-1),c=0;c<r&&l>=s;c++)l-=s;var d=lR(a,n);return d>l&&(n="",d=0),l=e-d,o.ellipsis=n,o.ellipsisWidth=d,o.contentWidth=l,o.containerWidth=e,o}function cK(e,t,n){var i=n.containerWidth,o=n.contentWidth,r=n.fontMeasureInfo;if(!i){e.textLine="",e.isTruncated=!1;return}var a=lR(r,t);if(a<=i){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(a<=o||s>=n.maxIterations){t+=n.ellipsis;break}var l=0===s?function(e,t,n){for(var i=0,o=0,r=e.length;o<r&&i<t;o++)i+=lO(n,e.charCodeAt(o));return o}(t,o,r):a>0?Math.floor(t.length*o/a):0;a=lR(r,t=t.substr(0,l))}""===t&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}var cJ=function(){},cZ=function(e){this.tokens=[],e&&(this.tokens=e)},cQ=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1};function c0(e,t,n,i,o){var r,a,s=""===t,l=o&&n.rich[o]||{},c=e.lines,d=l.font||n.font,u=!1;if(i){var m=l.padding,f=m?m[1]+m[3]:0;if(null!=l.width&&"auto"!==l.width){var p=lz(l.width,i.width)+f;c.length>0&&p+i.accumWidth>i.width&&(r=t.split("\n"),u=!0),i.accumWidth=p}else{var h=c2(t,d,i.width,i.breakAll,i.accumWidth);i.accumWidth=h.accumWidth+f,a=h.linesWidths,r=h.lines}}r||(r=t.split("\n"));for(var b=lL(d),g=0;g<r.length;g++){var _=r[g],y=new cJ;if(y.styleName=o,y.text=_,y.isLineHolder=!_&&!s,"number"==typeof l.width?y.width=l.width:y.width=a?a[g]:lR(b,_),g||u)c.push(new cZ([y]));else{var v=(c[c.length-1]||(c[0]=new cZ)).tokens,F=v.length;1===F&&v[0].isLineHolder?v[0]=y:(_||!F||s)&&v.push(y)}}}var c1=rC(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function c2(e,t,n,i,o){for(var r=[],a=[],s="",l="",c=0,d=0,u=lL(t),m=0;m<e.length;m++){var f=e.charAt(m);if("\n"===f){l&&(s+=l,d+=c),r.push(s),a.push(d),s="",l="",c=0,d=0;continue}var p=lO(u,f.charCodeAt(0)),h=!i&&!function(e){var t;return(!((t=e.charCodeAt(0))>=32)||!(t<=591))&&(!(t>=880)||!(t<=4351))&&(!(t>=4608)||!(t<=5119))&&(!(t>=7680)||!(t<=8303))||!!c1[e]}(f);if(r.length?d+p>n:o+d+p>n){d?(s||l)&&(h?(s||(s=l,l="",d=c=0),r.push(s),a.push(d-c),l+=f,c+=p,s="",d=c):(l&&(s+=l,l="",c=0),r.push(s),a.push(d),s=f,d=p)):h?(r.push(l),a.push(c),l=f,c=p):(r.push(f),a.push(p));continue}d+=p,h?(l+=f,c+=p):(l&&(s+=l,l="",c=0),s+=f)}return l&&(s+=l),s&&(r.push(s),a.push(d)),1===r.length&&(d+=o),{accumWidth:d,lines:r,linesWidths:a}}function c5(e,t,n,i,o,r){if(e.baseX=n,e.baseY=i,e.outerWidth=e.outerHeight=null,t){var a=2*t.width,s=2*t.height;a3.set(c3,lN(n,a,o),lB(i,s,r),a,s),a3.intersect(t,c3,null,c4);var l=c4.outIntersectRect;e.outerWidth=l.width,e.outerHeight=l.height,e.baseX=lN(l.x,l.width,o,!0),e.baseY=lB(l.y,l.height,r,!0)}}var c3=new a3(0,0,0,0),c4={outIntersectRect:{},clamp:!0};function c6(e){return null!=e?e+="":e=""}function c8(e,t,n,i){var o=new a3(lN(e.x||0,t,e.textAlign),lB(e.y||0,n,e.textBaseline),t,n),r=null!=i?i:c7(e)?e.lineWidth:0;return r>0&&(o.x-=r/2,o.y-=r/2,o.width+=r,o.height+=r),o}function c7(e){var t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0}var c9="__zr_style_"+Math.round(10*Math.random()),de={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},dt={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};de[c9]=!0;var dn=["z","z2","invisible"],di=["invisible"],dr=function(e){var t;function n(t){return e.call(this,t)||this}return r7(n,e),n.prototype._init=function(t){for(var n=rS(t),i=0;i<n.length;i++){var o=n[i];"style"===o?this.useStyle(t[o]):e.prototype.attrKV.call(this,o,t[o])}this.style||this.useStyle({})},n.prototype.beforeBrush=function(){},n.prototype.afterBrush=function(){},n.prototype.innerBeforeBrush=function(){},n.prototype.innerAfterBrush=function(){},n.prototype.shouldBePainted=function(e,t,n,i){var o,r,a,s=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&(o=this,r=e,a=t,da.copy(o.getBoundingRect()),o.transform&&da.applyTransform(o.transform),ds.width=r,ds.height=a,!da.intersect(ds))||s&&!s[0]&&!s[3])return!1;if(n&&this.__clipPaths&&this.__clipPaths.length){for(var l=0;l<this.__clipPaths.length;++l)if(this.__clipPaths[l].isZeroArea())return!1}if(i&&this.parent)for(var c=this.parent;c;){if(c.ignore)return!1;c=c.parent}return!0},n.prototype.contain=function(e,t){return this.rectContain(e,t)},n.prototype.traverse=function(e,t){e.call(t,this)},n.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},n.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),i=this.style,o=i.shadowBlur||0,r=i.shadowOffsetX||0,a=i.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new a3(0,0,0,0)),t?a3.applyTransform(e,n,t):e.copy(n),(o||r||a)&&(e.width+=2*o+Math.abs(r),e.height+=2*o+Math.abs(a),e.x=Math.min(e.x,e.x+r-o),e.y=Math.min(e.y,e.y+a-o));var s=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-s),e.y=Math.floor(e.y-s),e.width=Math.ceil(e.width+1+2*s),e.height=Math.ceil(e.height+1+2*s))}return e},n.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new a3(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},n.prototype.getPrevPaintRect=function(){return this._prevPaintRect},n.prototype.animateStyle=function(e){return this.animate("style",e)},n.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():this.markRedraw()},n.prototype.attrKV=function(t,n){"style"!==t?e.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},n.prototype.setStyle=function(e,t){return"string"==typeof e?this.style[e]=t:rx(this.style,e),this.dirtyStyle(),this},n.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},n.prototype.dirty=function(){this.dirtyStyle()},n.prototype.styleChanged=function(){return!!(2&this.__dirty)},n.prototype.styleUpdated=function(){this.__dirty&=-3},n.prototype.createStyle=function(e){return r2(de,e)},n.prototype.useStyle=function(e){e[c9]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},n.prototype.isStyleObject=function(e){return e[c9]},n.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,dn)},n.prototype._applyStateObj=function(t,n,i,o,r,a){e.prototype._applyStateObj.call(this,t,n,i,o,r,a);var s,l=!(n&&o);if(n&&n.style?r?o?s=n.style:(s=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(s,n.style)):(s=this._mergeStyle(this.createStyle(),o?this.style:i.style),this._mergeStyle(s,n.style)):l&&(s=i.style),s)if(r){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var d=rS(c),u=0;u<d.length;u++){var m=d[u];m in s&&(s[m]=s[m],this.style[m]=c[m])}for(var f=rS(s),u=0;u<f.length;u++){var m=f[u];this.style[m]=this.style[m]}this._transitionState(t,{style:s},a,this.getAnimationStyleProps())}else this.useStyle(s);for(var p=this.__inHover?di:dn,u=0;u<p.length;u++){var m=p[u];n&&null!=n[m]?this[m]=n[m]:l&&null!=i[m]&&(this[m]=i[m])}},n.prototype._mergeStates=function(t){for(var n,i=e.prototype._mergeStates.call(this,t),o=0;o<t.length;o++){var r=t[o];r.style&&(n=n||{},this._mergeStyle(n,r.style))}return n&&(i.style=n),i},n.prototype._mergeStyle=function(e,t){return rx(e,t),e},n.prototype.getAnimationStyleProps=function(){return dt},n.initDefaultProps=void((t=n.prototype).type="displayable",t.invisible=!1,t.z=0,t.z2=0,t.zlevel=0,t.culling=!1,t.cursor="pointer",t.rectHover=!1,t.incremental=!1,t._rect=null,t.dirtyRectTolerance=0,t.__dirty=3),n}(lX),da=new a3(0,0,0,0),ds=new a3(0,0,0,0),dl=Math.min,dc=Math.max,dd=Math.sin,du=Math.cos,dm=2*Math.PI,df=r9(),dp=r9(),dh=r9();function db(e,t,n){if(0!==e.length){for(var i=e[0],o=i[0],r=i[0],a=i[1],s=i[1],l=1;l<e.length;l++)o=dl(o,(i=e[l])[0]),r=dc(r,i[0]),a=dl(a,i[1]),s=dc(s,i[1]);t[0]=o,t[1]=a,n[0]=r,n[1]=s}}function dg(e,t,n,i,o,r){o[0]=dl(e,n),o[1]=dl(t,i),r[0]=dc(e,n),r[1]=dc(t,i)}var d_=[],dy=[],dv={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},dF=[],dx=[],dw=[],dk=[],dE=[],dT=[],dM=Math.min,dA=Math.max,dC=Math.cos,dD=Math.sin,dS=Math.abs,dL=Math.PI,dI=2*dL,dO="undefined"!=typeof Float32Array,dR=[];function dY(e){return Math.round(e/dL*1e8)/1e8%2*dL}var dP=function(){var e;function t(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(e,t,n){(n=n||0)>0&&(this._ux=dS(n/lF/e)||0,this._uy=dS(n/lF/t)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},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._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(dv.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},t.prototype.lineTo=function(e,t){var n=dS(e-this._xi),i=dS(t-this._yi),o=n>this._ux||i>this._uy;if(this.addData(dv.L,e,t),this._ctx&&o&&this._ctx.lineTo(e,t),o)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var r=n*n+i*i;r>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=r)}return this},t.prototype.bezierCurveTo=function(e,t,n,i,o,r){return this._drawPendingPt(),this.addData(dv.C,e,t,n,i,o,r),this._ctx&&this._ctx.bezierCurveTo(e,t,n,i,o,r),this._xi=o,this._yi=r,this},t.prototype.quadraticCurveTo=function(e,t,n,i){return this._drawPendingPt(),this.addData(dv.Q,e,t,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(e,t,n,i,o,r){this._drawPendingPt(),dR[0]=i,dR[1]=o,(a=dY(dR[0]))<0&&(a+=dI),s=a-dR[0],l=dR[1]+s,!r&&l-a>=dI?l=a+dI:r&&a-l>=dI?l=a-dI:!r&&a>l?l=a+(dI-dY(a-l)):r&&a<l&&(l=a-(dI-dY(l-a))),dR[0]=a,dR[1]=l,i=dR[0];var a,s,l,c=(o=dR[1])-i;return this.addData(dv.A,e,t,n,n,i,c,0,+!r),this._ctx&&this._ctx.arc(e,t,n,i,o,r),this._xi=dC(o)*n+e,this._yi=dD(o)*n+t,this},t.prototype.arcTo=function(e,t,n,i,o){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,i,o),this},t.prototype.rect=function(e,t,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,i),this.addData(dv.R,e,t,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(dv.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&dO&&(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t}},t.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var t=e.length,n=0,i=this._len,o=0;o<t;o++)n+=e[o].len();var r=this.data;if(dO&&(r instanceof Float32Array||!r)&&(this.data=new Float32Array(i+n),i>0&&r))for(var a=0;a<i;a++)this.data[a]=r[a];for(var o=0;o<t;o++)for(var s=e[o].data,a=0;a<s.length;a++)this.data[i++]=s[a];this._len=i}},t.prototype.addData=function(e,t,n,i,o,r,a,s,l){if(this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var d=0;d<arguments.length;d++)c[this._len++]=arguments[d]}},t.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},t.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,dO&&this._len>11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){dw[0]=dw[1]=dE[0]=dE[1]=Number.MAX_VALUE,dk[0]=dk[1]=dT[0]=dT[1]=-Number.MAX_VALUE;var e,t=this.data,n=0,i=0,o=0,r=0;for(e=0;e<this._len;){var a=t[e++],s=1===e;switch(s&&(n=t[e],i=t[e+1],o=n,r=i),a){case dv.M:n=o=t[e++],i=r=t[e++],dE[0]=o,dE[1]=r,dT[0]=o,dT[1]=r;break;case dv.L:dg(n,i,t[e],t[e+1],dE,dT),n=t[e++],i=t[e++];break;case dv.C:!function(e,t,n,i,o,r,a,s,l,c){var d=sT(e,n,o,a,d_);l[0]=1/0,l[1]=1/0,c[0]=-1/0,c[1]=-1/0;for(var u=0;u<d;u++){var m=sw(e,n,o,a,d_[u]);l[0]=dl(m,l[0]),c[0]=dc(m,c[0])}d=sT(t,i,r,s,dy);for(var u=0;u<d;u++){var f=sw(t,i,r,s,dy[u]);l[1]=dl(f,l[1]),c[1]=dc(f,c[1])}l[0]=dl(e,l[0]),c[0]=dc(e,c[0]),l[0]=dl(a,l[0]),c[0]=dc(a,c[0]),l[1]=dl(t,l[1]),c[1]=dc(t,c[1]),l[1]=dl(s,l[1]),c[1]=dc(s,c[1])}(n,i,t[e++],t[e++],t[e++],t[e++],t[e],t[e+1],dE,dT),n=t[e++],i=t[e++];break;case dv.Q:!function(e,t,n,i,o,r,a,s){var l=dc(dl(sD(e,n,o),1),0),c=dc(dl(sD(t,i,r),1),0),d=sA(e,n,o,l),u=sA(t,i,r,c);a[0]=dl(e,o,d),a[1]=dl(t,r,u),s[0]=dc(e,o,d),s[1]=dc(t,r,u)}(n,i,t[e++],t[e++],t[e],t[e+1],dE,dT),n=t[e++],i=t[e++];break;case dv.A:var l=t[e++],c=t[e++],d=t[e++],u=t[e++],m=t[e++],f=t[e++]+m;e+=1;var p=!t[e++];s&&(o=dC(m)*d+l,r=dD(m)*u+c),function(e,t,n,i,o,r,a,s,l){var c=Math.abs(o-r);if(c%dm<1e-4&&c>1e-4){s[0]=e-n,s[1]=t-i,l[0]=e+n,l[1]=t+i;return}if(df[0]=du(o)*n+e,df[1]=dd(o)*i+t,dp[0]=du(r)*n+e,dp[1]=dd(r)*i+t,ar(s,df,dp),aa(l,df,dp),(o%=dm)<0&&(o+=dm),(r%=dm)<0&&(r+=dm),o>r&&!a?r+=dm:o<r&&a&&(o+=dm),a){var d=r;r=o,o=d}for(var u=0;u<r;u+=Math.PI/2)u>o&&(dh[0]=du(u)*n+e,dh[1]=dd(u)*i+t,ar(s,dh,s),aa(l,dh,l))}(l,c,d,u,m,f,p,dE,dT),n=dC(f)*d+l,i=dD(f)*u+c;break;case dv.R:dg(o=n=t[e++],r=i=t[e++],o+t[e++],r+t[e++],dE,dT);break;case dv.Z:n=o,i=r}ar(dw,dw,dE),aa(dk,dk,dT)}return 0===e&&(dw[0]=dw[1]=dk[0]=dk[1]=0),new a3(dw[0],dw[1],dk[0]-dw[0],dk[1]-dw[1])},t.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,i=this._uy,o=0,r=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,c=0,d=0,u=0;u<t;){var m=e[u++],f=1===u;f&&(o=e[u],r=e[u+1],a=o,s=r);var p=-1;switch(m){case dv.M:o=a=e[u++],r=s=e[u++];break;case dv.L:var h=e[u++],b=e[u++],g=h-o,_=b-r;(dS(g)>n||dS(_)>i||u===t-1)&&(p=Math.sqrt(g*g+_*_),o=h,r=b);break;case dv.C:var y=e[u++],v=e[u++],h=e[u++],b=e[u++],F=e[u++],x=e[u++];p=function(e,t,n,i,o,r,a,s,l){for(var c=e,d=t,u=0,m=1;m<=10;m++){var f=.1*m,p=sw(e,n,o,a,f),h=sw(t,i,r,s,f),b=p-c,g=h-d;u+=Math.sqrt(b*b+g*g),c=p,d=h}return u}(o,r,y,v,h,b,F,x,10),o=F,r=x;break;case dv.Q:var y=e[u++],v=e[u++],h=e[u++],b=e[u++];p=function(e,t,n,i,o,r,a){for(var s=e,l=t,c=0,d=1;d<=10;d++){var u=.1*d,m=sA(e,n,o,u),f=sA(t,i,r,u),p=m-s,h=f-l;c+=Math.sqrt(p*p+h*h),s=m,l=f}return c}(o,r,y,v,h,b,10),o=h,r=b;break;case dv.A:var w=e[u++],k=e[u++],E=e[u++],T=e[u++],M=e[u++],A=e[u++],C=A+M;u+=1,f&&(a=dC(M)*E+w,s=dD(M)*T+k),p=dA(E,T)*dM(dI,Math.abs(A)),o=dC(C)*E+w,r=dD(C)*T+k;break;case dv.R:a=o=e[u++],s=r=e[u++],p=2*e[u++]+2*e[u++];break;case dv.Z:var g=a-o,_=s-r;p=Math.sqrt(g*g+_*_),o=a,r=s}p>=0&&(l[d++]=p,c+=p)}return this._pathLen=c,c},t.prototype.rebuildPath=function(e,t){var n,i,o,r,a,s,l,c,d,u,m=this.data,f=this._ux,p=this._uy,h=this._len,b=t<1,g=0,_=0,y=0;if(!b||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,c=t*this._pathLen))t:for(var v=0;v<h;){var F=m[v++],x=1===v;switch(x&&(o=m[v],r=m[v+1],n=o,i=r),F!==dv.L&&y>0&&(e.lineTo(d,u),y=0),F){case dv.M:n=o=m[v++],i=r=m[v++],e.moveTo(o,r);break;case dv.L:a=m[v++],s=m[v++];var w=dS(a-o),k=dS(s-r);if(w>f||k>p){if(b){var E=l[_++];if(g+E>c){var T=(c-g)/E;e.lineTo(o*(1-T)+a*T,r*(1-T)+s*T);break t}g+=E}e.lineTo(a,s),o=a,r=s,y=0}else{var M=w*w+k*k;M>y&&(d=a,u=s,y=M)}break;case dv.C:var A=m[v++],C=m[v++],D=m[v++],S=m[v++],L=m[v++],I=m[v++];if(b){var E=l[_++];if(g+E>c){var T=(c-g)/E;sM(o,A,D,L,T,dF),sM(r,C,S,I,T,dx),e.bezierCurveTo(dF[1],dx[1],dF[2],dx[2],dF[3],dx[3]);break t}g+=E}e.bezierCurveTo(A,C,D,S,L,I),o=L,r=I;break;case dv.Q:var A=m[v++],C=m[v++],D=m[v++],S=m[v++];if(b){var E=l[_++];if(g+E>c){var T=(c-g)/E;sS(o,A,D,T,dF),sS(r,C,S,T,dx),e.quadraticCurveTo(dF[1],dx[1],dF[2],dx[2]);break t}g+=E}e.quadraticCurveTo(A,C,D,S),o=D,r=S;break;case dv.A:var O=m[v++],R=m[v++],Y=m[v++],P=m[v++],N=m[v++],B=m[v++],H=m[v++],z=!m[v++],j=Y>P?Y:P,U=dS(Y-P)>.001,W=N+B,V=!1;if(b){var E=l[_++];g+E>c&&(W=N+B*(c-g)/E,V=!0),g+=E}if(U&&e.ellipse?e.ellipse(O,R,Y,P,H,N,W,z):e.arc(O,R,j,N,W,z),V)break t;x&&(n=dC(N)*Y+O,i=dD(N)*P+R),o=dC(W)*Y+O,r=dD(W)*P+R;break;case dv.R:n=o=m[v],i=r=m[v+1],a=m[v++],s=m[v++];var G=m[v++],$=m[v++];if(b){var E=l[_++];if(g+E>c){var q=c-g;e.moveTo(a,s),e.lineTo(a+dM(q,G),s),(q-=G)>0&&e.lineTo(a+G,s+dM(q,$)),(q-=$)>0&&e.lineTo(a+dA(G-q,0),s+$),(q-=G)>0&&e.lineTo(a,s+dA($-q,0));break t}g+=E}e.rect(a,s,G,$);break;case dv.Z:if(b){var E=l[_++];if(g+E>c){var T=(c-g)/E;e.lineTo(o*(1-T)+n*T,r*(1-T)+i*T);break t}g+=E}e.closePath(),o=n,r=i}}},t.prototype.clone=function(){var e=new t,n=this.data;return e.data=n.slice?n.slice():Array.prototype.slice.call(n),e._len=this._len,e},t.prototype.canSave=function(){return!!this._saveData},t.CMD=dv,t.initDefaultProps=void((e=t.prototype)._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0),t}();function dN(e,t,n,i,o,r,a){if(0===o)return!1;var s=0,l=e;if(a>t+o&&a>i+o||a<t-o&&a<i-o||r>e+o&&r>n+o||r<e-o&&r<n-o)return!1;if(e===n)return Math.abs(r-e)<=o/2;s=(t-i)/(e-n);var c=s*r-a+(l=(e*i-n*t)/(e-n));return c*c/(s*s+1)<=o/2*o/2}var dB=2*Math.PI;function dH(e){return(e%=dB)<0&&(e+=dB),e}var dz=2*Math.PI;function dj(e,t,n,i,o,r){if(r>t&&r>i||r<t&&r<i||i===t)return 0;var a=(r-t)/(i-t),s=i<t?1:-1;(1===a||0===a)&&(s=i<t?.5:-.5);var l=a*(n-e)+e;return l===o?1/0:l>o?s:0}var dU=dP.CMD,dW=2*Math.PI,dV=[-1,-1,-1],dG=[-1,-1];function d$(e,t,n,i,o){for(var r,a,s=e.data,l=e.len(),c=0,d=0,u=0,m=0,f=0,p=0;p<l;){var h,b,g,_,y,v,F,x,w,k,E,T,M,A,C=s[p++],D=1===p;switch(C===dU.M&&p>1&&!n&&(c+=dj(d,u,m,f,i,o)),D&&(d=s[p],u=s[p+1],m=d,f=u),C){case dU.M:m=s[p++],f=s[p++],d=m,u=f;break;case dU.L:if(n){if(dN(d,u,s[p],s[p+1],t,i,o))return!0}else c+=dj(d,u,s[p],s[p+1],i,o)||0;d=s[p++],u=s[p++];break;case dU.C:if(n){if(h=d,b=u,g=s[p++],_=s[p++],y=s[p++],v=s[p++],F=s[p],x=s[p+1],0!==t&&(!(o>b+t)||!(o>_+t)||!(o>v+t)||!(o>x+t))&&(!(o<b-t)||!(o<_-t)||!(o<v-t)||!(o<x-t))&&(!(i>h+t)||!(i>g+t)||!(i>y+t)||!(i>F+t))&&(!(i<h-t)||!(i<g-t)||!(i<y-t)||!(i<F-t))&&function(e,t,n,i,o,r,a,s,l,c,d){var u,m,f,p,h,b=.005,g=1/0;s_[0]=l,s_[1]=c;for(var _=0;_<1;_+=.05)sy[0]=sw(e,n,o,a,_),sy[1]=sw(t,i,r,s,_),(p=ai(s_,sy))<g&&(u=_,g=p);g=1/0;for(var y=0;y<32&&!(b<1e-4);y++)m=u-b,f=u+b,sy[0]=sw(e,n,o,a,m),sy[1]=sw(t,i,r,s,m),p=ai(sy,s_),m>=0&&p<g?(u=m,g=p):(sv[0]=sw(e,n,o,a,f),sv[1]=sw(t,i,r,s,f),h=ai(sv,s_),f<=1&&h<g?(u=f,g=h):b*=.5);return sh(g)}(h,b,g,_,y,v,F,x,i,o,0)<=t/2)return!0}else c+=function(e,t,n,i,o,r,a,s,l,c){if(c>t&&c>i&&c>r&&c>s||c<t&&c<i&&c<r&&c<s)return 0;var d=sE(t,i,r,s,c,dV);if(0===d)return 0;for(var u=0,m=-1,f=void 0,p=void 0,h=0;h<d;h++){var b=dV[h],g=0===b||1===b?.5:1;sw(e,n,o,a,b)<l||(m<0&&(m=sT(t,i,r,s,dG),dG[1]<dG[0]&&m>1&&function(){var e=dG[0];dG[0]=dG[1],dG[1]=e}(),f=sw(t,i,r,s,dG[0]),m>1&&(p=sw(t,i,r,s,dG[1]))),2===m?b<dG[0]?u+=f<t?g:-g:b<dG[1]?u+=p<f?g:-g:u+=s<p?g:-g:b<dG[0]?u+=f<t?g:-g:u+=s<f?g:-g)}return u}(d,u,s[p++],s[p++],s[p++],s[p++],s[p],s[p+1],i,o)||0;d=s[p++],u=s[p++];break;case dU.Q:if(n){if(w=d,k=u,E=s[p++],T=s[p++],M=s[p],A=s[p+1],0!==t&&(!(o>k+t)||!(o>T+t)||!(o>A+t))&&(!(o<k-t)||!(o<T-t)||!(o<A-t))&&(!(i>w+t)||!(i>E+t)||!(i>M+t))&&(!(i<w-t)||!(i<E-t)||!(i<M-t))&&function(e,t,n,i,o,r,a,s,l){var c,d=.005,u=1/0;s_[0]=a,s_[1]=s;for(var m=0;m<1;m+=.05){sy[0]=sA(e,n,o,m),sy[1]=sA(t,i,r,m);var f=ai(s_,sy);f<u&&(c=m,u=f)}u=1/0;for(var p=0;p<32&&!(d<1e-4);p++){var h=c-d,b=c+d;sy[0]=sA(e,n,o,h),sy[1]=sA(t,i,r,h);var f=ai(sy,s_);if(h>=0&&f<u)c=h,u=f;else{sv[0]=sA(e,n,o,b),sv[1]=sA(t,i,r,b);var g=ai(sv,s_);b<=1&&g<u?(c=b,u=g):d*=.5}}return sh(u)}(w,k,E,T,M,A,i,o,0)<=t/2)return!0}else c+=function(e,t,n,i,o,r,a,s){if(s>t&&s>i&&s>r||s<t&&s<i&&s<r)return 0;var l=function(e,t,n,i,o){var r=e-2*t+n,a=2*(t-e),s=e-i,l=0;if(sF(r)){if(sx(a)){var c=-s/a;c>=0&&c<=1&&(o[l++]=c)}}else{var d=a*a-4*r*s;if(sF(d)){var c=-a/(2*r);c>=0&&c<=1&&(o[l++]=c)}else if(d>0){var u=sh(d),c=(-a+u)/(2*r),m=(-a-u)/(2*r);c>=0&&c<=1&&(o[l++]=c),m>=0&&m<=1&&(o[l++]=m)}}return l}(t,i,r,s,dV);if(0===l)return 0;var c=sD(t,i,r);if(c>=0&&c<=1){for(var d=0,u=sA(t,i,r,c),m=0;m<l;m++){var f=0===dV[m]||1===dV[m]?.5:1,p=sA(e,n,o,dV[m]);p<a||(dV[m]<c?d+=u<t?f:-f:d+=r<u?f:-f)}return d}var f=0===dV[0]||1===dV[0]?.5:1,p=sA(e,n,o,dV[0]);return p<a?0:r<t?f:-f}(d,u,s[p++],s[p++],s[p],s[p+1],i,o)||0;d=s[p++],u=s[p++];break;case dU.A:var S=s[p++],L=s[p++],I=s[p++],O=s[p++],R=s[p++],Y=s[p++];p+=1;var P=!!(1-s[p++]);r=Math.cos(R)*I+S,a=Math.sin(R)*O+L,D?(m=r,f=a):c+=dj(d,u,r,a,i,o);var N=(i-S)*O/I+S;if(n){if(function(e,t,n,i,o,r,a,s,l){if(0===a)return!1;var c=Math.sqrt((s-=e)*s+(l-=t)*l);if(c-a>n||c+a<n)return!1;if(Math.abs(i-o)%dz<1e-4)return!0;if(r){var d=i;i=dH(o),o=dH(d)}else i=dH(i),o=dH(o);i>o&&(o+=dz);var u=Math.atan2(l,s);return u<0&&(u+=dz),u>=i&&u<=o||u+dz>=i&&u+dz<=o}(S,L,O,R,R+Y,P,t,N,o))return!0}else c+=function(e,t,n,i,o,r,a,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);dV[0]=-l,dV[1]=l;var c=Math.abs(i-o);if(c<1e-4)return 0;if(c>=dW-1e-4){i=0,o=dW;var d=r?1:-1;return a>=dV[0]+e&&a<=dV[1]+e?d:0}if(i>o){var u=i;i=o,o=u}i<0&&(i+=dW,o+=dW);for(var m=0,f=0;f<2;f++){var p=dV[f];if(p+e>a){var h=Math.atan2(s,p),d=r?1:-1;h<0&&(h=dW+h),(h>=i&&h<=o||h+dW>=i&&h+dW<=o)&&(h>Math.PI/2&&h<1.5*Math.PI&&(d=-d),m+=d)}}return m}(S,L,O,R,R+Y,P,N,o);d=Math.cos(R+Y)*I+S,u=Math.sin(R+Y)*O+L;break;case dU.R:m=d=s[p++],f=u=s[p++];var B=s[p++],H=s[p++];if(r=m+B,a=f+H,n){if(dN(m,f,r,f,t,i,o)||dN(r,f,r,a,t,i,o)||dN(r,a,m,a,t,i,o)||dN(m,a,m,f,t,i,o))return!0}else c+=dj(r,f,r,a,i,o),c+=dj(m,a,m,f,i,o);break;case dU.Z:if(n){if(dN(d,u,m,f,t,i,o))return!0}else c+=dj(d,u,m,f,i,o);d=m,u=f}}return n||1e-4>Math.abs(u-f)||(c+=dj(d,u,m,f,i,o)||0),0!==c}var dq=rw({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},de),dX={style:rw({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},dt.style)},dK=lD.concat(["invisible","culling","z","z2","zlevel","parent"]);let dJ=function(e){var t;function n(t){return e.call(this,t)||this}return r7(n,e),n.prototype.update=function(){var t=this;e.prototype.update.call(this);var i=this.style;if(i.decal){var o=this._decalEl=this._decalEl||new n;o.buildPath===n.prototype.buildPath&&(o.buildPath=function(e){t.buildPath(e,t.shape)}),o.silent=!0;var r=o.style;for(var a in i)r[a]!==i[a]&&(r[a]=i[a]);r.fill=i.fill?i.decal:null,r.decal=null,r.shadowColor=null,i.strokeFirst&&(r.stroke=null);for(var s=0;s<dK.length;++s)o[dK[s]]=this[dK[s]];o.__dirty|=1}else this._decalEl&&(this._decalEl=null)},n.prototype.getDecalElement=function(){return this._decalEl},n.prototype._init=function(t){var n=rS(t);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var o=0;o<n.length;o++){var r=n[o],a=t[r];"style"===r?this.style?rx(this.style,a):this.useStyle(a):"shape"===r?rx(this.shape,a):e.prototype.attrKV.call(this,r,a)}this.style||this.useStyle({})},n.prototype.getDefaultStyle=function(){return null},n.prototype.getDefaultShape=function(){return{}},n.prototype.canBeInsideText=function(){return this.hasFill()},n.prototype.getInsideTextFill=function(){var e=this.style.fill;if("none"!==e){if(rY(e)){var t=s0(e,0);return t>.5?lx:t>.2?"#eee":lw}else if(e)return lw}return lx},n.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(rY(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==.4>s0(e,0))return t}},n.prototype.buildPath=function(e,t,n){},n.prototype.pathUpdated=function(){this.__dirty&=-5},n.prototype.getUpdatedPathProxy=function(e){return this.path||this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},n.prototype.createPathProxy=function(){this.path=new dP(!1)},n.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0},n.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},n.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||4&this.__dirty)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var r=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){r.copy(e);var a=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(r.width+=s/a,r.height+=s/a,r.x-=s/a/2,r.y-=s/a/2)}return r}return e},n.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),i=this.getBoundingRect(),o=this.style;if(e=n[0],t=n[1],i.contain(e,t)){var r=this.path;if(this.hasStroke()){var a=o.lineWidth,s=o.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),d$(r,a/s,!0,e,t)))return!0}if(this.hasFill())return d$(r,0,!1,e,t)}return!1},n.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},n.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},n.prototype.animateShape=function(e){return this.animate("shape",e)},n.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():"shape"===e?this.dirtyShape():this.markRedraw()},n.prototype.attrKV=function(t,n){"shape"===t?this.setShape(n):e.prototype.attrKV.call(this,t,n)},n.prototype.setShape=function(e,t){var n=this.shape;return n||(n=this.shape={}),"string"==typeof e?n[e]=t:rx(n,e),this.dirtyShape(),this},n.prototype.shapeChanged=function(){return!!(4&this.__dirty)},n.prototype.createStyle=function(e){return r2(dq,e)},n.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=rx({},this.shape))},n.prototype._applyStateObj=function(t,n,i,o,r,a){e.prototype._applyStateObj.call(this,t,n,i,o,r,a);var s,l=!(n&&o);if(n&&n.shape?r?o?s=n.shape:(s=rx({},i.shape),rx(s,n.shape)):(s=rx({},o?this.shape:i.shape),rx(s,n.shape)):l&&(s=i.shape),s)if(r){this.shape=rx({},this.shape);for(var c={},d=rS(s),u=0;u<d.length;u++){var m=d[u];"object"==typeof s[m]?this.shape[m]=s[m]:c[m]=s[m]}this._transitionState(t,{shape:c},a)}else this.shape=s,this.dirtyShape()},n.prototype._mergeStates=function(t){for(var n,i=e.prototype._mergeStates.call(this,t),o=0;o<t.length;o++){var r=t[o];r.shape&&(n=n||{},this._mergeStyle(n,r.shape))}return n&&(i.shape=n),i},n.prototype.getAnimationStyleProps=function(){return dX},n.prototype.isZeroArea=function(){return!1},n.extend=function(e){var t=function(t){function n(n){var i=t.call(this,n)||this;return e.init&&e.init.call(i,n),i}return r7(n,t),n.prototype.getDefaultStyle=function(){return rv(e.style)},n.prototype.getDefaultShape=function(){return rv(e.shape)},n}(n);for(var i in e)"function"==typeof e[i]&&(t.prototype[i]=e[i]);return t},n.initDefaultProps=void((t=n.prototype).type="path",t.strokeContainThreshold=5,t.segmentIgnoreThreshold=0,t.subPixelOptimize=!1,t.autoBatch=!1,t.__dirty=7),n}(dr);var dZ=rw({strokeFirst:!0,font:ro,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},dq),dQ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r7(t,e),t.prototype.hasStroke=function(){return c7(this.style)},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.createStyle=function(e){return r2(dZ,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e,t,n;return this._rect||(this._rect=(t=c6((e=this.style).text),n=e.font,c8(e,lR(lL(n),t),lH(n),null))),this._rect},t.initDefaultProps=void(t.prototype.dirtyRectTolerance=10),t}(dr);dQ.prototype.type="tspan";var d0=rw({x:0,y:0},de),d1={style:rw({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},dt.style)},d2=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r7(t,e),t.prototype.createStyle=function(e){return r2(d0,e)},t.prototype._getSize=function(e){var t,n=this.style,i=n[e];if(null!=i)return i;var o=(t=n.image)&&"string"!=typeof t&&t.width&&t.height?n.image:this.__image;if(!o)return 0;var r="width"===e?"height":"width",a=n[r];return null==a?o[e]:o[e]/o[r]*a},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return d1},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new a3(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(dr);d2.prototype.type="image";let d5=d2;var d3=Math.round;function d4(e,t,n){if(t){var i=t.x1,o=t.x2,r=t.y1,a=t.y2;e.x1=i,e.x2=o,e.y1=r,e.y2=a;var s=n&&n.lineWidth;return s&&(d3(2*i)===d3(2*o)&&(e.x1=e.x2=d8(i,s,!0)),d3(2*r)===d3(2*a)&&(e.y1=e.y2=d8(r,s,!0))),e}}function d6(e,t,n){if(t){var i=t.x,o=t.y,r=t.width,a=t.height;e.x=i,e.y=o,e.width=r,e.height=a;var s=n&&n.lineWidth;return s&&(e.x=d8(i,s,!0),e.y=d8(o,s,!0),e.width=Math.max(d8(i+r,s,!1)-e.x,+(0!==r)),e.height=Math.max(d8(o+a,s,!1)-e.y,+(0!==a))),e}}function d8(e,t,n){if(!t)return e;var i=d3(2*e);return(i+d3(t))%2==0?i/2:(i+(n?1:-1))/2}var d7=function(){this.x=0,this.y=0,this.width=0,this.height=0},d9={},ue=function(e){function t(t){return e.call(this,t)||this}return r7(t,e),t.prototype.getDefaultShape=function(){return new d7},t.prototype.buildPath=function(e,t){if(this.subPixelOptimize){var n,i,o,r,a,s,l,c,d,u,m,f,p,h,b,g=d6(d9,t,this.style);f=g.x,p=g.y,h=g.width,b=g.height,g.r=t.r,t=g}else f=t.x,p=t.y,h=t.width,b=t.height;t.r?(l=(n=t).x,c=n.y,d=n.width,u=n.height,m=n.r,d<0&&(l+=d,d=-d),u<0&&(c+=u,u=-u),"number"==typeof m?i=o=r=a=m:m instanceof Array?1===m.length?i=o=r=a=m[0]:2===m.length?(i=r=m[0],o=a=m[1]):3===m.length?(i=m[0],o=a=m[1],r=m[2]):(i=m[0],o=m[1],r=m[2],a=m[3]):i=o=r=a=0,i+o>d&&(s=i+o,i*=d/s,o*=d/s),r+a>d&&(s=r+a,r*=d/s,a*=d/s),o+r>u&&(s=o+r,o*=u/s,r*=u/s),i+a>u&&(s=i+a,i*=u/s,a*=u/s),e.moveTo(l+i,c),e.lineTo(l+d-o,c),0!==o&&e.arc(l+d-o,c+o,o,-Math.PI/2,0),e.lineTo(l+d,c+u-r),0!==r&&e.arc(l+d-r,c+u-r,r,0,Math.PI/2),e.lineTo(l+a,c+u),0!==a&&e.arc(l+a,c+u-a,a,Math.PI/2,Math.PI),e.lineTo(l,c+i),0!==i&&e.arc(l+i,c+i,i,Math.PI,1.5*Math.PI)):e.rect(f,p,h,b)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(dJ);ue.prototype.type="rect";let ut=ue;var un={fill:"#000"},ui={},uo={style:rw({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},dt.style)},ur=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=un,n.attr(t),n}return r7(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){var e;this._childCursor=0,ud(e=this.style),rM(e.rich,ud),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new a3(0,0,0,0),t=this._children,n=[],i=null,o=0;o<t.length;o++){var r=t[o],a=r.getBoundingRect(),s=r.getLocalTransform(n);s?(e.copy(a),e.applyTransform(s),(i=i||e.clone()).union(e)):(i=i||a.clone()).union(a)}this._rect=i||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||un},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,i=e.rich||n&&{};return rx(e,t),n&&i?(this._mergeRich(i,n),e.rich=i):i&&(e.rich=i),e},t.prototype._mergeRich=function(e,t){for(var n=rS(t),i=0;i<n.length;i++){var o=n[i];e[o]=e[o]||{},rx(e[o],t[o])}},t.prototype.getAnimationStyleProps=function(){return uo},t.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return t&&t instanceof e||(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||ro,n=e.padding,i=this._defaultStyle,o=e.x||0,r=e.y||0,a=e.align||i.align||"left",s=e.verticalAlign||i.verticalAlign||"top";c5(ui,i.overflowRect,o,r,a,s),o=ui.baseX,r=ui.baseY;var l=function(e,t,n,i){var o,r=c6(e),a=t.overflow,s=t.padding,l=s?s[1]+s[3]:0,c=s?s[0]+s[2]:0,d=t.font,u=lH(d),m=rV(t.lineHeight,u),f="truncate"===t.lineOverflow,p=!1,h=t.width;null==h&&null!=n&&(h=n-l);var b=t.height;null==b&&null!=i&&(b=i-c);var g=(o=null!=h&&("break"===a||"breakAll"===a)?r?c2(r,t.font,h,"breakAll"===a,0).lines:[]:r?r.split("\n"):[]).length*m;if(null==b&&(b=g),g>b&&f){var _=Math.floor(b/m);p=p||o.length>_,g=(o=o.slice(0,_)).length*m}if(r&&"truncate"===a&&null!=h)for(var y=cX(h,d,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),v={},F=0;F<o.length;F++)cK(v,o[F],y),o[F]=v.textLine,p=p||v.isTruncated;for(var x=b,w=0,k=lL(d),F=0;F<o.length;F++)w=Math.max(lR(k,o[F]),w);null==h&&(h=w);var E=h;return x+=c,{lines:o,height:b,outerWidth:E+=l,outerHeight:x,lineHeight:m,calculatedLineHeight:u,contentWidth:w,contentHeight:g,width:h,isTruncated:p}}(up(e),e,ui.outerWidth,ui.outerHeight),c=uh(e),d=!!e.backgroundColor,u=l.outerHeight,m=l.outerWidth,f=l.lines,p=l.lineHeight;this.isTruncated=!!l.isTruncated;var h=o,b=lB(r,l.contentHeight,s);if(c||n){var g=lN(o,m,a),_=lB(r,u,s);c&&this._renderBackground(e,e,g,_,m,u)}b+=p/2,n&&(h=uf(o,a,n),"top"===s?b+=n[0]:"bottom"===s&&(b-=n[2]));for(var y=0,v=!1,F=!1,x=um("fill"in e?e.fill:(F=!0,i.fill)),w=uu("stroke"in e?e.stroke:d||i.autoStroke&&!F?null:(y=2,v=!0,i.stroke)),k=e.textShadowBlur>0,E=0;E<f.length;E++){var T=this._getOrCreateChild(dQ),M=T.createStyle();T.useStyle(M),M.text=f[E],M.x=h,M.y=b,a&&(M.textAlign=a),M.textBaseline="middle",M.opacity=e.opacity,M.strokeFirst=!0,k&&(M.shadowBlur=e.textShadowBlur||0,M.shadowColor=e.textShadowColor||"transparent",M.shadowOffsetX=e.textShadowOffsetX||0,M.shadowOffsetY=e.textShadowOffsetY||0),M.stroke=w,M.fill=x,w&&(M.lineWidth=e.lineWidth||y,M.lineDash=e.lineDash,M.lineDashOffset=e.lineDashOffset||0),M.font=t,uc(M,e),b+=p,T.setBoundingRect(c8(M,l.contentWidth,l.calculatedLineHeight,v?0:null))}},t.prototype._updateRichTexts=function(){var e=this.style,t=this._defaultStyle,n=e.align||t.align,i=e.verticalAlign||t.verticalAlign,o=e.x||0,r=e.y||0;c5(ui,t.overflowRect,o,r,n,i),o=ui.baseX,r=ui.baseY;var a=function(e,t,n,i,o){var r,a=new cQ,s=c6(e);if(!s)return a;var l=t.padding,c=l?l[1]+l[3]:0,d=l?l[0]+l[2]:0,u=t.width;null==u&&null!=n&&(u=n-c);var m=t.height;null==m&&null!=i&&(m=i-d);for(var f=t.overflow,p=("break"===f||"breakAll"===f)&&null!=u?{width:u,accumWidth:0,breakAll:"breakAll"===f}:null,h=cq.lastIndex=0;null!=(r=cq.exec(s));){var b=r.index;b>h&&c0(a,s.substring(h,b),t,p),c0(a,r[2],t,p,r[1]),h=cq.lastIndex}h<s.length&&c0(a,s.substring(h,s.length),t,p);var g=[],_=0,y=0,v="truncate"===f,F="truncate"===t.lineOverflow,x={};function w(e,t,n){e.width=t,e.lineHeight=n,_+=n,y=Math.max(y,t)}e:for(var k=0;k<a.lines.length;k++){for(var E=a.lines[k],T=0,M=0,A=0;A<E.tokens.length;A++){var C=E.tokens[A],D=C.styleName&&t.rich[C.styleName]||{},S=C.textPadding=D.padding,L=S?S[1]+S[3]:0,I=C.font=D.font||t.font;C.contentHeight=lH(I);var O=rV(D.height,C.contentHeight);if(C.innerHeight=O,S&&(O+=S[0]+S[2]),C.height=O,C.lineHeight=rG(D.lineHeight,t.lineHeight,O),C.align=D&&D.align||o,C.verticalAlign=D&&D.verticalAlign||"middle",F&&null!=m&&_+C.lineHeight>m){var R=a.lines.length;A>0?(E.tokens=E.tokens.slice(0,A),w(E,M,T),a.lines=a.lines.slice(0,k+1)):a.lines=a.lines.slice(0,k),a.isTruncated=a.isTruncated||a.lines.length<R;break e}var Y=D.width,P=null==Y||"auto"===Y;if("string"==typeof Y&&"%"===Y.charAt(Y.length-1))C.percentWidth=Y,g.push(C),C.contentWidth=lR(lL(I),C.text);else{if(P){var N=D.backgroundColor,B=N&&N.image;B&&c$(B=function(e){if("string"!=typeof e)return e;var t=cW.get(e);return t&&t.image}(B))&&(C.width=Math.max(C.width,B.width*O/B.height))}var H=v&&null!=u?u-M:null;null!=H&&H<C.width?!P||H<L?(C.text="",C.width=C.contentWidth=0):(!function(e,t,n,i,o,r){if(!n){e.text="",e.isTruncated=!1;return}var a=(t+"").split("\n");r=cX(n,i,o,r);for(var s=!1,l={},c=0,d=a.length;c<d;c++)cK(l,a[c],r),a[c]=l.textLine,s=s||l.isTruncated;e.text=a.join("\n"),e.isTruncated=s}(x,C.text,H-L,I,t.ellipsis,{minChar:t.truncateMinChar}),C.text=x.text,a.isTruncated=a.isTruncated||x.isTruncated,C.width=C.contentWidth=lR(lL(I),C.text)):C.contentWidth=lR(lL(I),C.text)}C.width+=L,M+=C.width,D&&(T=Math.max(T,C.lineHeight))}w(E,M,T)}a.outerWidth=a.width=rV(u,y),a.outerHeight=a.height=rV(m,_),a.contentHeight=_,a.contentWidth=y,a.outerWidth+=c,a.outerHeight+=d;for(var k=0;k<g.length;k++){var C=g[k],z=C.percentWidth;C.width=parseInt(z,10)/100*a.width}return a}(up(e),e,ui.outerWidth,ui.outerHeight,n),s=a.width,l=a.outerWidth,c=a.outerHeight,d=e.padding;this.isTruncated=!!a.isTruncated;var u=lN(o,l,n),m=lB(r,c,i),f=u,p=m;d&&(f+=d[3],p+=d[0]);var h=f+s;uh(e)&&this._renderBackground(e,e,u,m,l,c);for(var b=!!e.backgroundColor,g=0;g<a.lines.length;g++){for(var _=a.lines[g],y=_.tokens,v=y.length,F=_.lineHeight,x=_.width,w=0,k=f,E=h,T=v-1,M=void 0;w<v&&(!(M=y[w]).align||"left"===M.align);)this._placeToken(M,e,F,p,k,"left",b),x-=M.width,k+=M.width,w++;for(;T>=0&&"right"===(M=y[T]).align;)this._placeToken(M,e,F,p,E,"right",b),x-=M.width,E-=M.width,T--;for(k+=(s-(k-f)-(h-E)-x)/2;w<=T;)M=y[w],this._placeToken(M,e,F,p,k+M.width/2,"center",b),k+=M.width,w++;p+=F}},t.prototype._placeToken=function(e,t,n,i,o,r,a){var s=t.rich[e.styleName]||{};s.text=e.text;var l=e.verticalAlign,c=i+n/2;"top"===l?c=i+e.height/2:"bottom"===l&&(c=i+n-e.height/2),!e.isLineHolder&&uh(s)&&this._renderBackground(s,t,"right"===r?o-e.width:"center"===r?o-e.width/2:o,c-e.height/2,e.width,e.height);var d=!!s.backgroundColor,u=e.textPadding;u&&(o=uf(o,r,u),c-=e.height/2-u[0]-e.innerHeight/2);var m=this._getOrCreateChild(dQ),f=m.createStyle();m.useStyle(f);var p=this._defaultStyle,h=!1,b=0,g=!1,_=um("fill"in s?s.fill:"fill"in t?t.fill:(h=!0,p.fill)),y=uu("stroke"in s?s.stroke:"stroke"in t?t.stroke:d||a||p.autoStroke&&!h?null:(b=2,g=!0,p.stroke)),v=s.textShadowBlur>0||t.textShadowBlur>0;f.text=e.text,f.x=o,f.y=c,v&&(f.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,f.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",f.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,f.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),f.textAlign=r,f.textBaseline="middle",f.font=e.font||ro,f.opacity=rG(s.opacity,t.opacity,1),uc(f,s),y&&(f.lineWidth=rG(s.lineWidth,t.lineWidth,b),f.lineDash=rV(s.lineDash,t.lineDash),f.lineDashOffset=t.lineDashOffset||0,f.stroke=y),_&&(f.fill=_),m.setBoundingRect(c8(f,e.contentWidth,e.contentHeight,g?0:null))},t.prototype._renderBackground=function(e,t,n,i,o,r){var a,s,l=e.backgroundColor,c=e.borderWidth,d=e.borderColor,u=l&&l.image,m=l&&!u,f=e.borderRadius,p=this;if(m||e.lineHeight||c&&d){(a=this._getOrCreateChild(ut)).useStyle(a.createStyle()),a.style.fill=null;var h=a.shape;h.x=n,h.y=i,h.width=o,h.height=r,h.r=f,a.dirtyShape()}if(m){var b=a.style;b.fill=l||null,b.fillOpacity=rV(e.fillOpacity,1)}else if(u){(s=this._getOrCreateChild(d5)).onload=function(){p.dirtyStyle()};var g=s.style;g.image=l.image,g.x=n,g.y=i,g.width=o,g.height=r}if(c&&d){var b=a.style;b.lineWidth=c,b.stroke=d,b.strokeOpacity=rV(e.strokeOpacity,1),b.lineDash=e.borderDash,b.lineDashOffset=e.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(b.strokeFirst=!0,b.lineWidth*=2)}var _=(a||s).style;_.shadowBlur=e.shadowBlur||0,_.shadowColor=e.shadowColor||"transparent",_.shadowOffsetX=e.shadowOffsetX||0,_.shadowOffsetY=e.shadowOffsetY||0,_.opacity=rG(e.opacity,t.opacity,1)},t.makeFont=function(e){var t,n,i="";return(null!=(t=e).fontSize||t.fontFamily||t.fontWeight)&&(i=[e.fontStyle,e.fontWeight,"string"==typeof(n=e.fontSize)&&(-1!==n.indexOf("px")||-1!==n.indexOf("rem")||-1!==n.indexOf("em"))?n:isNaN(+n)?"12px":n+"px",e.fontFamily||"sans-serif"].join(" ")),i&&rK(i)||e.textFont||e.font},t}(dr),ua={left:!0,right:1,center:1},us={top:1,bottom:1,middle:1},ul=["fontStyle","fontWeight","fontSize","fontFamily"];function uc(e,t){for(var n=0;n<ul.length;n++){var i=ul[n],o=t[i];null!=o&&(e[i]=o)}}function ud(e){if(e){e.font=ur.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||ua[t]?t:"left";var n=e.verticalAlign;"center"===n&&(n="middle"),e.verticalAlign=null==n||us[n]?n:"top",e.padding&&(e.padding=rq(e.padding))}}function uu(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function um(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function uf(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function up(e){var t=e.text;return null!=t&&(t+=""),t}function uh(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}let ub=ur;var ug=ck(),u_=function(e,t,n,i){if(i){var o=ug(i);o.dataIndex=n,o.dataType=t,o.seriesIndex=e,o.ssrType="chart","group"===i.type&&i.traverse(function(i){var o=ug(i);o.seriesIndex=e,o.dataIndex=n,o.dataType=t,o.ssrType="chart"})}},uy=1,uv={},uF=ck(),ux=ck(),uw=["emphasis","blur","select"],uk=["normal","emphasis","blur","select"],uE="highlight",uT="downplay",uM="select",uA="unselect",uC="toggleSelect",uD="selectchanged";function uS(e){return null!=e&&"none"!==e}function uL(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function uI(e){uL(e,"emphasis",2)}function uO(e){2===e.hoverState&&uL(e,"normal",0)}function uR(e){uL(e,"blur",1)}function uY(e){1===e.hoverState&&uL(e,"normal",0)}function uP(e){e.selected=!0}function uN(e){e.selected=!1}function uB(e,t,n){t(e,n),e.isGroup&&e.traverse(function(e){t(e,n)})}function uH(e,t){var n,i,o,r,a,s=this.states[e];if(this.style){if("emphasis"===e)return function(e,t,n,i){var o=n&&rk(n,"select")>=0,r=!1;if(e instanceof dJ){var a=uF(e),s=o&&a.selectFill||a.normalFill,l=o&&a.selectStroke||a.normalStroke;if(uS(s)||uS(l)){var c=(i=i||{}).style||{};"inherit"===c.fill?(r=!0,i=rx({},i),(c=rx({},c)).fill=s):!uS(c.fill)&&uS(s)?(r=!0,i=rx({},i),(c=rx({},c)).fill=s2(s)):!uS(c.stroke)&&uS(l)&&(r||(i=rx({},i),c=rx({},c)),c.stroke=s2(l)),i.style=c}}if(i&&null==i.z2){r||(i=rx({},i));var d=e.z2EmphasisLift;i.z2=e.z2+(null!=d?d:10)}return i}(this,0,t,s);else if("blur"===e)return n=s,i=rk(this.currentStates,e)>=0,o=this.style.opacity,r=i?null:function(e,t,n,i){for(var o=e.style,r={},a=0;a<t.length;a++){var s=t[a],l=o[s];r[s]=null==l?i&&i[s]:l}for(var a=0;a<e.animators.length;a++){var c=e.animators[a];c.__fromStateTransition&&0>c.__fromStateTransition.indexOf(n)&&"style"===c.targetName&&c.saveTo(r,t)}return r}(this,["opacity"],e,{opacity:1}),null==(a=(n=n||{}).style||{}).opacity&&(n=rx({},n),a=rx({opacity:i?o:.1*r.opacity},a),n.style=a),n;else if("select"===e){var l=s;if(l&&null==l.z2){l=rx({},l);var c=this.z2SelectLift;l.z2=this.z2+(null!=c?c:9)}return l}}return s}function uz(e){e.stateProxy=uH;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=uH),n&&(n.stateProxy=uH)}function uj(e,t){uG(e,t)||e.__highByOuter||uB(e,uI)}function uU(e,t){uG(e,t)||e.__highByOuter||uB(e,uO)}function uW(e,t){e.__highByOuter|=1<<(t||0),uB(e,uI)}function uV(e,t){(e.__highByOuter&=~(1<<(t||0)))||uB(e,uO)}function uG(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function u$(e){var t=e.getModel(),n=[],i=[];t.eachComponent(function(t,o){var r=ux(o),a="series"===t,s=a?e.getViewOfSeriesModel(o):e.getViewOfComponentModel(o);a||i.push(s),r.isBlured&&(s.group.traverse(function(e){uY(e)}),a&&n.push(o)),r.isBlured=!1}),rM(i,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function uq(e,t,n,i){var o=i.getModel();function r(e,t){for(var n=0;n<t.length;n++){var i=e.getItemGraphicEl(t[n]);i&&uB(i,uY)}}if((n=n||"coordinateSystem",null!=e)&&t&&"none"!==t){var a=o.getSeriesByIndex(e),s=a.coordinateSystem;s&&s.master&&(s=s.master);var l=[];o.eachSeries(function(e){var o=a===e,c=e.coordinateSystem;c&&c.master&&(c=c.master);var d=c&&s?c===s:o;if(!("series"===n&&!o||"coordinateSystem"===n&&!d||"series"===t&&o)){if(i.getViewOfSeriesModel(e).group.traverse(function(e){e.__highByOuter&&o&&"self"===t||uR(e)}),rT(t))r(e.getData(),t);else if(rB(t))for(var u=rS(t),m=0;m<u.length;m++)r(e.getData(u[m]),t[u[m]]);l.push(e),ux(e).isBlured=!0}}),o.eachComponent(function(e,t){if("series"!==e){var n=i.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(l,!0,o)}})}}function uX(e,t,n){if(null!=e&&null!=t){var i=n.getModel().getComponent(e,t);if(i){ux(i).isBlured=!0;var o=n.getViewOfComponentModel(i);o&&o.focusBlurEnabled&&o.group.traverse(function(e){uR(e)})}}}function uK(e,t,n,i){var o,r={focusSelf:!1,dispatchers:null};if(null==e||"series"===e||null==t||null==n)return r;var a=i.getModel().getComponent(e,t);if(!a)return r;var s=i.getViewOfComponentModel(a);if(!s||!s.findHighDownDispatchers)return r;for(var l=s.findHighDownDispatchers(n),c=0;c<l.length;c++)if("self"===ug(l[c]).focus){o=!0;break}return{focusSelf:o,dispatchers:l}}function uJ(e){rM(e.getAllData(),function(t){var n=t.data,i=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,i)?uB(t,uP):uB(t,uN)})})}function uZ(e,t,n){var i,o,r,a;u1(e,!0),uB(e,uz),i=e,o=t,r=n,a=ug(i),null!=o?(a.focus=o,a.blurScope=r):a.focus&&(a.focus=null)}var uQ=["emphasis","blur","select"],u0={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function u1(e,t){var n=!1===t;e.highDownSilentOnTouch&&(e.__highDownSilentOnTouch=e.highDownSilentOnTouch),(!n||e.__highDownDispatcher)&&(e.__highByOuter=e.__highByOuter||0,e.__highDownDispatcher=!n)}function u2(e){return!!(e&&e.__highDownDispatcher)}function u5(e){var t=e.type;return t===uM||t===uA||t===uC}function u3(e){var t=e.type;return t===uE||t===uT}var u4={};function u6(e,t,n){var i,o=e.labelFetcher,r=e.labelDataIndex,a=e.labelDimIndex,s=t.normal;o&&(i=o.getFormattedLabel(r,"normal",null,a,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null)),null==i&&(i=rR(e.defaultText)?e.defaultText(r,e,n):e.defaultText);for(var l={normal:i},c=0;c<uw.length;c++){var d=uw[c],u=t[d];l[d]=rV(o?o.getFormattedLabel(r,d,null,a,u&&u.get("formatter")):null,i)}return l}function u8(e,t,n,i,o){var r={};return function(e,t,n,i,o){n=n||u4;var r,a=t.ecModel,s=a&&a.option.textStyle,l=function(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||u4).rich;if(n){t=t||{};for(var i=rS(n),o=0;o<i.length;o++)t[i[o]]=1}e=e.parentModel}return t}(t);if(l){r={};var c="richInheritPlainLabel",d=rV(t.get(c),a?a.get(c):void 0);for(var u in l)if(l.hasOwnProperty(u)){var m=t.getModel(["rich",u]);mn(r[u]={},m,s,t,d,n,i,o,!1,!0)}}r&&(e.rich=r);var f=t.get("overflow");f&&(e.overflow=f);var p=t.get("lineOverflow");p&&(e.lineOverflow=p);var h=t.get("minMargin");if(null!=h)e.margin=[h=rN(h)?h/2:0,h,h,h],e.__marginType=mo.minMargin;else{var b=t.get("textMargin");null!=b&&(e.margin=rq(b),e.__marginType=mo.textMargin)}mn(e,t,s,null,null,n,i,o,!0,!1)}(r,e,n,i,o),t&&rx(r,t),r}function u7(e,t,n){t=t||{};var i,o={},r=e.getShallow("rotate"),a=rV(e.getShallow("distance"),n?null:5),s=e.getShallow("offset");return"outside"===(i=e.getShallow("position")||(n?null:"inside"))&&(i=t.defaultOutsidePosition||"top"),null!=i&&(o.position=i),null!=s&&(o.offset=s),null!=r&&(o.rotation=r*=Math.PI/180),null!=a&&(o.distance=a),o.outsideFill="inherit"===e.get("color")?t.inheritColor||null:"auto",null!=t.autoOverflowArea&&(o.autoOverflowArea=t.autoOverflowArea),null!=t.layoutRect&&(o.layoutRect=t.layoutRect),o}var u9=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],me=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],mt=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function mn(e,t,n,i,o,r,a,s,l,c){n=!a&&n||u4;var d=r&&r.inheritColor,u=t.getShallow("color"),m=t.getShallow("textBorderColor"),f=rV(t.getShallow("opacity"),n.opacity);("inherit"===u||"auto"===u)&&(u=d||null),("inherit"===m||"auto"===m)&&(m=d||null),s||(u=u||n.color,m=m||n.textBorderColor),null!=u&&(e.fill=u),null!=m&&(e.stroke=m);var p=rV(t.getShallow("textBorderWidth"),n.textBorderWidth);null!=p&&(e.lineWidth=p);var h=rV(t.getShallow("textBorderType"),n.textBorderType);null!=h&&(e.lineDash=h);var b=rV(t.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=b&&(e.lineDashOffset=b),a||null!=f||c||(f=r&&r.defaultOpacity),null!=f&&(e.opacity=f),a||s||null!=e.fill||!r.inheritColor||(e.fill=r.inheritColor);for(var g=0;g<u9.length;g++){var _=u9[g],y=!1!==o&&i?rG(t.getShallow(_),i.getShallow(_),n[_]):rV(t.getShallow(_),n[_]);null!=y&&(e[_]=y)}for(var g=0;g<me.length;g++){var _=me[g],y=t.getShallow(_);null!=y&&(e[_]=y)}if(null==e.verticalAlign){var v=t.getShallow("baseline");null!=v&&(e.verticalAlign=v)}if(!l||!r.disableBox){for(var g=0;g<mt.length;g++){var _=mt[g],y=t.getShallow(_);null!=y&&(e[_]=y)}var F=t.getShallow("borderType");null!=F&&(e.borderDash=F),("auto"===e.backgroundColor||"inherit"===e.backgroundColor)&&d&&(e.backgroundColor=d),("auto"===e.borderColor||"inherit"===e.borderColor)&&d&&(e.borderColor=d)}}var mi=ck(),mo={minMargin:1,textMargin:2},mr=["textStyle","color"],ma=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],ms=new ub,ml=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(mr):null)},e.prototype.getFont=function(){var e,t,n;return e={fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},n=(t=this.ecModel)&&t.getModel("textStyle"),rK([e.fontStyle||n&&n.getShallow("fontStyle")||"",e.fontWeight||n&&n.getShallow("fontWeight")||"",(e.fontSize||n&&n.getShallow("fontSize")||12)+"px",e.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<ma.length;n++)t[ma[n]]=this.getShallow(ma[n]);return ms.useStyle(t),ms.update(),ms.getBoundingRect()},e}(),mc=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],md=cz(mc),mu=function(){function e(){}return e.prototype.getLineStyle=function(e){return md(this,e)},e}(),mm=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],mf=cz(mm),mp=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return mf(this,e,t)},e}(),mh=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o]},e.prototype.mergeOption=function(e,t){rF(this.option,e,!0)},e.prototype.get=function(e,t){return null==e?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var n=this.option,i=null==n?n:n[e];if(null==i&&!t){var o=this.parentModel;o&&(i=o.getShallow(e))}return i},e.prototype.getModel=function(t,n){var i=null!=t,o=i?this.parsePath(t):null;return new e(i?this._doGet(o):this.option,n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(o)),this.ecModel)},e.prototype.isEmpty=function(){return null==this.option},e.prototype.restoreData=function(){},e.prototype.clone=function(){return new this.constructor(rv(this.option))},e.prototype.parsePath=function(e){return"string"==typeof e?e.split("."):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!ri.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;else if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var i=0;i<e.length&&(!e[i]||null!=(n=n&&"object"==typeof n?n[e[i]]:null));i++);return null==n&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},e}();cR(mh),function(e){var t=["__\0is_clz",cP++].join("_");e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}(mh),rE(mh,mu),rE(mh,mp),rE(mh,cU),rE(mh,ml);var mb=Math.round(10*Math.random());function mg(e){return[e||"",mb++].join("_")}function m_(e,t){return rF(rF({},e,!0),t,!0)}var my={},mv={},mF=ri.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage||"EN").toUpperCase().indexOf("ZH")>-1?"ZH":"EN";function mx(e,t){mv[e=e.toUpperCase()]=new mh(t),my[e]=t}function mw(){return null}mx("EN",{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:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},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:". "}}}}),mx("ZH",{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:"旭日图",custom:"自定义图表",chart:"图表"}},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:""}}}});var mk={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},mE={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},mT="{yyyy}-{MM}-{dd}",mM={year:"{yyyy}",month:"{yyyy}-{MM}",day:mT,hour:mT+" "+mE.hour,minute:mT+" "+mE.minute,second:mT+" "+mE.second,millisecond:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},mA=["year","month","day","hour","minute","second","millisecond"],mC=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function mD(e,t){return e+="","0000".substr(0,t-e.length)+e}function mS(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function mL(e,t,n,i){var o=cs(e),r=o[mR(n)](),a=o[mY(n)]()+1,s=Math.floor((a-1)/3)+1,l=o[mP(n)](),c=o["get"+(n?"UTC":"")+"Day"](),d=o[mN(n)](),u=(d-1)%12+1,m=o[mB(n)](),f=o[mH(n)](),p=o[mz(n)](),h=d>=12?"pm":"am",b=h.toUpperCase(),g=(i instanceof mh?i:mv[i||mF]||mv.EN).getModel("time"),_=g.get("month"),y=g.get("monthAbbr"),v=g.get("dayOfWeek"),F=g.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,h+"").replace(/{A}/g,b+"").replace(/{yyyy}/g,r+"").replace(/{yy}/g,mD(r%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[a-1]).replace(/{MMM}/g,y[a-1]).replace(/{MM}/g,mD(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,mD(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,v[c]).replace(/{ee}/g,F[c]).replace(/{e}/g,c+"").replace(/{HH}/g,mD(d,2)).replace(/{H}/g,d+"").replace(/{hh}/g,mD(u+"",2)).replace(/{h}/g,u+"").replace(/{mm}/g,mD(m,2)).replace(/{m}/g,m+"").replace(/{ss}/g,mD(f,2)).replace(/{s}/g,f+"").replace(/{SSS}/g,mD(p,3)).replace(/{S}/g,p+"")}function mI(e,t){var n=cs(e),i=n[mY(t)]()+1,o=n[mP(t)](),r=n[mN(t)](),a=n[mB(t)](),s=n[mH(t)](),l=0===n[mz(t)](),c=l&&0===s,d=c&&0===a,u=d&&0===r,m=u&&1===o;if(m&&1===i)return"year";if(m)return"month";if(u)return"day";if(d)return"hour";if(c)return"minute";else if(l)return"second";else return"millisecond"}function mO(e,t,n){switch(t){case"year":e[mj(n)](0);case"month":e[mU(n)](1);case"day":e[mW(n)](0);case"hour":e[mV(n)](0);case"minute":e[mG(n)](0);case"second":e[m$(n)](0)}return e}function mR(e){return e?"getUTCFullYear":"getFullYear"}function mY(e){return e?"getUTCMonth":"getMonth"}function mP(e){return e?"getUTCDate":"getDate"}function mN(e){return e?"getUTCHours":"getHours"}function mB(e){return e?"getUTCMinutes":"getMinutes"}function mH(e){return e?"getUTCSeconds":"getSeconds"}function mz(e){return e?"getUTCMilliseconds":"getMilliseconds"}function mj(e){return e?"setUTCMonth":"setMonth"}function mU(e){return e?"setUTCDate":"setDate"}function mW(e){return e?"setUTCHours":"setHours"}function mV(e){return e?"setUTCMinutes":"setMinutes"}function mG(e){return e?"setUTCSeconds":"setSeconds"}function m$(e){return e?"setUTCMilliseconds":"setMilliseconds"}function mq(e){if(isNaN(cd(e)))return rY(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function mX(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}function mK(e,t,n){function i(e){return e&&rK(e)?e:"-"}function o(e){return!!(null!=e&&!isNaN(e)&&isFinite(e))}var r="time"===t,a=e instanceof Date;if(r||a){var s=r?cs(e):e;if(!isNaN(+s))return mL(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return rP(e)?i(e):rN(e)&&o(e)?e+"":"-";var l=cd(e);return o(l)?mq(l):rP(e)?i(e):"boolean"==typeof e?e+"":"-"}var mJ=["a","b","c","d","e","f","g"],mZ=function(e,t){return"{"+e+(null==t?"":t)+"}"};function mQ(e,t,n){rO(t)||(t=[t]);var i=t.length;if(!i)return"";for(var o=t[0].$vars||[],r=0;r<o.length;r++){var a=mJ[r];e=e.replace(mZ(a),mZ(a,0))}for(var s=0;s<i;s++)for(var l=0;l<o.length;l++){var c=t[s][o[l]];e=e.replace(mZ(mJ[l],s),n?ay(c):c)}return e}function m0(e,t){return t=t||"transparent",rY(e)?e:rB(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var m1={},m2={},m5=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){function n(n,i){var o=[];return rM(n,function(n,i){var r=n.create(e,t);o=o.concat(r||[])}),o}this._nonSeriesBoxMasterList=n(m1,!0),this._normalMasterList=n(m2,!1)},e.prototype.update=function(e,t){rM(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if("matrix"===e||"calendar"===e){m1[e]=t;return}m2[e]=t},e.get=function(e){return m2[e]||m1[e]},e}(),m3={coord:1,coord2:2},m4=r1(),m6={none:0,dataCoordSys:1,boxCoordSys:2},m8=["left","right","top","bottom","width","height"],m7=[["width","left","right"],["height","top","bottom"]];function m9(e,t,n,i,o){var r=0,a=0;null==i&&(i=1/0),null==o&&(o=1/0);var s=0;t.eachChild(function(l,c){var d,u,m=l.getBoundingRect(),f=t.childAt(c+1),p=f&&f.getBoundingRect();if("horizontal"===e){var h=m.width+(p?-p.x+m.x:0);(d=r+h)>i||l.newline?(r=0,d=h,a+=s+n,s=m.height):s=Math.max(s,m.height)}else{var b=m.height+(p?-p.y+m.y:0);(u=a+b)>o||l.newline?(r+=s+n,a=0,u=b,s=m.width):s=Math.max(s,m.width)}l.newline||(l.x=r,l.y=a,l.markRedraw(),"horizontal"===e?r=d+n:a=u+n)})}function fe(e,t,n){n=rq(n||0);var i=t.width,o=t.height,r=l7(e.left,i),a=l7(e.top,o),s=l7(e.right,i),l=l7(e.bottom,o),c=l7(e.width,i),d=l7(e.height,o),u=n[2]+n[0],m=n[1]+n[3],f=e.aspect;switch(isNaN(c)&&(c=i-s-m-r),isNaN(d)&&(d=o-l-u-a),null!=f&&(isNaN(c)&&isNaN(d)&&(f>i/o?c=.8*i:d=.8*o),isNaN(c)&&(c=f*d),isNaN(d)&&(d=c/f)),isNaN(r)&&(r=i-s-c-m),isNaN(a)&&(a=o-l-d-u),e.left||e.right){case"center":r=i/2-c/2-n[3];break;case"right":r=i-c-m}switch(e.top||e.bottom){case"middle":case"center":a=o/2-d/2-n[0];break;case"bottom":a=o-d-u}r=r||0,a=a||0,isNaN(c)&&(c=i-m-r-(s||0)),isNaN(d)&&(d=o-u-a-(l||0));var p=new a3((t.x||0)+r+n[3],(t.y||0)+a+n[0],c,d);return p.margin=n,p}rI(m9,"vertical"),rI(m9,"horizontal");var ft={rect:1,point:2};function fn(e,t,n){var i,o,r,a,s=e.boxCoordinateSystem;if(s){var l=function(e){var t=e.getShallow("coord",!0),n=m3.coord;if(null==t){var i=m4.get(e.type);i&&i.getCoord2&&(n=m3.coord2,t=i.getCoord2(e))}return{coord:t,from:n}}(e),c=l.coord,d=l.from;if(s.dataToLayout){r=ft.rect,a=d;var u=s.dataToLayout(c);i=u.contentRect||u.rect}else n&&n.enableLayoutOnlyByCenter&&s.dataToPoint&&(r=ft.point,a=d,o=s.dataToPoint(c))}return null==r&&(r=ft.rect),r===ft.rect&&(i||(i={x:0,y:0,width:t.getWidth(),height:t.getHeight()}),o=[i.x+i.width/2,i.y+i.height/2]),{type:r,refContainer:i,refPoint:o,boxCoordFrom:a}}function fi(e){var t=e.layoutMode||e.constructor.layoutMode;return rB(t)?t:t?{type:t}:null}function fo(e,t,n){var i=n&&n.ignoreSize;rO(i)||(i=[i,i]);var o=a(m7[0],0),r=a(m7[1],1);function a(n,o){var r={},a=0,l={},c=0;if(rM(n,function(t){l[t]=e[t]}),rM(n,function(e){r3(t,e)&&(r[e]=l[e]=t[e]),s(r,e)&&a++,s(l,e)&&c++}),i[o])return s(t,n[1])?l[n[2]]=null:s(t,n[2])&&(l[n[1]]=null),l;if(2===c||!a)return l;if(a>=2)return r;for(var d=0;d<n.length;d++){var u=n[d];if(!r3(r,u)&&r3(e,u)){r[u]=e[u];break}}return r}function s(e,t){return null!=e[t]&&"auto"!==e[t]}function l(e,t,n){rM(e,function(e){t[e]=n[e]})}l(m7[0],e,o),l(m7[1],e,r)}function fr(e){var t,n;return t={},(n=e)&&t&&rM(m8,function(e){r3(n,e)&&(t[e]=n[e])}),t}var fa=ck(),fs=function(e){var t;function n(t,n,i){var o=e.call(this,t,n,i)||this;return o.uid=mg("ec_cpt_model"),o}return rt(n,e),n.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},n.prototype.mergeDefaultAndTheme=function(e,t){var n=fi(this),i=n?fr(e):{};rF(e,t.getTheme().get(this.mainType)),rF(e,this.getDefaultOption()),n&&fo(e,i,n)},n.prototype.mergeOption=function(e,t){rF(this.option,e,!0);var n=fi(this);n&&fo(this.option,e,n)},n.prototype.optionUpdated=function(e,t){},n.prototype.getDefaultOption=function(){var e=this.constructor;if(!(e&&e[cI]))return e.defaultOption;var t=fa(this);if(!t.defaultOption){for(var n=[],i=e;i;){var o=i.prototype.defaultOption;o&&n.push(o),i=i.superClass}for(var r={},a=n.length-1;a>=0;a--)r=rF(r,n[a],!0);t.defaultOption=r}return t.defaultOption},n.prototype.getReferringComponents=function(e,t){return cD(this.ecModel,e,{index:this.get(e+"Index",!0),id:this.get(e+"Id",!0)},t)},n.prototype.getBoxLayoutParams=function(){return{left:this.getShallow("left",!1),top:this.getShallow("top",!1),right:this.getShallow("right",!1),bottom:this.getShallow("bottom",!1),width:this.getShallow("width",!1),height:this.getShallow("height",!1)}},n.prototype.getZLevelKey=function(){return""},n.prototype.setZLevel=function(e){this.option.zlevel=e},n.protoInitialize=void((t=n.prototype).type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0),n}(mh);cY(fs,mh),cH(fs),function(e){var t={};e.registerSubTypeDefaulter=function(e,n){t[cO(e).main]=n},e.determineSubType=function(n,i){var o=i.type;if(!o){var r=cO(n).main;e.hasSubTypes(n)&&t[r]&&(o=t[r](i))}return o}}(fs),function(e,t){e.topologicalTravel=function(e,i,o,r){if(e.length){var a,s,l,c=(s={},l=[],rM(a=i,function(e){var i,o,r,c=n(s,e),d=(i=c.originalDeps=t(e),o=a,r=[],rM(i,function(e){rk(o,e)>=0&&r.push(e)}),r);c.entryCount=d.length,0===c.entryCount&&l.push(e),rM(d,function(t){0>rk(c.predecessor,t)&&c.predecessor.push(t);var i=n(s,t);0>rk(i.successor,t)&&i.successor.push(e)})}),{graph:s,noEntryList:l}),d=c.graph,u=c.noEntryList,m={};for(rM(e,function(e){m[e]=!0});u.length;){var f=u.pop(),p=d[f],h=!!m[f];h&&(o.call(r,f,p.originalDeps.slice()),delete m[f]),rM(p.successor,h?g:b)}rM(m,function(){throw Error("")})}function b(e){d[e].entryCount--,0===d[e].entryCount&&u.push(e)}function g(e){m[e]=!0,b(e)}};function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}}(fs,function(e){var t=[];return rM(fs.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=rA(t,function(e){return cO(e).main}),"dataset"!==e&&0>=rk(t,"dataset")&&t.unshift("dataset"),t});var fl={color:{},darkColor:{},size:{}},fc=fl.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};for(var fd in rx(fc,{primary:fc.neutral80,secondary:fc.neutral70,tertiary:fc.neutral60,quaternary:fc.neutral50,disabled:fc.neutral20,border:fc.neutral30,borderTint:fc.neutral20,borderShade:fc.neutral40,background:fc.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:fc.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:fc.neutral70,axisLineTint:fc.neutral40,axisTick:fc.neutral70,axisTickMinor:fc.neutral60,axisLabel:fc.neutral70,axisSplitLine:fc.neutral15,axisMinorSplitLine:fc.neutral05}),fc)if(fc.hasOwnProperty(fd)){var fu=fc[fd];"theme"===fd?fl.darkColor.theme=fc.theme.slice():"highlight"===fd?fl.darkColor.highlight="rgba(255,231,130,0.4)":0===fd.indexOf("accent")?fl.darkColor[fd]=sZ(fu,null,function(e){return .5*e},function(e){return Math.min(1,1.3-e)}):fl.darkColor[fd]=sZ(fu,null,function(e){return .9*e},function(e){return 1-Math.pow(e,1.5)})}fl.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var fm="";"undefined"!=typeof navigator&&(fm=navigator.platform||"");var ff="rgba(0, 0, 0, 0.2)",fp=fl.color.theme["0"],fh=sZ(fp,null,null,.9);let fb={darkMode:"auto",colorBy:"series",color:fl.color.theme,gradientColor:[fh,fp],aria:{decal:{decals:[{color:ff,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:ff,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:ff,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:ff,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:ff,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:ff,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:fm.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 fg=r1(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),f_="original",fy="arrayRows",fv="objectRows",fF="keyedColumns",fx="typedArray",fw="unknown",fk="column",fE={Must:1,Might:2,Not:3},fT=ck();function fM(e,t,n){var i,o,r={},a=fA(t);if(!a||!e)return r;var s=[],l=[],c=fT(t.ecModel).datasetMap,d=a.uid+"_"+n.seriesLayoutBy;rM(e=e.slice(),function(t,n){var a=rB(t)?t:e[n]={name:t};"ordinal"===a.type&&null==i&&(i=n,o=f(a)),r[a.name]=[]});var u=c.get(d)||c.set(d,{categoryWayDim:o,valueWayDim:0});function m(e,t,n){for(var i=0;i<n;i++)e.push(t+i)}function f(e){var t=e.dimsDef;return t?t.length:1}return rM(e,function(e,t){var n=e.name,o=f(e);if(null==i){var a=u.valueWayDim;m(r[n],a,o),m(l,a,o),u.valueWayDim+=o}else if(i===t)m(r[n],0,o),m(s,0,o);else{var a=u.categoryWayDim;m(r[n],a,o),m(l,a,o),u.categoryWayDim+=o}}),s.length&&(r.itemName=s),l.length&&(r.seriesName=l),r}function fA(e){if(!e.get("data",!0))return cD(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},cA).models[0]}function fC(e,t){return function(e,t,n,i,o,r){var a,s,l;if(rz(e))return fE.Not;if(i){var c=i[r];rB(c)?(s=c.name,l=c.type):rY(c)&&(s=c)}if(null!=l)return"ordinal"===l?fE.Must:fE.Not;if(t===fy)if("row"===n){for(var d=e[r],u=0;u<(d||[]).length&&u<5;u++)if(null!=(a=h(d[o+u])))return a}else for(var u=0;u<e.length&&u<5;u++){var m=e[o+u];if(m&&null!=(a=h(m[r])))return a}else if(t===fv){if(!s)return fE.Not;for(var u=0;u<e.length&&u<5;u++){var f=e[u];if(f&&null!=(a=h(f[s])))return a}}else if(t===fF){if(!s)return fE.Not;var d=e[s];if(!d||rz(d))return fE.Not;for(var u=0;u<d.length&&u<5;u++)if(null!=(a=h(d[u])))return a}else if(t===f_)for(var u=0;u<e.length&&u<5;u++){var f=e[u],p=cg(f);if(!rO(p))return fE.Not;if(null!=(a=h(p[r])))return a}function h(e){var t=rY(e);return null!=e&&Number.isFinite(Number(e))&&""!==e?t?fE.Might:fE.Not:t&&"-"!==e?fE.Must:void 0}return fE.Not}(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}var fD=r1(),fS=ck();ck();var fL=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){return function(e,t,n,i,o,r,a){var s=t(r=r||e),l=s.paletteIdx||0,c=s.paletteNameMap=s.paletteNameMap||{};if(c.hasOwnProperty(o))return c[o];var d=null!=a&&i?function(e,t){for(var n=e.length,i=0;i<n;i++)if(e[i].length>t)return e[i];return e[n-1]}(i,a):n;if((d=d||n)&&d.length){var u=d[l];return o&&(c[o]=u),s.paletteIdx=(l+1)%d.length,u}}(this,fS,cp(this.get("color",!0)),this.get("colorLayer",!0),e,t,n)},e.prototype.clearColorPalette=function(){var e,t;e=this,(t=fS)(e).paletteIdx=0,t(e).paletteNameMap={}},e}(),fI="\0_ec_inner",fO=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return rt(t,e),t.prototype.init=function(e,t,n,i,o,r){i=i||{},this.option=null,this._theme=new mh(i),this._locale=new mh(o),this._optionManager=r},t.prototype.setOption=function(e,t,n){var i=fP(t);this._optionManager.setOption(e,n,i),this._resetOption(null,i)},t.prototype.resetOption=function(e,t){return this._resetOption(e,fP(t))},t.prototype._resetOption=function(e,t){var n=!1,i=this._optionManager;if(!e||"recreate"===e){var o=i.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(o,t)):ew(this,o),n=!0}if(("timeline"===e||"media"===e)&&this.restoreData(),!e||"recreate"===e||"timeline"===e){var r=i.getTimelineOption(this);r&&(n=!0,this._mergeOption(r,t))}if(!e||"recreate"===e||"media"===e){var a=i.getMediaOption(this);a.length&&rM(a,function(e){n=!0,this._mergeOption(e,t)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,i=this._componentsMap,o=this._componentsCount,r=[],a=r1(),s=t&&t.replaceMergeMainTypeMap;fT(this).datasetMap=r1(),rM(e,function(e,t){null!=e&&(fs.hasClass(t)?t&&(r.push(t),a.set(t,!0)):n[t]=null==n[t]?rv(e):rF(n[t],e,!0))}),s&&s.each(function(e,t){fs.hasClass(t)&&!a.get(t)&&(r.push(t),a.set(t,!0))}),fs.topologicalTravel(r,fs.getAllClassMainTypes(),function(t){var r,a,l,c,d,u,m,f,p,h,b,g,_,y,v,F,x,w,k,E,T=function(e,t,n){var i=fD.get(t);if(!i)return n;var o=i(e);return o?n.concat(o):n}(this,t,cp(e[t])),M=i.get(t),A=M?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",C=(_=M,y=T,v="normalMerge"===A,F="replaceMerge"===A,x="replaceAll"===A,_=_||[],y=(y||[]).slice(),w=r1(),rM(y,function(e,t){if(!rB(e)){y[t]=null;return}}),k=function(e,t,n){var i=[];if("replaceAll"===n)return i;for(var o=0;o<e.length;o++){var r=e[o];r&&null!=r.id&&t.set(r.id,o),i.push({existing:"replaceMerge"===n||cx(r)?null:r,newOption:null,keyInfo:null,brandNew:null})}return i}(_,w,A),(v||F)&&(r=k,a=_,l=w,rM(c=y,function(e,t){if(e&&null!=e.id){var n=cy(e.id),i=l.get(n);if(null!=i){var o=r[i];rX(!o.newOption,'Duplicated option on id "'+n+'".'),o.newOption=e,o.existing=a[i],c[t]=null}}})),v&&(d=k,rM(u=y,function(e,t){if(e&&null!=e.name)for(var n=0;n<d.length;n++){var i=d[n].existing;if(!d[n].newOption&&i&&(null==i.id||null==e.id)&&!cx(e)&&!cx(i)&&c_("name",i,e)){d[n].newOption=e,u[t]=null;return}}})),v||F?(m=k,f=y,p=F,rM(f,function(e){if(e){for(var t,n=0;(t=m[n])&&(t.newOption||cx(t.existing)||t.existing&&null!=e.id&&!c_("id",e,t.existing));)n++;t?(t.newOption=e,t.brandNew=p):m.push({newOption:e,brandNew:p,existing:null,keyInfo:null}),n++}})):x&&(h=k,rM(y,function(e){h.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})})),b=k,g=r1(),rM(b,function(e){var t=e.existing;t&&g.set(t.id,e)}),rM(b,function(e){var t=e.newOption;rX(!t||null==t.id||!g.get(t.id)||g.get(t.id)===e,"id duplicates: "+(t&&t.id)),t&&null!=t.id&&g.set(t.id,e),e.keyInfo||(e.keyInfo={})}),rM(b,function(e,t){var n=e.existing,i=e.newOption,o=e.keyInfo;if(rB(i)){if(o.name=null!=i.name?cy(i.name):n?n.name:cf+t,n)o.id=cy(n.id);else if(null!=i.id)o.id=cy(i.id);else{var r=0;do o.id="\0"+o.name+"\0"+r++;while(g.get(o.id))}g.set(o.id,e)}}),k);rM(C,function(e){var n,i,o,r,a=e.newOption;rB(a)&&(e.keyInfo.mainType=t,e.keyInfo.subType=(n=t,i=a,o=e.existing,r=fs,i.type?i.type:o?o.subType:r.determineSubType(n,i)))}),n[t]=null,i.set(t,null),o.set(t,0);var D=[],S=[],L=0;rM(C,function(e,n){var i=e.existing,o=e.newOption;if(o){var r="series"===t,a=fs.getClass(t,e.keyInfo.subType,!r);if(!a)return;if("tooltip"===t){if(E)return;E=!0}if(i&&i.constructor===a)i.name=e.keyInfo.name,i.mergeOption(o,this),i.optionUpdated(o,!1);else{var s=rx({componentIndex:n},e.keyInfo);rx(i=new a(o,this,this,s),s),e.brandNew&&(i.__requireNewView=!0),i.init(o,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(D.push(i.option),S.push(i),L++):(D.push(void 0),S.push(void 0))},this),n[t]=D,i.set(t,S),o.set(t,L),"series"===t&&eF(this)},this),this._seriesIndices||eF(this)},t.prototype.getOption=function(){var e=rv(this.option);return rM(e,function(t,n){if(fs.hasClass(n)){for(var i=cp(t),o=i.length,r=!1,a=o-1;a>=0;a--)i[a]&&!cx(i[a])?r=!0:(i[a]=null,!r&&o--);i.length=o,e[n]=i}}),delete e[fI],e},t.prototype.setTheme=function(e){this._theme=new mh(e),this._resetOption("recreate",null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var i=n[t||0];if(i)return i;if(null==t){for(var o=0;o<n.length;o++)if(n[o])return n[o]}}},t.prototype.queryComponents=function(e){var t,n=e.mainType;if(!n)return[];var i=e.index,o=e.id,r=e.name,a=this._componentsMap.get(n);return a&&a.length?(null!=i?(t=[],rM(cp(i),function(e){a[e]&&t.push(a[e])})):t=null!=o?fR("id",o,a):null!=r?fR("name",r,a):rD(a,function(e){return!!e}),fY(t,e)):[]},t.prototype.findComponents=function(e){var t,n,i,o,r,a=e.query,s=e.mainType,l=(t=a,n=s+"Index",i=s+"Id",o=s+"Name",t&&(null!=t[n]||null!=t[i]||null!=t[o])?{mainType:s,index:t[n],id:t[i],name:t[o]}:null);return r=fY(l?this.queryComponents(l):rD(this._componentsMap.get(s),function(e){return!!e}),e),e.filter?rD(r,e.filter):r},t.prototype.eachComponent=function(e,t,n){var i=this._componentsMap;if(rR(e))i.each(function(n,i){for(var o=0;n&&o<n.length;o++){var r=n[o];r&&e.call(t,i,r,r.componentIndex)}});else for(var o=rY(e)?i.get(e):rB(e)?this.findComponents(e):null,r=0;o&&r<o.length;r++){var a=o[r];a&&t.call(n,a,a.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=cv(e,null);return rD(this._componentsMap.get("series"),function(e){return!!e&&null!=t&&e.name===t})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return rD(this._componentsMap.get("series"),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return rD(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,t){ex(this),rM(this._seriesIndices,function(n){var i=this._componentsMap.get("series")[n];e.call(t,i,n)},this)},t.prototype.eachRawSeries=function(e,t){rM(this._componentsMap.get("series"),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){ex(this),rM(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];o.subType===e&&t.call(n,o,i)},this)},t.prototype.eachRawSeriesByType=function(e,t,n){return rM(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return ex(this),null==this._seriesIndicesMap.get(e.componentIndex)},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){ex(this);var n=[];rM(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];e.call(t,o,i)&&n.push(i)},this),this._seriesIndices=n,this._seriesIndicesMap=r1(n)},t.prototype.restoreData=function(e){eF(this);var t=this._componentsMap,n=[];t.each(function(e,t){fs.hasClass(t)&&n.push(t)}),fs.topologicalTravel(n,fs.getAllClassMainTypes(),function(n){rM(t.get(n),function(t){t&&("series"!==n||!function(e,t){if(t){var n=t.seriesIndex,i=t.seriesId,o=t.seriesName;return null!=n&&e.componentIndex!==n||null!=i&&e.id!==i||null!=o&&e.name!==o}}(t,e))&&t.restoreData()})})},t.internalField=void(eF=function(e){var t=e._seriesIndices=[];rM(e._componentsMap.get("series"),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=r1(t)},ex=function(e){},ew=function(e,t){e.option={},e.option[fI]=1,e._componentsMap=r1({series:[]}),e._componentsCount=r1();var n,i,o,r=t.aria;rB(r)&&null==r.enabled&&(r.enabled=!0),n=t,i=e._theme.option,o=n.color&&!n.colorLayer,rM(i,function(e,t){"colorLayer"===t&&o||"color"===t&&n.color||fs.hasClass(t)||("object"==typeof e?n[t]=n[t]?rF(n[t],e,!1):rv(e):null==n[t]&&(n[t]=e))}),rF(t,fb,!1),e._mergeOption(t,null)}),t}(mh);function fR(e,t,n){if(rO(t)){var i=r1();return rM(t,function(e){null!=e&&null!=cv(e,null)&&i.set(e,!0)}),rD(n,function(t){return t&&i.get(t[e])})}var o=cv(t,null);return rD(n,function(t){return t&&null!=o&&t[e]===o})}function fY(e,t){return t.hasOwnProperty("subType")?rD(e,function(e){return e&&e.subType===t.subType}):e}function fP(e){var t=r1();return e&&rM(cp(e.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}rE(fO,fL);var fN=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"];let fB=function(e){rM(fN,function(t){this[t]=rL(e[t],e)},this)};var fH=/^(min|max)?(.+)$/,fz=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(rM(cp(e.series),function(e){e&&e.data&&rz(e.data)&&(e.data[rJ]=!0)}),rM(cp(e.dataset),function(e){e&&e.source&&rz(e.source)&&(e.source[rJ]=!0)})),e=rv(e);var i=this._optionBackup,o=function(e,t,n){var i,o,r=[],a=e.baseOption,s=e.timeline,l=e.options,c=e.media,d=!!e.media,u=!!(l||s||a&&a.timeline);function m(e){rM(t,function(t){t(e,n)})}return a?(o=a).timeline||(o.timeline=s):((u||d)&&(e.options=e.media=null),o=e),d&&rO(c)&&rM(c,function(e){e&&e.option&&(e.query?r.push(e):i||(i=e))}),m(o),rM(l,function(e){return m(e)}),rM(r,function(e){return m(e.option)}),{baseOption:o,timelineOptions:l||[],mediaDefault:i,mediaList:r}}(e,t,!i);this._newBaseOption=o.baseOption,i?(o.timelineOptions.length&&(i.timelineOptions=o.timelineOptions),o.mediaList.length&&(i.mediaList=o.mediaList),o.mediaDefault&&(i.mediaDefault=o.mediaDefault)):this._optionBackup=o},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],rv(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var i=e.getComponent("timeline");i&&(t=rv(n[i.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t,n,i=this._api.getWidth(),o=this._api.getHeight(),r=this._mediaList,a=this._mediaDefault,s=[],l=[];if(!r.length&&!a)return l;for(var c=0,d=r.length;c<d;c++)(function(e,t,n){var i={width:t,height:n,aspectratio:t/n},o=!0;return rM(e,function(e,t){var n=t.match(fH);if(n&&n[1]&&n[2]){var r,a,s,l=n[1];r=i[n[2].toLowerCase()],a=e,("min"===(s=l)?r>=a:"max"===s?r<=a:r===a)||(o=!1)}}),o})(r[c].query,i,o)&&s.push(c);return!s.length&&a&&(s=[-1]),s.length&&(t=s,n=this._currentMediaIndices,t.join(",")!==n.join(","))&&(l=rA(s,function(e){return rv(-1===e?a.option:r[e].option)})),this._currentMediaIndices=s,l},e}(),fj=rB,fU=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function fW(e){var t=e&&e.itemStyle;if(t)for(var n=0,i=fU.length;n<i;n++){var o=fU[n],r=t.normal,a=t.emphasis;r&&r[o]&&(e[o]=e[o]||{},e[o].normal?rF(e[o].normal,r[o]):e[o].normal=r[o],r[o]=null),a&&a[o]&&(e[o]=e[o]||{},e[o].emphasis?rF(e[o].emphasis,a[o]):e[o].emphasis=a[o],a[o]=null)}}function fV(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var i=e[t].normal,o=e[t].emphasis;i&&(n?(e[t].normal=e[t].emphasis=null,rw(e[t],i)):e[t]=i),o&&(e.emphasis=e.emphasis||{},e.emphasis[t]=o,o.focus&&(e.emphasis.focus=o.focus),o.blurScope&&(e.emphasis.blurScope=o.blurScope))}}function fG(e){fV(e,"itemStyle"),fV(e,"lineStyle"),fV(e,"areaStyle"),fV(e,"label"),fV(e,"labelLine"),fV(e,"upperLabel"),fV(e,"edgeLabel")}function f$(e,t){var n=fj(e)&&e[t],i=fj(n)&&n.textStyle;if(i)for(var o=0,r=cb.length;o<r;o++){var a=cb[o];i.hasOwnProperty(a)&&(n[a]=i[a])}}function fq(e){e&&(fG(e),f$(e,"label"),e.emphasis&&f$(e.emphasis,"label"))}function fX(e){return rO(e)?e:e?[e]:[]}function fK(e){return(rO(e)?e[0]:e)||{}}function fJ(e){e&&rM(fZ,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var fZ=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],fQ=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],f0=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function f1(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<f0.length;n++){var i=f0[n][1],o=f0[n][0];null!=t[i]&&(t[o]=t[i])}}function f2(e){e&&"edge"===e.alignTo&&null!=e.margin&&null==e.edgeDistance&&(e.edgeDistance=e.margin)}function f5(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function f3(e,t){var n;rM(fX(e.series),function(e){fj(e)&&function(e){if(fj(e)){fW(e),fG(e),f$(e,"label"),f$(e,"upperLabel"),f$(e,"edgeLabel"),e.emphasis&&(f$(e.emphasis,"label"),f$(e.emphasis,"upperLabel"),f$(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(fW(t),fq(t));var n=e.markLine;n&&(fW(n),fq(n));var i=e.markArea;i&&fq(i);var o=e.data;if("graph"===e.type){o=o||e.nodes;var r=e.links||e.edges;if(r&&!rz(r))for(var a=0;a<r.length;a++)fq(r[a]);rM(e.categories,function(e){fG(e)})}if(o&&!rz(o))for(var a=0;a<o.length;a++)fq(o[a]);if((t=e.markPoint)&&t.data)for(var s=t.data,a=0;a<s.length;a++)fq(s[a]);if((n=e.markLine)&&n.data)for(var l=n.data,a=0;a<l.length;a++)rO(l[a])?(fq(l[a][0]),fq(l[a][1])):fq(l[a]);"gauge"===e.type?(f$(e,"axisLabel"),f$(e,"title"),f$(e,"detail")):"treemap"===e.type?(fV(e.breadcrumb,"itemStyle"),rM(e.levels,function(e){fG(e)})):"tree"===e.type&&fG(e.leaves)}}(e)}),n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"],t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),rM(n,function(t){rM(fX(e[t]),function(e){e&&(f$(e,"axisLabel"),f$(e.axisPointer,"label"))})}),rM(fX(e.parallel),function(e){var t=e&&e.parallelAxisDefault;f$(t,"axisLabel"),f$(t&&t.axisPointer,"label")}),rM(fX(e.calendar),function(e){fV(e,"itemStyle"),f$(e,"dayLabel"),f$(e,"monthLabel"),f$(e,"yearLabel")}),rM(fX(e.radar),function(e){f$(e,"name"),e.name&&null==e.axisName&&(e.axisName=e.name,delete e.name),null!=e.nameGap&&null==e.axisNameGap&&(e.axisNameGap=e.nameGap,delete e.nameGap)}),rM(fX(e.geo),function(e){fj(e)&&(fq(e),rM(fX(e.regions),function(e){fq(e)}))}),rM(fX(e.timeline),function(e){fq(e),fV(e,"label"),fV(e,"itemStyle"),fV(e,"controlStyle",!0);var t=e.data;rO(t)&&rM(t,function(e){rB(e)&&(fV(e,"label"),fV(e,"itemStyle"))})}),rM(fX(e.toolbox),function(e){fV(e,"iconStyle"),rM(e.feature,function(e){fV(e,"iconStyle")})}),f$(fK(e.axisPointer),"label"),f$(fK(e.tooltip).axisPointer,"label"),e.series=cp(e.series),rM(e.series,function(e){if(rB(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===t||"gauge"===t){null!=e.clockWise&&(e.clockwise=e.clockWise),f2(e.label);var n=e.data;if(n&&!rz(n))for(var i=0;i<n.length;i++)f2(n[i]);null!=e.hoverOffset&&(e.emphasis=e.emphasis||{},e.emphasis.scaleSize=null)}else if("gauge"===t){var o=function(e,t){for(var n=t.split(","),i=e,o=0;o<n.length&&null!=(i=i&&i[n[o]]);o++);return i}(e,"pointer.color");null!=o&&function(e,t,n,i){for(var o,r=t.split(","),a=e,s=0;s<r.length-1;s++)null==a[o=r[s]]&&(a[o]={}),a=a[o];null==a[r[s]]&&(a[r[s]]=n)}(e,"itemStyle.color",o)}else if("bar"===t){f1(e),f1(e.backgroundStyle),f1(e.emphasis);var n=e.data;if(n&&!rz(n))for(var i=0;i<n.length;i++)"object"==typeof n[i]&&(f1(n[i]),f1(n[i]&&n[i].emphasis))}else if("sunburst"===t){var r=e.highlightPolicy;r&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=r)),f5(e),function e(t,n){if(t)for(var i=0;i<t.length;i++)n(t[i]),t[i]&&e(t[i].children,n)}(e.data,f5)}else"graph"===t||"sankey"===t?e&&null!=e.focusNodeAdjacency&&(e.emphasis=e.emphasis||{},null==e.emphasis.focus&&(e.emphasis.focus="adjacency")):"map"===t&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&rw(e,e.mapLocation));null!=e.hoverAnimation&&(e.emphasis=e.emphasis||{},e.emphasis&&null==e.emphasis.scale&&(e.emphasis.scale=e.hoverAnimation)),fJ(e)}}),e.dataRange&&(e.visualMap=e.dataRange),rM(fQ,function(t){var n=e[t];n&&(rO(n)||(n=[n]),rM(n,function(e){fJ(e)}))})}var f4=function(e){this.data=e.data||(e.sourceFormat===fF?{}:[]),this.sourceFormat=e.sourceFormat||fw,this.seriesLayoutBy=e.seriesLayoutBy||fk,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var i=t[n];null==i.type&&fC(this,n)===fE.Must&&(i.type="ordinal")}};function f6(e){return e instanceof f4}function f8(e,t,n){n=n||f9(e);var i=t.seriesLayoutBy,o=function(e,t,n,i,o){if(!e)return{dimensionsDefine:pe(o),startIndex:a,dimensionsDetectedCount:r};if(t===fy){var r,a;"auto"===i||null==i?pt(function(e){null!=e&&"-"!==e&&(rY(e)?null==a&&(a=1):a=0)},n,e,10):a=rN(i)?i:+!!i,o||1!==a||(o=[],pt(function(e,t){o[t]=null!=e?e+"":""},n,e,1/0)),r=o?o.length:"row"===n?e.length:e[0]?e[0].length:null}else if(t===fv)o||(o=function(e){for(var t,n=0;n<e.length&&!(t=e[n++]););if(t)return rS(t)}(e));else if(t===fF)o||(o=[],rM(e,function(e,t){o.push(t)}));else if(t===f_){var s=cg(e[0]);r=rO(s)&&s.length||1}return{startIndex:a,dimensionsDefine:pe(o),dimensionsDetectedCount:r}}(e,n,i,t.sourceHeader,t.dimensions);return new f4({data:e,sourceFormat:n,seriesLayoutBy:i,dimensionsDefine:o.dimensionsDefine,startIndex:o.startIndex,dimensionsDetectedCount:o.dimensionsDetectedCount,metaRawOption:rv(t)})}function f7(e){return new f4({data:e,sourceFormat:rz(e)?fx:f_})}function f9(e){var t=fw;if(rz(e))t=fx;else if(rO(e)){0===e.length&&(t=fy);for(var n=0,i=e.length;n<i;n++){var o=e[n];if(null!=o){if(rO(o)||rz(o)){t=fy;break}else if(rB(o)){t=fv;break}}}}else if(rB(e)){for(var r in e)if(r3(e,r)&&rT(e[r])){t=fF;break}}return t}function pe(e){if(e){var t=r1();return rA(e,function(e,n){var i={name:(e=rB(e)?e:{name:e}).name,displayName:e.displayName,type:e.type};if(null==i.name)return i;i.name+="",null==i.displayName&&(i.displayName=i.name);var o=t.get(i.name);return o?i.name+="-"+o.count++:t.set(i.name,{count:1}),i})}}function pt(e,t,n,i){if("row"===t)for(var o=0;o<n.length&&o<i;o++)e(n[o]?n[o][0]:null,o);else for(var r=n[0]||[],o=0;o<r.length&&o<i;o++)e(r[o],o)}function pn(e){var t=e.sourceFormat;return t===fv||t===fF}var pi={},po="undefined"!=typeof console&&console.warn&&console.log;function pr(e,t){!function(e,t,n){if(po){if(n){if(pi[t])return;pi[t]=!0}console[e]("[ECharts] "+t)}}("error",e,t)}function pa(e){throw Error(e)}var ps=function(){var e;function t(e,t){var n=f6(e)?e:f7(e);this._source=n;var i=this._data=n.data,o=n.sourceFormat;n.seriesLayoutBy,o===fx&&(this._offset=0,this._dimSize=t,this._data=i),eC(this,i,n)}return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(e,t){},t.prototype.appendData=function(e){},t.prototype.clean=function(){},t.protoInitialize=void((e=t.prototype).pure=!1,e.persistent=!0),t.internalField=function(){eC=function(e,o,r){var a=r.sourceFormat,s=r.seriesLayoutBy,l=r.startIndex,c=r.dimensionsDefine;rx(e,eA[ph(a,s)]),a===fx?(e.getItem=t,e.count=i,e.fillStorage=n):(e.getItem=rL(function(e,t){return pd[ph(e,t)]}(a,s),null,o,l,c),e.count=rL(function(e,t){return pm[ph(e,t)]}(a,s),null,o,l,c))};var e,t=function(e,t){e-=this._offset,t=t||[];for(var n=this._data,i=this._dimSize,o=i*e,r=0;r<i;r++)t[r]=n[o+r];return t},n=function(e,t,n,i){for(var o=this._data,r=this._dimSize,a=0;a<r;a++){for(var s=i[a],l=null==s[0]?1/0:s[0],c=null==s[1]?-1/0:s[1],d=t-e,u=n[a],m=0;m<d;m++){var f=o[m*r+a];u[e+m]=f,f<l&&(l=f),f>c&&(c=f)}s[0]=l,s[1]=c}},i=function(){return this._data?this._data.length/this._dimSize:0};function o(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}(e={})[fy+"_"+fk]={pure:!0,appendData:o},e[fy+"_row"]={pure:!0,appendData:function(){throw Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[fv]={pure:!0,appendData:o},e[fF]={pure:!0,appendData:function(e){var t=this._data;rM(e,function(e,n){for(var i=t[n]||(t[n]=[]),o=0;o<(e||[]).length;o++)i.push(e[o])})}},e[f_]={appendData:o},e[fx]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},eA=e}(),t}(),pl=function(e){rO(e)||pr("series.data or dataset.source must be an array.")};(ek={})[fy+"_"+fk]=pl,ek[fy+"_row"]=pl,ek[fv]=pl,ek[fF]=function(e,t){for(var n=0;n<t.length;n++)null==t[n].name&&pr("dimension name must not be null/undefined.")},ek[f_]=pl;var pc=function(e,t,n,i){return e[i]},pd=((eE={})[fy+"_"+fk]=function(e,t,n,i){return e[i+t]},eE[fy+"_row"]=function(e,t,n,i,o){i+=t;for(var r=o||[],a=0;a<e.length;a++){var s=e[a];r[a]=s?s[i]:null}return r},eE[fv]=pc,eE[fF]=function(e,t,n,i,o){for(var r=o||[],a=0;a<n.length;a++){var s=n[a].name,l=null!=s?e[s]:null;r[a]=l?l[i]:null}return r},eE[f_]=pc,eE),pu=function(e,t,n){return e.length},pm=((eT={})[fy+"_"+fk]=function(e,t,n){return Math.max(0,e.length-t)},eT[fy+"_row"]=function(e,t,n){var i=e[0];return i?Math.max(0,i.length-t):0},eT[fv]=pu,eT[fF]=function(e,t,n){var i=n[0].name,o=null!=i?e[i]:null;return o?o.length:0},eT[f_]=pu,eT),pf=function(e,t,n){return e[t]},pp=((eM={})[fy]=pf,eM[fv]=function(e,t,n){return e[n]},eM[fF]=pf,eM[f_]=function(e,t,n){var i=cg(e);return i instanceof Array?i[t]:i},eM[fx]=pf,eM);function ph(e,t){return e===fy?e+"_"+t:e}function pb(e,t,n){if(e){var i=e.getRawDataItem(t);if(null!=i){var o=e.getStore(),r=o.getSource().sourceFormat;if(null!=n){var a=e.getDimensionIndex(n),s=o.getDimensionProperty(a);return pp[r](i,a,s)}var l=i;return r===f_&&(l=cg(i)),l}}}var pg=/\{@(.+?)\}/g,p_=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),i=this.getRawValue(e,t),o=n.getRawIndex(e),r=n.getName(e),a=n.getRawDataItem(e),s=n.getItemVisual(e,"style"),l=s&&s[n.getItemVisual(e,"drawType")||"fill"],c=s&&s.stroke,d=this.mainType,u="series"===d,m=n.userOutput&&n.userOutput.get();return{componentType:d,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:u?this.subType:null,seriesIndex:this.seriesIndex,seriesId:u?this.id:null,seriesName:u?this.name:null,name:r,dataIndex:o,data:a,dataType:t,value:i,color:l,borderColor:c,dimensionNames:m?m.fullDimensions:null,encode:m?m.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(e,t,n,i,o,r){t=t||"normal";var a=this.getData(n),s=this.getDataParams(e,n);return(r&&(s.value=r.interpolatedValue),null!=i&&rO(s.value)&&(s.value=s.value[i]),o||(o=a.getItemModel(e).get("normal"===t?["label","formatter"]:[t,"label","formatter"])),rR(o))?(s.status=t,s.dimensionIndex=i,o(s)):rY(o)?mQ(o,s).replace(pg,function(t,n){var i=n.length,o=n;"["===o.charAt(0)&&"]"===o.charAt(i-1)&&(o=+o.slice(1,i-1));var s=pb(a,e,o);if(r&&rO(r.interpolatedValue)){var l=a.getDimensionIndex(o);l>=0&&(s=r.interpolatedValue[l])}return null!=s?s+"":""}):void 0},e.prototype.getRawValue=function(e,t){return pb(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function py(e){var t,n;return rB(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function pv(e){return new pF(e)}var pF=function(){function e(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t,n,i,o,r=this._upstream,a=e&&e.skip;if(this._dirty&&r){var s=this.context;s.data=s.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!a&&(i=this._plan(this.context));var l=((t=this._modBy)>=1||(t=1),t),c=this._modDataCount||0,d=((n=e&&e.modBy)>=1||(n=1),n),u=e&&e.modDataCount||0;(l!==d||c!==u)&&(i="reset"),(this._dirty||"reset"===i)&&(this._dirty=!1,o=this._doReset(a)),this._modBy=d,this._modDataCount=u;var m=e&&e.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(null!=m?this._dueIndex+m:1/0,this._dueEnd);if(!a&&(o||f<p)){var h=this._progress;if(rO(h))for(var b=0;b<h.length;b++)this._doProgress(h[b],f,p,d,u);else this._doProgress(h,f,p,d,u)}this._dueIndex=p;var g=null!=this._settedOutputEnd?this._settedOutputEnd:p;this._outputDueEnd=g}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,i,o){px.reset(t,n,i,o),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:px.next},this.context)},e.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!e&&this._reset&&((t=this._reset(this.context))&&t.progress&&(n=t.forceFirstProgress,t=t.progress),rO(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var t,n,i=this._downstream;return i&&i.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),px=function(){var e,t,n,i,o,r={reset:function(l,c,d,u){t=l,e=c,n=d,o=Math.ceil((i=u)/n),r.next=n>1&&i>0?s:a}};return r;function a(){return t<e?t++:null}function s(){var r=t%o*n+Math.ceil(t/o),a=t>=e?null:r<i?r:t;return t++,a}}();function pw(e,t){var n=t&&t.type;return"ordinal"===n?e:("time"!==n||rN(e)||null==e||"-"===e||(e=+cs(e)),null==e||""===e?NaN:Number(e))}r1({number:function(e){return parseFloat(e)},time:function(e){return+cs(e)},trim:function(e){return rY(e)?rK(e):e}});var pk={lt:function(e,t){return e<t},lte:function(e,t){return e<=t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t}};(function(e,t){rN(t)||pa(""),this._opFn=pk[e],this._rvalFloat=cd(t)}).prototype.evaluate=function(e){return rN(e)?this._opFn(e,this._rvalFloat):this._opFn(cd(e),this._rvalFloat)};var pE=function(){function e(e,t){var n="desc"===e;this._resultLT=n?1:-1,null==t&&(t=n?"min":"max"),this._incomparable="min"===t?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=rN(e)?e:cd(e),i=rN(t)?t:cd(t),o=isNaN(n),r=isNaN(i);if(o&&(n=this._incomparable),r&&(i=this._incomparable),o&&r){var a=rY(e),s=rY(t);a&&(n=s?e:0),s&&(i=a?t:0)}return n<i?this._resultLT:n>i?-this._resultLT:0},e}();(function(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=cd(t)}).prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&("number"===n||"number"===this._rvalTypeof)&&(t=cd(e)===this._rvalFloat)}return this._isEQ?t:!t};var pT=function(){function e(){}return e.prototype.getRawData=function(){throw Error("not supported")},e.prototype.getRawDataItem=function(e){throw Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return pw(e,t)},e}();function pM(e){return pL(e.sourceFormat)||pa(""),e.data}function pA(e){var t=e.sourceFormat,n=e.data;if(pL(t)||pa(""),t===fy){for(var i=[],o=0,r=n.length;o<r;o++)i.push(n[o].slice());return i}if(t===fv){for(var i=[],o=0,r=n.length;o<r;o++)i.push(rx({},n[o]));return i}}function pC(e,t,n){if(null!=n){if(rN(n)||!isNaN(n)&&!r3(t,n))return e[n];else if(r3(t,n))return t[n]}}function pD(e){return rv(e)}var pS=r1();function pL(e){return e===fy||e===fv}var pI="undefined",pO=typeof Uint32Array===pI?Array:Uint32Array,pR=typeof Uint16Array===pI?Array:Uint16Array,pY=typeof Int32Array===pI?Array:Int32Array,pP=typeof Float64Array===pI?Array:Float64Array,pN={float:pP,int:pY,ordinal:Array,number:Array,time:pP};function pB(e){return e>65535?pO:pR}function pH(){return[1/0,-1/0]}function pz(e,t,n,i,o){var r=pN[n||"float"];if(o){var a=e[t],s=a&&a.length;if(s!==i){for(var l=new r(i),c=0;c<s;c++)l[c]=a[c];e[t]=l}}else e[t]=new r(i)}var pj=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=r1()}return e.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=e.getSource(),o=this.defaultDimValueGetter=eD[i.sourceFormat];this._dimValueGetter=n||o,this._rawExtent=[],pn(i),this._dimensions=rA(t,function(e){return{type:e.type,property:e.property}}),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,i=this._dimensions,o=n.get(e);if(null!=o){if(i[o].type===t)return o}else o=i.length;return i[o]={type:t},n.set(e,o),this._chunks[o]=new pN[t||"float"](this._rawCount),this._rawExtent[o]=pH(),o},e.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],i=this._dimensions[e],o=this._rawExtent,r=i.ordinalOffset||0,a=n.length;0===r&&(o[e]=pH());for(var s=o[e],l=r;l<a;l++){var c=n[l]=t.parseAndCollect(n[l]);isNaN(c)||(s[0]=Math.min(c,s[0]),s[1]=Math.max(c,s[1]))}i.ordinalMeta=t,i.ordinalOffset=a,i.type="ordinal"},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var i=t.count();return t.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,i=this._dimensions,o=i.length,r=this._rawExtent,a=this.count(),s=a+Math.max(e.length,t||0),l=0;l<o;l++){var c=i[l];pz(n,l,c.type,s,!0)}for(var d=[],u=a;u<s;u++)for(var m=u-a,f=0;f<o;f++){var c=i[f],p=eD.arrayRows.call(this,e[m]||d,c.property,m,f);n[f][u]=p;var h=r[f];p<h[0]&&(h[0]=p),p>h[1]&&(h[1]=p)}return this._rawCount=this._count=s,{start:a,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var i=this._provider,o=this._chunks,r=this._dimensions,a=r.length,s=this._rawExtent,l=rA(r,function(e){return e.property}),c=0;c<a;c++){var d=r[c];s[c]||(s[c]=pH()),pz(o,c,d.type,t,n)}if(i.fillStorage)i.fillStorage(e,t,o,s);else for(var u=[],m=e;m<t;m++){u=i.getItem(m,u);for(var f=0;f<a;f++){var p=o[f],h=this._dimValueGetter(u,l[f],m,f);p[m]=h;var b=s[f];h<b[0]&&(b[0]=h),h>b[1]&&(b[1]=h)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},e.prototype.getValues=function(e,t){var n=[],i=[];if(null==t){t=e,e=[];for(var o=0;o<this._dimensions.length;o++)i.push(o)}else i=e;for(var o=0,r=i.length;o<r;o++)n.push(this.get(i[o],t));return n},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},e.prototype.getSum=function(e){var t=this._chunks[e],n=0;if(t)for(var i=0,o=this.count();i<o;i++){var r=this.get(e,i);isNaN(r)||(n+=r)}return n},e.prototype.getMedian=function(e){var t=[];this.each([e],function(e){isNaN(e)||t.push(e)});var n=t.sort(function(e,t){return e-t}),i=this.count();return 0===i?0:i%2==1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},e.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return -1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&n<this._count&&n===e)return e;for(var i=0,o=this._count-1;i<=o;){var r=(i+o)/2|0;if(t[r]<e)i=r+1;else{if(!(t[r]>e))return r;o=r-1}}return -1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,i=this._count;if(n===Array){e=new n(i);for(var o=0;o<i;o++)e[o]=t[o]}else e=new n(t.buffer,0,i)}else{var n=pB(this._rawCount);e=new n(this.count());for(var o=0;o<e.length;o++)e[o]=o}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),i=n.count(),o=new(pB(n._rawCount))(i),r=[],a=e.length,s=0,l=e[0],c=n._chunks,d=0;d<i;d++){var u=void 0,m=n.getRawIndex(d);if(0===a)u=t(d);else if(1===a)u=t(c[l][m],d);else{for(var f=0;f<a;f++)r[f]=c[e[f]][m];r[f]=d,u=t.apply(null,r)}u&&(o[s++]=m)}return s<i&&(n._indices=o),n._count=s,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var i=rS(e),o=i.length;if(!o)return this;var r=t.count(),a=new(pB(t._rawCount))(r),s=0,l=i[0],c=e[l][0],d=e[l][1],u=t._chunks,m=!1;if(!t._indices){var f=0;if(1===o){for(var p=u[i[0]],h=0;h<n;h++){var b=p[h];(b>=c&&b<=d||isNaN(b))&&(a[s++]=f),f++}m=!0}else if(2===o){for(var p=u[i[0]],g=u[i[1]],_=e[i[1]][0],y=e[i[1]][1],h=0;h<n;h++){var b=p[h],v=g[h];(b>=c&&b<=d||isNaN(b))&&(v>=_&&v<=y||isNaN(v))&&(a[s++]=f),f++}m=!0}}if(!m)if(1===o)for(var h=0;h<r;h++){var F=t.getRawIndex(h),b=u[i[0]][F];(b>=c&&b<=d||isNaN(b))&&(a[s++]=F)}else for(var h=0;h<r;h++){for(var x=!0,F=t.getRawIndex(h),w=0;w<o;w++){var k=i[w],b=u[k][F];(b<e[k][0]||b>e[k][1])&&(x=!1)}x&&(a[s++]=t.getRawIndex(h))}return s<r&&(t._indices=a),t._count=s,t._extent=[],t._updateGetRawIdx(),t},e.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.prototype._updateDims=function(e,t,n){for(var i=e._chunks,o=[],r=t.length,a=e.count(),s=[],l=e._rawExtent,c=0;c<t.length;c++)l[t[c]]=pH();for(var d=0;d<a;d++){for(var u=e.getRawIndex(d),m=0;m<r;m++)s[m]=i[t[m]][u];s[r]=d;var f=n&&n.apply(null,s);if(null!=f){"object"!=typeof f&&(o[0]=f,f=o);for(var c=0;c<f.length;c++){var p=t[c],h=f[c],b=l[p],g=i[p];g&&(g[u]=h),h<b[0]&&(b[0]=h),h>b[1]&&(b[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n,i,o,r=this.clone([e],!0),a=r._chunks[e],s=this.count(),l=0,c=Math.floor(1/t),d=this.getRawIndex(0),u=new(pB(this._rawCount))(Math.min((Math.ceil(s/c)+2)*2,s));u[l++]=d;for(var m=1;m<s-1;m+=c){for(var f=Math.min(m+c,s-1),p=Math.min(m+2*c,s),h=(p+f)/2,b=0,g=f;g<p;g++){var _=this.getRawIndex(g),y=a[_];isNaN(y)||(b+=y)}b/=p-f;var v=m,F=Math.min(m+c,s),x=m-1,w=a[d];n=-1,o=v;for(var k=-1,E=0,g=v;g<F;g++){var _=this.getRawIndex(g),y=a[_];if(isNaN(y)){E++,k<0&&(k=_);continue}(i=Math.abs((x-h)*(y-w)-(x-g)*(b-w)))>n&&(n=i,o=_)}E>0&&E<F-v&&(u[l++]=Math.min(k,o),o=Math.max(k,o)),u[l++]=o,d=o}return u[l++]=this.getRawIndex(s-1),r._count=l,r._indices=u,r.getRawIndex=this._getRawIdx,r},e.prototype.minmaxDownSample=function(e,t){for(var n=this.clone([e],!0),i=n._chunks,o=Math.floor(1/t),r=i[e],a=this.count(),s=new(pB(this._rawCount))(2*Math.ceil(a/o)),l=0,c=0;c<a;c+=o){var d=c,u=r[this.getRawIndex(d)],m=c,f=r[this.getRawIndex(m)],p=o;c+o>a&&(p=a-c);for(var h=0;h<p;h++){var b=r[this.getRawIndex(c+h)];b<u&&(u=b,d=c+h),b>f&&(f=b,m=c+h)}var g=this.getRawIndex(d),_=this.getRawIndex(m);d<m?(s[l++]=g,s[l++]=_):(s[l++]=_,s[l++]=g)}return n._count=l,n._indices=s,n._updateGetRawIdx(),n},e.prototype.downSample=function(e,t,n,i){for(var o=this.clone([e],!0),r=o._chunks,a=[],s=Math.floor(1/t),l=r[e],c=this.count(),d=o._rawExtent[e]=pH(),u=new(pB(this._rawCount))(Math.ceil(c/s)),m=0,f=0;f<c;f+=s){s>c-f&&(a.length=s=c-f);for(var p=0;p<s;p++){var h=this.getRawIndex(f+p);a[p]=l[h]}var b=n(a),g=this.getRawIndex(Math.min(f+i(a,b)||0,c-1));l[g]=b,b<d[0]&&(d[0]=b),b>d[1]&&(d[1]=b),u[m++]=g}return o._count=m,o._indices=u,o._updateGetRawIdx(),o},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,i=this._chunks,o=0,r=this.count();o<r;o++){var a=this.getRawIndex(o);switch(n){case 0:t(o);break;case 1:t(i[e[0]][a],o);break;case 2:t(i[e[0]][a],i[e[1]][a],o);break;default:for(var s=0,l=[];s<n;s++)l[s]=i[e[s]][a];l[s]=o,t.apply(null,l)}}},e.prototype.getDataExtent=function(e){var t,n=this._chunks[e],i=pH();if(!n)return i;var o=this.count();if(!this._indices)return this._rawExtent[e].slice();if(t=this._extent[e])return t.slice();for(var r=(t=i)[0],a=t[1],s=0;s<o;s++){var l=n[this.getRawIndex(s)];l<r&&(r=l),l>a&&(a=l)}return t=[r,a],this._extent[e]=t,t},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],i=this._chunks,o=0;o<i.length;o++)n.push(i[o][t]);return n},e.prototype.clone=function(t,n){var i=new e,o=this._chunks,r=t&&rC(t,function(e,t){return e[t]=!0,e},{});if(r)for(var a=0;a<o.length;a++)i._chunks[a]=r[a]?function(e){var t=e.constructor;return t===Array?e.slice():new t(e)}(o[a]):o[a];else i._chunks=o;return this._copyCommonProps(i),n||(i._indices=this._cloneIndices()),i._updateGetRawIdx(),i},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=rv(this._extent),e._rawExtent=rv(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var i=0;i<n;i++)t[i]=this._indices[i]}else t=new e(this._indices);return t}return null},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,i){return pw(e[i],this._dimensions[i])}eD={arrayRows:e,objectRows:function(e,t,n,i){return pw(e[t],this._dimensions[i])},keyedColumns:e,original:function(e,t,n,i){var o=e&&(null==e.value?e:e.value);return pw(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(e,t,n,i){return e[i]}}}(),e}(),pU=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,n=this._sourceHost,i=this._getUpstreamSourceManagers(),o=!!i.length;if(pW(n)){var r=void 0,a=void 0,s=void 0;if(o){var l=i[0];l.prepareSource(),r=(s=l.getSource()).data,a=s.sourceFormat,t=[l._getVersionSign()]}else a=rz(r=n.get("data",!0))?fx:f_,t=[];var c=this._getSourceMetaRawOption()||{},d=s&&s.metaRawOption||{},u=rV(c.seriesLayoutBy,d.seriesLayoutBy)||null,m=rV(c.sourceHeader,d.sourceHeader),f=rV(c.dimensions,d.dimensions);e=u!==d.seriesLayoutBy||!!m!=!!d.sourceHeader||f?[f8(r,{seriesLayoutBy:u,sourceHeader:m,dimensions:f},a)]:[]}else if(o){var p=this._applyTransform(i);e=p.sourceList,t=p.upstreamSignList}else e=[f8(n.get("source",!0),this._getSourceMetaRawOption(),null)],t=[];this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n,i=this._sourceHost,o=i.get("transform",!0),r=i.get("fromTransformResult",!0);null!=r&&1!==e.length&&pV("");var a=[],s=[];return(rM(e,function(e){e.prepareSource();var t=e.getSource(r||0);null==r||t||pV(""),a.push(t),s.push(e._getVersionSign())}),o)?n=function(e,t,n){var i=cp(e),o=i.length;o||pa("");for(var r=0;r<o;r++)t=function(e,t,n,i){t.length||pa(""),rB(e)||pa("");var o=e.type,r=pS.get(o);r||pa("");var a=rA(t,function(e){return function(e,t){var n=new pT,i=e.data,o=n.sourceFormat=e.sourceFormat,r=e.startIndex;e.seriesLayoutBy!==fk&&pa("");var a=[],s={},l=e.dimensionsDefine;if(l)rM(l,function(e,t){var n=e.name,i={index:t,name:n,displayName:e.displayName};a.push(i),null!=n&&(r3(s,n)&&pa(""),s[n]=i)});else for(var c=0;c<e.dimensionsDetectedCount||0;c++)a.push({index:c});var d=pd[ph(o,fk)];t.__isBuiltIn&&(n.getRawDataItem=function(e){return d(i,r,a,e)},n.getRawData=rL(pM,null,e)),n.cloneRawData=rL(pA,null,e),n.count=rL(pm[ph(o,fk)],null,i,r,a);var u=pp[o];n.retrieveValue=function(e,t){return m(d(i,r,a,e),t)};var m=n.retrieveValueFromItem=function(e,t){if(null!=e){var n=a[t];if(n)return u(e,t,n.name)}};return n.getDimensionInfo=rL(pC,null,a,s),n.cloneAllDimensionInfo=rL(pD,null,a),n}(e,r)});return rA(cp(r.transform({upstream:a[0],upstreamList:a,config:rv(e.config)})),function(e,n){rB(e)||pa(""),e.data||pa(""),pL(f9(e.data))||pa("");var i,o=t[0];if(o&&0===n&&!e.dimensions){var r=o.startIndex;r&&(e.data=o.data.slice(0,r).concat(e.data)),i={seriesLayoutBy:fk,sourceHeader:r,dimensions:o.metaRawOption.dimensions}}else i={seriesLayoutBy:fk,sourceHeader:0,dimensions:e.dimensions};return f8(e.data,i,null)})}(i[r],t,0,0),r!==o-1&&(t.length=Math.max(t.length,1));return t}(o,a,{datasetIndex:i.componentIndex}):null!=r&&(n=[new f4({data:(t=a[0]).data,sourceFormat:t.sourceFormat,seriesLayoutBy:t.seriesLayoutBy,dimensionsDefine:rv(t.dimensionsDefine),startIndex:t.startIndex,dimensionsDetectedCount:t.dimensionsDetectedCount})]),{sourceList:n,upstreamSignList:s}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},e.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var i=this._storeList,o=i[0];o||(o=i[0]={});var r=o[n];if(!r){var a=this._getUpstreamSourceManagers()[0];pW(this._sourceHost)&&a?r=a._innerGetDataStore(e,t,n):(r=new pj).initData(new ps(t,e.length),e),o[n]=r}return r},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(pW(e)){var t=fA(e);return t?[t.getSourceManager()]:[]}return rA(e.get("transform",!0)||e.get("fromTransformResult",!0)?cD(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},cA).models:[],function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e,t,n,i=this._sourceHost;return pW(i)?(e=i.get("seriesLayoutBy",!0),t=i.get("sourceHeader",!0),n=i.get("dimensions",!0)):this._getUpstreamSourceManagers().length||(e=i.get("seriesLayoutBy",!0),t=i.get("sourceHeader",!0),n=i.get("dimensions",!0)),{seriesLayoutBy:e,sourceHeader:t,dimensions:n}},e}();function pW(e){return"series"===e.mainType}function pV(e){throw Error(e)}function pG(e){var t=e.lineHeight;return null==t?"line-height:1":"line-height:"+ay(t+"")+"px"}function p$(e,t){var n=e.color||fl.color.tertiary,i=e.fontSize||12,o=e.fontWeight||"400",r=e.color||fl.color.secondary,a=e.fontSize||14,s=e.fontWeight||"900";return"html"===t?{nameStyle:"font-size:"+ay(i+"")+"px;color:"+ay(n)+";font-weight:"+ay(o+""),valueStyle:"font-size:"+ay(a+"")+"px;color:"+ay(r)+";font-weight:"+ay(s+"")}:{nameStyle:{fontSize:i,fill:n,fontWeight:o},valueStyle:{fontSize:a,fill:r,fontWeight:s}}}var pq=[0,10,20,30],pX=["","\n","\n\n","\n\n\n"];function pK(e,t){return t.type=e,t}function pJ(e){return"section"===e.type}function pZ(e,t,n,i){var o,r=t.noHeader,a={html:pq[o=function e(t){if(pJ(t)){var n=0,i=t.blocks.length,o=i>1||i>0&&!t.noHeader;return rM(t.blocks,function(t){var i=e(t);i>=n&&(n=i+ +(o&&(!i||pJ(t)&&!t.noHeader)))}),n}return 0}(t)],richText:pX[o]},s=[],l=t.blocks||[];rX(!l||rO(l)),l=l||[];var c=e.orderMode;if(t.sortBlocks&&c){l=l.slice();var d={valueAsc:"asc",valueDesc:"desc"};if(r3(d,c)){var u=new pE(d[c],null);l.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else"seriesDesc"===c&&l.reverse()}rM(l,function(n,o){var r=t.valueFormatter,l=(pJ(n)?pZ:pQ)(r?rx(rx({},e),{valueFormatter:r}):e,n,o>0?a.html:0,i);null!=l&&s.push(l)});var m="richText"===e.renderMode?s.join(a.richText):p1(i,s.join(""),r?n:a.html);if(r)return m;var f=mK(t.header,"ordinal",e.useUTC),p=p$(i,e.renderMode).nameStyle,h=pG(i);return"richText"===e.renderMode?p2(e,f,p)+a.richText+m:p1(i,'<div style="'+p+";"+h+';">'+ay(f)+"</div>"+m,n)}function pQ(e,t,n,i){var o=e.renderMode,r=t.noName,a=t.noValue,s=!t.markerType,l=t.name,c=e.useUTC,d=t.valueFormatter||e.valueFormatter||function(e){return rA(e=rO(e)?e:[e],function(e,t){return mK(e,rO(F)?F[t]:F,c)})};if(!r||!a){var u,m,f,p,h,b,g,_,y=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||fl.color.secondary,o),v=r?"":mK(l,"ordinal",c),F=t.valueType,x=a?[]:d(t.value,t.dataIndex),w=!s||!r,k=!s&&r,E=p$(i,o),T=E.nameStyle,M=E.valueStyle;return"richText"===o?(s?"":y)+(r?"":p2(e,v,T))+(a?"":(u=e,m=x,f=w,p=k,h=[M],f&&h.push({padding:[0,0,0,p?10:20],align:"right"}),u.markupStyleCreator.wrapRichTextStyle(rO(m)?m.join(" "):m,h))):p1(i,(s?"":y)+(r?"":'<span style="'+T+";"+(s?"":"margin-left:2px")+'">'+ay(v)+"</span>")+(a?"":(b=x,g=w,_=k,'<span style="'+(g?"float:right;margin-left:"+(_?"10px":"20px"):"")+";"+M+'">'+rA(b=rO(b)?b:[b],function(e){return ay(e)}).join(" ")+"</span>")),n)}}function p0(e,t,n,i,o,r){if(e)return(pJ(e)?pZ:pQ)({useUTC:o,renderMode:n,orderMode:i,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,r)}function p1(e,t,n){return'<div style="margin: '+n+"px 0 0;"+pG(e)+';">'+t+'<div style="clear:both"></div></div>'}function p2(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function p5(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var p3=function(){function e(){this.richTextStyles={},this._nextStyleNameId=cu()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var i,o,r,a,s,l,c="richText"===n?this._generateStyleName():null,d=(a=(r=rY(i={color:t,type:e,renderMode:n,markerId:c})?{color:i,extraCssText:o}:i||{}).color,s=r.type,o=r.extraCssText,l=r.renderMode||"html",a?"html"===l?"subItem"===s?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+ay(a)+";"+(o||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+ay(a)+";"+(o||"")+'"></span>':{renderMode:l,content:"{"+(r.markerId||"markerX")+"|} ",style:"subItem"===s?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}:"");return rY(d)?d:(this.richTextStyles[c]=d.style,d.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};rO(t)?rM(t,function(e){return rx(n,e)}):rx(n,t);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},e}(),p4=ck();function p6(e,t){return e.getName(t)||e.getId(t)}var p8="__universalTransitionEnabled",p7=function(e){var t;function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return rt(n,e),n.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=pv({count:he,reset:ht}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(p4(this).sourceManager=new pU(this)).prepareSource();var i=this.getInitialData(e,n);hi(i,this),this.dataTask.context.data=i,p4(this).dataBeforeProcessed=i,p9(this),this._initSelectedMapFromData(i)},n.prototype.mergeDefaultAndTheme=function(e,t){var n=fi(this),i=n?fr(e):{},o=this.subType;fs.hasClass(o)&&(o+="Series"),rF(e,t.getTheme().get(this.subType)),rF(e,this.getDefaultOption()),ch(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&fo(e,i,n)},n.prototype.mergeOption=function(e,t){e=rF(this.option,e,!0),this.fillDataTextStyle(e.data);var n=fi(this);n&&fo(this.option,e,n);var i=p4(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(e,t);hi(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,p4(this).dataBeforeProcessed=o,p9(this),this._initSelectedMapFromData(o)},n.prototype.fillDataTextStyle=function(e){if(e&&!rz(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&ch(e[n],"label",t)},n.prototype.getInitialData=function(e,t){},n.prototype.appendData=function(e){this.getRawData().appendData(e.data)},n.prototype.getData=function(e){var t=hr(this);if(!t)return p4(this).data;var n=t.context.data;return null!=e&&n.getLinkedData?n.getLinkedData(e):n},n.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},n.prototype.setData=function(e){var t=hr(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}p4(this).data=e},n.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return r1(e)},n.prototype.getSourceManager=function(){return p4(this).sourceManager},n.prototype.getSource=function(){return this.getSourceManager().getSource()},n.prototype.getRawData=function(){return p4(this).dataBeforeProcessed},n.prototype.getColorBy=function(){return this.get("colorBy")||"series"},n.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},n.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},n.prototype.indicesOfNearest=function(e,t,n,i){var o=this.getData(),r=this.coordinateSystem,a=r&&r.getAxis(e);if(!r||!a)return[];var s=a.dataToCoord(n);null==i&&(i=1/0);var l=[],c=1/0,d=-1,u=0;return o.each(t,function(e,t){var n=s-a.dataToCoord(e),o=Math.abs(n);o<=i&&((o<c||o===c&&n>=0&&d<0)&&(c=o,d=n,u=0),n===d&&(l[u++]=t))}),l.length=u,l},n.prototype.formatTooltip=function(e,t,n){return function(e){var t,n,i,o,r=e.series,a=e.dataIndex,s=e.multipleSeries,l=r.getData(),c=l.mapDimensionsAll("defaultedTooltip"),d=c.length,u=r.getRawValue(a),m=rO(u),f=m0(r.getData().getItemVisual(a,"style")[r.visualDrawType]);if(d>1||m&&!d){var p=function(e,t,n,i,o){var r=t.getData(),a=rC(e,function(e,t,n){var i=r.getDimensionInfo(n);return e=e||i&&!1!==i.tooltip&&null!=i.displayName},!1),s=[],l=[],c=[];function d(e,t){var n=r.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(a?c.push(pK("nameValue",{markerType:"subItem",markerColor:o,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return i.length?rM(i,function(e){d(pb(r,n,e),e)}):rM(e,d),{inlineValues:s,inlineValueTypes:l,blocks:c}}(u,r,a,c,f);t=p.inlineValues,n=p.inlineValueTypes,i=p.blocks,o=p.inlineValues[0]}else if(d){var h=l.getDimensionInfo(c[0]);o=t=pb(l,a,c[0]),n=h.type}else o=t=m?u[0]:u;var b=cF(r),g=b&&r.name||"",_=l.getName(a),y=s?g:_;return pK("section",{header:g,noHeader:s||!b,sortParam:o,blocks:[pK("nameValue",{markerType:"item",markerColor:f,name:y,noName:!rK(y),value:t,valueType:n,dataIndex:a})].concat(i||[])})}({series:this,dataIndex:e,multipleSeries:t})},n.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(ri.node&&!(e&&e.ssr))return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),!!t},n.prototype.restoreData=function(){this.dataTask.dirty()},n.prototype.getColorFromPalette=function(e,t,n){var i=this.ecModel,o=fL.prototype.getColorFromPalette.call(this,e,t,n);return o||(o=i.getColorFromPalette(e,t,n)),o},n.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},n.prototype.getProgressive=function(){return this.get("progressive")},n.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},n.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},n.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,o=this.getData(t);if("series"===i||"all"===n){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var r=0;r<e.length;r++){var a=p6(o,e[r]);n[a]=!1,this._selectedDataIndicesMap[a]=-1}}},n.prototype.toggleSelect=function(e,t){for(var n=[],i=0;i<e.length;i++)n[0]=e[i],this.isSelected(e[i],t)?this.unselect(n,t):this.select(n,t)},n.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=rS(e),n=[],i=0;i<t.length;i++){var o=e[t[i]];o>=0&&n.push(o)}return n},n.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(t);return("all"===n||n[p6(i,e)])&&!i.getItemModel(e).get(["select","disabled"])},n.prototype.isUniversalTransitionEnabled=function(){if(this[p8])return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},n.prototype._innerSelect=function(e,t){var n,i,o=this.option,r=o.selectedMode,a=t.length;if(r&&a){if("series"===r)o.selectedMap="all";else if("multiple"===r){rB(o.selectedMap)||(o.selectedMap={});for(var s=o.selectedMap,l=0;l<a;l++){var c=t[l],d=p6(e,c);s[d]=!0,this._selectedDataIndicesMap[d]=e.getRawIndex(c)}}else if("single"===r||!0===r){var u=t[a-1],d=p6(e,u);(n={})[d]=!0,o.selectedMap=n,this._selectedDataIndicesMap=((i={})[d]=e.getRawIndex(u),i)}}},n.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each(function(n){var i=e.getRawDataItem(n);i&&i.selected&&t.push(n)}),t.length>0&&this._innerSelect(e,t)}},n.registerClass=function(e){return fs.registerClass(e)},n.protoInitialize=void((t=n.prototype).type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"),n}(fs);function p9(e){var t,n,i,o=e.name;cF(e)||(e.name=(n=(t=e.getRawData()).mapDimensionsAll("seriesName"),i=[],rM(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&i.push(n.displayName)}),i.join(" ")||o))}function he(e){return e.model.getRawData().count()}function ht(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),hn}function hn(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function hi(e,t){rM(function(e,t){for(var n=new e.constructor(e.length+t.length),i=0;i<e.length;i++)n[i]=e[i];for(var o=e.length,i=0;i<t.length;i++)n[i+o]=t[i];return n}(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,rI(ho,t))})}function ho(e,t){var n=hr(e);return n&&n.setOutputEnd((t||this).count()),t}function hr(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var i=n.currentTask;if(i){var o=i.agentStubMap;o&&(i=o.get(e.uid))}return i}}rE(p7,p_),rE(p7,fL),cY(p7,fs);var ha=function(){function e(){this.group=new lQ,this.uid=mg("viewComponent")}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,i){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,i){},e.prototype.updateLayout=function(e,t,n,i){},e.prototype.updateVisual=function(e,t,n,i){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();function hs(){var e=ck();return function(t){var n=e(t),i=t.pipelineContext,o=!!n.large,r=!!n.progressiveRender,a=n.large=!!(i&&i.large),s=n.progressiveRender=!!(i&&i.progressiveRender);return(o!==a||r!==s)&&"reset"}}cR(ha),cH(ha);var hl=dP.CMD,hc=[[],[],[]],hd=Math.sqrt,hu=Math.atan2;function hm(e,t){if(t){var n,i,o,r,a,s,l=e.data,c=e.len(),d=hl.M,u=hl.C,m=hl.L,f=hl.R,p=hl.A,h=hl.Q;for(o=0,r=0;o<c;){switch(n=l[o++],r=o,i=0,n){case d:case m:i=1;break;case u:i=3;break;case h:i=2;break;case p:var b=t[4],g=t[5],_=hd(t[0]*t[0]+t[1]*t[1]),y=hd(t[2]*t[2]+t[3]*t[3]),v=hu(-t[1]/y,t[0]/_);l[o]*=_,l[o++]+=b,l[o]*=y,l[o++]+=g,l[o++]*=_,l[o++]*=y,l[o++]+=v,l[o++]+=v,o+=2,r=o;break;case f:s[0]=l[o++],s[1]=l[o++],ao(s,s,t),l[r++]=s[0],l[r++]=s[1],s[0]+=l[o++],s[1]+=l[o++],ao(s,s,t),l[r++]=s[0],l[r++]=s[1]}for(a=0;a<i;a++){var F=hc[a];F[0]=l[o++],F[1]=l[o++],ao(F,F,t),l[r++]=F[0],l[r++]=F[1]}}e.increaseVersion()}}var hf=Math.sqrt,hp=Math.sin,hh=Math.cos,hb=Math.PI;function hg(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function h_(e,t){return(e[0]*t[0]+e[1]*t[1])/(hg(e)*hg(t))}function hy(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(h_(e,t))}function hv(e,t,n,i,o,r,a,s,l,c,d){var u=hb/180*l,m=hh(u)*(e-n)/2+hp(u)*(t-i)/2,f=-1*hp(u)*(e-n)/2+hh(u)*(t-i)/2,p=m*m/(a*a)+f*f/(s*s);p>1&&(a*=hf(p),s*=hf(p));var h=(o===r?-1:1)*hf((a*a*(s*s)-a*a*(f*f)-s*s*(m*m))/(a*a*(f*f)+s*s*(m*m)))||0,b=h*a*f/s,g=-(h*s)*m/a,_=(e+n)/2+hh(u)*b-hp(u)*g,y=(t+i)/2+hp(u)*b+hh(u)*g,v=hy([1,0],[(m-b)/a,(f-g)/s]),F=[(m-b)/a,(f-g)/s],x=[(-1*m-b)/a,(-1*f-g)/s],w=hy(F,x);if(-1>=h_(F,x)&&(w=hb),h_(F,x)>=1&&(w=0),w<0){var k=Math.round(w/hb*1e6)/1e6;w=2*hb+k%2*hb}d.addData(c,_,y,a,s,v,w,u,r)}var hF=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,hx=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,hw=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r7(t,e),t.prototype.applyTransform=function(e){},t}(dJ);function hk(e){return null!=e.setData}function hE(e,t){var n=function(e){var t,n=new dP;if(!e)return n;var i=0,o=0,r=0,a=0,s=dP.CMD,l=e.match(hF);if(!l)return n;for(var c=0;c<l.length;c++){for(var d=l[c],u=d.charAt(0),m=void 0,f=d.match(hx)||[],p=f.length,h=0;h<p;h++)f[h]=parseFloat(f[h]);for(var b=0;b<p;){var g=void 0,_=void 0,y=void 0,v=void 0,F=void 0,x=void 0,w=void 0,k=i,E=o,T=void 0,M=void 0;switch(u){case"l":i+=f[b++],o+=f[b++],m=s.L,n.addData(m,i,o);break;case"L":i=f[b++],o=f[b++],m=s.L,n.addData(m,i,o);break;case"m":i+=f[b++],o+=f[b++],m=s.M,n.addData(m,i,o),r=i,a=o,u="l";break;case"M":i=f[b++],o=f[b++],m=s.M,n.addData(m,i,o),r=i,a=o,u="L";break;case"h":i+=f[b++],m=s.L,n.addData(m,i,o);break;case"H":i=f[b++],m=s.L,n.addData(m,i,o);break;case"v":o+=f[b++],m=s.L,n.addData(m,i,o);break;case"V":o=f[b++],m=s.L,n.addData(m,i,o);break;case"C":m=s.C,n.addData(m,f[b++],f[b++],f[b++],f[b++],f[b++],f[b++]),i=f[b-2],o=f[b-1];break;case"c":m=s.C,n.addData(m,f[b++]+i,f[b++]+o,f[b++]+i,f[b++]+o,f[b++]+i,f[b++]+o),i+=f[b-2],o+=f[b-1];break;case"S":g=i,_=o,T=n.len(),M=n.data,t===s.C&&(g+=i-M[T-4],_+=o-M[T-3]),m=s.C,k=f[b++],E=f[b++],i=f[b++],o=f[b++],n.addData(m,g,_,k,E,i,o);break;case"s":g=i,_=o,T=n.len(),M=n.data,t===s.C&&(g+=i-M[T-4],_+=o-M[T-3]),m=s.C,k=i+f[b++],E=o+f[b++],i+=f[b++],o+=f[b++],n.addData(m,g,_,k,E,i,o);break;case"Q":k=f[b++],E=f[b++],i=f[b++],o=f[b++],m=s.Q,n.addData(m,k,E,i,o);break;case"q":k=f[b++]+i,E=f[b++]+o,i+=f[b++],o+=f[b++],m=s.Q,n.addData(m,k,E,i,o);break;case"T":g=i,_=o,T=n.len(),M=n.data,t===s.Q&&(g+=i-M[T-4],_+=o-M[T-3]),i=f[b++],o=f[b++],m=s.Q,n.addData(m,g,_,i,o);break;case"t":g=i,_=o,T=n.len(),M=n.data,t===s.Q&&(g+=i-M[T-4],_+=o-M[T-3]),i+=f[b++],o+=f[b++],m=s.Q,n.addData(m,g,_,i,o);break;case"A":y=f[b++],v=f[b++],F=f[b++],x=f[b++],w=f[b++],k=i,E=o,i=f[b++],hv(k,E,i,o=f[b++],x,w,y,v,F,m=s.A,n);break;case"a":y=f[b++],v=f[b++],F=f[b++],x=f[b++],w=f[b++],k=i,E=o,i+=f[b++],hv(k,E,i,o+=f[b++],x,w,y,v,F,m=s.A,n)}}("z"===u||"Z"===u)&&(m=s.Z,n.addData(m),i=r,o=a),t=m}return n.toStatic(),n}(e),i=rx({},t);return i.buildPath=function(e){var t=hk(e);if(t&&e.canSave()){e.appendPath(n);var i=e.getContext();i&&e.rebuildPath(i,1)}else{var i=t?e.getContext():e;i&&n.rebuildPath(i,1)}},i.applyTransform=function(e){hm(n,e),this.dirtyShape()},i}function hT(e,t){t=t||{};var n=new dJ;return e.shape&&n.setShape(e.shape),n.setStyle(e.style),t.bakeTransform?hm(n.path,e.getComputedTransform()):t.toLocal?n.setLocalTransform(e.getComputedTransform()):n.copyTransform(e),n.buildPath=e.buildPath,n.applyTransform=n.applyTransform,n.z=e.z,n.z2=e.z2,n.zlevel=e.zlevel,n}var hM=function(){this.cx=0,this.cy=0,this.r=0},hA=function(e){function t(t){return e.call(this,t)||this}return r7(t,e),t.prototype.getDefaultShape=function(){return new hM},t.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI)},t}(dJ);hA.prototype.type="circle";let hC=hA;var hD=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},hS=function(e){function t(t){return e.call(this,t)||this}return r7(t,e),t.prototype.getDefaultShape=function(){return new hD},t.prototype.buildPath=function(e,t){var n=t.cx,i=t.cy,o=t.rx,r=t.ry,a=.5522848*o,s=.5522848*r;e.moveTo(n-o,i),e.bezierCurveTo(n-o,i-s,n-a,i-r,n,i-r),e.bezierCurveTo(n+a,i-r,n+o,i-s,n+o,i),e.bezierCurveTo(n+o,i+s,n+a,i+r,n,i+r),e.bezierCurveTo(n-a,i+r,n-o,i+s,n-o,i),e.closePath()},t}(dJ);hS.prototype.type="ellipse";let hL=hS;var hI=Math.PI,hO=2*hI,hR=Math.sin,hY=Math.cos,hP=Math.acos,hN=Math.atan2,hB=Math.abs,hH=Math.sqrt,hz=Math.max,hj=Math.min;function hU(e,t,n,i,o,r,a){var s=e-n,l=t-i,c=(a?r:-r)/hH(s*s+l*l),d=c*l,u=-c*s,m=e+d,f=t+u,p=n+d,h=i+u,b=(m+p)/2,g=(f+h)/2,_=p-m,y=h-f,v=_*_+y*y,F=o-r,x=m*h-p*f,w=(y<0?-1:1)*hH(hz(0,F*F*v-x*x)),k=(x*y-_*w)/v,E=(-x*_-y*w)/v,T=(x*y+_*w)/v,M=(-x*_+y*w)/v,A=k-b,C=E-g,D=T-b,S=M-g;return A*A+C*C>D*D+S*S&&(k=T,E=M),{cx:k,cy:E,x0:-d,y0:-u,x1:k*(o/F-1),y1:E*(o/F-1)}}var hW=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},hV=function(e){function t(t){return e.call(this,t)||this}return r7(t,e),t.prototype.getDefaultShape=function(){return new hW},t.prototype.buildPath=function(e,t){!function(e,t){var n,i=hz(t.r,0),o=hz(t.r0||0,0),r=i>0,a=o>0;if(r||a){if(r||(i=o,o=0),o>i){var s=i;i=o,o=s}var l=t.startAngle,c=t.endAngle;if(!(isNaN(l)||isNaN(c))){var d=t.cx,u=t.cy,m=!!t.clockwise,f=hB(c-l),p=f>hO&&f%hO;if(p>1e-4&&(f=p),i>1e-4)if(f>hO-1e-4)e.moveTo(d+i*hY(l),u+i*hR(l)),e.arc(d,u,i,l,c,!m),o>1e-4&&(e.moveTo(d+o*hY(c),u+o*hR(c)),e.arc(d,u,o,c,l,m));else{var h=void 0,b=void 0,g=void 0,_=void 0,y=void 0,v=void 0,F=void 0,x=void 0,w=void 0,k=void 0,E=void 0,T=void 0,M=void 0,A=void 0,C=void 0,D=void 0,S=i*hY(l),L=i*hR(l),I=o*hY(c),O=o*hR(c),R=f>1e-4;if(R){var Y=t.cornerRadius;Y&&(h=(n=function(e){var t;if(rO(e)){var n=e.length;if(!n)return e;t=1===n?[e[0],e[0],0,0]:2===n?[e[0],e[0],e[1],e[1]]:3===n?e.concat(e[2]):e}else t=[e,e,e,e];return t}(Y))[0],b=n[1],g=n[2],_=n[3]);var P=hB(i-o)/2;if(y=hj(P,g),v=hj(P,_),F=hj(P,h),x=hj(P,b),E=w=hz(y,v),T=k=hz(F,x),(w>1e-4||k>1e-4)&&(M=i*hY(c),A=i*hR(c),C=o*hY(l),D=o*hR(l),f<hI)){var N=function(e,t,n,i,o,r,a,s){var l=n-e,c=i-t,d=a-o,u=s-r,m=u*l-d*c;if(!(m*m<1e-4))return m=(d*(t-r)-u*(e-o))/m,[e+m*l,t+m*c]}(S,L,C,D,M,A,I,O);if(N){var B=S-N[0],H=L-N[1],z=M-N[0],j=A-N[1],U=1/hR(hP((B*z+H*j)/(hH(B*B+H*H)*hH(z*z+j*j)))/2),W=hH(N[0]*N[0]+N[1]*N[1]);E=hj(w,(i-W)/(U+1)),T=hj(k,(o-W)/(U-1))}}}if(R)if(E>1e-4){var V=hj(g,E),G=hj(_,E),$=hU(C,D,S,L,i,V,m),q=hU(M,A,I,O,i,G,m);e.moveTo(d+$.cx+$.x0,u+$.cy+$.y0),E<w&&V===G?e.arc(d+$.cx,u+$.cy,E,hN($.y0,$.x0),hN(q.y0,q.x0),!m):(V>0&&e.arc(d+$.cx,u+$.cy,V,hN($.y0,$.x0),hN($.y1,$.x1),!m),e.arc(d,u,i,hN($.cy+$.y1,$.cx+$.x1),hN(q.cy+q.y1,q.cx+q.x1),!m),G>0&&e.arc(d+q.cx,u+q.cy,G,hN(q.y1,q.x1),hN(q.y0,q.x0),!m))}else e.moveTo(d+S,u+L),e.arc(d,u,i,l,c,!m);else e.moveTo(d+S,u+L);if(o>1e-4&&R)if(T>1e-4){var V=hj(h,T),G=hj(b,T),$=hU(I,O,M,A,o,-G,m),q=hU(S,L,C,D,o,-V,m);e.lineTo(d+$.cx+$.x0,u+$.cy+$.y0),T<k&&V===G?e.arc(d+$.cx,u+$.cy,T,hN($.y0,$.x0),hN(q.y0,q.x0),!m):(G>0&&e.arc(d+$.cx,u+$.cy,G,hN($.y0,$.x0),hN($.y1,$.x1),!m),e.arc(d,u,o,hN($.cy+$.y1,$.cx+$.x1),hN(q.cy+q.y1,q.cx+q.x1),m),V>0&&e.arc(d+q.cx,u+q.cy,V,hN(q.y1,q.x1),hN(q.y0,q.x0),!m))}else e.lineTo(d+I,u+O),e.arc(d,u,o,c,l,m);else e.lineTo(d+I,u+O)}else e.moveTo(d,u);e.closePath()}}}(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(dJ);hV.prototype.type="sector";let hG=hV;var h$=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},hq=function(e){function t(t){return e.call(this,t)||this}return r7(t,e),t.prototype.getDefaultShape=function(){return new h$},t.prototype.buildPath=function(e,t){var n=t.cx,i=t.cy,o=2*Math.PI;e.moveTo(n+t.r,i),e.arc(n,i,t.r,0,o,!1),e.moveTo(n+t.r0,i),e.arc(n,i,t.r0,0,o,!0)},t}(dJ);hq.prototype.type="ring";let hX=hq;function hK(e,t,n){var i=t.smooth,o=t.points;if(o&&o.length>=2){if(i){var r=function(e,t,n,i){var o,r,a,s,l=[],c=[],d=[],u=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var m=0,f=e.length;m<f;m++)ar(a,a,e[m]),aa(s,s,e[m]);ar(a,a,i[0]),aa(s,s,i[1])}for(var m=0,f=e.length;m<f;m++){var p,h,b,g=e[m];if(n)o=e[m?m-1:f-1],r=e[(m+1)%f];else if(0===m||m===f-1){l.push([(p=e[m])[0],p[1]]);continue}else o=e[m-1],r=e[m+1];h=r,b=o,c[0]=h[0]-b[0],c[1]=h[1]-b[1],at(c,c,t);var _=an(g,o),y=an(g,r),v=_+y;0!==v&&(_/=v,y/=v),at(d,c,-_),at(u,c,y);var F=ae([],g,d),x=ae([],g,u);i&&(aa(F,F,a),ar(F,F,s),aa(x,x,a),ar(x,x,s)),l.push(F),l.push(x)}return n&&l.push(l.shift()),l}(o,i,n,t.smoothConstraint);e.moveTo(o[0][0],o[0][1]);for(var a=o.length,s=0;s<(n?a:a-1);s++){var l=r[2*s],c=r[2*s+1],d=o[(s+1)%a];e.bezierCurveTo(l[0],l[1],c[0],c[1],d[0],d[1])}}else{e.moveTo(o[0][0],o[0][1]);for(var s=1,u=o.length;s<u;s++)e.lineTo(o[s][0],o[s][1])}n&&e.closePath()}}var hJ=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},hZ=function(e){function t(t){return e.call(this,t)||this}return r7(t,e),t.prototype.getDefaultShape=function(){return new hJ},t.prototype.buildPath=function(e,t){hK(e,t,!0)},t}(dJ);hZ.prototype.type="polygon";let hQ=hZ;var h0=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},h1=function(e){function t(t){return e.call(this,t)||this}return r7(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new h0},t.prototype.buildPath=function(e,t){hK(e,t,!1)},t}(dJ);h1.prototype.type="polyline";let h2=h1;var h5={},h3=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},h4=function(e){function t(t){return e.call(this,t)||this}return r7(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new h3},t.prototype.buildPath=function(e,t){if(this.subPixelOptimize){var n,i,o,r,a=d4(h5,t,this.style);n=a.x1,i=a.y1,o=a.x2,r=a.y2}else n=t.x1,i=t.y1,o=t.x2,r=t.y2;var s=t.percent;0!==s&&(e.moveTo(n,i),s<1&&(o=n*(1-s)+o*s,r=i*(1-s)+r*s),e.lineTo(o,r))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(dJ);h4.prototype.type="line";let h6=h4;var h8=[],h7=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function h9(e,t,n){var i=e.cpx2,o=e.cpy2;return null!=i||null!=o?[(n?sk:sw)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?sk:sw)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?sC:sA)(e.x1,e.cpx1,e.x2,t),(n?sC:sA)(e.y1,e.cpy1,e.y2,t)]}var be=function(e){function t(t){return e.call(this,t)||this}return r7(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new h7},t.prototype.buildPath=function(e,t){var n=t.x1,i=t.y1,o=t.x2,r=t.y2,a=t.cpx1,s=t.cpy1,l=t.cpx2,c=t.cpy2,d=t.percent;0!==d&&(e.moveTo(n,i),null==l||null==c?(d<1&&(sS(n,a,o,d,h8),a=h8[1],o=h8[2],sS(i,s,r,d,h8),s=h8[1],r=h8[2]),e.quadraticCurveTo(a,s,o,r)):(d<1&&(sM(n,a,l,o,d,h8),a=h8[1],l=h8[2],o=h8[3],sM(i,s,c,r,d,h8),s=h8[1],c=h8[2],r=h8[3]),e.bezierCurveTo(a,s,l,c,o,r)))},t.prototype.pointAt=function(e){return h9(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t,n=h9(this.shape,e,!0),i=Math.sqrt((t=n)[0]*t[0]+t[1]*t[1]);return 0===i?(n[0]=0,n[1]=0):(n[0]=n[0]/i,n[1]=n[1]/i),n},t}(dJ);be.prototype.type="bezier-curve";let bt=be;var bn=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},bi=function(e){function t(t){return e.call(this,t)||this}return r7(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new bn},t.prototype.buildPath=function(e,t){var n=t.cx,i=t.cy,o=Math.max(t.r,0),r=t.startAngle,a=t.endAngle,s=t.clockwise,l=Math.cos(r),c=Math.sin(r);e.moveTo(l*o+n,c*o+i),e.arc(n,i,o,r,a,!s)},t}(dJ);bi.prototype.type="arc";let bo=bi,br=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="compound",t}return r7(t,e),t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t=t||e[n].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],i=0;i<n.length;i++)n[i].buildPath(e,n[i].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),dJ.prototype.getBoundingRect.call(this)},t}(dJ);var ba=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}();let bs=function(e){function t(t,n,i,o,r,a){var s=e.call(this,r)||this;return s.x=null==t?0:t,s.y=null==n?0:n,s.x2=null==i?1:i,s.y2=null==o?0:o,s.type="linear",s.global=a||!1,s}return r7(t,e),t}(ba),bl=function(e){function t(t,n,i,o,r){var a=e.call(this,o)||this;return a.x=null==t?.5:t,a.y=null==n?.5:n,a.r=null==i?.5:i,a.type="radial",a.global=r||!1,a}return r7(t,e),t}(ba);var bc=Math.min,bd=Math.max,bu=Math.abs,bm=[0,0],bf=[0,0],bp=a5(),bh=bp.minTv,bb=bp.maxTv;let bg=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new aB;for(var n=0;n<2;n++)this._axes[n]=new aB;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var n=this._corners,i=this._axes,o=e.x,r=e.y,a=o+e.width,s=r+e.height;if(n[0].set(o,r),n[1].set(a,r),n[2].set(a,s),n[3].set(o,s),t)for(var l=0;l<4;l++)n[l].transform(t);aB.sub(i[0],n[1],n[0]),aB.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var l=0;l<2;l++)this._origin[l]=i[l].dot(n[0])},e.prototype.intersect=function(e,t,n){var i=!0,o=!t;return(t&&aB.set(t,0,0),bp.reset(n,!o),!this._intersectCheckOneSide(this,e,o,1)&&(i=!1,o)||!this._intersectCheckOneSide(e,this,o,-1)&&(i=!1,o))?i:(o||bp.negativeSize||aB.copy(t,i?bp.useDir?bp.dirMinTv:bh:bb),i)},e.prototype._intersectCheckOneSide=function(e,t,n,i){for(var o=!0,r=0;r<2;r++){var a=e._axes[r];if(e._getProjMinMaxOnAxis(r,e._corners,bm),e._getProjMinMaxOnAxis(r,t._corners,bf),bp.negativeSize||bm[1]<bf[0]||bm[0]>bf[1]){if(o=!1,bp.negativeSize||n)return o;var s=bu(bf[0]-bm[1]),l=bu(bm[0]-bf[1]);bc(s,l)>bb.len()&&(s<l?aB.scale(bb,a,-s*i):aB.scale(bb,a,l*i))}else if(!n){var s=bu(bf[0]-bm[1]),l=bu(bm[0]-bf[1]);(bp.useDir||bc(s,l)<bh.len())&&((s<l||!bp.bidirectional)&&(aB.scale(bh,a,s*i),bp.useDir&&bp.calcDirMTV()),(s>=l||!bp.bidirectional)&&(aB.scale(bh,a,-l*i),bp.useDir&&bp.calcDirMTV()))}}return o},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var i=this._axes[e],o=this._origin,r=t[0].dot(i)+o[e],a=r,s=r,l=1;l<t.length;l++){var c=t[l].dot(i)+o[e];a=bc(c,a),s=bd(c,s)}n[0]=a+bp.touchThreshold,n[1]=s-bp.touchThreshold,bp.negativeSize=n[1]<n[0]},e}();var b_=[];let by=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return r7(t,e),t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(var t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var t=this._displayables[e];t.parent=this,t.update(),t.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var t=this._temporaryDisplayables[e];t.parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new a3(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(b_)),e.union(i)}this._rect=e}return this._rect},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1])){for(var i=0;i<this._displayables.length;i++)if(this._displayables[i].contain(e,t))return!0}return!1},t}(dr);var bv=ck();function bF(e,t,n,i,o){if(t&&t.ecModel){var r,a=t.ecModel.getUpdatePayload();r=a&&a.animation}var s=t&&t.isAnimationEnabled(),l="update"===e;if(!s)return null;var c=void 0,d=void 0,u=void 0;return i?(c=rV(i.duration,200),d=rV(i.easing,"cubicOut"),u=0):(c=t.getShallow(l?"animationDurationUpdate":"animationDuration"),d=t.getShallow(l?"animationEasingUpdate":"animationEasing"),u=t.getShallow(l?"animationDelayUpdate":"animationDelay")),r&&(null!=r.duration&&(c=r.duration),null!=r.easing&&(d=r.easing),null!=r.delay&&(u=r.delay)),rR(u)&&(u=u(n,o)),rR(c)&&(c=c(n)),{duration:c||0,delay:u,easing:d}}function bx(e,t,n,i,o,r,a){var s,l=!1;rR(o)?(a=r,r=o,o=null):rB(o)&&(r=o.cb,a=o.during,l=o.isFrom,s=o.removeOpt,o=o.dataIndex);var c="leave"===e;c||t.stopAnimation("leave");var d=bF(e,i,o,c?s||{}:null,i&&i.getAnimationDelayParams?i.getAnimationDelayParams(t,o):null);if(d&&d.duration>0){var u={duration:d.duration,delay:d.delay||0,easing:d.easing,done:r,force:!!r||!!a,setToFinal:!c,scope:e,during:a};l?t.animateFrom(n,u):t.animateTo(n,u)}else t.stopAnimation(),l||t.attr(n),a&&a(1),r&&r()}function bw(e,t,n,i,o,r){bx("update",e,t,n,i,o,r)}function bk(e,t,n,i,o,r){bx("enter",e,t,n,i,o,r)}function bE(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++)if("leave"===e.animators[t].scope)return!0;return!1}function bT(e,t,n,i,o,r){bE(e)||bx("leave",e,t,n,i,o,r)}function bM(e,t,n,i){e.removeTextContent(),e.removeTextGuideLine(),bT(e,{style:{opacity:0}},t,n,i)}function bA(e,t,n){function i(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||bM(e,t,n,i)}):bM(e,t,n,i)}var bC={},bD=["x","y"],bS=["width","height"];function bL(e){return dJ.extend(e)}var bI=function(e,t){var n=hE(e,t),i=hw;function o(e){var t=i.call(this,e)||this;return t.applyTransform=n.applyTransform,t.buildPath=n.buildPath,t}return r7(o,i),o};function bO(e,t){return bI(e,t)}function bR(e,t){bC[e]=t}function bY(e){if(bC.hasOwnProperty(e))return bC[e]}function bP(e,t,n,i){var o=new hw(hE(e,t));return n&&("center"===i&&(n=bB(n,o.getBoundingRect())),bz(o,n)),o}function bN(e,t,n){var i=new d5({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var o={width:e.width,height:e.height};i.setStyle(bB(t,o))}}});return i}function bB(e,t){var n,i=t.width/t.height,o=e.height*i;return n=o<=e.width?e.height:(o=e.width)/i,{x:e.x+e.width/2-o/2,y:e.y+e.height/2-n/2,width:o,height:n}}var bH=function(e,t){for(var n=[],i=e.length,o=0;o<i;o++){var r=e[o];n.push(r.getUpdatedPathProxy(!0))}var a=new dJ(t);return a.createPathProxy(),a.buildPath=function(e){if(hk(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},a};function bz(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function bj(e,t){return d4(e,e,{lineWidth:t}),e}function bU(e,t){return d6(e,e,t),e}var bW=d8;function bV(e,t){for(var n=aI([]);e&&e!==t;)aR(n,e.getLocalTransform(),n),e=e.parent;return n}function bG(e,t,n){return t&&!rT(t)&&(t=lC.getLocalTransform(t)),n&&(t=aN([],t)),ao([],e,t)}function b$(e,t,n){var i=0===t[4]||0===t[5]||0===t[0]?1:l6(2*t[4]/t[0]),o=0===t[4]||0===t[5]||0===t[2]?1:l6(2*t[4]/t[2]),r=["left"===e?-i:"right"===e?i:0,"top"===e?-o:"bottom"===e?o:0];return l6((r=bG(r,t,n))[0])>l6(r[1])?r[0]>0?"right":"left":r[1]>0?"bottom":"top"}function bq(e,t,n){if(e&&t){var i,o=(i={},e.traverse(function(e){!e.isGroup&&e.anid&&(i[e.anid]=e)}),i);t.traverse(function(e){if(!e.isGroup&&e.anid){var t=o[e.anid];if(t){var i=r(e);e.attr(r(t)),bw(e,i,n,ug(e).dataIndex)}}})}function r(e){var t={x:e.x,y:e.y,rotation:e.rotation};return null!=e.shape&&(t.shape=rv(e.shape)),t}}function bX(e,t){return rA(e,function(e){var n=e[0];n=l3(n=l4(n,t.x),t.x+t.width);var i=e[1];return[n,i=l3(i=l4(i,t.y),t.y+t.height)]})}function bK(e,t){var n=l4(e.x,t.x),i=l3(e.x+e.width,t.x+t.width),o=l4(e.y,t.y),r=l3(e.y+e.height,t.y+t.height);if(i>=n&&r>=o)return{x:n,y:o,width:i-n,height:r-o}}function bJ(e,t,n){var i=rx({rectHover:!0},t),o=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(o.image=e.slice(8),rw(o,n),new d5(i)):bP(e.replace("path://",""),i,n,"center")}function bZ(e,t,n,i,o){for(var r=0,a=o[o.length-1];r<o.length;r++){var s=o[r];if(bQ(e,t,n,i,s[0],s[1],a[0],a[1]))return!0;a=s}}function bQ(e,t,n,i,o,r,a,s){var l,c=n-e,d=i-t,u=a-o,m=s-r,f=u*d-c*m;if((l=f)<=1e-6&&l>=-1e-6)return!1;var p=e-o,h=t-r,b=(p*d-c*h)/f;if(b<0||b>1)return!1;var g=(p*m-u*h)/f;return!(g<0)&&!(g>1)}function b0(e,t,n,i,o){return null==t||(rN(t)?b1[0]=b1[1]=b1[2]=b1[3]=t:(b1[0]=t[0],b1[1]=t[1],b1[2]=t[2],b1[3]=t[3]),i&&(b1[0]=l4(0,b1[0]),b1[1]=l4(0,b1[1]),b1[2]=l4(0,b1[2]),b1[3]=l4(0,b1[3])),n&&(b1[0]=-b1[0],b1[1]=-b1[1],b1[2]=-b1[2],b1[3]=-b1[3]),b2(e,b1,"x","width",3,1,o&&o[0]||0),b2(e,b1,"y","height",0,2,o&&o[1]||0)),e}var b1=[0,0,0,0];function b2(e,t,n,i,o,r,a){var s=t[r]+t[o],l=e[i];e[i]+=s,a=l4(0,l3(a,l)),e[i]<a?(e[i]=a,e[n]+=t[o]>=0?-t[o]:t[r]>=0?l+t[r]:l6(s)>1e-8?(l-a)*t[o]/s:0):e[n]-=t[o]}function b5(e){var t=e.itemTooltipOption,n=e.componentModel,i=e.itemName,o=rY(t)?{formatter:t}:t,r=n.mainType,a=n.componentIndex,s={componentType:r,name:i,$vars:["name"]};s[r+"Index"]=a;var l=e.formatterParamsExtra;l&&rM(rS(l),function(e){r3(s,e)||(s[e]=l[e],s.$vars.push(e))});var c=ug(e.el);c.componentMainType=r,c.componentIndex=a,c.tooltipConfig={name:i,option:rw({content:i,encodeHTMLContent:!0,formatterParams:s},o)}}function b3(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function b4(e,t){if(e)if(rO(e))for(var n=0;n<e.length;n++)b3(e[n],t);else b3(e,t)}function b6(e){return!e||l6(e[1])<b8&&l6(e[2])<b8||l6(e[0])<b8&&l6(e[3])<b8}var b8=1e-5;function b7(e,t){return e?a3.copy(e,t):t.clone()}function b9(e,t){return t?aO(e||aL(),t):void 0}function ge(e){return{z:e.get("z")||0,zlevel:e.get("zlevel")||0}}function gt(e){var t=-1/0,n=1/0;function i(e){if(e&&!e.isGroup){var t=e.currentStates;if(t.length)for(var n=0;n<t.length;n++)o(e.states[t[n]]);o(e)}}function o(e){if(e){var i=e.z2;i>t&&(t=i),i<n&&(n=i)}}return b3(e,function(e){i(e),i(e.getTextContent()),i(e.getTextGuideLine())}),n>t&&(n=t=0),{min:n,max:t}}function gn(e,t,n){!function e(t,n,i,o){if(t.ignoreModelZ)return o;var r=t.getTextContent(),a=t.getTextGuideLine();if(t.isGroup)for(var s=t.childrenRef(),l=0;l<s.length;l++)o=l4(e(s[l],n,i,o),o);else t.z=n,t.zlevel=i,o=l4(t.z2||0,o);if(r&&(r.z=n,r.zlevel=i,isFinite(o)&&(r.z2=o+2)),a){var c=t.textGuideLineConfig;a.z=n,a.zlevel=i,isFinite(o)&&(a.z2=o+(c&&c.showAbove?1:-1))}return o}(e,t,n,-1/0)}bC.circle=hC,bC.ellipse=hL,bC.sector=hG,bC.ring=hX,bC.polygon=hQ,bC.polyline=h2,bC.rect=ut,bC.line=h6,bC.bezierCurve=bt,bC.arc=bo;var gi=ck(),go=hs(),gr=function(){function e(){this.group=new lQ,this.uid=mg("viewChart"),this.renderTask=pv({plan:gl,reset:gc}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,i){},e.prototype.highlight=function(e,t,n,i){var o=e.getData(i&&i.dataType);o&&gs(o,i,"emphasis")},e.prototype.downplay=function(e,t,n,i){var o=e.getData(i&&i.dataType);o&&gs(o,i,"normal")},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,i){this.render(e,t,n,i)},e.prototype.updateLayout=function(e,t,n,i){this.render(e,t,n,i)},e.prototype.updateVisual=function(e,t,n,i){this.render(e,t,n,i)},e.prototype.eachRendered=function(e){b4(this.group,e)},e.markUpdateMethod=function(e,t){gi(e).updateMethod=t},e.protoInitialize=void(e.prototype.type="chart"),e}();function ga(e,t,n){e&&u2(e)&&("emphasis"===t?uW:uV)(e,n)}function gs(e,t,n){var i,o,r=cw(e,t),a=t&&null!=t.highlightKey?(null==(o=uv[i=t.highlightKey])&&uy<=32&&(o=uv[i]=uy++),o):null;null!=r?rM(cp(r),function(t){ga(e.getItemGraphicEl(t),n,a)}):e.eachItemGraphicEl(function(e){ga(e,n,a)})}function gl(e){return go(e.model)}function gc(e){var t=e.model,n=e.ecModel,i=e.api,o=e.payload,r=t.pipelineContext.progressiveRender,a=e.view,s=o&&gi(o).updateMethod,l=r?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](t,n,i,o),gd[l]}cR(gr,["dispose"]),cH(gr);var gd={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},gu="\0__throttleOriginMethod",gm="\0__throttleRate",gf="\0__throttleType";function gp(e,t,n){var i,o,r,a,s,l=0,c=0,d=null;function u(){c=new Date().getTime(),d=null,e.apply(r,a||[])}t=t||0;var m=function(){for(var e=[],m=0;m<arguments.length;m++)e[m]=arguments[m];i=new Date().getTime(),r=this,a=e;var f=s||t,p=s||n;s=null,o=i-(p?l:c)-f,clearTimeout(d),p?d=setTimeout(u,f):o>=0?u():d=setTimeout(u,-o),l=i};return m.clear=function(){d&&(clearTimeout(d),d=null)},m.debounceNextCall=function(e){s=e},m}function gh(e,t,n,i){var o=e[t];if(o){var r=o[gu]||o,a=o[gf];if(o[gm]!==n||a!==i){if(null==n||!i)return e[t]=r;(o=e[t]=gp(r,n,"debounce"===i))[gu]=r,o[gf]=i,o[gm]=n}return o}}function gb(e,t){var n=e[t];n&&n[gu]&&(n.clear&&n.clear(),e[t]=n[gu])}var gg=ck(),g_={itemStyle:cz(mm,!0),lineStyle:cz(mc,!0)},gy={lineStyle:"stroke",itemStyle:"fill"};function gv(e,t){var n=e.visualStyleMapper||g_[t];return n||(console.warn("Unknown style type '"+t+"'."),g_.itemStyle)}function gF(e,t){var n=e.visualDrawType||gy[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var gx=new mh,gw=Math.PI,gk=function(){function e(e,t,n,i){this._stageTaskMap=r1(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,o=!t&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,r=i&&i.modDataCount,a=null!=r?Math.ceil(r/o):null;return{step:o,modBy:a,modDataCount:r}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),i=e.getData().count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&i>=n.threshold,r=e.get("large")&&i>=e.get("largeThreshold"),a="mod"===e.get("progressiveChunkMode")?i:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:a,large:r}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=r1();e.eachSeries(function(e){var i=e.getProgressive(),o=e.uid;n.set(o,{id:o,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:i&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),t._pipe(e,e.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;rM(this._allHandlers,function(i){var o=e.get(i.uid)||e.set(i.uid,{});rX(!(i.reset&&i.overallReset),""),i.reset&&this._createSeriesStageTask(i,o,t,n),i.overallReset&&this._createOverallStageTask(i,o,t,n)},this)},e.prototype.prepareView=function(e,t,n,i){var o=e.renderTask,r=o.context;r.model=t,r.ecModel=n,r.api=i,o.__block=!e.incrementalPrepareRender,this._pipe(t,o)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,i){i=i||{};var o=!1,r=this;function a(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}rM(e,function(e,s){if(!i.visualType||i.visualType===e.visualType){var l=r._stageTaskMap.get(e.uid),c=l.seriesTaskMap,d=l.overallTask;if(d){var u,m=d.agentStubMap;m.each(function(e){a(i,e)&&(e.dirty(),u=!0)}),u&&d.dirty(),r.updatePayload(d,n);var f=r.getPerformArgs(d,i.block);m.each(function(e){e.perform(f)}),d.perform(f)&&(o=!0)}else c&&c.each(function(s,l){a(i,s)&&s.dirty();var c=r.getPerformArgs(s,i.block);c.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),r.updatePayload(s,n),s.perform(c)&&(o=!0)})}}),this.unfinished=o||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,i){var o=this,r=t.seriesTaskMap,a=t.seriesTaskMap=r1(),s=e.seriesType,l=e.getTargetSeries;function c(t){var s=t.uid,l=a.set(s,r&&r.get(s)||pv({plan:gC,reset:gD,count:gI}));l.context={model:t,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:o},o._pipe(t,l)}e.createOnAllSeries?n.eachRawSeries(c):s?n.eachRawSeriesByType(s,c):l&&l(n,i).each(c)},e.prototype._createOverallStageTask=function(e,t,n,i){var o=this,r=t.overallTask=t.overallTask||pv({reset:gE});r.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:o};var a=r.agentStubMap,s=r.agentStubMap=r1(),l=e.seriesType,c=e.getTargetSeries,d=!0,u=!1;function m(e){var t=e.uid,n=s.set(t,a&&a.get(t)||(u=!0,pv({reset:gT,onDirty:gA})));n.context={model:e,overallProgress:d},n.agent=r,n.__block=d,o._pipe(e,n)}rX(!e.createOnAllSeries,""),l?n.eachRawSeriesByType(l,m):c?c(n,i).each(m):(d=!1,rM(n.getSeries(),m)),u&&r.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,i=this._pipelineMap.get(n);i.head||(i.head=t),i.tail&&i.tail.pipe(t),i.tail=t,t.__idxInPipeline=i.count++,t.__pipeline=i},e.wrapStageHandler=function(e,t){return rR(e)&&(e={overallReset:e,seriesType:function(e){eS=null;try{e(gO,gR)}catch(e){}return eS}(e)}),e.uid=mg("stageHandler"),t&&(e.visualType=t),e},e}();function gE(e){e.overallReset(e.ecModel,e.api,e.payload)}function gT(e){return e.overallProgress&&gM}function gM(){this.agent.dirty(),this.getDownstream().dirty()}function gA(){this.agent&&this.agent.dirty()}function gC(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function gD(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=cp(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?rA(t,function(e,t){return gL(t)}):gS}var gS=gL(0);function gL(e){return function(t,n){var i=n.data,o=n.resetDefines[e];if(o&&o.dataEach)for(var r=t.start;r<t.end;r++)o.dataEach(i,r);else o&&o.progress&&o.progress(t,i)}}function gI(e){return e.data.count()}var gO={},gR={};function gY(e,t){for(var n in t.prototype)e[n]=r4}gY(gO,fO),gY(gR,fB),gO.eachSeriesByType=gO.eachRawSeriesByType=function(e){eS=e},gO.eachComponent=function(e){"series"===e.mainType&&e.subType&&(eS=e.subType)};var gP=fl.darkColor,gN=gP.background,gB=function(){return{axisLine:{lineStyle:{color:gP.axisLine}},splitLine:{lineStyle:{color:gP.axisSplitLine}},splitArea:{areaStyle:{color:[gP.backgroundTint,gP.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:gP.axisMinorSplitLine}},axisLabel:{color:gP.axisLabel},axisName:{}}},gH={label:{color:gP.secondary},itemStyle:{borderColor:gP.borderTint},dividerLineStyle:{color:gP.border}},gz={darkMode:!0,color:gP.theme,backgroundColor:gN,axisPointer:{lineStyle:{color:gP.border},crossStyle:{color:gP.borderShade},label:{color:gP.tertiary}},legend:{textStyle:{color:gP.secondary},pageTextStyle:{color:gP.tertiary}},textStyle:{color:gP.secondary},title:{textStyle:{color:gP.primary},subtextStyle:{color:gP.quaternary}},toolbox:{iconStyle:{borderColor:gP.accent50}},tooltip:{backgroundColor:gP.neutral20,defaultBorderColor:gP.border,textStyle:{color:gP.tertiary}},dataZoom:{borderColor:gP.accent10,textStyle:{color:gP.tertiary},brushStyle:{color:gP.backgroundTint},handleStyle:{color:gP.neutral00,borderColor:gP.accent20},moveHandleStyle:{color:gP.accent40},emphasis:{handleStyle:{borderColor:gP.accent50}},dataBackground:{lineStyle:{color:gP.accent30},areaStyle:{color:gP.accent20}},selectedDataBackground:{lineStyle:{color:gP.accent50},areaStyle:{color:gP.accent30}}},visualMap:{textStyle:{color:gP.secondary},handleStyle:{borderColor:gP.neutral30}},timeline:{lineStyle:{color:gP.accent10},label:{color:gP.tertiary},controlStyle:{color:gP.accent30,borderColor:gP.accent30}},calendar:{itemStyle:{color:gP.neutral00,borderColor:gP.neutral20},dayLabel:{color:gP.tertiary},monthLabel:{color:gP.secondary},yearLabel:{color:gP.secondary}},matrix:{x:gH,y:gH,backgroundColor:{borderColor:gP.axisLine},body:{itemStyle:{borderColor:gP.borderTint}}},timeAxis:gB(),logAxis:gB(),valueAxis:gB(),categoryAxis:gB(),line:{symbol:"circle"},graph:{color:gP.theme},gauge:{title:{color:gP.secondary},axisLine:{lineStyle:{color:[[1,gP.neutral05]]}},axisLabel:{color:gP.axisLabel},detail:{color:gP.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:gP.background}},radar:function(){var e=gB();return e.axisName={color:gP.axisLabel},e.axisLine.lineStyle.color=gP.neutral20,e}(),treemap:{breadcrumb:{itemStyle:{color:gP.neutral20,textStyle:{color:gP.secondary}},emphasis:{itemStyle:{color:gP.neutral30}}}},sunburst:{itemStyle:{borderColor:gP.background}},map:{itemStyle:{borderColor:gP.border,areaColor:gP.neutral10},label:{color:gP.tertiary},emphasis:{label:{color:gP.primary},itemStyle:{areaColor:gP.highlight}},select:{label:{color:gP.primary},itemStyle:{areaColor:gP.highlight}}},geo:{itemStyle:{borderColor:gP.border,areaColor:gP.neutral10},emphasis:{label:{color:gP.primary},itemStyle:{areaColor:gP.highlight}},select:{label:{color:gP.primary},itemStyle:{color:gP.highlight}}}};gz.categoryAxis.splitLine.show=!1;var gj=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},i={};if(rY(e)){var o=cO(e);t.mainType=o.main||null,t.subType=o.sub||null}else{var r=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};rM(e,function(e,o){for(var s=!1,l=0;l<r.length;l++){var c=r[l],d=o.lastIndexOf(c);if(d>0&&d===o.length-c.length){var u=o.slice(0,d);"data"!==u&&(t.mainType=u,t[c.toLowerCase()]=e,s=!0)}}a.hasOwnProperty(o)&&(n[o]=e,s=!0),s||(i[o]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:i}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,o=n.packedEvent,r=n.model,a=n.view;if(!r||!a)return!0;var s=t.cptQuery,l=t.dataQuery;return c(s,r,"mainType")&&c(s,r,"subType")&&c(s,r,"index","componentIndex")&&c(s,r,"name")&&c(s,r,"id")&&c(l,o,"name")&&c(l,o,"dataIndex")&&c(l,o,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,t.otherQuery,i,o));function c(e,t,n,i){return null==e[n]||t[i||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),gU=["symbol","symbolSize","symbolRotate","symbolOffset"],gW=gU.concat(["symbolKeepAspect"]);function gV(e,t,n,i,o){var r=e+t;n.isSilent(r)||i.eachComponent({mainType:"series",subType:"pie"},function(e){for(var t=e.seriesIndex,i=e.option.selectedMap,a=o.selected,s=0;s<a.length;s++)if(a[s].seriesIndex===t){var l=e.getData(),c=cw(l,o.fromActionPayload);n.trigger(r,{type:r,seriesId:e.id,name:rO(c)?l.getName(c[0]):l.getName(c),selected:rY(i)?i:rx({},i)})}})}function gG(e,t,n){for(var i;e&&(!t(e)||(i=e,!n));)e=e.__hostTarget||e.parent;return i}var g$=Math.round(9*Math.random()),gq="function"==typeof Object.defineProperty,gX=function(){function e(){this._id="__ec_inner_"+g$++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return gq?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return!!this.has(e)&&(delete this._guard(e)[this._id],!0)},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},e}(),gK=dJ.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,i=t.cy,o=t.width/2,r=t.height/2;e.moveTo(n,i-r),e.lineTo(n+o,i+r),e.lineTo(n-o,i+r),e.closePath()}}),gJ=dJ.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,i=t.cy,o=t.width/2,r=t.height/2;e.moveTo(n,i-r),e.lineTo(n+o,i),e.lineTo(n,i+r),e.lineTo(n-o,i),e.closePath()}}),gZ=dJ.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,i=t.y,o=t.width/5*3,r=Math.max(o,t.height),a=o/2,s=a*a/(r-a),l=i-r+a+s,c=Math.asin(s/a),d=Math.cos(c)*a,u=Math.sin(c),m=Math.cos(c),f=.6*a,p=.7*a;e.moveTo(n-d,l+s),e.arc(n,l,a,Math.PI-c,2*Math.PI+c),e.bezierCurveTo(n+d-u*f,l+s+m*f,n,i-p,n,i),e.bezierCurveTo(n,i-p,n-d+u*f,l+s+m*f,n-d,l+s),e.closePath()}}),gQ=dJ.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,i=t.width,o=t.x,r=t.y,a=i/3*2;e.moveTo(o,r),e.lineTo(o+a,r+n),e.lineTo(o,r+n/4*3),e.lineTo(o-a,r+n),e.lineTo(o,r),e.closePath()}}),g0={line:function(e,t,n,i,o){o.x1=e,o.y1=t+i/2,o.x2=e+n,o.y2=t+i/2},rect:function(e,t,n,i,o){o.x=e,o.y=t,o.width=n,o.height=i},roundRect:function(e,t,n,i,o){o.x=e,o.y=t,o.width=n,o.height=i,o.r=Math.min(n,i)/4},square:function(e,t,n,i,o){var r=Math.min(n,i);o.x=e,o.y=t,o.width=r,o.height=r},circle:function(e,t,n,i,o){o.cx=e+n/2,o.cy=t+i/2,o.r=Math.min(n,i)/2},diamond:function(e,t,n,i,o){o.cx=e+n/2,o.cy=t+i/2,o.width=n,o.height=i},pin:function(e,t,n,i,o){o.x=e+n/2,o.y=t+i/2,o.width=n,o.height=i},arrow:function(e,t,n,i,o){o.x=e+n/2,o.y=t+i/2,o.width=n,o.height=i},triangle:function(e,t,n,i,o){o.cx=e+n/2,o.cy=t+i/2,o.width=n,o.height=i}},g1={};rM({line:h6,rect:ut,roundRect:ut,square:ut,circle:hC,diamond:gJ,pin:gZ,arrow:gQ,triangle:gK},function(e,t){g1[t]=new e});var g2=dJ.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var i=lj(e,t,n),o=this.shape;return o&&"pin"===o.symbolType&&"inside"===t.position&&(i.y=n.y+.4*n.height),i},buildPath:function(e,t,n){var i=t.symbolType;if("none"!==i){var o=g1[i];o||(o=g1[i="rect"]),g0[i](t.x,t.y,t.width,t.height,o.shape),o.buildPath(e,o.shape,n)}}});function g5(e,t){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||fl.color.neutral00,n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=e:n.fill=e,this.markRedraw()}}function g3(e,t,n,i,o,r,a){var s,l=0===e.indexOf("empty");return l&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(s=0===e.indexOf("image://")?bN(e.slice(8),new a3(t,n,i,o),a?"center":"cover"):0===e.indexOf("path://")?bP(e.slice(7),{},new a3(t,n,i,o),a?"center":"cover"):new g2({shape:{symbolType:e,x:t,y:n,width:i,height:o}})).__isEmptyBrush=l,s.setColor=g5,r&&s.setColor(r),s}function g4(e){return isFinite(e)}function g6(e,t,n){for(var i,o,r,a,s,l,c,d,u,m,f="radial"===t.type?(r=Math.min(i=n.width,o=n.height),a=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r,t.global||(a=a*i+n.x,s=s*o+n.y,l*=r),a=g4(a)?a:.5,s=g4(s)?s:.5,l=l>=0&&g4(l)?l:.5,e.createRadialGradient(a,s,0,a,s,l)):(c=null==t.x?0:t.x,d=null==t.x2?1:t.x2,u=null==t.y?0:t.y,m=null==t.y2?0:t.y2,t.global||(c=c*n.width+n.x,d=d*n.width+n.x,u=u*n.height+n.y,m=m*n.height+n.y),c=g4(c)?c:0,d=g4(d)?d:1,u=g4(u)?u:0,m=g4(m)?m:0,e.createLinearGradient(c,u,d,m)),p=t.colorStops,h=0;h<p.length;h++)f.addColorStop(p[h].offset,p[h].color);return f}function g8(e){return parseInt(e,10)}function g7(e,t,n){var i=["width","height"][t],o=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=n[i]&&"auto"!==n[i])return parseFloat(n[i]);var s=document.defaultView.getComputedStyle(e);return(e[o]||g8(s[i])||g8(e.style[i]))-(g8(s[r])||0)-(g8(s[a])||0)|0}function g9(e){var t,n,i=e.style,o=i.lineDash&&i.lineWidth>0&&(t=i.lineDash,n=i.lineWidth,t&&"solid"!==t&&n>0?"dashed"===t?[4*n,2*n]:"dotted"===t?[n]:rN(t)?[t]:rO(t)?t:null:null),r=i.lineDashOffset;if(o){var a=i.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&1!==a&&(o=rA(o,function(e){return e/a}),r/=a)}return[o,r]}var _e=new dP(!0);function _t(e){var t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0}function _n(e){return"string"==typeof e&&"none"!==e}function _i(e){var t=e.fill;return null!=t&&"none"!==t}function _o(e,t){if(null!=t.fillOpacity&&1!==t.fillOpacity){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function _r(e,t){if(null!=t.strokeOpacity&&1!==t.strokeOpacity){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function _a(e,t,n){var i=cV(t.image,t.__image,n);if(c$(i)){var o=e.createPattern(i,t.repeat||"repeat");if("function"==typeof DOMMatrix&&o&&o.setTransform){var r=new DOMMatrix;r.translateSelf(t.x||0,t.y||0),r.rotateSelf(0,0,(t.rotation||0)*r6),r.scaleSelf(t.scaleX||1,t.scaleY||1),o.setTransform(r)}return o}}var _s=["shadowBlur","shadowOffsetX","shadowOffsetY"],_l=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function _c(e,t,n,i,o){var r=!1;if(!i&&t===(n=n||{}))return!1;if(i||t.opacity!==n.opacity){_m(e,o),r=!0;var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?de.opacity:a}(i||t.blend!==n.blend)&&(r||(_m(e,o),r=!0),e.globalCompositeOperation=t.blend||de.blend);for(var s=0;s<_s.length;s++){var l=_s[s];(i||t[l]!==n[l])&&(r||(_m(e,o),r=!0),e[l]=e.dpr*(t[l]||0))}return(i||t.shadowColor!==n.shadowColor)&&(r||(_m(e,o),r=!0),e.shadowColor=t.shadowColor||de.shadowColor),r}function _d(e,t,n,i,o){var r=_f(t,o.inHover),a=i?null:n&&_f(n,o.inHover)||{};if(r===a)return!1;var s=_c(e,r,a,i,o);if((i||r.fill!==a.fill)&&(s||(_m(e,o),s=!0),_n(r.fill)&&(e.fillStyle=r.fill)),(i||r.stroke!==a.stroke)&&(s||(_m(e,o),s=!0),_n(r.stroke)&&(e.strokeStyle=r.stroke)),(i||r.opacity!==a.opacity)&&(s||(_m(e,o),s=!0),e.globalAlpha=null==r.opacity?1:r.opacity),t.hasStroke()){var l=r.lineWidth/(r.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==l&&(s||(_m(e,o),s=!0),e.lineWidth=l)}for(var c=0;c<_l.length;c++){var d=_l[c],u=d[0];(i||r[u]!==a[u])&&(s||(_m(e,o),s=!0),e[u]=r[u]||d[1])}return s}function _u(e,t){var n=t.transform,i=e.dpr||1;n?e.setTransform(i*n[0],i*n[1],i*n[2],i*n[3],i*n[4],i*n[5]):e.setTransform(i,0,0,i,0,0)}function _m(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function _f(e,t){return t&&e.__hoverStyle||e.style}function _p(e,t){_h(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function _h(e,t,n,i){var o,r=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1)){t.__dirty&=-2,t.__isRendered=!1;return}var a=t.__clipPaths,s=n.prevElClipPaths,l=!1,c=!1;if(!s||function(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(a,s)){if(s&&s.length&&(_m(e,n),e.restore(),c=l=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),a&&a.length){_m(e,n),e.save();for(var d=!1,u=0;u<a.length;u++){var m=a[u];d=d||m.isZeroArea(),_u(e,m),e.beginPath(),m.buildPath(e,m.shape),e.clip()}n.allClipped=d,l=!0}n.prevElClipPaths=a}if(n.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var f=n.prevEl;f||(c=l=!0);var p=t instanceof dJ&&t.autoBatch&&(g=_i(b=t.style),_=_t(b),!(b.lineDash||!(g^_)||g&&"string"!=typeof b.fill||_&&"string"!=typeof b.stroke||b.strokePercent<1||b.strokeOpacity<1||b.fillOpacity<1));!l&&(y=f.transform,r&&y?r[0]===y[0]&&r[1]===y[1]&&r[2]===y[2]&&r[3]===y[3]&&r[4]===y[4]&&r[5]===y[5]:+(!r&&!y))?p||_m(e,n):(_m(e,n),_u(e,t));var h=_f(t,n.inHover);if(t instanceof dJ)1!==n.lastDrawType&&(c=!0,n.lastDrawType=1),_d(e,t,f,c,n),p&&(n.batchFill||n.batchStroke)||e.beginPath(),function(e,t,n,i){var o,r,a,s=_t(n),l=_i(n),c=n.strokePercent,d=c<1,u=!t.path;(!t.silent||d)&&u&&t.createPathProxy();var m=t.path||_e,f=t.__dirty;if(!i){var p=n.fill,h=n.stroke,b=l&&!!p.colorStops,g=s&&!!h.colorStops,_=l&&!!p.image,y=s&&!!h.image,v=void 0,F=void 0,x=void 0,w=void 0,k=void 0;(b||g)&&(k=t.getBoundingRect()),b&&(v=f?g6(e,p,k):t.__canvasFillGradient,t.__canvasFillGradient=v),g&&(F=f?g6(e,h,k):t.__canvasStrokeGradient,t.__canvasStrokeGradient=F),_&&(x=f||!t.__canvasFillPattern?_a(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),y&&(w=f||!t.__canvasStrokePattern?_a(e,h,t):t.__canvasStrokePattern,t.__canvasStrokePattern=w),b?e.fillStyle=v:_&&(x?e.fillStyle=x:l=!1),g?e.strokeStyle=F:y&&(w?e.strokeStyle=w:s=!1)}var E=t.getGlobalScale();m.setScale(E[0],E[1],t.segmentIgnoreThreshold),e.setLineDash&&n.lineDash&&(r=(o=g9(t))[0],a=o[1]);var T=!0;(u||4&f)&&(m.setDPR(e.dpr),d?m.setContext(null):(m.setContext(e),T=!1),m.reset(),t.buildPath(m,t.shape,i),m.toStatic(),t.pathUpdated()),T&&m.rebuildPath(e,d?c:1),r&&(e.setLineDash(r),e.lineDashOffset=a),!i&&(n.strokeFirst?(s&&_r(e,n),l&&_o(e,n)):(l&&_o(e,n),s&&_r(e,n))),r&&e.setLineDash([])}(e,t,h,p),p&&(n.batchFill=h.fill||"",n.batchStroke=h.stroke||"");else if(t instanceof dQ){3!==n.lastDrawType&&(c=!0,n.lastDrawType=3),_d(e,t,f,c,n);var b,g,_,y,v,F=h.text;if(null!=F&&(F+=""),F){e.font=h.font||ro,e.textAlign=h.textAlign,e.textBaseline=h.textBaseline;var x=void 0,w=void 0;e.setLineDash&&h.lineDash&&(x=(v=g9(t))[0],w=v[1]),x&&(e.setLineDash(x),e.lineDashOffset=w),h.strokeFirst?(_t(h)&&e.strokeText(F,h.x,h.y),_i(h)&&e.fillText(F,h.x,h.y)):(_i(h)&&e.fillText(F,h.x,h.y),_t(h)&&e.strokeText(F,h.x,h.y)),x&&e.setLineDash([])}}else t instanceof d5?(2!==n.lastDrawType&&(c=!0,n.lastDrawType=2),o=c,_c(e,_f(t,n.inHover),f&&_f(f,n.inHover),o,n),function(e,t,n){var i=t.__image=cV(n.image,t.__image,t,t.onload);if(i&&c$(i)){var o=n.x||0,r=n.y||0,a=t.getWidth(),s=t.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 c=n.sx||0,d=n.sy||0;e.drawImage(i,c,d,n.sWidth,n.sHeight,o,r,a,s)}else if(n.sx&&n.sy){var c=n.sx,d=n.sy,u=a-c,m=s-d;e.drawImage(i,c,d,u,m,o,r,a,s)}else e.drawImage(i,o,r,a,s)}}(e,t,h)):t.getTemporalDisplayables&&(4!==n.lastDrawType&&(c=!0,n.lastDrawType=4),function(e,t,n){var i,o,r=t.getDisplayables(),a=t.getTemporalDisplayables();e.save();var s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(i=t.getCursor(),o=r.length;i<o;i++){var l=r[i];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),_h(e,l,s,i===o-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),s.prevEl=l}for(var c=0,d=a.length;c<d;c++){var l=a[c];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),_h(e,l,s,c===d-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),s.prevEl=l}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}(e,t,n));p&&i&&_m(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}var _b=new gX,_g=new sP(100),__=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function _y(e,t){if("none"===e)return null;var n=t.getDevicePixelRatio(),i=t.getZr(),o="svg"===i.painter.type;e.dirty&&_b.delete(e);var r=_b.get(e);if(r)return r;var a=rw(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===a.backgroundColor&&(a.backgroundColor=null);var s={repeat:"repeat"};return function(e){for(var t,r,s=[n],l=!0,c=0;c<__.length;++c){var d=a[__[c]];if(null!=d&&!rO(d)&&!rY(d)&&!rN(d)&&"boolean"!=typeof d){l=!1;break}s.push(d)}if(l){t=s.join(",")+(o?"-svg":"");var u=_g.get(t);u&&(o?e.svgElement=u:e.image=u)}var m=function e(t){if(!t||0===t.length)return[[0,0]];if(rN(t)){var n=Math.ceil(t);return[[n,n]]}for(var i=!0,o=0;o<t.length;++o)if(!rN(t[o])){i=!1;break}if(i)return e([t]);for(var r=[],o=0;o<t.length;++o)if(rN(t[o])){var n=Math.ceil(t[o]);r.push([n,n])}else{var n=rA(t[o],function(e){return Math.ceil(e)});n.length%2==1?r.push(n.concat(n)):r.push(n)}return r}(a.dashArrayX),f=function(e){if(!e||"object"==typeof e&&0===e.length)return[0,0];if(rN(e)){var t=Math.ceil(e);return[t,t]}var n=rA(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}(a.dashArrayY),p=function e(t){if(!t||0===t.length)return[["rect"]];if(rY(t))return[[t]];for(var n=!0,i=0;i<t.length;++i)if(!rY(t[i])){n=!1;break}if(n)return e([t]);for(var o=[],i=0;i<t.length;++i)rY(t[i])?o.push([t[i]]):o.push(t[i]);return o}(a.symbol),h=rA(m,function(e){return _v(e)}),b=_v(f),g=!o&&ra.createCanvas(),_=o&&{tag:"g",attrs:{},key:"dcl",children:[]},y=function(){for(var e=1,t=0,n=h.length;t<n;++t)e=cm(e,h[t]);for(var i=1,t=0,n=p.length;t<n;++t)i=cm(i,p[t].length);e*=i;var o=b*h.length*p.length;return{width:Math.max(1,Math.min(e,a.maxTileWidth)),height:Math.max(1,Math.min(o,a.maxTileHeight))}}();g&&(g.width=y.width*n,g.height=y.height*n,r=g.getContext("2d")),function(){r&&(r.clearRect(0,0,g.width,g.height),a.backgroundColor&&(r.fillStyle=a.backgroundColor,r.fillRect(0,0,g.width,g.height)));for(var e=0,t=0;t<f.length;++t)e+=f[t];if(!(e<=0))for(var s=-b,l=0,c=0,d=0;s<y.height;){if(l%2==0){for(var u=c/2%p.length,h=0,v=0,F=0;h<2*y.width;){for(var x=0,t=0;t<m[d].length;++t)x+=m[d][t];if(x<=0)break;if(v%2==0){var w=(1-a.symbolSize)*.5,k=h+m[d][v]*w,E=s+f[l]*w,T=m[d][v]*a.symbolSize,M=f[l]*a.symbolSize,A=F/2%p[u].length;!function(e,t,s,l,c){var d=o?1:n,u=g3(c,e*d,t*d,s*d,l*d,a.color,a.symbolKeepAspect);if(o){var m=i.painter.renderOneToVNode(u);m&&_.children.push(m)}else _p(r,u)}(k,E,T,M,p[u][A])}h+=m[d][v],++F,++v===m[d].length&&(v=0)}++d===m.length&&(d=0)}s+=f[l],++c,++l===f.length&&(l=0)}}(),l&&_g.put(t,g||_),e.image=g,e.svgElement=_,e.svgWidth=y.width,e.svgHeight=y.height}(s),s.rotation=a.rotation,s.scaleX=s.scaleY=o?1:1/n,_b.set(e,s),e.dirty=!1,s}function _v(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?2*t:t}var _F=new ac,_x={},_w="__flagInMainProcess",_k="__mainProcessVersion",_E="__pendingUpdate",_T="__needsUpdateStatus",_M=/^[a-zA-Z0-9_]+$/,_A="__connectUpdateStatus";function _C(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this.isDisposed()?void this.id:_S(this,e,t)}}function _D(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return _S(this,e,t)}}function _S(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),ac.prototype[t].apply(e,n)}var _L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return rt(t,e),t}(ac),_I=_L.prototype;_I.on=_D("on"),_I.off=_D("off");var _O=function(e){function t(t,n,i){var o=e.call(this,new gj)||this;o._chartsViews=[],o._chartsMap={},o._componentsViews=[],o._componentsMap={},o._pendingActions=[],i=i||{},o._dom=t,o[_k]=1,i.ssr;var r=o._zr=l5(t,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:rV(i.useDirtyRect,!1),useCoarsePointer:rV(i.useCoarsePointer,"auto"),pointerSize:i.pointerSize});o._ssr=i.ssr,o._throttledZrFlush=gp(rL(r.flush,r),17),o._updateTheme(n),o._locale=function(e){if(!rY(e))return rF(rv(e),rv(my.EN),!1);var t=my[e.toUpperCase()]||{};return"ZH"===e||"EN"===e?rv(t):rF(rv(t),rv(my.EN),!1)}(i.locale||mF),o._coordSysMgr=new m5;var a=o._api=eG(o);function s(e,t){return e.__prio-t.__prio}return sl(_j,s),sl(_H,s),o._scheduler=new gk(o,a,_H,_j),o._messageCenter=new _L,o._initEvents(),o.resize=rL(o.resize,o),r.animation.on("frame",o._onframe,o),ez(r,o),ej(r,o),o[rJ]=!0,o}return rt(t,e),t.prototype._onframe=function(){if(!this._disposed){eX(this);var e=this._scheduler;if(this[_E]){var t=this[_E].silent;this[_w]=!0,eK(this);try{eL(this),eR.update.call(this,null,this[_E].updateParams)}catch(e){throw this[_w]=!1,this[_E]=null,e}this._zr.flush(),this[_w]=!1,this[_E]=null,eB.call(this,t),eH.call(this,t)}else if(e.unfinished){var n=1,i=this._model,o=this._api;e.unfinished=!1;do{var r=+new Date;e.performSeriesTasks(i),e.performDataProcessorTasks(i),eP(this,i),e.performVisualTasks(i),eV(this,this._model,o,"remain",{}),n-=new Date-r}while(n>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[_w]){if(this._disposed)return void this.id;if(rB(t)&&(n=t.lazyUpdate,i=t.silent,o=t.replaceMerge,r=t.transition,t=t.notMerge),this[_w]=!0,eK(this),!this._model||t){var i,o,r,a=new fz(this._api),s=this._theme,l=this._model=new fO;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(e,{replaceMerge:o},_z);var c={seriesTransition:r,optionChanged:!0};if(n)this[_E]={silent:i,updateParams:c},this[_w]=!1,this.getZr().wakeUp();else{try{eL(this),eR.update.call(this,null,c)}catch(e){throw this[_E]=null,this[_w]=!1,e}this._ssr||this._zr.flush(),this[_E]=null,this[_w]=!1,eB.call(this,i),eH.call(this,i)}}},t.prototype.setTheme=function(e,t){if(!this[_w]){if(this._disposed)return void this.id;var n=this._model;if(n){var i=t&&t.silent,o=null;this[_E]&&(null==i&&(i=this[_E].silent),o=this[_E].updateParams,this[_E]=null),this[_w]=!0,eK(this);try{this._updateTheme(e),n.setTheme(this._theme),eL(this),eR.update.call(this,{type:"setTheme"},o)}catch(e){throw this[_w]=!1,e}this[_w]=!1,eB.call(this,i),eH.call(this,i)}}},t.prototype._updateTheme=function(e){rY(e)&&(e=_U[e]),e&&((e=rv(e))&&f3(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||ri.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e=e||{},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e=e||{},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return rM(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed)return void this.id;var t=(e=e||{}).excludeComponents,n=this._model,i=[],o=this;rM(t,function(e){n.eachComponent({mainType:e},function(e){var t=o._componentsMap[e.__viewId];t.group.ignore||(i.push(t),t.group.ignore=!0)})});var r="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return rM(i,function(e){e.group.ignore=!1}),r},t.prototype.getConnectedDataURL=function(e){if(this._disposed)return void this.id;var t="svg"===e.type,n=this.group,i=Math.min,o=Math.max,r=1/0;if(!_G[n])return this.getDataURL(e);var a=r,s=r,l=-r,c=-r,d=[],u=e&&e.pixelRatio||this.getDevicePixelRatio();rM(_V,function(r,u){if(r.group===n){var m=t?r.getZr().painter.getSvgDom().innerHTML:r.renderToCanvas(rv(e)),f=r.getDom().getBoundingClientRect();a=i(f.left,a),s=i(f.top,s),l=o(f.right,l),c=o(f.bottom,c),d.push({dom:m,left:f.left,top:f.top})}}),a*=u,s*=u,l*=u,c*=u;var m=l-a,f=c-s,p=ra.createCanvas(),h=l5(p,{renderer:t?"svg":"canvas"});if(h.resize({width:m,height:f}),!t)return e.connectedBackgroundColor&&h.add(new ut({shape:{x:0,y:0,width:m,height:f},style:{fill:e.connectedBackgroundColor}})),rM(d,function(e){var t=new d5({style:{x:e.left*u-a,y:e.top*u-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),p.toDataURL("image/"+(e&&e.type||"png"));var b="";return rM(d,function(e){var t=e.left-a,n=e.top-s;b+='<g transform="translate('+t+","+n+')">'+e.dom+"</g>"}),h.painter.getSvgRoot().innerHTML=b,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()},t.prototype.convertToPixel=function(e,t,n){return eY(this,"convertToPixel",e,t,n)},t.prototype.convertToLayout=function(e,t,n){return eY(this,"convertToLayout",e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return eY(this,"convertFromPixel",e,t,n)},t.prototype.containPixel=function(e,t){var n;return this._disposed?void this.id:(rM(cT(this._model,e),function(e,i){i.indexOf("Models")>=0&&rM(e,function(e){var o=e.coordinateSystem;if(o&&o.containPoint)n=n||!!o.containPoint(t);else if("seriesModels"===i){var r=this._chartsMap[e.__viewId];r&&r.containPoint&&(n=n||r.containPoint(t,e))}},this)},this),!!n)},t.prototype.getVisual=function(e,t){var n=cT(this._model,e,{defaultMainType:"series"}),i=n.seriesModel.getData(),o=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?i.indexOfRawIndex(n.dataIndex):null;return null!=o?function(e,t,n){switch(n){case"color":return e.getItemVisual(t,"style")[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,n)}}(i,o,t):function(e,t){switch(t){case"color":return e.getVisual("style")[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t)}}(i,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e,t,n=this;rM(_Y,function(e){var t=function(t){var i,o=n.getModel(),r=t.target;if("globalout"===e?i={}:r&&gG(r,function(e){var t=ug(e);if(t&&null!=t.dataIndex){var n=t.dataModel||o.getSeriesByIndex(t.seriesIndex);return i=n&&n.getDataParams(t.dataIndex,t.dataType,r)||{},!0}if(t.eventData)return i=rx({},t.eventData),!0},!0),i){var a=i.componentType,s=i.componentIndex;("markLine"===a||"markPoint"===a||"markArea"===a)&&(a="series",s=i.seriesIndex);var l=a&&null!=s&&o.getComponent(a,s),c=l&&n["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];i.event=t,i.type=e,n._$eventProcessor.eventInfo={targetEl:r,packedEvent:i,model:l,view:c},n.trigger(e,i)}};t.zrEventfulCallAtLast=!0,n._zr.on(e,t,n)});var i=this._messageCenter;rM(_B,function(e,t){i.on(t,function(e){n.trigger(t,e)})}),e=this,t=this._api,i.on("selectchanged",function(n){var i=t.getModel();n.isFromClick?(gV("map","selectchanged",e,i,n),gV("pie","selectchanged",e,i,n)):"select"===n.fromAction?(gV("map","selected",e,i,n),gV("pie","selected",e,i,n)):"unselect"===n.fromAction&&(gV("map","unselected",e,i,n),gV("pie","unselected",e,i,n))})},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed)return void this.id;this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)return void this.id;this._disposed=!0,this.getDom()&&cS(this.getDom(),_q,"");var e=this._api,t=this._model;rM(this._componentsViews,function(n){n.dispose(t,e)}),rM(this._chartsViews,function(n){n.dispose(t,e)}),this._zr.dispose(),this._dom=this._model=this._chartsMap=this._componentsMap=this._chartsViews=this._componentsViews=this._scheduler=this._api=this._zr=this._throttledZrFlush=this._theme=this._coordSysMgr=this._messageCenter=null,delete _V[this.id]},t.prototype.resize=function(e){if(!this[_w]){if(this._disposed)return void this.id;this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),i=e&&e.silent;this[_E]&&(null==i&&(i=this[_E].silent),n=!0,this[_E]=null),this[_w]=!0,eK(this);try{n&&eL(this),eR.update.call(this,{type:"resize",animation:rx({duration:0},e&&e.animation)})}catch(e){throw this[_w]=!1,e}this[_w]=!1,eB.call(this,i),eH.call(this,i)}}},t.prototype.showLoading=function(e,t){if(this._disposed)return void this.id;if(rB(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),_W[e]){var n=_W[e](this._api,t),i=this._zr;this._loadingFX=n,i.add(n)}},t.prototype.hideLoading=function(){if(this._disposed)return void this.id;this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=rx({},e);return t.type=_N[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)return void this.id;if((rB(t)||(t={silent:!!t}),_P[e.type])&&this._model){if(this[_w])return void this._pendingActions.push(e);var n=t.silent;eN.call(this,e,n);var i=t.flush;i?this._zr.flush():!1!==i&&ri.browser.weChat&&this._throttledZrFlush(),eB.call(this,n),eH.call(this,n)}},t.prototype.updateLabelLayout=function(){_F.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)return void this.id;var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){function e(e){e.clearColorPalette(),e.eachSeries(function(e){e.clearColorPalette()})}function t(e){for(var t=[],n=e.currentStates,i=0;i<n.length;i++){var o=n[i];"emphasis"!==o&&"blur"!==o&&"select"!==o&&t.push(o)}e.selected&&e.states.select&&t.push("select"),2===e.hoverState&&e.states.emphasis?t.push("emphasis"):1===e.hoverState&&e.states.blur&&t.push("blur"),e.useStates(t)}function n(e,t){if(!e.preventAutoZ){var n=ge(e);t.eachRendered(function(e){return gn(e,n.z,n.zlevel),!0})}}function i(e,t){t.eachRendered(function(e){if(!bE(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&(e.stateTransition=null),t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&(e.prevStates=null)}})}function o(e,n){var i=e.getModel("stateAnimation"),o=e.isAnimationEnabled(),r=i.get("duration"),a=r>0?{duration:r,delay:i.get("delay"),easing:i.get("easing")}:null;n.eachRendered(function(e){if(e.states&&e.states.emphasis&&!bE(e)){if(e instanceof dJ&&((n=uF(e)).normalFill=e.style.fill,n.normalStroke=e.style.stroke,n.selectFill=(i=e.states.select||{}).style&&i.style.fill||null,n.selectStroke=i.style&&i.style.stroke||null),e.__dirty){var n,i,r=e.prevStates;r&&e.useStates(r)}if(o){e.stateTransition=a;var s=e.getTextContent(),l=e.getTextGuideLine();s&&(s.stateTransition=a),l&&(l.stateTransition=a)}e.__dirty&&t(e)}})}eL=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),eI(e,!0),eI(e,!1),t.plan()},eI=function(e,t){for(var n=e._model,i=e._scheduler,o=t?e._componentsViews:e._chartsViews,r=t?e._componentsMap:e._chartsMap,a=e._zr,s=e._api,l=0;l<o.length;l++)o[l].__alive=!1;function c(e){var l=e.__requireNewView;e.__requireNewView=!1;var c="_ec_"+e.id+"_"+e.type,d=!l&&r[c];if(!d){var u=cO(e.type);(d=new(t?ha.getClass(u.main,u.sub):gr.getClass(u.sub))).init(n,s),r[c]=d,o.push(d),a.add(d.group)}e.__viewId=d.__id=c,d.__alive=!0,d.__model=e,d.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},t||i.prepareView(d,e,n,s)}t?n.eachComponent(function(e,t){"series"!==e&&c(t)}):n.eachSeries(c);for(var l=0;l<o.length;){var d=o[l];d.__alive?l++:(t||d.renderTask.dispose(),a.remove(d.group),d.dispose(n,s),o.splice(l,1),r[d.__id]===d&&delete r[d.__id],d.__id=d.group.__ecComponentInfo=null)}},eO=function(e,t,n,i,o){var r,a=e._model;if(a.setUpdatePayload(n),!i)return void rM([].concat(e._componentsViews).concat(e._chartsViews),d);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};o&&(l.subType=o);var c=n.excludeSeriesId;function d(i){i&&i.__alive&&i[t]&&i[t](i.__model,a,e._api,n)}null!=c&&(r=r1(),rM(cp(c),function(e){var t=cv(e,null);null!=t&&r.set(t,!0)})),a&&a.eachComponent(l,function(t){if(!(r&&null!=r.get(t.id))){if(u3(n))if(t instanceof p7)n.type!==uE||n.notBlur||t.get(["emphasis","disabled"])||function(e,t,n){var i=e.seriesIndex,o=e.getData(t.dataType);if(o){var r=cw(o,t);r=(rO(r)?r[0]:r)||0;var a=o.getItemGraphicEl(r);if(!a)for(var s=o.count(),l=0;!a&&l<s;)a=o.getItemGraphicEl(l++);if(a){var c=ug(a);uq(i,c.focus,c.blurScope,n)}else{var d=e.get(["emphasis","focus"]),u=e.get(["emphasis","blurScope"]);null!=d&&uq(i,d,u,n)}}}(t,n,e._api);else{var i=uK(t.mainType,t.componentIndex,n.name,e._api),o=i.focusSelf,a=i.dispatchers;n.type===uE&&o&&!n.notBlur&&uX(t.mainType,t.componentIndex,e._api),a&&rM(a,function(e){n.type===uE?uW(e):uV(e)})}else if(u5(n)&&t instanceof p7){if(e._api,u5(n)){var s=n.dataType,l=cw(t.getData(s),n);rO(l)||(l=[l]),t[n.type===uC?"toggleSelect":n.type===uM?"select":"unselect"](l,s)}uJ(t),eq(e)}}},e),a&&a.eachComponent(l,function(t){r&&null!=r.get(t.id)||d(e["series"===i?"_chartsMap":"_componentsMap"][t.__viewId])},e)},eR={prepareAndUpdate:function(e){eL(this),eR.update.call(this,e,e&&{optionChanged:null!=e.newOption})},update:function(t,n){var i=this._model,o=this._api,r=this._zr,a=this._coordSysMgr,s=this._scheduler;if(i){i.setUpdatePayload(t),s.restoreData(i,t),s.performSeriesTasks(i),a.create(i,o),s.performDataProcessorTasks(i,t),eP(this,i),a.update(i,o),e(i),s.performVisualTasks(i,t);var l=i.get("backgroundColor")||"transparent";r.setBackgroundColor(l);var c=i.get("darkMode");null!=c&&"auto"!==c&&r.setDarkMode(c),eU(this,i,o,t,n),_F.trigger("afterupdate",i,o)}},updateTransform:function(t){var n=this,i=this._model,o=this._api;if(i){i.setUpdatePayload(t);var r=[];i.eachComponent(function(e,a){if("series"!==e){var s=n.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,i,o,t);l&&l.update&&r.push(s)}else r.push(s)}});var a=r1();i.eachSeries(function(e){var r=n._chartsMap[e.__viewId];if(r.updateTransform){var s=r.updateTransform(e,i,o,t);s&&s.update&&a.set(e.uid,1)}else a.set(e.uid,1)}),e(i),this._scheduler.performVisualTasks(i,t,{setDirty:!0,dirtyMap:a}),eV(this,i,o,t,{},a),_F.trigger("afterupdate",i,o)}},updateView:function(t){var n=this._model;n&&(n.setUpdatePayload(t),gr.markUpdateMethod(t,"updateView"),e(n),this._scheduler.performVisualTasks(n,t,{setDirty:!0}),eU(this,n,this._api,t,{}),_F.trigger("afterupdate",n,this._api))},updateVisual:function(t){var n=this,i=this._model;i&&(i.setUpdatePayload(t),i.eachSeries(function(e){e.getData().clearAllVisual()}),gr.markUpdateMethod(t,"updateVisual"),e(i),this._scheduler.performVisualTasks(i,t,{visualType:"visual",setDirty:!0}),i.eachComponent(function(e,o){if("series"!==e){var r=n.getViewOfComponentModel(o);r&&r.__alive&&r.updateVisual(o,i,n._api,t)}}),i.eachSeries(function(e){n._chartsMap[e.__viewId].updateVisual(e,i,n._api,t)}),_F.trigger("afterupdate",i,this._api))},updateLayout:function(e){eR.update.call(this,e)}},eY=function(e,t,n,i,o){if(e._disposed)return void e.id;for(var r,a=e._model,s=e._coordSysMgr.getCoordinateSystems(),l=cT(a,n),c=0;c<s.length;c++){var d=s[c];if(d[t]&&null!=(r=d[t](a,l,i,o)))return r}},eP=function(e,t){var n=e._chartsMap,i=e._scheduler;t.eachSeries(function(e){i.updateStreamModes(e,n[e.__viewId])})},eN=function(e,t){var n,i=this,o=this.getModel(),r=e.type,a=e.escapeConnect,s=_P[r],l=(s.update||"update").split(":"),c=l.pop(),d=null!=l[0]&&cO(l[0]);this[_w]=!0,eK(this);var u=[e],m=!1;e.batch&&(m=!0,u=rA(e.batch,function(t){return(t=rw(rx({},t),e)).batch=null,t}));var f=[],p=[],h=s.nonRefinedEventType,b=u5(e),g=u3(e);if(g&&u$(this._api),rM(u,function(t){var r=s.action(t,o,i._api);if(s.refineEvent?p.push(r):n=r,(n=n||rx({},t)).type=h,f.push(n),g){var a=cM(e),l=a.queryOptionMap;eO(i,c,t,a.mainTypeSpecified?l.keys()[0]:"series"),eq(i)}else b?(eO(i,c,t,"series"),eq(i)):d&&eO(i,c,t,d.main,d.sub)}),"none"!==c&&!g&&!b&&!d)try{this[_E]?(eL(this),eR.update.call(this,e),this[_E]=null):eR[c].call(this,e)}catch(e){throw this[_w]=!1,e}if(n=m?{type:h,escapeConnect:a,batch:f}:f[0],this[_w]=!1,!t){var _=void 0;if(s.refineEvent){var y=s.refineEvent(p,e,o,this._api).eventContent;rX(rB(y)),(_=rw({type:s.refinedEventType},y)).fromAction=e.type,_.fromActionPayload=e,_.escapeConnect=!0}var v=this._messageCenter;v.trigger(n.type,n),_&&v.trigger(_.type,_)}},eB=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();eN.call(this,n,e)}},eH=function(e){e||this.trigger("updated")},ez=function(e,t){e.on("rendered",function(n){t.trigger("rendered",n),!e.animation.isFinished()||t[_E]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")})},ej=function(e,t){e.on("mouseover",function(e){var n,i,o,r,a,s=gG(e.target,u2);s&&(n=t._api,r=(o=uK((i=ug(s)).componentMainType,i.componentIndex,i.componentHighDownName,n)).dispatchers,a=o.focusSelf,r?(a&&uX(i.componentMainType,i.componentIndex,n),rM(r,function(t){return uj(t,e)})):(uq(i.seriesIndex,i.focus,i.blurScope,n),"self"===i.focus&&uX(i.componentMainType,i.componentIndex,n),uj(s,e)),eq(t))}).on("mouseout",function(e){var n,i,o,r=gG(e.target,u2);r&&(u$(n=t._api),(o=uK((i=ug(r)).componentMainType,i.componentIndex,i.componentHighDownName,n).dispatchers)?rM(o,function(t){return uU(t,e)}):uU(r,e),eq(t))}).on("click",function(e){var n=gG(e.target,function(e){return null!=ug(e).dataIndex},!0);if(n){var i=n.selected?"unselect":"select",o=ug(n);t._api.dispatchAction({type:i,dataType:o.dataType,dataIndexInside:o.dataIndex,seriesIndex:o.seriesIndex,isFromClick:!0})}})},eU=function(e,t,n,i,o){!function(e){var t=[],n=[],i=!1;if(e.eachComponent(function(e,o){var r=o.get("zlevel")||0,a=o.get("z")||0,s=o.getZLevelKey();i=i||!!s,("series"===e?n:t).push({zlevel:r,z:a,idx:o.componentIndex,type:e,key:s})}),i){var o,r,a=t.concat(n);sl(a,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),rM(a,function(t){var n=e.getComponent(t.type,t.idx),i=t.zlevel,a=t.key;null!=o&&(i=Math.max(o,i)),a?(i===o&&a!==r&&i++,r=a):r&&(i===o&&i++,r=""),o=i,n.setZLevel(i)})}}(t),eW(e,t,n,i,o),rM(e._chartsViews,function(e){e.__alive=!1}),eV(e,t,n,i,o),rM(e._chartsViews,function(e){e.__alive||e.remove(t,n)})},eW=function(e,t,r,a,s,l){rM(l||e._componentsViews,function(e){var s=e.__model;i(s,e),e.render(s,t,r,a),n(s,e),o(s,e)})},eV=function(e,t,r,a,s,l){var c,d,u,m,f=e._scheduler;s=rx(s||{},{updatedSeries:t.getSeries()}),_F.trigger("series:beforeupdate",t,r,s);var p=!1;t.eachSeries(function(t){var n,o,r,s=e._chartsMap[t.__viewId];s.__alive=!0;var c=s.renderTask;f.updatePayload(c,a),i(t,s),l&&l.get(t.uid)&&c.dirty(),c.perform(f.getPerformArgs(c))&&(p=!0),s.group.silent=!!t.get("silent"),n=t,o=s,r=n.get("blendMode")||null,o.eachRendered(function(e){e.isGroup||(e.style.blend=r)}),uJ(t)}),f.unfinished=p||f.unfinished,_F.trigger("series:layoutlabels",t,r,s),_F.trigger("series:transition",t,r,s),t.eachSeries(function(t){var i=e._chartsMap[t.__viewId];n(t,i),o(t,i)}),c=e,d=t,u=c._zr.storage,m=0,u.traverse(function(e){!e.isGroup&&m++}),!(m>d.get("hoverLayerThreshold"))||ri.node||ri.worker||d.eachSeries(function(e){if(!e.preventUsingHoverLayer){var t=c._chartsMap[e.__viewId];t.__alive&&t.eachRendered(function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)})}}),_F.trigger("series:afterupdate",t,r,s)},eq=function(e){e[_T]=!0,e.getZr().wakeUp()},eK=function(e){e[_k]=(e[_k]+1)%1e3},eX=function(e){e[_T]&&(e.getZr().storage.traverse(function(e){bE(e)||t(e)}),e[_T]=!1)},eG=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return rt(n,t),n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(null!=n)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){uW(t,n),eq(e)},n.prototype.leaveEmphasis=function(t,n){uV(t,n),eq(e)},n.prototype.enterBlur=function(t){uB(t,uR),eq(e)},n.prototype.leaveBlur=function(t){uB(t,uY),eq(e)},n.prototype.enterSelect=function(t){uB(t,uP),eq(e)},n.prototype.leaveSelect=function(t){uB(t,uN),eq(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getMainProcessVersion=function(){return e[_k]},n}(fB))(e)},e$=function(e){function t(e,t){for(var n=0;n<e.length;n++)e[n][_A]=t}rM(_N,function(n,i){e._messageCenter.on(i,function(n){if(_G[e.group]&&0!==e[_A]&&(!n||!n.escapeConnect)){var i=e.makeActionFromEvent(n),o=[];rM(_V,function(t){t!==e&&t.group===e.group&&o.push(t)}),t(o,0),rM(o,function(e){1!==e[_A]&&e.dispatchAction(i)}),t(o,2)}})})}}(),t}(ac),_R=_O.prototype;_R.on=_C("on"),_R.off=_C("off"),_R.one=function(e,t,n){var i=this;this.on.call(this,e,function n(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];t&&t.apply&&t.apply(this,o),i.off(e,n)},n)};var _Y=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"],_P={},_N={},_B={},_H=[],_z=[],_j=[],_U={},_W={},_V={},_G={},_$=new Date-0,_q="_echarts_instance_";function _X(e){0>rk(_z,e)&&_z.push(e)}function _K(e,t){_1(_H,e,t,2e3)}function _J(e,t){_F.on(e,t)}function _Z(e,t,n){function i(e){return e.toLowerCase()}rR(t)&&(n=t,t=""),rB(e)?(o=e.type,l=e.event,a=e.update,s=e.publishNonRefinedEvent,n||(n=e.action),r=e.refineEvent):(o=e,l=t);var o,r,a,s,l=i(l||o),c=r?i(o):l;_P[o]||(rX(_M.test(o)&&_M.test(l)),r&&rX(l!==o),_P[o]={actionType:o,refinedEventType:l,nonRefinedEventType:c,update:a,action:n,refineEvent:r},_B[l]=1,r&&s&&(_B[c]=1),_N[c]=o)}function _Q(e,t){_1(_j,e,t,3e3,"visual")}var _0=[];function _1(e,t,n,i,o){if((rR(t)||rB(t))&&(n=t,t=i),!(rk(_0,n)>=0)){_0.push(n);var r=gk.wrapStageHandler(n,o);r.__prio=t,r.__raw=n,e.push(r)}}function _2(e,t,n,i){var o;return{eventContent:{selected:(o=[],n.eachSeries(function(e){rM(e.getAllData(),function(t){t.data;var n=t.type,i=e.getSelectedDataIndices();if(i.length>0){var r={dataIndex:i,seriesIndex:e.seriesIndex};null!=n&&(r.dataType=n),o.push(r)}})}),o),isFromClick:t.isFromClick||!1}}}_Q(2e3,{createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),i=e.visualStyleAccessPath||"itemStyle",o=e.getModel(i),r=gv(e,i)(o),a=o.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=gF(e,i),l=r[s],c=rR(l)?l:null,d="auto"===r.fill||"auto"===r.stroke;if(!r[s]||c||d){var u=e.getColorFromPalette(e.name,null,t.getSeriesCount());r[s]||(r[s]=u,n.setVisual("colorFromPalette",!0)),r.fill="auto"===r.fill||rR(r.fill)?u:r.fill,r.stroke="auto"===r.stroke||rR(r.stroke)?u:r.stroke}if(n.setVisual("style",r),n.setVisual("drawType",s),!t.isSeriesFiltered(e)&&c)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var i=e.getDataParams(n),o=rx({},r);o[s]=c(i),t.setItemVisual(n,"style",o)}}}}),_Q(4500,{createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var n=e.getData(),i=e.visualStyleAccessPath||"itemStyle",o=gv(e,i),r=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[i]){gx.option=n[i];var a=o(gx);rx(e.ensureUniqueItemVisual(t,"style"),a),gx.option.decal&&(e.setItemVisual(t,"decal",gx.option.decal),gx.option.decal.dirty=!0),r in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}}),_Q(4500,{performRawSeries:!0,overallReset:function(e){var t=r1();e.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var i=e.type+"-"+n,o=t.get(i);o||(o={},t.set(i,o)),gg(e).scope=o}}),e.eachSeries(function(t){if(!(t.isColorBySeries()||e.isSeriesFiltered(t))){var n=t.getRawData(),i={},o=t.getData(),r=gg(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=gF(t,a);o.each(function(e){i[o.getRawIndex(e)]=e}),n.each(function(e){var a=i[e];if(o.getItemVisual(a,"colorFromPalette")){var l=o.ensureUniqueItemVisual(a,"style"),c=n.getName(e)||e+"",d=n.count();l[s]=t.getColorFromPalette(c,r,d)}})}})}}),_Q(2e3,{createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var i={},o={},r=!1,a=0;a<gU.length;a++){var s=gU[a],l=e.get(s);rR(l)?(r=!0,o[s]=l):i[s]=l}if(i.symbol=i.symbol||e.defaultSymbol,n.setVisual(rx({legendIcon:e.legendIcon||i.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},i)),!t.isSeriesFiltered(e)){var c=rS(o);return{dataEach:r?function(t,n){for(var i=e.getRawValue(n),r=e.getDataParams(n),a=0;a<c.length;a++){var s=c[a];t.setItemVisual(n,s,o[s](i,r))}}:null}}}}}),_Q(4500,{createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(e.hasSymbolVisual&&!t.isSeriesFiltered(e))return{dataEach:e.getData().hasItemOption?function(e,t){for(var n=e.getItemModel(t),i=0;i<gW.length;i++){var o=gW[i],r=n.getShallow(o,!0);null!=r&&e.setItemVisual(t,o,r)}}:null}}}),_Q(7e3,function(e,t){e.eachRawSeries(function(n){if(!e.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each(function(e){var n=i.getItemVisual(e,"decal");n&&(i.ensureUniqueItemVisual(e,"style").decal=_y(n,t))});var o=i.getVisual("decal");o&&(i.getVisual("style").decal=_y(o,t))}})}),_X(f3),_K(900,function(e){var t=r1();e.eachSeries(function(e){var n=e.get("stack");if(n){var i=t.get(n)||t.set(n,[]),o=e.getData(),r={stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:e};if(!r.stackedDimension||!(r.isStackedByIndex||r.stackedByDimension))return;i.push(r)}}),t.each(function(e){var t;0!==e.length&&("seriesDesc"===(e[0].seriesModel.get("stackOrder")||"seriesAsc")&&e.reverse(),rM(e,function(t,n){t.data.setCalculationInfo("stackedOnSeries",n>0?e[n-1].seriesModel:null)}),rM(t=e,function(e,n){var i=[],o=[NaN,NaN],r=[e.stackResultDimension,e.stackedOverDimension],a=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";a.modify(r,function(r,c,d){var u,m,f=a.get(e.stackedDimension,d);if(isNaN(f))return o;s?m=a.getRawIndex(d):u=a.get(e.stackedByDimension,d);for(var p=NaN,h=n-1;h>=0;h--){var b=t[h];if(s||(m=b.data.rawIndexOf(b.stackedByDimension,u)),m>=0){var g=b.data.getByRawIndex(b.stackResultDimension,m);if("all"===l||"positive"===l&&g>0||"negative"===l&&g<0||"samesign"===l&&f>=0&&g>0||"samesign"===l&&f<=0&&g<0){f=function(e,t){var n=Math.max(cn(e),cn(t)),i=e+t;return n>20?i:ce(i,n)}(f,g),p=g;break}}}return i[0]=f,i[1]=p,i})}))})}),_W.default=function(e,t){rw(t=t||{},{text:"loading",textColor:fl.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:fl.color.theme["0"],spinnerRadius:10,lineWidth:5,zlevel:0});var n,i=new lQ,o=new ut({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});i.add(o);var r=new ub({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new ut({style:{fill:"none"},textContent:r,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return i.add(a),t.showSpinner&&((n=new bo({shape:{startAngle:-gw/2,endAngle:-gw/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*gw/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*gw/2}).delay(300).start("circularInOut"),i.add(n)),i.resize=function(){var i=r.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&i?10:0)-i)/2-(t.showSpinner&&i?0:5+i/2)+(t.showSpinner?0:i/2)+(i?0:s),c=e.getHeight()/2;t.showSpinner&&n.setShape({cx:l,cy:c}),a.setShape({x:l-s,y:c-s,width:2*s,height:2*s}),o.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},i.resize(),i},_Z({type:uE,event:uE,update:uE},r4),_Z({type:uT,event:uT,update:uT},r4),_Z({type:uM,event:uD,update:uM,action:r4,refineEvent:_2,publishNonRefinedEvent:!0}),_Z({type:uA,event:uD,update:uA,action:r4,refineEvent:_2,publishNonRefinedEvent:!0}),_Z({type:uC,event:uD,update:uC,action:r4,refineEvent:_2,publishNonRefinedEvent:!0}),_U.default={},_U.dark=gz;var _5={},_3=[],_4={registerPreprocessor:_X,registerProcessor:_K,registerPostInit:function(e){_J("afterinit",e)},registerPostUpdate:function(e){_J("afterupdate",e)},registerUpdateLifecycle:_J,registerAction:_Z,registerCoordinateSystem:function(e,t){m5.register(e,t)},registerLayout:function(e,t){_1(_j,e,t,1e3,"layout")},registerVisual:_Q,registerTransform:function(e){var t=(e=rv(e)).type;t||pa("");var n=t.split(":");2!==n.length&&pa("");var i=!1;"echarts"===n[0]&&(t=n[1],i=!0),e.__isBuiltIn=i,pS.set(t,e)},registerLoading:function(e,t){_W[e]=t},registerMap:function(e,t,n){var i=_x.registerMap;i&&i(e,t,n)},registerImpl:function(e,t){_x[e]=t},PRIORITY:{PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:4500,ARIA:6e3,DECAL:7e3}},ComponentModel:fs,ComponentView:ha,SeriesModel:p7,ChartView:gr,registerComponentModel:function(e){fs.registerClass(e)},registerComponentView:function(e){ha.registerClass(e)},registerSeriesModel:function(e){p7.registerClass(e)},registerChartView:function(e){gr.registerClass(e)},registerCustomSeries:function(e,t){_5[e]=t},registerSubTypeDefaulter:function(e,t){fs.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){l0[e]=t}};function _6(e){if(rO(e))return void rM(e,function(e){_6(e)});rk(_3,e)>=0||(_3.push(e),rR(e)&&(e={install:e}),e.install(_4))}var _8={left:0,right:0,top:0,bottom:0},_7=["25%","25%"],_9=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return rt(t,e),t.prototype.mergeDefaultAndTheme=function(t,n){var i=fr(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&t.outerBounds&&fo(t.outerBounds,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&fo(this.option.outerBounds,t.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:_8,outerBoundsContain:"all",outerBoundsClampWidth:"25%",outerBoundsClampHeight:"25%",backgroundColor:fl.color.transparent,borderWidth:1,borderColor:fl.color.neutral30},t}(fs),ye=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),yt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return rt(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",cA).models[0]},t.type="cartesian2dAxis",t}(fs);rE(yt,ye);var yn={show:!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:fl.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},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,color:fl.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:fl.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[fl.color.backgroundTint,fl.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:fl.color.neutral00,borderColor:fl.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},yi=rF({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},yn),yo=rF({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:fl.color.axisMinorSplitLine,width:1}}},yn),yr=rF({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},yo),ya=rw({logBase:10},yo);let ys={category:yi,value:yo,time:yr,log:ya};var yl=0,yc=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++yl,this._onCollect=e.onCollect}return e.createByAxisModel=function(t){var n=t.option,i=n.data,o=i&&rA(i,yd);return new e({categories:o,needCollect:!o,deduplication:!1!==n.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!rY(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var i=this._getOrCreateMap();return null==(t=i.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,i.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=r1(this.categories))},e}();function yd(e){return rB(e)&&null!=e.value?e.value:e+""}var yu={value:1,category:1,time:1,log:1};function ym(e,t,n,i){rM(yu,function(o,r){var a=rF(rF({},ys[r],!0),i,!0),s=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t+"Axis."+r,n}return rt(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=fi(this),i=n?fr(e):{};rF(e,t.getTheme().get(r+"Axis")),rF(e,this.getDefaultOption()),e.type=yf(e),n&&fo(e,i,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=yc.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){return{breaks:[]}},n.type=t+"Axis."+r,n.defaultOption=a,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",yf)}function yf(e){return e.type||(e.data?"category":"value")}function yp(e){return"interval"===e.type||"log"===e.type}function yh(e){var t=Math.pow(10,cl(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,ce(n*t)}function yb(e){return cn(e)+2}function yg(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function y_(e,t){return e>=t[0]&&e<=t[1]}var yy=function(){function e(){this.normalize=yv,this.scale=yF}return e.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=rL(e.normalize,e),this.scale=rL(e.scale,e)):(this.normalize=yv,this.scale=yF)},e}();function yv(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function yF(e,t){return e*(t[1]-t[0])+t[0]}function yx(e,t,n){var i=Math.log(e);return[Math.log(n?t[0]:Math.max(0,t[0]))/i,Math.log(n?t[1]:Math.max(0,t[1]))/i]}var yw=function(){function e(e){this._calculator=new yy,this._setting=e||{},this._extent=[1/0,-1/0];var t=mw();t&&(this._brkCtx=t.createScaleBreakContext(),this._brkCtx.update(this._extent))}return e.prototype.getSetting=function(e){return this._setting[e]},e.prototype._innerUnionExtent=function(e){var t=this._extent;this._innerSetExtent(e[0]<t[0]?e[0]:t[0],e[1]>t[1]?e[1]:t[1])},e.prototype.unionExtentFromData=function(e,t){this._innerUnionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){this._innerSetExtent(e,t)},e.prototype._innerSetExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t),this._brkCtx&&this._brkCtx.update(n)},e.prototype.setBreaksFromOption=function(e){var t=mw();t&&this._innerSetBreak(t.parseAxisBreakOption(e,rL(this.parse,this)))},e.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},e.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.hasBreaks=function(){return!!this._brkCtx&&this._brkCtx.hasBreaks()},e.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();cH(yw);var yk=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new yc({})),rO(i)&&(i=new yc({categories:rA(i,function(e){return rB(e)?e.value:e})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return rt(t,e),t.prototype.parse=function(e){return null==e?NaN:rY(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return y_(e,this._extent)&&e>=0&&e<this._ordinalMeta.categories.length},t.prototype.normalize=function(e){return e=this._getTickNumber(e),this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(this._calculator.scale(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null==e){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,r=this._ordinalMeta.categories.length,a=Math.min(r,t.length);o<a;++o){var s=t[o];n[o]=s,i[s]=o}for(var l=0;o<r;++o){for(;null!=i[l];)l++;n.push(l),i[l]=o}},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return null==n?"":n+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(yw);yw.registerClass(yk);var yE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return rt(t,e),t.prototype.parse=function(e){return null==e||""===e?NaN:Number(e)},t.prototype.contain=function(e){return y_(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=yb(e)},t.prototype.getTicks=function(e){e=e||{};var t=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,r=mw(),a=[];if(!t)return a;if("only_break"===e.breakTicks&&r)return r.addBreaksToTicks(a,this._brkCtx.breaks,this._extent),a;n[0]<i[0]&&(e.expandToNicedExtent?a.push({value:ce(i[0]-t,o)}):a.push({value:n[0]}));for(var s=function(e,n){return Math.round((n-e)/t)},l=i[0];l<=i[1];){if(a.push({value:l}),l=ce(l+t,o),this._brkCtx){var c=this._brkCtx.calcNiceTickMultiple(l,s);c>=0&&(l=ce(l+c*t,o))}if(a.length>0&&l===a[a.length-1].value)break;if(a.length>1e4)return[]}var d=a.length?a[a.length-1].value:i[1];return n[1]>d&&(e.expandToNicedExtent?a.push({value:ce(d+t,o)}):a.push({value:n[1]})),r&&r.pruneTicksByBreak(e.pruneByBreak,a,this._brkCtx.breaks,function(e){return e.value},this._interval,this._extent),"none"!==e.breakTicks&&r&&r.addBreaksToTicks(a,this._brkCtx.breaks,this._extent),a},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks({expandToNicedExtent:!0}),n=[],i=this.getExtent(),o=1;o<t.length;o++){var r=t[o],a=t[o-1];if(!a.break&&!r.break){for(var s=0,l=[],c=(r.value-a.value)/e,d=yb(c);s<e-1;){var u=ce(a.value+(s+1)*c,d);u>i[0]&&u<i[1]&&l.push(u),s++}var m=mw();m&&m.pruneTicksByBreak("auto",l,this._getNonTransBreaks(),function(e){return e},this._interval,i),n.push(l)}}return n},t.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.getLabel=function(e,t){if(null==e)return"";var n=t&&t.precision;return null==n?n=cn(e.value)||0:"auto"===n&&(n=this._intervalPrecision),mq(ce(e.value,n,!0))},t.prototype.calcNiceTicks=function(e,t,n){e=e||5;var i=this._extent.slice(),o=this._getExtentSpanWithBreaks();if(isFinite(o)){o<0&&(o=-o,i.reverse(),this._innerSetExtent(i[0],i[1]),i=this._extent.slice());var r,a,s,l,c,d,u,m,f=(s=i,l=o,c=e,u=(d={}).interval=cc(l/c,!0),null!=t&&u<t&&(u=d.interval=t),null!=n&&u>n&&(u=d.interval=n),m=d.intervalPrecision=yb(u),r=d.niceTickExtent=[ce(Math.ceil(s[0]/u)*u,m),ce(Math.floor(s[1]/u)*u,m)],a=s,isFinite(r[0])||(r[0]=a[0]),isFinite(r[1])||(r[1]=a[1]),yg(r,0,a),yg(r,1,a),r[0]>r[1]&&(r[0]=r[1]),d);this._intervalPrecision=f.intervalPrecision,this._interval=f.interval,this._niceExtent=f.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var t=this._extent.slice();if(t[0]===t[1])if(0!==t[0]){var n=Math.abs(t[0]);e.fixMax||(t[1]+=n/2),t[0]-=n/2}else t[1]=1;isFinite(t[1]-t[0])||(t[0]=0,t[1]=1),this._innerSetExtent(t[0],t[1]),t=this._extent.slice(),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var i=this._interval,o=this._intervalPrecision;e.fixMin||(t[0]=ce(Math.floor(t[0]/i)*i,o)),e.fixMax||(t[1]=ce(Math.ceil(t[1]/i)*i,o)),this._innerSetExtent(t[0],t[1])},t.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},t.type="interval",t}(yw);yw.registerClass(yE);var yT=ck(),yM={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},yA=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=yS(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return rV(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=pn(this.source),n=!(e>30),i="",o=[],r=0,a=0;r<e;r++){var s=void 0,l=void 0,c=void 0,d=this.dimensions[a];if(d&&d.storeDimIndex===r)s=t?d.name:null,l=d.type,c=d.ordinalMeta,a++;else{var u=this.getSourceDimension(r);u&&(s=t?u.name:null,l=u.type)}o.push({property:s,type:l,ordinalMeta:c}),!t||null==s||d&&d.isCalculationCoord||(i+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),i+="$",i+=yM[l]||"f",c&&(i+=c.uid),i+="$"}var m=this.source;return{dimensions:o,hash:[m.seriesLayoutBy,m.startIndex,i].join("$$")}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var i=void 0,o=this.dimensions[n];if(o&&o.storeDimIndex===t)o.isCalculationCoord||(i=o.name),n++;else{var r=this.getSourceDimension(t);r&&(i=r.name)}e.push(i)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function yC(e){return e instanceof yA}function yD(e){for(var t=r1(),n=0;n<(e||[]).length;n++){var i=e[n],o=rB(i)?i.name:i;null!=o&&null==t.get(o)&&t.set(o,n)}return t}function yS(e){var t=yT(e);return t.dimNameMap||(t.dimNameMap=yD(e.dimensionsDefine))}function yL(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}var yI="undefined"!=typeof Float32Array,yO=yI?Float32Array:Array;function yR(e){return rO(e)?yI?new Float32Array(e):e:new yO(e)}function yY(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function yP(e){return e.dim+e.index}function yN(e,t){var n=[];return t.eachSeriesByType(e,function(e){yz(e)&&n.push(e)}),n}function yB(e){var t,n,i=function(e){var t={};rM(e,function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var i=e.getData(),o=n.dim+"_"+n.index,r=i.getDimensionIndex(i.mapDimension(n.dim)),a=i.getStore(),s=0,l=a.count();s<l;++s){var c=a.get(r,s);t[o]?t[o].push(c):t[o]=[c]}});var n={};for(var i in t)if(t.hasOwnProperty(i)){var o=t[i];if(o){o.sort(function(e,t){return e-t});for(var r=null,a=1;a<o.length;++a){var s=o[a]-o[a-1];s>0&&(r=null===r?s:Math.min(r,s))}n[i]=r}}return n}(e),o=[];return rM(e,function(e){var t,n=e.coordinateSystem.getBaseAxis(),r=n.getExtent();if("category"===n.type)t=n.getBandWidth();else if("value"===n.type||"time"===n.type){var a=i[n.dim+"_"+n.index],s=Math.abs(r[1]-r[0]),l=n.scale.getExtent(),c=Math.abs(l[1]-l[0]);t=a?s/c*a:s}else{var d=e.getData();t=Math.abs(r[1]-r[0])/d.count()}var u=l7(e.get("barWidth"),t),m=l7(e.get("barMaxWidth"),t),f=l7(e.get("barMinWidth")||(yj(e)?.5:1),t),p=e.get("barGap"),h=e.get("barCategoryGap"),b=e.get("defaultBarGap");o.push({bandWidth:t,barWidth:u,barMaxWidth:m,barMinWidth:f,barGap:p,barCategoryGap:h,defaultBarGap:b,axisKey:yP(n),stackId:yY(e)})}),t={},rM(o,function(e,n){var i=e.axisKey,o=e.bandWidth,r=t[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:e.defaultBarGap||0,stacks:{}},a=r.stacks;t[i]=r;var s=e.stackId;!a[s]&&r.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(r.remainedWidth,l),r.remainedWidth-=l);var c=e.barMaxWidth;c&&(a[s].maxWidth=c);var d=e.barMinWidth;d&&(a[s].minWidth=d);var u=e.barGap;null!=u&&(r.gap=u);var m=e.barCategoryGap;null!=m&&(r.categoryGap=m)}),n={},rM(t,function(e,t){n[t]={};var i,o=e.stacks,r=e.bandWidth,a=e.categoryGap;null==a&&(a=Math.max(35-4*rS(o).length,15)+"%");var s=l7(a,r),l=l7(e.gap,1),c=e.remainedWidth,d=e.autoWidthCount,u=(c-s)/(d+(d-1)*l);u=Math.max(u,0),rM(o,function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){var i=e.width;t&&(i=Math.min(i,t)),n&&(i=Math.max(i,n)),e.width=i,c-=i+l*i,d--}else{var i=u;t&&t<i&&(i=Math.min(t,c)),n&&n>i&&(i=n),i!==u&&(e.width=i,c-=i+l*i,d--)}}),u=Math.max(u=(c-s)/(d+(d-1)*l),0);var m=0;rM(o,function(e,t){e.width||(e.width=u),i=e,m+=e.width*(1+l)}),i&&(m-=i.width*l);var f=-m/2;rM(o,function(e,i){n[t][i]=n[t][i]||{bandWidth:r,offset:f,width:e.width},f+=e.width*(1+l)})}),n}function yH(e,t){var n=yN(e,t),i=yB(n);rM(n,function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),o=yY(e),r=i[yP(n)][o],a=r.offset,s=r.width;t.setLayout({bandWidth:r.bandWidth,offset:a,size:s})})}function yz(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function yj(e){return e.pipelineContext&&e.pipelineContext.large}var yU=function(e,t,n,i){for(;n<i;){var o=n+i>>>1;e[o][1]<t?n=o+1:i=o}return n},yW=function(e){function t(t){var n=e.call(this,t)||this;return n.type="time",n}return rt(t,e),t.prototype.getLabel=function(e){var t=this.getSetting("useUTC");return mL(e.value,mM[function(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(mS(this._minLevelUnit))]||mM.second,t,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,t,n){var i=this.getSetting("useUTC");return function(e,t,n,i,o){var r=null;if(rY(n))r=n;else if(rR(n)){var a={time:e.time,level:e.time.level},s=mw();s&&s.makeAxisLabelFormatterParamBreak(a,e.break),r=n(e.value,t,a)}else{var l=e.time;if(l){var c=n[l.lowerTimeUnit][l.upperTimeUnit];r=c[Math.min(l.level,c.length-1)]||""}else{var d=mI(e.value,o);r=n[d][d][0]}}return mL(new Date(e.value),r,o,i)}(e,t,n,this.getSetting("locale"),i)},t.prototype.getTicks=function(e){e=e||{};var t=this._interval,n=this._extent,i=mw(),o=[];if(!t)return o;var r=this.getSetting("useUTC");if(i&&"only_break"===e.breakTicks)return mw().addBreaksToTicks(o,this._brkCtx.breaks,this._extent),o;var a=mI(n[1],r);o.push({value:n[0],time:{level:0,upperTimeUnit:a,lowerTimeUnit:a}});var s=function(e,t,n,i,o,r){for(var a=0,s=[],l=[],c=0,d=0,u=0;u<mC.length;++u){var m,f=mS(mC[u]);if((m=mC[u])===mS(m)&&(!function(e,o,s){var l=[],c=!o.length;if(!yG(mS(e),i[0],i[1],n)){c&&(o=[{value:(f=i[0],p=Math.max(0,rk(mA,e)-1),mO(new Date(f),mA[p],n).getTime())},{value:i[1]}]);for(var d=0;d<o.length-1;d++){var u=o[d].value,m=o[d+1].value;if(u!==m){var f,p,h,b,g,_=void 0,y=void 0,v=void 0;switch(e){case"year":_=Math.max(1,Math.round(t/864e5/365)),y=mR(n),v=n?"setUTCFullYear":"setFullYear";break;case"half-year":case"quarter":case"month":_=(h=t/2592e6)>6?6:h>3?3:h>2?2:1,y=mY(n),v=mj(n);break;case"week":case"half-week":case"day":_=(b=t/864e5)>16?16:b>7.5?7:b>3.5?4:b>1.5?2:1,y=mP(n),v=mU(n);break;case"half-day":case"quarter-day":case"hour":_=(g=t/36e5)>12?12:g>6?6:g>3.5?4:g>2?2:1,y=mN(n),v=mW(n);break;case"minute":_=y$(t,!0),y=mB(n),v=mV(n);break;case"second":_=y$(t,!1),y=mH(n),v=mG(n);break;case"millisecond":_=cc(t,!0),y=mz(n),v=m$(n)}m>=i[0]&&u<=i[1]&&function(e,t,n,o,s,l,c){for(var d,u,m,f=((d=new Date(0))[s](1),u=d.getTime(),d[s](1+e),m=d.getTime()-u,function(e,t){return Math.max(0,Math.round((t-e)/m))}),p=t,h=new Date(p);p<n&&p<=i[1]&&(c.push({value:p}),!(a++>1e4));)if(h[s](h[o]()+e),p=h.getTime(),r){var b=r.calcNiceTickMultiple(p,f);b>0&&(h[s](h[o]()+b*e),p=h.getTime())}c.push({value:p,notAdd:!0})}(_,u,m,y,v,0,l),"year"===e&&s.length>1&&0===d&&s.unshift({value:s[0].value-_})}}for(var d=0;d<l.length;d++)s.push(l[d])}}(mC[u],s[s.length-1]||[],l),f!==(mC[u+1]?mS(mC[u+1]):null))){if(l.length){d=c,l.sort(function(e,t){return e.value-t.value});for(var p=[],h=0;h<l.length;++h){var b=l[h].value;(0===h||l[h-1].value!==b)&&(p.push(l[h]),b>=i[0]&&b<=i[1]&&c++)}var g=o/t;if(c>1.5*g&&d>g/1.5||(s.push(p),c>g||e===mC[u]))break}l=[]}}for(var _=rD(rA(s,function(e){return rD(e,function(e){return e.value>=i[0]&&e.value<=i[1]&&!e.notAdd})}),function(e){return e.length>0}),y=[],v=_.length-1,u=0;u<_.length;++u)for(var F=_[u],x=0;x<F.length;++x){var w=mI(F[x].value,n);y.push({value:F[x].value,time:{level:v-u,upperTimeUnit:w,lowerTimeUnit:w}})}y.sort(function(e,t){return e.value-t.value});for(var k=[],u=0;u<y.length;++u)(0===u||y[u].value!==y[u-1].value)&&k.push(y[u]);return k}(this._minLevelUnit,this._approxInterval,r,n,this._getExtentSpanWithBreaks(),this._brkCtx);o=o.concat(s);var l=mI(n[1],r);o.push({value:n[1],time:{level:0,upperTimeUnit:l,lowerTimeUnit:l}});var c=this.getSetting("useUTC"),d=mA.length-1,u=0;return rM(o,function(e){d=Math.min(d,rk(mA,e.time.upperTimeUnit)),u=Math.max(u,e.time.level)}),i&&mw().pruneTicksByBreak(e.pruneByBreak,o,this._brkCtx.breaks,function(e){return e.value},this._approxInterval,this._extent),i&&"none"!==e.breakTicks&&mw().addBreaksToTicks(o,this._brkCtx.breaks,this._extent,function(e){for(var t=Math.max(rk(mA,mI(e.vmin,c)),rk(mA,mI(e.vmax,c))),n=0,i=0;i<mA.length;i++)if(!yG(mA[i],e.vmin,e.vmax,c)){n=i;break}var o=Math.min(n,d);return{level:u,lowerTimeUnit:mA[Math.max(o,t)],upperTimeUnit:mA[o]}}),o},t.prototype.calcNiceExtent=function(e){var t=this.getExtent();if(t[0]===t[1]&&(t[0]-=864e5,t[1]+=864e5),t[1]===-1/0&&t[0]===1/0){var n=new Date;t[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),t[0]=t[1]-864e5}this._innerSetExtent(t[0],t[1]),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,t,n){e=e||10;var i=this._getExtentSpanWithBreaks();this._approxInterval=i/e,null!=t&&this._approxInterval<t&&(this._approxInterval=t),null!=n&&this._approxInterval>n&&(this._approxInterval=n);var o=yV.length,r=Math.min(yU(yV,this._approxInterval,0,o),o-1);this._interval=yV[r][1],this._intervalPrecision=yb(this._interval),this._minLevelUnit=yV[Math.max(r-1,0)][0]},t.prototype.parse=function(e){return rN(e)?e:+cs(e)},t.prototype.contain=function(e){return y_(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.type="time",t}(yE),yV=[["second",1e3],["minute",6e4],["hour",36e5],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",15768e6],["year",31536e6]];function yG(e,t,n,i){return mO(new Date(t),e,i).getTime()===mO(new Date(n),e,i).getTime()}function y$(e,t){return(e/=t?6e4:1e3)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}yw.registerClass(yW);var yq=Math.floor,yX=Math.ceil,yK=Math.pow,yJ=Math.log,yZ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new yE,t}return rt(t,e),t.prototype.getTicks=function(t){t=t||{};var n=this._extent.slice(),i=this._originalScale.getExtent(),o=e.prototype.getTicks.call(this,t),r=this.base,a=this._originalScale._innerGetBreaks(),s=mw();return rA(o,function(e){var t,o=e.value,l=null,c=yK(r,o);if(o===n[0]&&this._fixMin?l=i[0]:o===n[1]&&this._fixMax&&(l=i[1]),s){var d=s.getTicksLogTransformBreak(e,r,a,yQ);t=d.vBreak,null==l&&(l=d.brkRoundingCriterion)}return null!=l&&(c=yQ(c,l)),{value:c,break:t}},this)},t.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},t.prototype.setExtent=function(t,n){this._originalScale.setExtent(t,n);var i=yx(this.base,[t,n]);e.prototype.setExtent.call(this,i[0],i[1])},t.prototype.getExtent=function(){var t=this.base,n=e.prototype.getExtent.call(this);n[0]=yK(t,n[0]),n[1]=yK(t,n[1]);var i=this._originalScale.getExtent();return this._fixMin&&(n[0]=yQ(n[0],i[0])),this._fixMax&&(n[1]=yQ(n[1],i[1])),n},t.prototype.unionExtentFromData=function(e,t){this._originalScale.unionExtentFromData(e,t);var n=yx(this.base,e.getApproximateExtent(t),!0);this._innerUnionExtent(n)},t.prototype.calcNiceTicks=function(e){e=e||10;var t=this._extent.slice(),n=this._getExtentSpanWithBreaks();if(isFinite(n)&&!(n<=0)){var i=Math.pow(10,cl(n));for(e/n*i<=.5&&(i*=10);!isNaN(i)&&1>Math.abs(i)&&Math.abs(i)>0;)i*=10;var o=[ce(yX(t[0]/i)*i),ce(yq(t[1]/i)*i)];this._interval=i,this._intervalPrecision=yb(i),this._niceExtent=o}},t.prototype.calcNiceExtent=function(t){e.prototype.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},t.prototype.contain=function(t){return t=yJ(t)/yJ(this.base),e.prototype.contain.call(this,t)},t.prototype.normalize=function(t){return t=yJ(t)/yJ(this.base),e.prototype.normalize.call(this,t)},t.prototype.scale=function(t){return t=e.prototype.scale.call(this,t),yK(this.base,t)},t.prototype.setBreaksFromOption=function(e){var t=mw();if(t){var n=t.logarithmicParseBreaksFromOption(e,this.base,rL(this.parse,this)),i=n.parsedOriginal,o=n.parsedLogged;this._originalScale._innerSetBreak(i),this._innerSetBreak(o)}},t.type="log",t}(yE);function yQ(e,t){return ce(e,cn(t))}yw.registerClass(yZ);var y0=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal="ordinal"===e.type;this._needCrossZero="interval"===e.type&&t.getNeedCrossZero&&t.getNeedCrossZero();var o=t.get("min",!0);null==o&&(o=t.get("startValue",!0));var r=this._modelMinRaw=o;rR(r)?this._modelMinNum=y3(e,r({min:n[0],max:n[1]})):"dataMin"!==r&&(this._modelMinNum=y3(e,r));var a=this._modelMaxRaw=t.get("max",!0);if(rR(a)?this._modelMaxNum=y3(e,a({min:n[0],max:n[1]})):"dataMax"!==a&&(this._modelMaxNum=y3(e,a)),i)this._axisDataLen=t.getCategories().length;else{var s=t.get("boundaryGap"),l=rO(s)?s:[s||0,s||0];"boolean"==typeof l[0]||"boolean"==typeof l[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[lz(l[0],1),lz(l[1],1)]}},e.prototype.calculate=function(){var e,t,n=this._isOrdinal,i=this._dataMin,o=this._dataMax,r=this._axisDataLen,a=this._boundaryGapInner,s=n?null:o-i||Math.abs(i),l="dataMin"===this._modelMinRaw?i:this._modelMinNum,c="dataMax"===this._modelMaxRaw?o:this._modelMaxNum,d=null!=l,u=null!=c;null==l&&(l=n?r?0:NaN:i-a[0]*s),null==c&&(c=n?r?r-1:NaN:o+a[1]*s),null!=l&&isFinite(l)||(l=NaN),null!=c&&isFinite(c)||(c=NaN);var m=(e=l)!=e||(t=c)!=t||n&&!r;this._needCrossZero&&(l>0&&c>0&&!d&&(l=0),l<0&&c<0&&!u&&(c=0));var f=this._determinedMin,p=this._determinedMax;return null!=f&&(l=f,d=!0),null!=p&&(c=p,u=!0),{min:l,max:c,minFixed:d,maxFixed:u,isBlank:m}},e.prototype.modifyDataMinMax=function(e,t){this[y2[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){this[y1[e]]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),y1={min:"_determinedMin",max:"_determinedMax"},y2={min:"_dataMin",max:"_dataMax"};function y5(e,t,n){var i=e.rawExtentInfo;return i||(i=new y0(e,t,n),e.rawExtentInfo=i),i}function y3(e,t){return null==t?null:t!=t?NaN:e.parse(t)}function y4(e,t){var n=e.type,i=y5(e,t,e.getExtent()).calculate();e.setBlank(i.isBlank);var o=i.min,r=i.max,a=t.ecModel;if(a&&"time"===n){var s=yN("bar",a),l=!1;if(rM(s,function(e){l=l||e.getBaseAxis()===t.axis}),l){var c=function(e,t,n,i){var o=n.axis.getExtent(),r=Math.abs(o[1]-o[0]),a=function(e,t,n){if(e&&t)return e[yP(t)]}(i,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;rM(a,function(e){s=Math.min(e.offset,s)});var l=-1/0;rM(a,function(e){l=Math.max(e.offset+e.width,l)});var c=(s=Math.abs(s))+(l=Math.abs(l)),d=t-e,u=d/(1-(s+l)/r)-d;return t+=l/c*u,{min:e-=s/c*u,max:t}}(o,r,t,yB(s));o=c.min,r=c.max}}return{extent:[o,r],fixMin:i.minFixed,fixMax:i.maxFixed}}function y6(e,t){var n=y4(e,t),i=n.extent,o=t.get("splitNumber");e instanceof yZ&&(e.base=t.get("logBase"));var r=e.type,a=t.get("interval"),s="interval"===r||"time"===r;e.setBreaksFromOption(vo(t)),e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:o,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:s?t.get("minInterval"):null,maxInterval:s?t.get("maxInterval"):null}),null!=a&&e.setInterval&&e.setInterval(a)}function y8(e){var t=e.getLabelModel().get("formatter");if("time"===e.type){var n,i,o,r=rY(t)||rR(t)?t:(n=(n=t)||{},i={},o=!0,rM(mA,function(e){o&&(o=null==n[e])}),rM(mA,function(e,t){var r=n[e];i[e]={};for(var a=null,s=t;s>=0;s--){var l=mA[s],c=rB(r)&&!rO(r)?r[l]:r,d=void 0;rO(c)?a=(d=c.slice())[0]||"":rY(c)?d=[a=c]:(null==a?a=mE[e]:mk[l].test(a)||(a=i[l][l][0]+" "+a),d=[a],o&&(d[1]="{primary|"+a+"}")),i[e][l]=d}}),i);return function(t,n){return e.scale.getFormattedLabel(t,n,r)}}if(rY(t))return function(n){var i=e.scale.getLabel(n);return t.replace("{value}",null!=i?i:"")};if(!rR(t))return function(t){return e.scale.getLabel(t)};if("category"===e.type)return function(n,i){return t(y7(e,n),n.value-e.scale.getExtent()[0],null)};var a=mw();return function(n,i){var o=null;return a&&(o=a.makeAxisLabelFormatterParamBreak(o,n.break)),t(y7(e,n),i,o)}}function y7(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function y9(e){var t=e.get("interval");return null==t?"auto":t}function ve(e){return"category"===e.type&&0===y9(e.getLabelModel())}function vt(e,t){var n={};return rM(e.mapDimensionsAll(t),function(t){n[yL(e,t)?e.getCalculationInfo("stackResultDimension"):t]=!0}),rS(n)}function vn(e){return"middle"===e||"center"===e}function vi(e){return e.getShallow("show")}function vo(e){var t,n=e.get("breaks",!0);if(null!=n){return mw()&&("x"===(t=e.axis).dim||"y"===t.dim||"z"===t.dim||"single"===t.dim)&&"category"!==t.type?n:void 0}}var vr=function(){function e(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return rA(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),rD(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),va=["x","y"];function vs(e){return("interval"===e.type||"time"===e.type)&&!e.hasBreaks()}var vl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=va,t}return rt(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(vs(e)&&vs(t)){var n=e.getExtent(),i=t.getExtent(),o=this.dataToPoint([n[0],i[0]]),r=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(r[0]-o[0])/a,c=(r[1]-o[1])/s,d=o[0]-n[0]*l,u=o[1]-i[0]*c,m=this._transform=[l,0,0,c,d,u];this._invTransform=aN([],m)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),i=this.dataToPoint(t),o=this.getArea(),r=new a3(n[0],n[1],i[0]-n[0],i[1]-n[1]);return o.intersect(r)},t.prototype.dataToPoint=function(e,t,n){n=n||[];var i=e[0],o=e[1];if(this._transform&&null!=i&&isFinite(i)&&null!=o&&isFinite(o))return ao(n,e,this._transform);var r=this.getAxis("x"),a=this.getAxis("y");return n[0]=r.toGlobalCoord(r.dataToCoord(i,t)),n[1]=a.toGlobalCoord(a.dataToCoord(o,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),r=i.getExtent(),a=n.parse(e[0]),s=i.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(o[0],o[1]),a),Math.max(o[0],o[1])),t[1]=Math.min(Math.max(Math.min(r[0],r[1]),s),Math.max(r[0],r[1])),t},t.prototype.pointToData=function(e,t,n){if(n=n||[],this._invTransform)return ao(n,e,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(e[0]),t),n[1]=o.coordToData(o.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},t.prototype.getArea=function(e){e=e||0;var t=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(t[0],t[1])-e,o=Math.min(n[0],n[1])-e,r=Math.max(t[0],t[1])-i+e,a=Math.max(n[0],n[1])-o+e;return new a3(i,o,r,a)},t}(vr),vc=ck(),vd=ck(),vu={estimate:1,determine:2};function vm(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function vf(e,t){var n=rA(t,function(t){return e.scale.parse(t)});return"time"===e.type&&n.length>0&&(n.sort(),n.unshift(n[0]),n.push(n[n.length-1])),n}function vp(e,t,n){var i,o,r=vb(e),a=y9(t),s=n.kind===vu.estimate;if(!s){var l=v_(r,a);if(l)return l}rR(a)?i=vw(e,a):(o="auto"===a?function(e,t){if(t.kind===vu.estimate){var n=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return vd(e).autoInterval=n,!0}),n}var i=vd(e).autoInterval;return null!=i?i:vd(e).autoInterval=e.calculateCategoryInterval(t)}(e,n):a,i=vx(e,o));var c={labels:i,labelCategoryInterval:o};return s?n.out.noPxChangeTryDetermine.push(function(){return vy(r,a,c),!0}):vy(r,a,c),c}var vh=vg("axisTick"),vb=vg("axisLabel");function vg(e){return function(t){return vd(t)[e]||(vd(t)[e]={list:[]})}}function v_(e,t){for(var n=0;n<e.list.length;n++)if(e.list[n].key===t)return e.list[n].value}function vy(e,t,n){return e.list.push({key:t,value:n}),n}function vv(e,t,n){return null==vF(e,t,n)}function vF(e,t,n){var i=vc(e.model),o=e.getExtent(),r=i.lastAutoInterval,a=i.lastTickCount;if(null!=r&&null!=a&&1>=Math.abs(r-t)&&1>=Math.abs(a-n)&&r>t&&i.axisExtent0===o[0]&&i.axisExtent1===o[1])return r;i.lastTickCount=n,i.lastAutoInterval=t,i.axisExtent0=o[0],i.axisExtent1=o[1]}function vx(e,t,n){var i=y8(e),o=e.scale,r=o.getExtent(),a=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),c=r[0],d=o.count();0!==c&&l>1&&d/l>2&&(c=Math.round(Math.ceil(c/l)*l));var u=ve(e),m=a.get("showMinLabel")||u,f=a.get("showMaxLabel")||u;m&&c!==r[0]&&h(r[0]);for(var p=c;p<=r[1];p+=l)h(p);function h(e){var t={value:e};s.push(n?e:{formattedLabel:i(t),rawLabel:o.getLabel(t),tickValue:e,time:void 0,break:void 0})}return f&&p-l!==r[1]&&h(r[1]),s}function vw(e,t,n){var i=e.scale,o=y8(e),r=[];return rM(i.getTicks(),function(e){var a=i.getLabel(e),s=e.value;t(e.value,a)&&r.push(n?s:{formattedLabel:o(e),rawLabel:a,tickValue:s,time:void 0,break:void 0})}),r}var vk=[0,1];function vE(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}var vT=function(e){function t(t,n,i,o,r){var a=e.call(this,t,n,i)||this;return a.index=0,a.type=o||"value",a.position=r||"bottom",a}return rt(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[+("x"!==this.dim)]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return e>=n&&e<=i},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return ci(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this._extent,i=this.scale;return e=i.normalize(i.parse(e)),this.onBand&&"ordinal"===i.type&&vE(n=n.slice(),i.count()),l8(e,vk,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&vE(n=n.slice(),i.count());var o=l8(e,n,vk,t);return this.scale.scale(o)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=function(e,t,n){var i=e.getTickModel().get("customValues");if(i){var o=e.scale.getExtent();return{ticks:rD(vf(e,i),function(e){return e>=o[0]&&e<=o[1]})}}return"category"===e.type?function(e,t){var n,i,o=vh(e),r=y9(t),a=v_(o,r);if(a)return a;if((!t.get("show")||e.scale.isBlank())&&(n=[]),rR(r))n=vw(e,r,!0);else if("auto"===r){var s=vp(e,e.getLabelModel(),vm(vu.determine));i=s.labelCategoryInterval,n=rA(s.labels,function(e){return e.tickValue})}else n=vx(e,i=r,!0);return vy(o,r,{ticks:n,tickCategoryInterval:i})}(e,t):{ticks:rA(e.scale.getTicks(n),function(e){return e.value})}}(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,i=rA(n,function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}},this);return function(e,t,n,i){var o,r,a=t.length;if(e.onBand&&!n&&a){var s=e.getExtent();if(1===a)t[0].coord=s[0],t[0].onBand=!0,o=t[1]={coord:s[1],tickValue:t[0].tickValue,onBand:!0};else{var l=t[a-1].tickValue-t[0].tickValue,c=(t[a-1].coord-t[0].coord)/l;rM(t,function(e){e.coord-=c/2,e.onBand=!0});var d=e.scale.getExtent();r=1+d[1]-t[a-1].tickValue,o={coord:t[a-1].coord+c*r,tickValue:d[1]+1,onBand:!0},t.push(o)}var u=s[0]>s[1];m(t[0].coord,s[0])&&(i?t[0].coord=s[0]:t.shift()),i&&m(s[0],t[0].coord)&&t.unshift({coord:s[0],onBand:!0}),m(s[1],o.coord)&&(i?o.coord=s[1]:t.pop()),i&&m(o.coord,s[1])&&t.push({coord:s[1],onBand:!0})}function m(e,t){return e=ce(e),t=ce(t),u?e>t:e<t}}(this,i,t.get("alignWithLabel"),e.clamp),i},e.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick").get("splitNumber");return e>0&&e<100||(e=5),rA(this.scale.getMinorTicks(e),function(e){return rA(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return function(e,t){var n,i,o,r,a,s,l,c=e.getLabelModel().get("customValues");if(c){var d=y8(e),u=e.scale.getExtent();return{labels:rA(rD(vf(e,c),function(e){return e>=u[0]&&e<=u[1]}),function(t){var n={value:t};return{formattedLabel:d(n),rawLabel:e.scale.getLabel(n),tickValue:t,time:void 0,break:void 0}})}}return"category"===e.type?(n=e,i=t,o=n.getLabelModel(),r=vp(n,o,i),!o.get("show")||n.scale.isBlank()?{labels:[]}:r):(s=(a=e).scale.getTicks(),l=y8(a),{labels:rA(s,function(e,t){return{formattedLabel:l(e,t),rawLabel:a.scale.getLabel(e),tickValue:e.value,time:e.time,break:e.break}})})}(this,e=e||vm(vu.determine)).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+ +!!this.onBand;return 0===n&&(n=1),Math.abs(Math.abs(e[1]-e[0]))/n},e.prototype.calculateCategoryInterval=function(e){return function(e,t){var n,i,o=t.kind,r=(i=(n=e).getLabelModel(),{axisRotate:n.getRotate?n.getRotate():n.isHorizontal&&!n.isHorizontal()?90:0,labelRotate:i.get("rotate")||0,font:i.getFont()}),a=y8(e),s=(r.axisRotate-r.labelRotate)/180*Math.PI,l=e.scale,c=l.getExtent(),d=l.count();if(c[1]-c[0]<1)return 0;var u=1;d>40&&(u=Math.max(1,Math.floor(d/40)));for(var m=c[0],f=e.dataToCoord(m+1)-e.dataToCoord(m),p=Math.abs(f*Math.cos(s)),h=Math.abs(f*Math.sin(s)),b=0,g=0;m<=c[1];m+=u){var _=0,y=0,v=lP(a({value:m}),r.font,"center","top");_=1.3*v.width,y=1.3*v.height,b=Math.max(b,_,7),g=Math.max(g,y,7)}var F=b/p,x=g/h;isNaN(F)&&(F=1/0),isNaN(x)&&(x=1/0);var w=Math.max(0,Math.floor(Math.min(F,x)));if(o===vu.estimate)return t.out.noPxChangeTryDetermine.push(rL(vv,null,e,w,d)),w;var k=vF(e,w,d);return null!=k?k:w}(this,e=e||vm(vu.determine))},e}()),vM=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"];function vA(e,t,n){n=n||3,t?e.dirty|=n:e.dirty&=~n}function vC(e,t){return t=t||3,null==e.dirty||!!(e.dirty&t)}function vD(e){if(e)return vC(e)&&function(e,t,n){var i=t.getComputedTransform();e.transform=b9(e.transform,i);var o=e.localRect=b7(e.localRect,t.getBoundingRect()),r=t.style,a=r.margin,s=n&&n.marginForce,l=n&&n.minMarginForce,c=n&&n.marginDefault,d=r.__marginType;null==d&&c&&(a=c,d=mo.textMargin);for(var u=0;u<4;u++)vS[u]=d===mo.minMargin&&l&&null!=l[u]?l[u]:s&&null!=s[u]?s[u]:a?a[u]:0;d===mo.textMargin&&b0(o,vS,!1,!1);var m=e.rect=b7(e.rect,o);i&&m.applyTransform(i),d===mo.minMargin&&b0(m,vS,!1,!1),e.axisAligned=b6(i),(e.label=e.label||{}).ignore=t.ignore,vA(e,!1),vA(e,!0,2)}(e,e.label,e),e}var vS=[0,0,0,0];function vL(e,t){for(var n=0;n<vM.length;n++){var i=vM[n];null==e[i]&&(e[i]=t[i])}return vD(e)}function vI(e){var t=e.obb;return(!t||vC(e,2))&&(e.obb=t=t||new bg,t.fromBoundingRect(e.localRect,e.transform),vA(e,!1,2)),t}function vO(e,t,n,i){return!!e&&!!t&&(!e.label||!e.label.ignore)&&(!t.label||!t.label.ignore)&&!!e.rect.intersect(t.rect,n,i)&&(!!e.axisAligned&&!!t.axisAligned||vI(e).intersect(vI(t),n,i))}var vR=Math.PI,vY=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],vP=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],vN=ck(),vB=ck(),vH=function(){function e(e){this.recordMap={},this.resolveAxisNameOverlap=e}return e.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,i=this.recordMap,o=i[t]||(i[t]=[]);return o[n]||(o[n]={ready:{}})},e}(),vz=aL(),vj=new a3(0,0,0,0),vU=function(e,t,n,i,o,r){if(vn(e.nameLocation)){var a,s,l=r.stOccupiedRect;l&&vW((a={},s=r.transGroup.transform,a.transform=b9(a.transform,s),a.localRect=b7(a.localRect,l),a.rect=b7(a.rect,l),s&&a.rect.applyTransform(s),a.axisAligned=b6(s),a.obb=void 0,(a.label=a.label||{}).ignore=!1,a),i,o)}else vV(r.labelInfoList,r.dirVec,i,o)};function vW(e,t,n){var i=new aB;vO(e,t,i,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&function(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var i=e.rect;i&&(i.x+=t.x,i.y+=t.y);var o=e.obb;o&&o.fromBoundingRect(e.localRect,n)}}(t,i)}function vV(e,t,n,i){for(var o=aB.dot(i,t)>=0,r=0,a=e.length;r<a;r++){var s=e[o?r:a-1-r];s.label.ignore||vW(s,n,i)}}var vG=function(){function e(e,t,n,i){this.group=new lQ,this._axisModel=e,this._api=t,this._local={},this._shared=i||new vH(vU),this._resetCfgDetermined(n)}return e.prototype.updateCfg=function(e){var t=this._cfg.raw;t.position=e.position,t.labelOffset=e.labelOffset,this._resetCfgDetermined(t)},e.prototype.__getRawCfg=function(){return this._cfg.raw},e.prototype._resetCfgDetermined=function(e){var t=this._axisModel,n=t.getDefaultOption?t.getDefaultOption():{},i=rV(e.axisName,t.get("name")),o=t.get("nameMoveOverlap");(null==o||"auto"===o)&&(o=rV(e.defaultNameMoveOverlap,!0));var r={raw:e,position:e.position,rotation:e.rotation,nameDirection:rV(e.nameDirection,1),tickDirection:rV(e.tickDirection,1),labelDirection:rV(e.labelDirection,1),labelOffset:rV(e.labelOffset,0),silent:rV(e.silent,!0),axisName:i,nameLocation:rG(t.get("nameLocation"),n.nameLocation,"end"),shouldNameMoveOverlap:!!i&&o,optionHideOverlap:t.get(["axisLabel","hideOverlap"]),showMinorTicks:t.get(["minorTick","show"])};this._cfg=r;var a=new lQ({x:r.position[0],y:r.position[1],rotation:r.rotation});a.updateTransform(),this._transformGroup=a;var s=this._shared.ensureRecord(t);s.transGroup=this._transformGroup,s.dirVec=new aB(Math.cos(-r.rotation),Math.sin(-r.rotation))},e.prototype.build=function(e,t){var n=this;return e||(e={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),rM(v$,function(i){e[i]&&vq[i](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,t||{})}),this},e.innerTextLayout=function(e,t,n){var i,o,r=co(t-e);return cr(r)?(o=n>0?"top":"bottom",i="center"):cr(r-vR)?(o=n>0?"bottom":"top",i="center"):(o="middle",i=r>0&&r<vR?n>0?"right":"left":n>0?"left":"right"),{rotation:r,textAlign:i,textVerticalAlign:o}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},e}(),v$=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],vq={axisLine:function(e,t,n,i,o,r,a){var s=i.get(["axisLine","show"]);if("auto"===s&&(s=!0,null!=e.raw.axisLineAutoShow&&(s=!!e.raw.axisLineAutoShow)),s){var l=i.axis.getExtent(),c=r.transform,d=[l[0],0],u=[l[1],0],m=d[0]>u[0];c&&(ao(d,d,c),ao(u,u,c));var f=rx({lineCap:"round"},i.getModel(["axisLine","lineStyle"]).getLineStyle()),p={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:f};if(i.get(["axisLine","breakLine"])&&i.axis.scale.hasBreaks())null.buildAxisBreakLine(i,o,r,p);else{var h=new h6(rx({shape:{x1:d[0],y1:d[1],x2:u[0],y2:u[1]}},p));bj(h.shape,h.style.lineWidth),h.anid="line",o.add(h)}var b=i.get(["axisLine","symbol"]);if(null!=b){var g=i.get(["axisLine","symbolSize"]);rY(b)&&(b=[b,b]),(rY(g)||rN(g))&&(g=[g,g]);var _=function(e,t){if(null!=e)return rO(e)||(e=[e,e]),[l7(e[0],t[0])||0,l7(rV(e[1],e[0]),t[1])||0]}(i.get(["axisLine","symbolOffset"])||0,g),y=g[0],v=g[1];rM([{rotate:e.rotation+Math.PI/2,offset:_[0],r:0},{rotate:e.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((d[0]-u[0])*(d[0]-u[0])+(d[1]-u[1])*(d[1]-u[1]))}],function(t,n){if("none"!==b[n]&&null!=b[n]){var i=g3(b[n],-y/2,-v/2,y,v,f.stroke,!0),r=t.r+t.offset,a=m?u:d;i.attr({rotation:t.rotate,x:a[0]+r*Math.cos(e.rotation),y:a[1]-r*Math.sin(e.rotation),silent:!0,z2:11}),o.add(i)}})}}},axisTickLabelEstimate:function(e,t,n,i,o,r,a,s){vZ(t,o,s)&&vX(e,t,n,i,o,r,a,vu.estimate)},axisTickLabelDetermine:function(e,t,n,i,o,r,a,s){vZ(t,o,s)&&vX(e,t,n,i,o,r,a,vu.determine);var l,c,d,u=function(e,t,n,i){var o=i.axis,r=i.getModel("axisTick"),a=r.get("show");if("auto"===a&&(a=!0,null!=e.raw.axisTickAutoShow&&(a=!!e.raw.axisTickAutoShow)),!a||o.scale.isBlank())return[];for(var s=r.getModel("lineStyle"),l=e.tickDirection*r.get("length"),c=vJ(o.getTicksCoords(),n.transform,l,rw(s.getLineStyle(),{stroke:i.get(["axisLine","lineStyle","color"])}),"ticks"),d=0;d<c.length;d++)t.add(c[d]);return c}(e,o,r,i);l=e,c=t.labelLayoutList,d=u,l.showMinorTicks||rM(c,function(e){if(e&&e.label.ignore)for(var t=0;t<d.length;t++){var n=d[t],i=vB(n),o=vN(e.label);if(null!=i.tickValue&&!i.onBand&&i.tickValue===o.tickValue)return void vK(n)}}),function(e,t,n,i,o){var r=i.axis,a=i.getModel("minorTick");if(!(!e.showMinorTicks||r.scale.isBlank())){var s=r.getMinorTicksCoords();if(s.length)for(var l=a.getModel("lineStyle"),c=o*a.get("length"),d=rw(l.getLineStyle(),rw(i.getModel("axisTick").getLineStyle(),{stroke:i.get(["axisLine","lineStyle","color"])})),u=0;u<s.length;u++)for(var m=vJ(s[u],n.transform,c,d,"minorticks_"+u),f=0;f<m.length;f++)t.add(m[f])}}(e,o,r,i,e.tickDirection)},axisName:function(e,t,n,i,o,r,a,s){var l,c,d=n.ensureRecord(i);t.nameEl&&(o.remove(t.nameEl),t.nameEl=d.nameLayout=d.nameLocation=null);var u=e.axisName;if(u){var m,f,p,h,b,g,_,y,v,F=e.nameLocation,x=e.nameDirection,w=i.getModel("nameTextStyle"),k=i.get("nameGap")||0,E=i.axis.getExtent(),T=i.axis.inverse?-1:1,M=new aB(0,0),A=new aB(0,0);"start"===F?(M.x=E[0]-T*k,A.x=-T):"end"===F?(M.x=E[1]+T*k,A.x=T):(M.x=(E[0]+E[1])/2,M.y=e.labelOffset+x*k,A.y=x);var C=aL();A.transform(aP(C,C,e.rotation));var D=i.get("nameRotate");null!=D&&(D=D*vR/180),vn(F)?l=vG.innerTextLayout(e.rotation,null!=D?D:e.rotation,x):(m=e.rotation,f=F,p=D||0,h=E,_=co(p-m),y=h[0]>h[1],v="start"===f&&!y||"start"!==f&&y,cr(_-vR/2)?(g=v?"bottom":"top",b="center"):cr(_-1.5*vR)?(g=v?"top":"bottom",b="center"):(g="middle",b=_<1.5*vR&&_>vR/2?v?"left":"right":v?"right":"left"),l={rotation:_,textAlign:b,textVerticalAlign:g},null!=(c=e.raw.axisNameAvailableWidth)&&(isFinite(c=Math.abs(c/Math.sin(l.rotation)))||(c=null)));var S=w.getFont(),L=i.get("nameTruncate",!0)||{},I=L.ellipsis,O=rW(e.raw.nameTruncateMaxWidth,L.maxWidth,c),R=s.nameMarginLevel||0,Y=new ub({x:M.x,y:M.y,rotation:l.rotation,silent:vG.isLabelSilent(i),style:u8(w,{text:u,font:S,overflow:"truncate",width:O,ellipsis:I,fill:w.getTextColor()||i.get(["axisLine","lineStyle","color"]),align:w.get("align")||l.textAlign,verticalAlign:w.get("verticalAlign")||l.textVerticalAlign}),z2:1});if(b5({el:Y,componentModel:i,itemName:u}),Y.__fullText=u,Y.anid="name",i.get("triggerEvent")){var P=vG.makeAxisEventDataBase(i);P.targetType="axisName",P.name=u,ug(Y).eventData=P}r.add(Y),Y.updateTransform(),t.nameEl=Y;var N=d.nameLayout=vD({label:Y,priority:Y.z2,defaultAttr:{ignore:Y.ignore},marginDefault:vn(F)?vY[R]:vP[R]});if(d.nameLocation=F,o.add(Y),Y.decomposeTransform(),e.shouldNameMoveOverlap&&N){var B=n.ensureRecord(i);n.resolveAxisNameOverlap(e,n,i,N,A,B)}}}};function vX(e,t,n,i,o,r,a,s){vQ(t)||function(e,t,n,i,o,r){var a=o.axis,s=rW(e.raw.axisLabelShow,o.get(["axisLabel","show"])),l=new lQ;n.add(l);var c=vm(i);if(!s||a.scale.isBlank())return v0(t,[],l,c);var d=o.getModel("axisLabel"),u=a.getViewLabels(c),m=(rW(e.raw.labelRotate,d.get("rotate"))||0)*vR/180,f=vG.innerTextLayout(e.rotation,m,e.labelDirection),p=o.getCategories&&o.getCategories(!0),h=[],b=o.get("triggerEvent"),g=1/0,_=-1/0;rM(u,function(e,t){var n,i="ordinal"===a.scale.type?a.scale.getRawOrdinalNumber(e.tickValue):e.tickValue,s=e.formattedLabel,c=e.rawLabel,m=d;if(p&&p[i]){var y=p[i];rB(y)&&y.textStyle&&(m=new mh(y.textStyle,d,o.ecModel))}var v=m.getTextColor()||o.get(["axisLine","lineStyle","color"]),F=m.getShallow("align",!0)||f.textAlign,x=rV(m.getShallow("alignMinLabel",!0),F),w=rV(m.getShallow("alignMaxLabel",!0),F),k=m.getShallow("verticalAlign",!0)||m.getShallow("baseline",!0)||f.textVerticalAlign,E=rV(m.getShallow("verticalAlignMinLabel",!0),k),T=rV(m.getShallow("verticalAlignMaxLabel",!0),k),M=10+((null==(n=e.time)?void 0:n.level)||0);g=Math.min(g,M),_=Math.max(_,M);var A=new ub({x:0,y:0,rotation:0,silent:vG.isLabelSilent(o),z2:M,style:u8(m,{text:s,align:0===t?x:t===u.length-1?w:F,verticalAlign:0===t?E:t===u.length-1?T:k,fill:rR(v)?v("category"===a.type?c:"value"===a.type?i+"":i,t):v})});A.anid="label_"+i;var C=vN(A);if(C.break=e.break,C.tickValue=i,C.layoutRotation=f.rotation,b5({el:A,componentModel:o,itemName:s,formatterParamsExtra:{isTruncated:function(){return A.isTruncated},value:c,tickIndex:t}}),b){var D,S,L,I,O=vG.makeAxisEventDataBase(o);O.targetType="axisLabel",O.value=c,O.tickIndex=t,e.break&&(O.break={start:e.break.parsedBreak.vmin,end:e.break.parsedBreak.vmax}),"category"===a.type&&(O.dataIndex=i),ug(A).eventData=O,e.break&&(D=o,S=r,L=A,I=e.break,L.on("click",function(e){var t={type:"expandAxisBreak",breaks:[{start:I.parsedBreak.breakOption.start,end:I.parsedBreak.breakOption.end}]};t[D.axis.dim+"AxisIndex"]=D.componentIndex,S.dispatchAction(t)}))}h.push(A),l.add(A)}),v0(t,rA(h,function(e){return{label:e,priority:vN(e).break?e.z2+(_-g+1):e.z2,defaultAttr:{ignore:e.ignore}}}),l,c)}(e,t,o,s,i,a);var l,c,d,u,m,f=t.labelLayoutList;l=e,c=i,d=f,u=r,m=c.get(["axisLabel","margin"]),rM(d,function(e,t){var n=vD(e);if(n){var i=n.label,o=vN(i);n.suggestIgnore=i.ignore,i.ignore=!1,lS(v1,v2),v1.x=c.axis.dataToCoord(o.tickValue),v1.y=l.labelOffset+l.labelDirection*m,v1.rotation=o.layoutRotation,u.add(v1),v1.updateTransform(),u.remove(v1),v1.decomposeTransform(),lS(i,v1),i.markRedraw(),vA(n,!0),vD(n)}}),function(e,t,n){var i=mw();if(i){var o=i.retrieveAxisBreakPairs(n,function(e){return e&&vN(e.label).break},!0),r=e.get(["breakLabelLayout","moveOverlap"],!0);(!0===r||"auto"===r)&&rM(o,function(i){null.adjustBreakLabelPair(e.axis.inverse,t,[vD(n[i[0]]),vD(n[i[1]])])})}}(i,e.rotation,f);var p=e.optionHideOverlap;(function(e,t,n){if(!ve(e.axis)){var i=e.get(["axisLabel","showMinLabel"]),o=e.get(["axisLabel","showMaxLabel"]),r=t.length;a(i,0,1),a(o,r-1,r-2)}function a(e,i,o){var r=vD(t[i]),a=vD(t[o]);if(r&&a){if(!1===e||r.suggestIgnore)return void vK(r.label);if(a.suggestIgnore)return void vK(a.label);if(!n){var s=[0,0,0,0];r=vL({marginForce:s},r),a=vL({marginForce:s},a)}vO(r,a,null,{touchThreshold:.1})&&(e?vK(a.label):vK(r.label))}}})(i,f,p),p&&function(e){var t=[];function n(e){if(!e.ignore){var t=e.ensureState("emphasis");null==t.ignore&&(t.ignore=!1)}e.ignore=!0}e.sort(function(e,t){return!!t.suggestIgnore-!!e.suggestIgnore||t.priority-e.priority});for(var i=0;i<e.length;i++){var o=vD(e[i]);if(!o.label.ignore){for(var r=o.label,a=o.labelLine,s=!1,l=0;l<t.length;l++)if(vO(o,t[l],null,{touchThreshold:.05})){s=!0;break}s?(n(r),a&&n(a)):t.push(o)}}}(rD(f,function(e){return e&&!e.label.ignore})),function(e,t,n,i){var o,r=n.axis,a=t.ensureRecord(n),s=[],l=!!e.axisName&&vn(e.nameLocation);rM(i,function(e){var t=vD(e);if(t&&!t.label.ignore){s.push(t);var n=a.transGroup;l&&(n.transform?aN(vz,n.transform):aI(vz),t.transform&&aR(vz,vz,t.transform),a3.copy(vj,t.localRect),vj.applyTransform(vz),o?o.union(vj):a3.copy(o=new a3(0,0,0,0),vj))}});var c=Math.abs(a.dirVec.x)>.1?"x":"y",d=a.transGroup[c];if(s.sort(function(e,t){return Math.abs(e.label[c]-d)-Math.abs(t.label[c]-d)}),l&&o){var u=r.getExtent(),m=Math.min(u[0],u[1]),f=Math.max(u[0],u[1])-m;o.union(new a3(m,0,f,1))}a.stOccupiedRect=o,a.labelInfoList=s}(e,n,i,f)}function vK(e){e&&(e.ignore=!0)}function vJ(e,t,n,i,o){for(var r=[],a=[],s=[],l=0;l<e.length;l++){var c=e[l].coord;a[0]=c,a[1]=0,s[0]=c,s[1]=n,t&&(ao(a,a,t),ao(s,s,t));var d=new h6({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:i,z2:2,autoBatch:!0,silent:!0});bj(d.shape,d.style.lineWidth),d.anid=o+"_"+e[l].tickValue,r.push(d);var u=vB(d);u.onBand=!!e[l].onBand,u.tickValue=e[l].tickValue}return r}function vZ(e,t,n){if(vQ(e)){var i=e.axisLabelsCreationContext.out.noPxChangeTryDetermine;if(n.noPxChange){for(var o=!0,r=0;r<i.length;r++)o=o&&i[r]();if(o)return!1}i.length&&(t.remove(e.labelGroup),v0(e,null,null,null))}return!0}function vQ(e){return!!e.labelLayoutList}function v0(e,t,n,i){e.labelLayoutList=t,e.labelGroup=n,e.axisLabelsCreationContext=i}var v1=new ut,v2=new ut;function v5(e,t,n){n=n||{};var i=t.axis,o={},r=i.getAxesOnZeroOf()[0],a=i.position,s=r?"onZero":a,l=i.dim,c=[e.x,e.x+e.width,e.y,e.y+e.height],d={left:0,right:1,top:0,bottom:1,onZero:2},u=t.get("offset")||0,m="x"===l?[c[2]-u,c[3]+u]:[c[0]-u,c[1]+u];if(r){var f=r.toGlobalCoord(r.dataToCoord(0));m[d.onZero]=Math.max(Math.min(f,m[1]),m[0])}o.position=["y"===l?m[d[s]]:c[0],"x"===l?m[d[s]]:c[3]],o.rotation=Math.PI/2*("x"!==l),o.labelDirection=o.tickDirection=o.nameDirection=({top:-1,bottom:1,left:-1,right:1})[a],o.labelOffset=r?m[d[a]]-m[d.onZero]:0,t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),rW(n.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var p=t.get(["axisLabel","rotate"]);return o.labelRotate="top"===s?-p:p,o.z2=1,o}function v3(e){var t={xAxisModel:null,yAxisModel:null};return rM(t,function(n,i){var o=i.replace(/Model$/,""),r=e.getReferringComponents(o,cA).models[0];t[i]=r}),t}var v4=[[3,1],[0,2]],v6=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=va,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;function i(e){var t,n=rS(e),i=n.length;if(i){for(var o=[],r=i-1;r>=0;r--){var a=e[+n[r]],s=a.model,l=a.scale;yp(l)&&s.get("alignTicks")&&null==s.get("interval")?o.push(a):(y6(l,s),yp(l)&&(t=a))}o.length&&(t||y6((t=o.pop()).scale,t.model),rM(o,function(e){!function(e,t,n){var i=yE.prototype,o=i.getTicks.call(n),r=i.getTicks.call(n,{expandToNicedExtent:!0}),a=o.length-1,s=i.getInterval.call(n),l=y4(e,t),c=l.extent,d=l.fixMin,u=l.fixMax;"log"===e.type&&(c=yx(e.base,c,!0)),e.setBreaksFromOption(vo(t)),e.setExtent(c[0],c[1]),e.calcNiceExtent({splitNumber:a,fixMin:d,fixMax:u});var m=i.getExtent.call(e);d&&(c[0]=m[0]),u&&(c[1]=m[1]);var f=i.getInterval.call(e),p=c[0],h=c[1];if(d&&u)f=(h-p)/a;else if(d)for(h=c[0]+f*a;h<c[1]&&isFinite(h)&&isFinite(c[1]);)f=yh(f),h=c[0]+f*a;else if(u)for(p=c[1]-f*a;p>c[0]&&isFinite(p)&&isFinite(c[0]);)f=yh(f),p=c[1]-f*a;else{e.getTicks().length-1>a&&(f=yh(f));var b=f*a;(p=ce((h=Math.ceil(c[1]/f)*f)-b))<0&&c[0]>=0?(p=0,h=ce(b)):h>0&&c[1]<=0&&(h=0,p=-ce(b))}var g=(o[0].value-r[0].value)/s,_=(o[a].value-r[a].value)/s;i.setExtent.call(e,p+f*g,h+f*_),i.setInterval.call(e,f),(g||_)&&i.setNiceExtent.call(e,p+f,h-f)}(e.scale,e.model,t.scale)}))}}this._updateScale(e,this.model),i(n.x),i(n.y);var o={};rM(n.x,function(e){v7(n,"y",e,o)}),rM(n.y,function(e){v7(n,"x",e,o)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var i=fn(e,t),o=this._rect=fe(e.getBoxLayoutParams(),i.refContainer),r=this._axesMap,a=this._coordsList,s=e.get("containLabel");if(Fe(r,o),!n){var l=(d=o,u=a,m=r,f=s,p=t,h=new vH(Fo),rM(m,function(e){return rM(e,function(e){vi(e.model)&&(e.axisBuilder=function(e,t,n,i,o,r){for(var a=v5(e,n),s=!1,l=!1,c=0;c<t.length;c++)yp(t[c].getOtherAxis(n.axis).scale)&&(s=l=!0,"category"===n.axis.type&&n.axis.onBand&&(l=!1));return a.axisLineAutoShow=s,a.axisTickAutoShow=l,a.defaultNameMoveOverlap=r,new vG(n,i,a,o)}(d,u,e.model,p,h,!f))})}),h),c=void 0;if(s)eJ?(eJ(this._axesList,o),Fe(r,o)):c=Fn(o.clone(),"axisLabel",null,o,r,l,i);else{var d,u,m,f,p,h,b,g,_,y,v,F,x=(b=e,g=o,_=i,"same"===(v=b.get("outerBoundsMode",!0))?y=g.clone():(null==v||"auto"===v)&&(y=fe(b.get("outerBounds",!0)||_8,_.refContainer)),{outerBoundsRect:y,parsedOuterBoundsContain:null==(F=b.get("outerBoundsContain",!0))||"auto"===F||0>rk(["all","axisLabel"],F)?"all":F,outerBoundsClamp:[l9(rV(b.get("outerBoundsClampWidth",!0),_7["0"]),g.width),l9(rV(b.get("outerBoundsClampHeight",!0),_7["1"]),g.height)]}),w=x.outerBoundsRect,k=x.parsedOuterBoundsContain,E=x.outerBoundsClamp;w&&(c=Fn(w,k,E,o,r,l,i))}Fi(o,r,vu.determine,null,c,i)}rM(this._coordsList,function(e){e.calcAffineTransform()})},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(null!=n)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}rB(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,o=this._coordsList;i<o.length;i++)if(o[i].getAxis("x").index===e||o[i].getAxis("y").index===t)return o[i]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var i=this._findConvertTarget(t);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var i=this._findConvertTarget(t);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t,n,i=e.seriesModel,o=e.xAxisModel||i&&i.getReferringComponents("xAxis",cA).models[0],r=e.yAxisModel||i&&i.getReferringComponents("yAxis",cA).models[0],a=e.gridModel,s=this._coordsList;return i?0>rk(s,t=i.coordinateSystem)&&(t=null):o&&r?t=this.getCartesian(o.componentIndex,r.componentIndex):o?n=this.getAxis("x",o.componentIndex):r?n=this.getAxis("y",r.componentIndex):a&&a.coordinateSystem===this&&(t=this._coordsList[0]),{cartesian:t,axis:n}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var i=this,o=this,r={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},s={x:0,y:0};if(t.eachComponent("xAxis",l("x"),this),t.eachComponent("yAxis",l("y"),this),!s.x||!s.y){this._axesMap={},this._axesList=[];return}function l(t){return function(n,i){if(v8(n,e)){var l=n.get("position");"x"===t?"top"!==l&&"bottom"!==l&&(l=r.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=r.left?"right":"left"),r[l]=!0;var c=new vT(t,function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new yk({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new yW({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(yw.getClass(t)||yE)}}(n),[0,0],n.get("type"),l),d="category"===c.type;c.onBand=d&&n.get("boundaryGap"),c.inverse=n.get("inverse"),n.axis=c,c.model=n,c.grid=o,c.index=i,o._axesList.push(c),a[t][i]=c,s[t]++}}}this._axesMap=a,rM(a.x,function(t,n){rM(a.y,function(o,r){var a="x"+n+"y"+r,s=new vl(a);s.master=i,s.model=e,i._coordsMap[a]=s,i._coordsList.push(s),s.addAxis(t),s.addAxis(o)})})},e.prototype._updateScale=function(e,t){function n(e,t){rM(vt(e,t.dim),function(n){t.scale.unionExtentFromData(e,n)})}rM(this._axesList,function(e){if(e.scale.setExtent(1/0,-1/0),"category"===e.type){var t=e.model.get("categorySortInfo");e.scale.setSortInfo(t)}}),e.eachSeries(function(e){if(e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type){var i=v3(e),o=i.xAxisModel,r=i.yAxisModel;if(v8(o,t)&&v8(r,t)){var a=this.getCartesian(o.componentIndex,r.componentIndex),s=e.getData(),l=a.getAxis("x"),c=a.getAxis("y");n(s,l),n(s,c)}}},this)},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return rM(this.getCartesians(),function(i){var o=null!=e&&"auto"!==e?i.getAxis(e):i.getBaseAxis(),r=i.getOtherAxis(o);0>rk(t,o)&&t.push(o),0>rk(n,r)&&n.push(r)}),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var i=[];return t.eachComponent("grid",function(o,r){var a=new e(o,t,n);a.name="grid_"+r,a.resize(o,n,!0),o.coordinateSystem=a,i.push(a)}),t.eachSeries(function(e){!function(e){var t=e.targetModel,n=e.coordSysType,i=e.coordSysProvider,o=e.isDefaultDataCoordSys;e.allowNotFound;var r=function(e,t){var n=e.getShallow("coordinateSystem"),i=e.getShallow("coordinateSystemUsage",!0),o=m6.none;if(n){var r="series"===e.mainType;(null==i&&(i=r?"data":"box"),"data"===i)?(o=m6.dataCoordSys,r||(o=m6.none)):"box"!==i||(o=m6.boxCoordSys,r||m1[n])||(o=m6.none)}return{coordSysType:n,kind:o}}(t,0),a=r.kind,s=r.coordSysType;if(o&&a!==m6.dataCoordSys&&(a=m6.dataCoordSys,s=n),a!==m6.none&&s===n){var l=i(n,t);l&&(a===m6.dataCoordSys?t.coordinateSystem=l:t.boxCoordinateSystem=l)}}({targetModel:e,coordSysType:"cartesian2d",coordSysProvider:function(){var t=v3(e),n=t.xAxisModel,i=t.yAxisModel;return n.getCoordSysModel().coordinateSystem.getCartesian(n.componentIndex,i.componentIndex)}})}),i},e.dimensions=va,e}();function v8(e,t){return e.getCoordSysModel()===t}function v7(e,t,n,i){n.getAxesOnZeroOf=function(){return o?[o]:[]};var o,r=e[t],a=n.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)v9(r[l])&&(o=r[l]);else for(var c in r)if(r.hasOwnProperty(c)&&v9(r[c])&&!i[d(r[c])]){o=r[c];break}o&&(i[d(o)]=!0)}function d(e){return e.dim+"_"+e.index}}function v9(e){var t,n,i;return e&&"category"!==e.type&&"time"!==e.type&&(n=(t=e.scale.getExtent())[0],i=t[1],!(n>0&&i>0||n<0&&i<0))}function Fe(e,t){rM(e.x,function(e){return Ft(e,t.x,t.width)}),rM(e.y,function(e){return Ft(e,t.y,t.height)})}function Ft(e,t,n){var i,o,r=[0,n],a=+!!e.inverse;e.setExtent(r[a],r[1-a]),o=(i=e.getExtent())[0]+i[1],e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return o-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return o-e+t}}function Fn(e,t,n,i,o,r,a){Fi(i,o,vu.estimate,t,!1,a);var s=[0,0,0,0];c(0),c(1),d(i,0,NaN),d(i,1,NaN);var l=null==function(e,t,n){if(e&&t){for(var i=0,o=e.length;i<o;i++)if(t.call(void 0,e[i],i,e))return e[i]}}(s,function(e){return e>0});return b0(i,s,!0,!0,n),Fe(o,i),l;function c(e){rM(o[bD[e]],function(t){if(vi(t.model)){var n=r.ensureRecord(t.model),i=n.labelInfoList;if(i)for(var o=0;o<i.length;o++){var a=i[o],s=t.scale.normalize(vN(a.label).tickValue);s=1===e?1-s:s,d(a.rect,e,s),d(a.rect,1-e,NaN)}var l=n.nameLayout;if(l){var s=vn(n.nameLocation)?.5:NaN;d(l.rect,e,s),d(l.rect,1-e,NaN)}}})}function d(t,n,i){var o=e[bD[n]]-t[bD[n]],r=t[bS[n]]+t[bD[n]]-(e[bS[n]]+e[bD[n]]);o=u(o,1-i),r=u(r,i);var a=v4[n][0],l=v4[n][1];s[a]=l4(s[a],o),s[l]=l4(s[l],r)}function u(e,t){return e>0&&t==t&&t>1e-4&&(e/=t),e}}function Fi(e,t,n,i,o,r){var a=n===vu.determine;rM(t,function(t){return rM(t,function(t){if(vi(t.model)){var n,i;n=t.axisBuilder,i=v5(e,t.model),n.updateCfg(i),t.axisBuilder.build(a?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:o})}})});var s={x:0,y:0};function l(t){s[bD[1-t]]=e[bS[t]]<=.5*r.refContainer[bS[t]]?0:1-t==1?2:1}l(0),l(1),rM(t,function(e,t){return rM(e,function(e){vi(e.model)&&(("all"===i||a)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),a&&e.axisBuilder.build({axisLine:!0}))})})}var Fo=function(e,t,n,i,o,r){var a="x"===n.axis.dim?"y":"x";vU(e,t,n,i,o,r),vn(e.nameLocation)||rM(t.recordMap[a],function(e){e&&e.labelInfoList&&e.dirVec&&vV(e.labelInfoList,e.dirVec,i,o)})};function Fr(e,t){return"all"===e||rO(e)&&rk(e,t)>=0||e===t}function Fa(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[Fl(e)]}function Fs(e){return!!e.get(["handle","show"])}function Fl(e){return e.type+"||"+e.id}var Fc={},Fd=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.prototype.render=function(t,n,i,o){this.axisPointerClass&&function(e){var t=Fa(e);if(t){var n=t.axisPointerModel,i=t.axis.scale,o=n.option,r=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=Fs(n);null==r&&(o.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),o.value=a,s&&(o.status=t.axis.scale.isBlank()?"hide":"show")}}(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,i,!0)},t.prototype.updateAxisPointer=function(e,t,n,i){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,i){var o=t.getAxisPointerClass(this.axisPointerClass);if(o){var r,a=(r=Fa(e))&&r.axisPointerModel;a?(this._axisPointer||(this._axisPointer=new o)).render(e,a,n,i):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){Fc[e]=t},t.getAxisPointerClass=function(e){return e&&Fc[e]},t.type="axis",t}(ha),Fu=ck(),Fm=["splitArea","splitLine","minorSplitLine","breakArea"],Ff=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="CartesianAxisPointer",n}return rt(t,e),t.prototype.render=function(t,n,i,o){this.group.removeAll();var r=this._axisGroup;this._axisGroup=new lQ,this.group.add(this._axisGroup),vi(t)&&(this._axisGroup.add(t.axis.axisBuilder.group),rM(Fm,function(e){t.get([e,"show"])&&Fp[e](this,this._axisGroup,t,t.getCoordSysModel(),i)},this),o&&"changeAxisOrder"===o.type&&o.isInitSort||bq(r,this._axisGroup,t),e.prototype.render.call(this,t,n,i,o))},t.prototype.remove=function(){Fu(this).splitAreaColors=null},t.type="cartesianAxis",t}(Fd),Fp={splitLine:function(e,t,n,i,o){var r=n.axis;if(!r.scale.isBlank()){var a=n.getModel("splitLine"),s=a.getModel("lineStyle"),l=s.get("color"),c=!1!==a.get("showMinLine"),d=!1!==a.get("showMaxLine");l=rO(l)?l:[l];for(var u=i.coordinateSystem.getRect(),m=r.isHorizontal(),f=0,p=r.getTicksCoords({tickModel:a,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),h=[],b=[],g=s.getLineStyle(),_=0;_<p.length;_++){var y=r.toGlobalCoord(p[_].coord);if((0!==_||c)&&(_!==p.length-1||d)){var v=p[_].tickValue;m?(h[0]=y,h[1]=u.y,b[0]=y,b[1]=u.y+u.height):(h[0]=u.x,h[1]=y,b[0]=u.x+u.width,b[1]=y);var F=f++%l.length,x=new h6({anid:null!=v?"line_"+v:null,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:b[0],y2:b[1]},style:rw({stroke:l[F]},g),silent:!0});bj(x.shape,g.lineWidth),t.add(x)}}}},minorSplitLine:function(e,t,n,i,o){var r=n.axis,a=n.getModel("minorSplitLine").getModel("lineStyle"),s=i.coordinateSystem.getRect(),l=r.isHorizontal(),c=r.getMinorTicksCoords();if(c.length)for(var d=[],u=[],m=a.getLineStyle(),f=0;f<c.length;f++)for(var p=0;p<c[f].length;p++){var h=r.toGlobalCoord(c[f][p].coord);l?(d[0]=h,d[1]=s.y,u[0]=h,u[1]=s.y+s.height):(d[0]=s.x,d[1]=h,u[0]=s.x+s.width,u[1]=h);var b=new h6({anid:"minor_line_"+c[f][p].tickValue,autoBatch:!0,shape:{x1:d[0],y1:d[1],x2:u[0],y2:u[1]},style:m,silent:!0});bj(b.shape,m.lineWidth),t.add(b)}},splitArea:function(e,t,n,i,o){!function(e,t,n,i){var o=n.axis;if(!o.scale.isBlank()){var r=n.getModel("splitArea"),a=r.getModel("areaStyle"),s=a.get("color"),l=i.coordinateSystem.getRect(),c=o.getTicksCoords({tickModel:r,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(c.length){var d=s.length,u=Fu(e).splitAreaColors,m=r1(),f=0;if(u)for(var p=0;p<c.length;p++){var h=u.get(c[p].tickValue);if(null!=h){f=(h+(d-1)*p)%d;break}}var b=o.toGlobalCoord(c[0].coord),g=a.getAreaStyle();s=rO(s)?s:[s];for(var p=1;p<c.length;p++){var _=o.toGlobalCoord(c[p].coord),y=void 0,v=void 0,F=void 0,x=void 0;o.isHorizontal()?(y=b,v=l.y,F=_-y,x=l.height,b=y+F):(y=l.x,v=b,F=l.width,x=_-v,b=v+x);var w=c[p-1].tickValue;null!=w&&m.set(w,f),t.add(new ut({anid:null!=w?"area_"+w:null,shape:{x:y,y:v,width:F,height:x},style:rw({fill:s[f]},g),autoBatch:!0,silent:!0})),f=(f+1)%d}Fu(e).splitAreaColors=m}}}(e,t,n,i)},breakArea:function(e,t,n,i,o){n.axis.scale}},Fh=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.type="xAxis",t}(Ff),Fb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=Fh.type,t}return rt(t,e),t.type="yAxis",t}(Ff),Fg=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="grid",t}return rt(t,e),t.prototype.render=function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new ut({shape:e.coordinateSystem.getRect(),style:rw({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(ha),F_={offset:0};function Fy(e){e.registerComponentView(Fg),e.registerComponentModel(_9),e.registerCoordinateSystem("cartesian2d",v6),ym(e,"x",yt,F_),ym(e,"y",yt,F_),e.registerComponentView(Fh),e.registerComponentView(Fb),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}var Fv=ck();function FF(e,t,n,i){!function e(t,n){if(!(rB(t)&&rB(n)))return t===n;var i=!0;return rM(n,function(n,o){i=i&&e(t[o],n)}),!!i}(Fv(n).lastProp,i)&&(Fv(n).lastProp=i,t?bw(n,i,e):(n.stopAnimation(),n.attr(i)))}function Fx(e,t){e[t.get(["label","show"])?"show":"hide"]()}function Fw(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function Fk(e,t,n){var i=t.get("z"),o=t.get("zlevel");e&&e.traverse(function(e){"group"!==e.type&&(null!=i&&(e.z=i),null!=o&&(e.zlevel=o),e.silent=n)})}function FE(e,t,n,i,o){e=t.scale.parse(e);var r=t.scale.getLabel({value:e},{precision:o.precision}),a=o.formatter;if(a){var s={value:y7(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};rM(i,function(e){var t=n.getSeriesByIndex(e.seriesIndex),i=e.dataIndexInside,o=t&&t.getDataParams(i);o&&s.seriesData.push(o)}),rY(a)?r=a.replace("{value}",r):rR(a)&&(r=a(s))}return r}function FT(e,t,n){var i=aL();return aP(i,i,n.rotation),aY(i,i,n.position),bG([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}var FM=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return rt(t,e),t.prototype.makeElOption=function(e,t,n,i,o){var r,a,s,l,c,d,u,m,f,p,h,b,g,_,y,v,F,x,w,k=n.axis,E=k.grid,T=i.get("type"),M=FA(E,k).getOtherAxis(k).getGlobalExtent(),A=k.toGlobalCoord(k.dataToCoord(t,!0));if(T&&"none"!==T){var C,D,S,L=(D=i.get("type"),S=i.getModel(D+"Style"),"line"===D?(C=S.getLineStyle()).fill=null:"shadow"===D&&((C=S.getAreaStyle()).stroke=null),C),I=FC[T](k,A,M);I.style=L,e.graphicKey=I.type,e.pointer=I}var O=v5(E.getRect(),n);u=vG.innerTextLayout(O.rotation,0,O.labelDirection),O.labelMargin=i.get(["label","margin"]),m={position:FT(n.axis,t,O),align:u.textAlign,verticalAlign:u.textVerticalAlign},f=FE(i.get("value"),n.axis,n.ecModel,i.get("seriesDataIndices"),{precision:i.get(["label","precision"]),formatter:i.get(["label","formatter"])}),h=rq((p=i.getModel("label")).get("padding")||0),g=lP(f,b=p.getFont()),_=m.position,y=g.width+h[1]+h[3],v=g.height+h[0]+h[2],"right"===(F=m.align)&&(_[0]-=y),"center"===F&&(_[0]-=y/2),"bottom"===(x=m.verticalAlign)&&(_[1]-=v),"middle"===x&&(_[1]-=v/2),r=_,a=y,s=v,c=(l=o).getWidth(),d=l.getHeight(),r[0]=Math.min(r[0]+a,c)-a,r[1]=Math.min(r[1]+s,d)-s,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0),(w=p.get("backgroundColor"))&&"auto"!==w||(w=n.get(["axisLine","lineStyle","color"])),e.label={x:_[0],y:_[1],style:u8(p,{text:f,font:b,fill:p.getTextColor(),padding:h,backgroundColor:w}),z2:10}},t.prototype.getHandleTransform=function(e,t,n){var i=v5(t.axis.grid.getRect(),t,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=FT(t.axis,e,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,i){var o=n.axis,r=o.grid,a=o.getGlobalExtent(!0),s=FA(r,o).getOtherAxis(o).getGlobalExtent(),l=+("x"!==o.dim),c=[e.x,e.y];c[l]+=t[l],c[l]=Math.min(a[1],c[l]),c[l]=Math.max(a[0],c[l]);var d=(s[1]+s[0])/2,u=[d,d];return u[l]=c[l],{x:c[0],y:c[1],rotation:e.rotation,cursorPoint:u,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},t}(function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,i){var o=t.get("value"),r=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,i||this._lastValue!==o||this._lastStatus!==r){this._lastValue=o,this._lastStatus=r;var a=this._group,s=this._handle;if(!r||"hide"===r){a&&a.hide(),s&&s.hide();return}a&&a.show(),s&&s.show();var l={};this.makeElOption(l,o,e,t,n);var c=l.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var d=this._moveAnimation=this.determineAnimation(e,t);if(a){var u=rI(FF,t,d);this.updatePointerEl(a,l,u),this.updateLabelEl(a,l,u,t)}else a=this._group=new lQ,this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);Fk(a,t,!0),this._renderHandle(o)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get("animation"),i=e.axis,o="category"===i.type,r=t.get("snap");if(!r&&!o)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(o&&i.getBandWidth()>a)return!0;if(r){var s=Fa(e).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},e.prototype.makeElOption=function(e,t,n,i,o){},e.prototype.createPointerEl=function(e,t,n,i){var o=t.pointer;if(o){var r=Fv(e).pointerEl=new ta[o.type](rv(t.pointer));e.add(r)}},e.prototype.createLabelEl=function(e,t,n,i){if(t.label){var o=Fv(e).labelEl=new ub(rv(t.label));e.add(o),Fx(o,i)}},e.prototype.updatePointerEl=function(e,t,n){var i=Fv(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),n(i,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,i){var o=Fv(e).labelEl;o&&(o.setStyle(t.label.style),n(o,{x:t.label.x,y:t.label.y}),Fx(o,i))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,i=this._api.getZr(),o=this._handle,r=n.getModel("handle"),a=n.get("status");if(!r.get("show")||!a||"hide"===a){o&&i.remove(o),this._handle=null;return}this._handle||(t=!0,o=this._handle=bJ(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){aM(e.event)},onmousedown:rL(this._onHandleDragMove,this,0,0),drift:rL(this._onHandleDragMove,this),ondragend:rL(this._onHandleDragEnd,this)}),i.add(o)),Fk(o,n,!1),o.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=r.get("size");rO(s)||(s=[s,s]),o.scaleX=s[0]/2,o.scaleY=s[1]/2,gh(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){FF(this._axisPointerModel,!t&&this._moveAnimation,this._handle,Fw(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(Fw(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(Fw(i)),Fv(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,i=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),gb(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},e}());function FA(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var FC={line:function(e,t,n){var i,o,r;return{type:"Line",subPixelOptimize:!0,shape:(i=[t,n[0]],o=[t,n[1]],{x1:i[r=(r=FD(e))||0],y1:i[1-r],x2:o[r],y2:o[1-r]})}},shadow:function(e,t,n){var i,o,r,a=Math.max(1,e.getBandWidth()),s=n[1]-n[0];return{type:"Rect",shape:(i=[t-a/2,n[0]],o=[a,s],{x:i[r=(r=FD(e))||0],y:i[1-r],width:o[r],height:o[1-r]})}}};function FD(e){return+("x"!==e.dim)}var FS=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:fl.color.border,width:1,type:"dashed"},shadowStyle:{color:fl.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:fl.color.neutral00,padding:[5,7,5,7],backgroundColor:fl.color.accent60,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:fl.color.accent40,throttle:40}},t}(fs),FL=ck();function FI(e,t,n){if(!ri.node){var i=t.getZr();FL(i).records||(FL(i).records={}),function(e,t){FL(e).initialized||(FL(e).initialized=!0,n("click",rI(FR,"click")),n("mousemove",rI(FR,"mousemove")),n("globalout",FO));function n(n,i){e.on(n,function(n){var o,r,a,s,l,c,d,u,m=(o=t,r={showTip:[],hideTip:[]},{dispatchAction:a=function(e){var t=r[e.type];t?t.push(e):(e.dispatchAction=a,o.dispatchAction(e))},pendings:r});rM(FL(e).records,function(e){e&&i(e,n,m.dispatchAction)}),s=m.pendings,l=t,d=s.showTip.length,u=s.hideTip.length,d?c=s.showTip[d-1]:u&&(c=s.hideTip[u-1]),c&&(c.dispatchAction=null,l.dispatchAction(c))})}}(i,t),(FL(i).records[e]||(FL(i).records[e]={})).handler=n}}function FO(e,t,n){e.handler("leave",null,n)}function FR(e,t,n,i){t.handler(e,n,i)}function FY(e,t){if(!ri.node){var n=t.getZr();(FL(n).records||{})[e]&&(FL(n).records[e]=null)}}var FP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.prototype.render=function(e,t,n){var i=t.getComponent("tooltip"),o=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";FI("axisPointer",n,function(e,t,n){"none"!==o&&("leave"===e||o.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){FY("axisPointer",t)},t.prototype.dispose=function(e,t){FY("axisPointer",t)},t.type="axisPointer",t}(ha);function FN(e,t){var n,i=[],o=e.seriesIndex;if(null==o||!(n=t.getSeriesByIndex(o)))return{point:[]};var r=n.getData(),a=cw(r,e);if(null==a||a<0||rO(a))return{point:[]};var s=r.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(e.isStacked){var c=l.getBaseAxis(),d=l.getOtherAxis(c).dim,u=c.dim,m=+("x"===d||"radius"===d),f=r.mapDimension(u),p=[];p[m]=r.get(f,a),p[1-m]=r.get(r.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(p)||[]}else i=l.dataToPoint(r.getValues(rA(l.dimensions,function(e){return r.mapDimension(e)}),a))||[];else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),i=[h.x+h.width/2,h.y+h.height/2]}return{point:i,el:s}}var FB=ck();function FH(e,t,n){var i=e.currTrigger,o=[e.x,e.y],r=e.dispatchAction||rL(n.dispatchAction,n),a=t.getComponent("axisPointer").coordSysAxesInfo;if(a){FV(o)&&(o=FN({seriesIndex:e.seriesIndex,dataIndex:e.dataIndex},t).point);var s,l,c,d,u,m,f,p,h,b,g,_=FV(o),y=e.axesInfo,v=a.axesInfo,F="leave"===i||FV(o),x={},w={},k={list:[],map:{}},E={showPointer:rI(Fj,w),showTooltip:rI(FU,k)};rM(a.coordSysMap,function(e,t){var n=_||e.containPoint(o);rM(a.coordSysAxesInfo[t],function(e,t){var i=e.axis,r=function(e,t){for(var n=0;n<(e||[]).length;n++){var i=e[n];if(t.axis.dim===i.axisDim&&t.axis.model.componentIndex===i.axisIndex)return i}}(y,e);if(!F&&n&&(!y||r)){var a=r&&r.value;null!=a||_||(a=i.pointToData(o)),null!=a&&Fz(e,a,E,!1,x)}})});var T={};return rM(v,function(e,t){var n=e.linkGroup;n&&!w[t]&&rM(n.axesInfo,function(t,i){var o=w[i];if(t!==e&&o){var r=o.value;n.mapper&&(r=e.axis.scale.parse(n.mapper(r,FW(t),FW(e)))),T[e.key]=r}})}),rM(T,function(e,t){Fz(v[t],e,E,!0,x)}),s=w,l=v,c=x.axesInfo=[],rM(l,function(e,t){var n=e.axisPointerModel.option,i=s[t];i?(e.useHandle||(n.status="show"),n.value=i.value,n.seriesDataIndices=(i.payloadBatch||[]).slice()):e.useHandle||(n.status="hide"),"show"===n.status&&c.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:n.value})}),function(e,t,n,i){if(FV(t)||!e.list.length)return i({type:"hideTip"});var o=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:e.list})}(k,o,e,r),d=v,m=(u=n).getZr(),f="axisPointerLastHighlights",p=FB(m)[f]||{},h=FB(m)[f]={},rM(d,function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&rM(n.seriesDataIndices,function(e){h[e.seriesIndex+" | "+e.dataIndex]=e})}),b=[],g=[],rM(p,function(e,t){h[t]||g.push(e)}),rM(h,function(e,t){p[t]||b.push(e)}),g.length&&u.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:g}),b.length&&u.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:b}),x}}function Fz(e,t,n,i,o){var r=e.axis;if(!r.scale.isBlank()&&r.containData(t)){if(!e.involveSeries)return void n.showPointer(e,t);var a,s,l,c,d,u,m,f,p=(a=t,c=(l=(s=e).axis).dim,d=a,u=[],m=Number.MAX_VALUE,f=-1,rM(s.seriesModels,function(e,t){var n,i,o=e.getData().mapDimensionsAll(c);if(e.getAxisTooltipData){var r=e.getAxisTooltipData(o,a,l);i=r.dataIndices,n=r.nestestValue}else{if(!(i=e.indicesOfNearest(c,o[0],a,"category"===l.type?.5:null)).length)return;n=e.getData().get(o[0],i[0])}if(null!=n&&isFinite(n)){var s=a-n,p=Math.abs(s);p<=m&&((p<m||s>=0&&f<0)&&(m=p,f=s,d=n,u.length=0),rM(i,function(t){u.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:u,snapToValue:d}),h=p.payloadBatch,b=p.snapToValue;h[0]&&null==o.seriesIndex&&rx(o,h[0]),!i&&e.snap&&r.containData(b)&&null!=b&&(t=b),n.showPointer(e,t,h),n.showTooltip(e,p,b)}}function Fj(e,t,n,i){e[t.key]={value:n,payloadBatch:i}}function FU(e,t,n,i){var o=n.payloadBatch,r=t.axis,a=r.model,s=t.axisPointerModel;if(t.triggerTooltip&&o.length){var l=t.coordSys.model,c=Fl(l),d=e.map[c];d||(d=e.map[c]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(d)),d.dataByAxis.push({axisDim:r.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:o.slice()})}}function FW(e){var t=e.axis.model,n={},i=n.axisDim=e.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=t.componentIndex,n.axisName=n[i+"AxisName"]=t.name,n.axisId=n[i+"AxisId"]=t.id,n}function FV(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function FG(e){Fd.registerAxisPointerClass("CartesianAxisPointer",FM),e.registerComponentModel(FS),e.registerComponentView(FP),e.registerPreprocessor(function(e){if(e){e.axisPointer&&0!==e.axisPointer.length||(e.axisPointer={});var t=e.axisPointer.link;t&&!rO(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(e,t){var n,i,o,r,a,s,l,c,d;e.getComponent("axisPointer").coordSysAxesInfo=(i=n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}},o=e,r=t,a=o.getComponent("tooltip"),l=(s=o.getComponent("axisPointer")).get("link",!0)||[],c=[],rM(r.getCoordinateSystems(),function(e){if(e.axisPointerEnabled){var t=Fl(e.model),n=i.coordSysAxesInfo[t]={};i.coordSysMap[t]=e;var r=e.model.getModel("tooltip",a);if(rM(e.getAxes(),rI(f,!1,null)),e.getTooltipAxes&&a&&r.get("show")){var d="axis"===r.get("trigger"),u="cross"===r.get(["axisPointer","type"]),m=e.getTooltipAxes(r.get(["axisPointer","axis"]));(d||u)&&rM(m.baseAxes,rI(f,!u||"cross",d)),u&&rM(m.otherAxes,rI(f,"cross",!1))}}function f(t,a,d){var u=d.model.getModel("axisPointer",s),m=u.get("show");if(m&&("auto"!==m||t||Fs(u))){null==a&&(a=u.get("triggerTooltip"));var f=(u=t?function(e,t,n,i,o,r){var a=t.getModel("axisPointer"),s={};rM(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(e){s[e]=rv(a.get(e))}),s.snap="category"!==e.type&&!!r,"cross"===a.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===o){var c=a.get(["label","show"]);if(l.show=null==c||c,!r){var d=s.lineStyle=a.get("crossStyle");d&&rw(l,d.textStyle)}}return e.model.getModel("axisPointer",new mh(s,n,i))}(d,r,s,o,t,a):u).get("snap"),p=u.get("triggerEmphasis"),h=Fl(d.model),b=a||f||"category"===d.type,g=i.axesInfo[h]={key:h,axis:d,coordSys:e,axisPointerModel:u,triggerTooltip:a,triggerEmphasis:p,involveSeries:b,snap:f,useHandle:Fs(u),seriesModels:[],linkGroup:null};n[h]=g,i.seriesInvolved=i.seriesInvolved||b;var _=function(e,t){for(var n=t.model,i=t.dim,o=0;o<e.length;o++){var r=e[o]||{};if(Fr(r[i+"AxisId"],n.id)||Fr(r[i+"AxisIndex"],n.componentIndex)||Fr(r[i+"AxisName"],n.name))return o}}(l,d);if(null!=_){var y=c[_]||(c[_]={axesInfo:{}});y.axesInfo[h]=g,y.mapper=l[_].mapper,g.linkGroup=y}}}}),n.seriesInvolved&&(d=n,e.eachSeries(function(e){var t=e.coordinateSystem,n=e.get(["tooltip","trigger"],!0),i=e.get(["tooltip","show"],!0);t&&t.model&&"none"!==n&&!1!==n&&"item"!==n&&!1!==i&&!1!==e.get(["axisPointer","show"],!0)&&rM(d.coordSysAxesInfo[Fl(t.model)],function(n){var i=n.axis;t.getAxis(i.dim)===i&&(n.seriesModels.push(e),null==n.seriesDataCount&&(n.seriesDataCount=0),n.seriesDataCount+=e.getData().count())})})),n)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},FH)}var F$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:fl.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:fl.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:fl.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:fl.color.tertiary,fontSize:14}},t}(fs);function Fq(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function FX(e){if(ri.domSupported){for(var t=document.documentElement.style,n=0,i=e.length;n<i;n++)if(e[n]in t)return e[n]}}var FK=FX(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function FJ(e,t){if(!e)return t;t=mX(t,!0);var n=e.indexOf(t);return(e=-1===n?t:"-"+e.slice(0,n)+"-"+t).toLowerCase()}var FZ=FJ(FX(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),FQ=FJ(FK,"transform"),F0="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(ri.transform3dSupported?"will-change:transform;":"");function F1(e,t,n){var i=e.toFixed(0)+"px",o=t.toFixed(0)+"px";if(!ri.transformSupported)return n?"top:"+o+";left:"+i+";":[["top",o],["left",i]];var r=ri.transform3dSupported,a="translate"+(r?"3d":"")+"("+i+","+o+(r?",0":"")+")";return n?"top:0;left:0;"+FQ+":"+a+";":[["top",0],["left",0],[FK,a]]}function F2(e,t,n,i,o){var r=t&&t.painter;if(n){var a=r&&r.getViewportRoot();a&&ah(ap,a,i,o,!0)&&ah(e,n,ap[0],ap[1])}else{e[0]=i,e[1]=o;var s=r&&r.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var F5=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,ri.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=e.getZr(),o=t.appendTo,r=o&&(rY(o)?document.querySelector(o):rj(o)?o:rR(o)&&o(e.getDom()));F2(this._styleCoord,i,r,e.getWidth()/2,e.getHeight()/2),(r||e.getDom()).appendChild(n),this._api=e,this._container=r;var a=this;n.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!a._enterable){var t=i.handler;aT(i.painter.getViewportRoot(),e,!0),t.dispatch("mousemove",e)}},n.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t,n,i=this._api.getDom(),o=(t="position",(n=i.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(i))?t?n[t]:n:null),r=i.style;"absolute"!==r.position&&"absolute"!==o&&(r.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n,i,o,r,a,s,l,c,d,u,m,f,p,h,b,g,_,y,v,F,x,w,k,E,T=this.el,M=T.style,A=this._styleCoord;T.innerHTML?M.cssText=F0+(n=!this._firstShow,i=this._longHide,o=this._enableDisplayTransition,r=[],a=e.get("transitionDuration"),s=e.get("backgroundColor"),l=e.get("shadowBlur"),c=e.get("shadowColor"),d=e.get("shadowOffsetX"),u=e.get("shadowOffsetY"),m=e.getModel("textStyle"),f=p5(e,"html"),p=d+"px "+u+"px "+l+"px "+c,r.push("box-shadow:"+p),n&&a>0&&r.push((h="cubic-bezier(0.23,1,0.32,1)",b="",g="",o&&(g="opacity"+(b=" "+a/2+"s "+h)+",visibility"+b),i||(b=" "+a+"s "+h,g+=(g.length?",":"")+(ri.transformSupported?""+FQ+b:",left"+b+",top"+b)),FZ+":"+g)),s&&r.push("background-color:"+s),rM(["width","color","radius"],function(t){var n="border-"+t,i=mX(n),o=e.get(i);null!=o&&r.push(n+":"+o+("color"===t?"":"px"))}),r.push((_=[],y=m.get("fontSize"),(v=m.getTextColor())&&_.push("color:"+v),_.push("font:"+m.getFont()),F=rV(m.get("lineHeight"),Math.round(3*y/2)),y&&_.push("line-height:"+F+"px"),x=m.get("textShadowColor"),w=m.get("textShadowBlur")||0,k=m.get("textShadowOffsetX")||0,E=m.get("textShadowOffsetY")||0,x&&w&&_.push("text-shadow:"+k+"px "+E+"px "+w+"px "+x),rM(["decoration","align"],function(e){var t=m.get(e);t&&_.push("text-"+e+":"+t)}),_.join(";"))),null!=f&&r.push("padding:"+rq(f).join("px ")+"px"),r.join(";")+";")+F1(A[0],A[1],!0)+"border-color:"+m0(t)+";"+(e.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):M.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,i,o){var r=this.el;if(null==e){r.innerHTML="";return}var a="";if(rY(o)&&"item"===n.get("trigger")&&!Fq(n)&&(a=function(e,t,n){if(!rY(n)||"inside"===n)return"";var i,o,r=e.get("backgroundColor"),a=e.get("borderWidth");t=m0(t);var s=i="left"===(i=n)?"right":"right"===i?"left":"top"===i?"bottom":"top",l=Math.max(1.5*Math.round(a),6),c="",d=FQ+":";rk(["left","right"],s)>-1?(c+="top:50%",d+="translateY(-50%) rotate("+(o="left"===s?-225:-45)+"deg)"):(c+="left:50%",d+="translateX(-50%) rotate("+(o="top"===s?225:45)+"deg)");var u=o*Math.PI/180,m=l+a,f=m*Math.abs(Math.cos(u))+m*Math.abs(Math.sin(u));c+=";"+s+":-"+Math.round(((f-Math.SQRT2*a)/2+Math.SQRT2*a-(f-m)/2)*100)/100+"px";var p=t+" solid "+a+"px;";return'<div style="'+["position:absolute;width:"+l+"px;height:"+l+"px;z-index:-1;",c+";"+d+";","border-bottom:"+p,"border-right:"+p,"background-color:"+r+";"].join("")+'"></div>'}(n,i,o)),rY(e))r.innerHTML=e+a;else if(e){r.innerHTML="",rO(e)||(e=[e]);for(var s=0;s<e.length;s++)rj(e[s])&&e[s].parentNode!==r&&r.appendChild(e[s]);if(a&&r.childNodes.length){var l=document.createElement("div");l.innerHTML=a,r.appendChild(l)}}},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},e.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(F2(n,this._zr,this._container,e,t),null!=n[0]&&null!=n[1]){var i=this.el.style;rM(F1(n[0],n[1]),function(e){i[e[0]]=e[1]})}}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility="hidden",t.opacity="0"):t.display="none",ri.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(rL(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;!function(e,t){function n(e){var t=e[af];t&&(t.clearMarkers&&t.clearMarkers(),delete e[af])}e&&n(e),t&&n(t)}(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var n=t.parentNode;n&&n.removeChild(t)}this.el=this._container=null},e}(),F3=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),F8(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,i,o){var r=this;rB(e)&&pa(""),this.el&&this._zr.remove(this.el);var a=n.getModel("textStyle");this.el=new ub({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:p5(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),rM(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(e){r.el.style[e]=n.get(e)}),rM(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(e){r.el.style[e]=a.get(e)||0}),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})},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=F6(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var i=this._styleCoord;F8(i,this._zr,e,t),e=i[0],t=i[1];var o=n.style,r=F4(o.borderWidth||0),a=F6(o);n.x=e+r+a.left,n.y=t+r+a.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(rL(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function F4(e){return Math.max(0,e)}function F6(e){var t=F4(e.shadowBlur||0),n=F4(e.shadowOffsetX||0),i=F4(e.shadowOffsetY||0);return{left:F4(t-n),right:F4(t+n),top:F4(t-i),bottom:F4(t+i)}}function F8(e,t,n,i){e[0]=n,e[1]=i,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var F7=new ut({shape:{x:-1,y:-1,width:2,height:2}}),F9=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.prototype.init=function(e,t){if(!ri.node&&t.getDom()){var n,i=e.getComponent("tooltip"),o=this._renderMode="auto"===(n=i.get("renderMode"))?ri.domSupported?"html":"richText":n||"html";this._tooltipContent="richText"===o?new F3(t):new F5(t,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},t.prototype.render=function(e,t,n){if(!ri.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var i=this._tooltipContent;i.update(e),i.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&e.get("transitionDuration")?gh(this,"_updatePosition",50,"fixRate"):gb(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");FI("itemTooltip",this._api,rL(function(t,n,i){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,i):"leave"===t&&this._hide(i))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,i=e.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){n.isDisposed()||o.manuallyShowTip(e,t,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,i){if(i.from!==this.uid&&!ri.node&&n.getDom()){var o=xt(i,n);this._ticket="";var r=i.dataByCoordSys,a=function(e,t,n){var i,o=cM(e).queryOptionMap,r=o.keys()[0];if(r&&"series"!==r){var a=cD(t,r,o.get(r),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a&&(n.getViewOfComponentModel(a).group.traverse(function(t){var n=ug(t).tooltipConfig;if(n&&n.name===e.name)return i=t,!0}),i))return{componentMainType:r,componentIndex:a.componentIndex,el:i}}}(i,t,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&null!=i.x&&null!=i.y)F7.x=i.x,F7.y=i.y,F7.update(),ug(F7).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:F7},o);else if(r)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:r,tooltipOption:i.tooltipOption},o);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,i))return;var l=FN(i,t),c=l.point[0],d=l.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:l.el,position:i.position,positionDefault:"bottom"},o)}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},o))}},t.prototype.manuallyHideTip=function(e,t,n,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(xt(i,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,i){var o=i.seriesIndex,r=i.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=r&&null!=a){var s=t.getSeriesByIndex(o);if(s&&"axis"===xe([s.getData().getItemModel(r),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:r,position:i.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var i,o,r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if("legend"===ug(n).ssrType)return;this._lastDataByCoordSys=null,gG(n,function(e){if(e.tooltipDisabled)return i=o=null,!0;i||o||(null!=ug(e).dataIndex?i=e:null!=ug(e).tooltipConfig&&(o=e))},!0),i?this._showSeriesItemTooltip(e,i,t):o?this._showComponentItemTooltip(e,o,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=rL(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,i=this._tooltipModel,o=[t.offsetX,t.offsetY],r=xe([t.tooltipOption],i),a=this._renderMode,s=[],l=pK("section",{blocks:[],noHeader:!0}),c=[],d=new p3;rM(e,function(e){rM(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),o=e.value;if(t&&null!=o){var r=FE(o,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),u=pK("section",{header:r,noHeader:!rK(r),sortBlocks:!0,blocks:[]});l.blocks.push(u),rM(e.seriesDataIndices,function(l){var m=n.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,p=m.getDataParams(f);if(!(p.dataIndex<0)){p.axisDim=e.axisDim,p.axisIndex=e.axisIndex,p.axisType=e.axisType,p.axisId=e.axisId,p.axisValue=y7(t.axis,{value:o}),p.axisValueLabel=r,p.marker=d.makeTooltipMarker("item",m0(p.color),a);var h=py(m.formatTooltip(f,!0,null)),b=h.frag;if(b){var g=xe([m],i).get("valueFormatter");u.blocks.push(g?rx({valueFormatter:g},b):b)}h.text&&c.push(h.text),s.push(p)}})}})}),l.blocks.reverse(),c.reverse();var u=t.position,m=p0(l,d,a,r.get("order"),n.get("useUTC"),r.get("textStyle"));m&&c.unshift(m);var f="richText"===a?"\n\n":"<br/>",p=c.join(f);this._showOrMove(r,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(r,u,o[0],o[1],this._tooltipContent,s):this._showTooltipContent(r,p,s,Math.random()+"",o[0],o[1],u,null,d)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var i=this._ecModel,o=ug(t),r=o.seriesIndex,a=i.getSeriesByIndex(r),s=o.dataModel||a,l=o.dataIndex,c=o.dataType,d=s.getData(c),u=this._renderMode,m=e.positionDefault,f=xe([d.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,m?{position:m}:null),p=f.get("trigger");if(null==p||"item"===p){var h=s.getDataParams(l,c),b=new p3;h.marker=b.makeTooltipMarker("item",m0(h.color),u);var g=py(s.formatTooltip(l,!1,c)),_=f.get("order"),y=f.get("valueFormatter"),v=g.frag,F=v?p0(y?rx({valueFormatter:y},v):v,b,u,_,i.get("useUTC"),f.get("textStyle")):g.text,x="item_"+s.name+"_"+l;this._showOrMove(f,function(){this._showTooltipContent(f,F,h,x,e.offsetX,e.offsetY,e.position,e.target,b)}),n({type:"showTip",dataIndexInside:l,dataIndex:d.getRawIndex(l),seriesIndex:r,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var i="html"===this._renderMode,o=ug(t),r=o.tooltipConfig.option||{},a=r.encodeHTMLContent;if(rY(r)){var s=r;r={content:s,formatter:s},a=!0}a&&i&&r.content&&((r=rv(r)).content=ay(r.content));var l=[r],c=this._ecModel.getComponent(o.componentMainType,o.componentIndex);c&&l.push(c),l.push({formatter:r.content});var d=e.positionDefault,u=xe(l,this._tooltipModel,d?{position:d}:null),m=u.get("content"),f=Math.random()+"",p=new p3;this._showOrMove(u,function(){var n=rv(u.get("formatterParams")||{});this._showTooltipContent(u,m,n,f,e.offsetX,e.offsetY,e.position,t,p)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,i,o,r,a,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var c=this._tooltipContent;c.setEnterable(e.get("enterable"));var d=e.get("formatter");a=a||e.get("position");var u=t,m=this._getNearestPoint([o,r],n,e.get("trigger"),e.get("borderColor"),e.get("defaultBorderColor",!0)).color;if(d)if(rY(d)){var f=e.ecModel.get("useUTC"),p=rO(n)?n[0]:n,h=p&&p.axisType&&p.axisType.indexOf("time")>=0;u=d,h&&(u=mL(p.axisValue,u,f)),u=mQ(u,n,!0)}else if(rR(d)){var b=rL(function(t,i){t===this._ticket&&(c.setContent(i,l,e,m,a),this._updatePosition(e,a,o,r,c,n,s))},this);this._ticket=i,u=d(n,i,b)}else u=d;c.setContent(u,l,e,m,a),c.show(e,m),this._updatePosition(e,a,o,r,c,n,s)}},t.prototype._getNearestPoint=function(e,t,n,i,o){return"axis"===n||rO(t)?{color:i||o}:rO(t)?void 0:{color:i||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,i,o,r,a){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var c=o.getSize(),d=e.get("align"),u=e.get("verticalAlign"),m=a&&a.getBoundingRect().clone();if(a&&m.applyTransform(a.transform),rR(t)&&(t=t([n,i],r,o.el,m,{viewSize:[s,l],contentSize:c.slice()})),rO(t))n=l7(t[0],s),i=l7(t[1],l);else if(rB(t)){var f=t;f.width=c[0],f.height=c[1];var p=fe(f,{width:s,height:l});n=p.x,i=p.y,d=null,u=null}else if(rY(t)&&a){var h=function(e,t,n,i){var o=n[0],r=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,c=t.width,d=t.height;switch(e){case"inside":s=t.x+c/2-o/2,l=t.y+d/2-r/2;break;case"top":s=t.x+c/2-o/2,l=t.y-r-a;break;case"bottom":s=t.x+c/2-o/2,l=t.y+d+a;break;case"left":s=t.x-o-a,l=t.y+d/2-r/2;break;case"right":s=t.x+c+a,l=t.y+d/2-r/2}return[s,l]}(t,m,c,e.get("borderWidth"));n=h[0],i=h[1]}else{var b,g,_,y,v,F,x,w,k,E,h=(b=n,g=i,_=o,y=s,v=l,F=d?null:20,x=u?null:20,k=(w=_.getSize())[0],E=w[1],null!=F&&(b+k+F+2>y?b-=k+F:b+=F),null!=x&&(g+E+x>v?g-=E+x:g+=x),[b,g]);n=h[0],i=h[1]}if(d&&(n-=xn(d)?c[0]/2:"right"===d?c[0]:0),u&&(i-=xn(u)?c[1]/2:"bottom"===u?c[1]:0),Fq(e)){var T,M,A,C,D,S,L,I,h=(T=n,M=i,A=o,C=s,D=l,L=(S=A.getSize())[0],I=S[1],T=Math.min(T+L,C)-L,M=Math.min(M+I,D)-I,[T=Math.max(T,0),M=Math.max(M,0)]);n=h[0],i=h[1]}o.moveTo(n,i)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===e.length;return o&&rM(n,function(n,r){var a=n.dataByAxis||[],s=(e[r]||{}).dataByAxis||[];(o=o&&a.length===s.length)&&rM(a,function(e,n){var r=s[n]||{},a=e.seriesDataIndices||[],l=r.seriesDataIndices||[];(o=o&&e.value===r.value&&e.axisType===r.axisType&&e.axisId===r.axisId&&a.length===l.length)&&rM(a,function(e,t){var n=l[t];o=o&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),i&&rM(e.seriesDataIndices,function(e){var n=e.seriesIndex,r=t[n],a=i[n];r&&a&&a.data!==r.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!ri.node&&t.getDom()&&(gb(this,"_updatePosition"),this._tooltipContent.dispose(),FY("itemTooltip",t))},t.type="tooltip",t}(ha);function xe(e,t,n){var i,o=t.ecModel;n?(i=new mh(n,o,o),i=new mh(t.option,i,o)):i=t;for(var r=e.length-1;r>=0;r--){var a=e[r];a&&(a instanceof mh&&(a=a.get("tooltip",!0)),rY(a)&&(a={formatter:a}),a&&(i=new mh(a,i,o)))}return i}function xt(e,t){return e.dispatchAction||rL(t.dispatchAction,t)}function xn(e){return"center"===e||"middle"===e}var xi=["x","y","radius","angle","single"],xo=["cartesian2d","polar","singleAxis"];function xr(e){return e+"Axis"}function xa(e){var t=e.ecModel,n={infoList:[],infoMap:r1()};return e.eachTargetAxis(function(e,i){var o=t.getComponent(xr(e),i);if(o){var r=o.getCoordSysModel();if(r){var a=r.uid,s=n.infoMap.get(a);s||(s={model:r,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(o)}}}),n}var xs=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),xl=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return rt(t,e),t.prototype.init=function(e,t,n){var i=xc(e);this.settledOption=i,this.mergeDefaultAndTheme(e,n),this._doInit(i)},t.prototype.mergeOption=function(e){var t=xc(e);rF(this.option,e,!0),rF(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;rM([["start","startValue"],["end","endValue"]],function(e,i){"value"===this._rangePropMode[i]&&(t[e[0]]=n[e[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),t=this._targetAxisInfoMap=r1();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each(function(e){e.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return rM(xi,function(n){var i=this.getReferringComponents(xr(n),cC);if(i.specified){t=!0;var o=new xs;rM(i.models,function(e){o.add(e.componentIndex)}),e.set(n,o)}},this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,i=!0,o="vertical"===t?"y":"x",r=n.findComponents({mainType:o+"Axis"});if(a(r,o),i){var r=n.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}});a(r,"single")}function a(t,n){var o=t[0];if(o){var r=new xs;if(r.add(o.componentIndex),e.set(n,r),i=!1,"x"===n||"y"===n){var a=o.getReferringComponents("grid",cA).models[0];a&&rM(t,function(e){o.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",cA).models[0]&&r.add(e.componentIndex)})}}}i&&rM(xi,function(t){if(i){var o=n.findComponents({mainType:xr(t),filter:function(e){return"category"===e.get("type",!0)}});if(o[0]){var r=new xs;r.add(o[0].componentIndex),e.set(t,r),i=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){e||(e=t)},this),"y"===e?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");rM([["start","startValue"],["end","endValue"]],function(i,o){var r=null!=e[i[0]],a=null!=e[i[1]];r&&!a?t[o]="percent":!r&&a?t[o]="value":n?t[o]=n[o]:r&&(t[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(t,n){null==e&&(e=this.ecModel.getComponent(xr(t),n))},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,i){rM(n.indexList,function(n){e.call(t,i,n)})})},t.prototype.getAxisProxy=function(e,t){var n=this.getAxisModel(e,t);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(xr(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;rM([["start","startValue"],["end","endValue"]],function(i){(null!=e[i[0]]||null!=e[i[1]])&&(t[i[0]]=n[i[0]]=e[i[0]],t[i[1]]=n[i[1]]=e[i[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;rM(["start","startValue","end","endValue"],function(n){t[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,n=this._targetAxisInfoMap.keys(),i=0;i<n.length;i++)for(var o=n[i],r=this._targetAxisInfoMap.get(o),a=0;a<r.indexList.length;a++){var s=this.getAxisProxy(o,r.indexList[a]);if(s.hostedBy(this))return s;t||(t=s)}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(fs);function xc(e){var t={};return rM(["start","end","startValue","endValue","throttle"],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}var xd=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.type="dataZoom.inside",t.defaultOption=m_(xl.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(xl),xu=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.prototype.render=function(e,t,n,i){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type="dataZoom",t}(ha);function xm(e,t,n,i,o,r){e=e||0;var a,s=n[1]-n[0];if(null!=o&&(o=xp(o,[0,s])),null!=r&&(r=Math.max(r,null!=o?o:0)),"all"===i){var l=Math.abs(t[1]-t[0]);l=xp(l,[0,s]),o=r=xp(l,[o,r]),i=0}t[0]=xp(t[0],n),t[1]=xp(t[1],n);var c=xf(t,i);t[i]+=e;var d=o||0,u=n.slice();return c.sign<0?u[0]+=d:u[1]-=d,t[i]=xp(t[i],u),a=xf(t,i),null!=o&&(a.sign!==c.sign||a.span<o)&&(t[1-i]=t[i]+c.sign*o),a=xf(t,i),null!=r&&a.span>r&&(t[1-i]=t[i]+a.sign*r),t}function xf(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function xp(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var xh=ck();_Z({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},r4);var xb={axisPointer:1,tooltip:1,brush:1},xg=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var i=rL(n._mousedownHandler,n),o=rL(n._mousemoveHandler,n),r=rL(n._mouseupHandler,n),a=rL(n._mousewheelHandler,n),s=rL(n._pinchHandler,n);return n.enable=function(e,n){var l=n.zInfo,c=ge(l.component),d=c.z,u=c.zlevel,m={component:l.component,z:d,zlevel:u,z2:rV(l.z2,-1/0)},f=rx({},n.triggerInfo);this._opt=rw(rx({},n),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:m,triggerInfo:f}),null==e&&(e=!0),this._enabled&&this._controlType===e||(this._enabled=!0,this.disable(),(!0===e||"move"===e||"pan"===e)&&(xF(t,"mousedown",i,m),xF(t,"mousemove",o,m),xF(t,"mouseup",r,m)),(!0===e||"scale"===e||"zoom"===e)&&(xF(t,"mousewheel",a,m),xF(t,"pinch",s,m)))},n.disable=function(){this._enabled=!1,xx(t,"mousedown",i),xx(t,"mousemove",o),xx(t,"mouseup",r),xx(t,"mousewheel",a),xx(t,"pinch",s)},n}return rt(t,e),t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(e,t,n){var i=this._opt,o=i.zInfoParsed;if(function(e,t,n){var i=t.getComponentByElement(e.topTarget);if(!i||i===n||xb.hasOwnProperty(i.mainType))return!1;var o=i.coordinateSystem;if(!o||o.model===n)return!1;var r=ge(i),a=ge(n);return!(0>=(r.zlevel-a.zlevel||r.z-a.z))}(e,i.api,o.component))return!1;var r=i.triggerInfo,a=r.roamTrigger,s=!1;return"global"===a&&(s=!0),s||(s=r.isInSelf(e,t,n)),s&&r.isInClip&&!r.isInClip(e,t,n)&&(s=!1),s},t.prototype._decideCursorStyle=function(e,t,n,i){var o=e.target;return!o&&this._checkPointer(e,t,n)?"grab":i?o&&o.cursor||"default":void 0},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!(aA(e)||x_(e))){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,i=e.offsetY;this._checkPointer(e,n,i)&&(this._x=n,this._y=i,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){var t=this._zr;if(!("pinch"===e.gestureEvent||xh(t).globalPan||x_(e))){var n=e.offsetX,i=e.offsetY;if(!this._dragging||!xk("moveOnMouseMove",e,this._opt)){var o=this._decideCursorStyle(e,n,i,!1);o&&t.setCursorStyle(o);return}t.setCursorStyle("grabbing");var r=this._x,a=this._y,s=n-r,l=i-a;this._x=n,this._y=i,this._opt.preventDefaultMouseMove&&aM(e.event),e.__ecRoamConsumed=!0,xw(this,"pan","moveOnMouseMove",e,{dx:s,dy:l,oldX:r,oldY:a,newX:n,newY:i,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){if(!x_(e)){var t=this._zr;if(!aA(e)){this._dragging=!1;var n=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);n&&t.setCursorStyle(n)}}},t.prototype._mousewheelHandler=function(e){if(!x_(e)){var t=xk("zoomOnMouseWheel",e,this._opt),n=xk("moveOnMouseWheel",e,this._opt),i=e.wheelDelta,o=Math.abs(i),r=e.offsetX,a=e.offsetY;if(0!==i&&(t||n)){if(t){var s=o>3?1.4:o>1?1.2:1.1;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",e,{scale:i>0?s:1/s,originX:r,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:r,originY:a,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(xh(this._zr).globalPan||x_(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,i,o){e._checkPointer(i,o.originX,o.originY)&&(aM(i.event),i.__ecRoamConsumed=!0,xw(e,t,n,i,o))},t}(ac);function x_(e){return e.__ecRoamConsumed}var xy=ck();function xv(e){var t=xy(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function xF(e,t,n,i){for(var o,r,a,s=xv(e).roam,l=s[t]=s[t]||[],c=0;c<l.length;c++){var d=l[c].zInfoParsed;if(0>=(d.zlevel-i.zlevel||d.z-i.z||d.z2-i.z2))break}l.splice(c,0,{listener:n,zInfoParsed:i}),o=e,r=t,(a=xv(o)).uniform[r]||o.on(r,a.uniform[r]=function(e){var t=a.roam[r];if(t)for(var n=0;n<t.length;n++)t[n].listener(e)})}function xx(e,t,n){for(var i=xv(e).roam[t]||[],o=0;o<i.length;o++)if(i[o].listener===n){i.splice(o,1),i.length||function(e,t){var n=xv(e).uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}(e,t);return}}function xw(e,t,n,i,o){o.isAvailableBehavior=rL(xk,null,n,i),e.trigger(t,o)}function xk(e,t,n){var i=n[e];return!e||i&&(!rY(i)||t.event[i+"Key"])}var xE=ck();function xT(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function xM(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function xA(e,t,n,i){return e.coordinateSystem.containPoint([n,i])}var xC=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return rt(t,e),t.prototype.render=function(t,n,i){var o;if(e.prototype.render.apply(this,arguments),t.noTarget())return void this._clear();this.range=t.getPercentRange(),o={pan:rL(xD.pan,this),zoom:rL(xD.zoom,this),scrollMove:rL(xD.scrollMove,this)},xE(i).coordSysRecordMap.each(function(e){var n=e.dataZoomInfoMap.get(t.uid);n&&(n.getRange=o)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){!function(e,t){for(var n=xE(e).coordSysRecordMap,i=n.keys(),o=0;o<i.length;o++){var r=i[o],a=n.get(r),s=a.dataZoomInfoMap;if(s){var l=t.uid;s.get(l)&&(s.removeKey(l),s.keys().length||xT(n,a))}}}(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(xu),xD={zoom:function(e,t,n,i){var o=this.range,r=o.slice(),a=e.axisModels[0];if(a){var s=xL[t](null,[i.originX,i.originY],a,n,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(r[1]-r[0])+r[0],c=Math.max(1/i.scale,0);r[0]=(r[0]-l)*c+l,r[1]=(r[1]-l)*c+l;var d=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(xm(0,r,[0,100],0,d.minSpan,d.maxSpan),this.range=r,o[0]!==r[0]||o[1]!==r[1])return r}},pan:xS(function(e,t,n,i,o,r){var a=xL[i]([r.oldX,r.oldY],[r.newX,r.newY],t,o,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength}),scrollMove:xS(function(e,t,n,i,o,r){return xL[i]([0,0],[r.scrollDelta,r.scrollDelta],t,o,n).signal*(e[1]-e[0])*r.scrollDelta})};function xS(e){return function(t,n,i,o){var r=this.range,a=r.slice(),s=t.axisModels[0];if(s&&(xm(e(a,s,t,n,i,o),a,[0,100],"all"),this.range=a,r[0]!==a[0]||r[1]!==a[1]))return a}}var xL={grid:function(e,t,n,i,o){var r=n.axis,a={},s=o.model.coordinateSystem.getRect();return e=e||[0,0],"x"===r.dim?(a.pixel=t[0]-e[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=r.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=r.inverse?-1:1),a},polar:function(e,t,n,i,o){var r=n.axis,a={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),c=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(a.pixel=t[0]-e[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=r.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=c[1]-c[0],a.pixelStart=c[0],a.signal=r.inverse?-1:1),a},singleAxis:function(e,t,n,i,o){var r=n.axis,a=o.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===r.orient?(s.pixel=t[0]-e[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=r.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=r.inverse?-1:1),s}},xI=function(){function e(e,t,n,i){this._dimName=e,this._axisIndex=t,this.ecModel=i,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(rk(xo,t.get("coordinateSystem"))>=0){var n=xr(this._dimName),i=t.getReferringComponents(n,cA).models[0];i&&this._axisIndex===i.componentIndex&&e.push(t)}},this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return rv(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,n=this._dataExtent,i=this.getAxisModel().axis.scale,o=this._dataZoomModel.getRangePropMode(),r=[0,100],a=[],s=[];rM(["start","end"],function(l,c){var d=e[l],u=e[l+"Value"];"percent"===o[c]?(null==d&&(d=r[c]),u=i.parse(l8(d,r,n))):(t=!0,d=l8(u=null==u?n[c]:i.parse(u),n,r)),s[c]=null==u||isNaN(u)?n[c]:u,a[c]=null==d||isNaN(d)?r[c]:d}),ct(s),ct(a);var l=this._minMaxSpan;function c(e,t,n,o,r){var a=r?"Span":"ValueSpan";xm(0,e,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)t[s]=l8(e[s],n,o,!0),r&&(t[s]=i.parse(t[s]))}return t?c(s,a,n,r,!1):c(a,s,r,n,!0),{valueWindow:s,percentWindow:a}},e.prototype.reset=function(e){if(e===this._dataZoomModel){var t,n,i,o,r,a=this.getTargetSeriesModels();this._dataExtent=(t=this,n=this._dimName,i=[1/0,-1/0],rM(a,function(e){var t;t=e.getData(),t&&rM(vt(t,n),function(e){var n=t.getApproximateExtent(e);n[0]<i[0]&&(i[0]=n[0]),n[1]>i[1]&&(i[1]=n[1])})}),[(r=y5((o=t.getAxisModel()).axis.scale,o,i).calculate()).min,r.max]),this._updateMinMaxSpan();var s=this.calculateDataWindow(e.settledOption);this._valueWindow=s.valueWindow,this._percentWindow=s.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(e,t){if(e===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),o=e.get("filterMode"),r=this._valueWindow;"none"!==o&&rM(i,function(e){var t=e.getData(),i=t.mapDimensionsAll(n);if(i.length){if("weakFilter"===o){var a=t.getStore(),s=rA(i,function(e){return t.getDimensionIndex(e)},t);t.filterSelf(function(e){for(var t,n,o,l=0;l<i.length;l++){var c=a.get(s[l],e),d=!isNaN(c),u=c<r[0],m=c>r[1];if(d&&!u&&!m)return!0;d&&(o=!0),u&&(t=!0),m&&(n=!0)}return o&&t&&n})}else rM(i,function(n){if("empty"===o)e.setData(t=t.map(n,function(e){var t;return(t=e)>=r[0]&&t<=r[1]?e:NaN}));else{var i={};i[n]=r,t.selectRange(i)}});rM(i,function(e){t.setApproximateExtent(r,e)})}})}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;rM(["min","max"],function(i){var o=t.get(i+"Span"),r=t.get(i+"ValueSpan");null!=r&&(r=this.getAxisModel().axis.scale.parse(r)),null!=r?o=l8(n[0]+r,n,[0,100],!0):null!=o&&(r=l8(o,[0,100],n,!0)-n[0]),e[i+"Span"]=o,e[i+"ValueSpan"]=r},this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var i=ci(n,[0,500]);i=Math.min(i,20);var o=e.axis.scale.rawExtentInfo;0!==t[0]&&o.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==t[1]&&o.setDeterminedMinMax("max",+n[1].toFixed(i)),o.freeze()}},e}();let xO={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(i,o){var r=e.getComponent(xr(i),o);t(i,o,r,n)})})}t(function(e,t,n,i){n.__dzAxisProxy=null});var n=[];t(function(t,i,o,r){o.__dzAxisProxy||(o.__dzAxisProxy=new xI(t,i,r,e),n.push(o.__dzAxisProxy))});var i=r1();return rM(n,function(e){rM(e.getTargetSeriesModels(),function(e){i.set(e.uid,e)})}),i},overallReset:function(e,t){e.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(t,n){e.getAxisProxy(t,n).reset(e)}),e.eachTargetAxis(function(n,i){e.getAxisProxy(n,i).filterData(e,t)})}),e.eachComponent("dataZoom",function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getDataPercentWindow(),i=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}};var xR=!1;function xY(e){xR||(xR=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,xO),e.registerAction("dataZoom",function(e,t){rM(function(e,t){var n,i=r1(),o=[],r=r1();e.eachComponent({mainType:"dataZoom",query:t},function(e){r.get(e.uid)||s(e)});do n=!1,e.eachComponent("dataZoom",a);while(n);function a(e){var t;!r.get(e.uid)&&(t=!1,e.eachTargetAxis(function(e,n){var o=i.get(e);o&&o[n]&&(t=!0)}),t)&&(s(e),n=!0)}function s(e){r.set(e.uid,!0),o.push(e),e.eachTargetAxis(function(e,t){(i.get(e)||i.set(e,[]))[t]=!0})}return o}(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})}),e.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function xP(e){xY(e),e.registerComponentModel(xd),e.registerComponentView(xC),e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=xE(t),i=n.coordSysRecordMap||(n.coordSysRecordMap=r1());i.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(e){rM(xa(e).infoList,function(n){var o,r,a,s=n.model.uid,l=i.get(s)||i.set(s,(a=(r={model:o=n.model,containsPoint:rI(xA,o),dispatchAction:rI(xM,t),dataZoomInfoMap:null,controller:null}).controller=new xg(t.getZr()),rM(["pan","zoom","scrollMove"],function(e){a.on(e,function(t){var n=[];r.dataZoomInfoMap.each(function(i){if(t.isAvailableBehavior(i.model.option)){var o=(i.getRange||{})[e],a=o&&o(i.dzReferCoordSysInfo,r.model.mainType,r.controller,t);!i.model.get("disabled",!0)&&a&&n.push({dataZoomId:i.model.id,start:a[0],end:a[1]})}}),n.length&&r.dispatchAction(n)})}),r));(l.dataZoomInfoMap||(l.dataZoomInfoMap=r1())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),i.each(function(e){var n,o,r,a,s,l=e.controller,c=e.dataZoomInfoMap;if(c){var d=c.keys()[0];null!=d&&(s=c.get(d))}if(!s)return void xT(i,e);var u=(o="type_",r={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0,c.each(function(e){var t=e.model,i=!t.get("disabled",!0)&&(!t.get("zoomLock",!0)||"move");r[o+i]>r[o+n]&&(n=i),a=a&&t.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a,api:t,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}});l.enable(u.controlType,u.opt),gh(e,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var xN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=m_(xl.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:fl.color.accent10,borderRadius:0,backgroundColor:fl.color.transparent,dataBackground:{lineStyle:{color:fl.color.accent30,width:.5},areaStyle:{color:fl.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:fl.color.accent40,width:.5},areaStyle:{color:fl.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:fl.color.neutral00,borderColor:fl.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:fl.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:fl.color.tertiary},brushSelect:!0,brushStyle:{color:fl.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:fl.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(xl),xB="horizontal",xH="vertical",xz=["line","bar","candlestick","scatter"],xj={easing:"cubicOut",duration:100,delay:0},xU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return rt(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=rL(this._onBrush,this),this._onBrushEnd=rL(this._onBrushEnd,this)},t.prototype.render=function(t,n,i,o){if(e.prototype.render.apply(this,arguments),gh(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1===t.get("show"))return void this.group.removeAll();if(t.noTarget()){this._clear(),this.group.removeAll();return}o&&"dataZoom"===o.type&&o.from===this.uid||this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){gb(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new lQ;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect"),i=fn(e,t).refContainer,o=this._findCoordRect(),r=e.get("defaultLocationEdgeGap",!0)||0,a=this._orient===xB?{right:i.width-o.x-o.width,top:i.height-30-r-7*!!n,width:o.width,height:30}:{right:r,top:o.y,width:30,height:o.height},s=fr(e.option);rM(["right","top","width","height"],function(e){"ph"===s[e]&&(s[e]=a[e])});var l=fe(s,i);this._location={x:l.x,y:l.y},this._size=[l.width,l.height],this._orient===xH&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),r=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;r.attr(n!==xB||o?n===xB&&o?{scaleY:a?1:-1,scaleX:-1}:n!==xH||o?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=e.getBoundingRect([r]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,i=e.get("brushSelect");n.add(new ut({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new ut({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:rL(this._onClickPanel,this)}),r=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",r.on("mousemove",this._onBrush),r.on("mouseup",this._onBrushEnd)):(r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)),n.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=this._shadowSize||[],i=e.series,o=i.getRawData(),r=i.getShadowDim&&i.getShadowDim(),a=r&&o.getDimensionInfo(r)?i.getShadowDim():e.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(o!==this._shadowData||a!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var c,d=o.getDataExtent(e.thisDim),u=o.getDataExtent(a),m=(u[1]-u[0])*.3;u=[u[0]-m,u[1]+m];var f=[0,t[1]],p=[0,t[0]],h=[[t[0],0],[0,0]],b=[],g=p[1]/Math.max(1,o.count()-1),_=t[0]/(d[1]-d[0]),y="time"===e.thisAxis.type,v=-g,F=Math.round(o.count()/t[0]);o.each([e.thisDim,a],function(e,t,n){if(F>0&&n%F){y||(v+=g);return}v=y?(e-d[0])*_:v+g;var i=null==t||isNaN(t)||""===t,o=i?0:l8(t,u,f,!0);i&&!c&&n?(h.push([h[h.length-1][0],0]),b.push([b[b.length-1][0],0])):!i&&c&&(h.push([v,0]),b.push([v,0])),i||(h.push([v,o]),b.push([v,o])),c=i}),s=this._shadowPolygonPts=h,l=this._shadowPolylinePts=b}this._shadowData=o,this._shadowDim=a,this._shadowSize=[t[0],t[1]];for(var x=this.dataZoomModel,w=0;w<3;w++){var k=function(e){var t=x.getModel(e?"selectedDataBackground":"dataBackground"),n=new lQ,i=new hQ({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),o=new h2({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(o),n}(1===w);this._displayables.sliderGroup.add(k),this._displayables.dataShadowSegs.push(k)}}}},t.prototype._prepareDataShadowInfo=function(){var e,t=this.dataZoomModel,n=t.get("showDataShadow");if(!1!==n){var i=this.ecModel;return t.eachTargetAxis(function(o,r){rM(t.getAxisProxy(o,r).getTargetSeriesModels(),function(t){if(!e&&!(!0!==n&&0>rk(xz,t.get("type")))){var a,s=i.getComponent(xr(o),r).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[o],c=t.coordinateSystem;null!=l&&c.getOtherAxis&&(a=c.getOtherAxis(s).inverse),l=t.getData().mapDimension(l);var d=t.getData().mapDimension(o);e={thisAxis:s,series:t,thisDim:d,otherDim:l,otherAxisInverse:a}}},this)},this),e}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],i=t.handleLabels=[null,null],o=this._displayables.sliderGroup,r=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,c=a.get("brushSelect"),d=t.filler=new ut({silent:c,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});o.add(d),o.add(new ut({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:r[0],height:r[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:fl.color.transparent}})),rM([0,1],function(t){var r=a.get("handleIcon");!g1[r]&&0>r.indexOf("path://")&&0>r.indexOf("image://")&&(r="path://"+r);var s=g3(r,-1,0,2,2,null,!0);s.attr({cursor:"vertical"===this._orient?"ns-resize":"ew-resize",draggable:!0,drift:rL(this._onDragMove,this,t),ondragend:rL(this._onDragEnd,this),onmouseover:rL(this._showDataInfo,this,!0),onmouseout:rL(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),c=a.get("handleSize");this._handleHeight=l7(c,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),uZ(s);var d=a.get("handleColor");null!=d&&(s.style.fill=d),o.add(n[t]=s);var u=a.getModel("textStyle"),m=(a.get("handleLabel")||{}).show||!1;e.add(i[t]=new ub({silent:!0,invisible:!m,style:u8(u,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:u.getTextColor(),font:u.getFont()}),z2:10}))},this);var u=d;if(c){var m=l7(a.get("moveHandleSize"),r[1]),f=t.moveHandle=new ut({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:r[1]-.5,height:m}}),p=.8*m,h=t.moveHandleIcon=g3(a.get("moveHandleIcon"),-p/2,-p/2,p,p,fl.color.neutral00,!0);h.silent=!0,h.y=r[1]+m/2-.5,f.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var b=Math.min(r[1]/2,Math.max(m,10));(u=t.moveZone=new ut({invisible:!0,shape:{y:r[1]-b,height:m+b}})).on("mouseover",function(){s.enterEmphasis(f)}).on("mouseout",function(){s.leaveEmphasis(f)}),o.add(f),o.add(h),o.add(u)}u.attr({draggable:!0,cursor:"default",drift:rL(this._onDragMove,this,"all"),ondragstart:rL(this._showDataInfo,this,!0),ondragend:rL(this._onDragEnd,this),onmouseover:rL(this._showDataInfo,this,!0),onmouseout:rL(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[l8(e[0],[0,100],t,!0),l8(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),r=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];xm(t,i,o,n.get("zoomLock")?"all":e,null!=r.minSpan?l8(r.minSpan,a,o,!0):null,null!=r.maxSpan?l8(r.maxSpan,a,o,!0):null);var s=this._range,l=this._range=ct([l8(i[0],o,a,!0),l8(i[1],o,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,i=ct(n.slice()),o=this._size;rM([0,1],function(e){var i=t.handles[e],r=this._handleHeight;i.attr({scaleX:r/2,scaleY:r/2,x:n[e]+(e?-1:1),y:o[1]/2-r/2})},this),t.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var r={x:i[0],width:i[1]-i[0]};t.moveHandle&&(t.moveHandle.setShape(r),t.moveZone.setShape(r),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",r.x+r.width/2));for(var a=t.dataShadowSegs,s=[0,i[0],i[1],o[0]],l=0;l<a.length;l++){var c=a[l],d=c.getClipPath();d||(d=new ut,c.setClipPath(d)),d.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:o[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,i=n.handleLabels,o=this._orient,r=["",""];if(t.get("showDetail")){var a=t.findRepresentativeAxisProxy();if(a){var s=a.getAxisModel().axis,l=this._range,c=e?a.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:a.getDataValueWindow();r=[this._formatLabel(c[0],s),this._formatLabel(c[1],s)]}}var d=ct(this._handleEnds.slice());function u(e){var t=bV(n.handles[e].parent,this.group),a=b$(0===e?"right":"left",t),s=this._handleWidth/2+5,l=bG([d[e]+(0===e?-s:s),this._size[1]/2],t);i[e].setStyle({x:l[0],y:l[1],verticalAlign:o===xB?"middle":a,align:o===xB?a:"center",text:r[e]})}u.call(this,0),u.call(this,1)},t.prototype._formatLabel=function(e,t){var n=this.dataZoomModel,i=n.get("labelFormatter"),o=n.get("labelPrecision");(null==o||"auto"===o)&&(o=t.getPixelPrecision());var r=null==e||isNaN(e)?"":"category"===t.type||"time"===t.type?t.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(o,20));return rR(i)?i(e,r):rY(i)?i.replace("{value}",r):r},t.prototype._showDataInfo=function(e){var t=(this.dataZoomModel.get("handleLabel")||{}).show||!1,n=this.dataZoomModel.getModel(["emphasis","handleLabel"]).get("show")||!1,i=e||this._dragging?n:t,o=this._displayables,r=o.handleLabels;r[0].attr("invisible",!i),r[1].attr("invisible",!i),o.moveHandle&&this.api[i?"enterEmphasis":"leaveEmphasis"](o.moveHandle,1)},t.prototype._onDragMove=function(e,t,n,i){this._dragging=!0,aM(i.event);var o=bG([t,n],this._displayables.sliderGroup.getLocalTransform(),!0),r=this._updateInterval(e,o[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),r&&a&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),this.dataZoomModel.get("realtime")||this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0)&&!(n[0]>t[0])&&!(n[1]<0)&&!(n[1]>t[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,r=this._updateInterval("all",n[0]-o);this._updateView(),r&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new aB(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape;if(!(new Date-this._brushStartTime<200&&5>Math.abs(n.width))){var i=this._getViewExtent(),o=[0,100],r=this._handleEnds=[n.x,n.x+n.width],a=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();xm(0,r,i,0,null!=a.minSpan?l8(a.minSpan,o,i,!0):null,null!=a.maxSpan?l8(a.maxSpan,o,i,!0):null),this._range=ct([l8(r[0],i,o,!0),l8(r[1],i,o,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(aM(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new ut({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var r=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(e,t),l=a.transformCoordToLocal(r.x,r.y),c=this._size;s[0]=Math.max(Math.min(c[0],s[0]),0),o.setShape({x:l[0],y:0,width:s[0]-l[0],height:c[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?xj:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=xa(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var i=this.api.getWidth(),o=this.api.getHeight();e={x:.2*i,y:.2*o,width:.6*i,height:.6*o}}return e},t.type="dataZoom.slider",t}(xu);function xW(e){e.registerComponentModel(xN),e.registerComponentView(xU),xY(e)}var xV={average:function(e){for(var t=0,n=0,i=0;i<e.length;i++)!isNaN(e[i])&&(t+=e[i],n++);return 0===n?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},xG=function(e){return Math.round(e.length/2)};function x$(e){return null==e?0:e.length||1}function xq(e){return e}var xX=function(){function e(e,t,n,i,o,r){this._old=e,this._new=t,this._oldKeyGetter=n||xq,this._newKeyGetter=i||xq,this.context=o,this._diffModeMultiple="multiple"===r}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},i=Array(e.length),o=Array(t.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(t,n,o,"_newKeyGetter");for(var r=0;r<e.length;r++){var a=i[r],s=n[a],l=x$(s);if(l>1){var c=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(c,r)}else 1===l?(n[a]=null,this._update&&this._update(s,r)):this._remove&&this._remove(r)}this._performRestAdd(o,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},i={},o=[],r=[];this._initIndexMap(e,n,o,"_oldKeyGetter"),this._initIndexMap(t,i,r,"_newKeyGetter");for(var a=0;a<o.length;a++){var s=o[a],l=n[s],c=i[s],d=x$(l),u=x$(c);if(d>1&&1===u)this._updateManyToOne&&this._updateManyToOne(c,l),i[s]=null;else if(1===d&&u>1)this._updateOneToMany&&this._updateOneToMany(c,l),i[s]=null;else if(1===d&&1===u)this._update&&this._update(c,l),i[s]=null;else if(d>1&&u>1)this._updateManyToMany&&this._updateManyToMany(c,l),i[s]=null;else if(d>1)for(var m=0;m<d;m++)this._remove&&this._remove(l[m]);else this._remove&&this._remove(l)}this._performRestAdd(r,i)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var i=e[n],o=t[i],r=x$(o);if(r>1)for(var a=0;a<r;a++)this._add&&this._add(o[a]);else 1===r&&this._add&&this._add(o);t[i]=null}},e.prototype._initIndexMap=function(e,t,n,i){for(var o=this._diffModeMultiple,r=0;r<e.length;r++){var a="_ec_"+this[i](e[r],r);if(o||(n[r]=a),t){var s=t[a],l=x$(s);0===l?(t[a]=r,o&&n.push(a)):1===l?t[a]=[s,r]:s.push(r)}}},e}(),xK=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e}();function xJ(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}let xZ=function(e){this.otherDims={},null!=e&&rx(this,e)};var xQ=rB,x0="undefined"==typeof Int32Array?Array:Int32Array,x1=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],x2=["_approximateExtent"],x5=function(){function e(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,i=!1;yC(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var o={},r=[],a={},s=!1,l={},c=0;c<n.length;c++){var d=n[c],u=rY(d)?new xZ({name:d}):d instanceof xZ?d:new xZ(d),m=u.name;u.type=u.type||"float",u.coordDim||(u.coordDim=m,u.coordDimIndex=0);var f=u.otherDims=u.otherDims||{};r.push(m),o[m]=u,null!=l[m]&&(s=!0),u.createInvertedIndices&&(a[m]=[]);var p=c;rN(u.storeDimIndex)&&(p=u.storeDimIndex),0===f.itemName&&(this._nameDimIdx=p),0===f.itemId&&(this._idDimIdx=p),i&&(u.storeDimIndex=c)}if(this.dimensions=r,this._dimInfos=o,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=a,this._dimOmitted){var h=this._dimIdxToName=r1();rM(r,function(e){h.set(o[e].storeDimIndex,e)})}}return e.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(null==t)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(null!=n)return n;var i=this._schema.getSourceDimension(t);if(i)return i.name},e.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(null!=t)return t;if(null==e)return -1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},e.prototype._recognizeDimIndex=function(e){if(rN(e)||null!=e&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||0>this._schema.getSourceDimensionIndex(e)))return+e},e.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(null==t)return n.encodeFirstDimNotExtra[e];var i=n.encode[e];return i?i[t]:null},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var i,o,r,a,s,l,c,d,u,m,f,p,h,b=this;if(e instanceof pj&&(h=e),!h){var g=this.dimensions,_=f6(e)||rT(e)?new ps(e,g.length):e;h=new pj;var y=rA(g,function(e){return{type:b._dimInfos[e].type,property:e}});h.initData(_,y,n)}this._store=h,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,h.count()),this._dimSummary=(i=this,o=this._schema,a=(r={}).encode={},s=r1(),l=[],c=[],d={},rM(i.dimensions,function(e){var t=i.getDimensionInfo(e),n=t.coordDim;if(n){var o,r=t.coordDimIndex;xJ(a,n)[r]=e,t.isExtraCoord||(s.set(n,1),"ordinal"!==(o=t.type)&&"time"!==o&&(l[0]=e),xJ(d,n)[r]=i.getDimensionIndex(t.name)),t.defaultTooltip&&c.push(e)}fg.each(function(e,n){var i=xJ(a,n),o=t.otherDims[n];null!=o&&!1!==o&&(i[o]=t.name)})}),u=[],m={},s.each(function(e,t){var n=a[t];m[t]=n[0],u=u.concat(n)}),r.dataDimsOnCoord=u,r.dataDimIndicesOnCoord=rA(u,function(e){return i.getDimensionInfo(e).storeDimIndex}),r.encodeFirstDimNotExtra=m,(f=a.label)&&f.length&&(l=f.slice()),(p=a.tooltip)&&p.length?c=p.slice():c.length||(c=l.slice()),a.defaultedLabel=l,a.defaultedTooltip=c,r.userOutput=new xK(d,o),r),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t&&t.length),i=n.start,o=n.end,r=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var a=i;a<o;a++){var s=a-i;this._nameList[a]=t[s],r&&e3(this,a)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var i=this._dimInfos[t[n]];i.ordinalMeta&&e.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return null==this._idDimIdx&&e.getSource().sourceFormat!==fx&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList;if(n.getSource().sourceFormat===f_&&!n.pure)for(var r=[],a=e;a<t;a++){var s,l=n.getItem(a,r);if(!(!this.hasItemOption&&rB(s=l))||s instanceof Array||(this.hasItemOption=!0),l){var c=l.name;null==i[a]&&null!=c&&(i[a]=cv(c,null));var d=l.id;null==o[a]&&null!=d&&(o[a]=cv(d,null))}}if(this._shouldMakeIdFromName())for(var a=e;a<t;a++)e3(this,a);eZ(this)}},e.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){xQ(e)?rx(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return null==n&&null!=this._nameDimIdx&&(n=e0(this,this._nameDimIdx,t)),null==n&&(n=""),n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),i=this._store.getOrdinalMeta(e);return i?i.categories[n]:n},e.prototype.getId=function(e){return eQ(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,i=this._dimInfos[e];if(i)return n.get(i.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,i=this._dimInfos[e];if(i)return n.getByRawIndex(i.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,i=this._store;return rO(e)?i.getValues(rA(e,function(e){return n._getStoreDimIndex(e)}),t):i.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,i=t.length;n<i;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return -1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e],i=n&&n[t];return null==i||isNaN(i)?-1:i},e.prototype.each=function(e,t,n){rR(e)&&(n=t,t=e,e=[]);var i=n||this,o=rA(e1(e),this._getStoreDimIndex,this);this._store.each(o,i?rL(t,i):t)},e.prototype.filterSelf=function(e,t,n){rR(e)&&(n=t,t=e,e=[]);var i=n||this,o=rA(e1(e),this._getStoreDimIndex,this);return this._store=this._store.filter(o,i?rL(t,i):t),this},e.prototype.selectRange=function(e){var t=this,n={},i=rS(e),o=[];return rM(i,function(i){var r=t._getStoreDimIndex(i);n[r]=e[i],o.push(r)}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){rR(e)&&(n=t,t=e,e=[]),n=n||this;var i=[];return this.each(e,function(){i.push(t&&t.apply(this,arguments))},n),i},e.prototype.map=function(e,t,n,i){var o=n||i||this,r=rA(e1(e),this._getStoreDimIndex,this),a=e5(this);return a._store=this._store.map(r,o?rL(t,o):t),a},e.prototype.modify=function(e,t,n,i){var o=n||i||this,r=rA(e1(e),this._getStoreDimIndex,this);this._store.modify(r,o?rL(t,o):t)},e.prototype.downSample=function(e,t,n,i){var o=e5(this);return o._store=this._store.downSample(this._getStoreDimIndex(e),t,n,i),o},e.prototype.minmaxDownSample=function(e,t){var n=e5(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},e.prototype.lttbDownSample=function(e,t){var n=e5(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel;return new mh(this.getRawDataItem(e),t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new xX(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return eQ(e,t)},function(e){return eQ(t,e)})},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},xQ(e)?rx(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],i=n&&n[t];return null==i?this.getVisual(t):i},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var o=i[t];return null==o&&(rO(o=this.getVisual(t))?o=o.slice():xQ(o)&&(o=rx({},o)),i[t]=o),o},e.prototype.setItemVisual=function(e,t,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,xQ(t)?rx(i,t):i[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){xQ(e)?rx(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?rx(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){u_(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){rM(this._graphicEls,function(n,i){n&&e&&e.call(t,n,i)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:rA(this.dimensions,this._getDimInfo,this),this.hostModel)),e2(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];rR(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(r$(arguments)))})},e.internalField=void(eZ=function(e){var t=e._invertedIndicesMap;rM(t,function(n,i){var o=e._dimInfos[i],r=o.ordinalMeta,a=e._store;if(r){n=t[i]=new x0(r.categories.length);for(var s=0;s<n.length;s++)n[s]=-1;for(var s=0;s<a.count();s++)n[a.get(o.storeDimIndex,s)]=s}})},e0=function(e,t,n){return cv(e._getCategory(t,n),null)},eQ=function(e,t){var n=e._idList[t];return null==n&&null!=e._idDimIdx&&(n=e0(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n},e1=function(e){return rO(e)||(e=null!=e?[e]:[]),e},e5=function(t){var n=new e(t._schema?t._schema:rA(t.dimensions,t._getDimInfo,t),t.hostModel);return e2(n,t),n},e2=function(e,t){rM(x1.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,rM(x2,function(n){e[n]=rv(t[n])}),e._calculationInfo=rx({},t._calculationInfo)},e3=function(e,t){var n=e._nameList,i=e._idList,o=e._nameDimIdx,r=e._idDimIdx,a=n[t],s=i[t];if(null==a&&null!=o&&(n[t]=a=e0(e,o,t)),null==s&&null!=r&&(i[t]=s=e0(e,r,t)),null==s&&null!=a){var l=e._nameRepeatCount,c=l[a]=(l[a]||0)+1;s=a,c>1&&(s+="__ec__"+c),i[t]=s}}),e}(),x3=function(e){this.coordSysDims=[],this.axisMap=r1(),this.categoryAxisMap=r1(),this.coordSysName=e},x4={cartesian2d:function(e,t,n,i){var o=e.getReferringComponents("xAxis",cA).models[0],r=e.getReferringComponents("yAxis",cA).models[0];t.coordSysDims=["x","y"],n.set("x",o),n.set("y",r),x6(o)&&(i.set("x",o),t.firstCategoryDimIndex=0),x6(r)&&(i.set("y",r),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,i){var o=e.getReferringComponents("singleAxis",cA).models[0];t.coordSysDims=["single"],n.set("single",o),x6(o)&&(i.set("single",o),t.firstCategoryDimIndex=0)},polar:function(e,t,n,i){var o=e.getReferringComponents("polar",cA).models[0],r=o.findAxisModel("radiusAxis"),a=o.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",r),n.set("angle",a),x6(r)&&(i.set("radius",r),t.firstCategoryDimIndex=0),x6(a)&&(i.set("angle",a),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,i){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,i){var o=e.ecModel,r=o.getComponent("parallel",e.get("parallelIndex")),a=t.coordSysDims=r.dimensions.slice();rM(r.parallelAxisIndex,function(e,r){var s=o.getComponent("parallelAxis",e),l=a[r];n.set(l,s),x6(s)&&(i.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=r))})},matrix:function(e,t,n,i){var o=e.getReferringComponents("matrix",cA).models[0];t.coordSysDims=["x","y"];var r=o.getDimensionModel("x"),a=o.getDimensionModel("y");n.set("x",r),n.set("y",a),i.set("x",r),i.set("y",a)}};function x6(e){return"category"===e.get("type")}let x8=function(e,t,n){n=n||{};var i,o,r,a,s,l,c,d,u=t.getSourceManager(),m=!1;e?(m=!0,d=f7(e)):m=(d=u.getSource()).sourceFormat===f_;var f=function(e){var t=e.get("coordinateSystem"),n=new x3(t),i=x4[t];if(i)return i(e,n,n.axisMap,n.categoryAxisMap),n}(t),p=(o=t.get("coordinateSystem"),r=m5.get(o),f&&f.coordSysDims&&(i=rA(f.coordSysDims,function(e){var t,n={name:e},i=f.axisMap.get(e);return i&&(n.type="category"===(t=i.get("type"))?"ordinal":"time"===t?"time":"float"),n})),i||(i=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),i),h=n.useEncodeDefaulter,b=rR(h)?h:h?rI(fM,p,t):null,g=function(e,t){f6(e)||(e=f7(e));var n,i,o,r,a,s=(t=t||{}).coordDimensions||[],l=t.dimensionsDefine||e.dimensionsDefine||[],c=r1(),d=[],u=(n=e,i=s,o=l,r=t.dimensionsCount,a=Math.max(n.dimensionsDetectedCount||1,i.length,o.length,r||0),rM(i,function(e){var t;rB(e)&&(t=e.dimsDef)&&(a=Math.max(a,t.length))}),a),m=t.canOmitUnusedDimensions&&u>30,f=l===e.dimensionsDefine,p=f?yS(e):yD(l),h=t.encodeDefine;!h&&t.encodeDefaulter&&(h=t.encodeDefaulter(e,u));for(var b=r1(h),g=new pY(u),_=0;_<g.length;_++)g[_]=-1;function y(e){var t=g[e];if(t<0){var n=l[e],i=rB(n)?n:{name:n},o=new xZ,r=i.name;null!=r&&null!=p.get(r)&&(o.name=o.displayName=r),null!=i.type&&(o.type=i.type),null!=i.displayName&&(o.displayName=i.displayName);var a=d.length;return g[e]=a,o.storeDimIndex=e,d.push(o),o}return d[t]}if(!m)for(var _=0;_<u;_++)y(_);b.each(function(e,t){var n=cp(e).slice();if(1===n.length&&!rY(n[0])&&n[0]<0)return void b.set(t,!1);var i=b.set(t,[]);rM(n,function(e,n){var o=rY(e)?p.get(e):e;null!=o&&o<u&&(i[n]=o,F(y(o),t,n))})});var v=0;function F(e,t,n){null!=fg.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,c.set(t,!0))}rM(s,function(e){if(rY(e))o=e,i={};else{var t,n,i,o=(i=e).name,r=i.ordinalMeta;i.ordinalMeta=null,(i=rx({},i)).ordinalMeta=r,t=i.dimsDef,n=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var a=b.get(o);if(!1!==a){if(!(a=cp(a)).length)for(var s=0;s<(t&&t.length||1);s++){for(;v<u&&null!=y(v).coordDim;)v++;v<u&&a.push(v++)}rM(a,function(e,r){var a=y(e);if(f&&null!=i.type&&(a.type=i.type),F(rw(a,i),o,r),null==a.name&&t){var s=t[r];rB(s)||(s={name:s}),a.name=a.displayName=s.name,a.defaultTooltip=s.defaultTooltip}n&&rw(a.otherDims,n)})}});var x=t.generateCoord,w=t.generateCoordCount,k=null!=w;w=x?w||1:0;var E=x||"value";function T(e){null==e.name&&(e.name=e.coordDim)}if(m)rM(d,function(e){T(e)}),d.sort(function(e,t){return e.storeDimIndex-t.storeDimIndex});else for(var M=0;M<u;M++){var A=y(M);null==A.coordDim&&(A.coordDim=function(e,t,n){if(n||t.hasKey(e)){for(var i=0;t.hasKey(e+i);)i++;e+=i}return t.set(e,!0),e}(E,c,k),A.coordDimIndex=0,(!x||w<=0)&&(A.isExtraCoord=!0),w--),T(A),null==A.type&&(fC(e,M)===fE.Must||A.isExtraCoord&&(null!=A.otherDims.itemName||null!=A.otherDims.seriesName))&&(A.type="ordinal")}return function(e){for(var t=r1(),n=0;n<e.length;n++){var i=e[n],o=i.name,r=t.get(o)||0;r>0&&(i.name=o+(r-1)),r++,t.set(o,r)}}(d),new yA({source:e,dimensions:d,fullDimensionCount:u,dimensionOmitted:m})}(d,{coordDimensions:p,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:b,canOmitUnusedDimensions:!m}),_=(a=g.dimensions,s=n.createInvertedIndices,f&&rM(a,function(e,t){var n=e.coordDim,i=f.categoryAxisMap.get(n);i&&(null==l&&(l=t),e.ordinalMeta=i.getOrdinalMeta(),s&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(c=!0)}),c||null==l||(a[l].otherDims.itemName=0),l),y=m?null:u.getSharedDataStore(g),v=function(e,t,n){var i,o,r,a,s,l,c,d=(n=n||{}).byIndex,u=n.stackedCoordDimension;yC(t.schema)?(i=(o=t.schema).dimensions,r=t.store):i=t;var m=!!(e&&e.get("stack"));if(rM(i,function(e,t){rY(e)&&(i[t]=e={name:e}),m&&!e.isExtraCoord&&(d||a||!e.ordinalMeta||(a=e),s||"ordinal"===e.type||"time"===e.type||u&&u!==e.coordDim||(s=e))}),!s||d||a||(d=!0),s){l="__\0ecstackresult_"+e.id,c="__\0ecstackedover_"+e.id,a&&(a.createInvertedIndices=!0);var f=s.coordDim,p=s.type,h=0;rM(i,function(e){e.coordDim===f&&h++});var b={name:l,coordDim:f,coordDimIndex:h,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},g={name:c,coordDim:c,coordDimIndex:h+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(r&&(b.storeDimIndex=r.ensureCalculationDimension(c,p),g.storeDimIndex=r.ensureCalculationDimension(l,p)),o.appendCalculationDimension(b),o.appendCalculationDimension(g)):(i.push(b),i.push(g))}return{stackedDimension:s&&s.name,stackedByDimension:a&&a.name,isStackedByIndex:d,stackedOverDimension:c,stackResultDimension:l}}(t,{schema:g,store:y}),F=new x5(g,t);F.setCalculationInfo(v);var x=null!=_&&function(e){if(e.sourceFormat===f_)return!rO(cg(function(e){for(var t=0;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[])))}(d)?function(e,t,n,i){return i===_?n:this.defaultDimValueGetter(e,t,n,i)}:null;return F.hasItemOption=!1,F.initData(m?d:y,null,x),F};var x7=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.prototype.getInitialData=function(e,t){return x8(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(e),r=i.dataToPoint(o);if(n)rM(i.getAxes(),function(e,n){if("category"===e.type&&null!=t){var i=e.getTicksCoords(),a=e.getTickModel().get("alignWithLabel"),s=o[n],l="x1"===t[n]||"y1"===t[n];if(l&&!a&&(s+=1),!(i.length<2)){if(2===i.length){r[n]=e.toGlobalCoord(e.getExtent()[+!!l]);return}for(var c=void 0,d=void 0,u=1,m=0;m<i.length;m++){var f=i[m].coord,p=m===i.length-1?i[m-1].tickValue+u:i[m].tickValue;if(p===s){d=f;break}if(p<s)c=f;else if(null!=c&&p>s){d=(f+c)/2;break}1===m&&(u=p-i[0].tickValue)}null==d&&(c?c&&(d=i[i.length-1].coord):d=i[0].coord),r[n]=e.toGlobalCoord(d)}}});else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),c=+!i.getBaseAxis().isHorizontal();r[c]+=s+l/2}return r}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t}(p7);p7.registerClass(x7);var x9=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return rt(t,e),t.prototype.getInitialData=function(){return x8(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=m_(x7.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:fl.color.primary,borderWidth:2}},realtimeSort:!1}),t}(x7),we=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},wt=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return rt(t,e),t.prototype.getDefaultShape=function(){return new we},t.prototype.buildPath=function(e,t){var n=t.cx,i=t.cy,o=Math.max(t.r0||0,0),r=Math.max(t.r,0),a=(r-o)*.5,s=o+a,l=t.startAngle,c=t.endAngle,d=t.clockwise,u=2*Math.PI,m=d?c-l<u:l-c<u;m||(l=c-(d?u:-u));var f=Math.cos(l),p=Math.sin(l),h=Math.cos(c),b=Math.sin(c);m?(e.moveTo(f*o+n,p*o+i),e.arc(f*s+n,p*s+i,a,-Math.PI+l,l,!d)):e.moveTo(f*r+n,p*r+i),e.arc(n,i,r,l,c,!d),e.arc(h*s+n,b*s+i,a,c-2*Math.PI,c-Math.PI,!d),0!==o&&e.arc(n,i,o,c,l,d)},t}(dJ);function wn(e,t,n){return t*Math.sin(e)*(n?-1:1)}function wi(e,t,n){return t*Math.cos(e)*(n?1:-1)}var wo=Math.max,wr=Math.min,wa=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return rt(t,e),t.prototype.render=function(e,t,n,i){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var o=e.get("coordinateSystem");("cartesian2d"===o||"polar"===o)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,i))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){b4(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(null==this._isLargeDraw||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,i){var o,r=this.group,a=e.getData(),s=this._data,l=e.coordinateSystem,c=l.getBaseAxis();"cartesian2d"===l.type?o=c.isHorizontal():"polar"===l.type&&(o="angle"===c.dim);var d=e.isAnimationEnabled()?e:null,u=function(e,t){var n=e.get("realtimeSort",!0),i=t.getBaseAxis();if(n&&"category"===i.type&&"cartesian2d"===t.type)return{baseAxis:i,otherAxis:t.getOtherAxis(i)}}(e,l);u&&this._enableRealtimeSort(u,a,n);var m=e.get("clip",!0)||u,f=function(e,t){var n=e.getArea&&e.getArea();if("cartesian2d"===e.type){var i=e.getBaseAxis();if("category"!==i.type||!i.onBand){var o=t.getLayout("bandWidth");i.isHorizontal()?(n.x-=o,n.width+=2*o):(n.y-=o,n.height+=2*o)}}return n}(l,a);r.removeClipPath();var p=e.get("roundCap",!0),h=e.get("showBackground",!0),b=e.getModel("backgroundStyle"),g=b.get("borderRadius")||0,_=[],y=this._backgroundEls,v=i&&i.isInitSort,F=i&&"changeAxisOrder"===i.type;function x(e){var t,n,i,r=wp[l.type](a,e);if(!r)return null;var s=(t=l,n=o,i=r,new("polar"===t.type?hG:ut)({shape:wF(n,i,t),silent:!0,z2:0}));return s.useStyle(b.getItemStyle()),"cartesian2d"===l.type?s.setShape("r",g):s.setShape("cornerRadius",g),_[e]=s,s}a.diff(s).add(function(t){var n=a.getItemModel(t),i=wp[l.type](a,t,n);if(i&&(h&&x(t),a.hasValue(t)&&wf[l.type](i))){var s=!1;m&&(s=ws[l.type](f,i));var b=wl[l.type](e,a,t,i,o,d,c.model,!1,p);u&&(b.forceLabelAnimation=!0),wb(b,a,t,n,i,e,o,"polar"===l.type),v?b.attr({shape:i}):u?wc(u,d,b,i,t,o,!1,!1):bk(b,{shape:i},e,t),a.setItemGraphicEl(t,b),r.add(b),b.ignore=s}}).update(function(t,n){var i=a.getItemModel(t),w=wp[l.type](a,t,i);if(w){if(h){var k,E=void 0;0===y.length?E=x(n):((E=y[n]).useStyle(b.getItemStyle()),"cartesian2d"===l.type?E.setShape("r",g):E.setShape("cornerRadius",g),_[t]=E);var T=wp[l.type](a,t);bw(E,{shape:wF(o,T,l)},d,t)}var M=s.getItemGraphicEl(n);if(!a.hasValue(t)||!wf[l.type](w))return void r.remove(M);var A=!1;if((m&&(A=ws[l.type](f,w))&&r.remove(M),M&&("sector"===M.type&&p||"sausage"===M.type&&!p)&&(M&&bA(M,e,n),M=null),M)?bv(k=M).oldStyle=k.style:M=wl[l.type](e,a,t,w,o,d,c.model,!0,p),u&&(M.forceLabelAnimation=!0),F){var C=M.getTextContent();if(C){var D=mi(C);null!=D.prevValue&&(D.prevValue=D.value)}}else wb(M,a,t,i,w,e,o,"polar"===l.type);v?M.attr({shape:w}):u?wc(u,d,M,w,t,o,!0,F):bw(M,{shape:w},e,t,null),a.setItemGraphicEl(t,M),M.ignore=A,r.add(M)}}).remove(function(t){var n=s.getItemGraphicEl(t);n&&bA(n,e,t)}).execute();var w=this._backgroundGroup||(this._backgroundGroup=new lQ);w.removeAll();for(var k=0;k<_.length;++k)w.add(_[k]);r.add(w),this._backgroundEls=_,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),wy(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),wy(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&function(e,t,n,i,o){if(e){if("polar"===e.type){var r,a,s,l;return a=ce((r=e.getArea()).r0,1),s=ce(r.r,1),l=new hG({shape:{cx:ce(e.cx,1),cy:ce(e.cy,1),r0:a,r:s,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}),t&&("angle"===e.getBaseAxis().dim?l.shape.endAngle=r.startAngle:l.shape.r=a,bk(l,{shape:{endAngle:r.endAngle,r:s}},n)),l}else if("cartesian2d"===e.type)return function(e,t,n,i,o){var r=e.getArea(),a=r.x,s=r.y,l=r.width,c=r.height,d=n.get(["lineStyle","width"])||0;a-=d/2,s-=d/2,l+=d,c+=d,l=Math.ceil(l),a!==Math.floor(a)&&(a=Math.floor(a),l++);var u=new ut({shape:{x:a,y:s,width:l,height:c}});if(t){var m=e.getBaseAxis(),f=m.isHorizontal(),p=m.inverse;f?(p&&(u.shape.x+=l),u.shape.width=0):(p||(u.shape.y+=c),u.shape.height=0);var h=rR(o)?function(e){o(e,u)}:null;bk(u,{shape:{width:l,height:c,x:a,y:s}},n,null,i,h)}return u}(e,t,n,void 0,void 0)}return null}(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var i=this;if(t.count()){var o=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var r=function(e){var n=t.getItemGraphicEl(e),i=n&&n.shape;return i&&Math.abs(o.isHorizontal()?i.height:i.width)||0};this._onRendered=function(){i._updateSortWithinSameData(t,r,o,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var i=[];return e.each(e.mapDimension(t.dim),function(e,t){var o=n(t);o=null==o?NaN:o,i.push({dataIndex:t,mappedValue:o,ordinalNumber:e})}),i.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:rA(i,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var i=n.scale,o=e.mapDimension(n.dim),r=Number.MAX_VALUE,a=0,s=i.getOrdinalMeta().categories.length;a<s;++a){var l=e.rawIndexOf(o,i.getRawOrdinalNumber(a)),c=l<0?5e-324:t(e.indexOfRawIndex(l));if(c>r)return!0;r=c}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,i=n.getExtent(),o=Math.max(0,i[0]),r=Math.min(i[1],n.getOrdinalMeta().categories.length-1);o<=r;++o)if(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,i){if(this._isOrderChangedWithinSameData(e,t,n)){var o=this._dataSort(e,n,t);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,t,n){var i=t.baseAxis,o=this._dataSort(e,i,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){bA(t,e,ug(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(gr),ws={cartesian2d:function(e,t){var n=t.width<0?-1:1,i=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height);var o=e.x+e.width,r=e.y+e.height,a=wo(t.x,e.x),s=wr(t.x+t.width,o),l=wo(t.y,e.y),c=wr(t.y+t.height,r),d=s<a,u=c<l;return t.x=d&&a>o?s:a,t.y=u&&l>r?c:l,t.width=d?0:s-a,t.height=u?0:c-l,n<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height),d||u},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var i=t.r;t.r=t.r0,t.r0=i}var o=wr(t.r,e.r),r=wo(t.r0,e.r0);t.r=o,t.r0=r;var a=o-r<0;if(n<0){var i=t.r;t.r=t.r0,t.r0=i}return a}},wl={cartesian2d:function(e,t,n,i,o,r,a,s,l){var c=new ut({shape:rx({},i),z2:1});return c.__dataIndex=n,c.name="item",r&&(c.shape[o?"height":"width"]=0),c},polar:function(e,t,n,i,o,r,a,s,l){var c,d,u=!o&&l?wt:hG,m=new u({shape:i,z2:1});if(m.name="item",c=wh(o),d=u===wt,m.calculateTextPosition=function(e,t,n){var i=t.position;if(!i||i instanceof Array)return lj(e,t,n);var o=c(i),r=null!=t.distance?t.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,m=a.r0,f=(u+m)/2,p=a.startAngle,h=a.endAngle,b=(p+h)/2,g=d?Math.abs(u-m)/2:0,_=Math.cos,y=Math.sin,v=s+u*_(p),F=l+u*y(p),x="left",w="top";switch(o){case"startArc":v=s+(m-r)*_(b),F=l+(m-r)*y(b),x="center",w="top";break;case"insideStartArc":v=s+(m+r)*_(b),F=l+(m+r)*y(b),x="center",w="bottom";break;case"startAngle":v=s+f*_(p)+wn(p,r+g,!1),F=l+f*y(p)+wi(p,r+g,!1),x="right",w="middle";break;case"insideStartAngle":v=s+f*_(p)+wn(p,-r+g,!1),F=l+f*y(p)+wi(p,-r+g,!1),x="left",w="middle";break;case"middle":v=s+f*_(b),F=l+f*y(b),x="center",w="middle";break;case"endArc":v=s+(u+r)*_(b),F=l+(u+r)*y(b),x="center",w="bottom";break;case"insideEndArc":v=s+(u-r)*_(b),F=l+(u-r)*y(b),x="center",w="top";break;case"endAngle":v=s+f*_(h)+wn(h,r+g,!0),F=l+f*y(h)+wi(h,r+g,!0),x="left",w="middle";break;case"insideEndAngle":v=s+f*_(h)+wn(h,-r+g,!0),F=l+f*y(h)+wi(h,-r+g,!0),x="right",w="middle";break;default:return lj(e,t,n)}return(e=e||{}).x=v,e.y=F,e.align=x,e.verticalAlign=w,e},r){var f=m.shape,p=o?"r":"endAngle",h={};f[p]=o?i.r0:i.startAngle,h[p]=i[p],(s?bw:bk)(m,{shape:h},r)}return m}};function wc(e,t,n,i,o,r,a,s){var l,c;r?(c={x:i.x,width:i.width},l={y:i.y,height:i.height}):(c={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(a?bw:bk)(n,{shape:l},t,o,null),(a?bw:bk)(n,{shape:c},t?e.baseAxis.model:null,o)}function wd(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var wu=["x","y","width","height"],wm=["cx","cy","r","startAngle","endAngle"],wf={cartesian2d:function(e){return!wd(e,wu)},polar:function(e){return!wd(e,wm)}},wp={cartesian2d:function(e,t,n){var i,o,r,a=e.getItemLayout(t);if(!a)return null;var s=n?(i=n,o=a,(r=i.get(["itemStyle","borderColor"]))&&"none"!==r?Math.min(i.get(["itemStyle","borderWidth"])||0,isNaN(o.width)?Number.MAX_VALUE:Math.abs(o.width),isNaN(o.height)?Number.MAX_VALUE:Math.abs(o.height)):0):0,l=a.width>0?1:-1,c=a.height>0?1:-1;return{x:a.x+l*s/2,y:a.y+c*s/2,width:a.width-l*s,height:a.height-c*s}},polar:function(e,t,n){var i=e.getItemLayout(t);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function wh(e){var t;return t=e?"Arc":"Angle",function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}function wb(e,t,n,i,o,r,a,s){var l,c,d,u=t.getItemVisual(n,"style");if(s){if(!r.get("roundCap")){var m=e.shape,f=function(e,t,n){var i=e.get("borderRadius");if(null==i)return n?{cornerRadius:0}:null;rO(i)||(i=[i,i,i,i]);var o=Math.abs(t.r||0-t.r0||0);return{cornerRadius:rA(i,function(e){return lz(e,o)})}}(i.getModel("itemStyle"),m,!0);rx(m,f),e.setShape(m)}}else{var p=i.get(["itemStyle","borderRadius"])||0;e.setShape("r",p)}e.useStyle(u);var h=i.getShallow("cursor");h&&e.attr("cursor",h);var b=s?a?o.r>=o.r0?"endArc":"startArc":o.endAngle>=o.startAngle?"endAngle":"startAngle":a?o.height>=0?"bottom":"top":o.width>=0?"right":"left",g=function(e,t){t=t||"label";for(var n={normal:e.getModel(t)},i=0;i<uw.length;i++){var o=uw[i];n[o]=e.getModel([o,t])}return n}(i);!function(e,t,n,i){n=n||u4;for(var o=e instanceof ub,r=!1,a=0;a<uk.length;a++){var s=t[uk[a]];if(s&&s.getShallow("show")){r=!0;break}}var l=o?e:e.getTextContent();if(r){!o&&(l||(l=new ub,e.setTextContent(l)),e.stateProxy&&(l.stateProxy=e.stateProxy));var c=u6(n,t),d=t.normal,u=!!d.getShallow("show"),m=u8(d,void 0,n,!1,!o);m.text=c.normal,o||e.setTextConfig(u7(d,n,!1));for(var a=0;a<uw.length;a++){var f=uw[a],s=t[f];if(s){var p=l.ensureState(f),h=!!rV(s.getShallow("show"),u);h!==u&&(p.ignore=!h),p.style=u8(s,void 0,n,!0,!o),p.style.text=c[f],o||(e.ensureState(f).textConfig=u7(s,n,!0))}}l.silent=!!d.getShallow("silent"),null!=l.style.x&&(m.x=l.style.x),null!=l.style.y&&(m.y=l.style.y),l.ignore=!u,l.useStyle(m),l.dirty(),n.enableTextSetter&&(mi(l).setLabelText=function(e){var i=u6(n,t,e);!function(e,t){for(var n=0;n<uw.length;n++){var i=uw[n],o=t[i],r=e.ensureState(i);r.style=r.style||{},r.style.text=o}var a=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(a,!0)}(l,i)})}else l&&(l.ignore=!0);e.dirty()}(e,g,{labelFetcher:r,labelDataIndex:n,defaultText:function(e,t){var n=e.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var o=pb(e,t,n[0]);return null!=o?o+"":null}if(i){for(var r=[],a=0;a<n.length;a++)r.push(pb(e,t,n[a]));return r.join(" ")}}(r.getData(),n),inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:b});var _=e.getTextContent();if(s&&_){var y=i.get(["label","position"]);e.textConfig.inside="middle"===y||null,function(e,t,n,i){if(rN(i))return e.setTextConfig({rotation:i});if(rO(t))return e.setTextConfig({rotation:0});var o,r=e.shape,a=r.clockwise?r.startAngle:r.endAngle,s=r.clockwise?r.endAngle:r.startAngle,l=n(t);switch(l){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":o=(a+s)/2;break;case"startAngle":case"insideStartAngle":o=a;break;case"endAngle":case"insideEndAngle":o=s;break;default:e.setTextConfig({rotation:0});return}var c=1.5*Math.PI-o;"middle"===l&&c>Math.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),e.setTextConfig({rotation:c})}(e,"outside"===y?b:y,wh(a),i.get(["label","rotate"]))}!function(e,t,n,i){if(e){var o=mi(e);o.prevValue=o.value,o.value=n;var r=t.normal;o.valueAnimation=r.get("valueAnimation"),o.valueAnimation&&(o.precision=r.get("precision"),o.defaultInterpolatedText=i,o.statesModels=t)}}(_,g,r.getRawValue(n),function(e){var n=t.mapDimensionsAll("defaultedLabel");if(!rO(e))return e+"";for(var i=[],o=0;o<n.length;o++){var r=t.getDimensionIndex(n[o]);r>=0&&i.push(e[r])}return i.join(" ")});var v=i.getModel(["emphasis"]);l=e,c=v.get("focus"),d=v.get("blurScope"),v.get("disabled")?u1(l,!1):uZ(l,c,d),!function(e,t,n,i){n=n||"itemStyle";for(var o=0;o<uQ.length;o++){var r=uQ[o],a=t.getModel([r,n]);e.ensureState(r).style=a[u0[n]]()}}(e,i),null!=o.startAngle&&null!=o.endAngle&&o.startAngle===o.endAngle&&(e.style.fill="none",e.style.stroke="none",rM(e.states,function(e){e.style&&(e.style.fill=e.style.stroke="none")}))}var wg=function(){},w_=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return rt(t,e),t.prototype.getDefaultShape=function(){return new wg},t.prototype.buildPath=function(e,t){for(var n=t.points,i=this.baseDimIdx,o=1-this.baseDimIdx,r=[],a=[],s=this.barWidth,l=0;l<n.length;l+=3)a[i]=s,a[o]=n[l+2],r[i]=n[l+i],r[o]=n[l+o],e.rect(r[0],r[1],a[0],a[1])},t}(dJ);function wy(e,t,n,i){var o=e.getData(),r=+!!o.getLayout("valueAxisHorizontal"),a=o.getLayout("largeDataIndices"),s=o.getLayout("size"),l=e.getModel("backgroundStyle"),c=o.getLayout("largeBackgroundPoints");if(c){var d=new w_({shape:{points:c},incremental:!!i,silent:!0,z2:0});d.baseDimIdx=r,d.largeDataIndices=a,d.barWidth=s,d.useStyle(l.getItemStyle()),t.add(d),n&&n.push(d)}var u=new w_({shape:{points:o.getLayout("largePoints")},incremental:!!i,ignoreCoarsePointer:!0,z2:1});u.baseDimIdx=r,u.largeDataIndices=a,u.barWidth=s,t.add(u),u.useStyle(o.getVisual("style")),u.style.stroke=null,ug(u).seriesIndex=e.seriesIndex,e.get("silent")||(u.on("mousedown",wv),u.on("mousemove",wv)),n&&n.push(u)}var wv=gp(function(e){var t=function(e,t,n){for(var i=e.baseDimIdx,o=1-i,r=e.shape.points,a=e.largeDataIndices,s=[],l=[],c=e.barWidth,d=0,u=r.length/3;d<u;d++){var m=3*d;if(l[i]=c,l[o]=r[m+2],s[i]=r[m+i],s[o]=r[m+o],l[o]<0&&(s[o]+=l[o],l[o]=-l[o]),t>=s[0]&&t<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[d]}return -1}(this,e.offsetX,e.offsetY);ug(this).dataIndex=t>=0?t:null},30,!1);function wF(e,t,n){if("cartesian2d"===n.type){var i=n.getArea();return{x:e?t.x:i.x,y:e?i.y:t.y,width:e?t.width:i.width,height:e?i.height:t.height}}var i=n.getArea();return{cx:i.cx,cy:i.cy,r0:e?i.r0:t.r0,r:e?i.r:t.r,startAngle:e?t.startAngle:0,endAngle:e?t.endAngle:2*Math.PI}}function ww(e,t,n){var i=ra.createCanvas(),o=t.getWidth(),r=t.getHeight(),a=i.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=o+"px",a.height=r+"px",i.setAttribute("data-zr-dom-id",e)),i.width=o*n,i.height=r*n,i}var wk=function(e){function t(t,n,i){var o,r=e.call(this)||this;r.motionBlur=!1,r.lastFrameAlpha=.7,r.dpr=1,r.virtual=!1,r.config={},r.incremental=!1,r.zlevel=0,r.maxRepaintRectCount=5,r.__dirty=!0,r.__firstTimePaint=!0,r.__used=!1,r.__drawIndex=0,r.__startIndex=0,r.__endIndex=0,r.__prevStartIndex=null,r.__prevEndIndex=null,i=i||lF,"string"==typeof t?o=ww(t,n,i):rB(t)&&(t=(o=t).id),r.id=t,r.dom=o;var a=o.style;return a&&(r5(o),o.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),r.painter=n,r.dpr=i,r}return r7(t,e),t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=ww("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o,r=[],a=this.maxRepaintRectCount,s=!1,l=new a3(0,0,0,0);function c(e){if(!(!e.isFinite()||e.isZero()))if(0===r.length){var t=new a3(0,0,0,0);t.copy(e),r.push(t)}else{for(var n=!1,i=1/0,o=0,c=0;c<r.length;++c){var d=r[c];if(d.intersect(e)){var u=new a3(0,0,0,0);u.copy(d),u.union(e),r[c]=u,n=!0;break}if(s){l.copy(e),l.union(d);var m=e.width*e.height,f=d.width*d.height,p=l.width*l.height-m-f;p<i&&(i=p,o=c)}}if(s&&(r[o].union(e),n=!0),!n){var t=new a3(0,0,0,0);t.copy(e),r.push(t)}s||(s=r.length>=a)}}for(var d=this.__startIndex;d<this.__endIndex;++d){var u=e[d];if(u){var m=u.shouldBePainted(n,i,!0,!0),f=u.__isRendered&&(1&u.__dirty||!m)?u.getPrevPaintRect():null;f&&c(f);var p=m&&(1&u.__dirty||!u.__isRendered)?u.getPaintRect():null;p&&c(p)}}for(var d=this.__prevStartIndex;d<this.__prevEndIndex;++d){var u=t[d],m=u&&u.shouldBePainted(n,i,!0,!0);if(u&&(!m||!u.__zr)&&u.__isRendered){var f=u.getPrevPaintRect();f&&c(f)}}do{o=!1;for(var d=0;d<r.length;){if(r[d].isZero()){r.splice(d,1);continue}for(var h=d+1;h<r.length;)r[d].intersect(r[h])?(o=!0,r[d].union(r[h]),r.splice(h,1)):h++;d++}}while(o);return this._paintRects=r,r},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,i=this.dom,o=i.style,r=this.domBack;o&&(o.width=e+"px",o.height=t+"px"),i.width=e*n,i.height=t*n,r&&(r.width=e*n,r.height=t*n,1!==n&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var i=this.dom,o=this.ctx,r=i.width,a=i.height;t=t||this.clearColor;var s=this.motionBlur&&!e,l=this.lastFrameAlpha,c=this.dpr,d=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,r/c,a/c));var u=this.domBack;function m(e,n,i,r){if(o.clearRect(e,n,i,r),t&&"transparent"!==t){var a=void 0;rU(t)?(a=(t.global||t.__width===i&&t.__height===r)&&t.__canvasGradient||g6(o,t,{x:0,y:0,width:i,height:r}),t.__canvasGradient=a,t.__width=i,t.__height=r):null!=t.image&&(t.scaleX=t.scaleX||c,t.scaleY=t.scaleY||c,a=_a(o,t,{dirty:function(){d.setUnpainted(),d.painter.refresh()}})),o.save(),o.fillStyle=a||t,o.fillRect(e,n,i,r),o.restore()}s&&(o.save(),o.globalAlpha=l,o.drawImage(u,e,n,i,r),o.restore())}!n||s?m(0,0,r,a):n.length&&rM(n,function(e){m(e.x*c,e.y*c,e.width*c,e.height*c)})},t}(ac),wE=function(){function e(e,t,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var o=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=rx({},n||{}),this.dpr=n.devicePixelRatio||lF,this._singleCanvas=o,this.root=e,e.style&&(r5(e),e.innerHTML=""),this.storage=t;var r=this._zlevelList;this._prevDisplayList=[];var a=this._layers;if(o){var s=e.width,l=e.height;null!=n.width&&(s=n.width),null!=n.height&&(l=n.height),this.dpr=n.devicePixelRatio||1,e.width=s*this.dpr,e.height=l*this.dpr,this._width=s,this._height=l;var c=new wk(e,this,this.dpr);c.__builtin__=!0,c.initContext(),a[314159]=c,c.zlevel=314159,r.push(314159),this._domRoot=e}else{this._width=g7(e,0,n),this._height=g7(e,1,n);var d,u,m,f=this._domRoot=(d=this._width,u=this._height,(m=document.createElement("div")).style.cssText=["position:relative","width:"+d+"px","height:"+u+"px","padding:0;margin:0;border-width:0"].join(";")+";",m);e.appendChild(f)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var o=0;o<i.length;o++){var r=i[o],a=this._layers[r];if(!a.__builtin__&&a.refresh){var s=0===o?this._backgroundColor:null;a.refresh(s)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(e){var t,n=e.length,i=this._hoverlayer;if(i&&i.clear(),n){for(var o={inHover:!0,viewWidth:this._width,viewHeight:this._height},r=0;r<n;r++){var a=e[r];a.__inHover&&(i||(i=this._hoverlayer=this.getLayer(1e5)),t||(t=i.ctx).save(),_h(t,a,o,r===n-1))}t&&t.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(1e5)},e.prototype.paintOne=function(e,t){_p(e,t)},e.prototype._paintList=function(e,t,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(e);var o=this._doPaintList(e,t,n),r=o.finished,a=o.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(e),r)this.eachLayer(function(e){e.afterBrush&&e.afterBrush()});else{var s=this;ey(function(){s._paintList(e,t,n,i)})}}},e.prototype._compositeManually=function(){var e=this.getLayer(314159).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer(function(i){i.virtual&&e.drawImage(i.dom,0,0,t,n)})},e.prototype._doPaintList=function(e,t,n){for(var i=this,o=[],r=this._opts.useDirtyRect,a=0;a<this._zlevelList.length;a++){var s=this._zlevelList[a],l=this._layers[s];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||n)&&o.push(l)}for(var c=!0,d=!1,u=this,m=0;m<o.length;m++)!function(a){var s,l=o[a],m=l.ctx,f=r&&l.createRepaintRects(e,t,u._width,u._height),p=n?l.__startIndex:l.__drawIndex,h=!n&&l.incremental&&Date.now,b=h&&Date.now(),g=l.zlevel===u._zlevelList[0]?u._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,g,f);else if(p===l.__startIndex){var _=e[p];_.incremental&&_.notClear&&!n||l.clear(!1,g,f)}-1===p&&(console.error("For some unknown reason. drawIndex is -1"),p=l.__startIndex);var y=function(t){var n={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(s=p;s<l.__endIndex;s++){var o=e[s];if(o.__inHover&&(d=!0),i._doPaintEl(o,l,r,t,n,s===l.__endIndex-1),h&&Date.now()-b>15)break}n.prevElClipPaths&&m.restore()};if(f)if(0===f.length)s=l.__endIndex;else for(var v=u.dpr,F=0;F<f.length;++F){var x=f[F];m.save(),m.beginPath(),m.rect(x.x*v,x.y*v,x.width*v,x.height*v),m.clip(),y(x),m.restore()}else m.save(),y(),m.restore();l.__drawIndex=s,l.__drawIndex<l.__endIndex&&(c=!1)}(m);return ri.wxa&&rM(this._layers,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),{finished:c,needsRefreshHover:d}},e.prototype._doPaintEl=function(e,t,n,i,o,r){var a=t.ctx;if(n){var s=e.getPaintRect();(!i||s&&s.intersect(i))&&(_h(a,e,o,r),e.setPrevPaintRect(s))}else _h(a,e,o,r)},e.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=314159);var n=this._layers[e];return n||((n=new wk("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?rF(n,this._layerConfig[e],!0):this._layerConfig[e-.01]&&rF(n,this._layerConfig[e-.01],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},e.prototype.insertLayer=function(e,t){var n=this._layers,i=this._zlevelList,o=i.length,r=this._domRoot,a=null,s=-1;if(!n[e]){if(t&&(t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh&&1)){if(o>0&&e>i[0]){for(s=0;s<o-1&&(!(i[s]<e)||!(i[s+1]>e));s++);a=n[i[s]]}if(i.splice(s+1,0,e),n[e]=t,!t.virtual)if(a){var l=a.dom;l.nextSibling?r.insertBefore(t.dom,l.nextSibling):r.appendChild(t.dom)}else r.firstChild?r.insertBefore(t.dom,r.firstChild):r.appendChild(t.dom);t.painter||(t.painter=this)}}},e.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,i=0;i<n.length;i++){var o=n[i];e.call(t,this._layers[o],o)}},e.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,i=0;i<n.length;i++){var o=n[i],r=this._layers[o];r.__builtin__&&e.call(t,r,o)}},e.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,i=0;i<n.length;i++){var o=n[i],r=this._layers[o];r.__builtin__||e.call(t,r,o)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(e){function t(e){a&&(a.__endIndex!==e&&(a.__dirty=!0),a.__endIndex=e)}if(this.eachBuiltinLayer(function(e,t){e.__dirty=e.__used=!1}),this._singleCanvas)for(var n,i,o=1;o<e.length;o++){var r=e[o];if(r.zlevel!==e[o-1].zlevel||r.incremental){this._needsManuallyCompositing=!0;break}}var a=null,s=0;for(i=0;i<e.length;i++){var r=e[i],l=r.zlevel,c=void 0;n!==l&&(n=l,s=0),r.incremental?((c=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,s=1):c=this.getLayer(l+.01*(s>0),this._needsManuallyCompositing),c.__builtin__||ry("ZLevel "+l+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==i&&(c.__dirty=!0),c.__startIndex=i,c.incremental?c.__drawIndex=-1:c.__drawIndex=i,t(i),a=c),1&r.__dirty&&!r.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=i))}t(i),this.eachBuiltinLayer(function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(e){e.clear()},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,rM(this._layers,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?rF(n[e],t,!0):n[e]=t;for(var i=0;i<this._zlevelList.length;i++){var o=this._zlevelList[i];(o===e||o===e+.01)&&rF(this._layers[o],n[e],!0)}}},e.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,i=t[e];i&&(i.dom.parentNode.removeChild(i.dom),delete t[e],n.splice(rk(n,e),1))},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,o=this.root;if(null!=e&&(i.width=e),null!=t&&(i.height=t),e=g7(o,0,i),t=g7(o,1,i),n.style.display="",this._width!==e||t!==this._height){for(var r in n.style.width=e+"px",n.style.height=t+"px",this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(314159).resize(e,t)}return this},e.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var t=new wk("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var i=t.dom.width,o=t.dom.height;this.eachLayer(function(e){e.__builtin__?n.drawImage(e.dom,0,0,i,o):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else for(var r={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,l=a.length;s<l;s++)_h(n,a[s],r,s===l-1);return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}(),wT=dP.CMD;function wM(e,t){return 1e-5>Math.abs(e-t)}function wA(e){var t,n,i,o,r,a=e.data,s=e.len(),l=[],c=0,d=0,u=0,m=0;function f(e,n){t&&t.length>2&&l.push(t),t=[e,n]}function p(e,n,i,o){wM(e,i)&&wM(n,o)||t.push(e,n,i,o,i,o)}for(var h=0;h<s;){var b=a[h++],g=1===h;switch(g&&(c=a[h],d=a[h+1],u=c,m=d,(b===wT.L||b===wT.C||b===wT.Q)&&(t=[u,m])),b){case wT.M:c=u=a[h++],d=m=a[h++],f(u,m);break;case wT.L:p(c,d,n=a[h++],i=a[h++]),c=n,d=i;break;case wT.C:t.push(a[h++],a[h++],a[h++],a[h++],c=a[h++],d=a[h++]);break;case wT.Q:n=a[h++],i=a[h++],o=a[h++],r=a[h++],t.push(c+2/3*(n-c),d+2/3*(i-d),o+2/3*(n-o),r+2/3*(i-r),o,r),c=o,d=r;break;case wT.A:var _=a[h++],y=a[h++],v=a[h++],F=a[h++],x=a[h++],w=a[h++]+x;h+=1;var k=!a[h++];n=Math.cos(x)*v+_,i=Math.sin(x)*F+y,g?f(u=n,m=i):p(c,d,n,i),c=Math.cos(w)*v+_,d=Math.sin(w)*F+y;for(var E=(k?-1:1)*Math.PI/2,T=x;k?T>w:T<w;T+=E){var M=k?Math.max(T+E,w):Math.min(T+E,w);!function(e,n,i,o,r,a){var s=4*Math.tan(Math.abs(n-e)/4)/3,l=n<e?-1:1,c=Math.cos(e),d=Math.sin(e),u=Math.cos(n),m=Math.sin(n),f=u*r+i,p=m*a+o,h=r*s*l,b=a*s*l;t.push(c*r+i-h*d,d*a+o+b*c,f+h*m,p-b*u,f,p)}(T,M,_,y,v,F)}break;case wT.R:u=c=a[h++],m=d=a[h++],n=u+a[h++],i=m+a[h++],f(n,m),p(n,m,n,i),p(n,i,u,i),p(u,i,u,m),p(u,m,n,m);break;case wT.Z:t&&p(c,d,u,m),c=u,d=m}}return t&&t.length>2&&l.push(t),l}function wC(e,t,n){var i=Math.ceil(Math.sqrt(Math.abs(e[t]/e[1-t])*n)),o=Math.floor(n/i);0===o&&(o=1,i=n);for(var r=[],a=0;a<i;a++)r.push(o);var s=n-i*o;if(s>0)for(var a=0;a<s;a++)r[a%i]+=1;return r}function wD(e,t,n){for(var i=e.r0,o=e.r,r=e.startAngle,a=Math.abs(e.endAngle-r),s=a*o,l=o-i,c=s>Math.abs(l),d=wC([s,l],+!c,t),u=(c?a:l)/d.length,m=0;m<d.length;m++)for(var f=(c?l:a)/d[m],p=0;p<d[m];p++){var h={};c?(h.startAngle=r+u*m,h.endAngle=r+u*(m+1),h.r0=i+f*p,h.r=i+f*(p+1)):(h.startAngle=r+f*p,h.endAngle=r+f*(p+1),h.r0=i+u*m,h.r=i+u*(m+1)),h.clockwise=e.clockwise,h.cx=e.cx,h.cy=e.cy,n.push(h)}}function wS(e,t){var n=e[e.length-1];n&&n[0]===t[0]&&n[1]===t[1]||e.push(t)}function wL(e){var t=e.points,n=[],i=[];db(t,n,i);var o=new a3(n[0],n[1],i[0]-n[0],i[1]-n[1]),r=o.width,a=o.height,s=o.x,l=o.y,c=new aB,d=new aB;return r>a?(c.x=d.x=s+r/2,c.y=l,d.y=l+a):(c.y=d.y=l+a/2,c.x=s,d.x=s+r),function(e,t,n){for(var i=e.length,o=[],r=0;r<i;r++){var a=e[r],s=e[(r+1)%i],l=function(e,t,n,i,o,r,a,s){var l=n-e,c=i-t,d=a-o,u=s-r,m=d*c-l*u;if(1e-6>Math.abs(m))return null;var f=((e-o)*u-d*(t-r))/m;return f<0||f>1?null:new aB(f*l+e,f*c+t)}(a[0],a[1],s[0],s[1],t.x,t.y,n.x,n.y);l&&o.push({projPt:function(e,t,n){var i=new aB;aB.sub(i,n,t),i.normalize();var o=new aB;return aB.sub(o,e,t),o.dot(i)}(l,t,n),pt:l,idx:r})}if(o.length<2)return[{points:e},{points:e}];o.sort(function(e,t){return e.projPt-t.projPt});var c=o[0],d=o[o.length-1];if(d.idx<c.idx){var u=c;c=d,d=u}for(var m=[c.pt.x,c.pt.y],f=[d.pt.x,d.pt.y],p=[m],h=[f],r=c.idx+1;r<=d.idx;r++)wS(p,e[r].slice());wS(p,f),wS(p,m);for(var r=d.idx+1;r<=c.idx+i;r++)wS(h,e[r%i].slice());return wS(h,m),wS(h,f),[{points:p},{points:h}]}(t,c,d)}function wI(e,t,n,i){if(1===n)i.push(t);else{var o=Math.floor(n/2),r=e(t);wI(e,r[0],o,i),wI(e,r[1],n-o,i)}return i}function wO(e,t){for(var n=e.length,i=e[n-2],o=e[n-1],r=[],a=0;a<t.length;)r[a++]=i,r[a++]=o;return r}function wR(e){for(var t=0,n=0,i=0,o=e.length,r=0,a=o-2;r<o;a=r,r+=2){var s=e[a],l=e[a+1],c=e[r],d=e[r+1],u=s*d-c*l;t+=u,n+=(s+c)*u,i+=(l+d)*u}return 0===t?[e[0]||0,e[1]||0]:[n/t/3,i/t/3,t]}function wY(e){return e.__isCombineMorphing}var wP="__mOriginal_";function wN(e,t,n){var i=wP+t,o=e[i]||e[t];e[i]||(e[i]=e[t]);var r=n.replace,a=n.after,s=n.before;e[t]=function(){var e,t=arguments;return s&&s.apply(this,t),e=r?r.apply(this,t):o.apply(this,t),a&&a.apply(this,t),e}}function wB(e,t){var n=wP+t;e[n]&&(e[t]=e[n],e[n]=null)}function wH(e,t){for(var n=0;n<e.length;n++)for(var i=e[n],o=0;o<i.length;){var r=i[o],a=i[o+1];i[o++]=t[0]*r+t[2]*a+t[4],i[o++]=t[1]*r+t[3]*a+t[5]}}function wz(e,t){var n=e.getUpdatedPathProxy(),i=t.getUpdatedPathProxy(),o=function(e,t){for(var n,i,o,r=[],a=[],s=0;s<Math.max(e.length,t.length);s++){var l=e[s],c=t[s],d=void 0,u=void 0;l?c?(d=(n=function(e,t){var n=e.length,i=t.length;if(n===i)return[e,t];for(var o=[],r=[],a=n<i?e:t,s=Math.min(n,i),l=Math.abs(i-n)/6,c=Math.ceil(l/((s-2)/6))+1,d=[a[0],a[1]],u=l,m=2;m<s;){var f=a[m-2],p=a[m-1],h=a[m++],b=a[m++],g=a[m++],_=a[m++],y=a[m++],v=a[m++];if(u<=0){d.push(h,b,g,_,y,v);continue}for(var F=Math.min(u,c-1)+1,x=1;x<=F;x++){var w=x/F;sM(f,h,g,y,w,o),sM(p,b,_,v,w,r),f=o[3],p=r[3],d.push(o[1],r[1],o[2],r[2],f,p),h=o[5],b=r[5],g=o[6],_=r[6]}u-=F-1}return a===e?[d,t]:[e,d]}(l,c))[0],u=n[1],i=d,o=u):(u=wO(o||l,l),d=l):(d=wO(i||c,c),u=c),r.push(d),a.push(u)}return[r,a]}(wA(n),wA(i)),r=o[0],a=o[1],s=e.getComputedTransform(),l=t.getComputedTransform();s&&wH(r,s),l&&wH(a,l),wN(t,"updateTransform",{replace:function(){this.transform=null}}),t.transform=null;var c=function(e,t,n,i){for(var o,r=[],a=0;a<e.length;a++){var s=e[a],l=t[a],c=wR(s),d=wR(l);null==o&&(o=c[2]<0!=d[2]<0);var u=[],m=[],f=0,p=1/0,h=[],b=s.length;o&&(s=function(e){for(var t=[],n=e.length,i=0;i<n;i+=2)t[i]=e[n-i-2],t[i+1]=e[n-i-1];return t}(s));for(var g=6*function(e,t,n,i){for(var o=(e.length-2)/6,r=1/0,a=0,s=e.length,l=s-2,c=0;c<o;c++){for(var d=6*c,u=0,m=0;m<s;m+=2){var f=0===m?d:(d+m-2)%l+2,p=e[f]-n[0],h=e[f+1]-n[1],b=t[m]-i[0],g=t[m+1]-i[1],_=b-p,y=g-h;u+=_*_+y*y}u<r&&(r=u,a=c)}return a}(s,l,c,d),_=b-2,y=0;y<_;y+=2){var v=(g+y)%_+2;u[y+2]=s[v]-c[0],u[y+3]=s[v+1]-c[1]}u[0]=s[g]-c[0],u[1]=s[g+1]-c[1];for(var F=i/10,x=-i/2;x<=i/2;x+=F){for(var w=Math.sin(x),k=Math.cos(x),E=0,y=0;y<s.length;y+=2){var T=u[y],M=u[y+1],A=l[y]-d[0],C=l[y+1]-d[1],D=A*k-C*w,S=A*w+C*k;h[y]=D,h[y+1]=S;var L=D-T,I=S-M;E+=L*L+I*I}if(E<p){p=E,f=x;for(var O=0;O<h.length;O++)m[O]=h[O]}}r.push({from:u,to:m,fromCp:c,toCp:d,rotation:-f})}return r}(r,a,10,Math.PI),d=[];wN(t,"buildPath",{replace:function(e){for(var n=t.__morphT,i=1-n,o=[],r=0;r<c.length;r++){var a=c[r],s=a.from,l=a.to,u=a.rotation*n,m=a.fromCp,f=a.toCp,p=Math.sin(u),h=Math.cos(u);o[0]=m[0]+n*(f[0]-m[0]),o[1]=m[1]+n*(f[1]-m[1]);for(var b=0;b<s.length;b+=2){var g=s[b],_=s[b+1],y=l[b],v=l[b+1],F=g*i+y*n,x=_*i+v*n;d[b]=F*h-x*p+o[0],d[b+1]=F*p+x*h+o[1]}var w=d[0],k=d[1];e.moveTo(w,k);for(var b=2;b<s.length;){var y=d[b++],v=d[b++],E=d[b++],T=d[b++],M=d[b++],A=d[b++];w===y&&k===v&&E===M&&T===A?e.lineTo(M,A):e.bezierCurveTo(y,v,E,T,M,A),w=M,k=A}}}})}function wj(e,t,n){if(!e||!t)return t;var i=n.done,o=n.during;return wz(e,t),t.__morphT=0,t.animateTo({__morphT:1},rw({during:function(e){t.dirtyShape(),o&&o(e)},done:function(){wB(t,"buildPath"),wB(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape(),i&&i()}},n)),t}function wU(e){var t=1/0,n=1/0,i=-1/0,o=-1/0,r=rA(e,function(e){var r=e.getBoundingRect(),a=e.getComputedTransform(),s=r.x+r.width/2+(a?a[4]:0),l=r.y+r.height/2+(a?a[5]:0);return t=Math.min(s,t),n=Math.min(l,n),i=Math.max(s,i),o=Math.max(l,o),[s,l]});return rA(r,function(r,a){return{cp:r,z:function(e,t,n,i,o,r){e=o===n?0:Math.round(32767*(e-n)/(o-n)),t=r===i?0:Math.round(32767*(t-i)/(r-i));for(var a,s=0,l=32768;l>0;l/=2){var c=0,d=0;(e&l)>0&&(c=1),(t&l)>0&&(d=1),s+=l*l*(3*c^d),0===d&&(1===c&&(e=l-1-e,t=l-1-t),a=e,e=t,t=a)}return s}(r[0],r[1],t,n,i,o),path:e[a]}}).sort(function(e,t){return e.z-t.z}).map(function(e){return e.path})}function wW(e){return function(e,t){var n,i=[],o=e.shape;switch(e.type){case"rect":!function(e,t,n){for(var i=e.width,o=e.height,r=i>o,a=wC([i,o],+!r,t),s=r?"width":"height",l=r?"height":"width",c=r?"x":"y",d=r?"y":"x",u=e[s]/a.length,m=0;m<a.length;m++)for(var f=e[l]/a[m],p=0;p<a[m];p++){var h={};h[c]=m*u,h[d]=p*f,h[s]=u,h[l]=f,h.x+=e.x,h.y+=e.y,n.push(h)}}(o,t,i),n=ut;break;case"sector":wD(o,t,i),n=hG;break;case"circle":wD({r0:0,r:o.r,startAngle:0,endAngle:2*Math.PI,cx:o.cx,cy:o.cy},t,i),n=hG;break;default:var r=e.getComputedTransform(),a=r?Math.sqrt(Math.max(r[0]*r[0]+r[1]*r[1],r[2]*r[2]+r[3]*r[3])):1,s=rA(function(e,t){var n=wA(e),i=[];t=t||1;for(var o=0;o<n.length;o++){var r=n[o],a=[],s=r[0],l=r[1];a.push(s,l);for(var c=2;c<r.length;){var d=r[c++],u=r[c++],m=r[c++],f=r[c++],p=r[c++],h=r[c++];!function e(t,n,i,o,r,a,s,l,c,d){if(wM(t,i)&&wM(n,o)&&wM(r,s)&&wM(a,l))return void c.push(s,l);var u=2/d,m=u*u,f=s-t,p=l-n,h=Math.sqrt(f*f+p*p);f/=h,p/=h;var b=i-t,g=o-n,_=r-s,y=a-l,v=b*b+g*g,F=_*_+y*y;if(v<m&&F<m)return void c.push(s,l);var x=f*b+p*g,w=-f*_-p*y;if(v-x*x<m&&x>=0&&F-w*w<m&&w>=0)return void c.push(s,l);var k=[],E=[];sM(t,i,r,s,.5,k),sM(n,o,a,l,.5,E),e(k[0],E[0],k[1],E[1],k[2],E[2],k[3],E[3],c,d),e(k[4],E[4],k[5],E[5],k[6],E[6],k[7],E[7],c,d)}(s,l,d,u,m,f,p,h,a,t),s=p,l=h}i.push(a)}return i}(e.getUpdatedPathProxy(),a),function(e){for(var t=[],n=0;n<e.length;)t.push([e[n++],e[n++]]);return t}),l=s.length;if(0===l)wI(wL,{points:s[0]},t,i);else if(l===t)for(var c=0;c<l;c++)i.push({points:s[c]});else{var d=0,u=rA(s,function(e){var t=[],n=[];db(e,t,n);var i=(n[1]-t[1])*(n[0]-t[0]);return d+=i,{poly:e,area:i}});u.sort(function(e,t){return t.area-e.area});for(var m=t,c=0;c<l;c++){var f=u[c];if(m<=0)break;var p=c===l-1?m:Math.ceil(f.area/d*t);p<0||(wI(wL,{points:f.poly},p,i),m-=p)}}n=hQ}if(!n){for(var h=[],b=0;b<t;b++)h.push(hT(e));return h}for(var g=[],c=0;c<i.length;c++){var _=new n;_.setShape(i[c]),_.setStyle(e.style),_.z=e.z,_.z2=e.z2,_.zlevel=e.zlevel,g.push(_)}return g}(e.path,e.count)}function wV(){return{fromIndividuals:[],toIndividuals:[],count:0}}function wG(e,t){for(var n=[],i=e.length,o=0;o<i;o++)n.push({one:e[o],many:[]});for(var o=0;o<t.length;o++){var r=t[o].length,a=void 0;for(a=0;a<r;a++)n[a%i].many.push(t[o][a])}for(var s=0,o=i-1;o>=0;o--)if(!n[o].many.length){var l=n[s].many;if(l.length<=1)if(!s)return n;else s=0;var r=l.length,c=Math.ceil(r/2);n[o].many=l.slice(c,r),n[s].many=l.slice(0,c),s++}return n}var w$={clone:function(e){for(var t=[],n=1-Math.pow(1-e.path.style.opacity,1/e.count),i=0;i<e.count;i++){var o=hT(e.path);o.setStyle("opacity",n),t.push(o)}return t},split:null};function wq(e,t,n,i,o,r){if(e.length&&t.length){var a,s,l=bF("update",i,o);if(l&&l.duration>0){var c=i.getModel("universalTransition").get("delay"),d=Object.assign({setToFinal:!0},l);rO(e[0])&&(a=e,s=t),rO(t[0])&&(a=t,s=e);for(var u=a?a===e:e.length>t.length,m=a?wG(s,a):wG(u?t:e,[u?e:t]),f=0,p=0;p<m.length;p++)f+=m[p].many.length;for(var h=0,p=0;p<m.length;p++)(function e(t,i,o,a,s){var l=t.many,u=t.one;if(1!==l.length||s)for(var m=rw({dividePath:w$[n],individualDelay:c&&function(e,t,n,i){return c(e+o,a)}},d),f=i?function(e,t,n){var i=[];!function e(t){for(var n=0;n<t.length;n++){var o=t[n];wY(o)?e(o.childrenRef()):o instanceof dJ&&i.push(o)}}(e);var o=i.length;if(!o)return wV();var r=(n.dividePath||wW)({path:t,count:o});if(r.length!==o)return console.error("Invalid morphing: unmatched splitted path"),wV();i=wU(i),r=wU(r);for(var a=n.done,s=n.during,l=n.individualDelay,c=new lC,d=0;d<o;d++){var u=i[d],m=r[d];m.parent=t,m.copyTransform(c),l||wz(u,m)}function f(e){for(var t=0;t<r.length;t++)r[t].addSelfToZr(e)}function p(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,wB(t,"addSelfToZr"),wB(t,"removeSelfFromZr")}t.__isCombineMorphing=!0,t.childrenRef=function(){return r},wN(t,"addSelfToZr",{after:function(e){f(e)}}),wN(t,"removeSelfFromZr",{after:function(e){for(var t=0;t<r.length;t++)r[t].removeSelfFromZr(e)}});var h=r.length;if(l)for(var b=h,g=function(){0==--b&&(p(),a&&a())},d=0;d<h;d++){var _=l?rw({delay:(n.delay||0)+l(d,h,i[d],r[d]),done:g},n):n;wj(i[d],r[d],_)}else t.__morphT=0,t.animateTo({__morphT:1},rw({during:function(e){for(var n=0;n<h;n++){var i=r[n];i.__morphT=t.__morphT,i.dirtyShape()}s&&s(e)},done:function(){p();for(var t=0;t<e.length;t++)wB(e[t],"updateTransform");a&&a()}},n));return t.__zr&&f(t.__zr),{fromIndividuals:i,toIndividuals:r,count:h}}(l,u,m):function(e,t,n){var i=t.length,o=[],r=n.dividePath||wW;if(wY(e)){!function e(t){for(var n=0;n<t.length;n++){var i=t[n];wY(i)?e(i.childrenRef()):i instanceof dJ&&o.push(i)}}(e.childrenRef());var a=o.length;if(a<i)for(var s=0,l=a;l<i;l++)o.push(hT(o[s++%a]));o.length=i}else{o=r({path:e,count:i});for(var c=e.getComputedTransform(),l=0;l<o.length;l++)o[l].setLocalTransform(c);if(o.length!==i)return console.error("Invalid morphing: unmatched splitted path"),wV()}o=wU(o),t=wU(t);for(var d=n.individualDelay,l=0;l<i;l++){var u=d?rw({delay:(n.delay||0)+d(l,i,o[l],t[l])},n):n;wj(o[l],t[l],u)}return{fromIndividuals:o,toIndividuals:t,count:t.length}}(u,l,m),p=f.fromIndividuals,h=f.toIndividuals,b=p.length,g=0;g<b;g++){var _=c?rw({delay:c(g,b)},d):d;r(p[g],h[g],i?l[g]:t.one,i?t.one:l[g],_)}else{var y=i?l[0]:u,v=i?u:l[0];if(wY(y))e({many:[y],one:v},!0,o,a,!0);else{var _=c?rw({delay:c(o,a)},d):d;wj(y,v,_),r(y,v,y,v,_)}}})(m[p],u,h,f),h+=m[p].many.length}}}function wX(e){if(!e)return[];if(rO(e)){for(var t=[],n=0;n<e.length;n++)t.push(wX(e[n]));return t}var i=[];return e.traverse(function(e){e instanceof dJ&&!e.disableMorphing&&!e.invisible&&!e.ignore&&i.push(e)}),i}var wK=ck();function wJ(e,t,n,i){var o=function(e,t){for(var n=e.dimensions,i=0;i<n.length;i++){var o=e.getDimensionInfo(n[i]);if(o&&0===o.otherDims[t])return n[i]}}(e,i?"itemChildGroupId":"itemGroupId");if(o){var r=e,a=t,s=o,l=r.getDimensionInfo(s),c=l&&l.ordinalMeta;if(l){var d=r.get(l.name,a);return c&&c.categories[d]||d+""}return}var u=e.getRawDataItem(t),m=i?"childGroupId":"groupId";return u&&u[m]?u[m]+"":i?void 0:n||e.getId(t)}function wZ(e){var t=[];return rM(e,function(e){var n=e.data,i=e.dataGroupId;if(!(n.count()>1e4))for(var o=n.getIndices(),r=0;r<o.length;r++)t.push({data:n,groupId:wJ(n,r,i,!1),childGroupId:wJ(n,r,i,!0),divide:e.divide,dataIndex:r})}),t}function wQ(e,t,n){e.traverse(function(e){e instanceof dJ&&bk(e,{style:{opacity:0}},t,{dataIndex:n,isFrom:!0})})}function w0(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function w1(e){e.stopAnimation(),e.isGroup&&e.traverse(function(e){e.stopAnimation()})}function w2(e,t,n){var i=wZ(e),o=wZ(t);function r(e,t,n,i,o){(n||e)&&t.animateFrom({style:n&&n!==e?rx(rx({},n.style),e.style):e.style},o)}var a=!1,s=0,l=r1(),c=r1();i.forEach(function(e){e.groupId&&l.set(e.groupId,!0),e.childGroupId&&c.set(e.childGroupId,!0)});for(var d=0;d<o.length;d++){var u=o[d].groupId;if(c.get(u)){s=1;break}var m=o[d].childGroupId;if(m&&l.get(m)){s=2;break}}function f(e,t){return function(n){var i=n.data,o=n.dataIndex;return t?i.getId(o):e?1===s?n.childGroupId:n.groupId:2===s?n.childGroupId:n.groupId}}var p=function(e,t){var n=e.length;if(n!==t.length)return!1;for(var i=0;i<n;i++){var o=e[i],r=t[i];if(o.data.getId(o.dataIndex)!==r.data.getId(r.dataIndex))return!1}return!0}(i,o),h={};if(!p)for(var d=0;d<o.length;d++){var b=o[d],g=b.data.getItemGraphicEl(b.dataIndex);g&&(h[g.id]=!0)}function _(e,t){var n,s=i[t],l=o[e],c=l.data.hostModel,d=s.data.getItemGraphicEl(s.dataIndex),u=l.data.getItemGraphicEl(l.dataIndex);if(d===u){u&&(n=bF("update",c,l.dataIndex))&&u.traverse(function(e){if(e instanceof dr){var t=bv(e).oldStyle;t&&e.animateFrom({style:t},n)}});return}d&&h[d.id]||u&&(w1(u),d?(w1(d),w0(d),a=!0,wq(wX(d),wX(u),l.divide,c,e,r)):wQ(u,c,e))}new xX(i,o,f(!0,p),f(!1,p),null,"multiple").update(_).updateManyToOne(function(e,t){var n=o[e],s=n.data,l=s.hostModel,c=s.getItemGraphicEl(n.dataIndex),d=rD(rA(t,function(e){return i[e].data.getItemGraphicEl(i[e].dataIndex)}),function(e){return e&&e!==c&&!h[e.id]});c&&(w1(c),d.length?(rM(d,function(e){w1(e),w0(e)}),a=!0,wq(wX(d),wX(c),n.divide,l,e,r)):wQ(c,l,n.dataIndex))}).updateOneToMany(function(e,t){var n=i[t],s=n.data.getItemGraphicEl(n.dataIndex);if(!s||!h[s.id]){var l=rD(rA(e,function(e){return o[e].data.getItemGraphicEl(o[e].dataIndex)}),function(e){return e&&e!==s}),c=o[e[0]].data.hostModel;l.length&&(rM(l,function(e){return w1(e)}),s?(w1(s),w0(s),a=!0,wq(wX(s),wX(l),n.divide,c,e[0],r)):rM(l,function(t){return wQ(t,c,e[0])}))}}).updateManyToMany(function(e,t){new xX(t,e,function(e){return i[e].data.getId(i[e].dataIndex)},function(e){return o[e].data.getId(o[e].dataIndex)}).update(function(n,i){_(e[n],t[i])}).execute()}).execute(),a&&rM(t,function(e){var t=e.data.hostModel,i=t&&n.getViewOfSeriesModel(t),o=bF("update",t,0);i&&t.isAnimationEnabled()&&o&&o.duration>0&&i.group.traverse(function(e){e instanceof dJ&&!e.animators.length&&e.animateFrom({style:{opacity:0}},o)})})}function w5(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function w3(e){return rO(e)?e.sort().join(","):e}function w4(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function w6(e,t){for(var n=0;n<e.length;n++)if(null!=t.seriesIndex&&t.seriesIndex===e[n].seriesIndex||null!=t.seriesId&&t.seriesId===e[n].id)return n}let{I:w8}={M:tL,P:tI,A:tO,C:1,L:t2,R:t4,D:tH,V:t3,I:t6,H:t8,N:t9,U:ne,B:t7,F:nt},w7=(e,t)=>void 0===t?void 0!==e?._$litType$:e?._$litType$===t,w9=()=>document.createComment(""),ke=(e,t,n)=>{let i=e._$AA.parentNode,o=void 0===t?e._$AB:t._$AA;if(void 0===n)n=new w8(i.insertBefore(w9(),o),i.insertBefore(w9(),o),e,e.options);else{let t=n._$AB.nextSibling,r=n._$AM,a=r!==e;if(a){let t;n._$AQ?.(e),n._$AM=e,void 0!==n._$AP&&(t=e._$AU)!==r._$AU&&n._$AP(t)}if(t!==o||a){let e=n._$AA;for(;e!==t;){let t=e.nextSibling;i.insertBefore(e,o),e=t}}}return n},kt={},kn=(e,t=kt)=>e._$AH=t,ki=(e,t)=>{let n=e._$AN;if(void 0===n)return!1;for(let e of n)e._$AO?.(t,!1),ki(e,t);return!0},ko=e=>{let t,n;do{if(void 0===(t=e._$AM))break;(n=t._$AN).delete(e),e=t}while(0===n?.size)},kr=e=>{for(let t;t=e._$AM;e=t){let n=t._$AN;if(void 0===n)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),kl(t)}};function ka(e){void 0!==this._$AN?(ko(this),this._$AM=e,kr(this)):this._$AM=e}function ks(e,t=!1,n=0){let i=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(t)if(Array.isArray(i))for(let e=n;e<i.length;e++)ki(i[e],!1),ko(i[e]);else null!=i&&(ki(i,!1),ko(i));else ki(this,e)}let kl=e=>{e.type==oH.CHILD&&(e._$AP??=ks,e._$AQ??=ka)};class kc extends oj{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),kr(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(ki(this,e),ko(this))}setValue(e){if(void 0===this._$Ct.strings)this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}let kd=()=>new ku;class ku{}let km=new WeakMap,kf=oz(class extends kc{render(e){return tZ}update(e,[t]){let n=t!==this.G;return n&&void 0!==this.G&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),tZ}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){let t=this.ht??globalThis,n=km.get(t);void 0===n&&(n=new WeakMap,km.set(t,n)),void 0!==n.get(this.G)&&this.G.call(this.ht,void 0),n.set(this.G,e),void 0!==e&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return"function"==typeof this.G?km.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),kp=oz(class extends oj{constructor(e){if(super(e),e.type!==oH.ATTRIBUTE||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(void 0===this.st){for(let n in this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e))),t)t[n]&&!this.nt?.has(n)&&this.st.add(n);return this.render(t)}let n=e.element.classList;for(let e of this.st)e in t||(n.remove(e),this.st.delete(e));for(let e in t){let i=!!t[e];i===this.st.has(e)||this.nt?.has(e)||(i?(n.add(e),this.st.add(e)):(n.remove(e),this.st.delete(e)))}return tJ}});function kh(e,t,n){return e?t(e):n?.(e)}class kb{constructor(e){this.G=e}disconnect(){this.G=void 0}reconnect(e){this.G=e}deref(){return this.G}}class kg{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){this.Y??=new Promise(e=>this.Z=e)}resume(){this.Z?.(),this.Y=this.Z=void 0}}let k_=e=>!(e=>null===e||"object"!=typeof e&&"function"!=typeof e)(e)&&"function"==typeof e.then,ky=oz(class extends kc{constructor(){super(...arguments),this._$Cwt=0x3fffffff,this._$Cbt=[],this._$CK=new kb(this),this._$CX=new kg}render(...e){return e.find(e=>!k_(e))??tJ}update(e,t){let n=this._$Cbt,i=n.length;this._$Cbt=t;let o=this._$CK,r=this._$CX;this.isConnected||this.disconnected();for(let e=0;e<t.length&&!(e>this._$Cwt);e++){let a=t[e];if(!k_(a))return this._$Cwt=e,a;e<i&&a===n[e]||(this._$Cwt=0x3fffffff,i=0,Promise.resolve(a).then(async e=>{for(;r.get();)await r.get();let t=o.deref();if(void 0!==t){let n=t._$Cbt.indexOf(a);n>-1&&n<t._$Cwt&&(t._$Cwt=n,t.setValue(e))}}))}return tJ}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}});var kv=function(e,t){return(kv=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function kF(e,t){function n(){this.constructor=e}kv(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var kx=function(){return(kx=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function kw(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function kk(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}(arguments[t]));return e}var kE=function(){function e(e){void 0===e&&(e={}),this.adapter=e}return Object.defineProperty(e,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.destroy=function(){},e}(),kT=function(){function e(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];this.root=e,this.initialize.apply(this,kk(n)),this.foundation=void 0===t?this.getDefaultFoundation():t,this.foundation.init(),this.initialSyncWithDOM()}return e.attachTo=function(t){return new e(t,new kE({}))},e.prototype.initialize=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.getDefaultFoundation=function(){throw Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},e.prototype.initialSyncWithDOM=function(){},e.prototype.destroy=function(){this.foundation.destroy()},e.prototype.listen=function(e,t,n){this.root.addEventListener(e,t,n)},e.prototype.unlisten=function(e,t,n){this.root.removeEventListener(e,t,n)},e.prototype.emit=function(e,t,n){var i;void 0===n&&(n=!1),"function"==typeof CustomEvent?i=new CustomEvent(e,{bubbles:n,detail:t}):(i=document.createEvent("CustomEvent")).initCustomEvent(e,n,!1,t),this.root.dispatchEvent(i)},e}();function kM(e){return void 0===e&&(e=window),!!function(e){void 0===e&&(e=window);var t=!1;try{var n={get passive(){return t=!0,!1}},i=function(){};e.document.addEventListener("test",i,n),e.document.removeEventListener("test",i,n)}catch(e){t=!1}return t}(e)&&{passive:!0}}function kA(e,t){if(e.closest)return e.closest(t);for(var n=e;n;){if(kC(n,t))return n;n=n.parentElement}return null}function kC(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}var kD={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},kS=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.shakeAnimationEndHandler_=function(){return i.handleShakeAnimationEnd_()},i}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return kD},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler_)},t.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler_)},t.prototype.getWidth=function(){return this.adapter.getWidth()},t.prototype.shake=function(e){var n=t.cssClasses.LABEL_SHAKE;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.float=function(e){var n=t.cssClasses,i=n.LABEL_FLOAT_ABOVE,o=n.LABEL_SHAKE;e?this.adapter.addClass(i):(this.adapter.removeClass(i),this.adapter.removeClass(o))},t.prototype.setRequired=function(e){var n=t.cssClasses.LABEL_REQUIRED;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.handleShakeAnimationEnd_=function(){var e=t.cssClasses.LABEL_SHAKE;this.adapter.removeClass(e)},t}(kE),kL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},t.prototype.shake=function(e){this.foundation.shake(e)},t.prototype.float=function(e){this.foundation.float(e)},t.prototype.setRequired=function(e){this.foundation.setRequired(e)},t.prototype.getWidth=function(){return this.foundation.getWidth()},t.prototype.getDefaultFoundation=function(){var e=this;return new kS({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},getWidth:function(){var t=e.root;if(null!==t.offsetParent)return t.scrollWidth;var n=t.cloneNode(!0);n.style.setProperty("position","absolute"),n.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(n);var i=n.scrollWidth;return document.documentElement.removeChild(n),i},registerInteractionHandler:function(t,n){return e.listen(t,n)},deregisterInteractionHandler:function(t,n){return e.unlisten(t,n)}})},t}(kT),kI={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},kO=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.transitionEndHandler_=function(e){return i.handleTransitionEnd(e)},i}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return kI},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler_)},t.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler_)},t.prototype.activate=function(){this.adapter.removeClass(kI.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(kI.LINE_RIPPLE_ACTIVE)},t.prototype.setRippleCenter=function(e){this.adapter.setStyle("transform-origin",e+"px center")},t.prototype.deactivate=function(){this.adapter.addClass(kI.LINE_RIPPLE_DEACTIVATING)},t.prototype.handleTransitionEnd=function(e){var t=this.adapter.hasClass(kI.LINE_RIPPLE_DEACTIVATING);"opacity"===e.propertyName&&t&&(this.adapter.removeClass(kI.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(kI.LINE_RIPPLE_DEACTIVATING))},t}(kE),kR=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},t.prototype.activate=function(){this.foundation.activate()},t.prototype.deactivate=function(){this.foundation.deactivate()},t.prototype.setRippleCenter=function(e){this.foundation.setRippleCenter(e)},t.prototype.getDefaultFoundation=function(){var e=this;return new kO({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},setStyle:function(t,n){return e.root.style.setProperty(t,n)},registerEventHandler:function(t,n){return e.listen(t,n)},deregisterEventHandler:function(t,n){return e.unlisten(t,n)}})},t}(kT),kY={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},kP={NOTCH_ELEMENT_PADDING:8},kN={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},kB=function(e){function t(n){return e.call(this,kx(kx({},t.defaultAdapter),n))||this}return kF(t,e),Object.defineProperty(t,"strings",{get:function(){return kY},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return kN},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return kP},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!0,configurable:!0}),t.prototype.notch=function(e){var n=t.cssClasses.OUTLINE_NOTCHED;e>0&&(e+=kP.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(e),this.adapter.addClass(n)},t.prototype.closeNotch=function(){var e=t.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(e),this.adapter.removeNotchWidthProperty()},t}(kE),kH=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){this.notchElement_=this.root.querySelector(kY.NOTCH_ELEMENT_SELECTOR);var e=this.root.querySelector("."+kS.cssClasses.ROOT);e?(e.style.transitionDuration="0s",this.root.classList.add(kN.OUTLINE_UPGRADED),requestAnimationFrame(function(){e.style.transitionDuration=""})):this.root.classList.add(kN.NO_LABEL)},t.prototype.notch=function(e){this.foundation.notch(e)},t.prototype.closeNotch=function(){this.foundation.closeNotch()},t.prototype.getDefaultFoundation=function(){var e=this;return new kB({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},setNotchWidthProperty:function(t){return e.notchElement_.style.setProperty("width",t+"px")},removeNotchWidthProperty:function(){return e.notchElement_.style.removeProperty("width")}})},t}(kT),kz={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},kj={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},kU={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},kW=["touchstart","pointerdown","mousedown","keydown"],kV=["touchend","pointerup","mouseup","contextmenu"],kG=[],k$=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.activationAnimationHasEnded_=!1,i.activationTimer_=0,i.fgDeactivationRemovalTimer_=0,i.fgScale_="0",i.frame_={width:0,height:0},i.initialSize_=0,i.layoutFrame_=0,i.maxRadius_=0,i.unboundedCoords_={left:0,top:0},i.activationState_=i.defaultActivationState_(),i.activationTimerCallback_=function(){i.activationAnimationHasEnded_=!0,i.runDeactivationUXLogicIfReady_()},i.activateHandler_=function(e){return i.activate_(e)},i.deactivateHandler_=function(){return i.deactivate_()},i.focusHandler_=function(){return i.handleFocus()},i.blurHandler_=function(){return i.handleBlur()},i.resizeHandler_=function(){return i.layout()},i}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return kz},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return kj},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return kU},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this,n=this.supportsPressRipple_();if(this.registerRootHandlers_(n),n){var i=t.cssClasses,o=i.ROOT,r=i.UNBOUNDED;requestAnimationFrame(function(){e.adapter.addClass(o),e.adapter.isUnbounded()&&(e.adapter.addClass(r),e.layoutInternal_())})}},t.prototype.destroy=function(){var e=this;if(this.supportsPressRipple_()){this.activationTimer_&&(clearTimeout(this.activationTimer_),this.activationTimer_=0,this.adapter.removeClass(t.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer_&&(clearTimeout(this.fgDeactivationRemovalTimer_),this.fgDeactivationRemovalTimer_=0,this.adapter.removeClass(t.cssClasses.FG_DEACTIVATION));var n=t.cssClasses,i=n.ROOT,o=n.UNBOUNDED;requestAnimationFrame(function(){e.adapter.removeClass(i),e.adapter.removeClass(o),e.removeCssVars_()})}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_()},t.prototype.activate=function(e){this.activate_(e)},t.prototype.deactivate=function(){this.deactivate_()},t.prototype.layout=function(){var e=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){e.layoutInternal_(),e.layoutFrame_=0})},t.prototype.setUnbounded=function(e){var n=t.cssClasses.UNBOUNDED;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.handleFocus=function(){var e=this;requestAnimationFrame(function(){return e.adapter.addClass(t.cssClasses.BG_FOCUSED)})},t.prototype.handleBlur=function(){var e=this;requestAnimationFrame(function(){return e.adapter.removeClass(t.cssClasses.BG_FOCUSED)})},t.prototype.supportsPressRipple_=function(){return this.adapter.browserSupportsCssVars()},t.prototype.defaultActivationState_=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},t.prototype.registerRootHandlers_=function(e){var t=this;e&&(kW.forEach(function(e){t.adapter.registerInteractionHandler(e,t.activateHandler_)}),this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler_)),this.adapter.registerInteractionHandler("focus",this.focusHandler_),this.adapter.registerInteractionHandler("blur",this.blurHandler_)},t.prototype.registerDeactivationHandlers_=function(e){var t=this;"keydown"===e.type?this.adapter.registerInteractionHandler("keyup",this.deactivateHandler_):kV.forEach(function(e){t.adapter.registerDocumentInteractionHandler(e,t.deactivateHandler_)})},t.prototype.deregisterRootHandlers_=function(){var e=this;kW.forEach(function(t){e.adapter.deregisterInteractionHandler(t,e.activateHandler_)}),this.adapter.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter.deregisterInteractionHandler("blur",this.blurHandler_),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler_)},t.prototype.deregisterDeactivationHandlers_=function(){var e=this;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler_),kV.forEach(function(t){e.adapter.deregisterDocumentInteractionHandler(t,e.deactivateHandler_)})},t.prototype.removeCssVars_=function(){var e=this,n=t.strings;Object.keys(n).forEach(function(t){0===t.indexOf("VAR_")&&e.adapter.updateCssVariable(n[t],null)})},t.prototype.activate_=function(e){var t=this;if(!this.adapter.isSurfaceDisabled()){var n=this.activationState_;if(!n.isActivated){var i=this.previousActivationEvent_;if(!(i&&void 0!==e&&i.type!==e.type)){if(n.isActivated=!0,n.isProgrammatic=void 0===e,n.activationEvent=e,n.wasActivatedByPointer=!n.isProgrammatic&&void 0!==e&&("mousedown"===e.type||"touchstart"===e.type||"pointerdown"===e.type),void 0!==e&&kG.length>0&&kG.some(function(e){return t.adapter.containsEventTarget(e)}))return void this.resetActivationState_();void 0!==e&&(kG.push(e.target),this.registerDeactivationHandlers_(e)),n.wasElementMadeActive=this.checkElementMadeActive_(e),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame(function(){kG=[],!n.wasElementMadeActive&&void 0!==e&&(" "===e.key||32===e.keyCode)&&(n.wasElementMadeActive=t.checkElementMadeActive_(e),n.wasElementMadeActive&&t.animateActivation_()),n.wasElementMadeActive||(t.activationState_=t.defaultActivationState_())})}}}},t.prototype.checkElementMadeActive_=function(e){return void 0===e||"keydown"!==e.type||this.adapter.isSurfaceActive()},t.prototype.animateActivation_=function(){var e=this,n=t.strings,i=n.VAR_FG_TRANSLATE_START,o=n.VAR_FG_TRANSLATE_END,r=t.cssClasses,a=r.FG_DEACTIVATION,s=r.FG_ACTIVATION,l=t.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var c="",d="";if(!this.adapter.isUnbounded()){var u=this.getFgTranslationCoordinates_(),m=u.startPoint,f=u.endPoint;c=m.x+"px, "+m.y+"px",d=f.x+"px, "+f.y+"px"}this.adapter.updateCssVariable(i,c),this.adapter.updateCssVariable(o,d),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter.removeClass(a),this.adapter.computeBoundingRect(),this.adapter.addClass(s),this.activationTimer_=setTimeout(function(){return e.activationTimerCallback_()},l)},t.prototype.getFgTranslationCoordinates_=function(){var e,t=this.activationState_,n=t.activationEvent;return{startPoint:e={x:(e=t.wasActivatedByPointer?function(e,t,n){if(!e)return{x:0,y:0};var i,o,r=t.x,a=t.y,s=r+n.left,l=a+n.top;return"touchstart"===e.type?(i=e.changedTouches[0].pageX-s,o=e.changedTouches[0].pageY-l):(i=e.pageX-s,o=e.pageY-l),{x:i,y:o}}(n,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame_.width/2,y:this.frame_.height/2}).x-this.initialSize_/2,y:e.y-this.initialSize_/2},endPoint:{x:this.frame_.width/2-this.initialSize_/2,y:this.frame_.height/2-this.initialSize_/2}}},t.prototype.runDeactivationUXLogicIfReady_=function(){var e=this,n=t.cssClasses.FG_DEACTIVATION,i=this.activationState_,o=i.hasDeactivationUXRun,r=i.isActivated;(o||!r)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter.addClass(n),this.fgDeactivationRemovalTimer_=setTimeout(function(){e.adapter.removeClass(n)},kU.FG_DEACTIVATION_MS))},t.prototype.rmBoundedActivationClasses_=function(){var e=t.cssClasses.FG_ACTIVATION;this.adapter.removeClass(e),this.activationAnimationHasEnded_=!1,this.adapter.computeBoundingRect()},t.prototype.resetActivationState_=function(){var e=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout(function(){return e.previousActivationEvent_=void 0},t.numbers.TAP_DELAY_MS)},t.prototype.deactivate_=function(){var e=this,t=this.activationState_;if(t.isActivated){var n=kx({},t);t.isProgrammatic?(requestAnimationFrame(function(){return e.animateDeactivation_(n)}),this.resetActivationState_()):(this.deregisterDeactivationHandlers_(),requestAnimationFrame(function(){e.activationState_.hasDeactivationUXRun=!0,e.animateDeactivation_(n),e.resetActivationState_()}))}},t.prototype.animateDeactivation_=function(e){var t=e.wasActivatedByPointer,n=e.wasElementMadeActive;(t||n)&&this.runDeactivationUXLogicIfReady_()},t.prototype.layoutInternal_=function(){this.frame_=this.adapter.computeBoundingRect();var e=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter.isUnbounded()?e:Math.sqrt(Math.pow(this.frame_.width,2)+Math.pow(this.frame_.height,2))+t.numbers.PADDING;var n=Math.floor(e*t.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&n%2!=0?this.initialSize_=n-1:this.initialSize_=n,this.fgScale_=""+this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()},t.prototype.updateLayoutCssVars_=function(){var e=t.strings,n=e.VAR_FG_SIZE,i=e.VAR_LEFT,o=e.VAR_TOP,r=e.VAR_FG_SCALE;this.adapter.updateCssVariable(n,this.initialSize_+"px"),this.adapter.updateCssVariable(r,this.fgScale_),this.adapter.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter.updateCssVariable(i,this.unboundedCoords_.left+"px"),this.adapter.updateCssVariable(o,this.unboundedCoords_.top+"px"))},t}(kE),kq=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.disabled=!1,t}return kF(t,e),t.attachTo=function(e,n){void 0===n&&(n={isUnbounded:void 0});var i=new t(e);return void 0!==n.isUnbounded&&(i.unbounded=n.isUnbounded),i},t.createAdapter=function(e){return{addClass:function(t){return e.root.classList.add(t)},browserSupportsCssVars:function(){return function(e,t){void 0===t&&(t=!1);var n=e.CSS,i=e4;if("boolean"==typeof e4&&!t)return e4;if(!(n&&"function"==typeof n.supports))return!1;var o=n.supports("--css-vars","yes"),r=n.supports("(--css-vars: yes)")&&n.supports("color","#00000000");return i=o||r,t||(e4=i),i}(window)},computeBoundingRect:function(){return e.root.getBoundingClientRect()},containsEventTarget:function(t){return e.root.contains(t)},deregisterDocumentInteractionHandler:function(e,t){return document.documentElement.removeEventListener(e,t,kM())},deregisterInteractionHandler:function(t,n){return e.root.removeEventListener(t,n,kM())},deregisterResizeHandler:function(e){return window.removeEventListener("resize",e)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return kC(e.root,":active")},isSurfaceDisabled:function(){return!!e.disabled},isUnbounded:function(){return!!e.unbounded},registerDocumentInteractionHandler:function(e,t){return document.documentElement.addEventListener(e,t,kM())},registerInteractionHandler:function(t,n){return e.root.addEventListener(t,n,kM())},registerResizeHandler:function(e){return window.addEventListener("resize",e)},removeClass:function(t){return e.root.classList.remove(t)},updateCssVariable:function(t,n){return e.root.style.setProperty(t,n)}}},Object.defineProperty(t.prototype,"unbounded",{get:function(){return!!this.unbounded_},set:function(e){this.unbounded_=!!e,this.setUnbounded_()},enumerable:!0,configurable:!0}),t.prototype.activate=function(){this.foundation.activate()},t.prototype.deactivate=function(){this.foundation.deactivate()},t.prototype.layout=function(){this.foundation.layout()},t.prototype.getDefaultFoundation=function(){return new k$(t.createAdapter(this))},t.prototype.initialSyncWithDOM=function(){var e=this.root;this.unbounded="mdcRippleIsUnbounded"in e.dataset},t.prototype.setUnbounded_=function(){this.foundation.setUnbounded(!!this.unbounded_)},t}(kT),kX={ROOT:"mdc-text-field-character-counter"},kK={ROOT_SELECTOR:"."+kX.ROOT},kJ=function(e){function t(n){return e.call(this,kx(kx({},t.defaultAdapter),n))||this}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return kX},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return kK},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{setContent:function(){}}},enumerable:!0,configurable:!0}),t.prototype.setCounterValue=function(e,t){e=Math.min(e,t),this.adapter.setContent(e+" / "+t)},t}(kE),kZ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!0,configurable:!0}),t.prototype.getDefaultFoundation=function(){var e=this;return new kJ({setContent:function(t){e.root.textContent=t}})},t}(kT),kQ={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},k0={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon"},k1={LABEL_SCALE:.75},k2=["pattern","min","max","required","step","minlength","maxlength"],k5=["color","date","datetime-local","month","range","time","week"],k3=["mousedown","touchstart"],k4=["click","keydown"],k6=function(e){function t(n,i){void 0===i&&(i={});var o=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return o.isFocused_=!1,o.receivedUserInput_=!1,o.isValid_=!0,o.useNativeValidation_=!0,o.validateOnValueChange_=!0,o.helperText_=i.helperText,o.characterCounter_=i.characterCounter,o.leadingIcon_=i.leadingIcon,o.trailingIcon_=i.trailingIcon,o.inputFocusHandler_=function(){return o.activateFocus()},o.inputBlurHandler_=function(){return o.deactivateFocus()},o.inputInputHandler_=function(){return o.handleInput()},o.setPointerXOffset_=function(e){return o.setTransformOrigin(e)},o.textFieldInteractionHandler_=function(){return o.handleTextFieldInteraction()},o.validationAttributeChangeHandler_=function(e){return o.handleValidationAttributeChange(e)},o}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return k0},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return kQ},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return k1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shouldAlwaysFloat_",{get:function(){var e=this.getNativeInput_().type;return k5.indexOf(e)>=0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat_||this.isFocused_||!!this.getValue()||this.isBadInput_()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shouldShake",{get:function(){return!this.isFocused_&&!this.isValid()&&!!this.getValue()},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver(function(){})},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this;this.adapter.hasLabel()&&this.getNativeInput_().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler_():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating_(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler_),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler_),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler_),k3.forEach(function(t){e.adapter.registerInputInteractionHandler(t,e.setPointerXOffset_)}),k4.forEach(function(t){e.adapter.registerTextFieldInteractionHandler(t,e.textFieldInteractionHandler_)}),this.validationObserver_=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler_),this.setCharacterCounter_(this.getValue().length)},t.prototype.destroy=function(){var e=this;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler_),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler_),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler_),k3.forEach(function(t){e.adapter.deregisterInputInteractionHandler(t,e.setPointerXOffset_)}),k4.forEach(function(t){e.adapter.deregisterTextFieldInteractionHandler(t,e.textFieldInteractionHandler_)}),this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver_)},t.prototype.handleTextFieldInteraction=function(){var e=this.adapter.getNativeInput();e&&e.disabled||(this.receivedUserInput_=!0)},t.prototype.handleValidationAttributeChange=function(e){var t=this;e.some(function(e){return k2.indexOf(e)>-1&&(t.styleValidity_(!0),t.adapter.setLabelRequired(t.getNativeInput_().required),!0)}),e.indexOf("maxlength")>-1&&this.setCharacterCounter_(this.getValue().length)},t.prototype.notchOutline=function(e){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(e){var t=this.adapter.getLabelWidth()*k1.LABEL_SCALE;this.adapter.notchOutline(t)}else this.adapter.closeOutline()},t.prototype.activateFocus=function(){this.isFocused_=!0,this.styleFocused_(this.isFocused_),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating_(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.helperText_&&(this.helperText_.isPersistent()||!this.helperText_.isValidation()||!this.isValid_)&&this.helperText_.showToScreenReader()},t.prototype.setTransformOrigin=function(e){if(!(this.isDisabled()||this.adapter.hasOutline())){var t=e.touches,n=t?t[0]:e,i=n.target.getBoundingClientRect(),o=n.clientX-i.left;this.adapter.setLineRippleTransformOrigin(o)}},t.prototype.handleInput=function(){this.autoCompleteFocus(),this.setCharacterCounter_(this.getValue().length)},t.prototype.autoCompleteFocus=function(){this.receivedUserInput_||this.activateFocus()},t.prototype.deactivateFocus=function(){this.isFocused_=!1,this.adapter.deactivateLineRipple();var e=this.isValid();this.styleValidity_(e),this.styleFocused_(this.isFocused_),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating_(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput_=!1)},t.prototype.getValue=function(){return this.getNativeInput_().value},t.prototype.setValue=function(e){if(this.getValue()!==e&&(this.getNativeInput_().value=e),this.setCharacterCounter_(e.length),this.validateOnValueChange_){var t=this.isValid();this.styleValidity_(t)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating_(this.shouldFloat),this.validateOnValueChange_&&this.adapter.shakeLabel(this.shouldShake))},t.prototype.isValid=function(){return this.useNativeValidation_?this.isNativeInputValid_():this.isValid_},t.prototype.setValid=function(e){this.isValid_=e,this.styleValidity_(e);var t=!e&&!this.isFocused_&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(t)},t.prototype.setValidateOnValueChange=function(e){this.validateOnValueChange_=e},t.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange_},t.prototype.setUseNativeValidation=function(e){this.useNativeValidation_=e},t.prototype.isDisabled=function(){return this.getNativeInput_().disabled},t.prototype.setDisabled=function(e){this.getNativeInput_().disabled=e,this.styleDisabled_(e)},t.prototype.setHelperTextContent=function(e){this.helperText_&&this.helperText_.setContent(e)},t.prototype.setLeadingIconAriaLabel=function(e){this.leadingIcon_&&this.leadingIcon_.setAriaLabel(e)},t.prototype.setLeadingIconContent=function(e){this.leadingIcon_&&this.leadingIcon_.setContent(e)},t.prototype.setTrailingIconAriaLabel=function(e){this.trailingIcon_&&this.trailingIcon_.setAriaLabel(e)},t.prototype.setTrailingIconContent=function(e){this.trailingIcon_&&this.trailingIcon_.setContent(e)},t.prototype.setCharacterCounter_=function(e){if(this.characterCounter_){var t=this.getNativeInput_().maxLength;if(-1===t)throw Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter_.setCounterValue(e,t)}},t.prototype.isBadInput_=function(){return this.getNativeInput_().validity.badInput||!1},t.prototype.isNativeInputValid_=function(){return this.getNativeInput_().validity.valid},t.prototype.styleValidity_=function(e){var n=t.cssClasses.INVALID;if(e?this.adapter.removeClass(n):this.adapter.addClass(n),this.helperText_){if(this.helperText_.setValidity(e),!this.helperText_.isValidation())return;var i=this.helperText_.isVisible(),o=this.helperText_.getId();i&&o?this.adapter.setInputAttr(kQ.ARIA_DESCRIBEDBY,o):this.adapter.removeInputAttr(kQ.ARIA_DESCRIBEDBY)}},t.prototype.styleFocused_=function(e){var n=t.cssClasses.FOCUSED;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.styleDisabled_=function(e){var n=t.cssClasses,i=n.DISABLED,o=n.INVALID;e?(this.adapter.addClass(i),this.adapter.removeClass(o)):this.adapter.removeClass(i),this.leadingIcon_&&this.leadingIcon_.setDisabled(e),this.trailingIcon_&&this.trailingIcon_.setDisabled(e)},t.prototype.styleFloating_=function(e){var n=t.cssClasses.LABEL_FLOATING;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.getNativeInput_=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},t}(kE),k8={HELPER_TEXT_PERSISTENT:"mdc-text-field-helper-text--persistent",HELPER_TEXT_VALIDATION_MSG:"mdc-text-field-helper-text--validation-msg",ROOT:"mdc-text-field-helper-text"},k7={ARIA_HIDDEN:"aria-hidden",ROLE:"role",ROOT_SELECTOR:"."+k8.ROOT},k9=function(e){function t(n){return e.call(this,kx(kx({},t.defaultAdapter),n))||this}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return k8},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return k7},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){}}},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this.adapter.getAttr("id")},t.prototype.isVisible=function(){return"true"!==this.adapter.getAttr(k7.ARIA_HIDDEN)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.isPersistent=function(){return this.adapter.hasClass(k8.HELPER_TEXT_PERSISTENT)},t.prototype.setPersistent=function(e){e?this.adapter.addClass(k8.HELPER_TEXT_PERSISTENT):this.adapter.removeClass(k8.HELPER_TEXT_PERSISTENT)},t.prototype.isValidation=function(){return this.adapter.hasClass(k8.HELPER_TEXT_VALIDATION_MSG)},t.prototype.setValidation=function(e){e?this.adapter.addClass(k8.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(k8.HELPER_TEXT_VALIDATION_MSG)},t.prototype.showToScreenReader=function(){this.adapter.removeAttr(k7.ARIA_HIDDEN)},t.prototype.setValidity=function(e){var t=this.adapter.hasClass(k8.HELPER_TEXT_PERSISTENT),n=this.adapter.hasClass(k8.HELPER_TEXT_VALIDATION_MSG)&&!e;n?(this.showToScreenReader(),this.adapter.setAttr(k7.ROLE,"alert")):this.adapter.removeAttr(k7.ROLE),t||n||this.hide_()},t.prototype.hide_=function(){this.adapter.setAttr(k7.ARIA_HIDDEN,"true")},t}(kE),Ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!0,configurable:!0}),t.prototype.getDefaultFoundation=function(){var e=this;return new k9({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){return e.root.setAttribute(t,n)},removeAttr:function(t){return e.root.removeAttribute(t)},setContent:function(t){e.root.textContent=t}})},t}(kT),Et={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"},En={ROOT:"mdc-text-field__icon"},Ei=["click","keydown"],Eo=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.savedTabIndex_=null,i.interactionHandler_=function(e){return i.handleInteraction(e)},i}return kF(t,e),Object.defineProperty(t,"strings",{get:function(){return Et},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return En},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this;this.savedTabIndex_=this.adapter.getAttr("tabindex"),Ei.forEach(function(t){e.adapter.registerInteractionHandler(t,e.interactionHandler_)})},t.prototype.destroy=function(){var e=this;Ei.forEach(function(t){e.adapter.deregisterInteractionHandler(t,e.interactionHandler_)})},t.prototype.setDisabled=function(e){this.savedTabIndex_&&(e?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex_),this.adapter.setAttr("role",Et.ICON_ROLE)))},t.prototype.setAriaLabel=function(e){this.adapter.setAttr("aria-label",e)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.handleInteraction=function(e){var t="Enter"===e.key||13===e.keyCode;("click"===e.type||t)&&(e.preventDefault(),this.adapter.notifyIconAction())},t}(kE),Er=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!0,configurable:!0}),t.prototype.getDefaultFoundation=function(){var e=this;return new Eo({getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){return e.root.setAttribute(t,n)},removeAttr:function(t){return e.root.removeAttribute(t)},setContent:function(t){e.root.textContent=t},registerInteractionHandler:function(t,n){return e.listen(t,n)},deregisterInteractionHandler:function(t,n){return e.unlisten(t,n)},notifyIconAction:function(){return e.emit(Eo.strings.ICON_EVENT,{},!0)}})},t}(kT),Ea=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e,t,n,i,o,r,a){void 0===e&&(e=function(e,t){return new kq(e,t)}),void 0===t&&(t=function(e){return new kR(e)}),void 0===n&&(n=function(e){return new Ee(e)}),void 0===i&&(i=function(e){return new kZ(e)}),void 0===o&&(o=function(e){return new Er(e)}),void 0===r&&(r=function(e){return new kL(e)}),void 0===a&&(a=function(e){return new kH(e)}),this.input_=this.root.querySelector(kQ.INPUT_SELECTOR);var s=this.root.querySelector(kQ.LABEL_SELECTOR);this.label_=s?r(s):null;var l=this.root.querySelector(kQ.LINE_RIPPLE_SELECTOR);this.lineRipple_=l?t(l):null;var c=this.root.querySelector(kQ.OUTLINE_SELECTOR);this.outline_=c?a(c):null;var d=k9.strings,u=this.root.nextElementSibling,m=u&&u.classList.contains(k0.HELPER_LINE),f=m&&u&&u.querySelector(d.ROOT_SELECTOR);this.helperText_=f?n(f):null;var p=kJ.strings,h=this.root.querySelector(p.ROOT_SELECTOR);!h&&m&&u&&(h=u.querySelector(p.ROOT_SELECTOR)),this.characterCounter_=h?i(h):null;var b=this.root.querySelector(kQ.LEADING_ICON_SELECTOR);this.leadingIcon_=b?o(b):null;var g=this.root.querySelector(kQ.TRAILING_ICON_SELECTOR);this.trailingIcon_=g?o(g):null,this.prefix_=this.root.querySelector(kQ.PREFIX_SELECTOR),this.suffix_=this.root.querySelector(kQ.SUFFIX_SELECTOR),this.ripple=this.createRipple_(e)},t.prototype.destroy=function(){this.ripple&&this.ripple.destroy(),this.lineRipple_&&this.lineRipple_.destroy(),this.helperText_&&this.helperText_.destroy(),this.characterCounter_&&this.characterCounter_.destroy(),this.leadingIcon_&&this.leadingIcon_.destroy(),this.trailingIcon_&&this.trailingIcon_.destroy(),this.label_&&this.label_.destroy(),this.outline_&&this.outline_.destroy(),e.prototype.destroy.call(this)},t.prototype.initialSyncWithDOM=function(){this.disabled=this.input_.disabled},Object.defineProperty(t.prototype,"value",{get:function(){return this.foundation.getValue()},set:function(e){this.foundation.setValue(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.foundation.isDisabled()},set:function(e){this.foundation.setDisabled(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return this.foundation.isValid()},set:function(e){this.foundation.setValid(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return this.input_.required},set:function(e){this.input_.required=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pattern",{get:function(){return this.input_.pattern},set:function(e){this.input_.pattern=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minLength",{get:function(){return this.input_.minLength},set:function(e){this.input_.minLength=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxLength",{get:function(){return this.input_.maxLength},set:function(e){e<0?this.input_.removeAttribute("maxLength"):this.input_.maxLength=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this.input_.min},set:function(e){this.input_.min=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this.input_.max},set:function(e){this.input_.max=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"step",{get:function(){return this.input_.step},set:function(e){this.input_.step=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"helperTextContent",{set:function(e){this.foundation.setHelperTextContent(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"leadingIconAriaLabel",{set:function(e){this.foundation.setLeadingIconAriaLabel(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"leadingIconContent",{set:function(e){this.foundation.setLeadingIconContent(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"trailingIconAriaLabel",{set:function(e){this.foundation.setTrailingIconAriaLabel(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"trailingIconContent",{set:function(e){this.foundation.setTrailingIconContent(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"useNativeValidation",{set:function(e){this.foundation.setUseNativeValidation(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"prefixText",{get:function(){return this.prefix_?this.prefix_.textContent:null},set:function(e){this.prefix_&&(this.prefix_.textContent=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"suffixText",{get:function(){return this.suffix_?this.suffix_.textContent:null},set:function(e){this.suffix_&&(this.suffix_.textContent=e)},enumerable:!0,configurable:!0}),t.prototype.focus=function(){this.input_.focus()},t.prototype.layout=function(){var e=this.foundation.shouldFloat;this.foundation.notchOutline(e)},t.prototype.getDefaultFoundation=function(){return new k6(kx(kx(kx(kx(kx({},this.getRootAdapterMethods_()),this.getInputAdapterMethods_()),this.getLabelAdapterMethods_()),this.getLineRippleAdapterMethods_()),this.getOutlineAdapterMethods_()),this.getFoundationMap_())},t.prototype.getRootAdapterMethods_=function(){var e=this;return{addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},registerTextFieldInteractionHandler:function(t,n){e.listen(t,n)},deregisterTextFieldInteractionHandler:function(t,n){e.unlisten(t,n)},registerValidationAttributeChangeHandler:function(t){var n=new MutationObserver(function(e){return t(e.map(function(e){return e.attributeName}).filter(function(e){return e}))});return n.observe(e.input_,{attributes:!0}),n},deregisterValidationAttributeChangeHandler:function(e){e.disconnect()}}},t.prototype.getInputAdapterMethods_=function(){var e=this;return{getNativeInput:function(){return e.input_},setInputAttr:function(t,n){e.input_.setAttribute(t,n)},removeInputAttr:function(t){e.input_.removeAttribute(t)},isFocused:function(){return document.activeElement===e.input_},registerInputInteractionHandler:function(t,n){e.input_.addEventListener(t,n,kM())},deregisterInputInteractionHandler:function(t,n){e.input_.removeEventListener(t,n,kM())}}},t.prototype.getLabelAdapterMethods_=function(){var e=this;return{floatLabel:function(t){return e.label_&&e.label_.float(t)},getLabelWidth:function(){return e.label_?e.label_.getWidth():0},hasLabel:function(){return!!e.label_},shakeLabel:function(t){return e.label_&&e.label_.shake(t)},setLabelRequired:function(t){return e.label_&&e.label_.setRequired(t)}}},t.prototype.getLineRippleAdapterMethods_=function(){var e=this;return{activateLineRipple:function(){e.lineRipple_&&e.lineRipple_.activate()},deactivateLineRipple:function(){e.lineRipple_&&e.lineRipple_.deactivate()},setLineRippleTransformOrigin:function(t){e.lineRipple_&&e.lineRipple_.setRippleCenter(t)}}},t.prototype.getOutlineAdapterMethods_=function(){var e=this;return{closeOutline:function(){return e.outline_&&e.outline_.closeNotch()},hasOutline:function(){return!!e.outline_},notchOutline:function(t){return e.outline_&&e.outline_.notch(t)}}},t.prototype.getFoundationMap_=function(){return{characterCounter:this.characterCounter_?this.characterCounter_.foundationForTextField:void 0,helperText:this.helperText_?this.helperText_.foundationForTextField:void 0,leadingIcon:this.leadingIcon_?this.leadingIcon_.foundationForTextField:void 0,trailingIcon:this.trailingIcon_?this.trailingIcon_.foundationForTextField:void 0}},t.prototype.createRipple_=function(e){var t=this,n=this.root.classList.contains(k0.TEXTAREA),i=this.root.classList.contains(k0.OUTLINED);if(n||i)return null;var o=kx(kx({},kq.createAdapter(this)),{isSurfaceActive:function(){return kC(t.input_,":active")},registerInteractionHandler:function(e,n){return t.input_.addEventListener(e,n,kM())},deregisterInteractionHandler:function(e,n){return t.input_.removeEventListener(e,n,kM())}});return e(this.root,new k$(o))},t}(kT),Es={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}},El={animationend:{cssProperty:"animation",prefixed:"webkitAnimationEnd",standard:"animationend"},animationiteration:{cssProperty:"animation",prefixed:"webkitAnimationIteration",standard:"animationiteration"},animationstart:{cssProperty:"animation",prefixed:"webkitAnimationStart",standard:"animationstart"},transitionend:{cssProperty:"transition",prefixed:"webkitTransitionEnd",standard:"transitionend"}};function Ec(e){return!!e.document&&"function"==typeof e.document.createElement}function Ed(e,t){if(Ec(e)&&t in Es){var n=e.document.createElement("div"),i=Es[t],o=i.standard,r=i.prefixed;return o in n.style?o:r}return t}function Eu(e,t){if(Ec(e)&&t in El){var n=e.document.createElement("div"),i=El[t],o=i.standard,r=i.prefixed;return i.cssProperty in n.style?o:r}return t}var Em={ANIM_CHECKED_INDETERMINATE:"mdc-checkbox--anim-checked-indeterminate",ANIM_CHECKED_UNCHECKED:"mdc-checkbox--anim-checked-unchecked",ANIM_INDETERMINATE_CHECKED:"mdc-checkbox--anim-indeterminate-checked",ANIM_INDETERMINATE_UNCHECKED:"mdc-checkbox--anim-indeterminate-unchecked",ANIM_UNCHECKED_CHECKED:"mdc-checkbox--anim-unchecked-checked",ANIM_UNCHECKED_INDETERMINATE:"mdc-checkbox--anim-unchecked-indeterminate",BACKGROUND:"mdc-checkbox__background",CHECKED:"mdc-checkbox--checked",CHECKMARK:"mdc-checkbox__checkmark",CHECKMARK_PATH:"mdc-checkbox__checkmark-path",DISABLED:"mdc-checkbox--disabled",INDETERMINATE:"mdc-checkbox--indeterminate",MIXEDMARK:"mdc-checkbox__mixedmark",NATIVE_CONTROL:"mdc-checkbox__native-control",ROOT:"mdc-checkbox",SELECTED:"mdc-checkbox--selected",UPGRADED:"mdc-checkbox--upgraded"},Ef={ARIA_CHECKED_ATTR:"aria-checked",ARIA_CHECKED_INDETERMINATE_VALUE:"mixed",DATA_INDETERMINATE_ATTR:"data-indeterminate",NATIVE_CONTROL_SELECTOR:".mdc-checkbox__native-control",TRANSITION_STATE_CHECKED:"checked",TRANSITION_STATE_INDETERMINATE:"indeterminate",TRANSITION_STATE_INIT:"init",TRANSITION_STATE_UNCHECKED:"unchecked"},Ep={ANIM_END_LATCH_MS:250},Eh=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.currentCheckState_=Ef.TRANSITION_STATE_INIT,i.currentAnimationClass_="",i.animEndLatchTimer_=0,i.enableAnimationEndHandler_=!1,i}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Em},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Ef},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return Ep},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},forceLayout:function(){},hasNativeControl:function(){return!1},isAttachedToDOM:function(){return!1},isChecked:function(){return!1},isIndeterminate:function(){return!1},removeClass:function(){},removeNativeControlAttr:function(){},setNativeControlAttr:function(){},setNativeControlDisabled:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.currentCheckState_=this.determineCheckState_(),this.updateAriaChecked_(),this.adapter.addClass(Em.UPGRADED)},t.prototype.destroy=function(){clearTimeout(this.animEndLatchTimer_)},t.prototype.setDisabled=function(e){this.adapter.setNativeControlDisabled(e),e?this.adapter.addClass(Em.DISABLED):this.adapter.removeClass(Em.DISABLED)},t.prototype.handleAnimationEnd=function(){var e=this;this.enableAnimationEndHandler_&&(clearTimeout(this.animEndLatchTimer_),this.animEndLatchTimer_=setTimeout(function(){e.adapter.removeClass(e.currentAnimationClass_),e.enableAnimationEndHandler_=!1},Ep.ANIM_END_LATCH_MS))},t.prototype.handleChange=function(){this.transitionCheckState_()},t.prototype.transitionCheckState_=function(){if(this.adapter.hasNativeControl()){var e=this.currentCheckState_,t=this.determineCheckState_();if(e!==t){this.updateAriaChecked_();var n=Ef.TRANSITION_STATE_UNCHECKED,i=Em.SELECTED;t===n?this.adapter.removeClass(i):this.adapter.addClass(i),this.currentAnimationClass_.length>0&&(clearTimeout(this.animEndLatchTimer_),this.adapter.forceLayout(),this.adapter.removeClass(this.currentAnimationClass_)),this.currentAnimationClass_=this.getTransitionAnimationClass_(e,t),this.currentCheckState_=t,this.adapter.isAttachedToDOM()&&this.currentAnimationClass_.length>0&&(this.adapter.addClass(this.currentAnimationClass_),this.enableAnimationEndHandler_=!0)}}},t.prototype.determineCheckState_=function(){var e=Ef.TRANSITION_STATE_INDETERMINATE,t=Ef.TRANSITION_STATE_CHECKED,n=Ef.TRANSITION_STATE_UNCHECKED;return this.adapter.isIndeterminate()?e:this.adapter.isChecked()?t:n},t.prototype.getTransitionAnimationClass_=function(e,n){var i=Ef.TRANSITION_STATE_INIT,o=Ef.TRANSITION_STATE_CHECKED,r=Ef.TRANSITION_STATE_UNCHECKED,a=t.cssClasses,s=a.ANIM_UNCHECKED_CHECKED,l=a.ANIM_UNCHECKED_INDETERMINATE,c=a.ANIM_CHECKED_UNCHECKED,d=a.ANIM_CHECKED_INDETERMINATE,u=a.ANIM_INDETERMINATE_CHECKED,m=a.ANIM_INDETERMINATE_UNCHECKED;switch(e){case i:if(n===r)return"";return n===o?u:m;case r:return n===o?s:l;case o:return n===r?c:d;default:return n===o?u:m}},t.prototype.updateAriaChecked_=function(){this.adapter.isIndeterminate()?this.adapter.setNativeControlAttr(Ef.ARIA_CHECKED_ATTR,Ef.ARIA_CHECKED_INDETERMINATE_VALUE):this.adapter.removeNativeControlAttr(Ef.ARIA_CHECKED_ATTR)},t}(kE),Eb=["checked","indeterminate"],Eg=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ripple_=t.createRipple_(),t}return kF(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"ripple",{get:function(){return this.ripple_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this.nativeControl_.checked},set:function(e){this.nativeControl_.checked=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"indeterminate",{get:function(){return this.nativeControl_.indeterminate},set:function(e){this.nativeControl_.indeterminate=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.nativeControl_.disabled},set:function(e){this.foundation.setDisabled(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.nativeControl_.value},set:function(e){this.nativeControl_.value=e},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){var e=Ef.DATA_INDETERMINATE_ATTR;this.nativeControl_.indeterminate="true"===this.nativeControl_.getAttribute(e),this.nativeControl_.removeAttribute(e)},t.prototype.initialSyncWithDOM=function(){var e=this;this.handleChange_=function(){return e.foundation.handleChange()},this.handleAnimationEnd_=function(){return e.foundation.handleAnimationEnd()},this.nativeControl_.addEventListener("change",this.handleChange_),this.listen(Eu(window,"animationend"),this.handleAnimationEnd_),this.installPropertyChangeHooks_()},t.prototype.destroy=function(){this.ripple_.destroy(),this.nativeControl_.removeEventListener("change",this.handleChange_),this.unlisten(Eu(window,"animationend"),this.handleAnimationEnd_),this.uninstallPropertyChangeHooks_(),e.prototype.destroy.call(this)},t.prototype.getDefaultFoundation=function(){var e=this;return new Eh({addClass:function(t){return e.root.classList.add(t)},forceLayout:function(){return e.root.offsetWidth},hasNativeControl:function(){return!!e.nativeControl_},isAttachedToDOM:function(){return!!e.root.parentNode},isChecked:function(){return e.checked},isIndeterminate:function(){return e.indeterminate},removeClass:function(t){e.root.classList.remove(t)},removeNativeControlAttr:function(t){e.nativeControl_.removeAttribute(t)},setNativeControlAttr:function(t,n){e.nativeControl_.setAttribute(t,n)},setNativeControlDisabled:function(t){e.nativeControl_.disabled=t}})},t.prototype.createRipple_=function(){var e=this,t=kx(kx({},kq.createAdapter(this)),{deregisterInteractionHandler:function(t,n){return e.nativeControl_.removeEventListener(t,n,kM())},isSurfaceActive:function(){return kC(e.nativeControl_,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(t,n){return e.nativeControl_.addEventListener(t,n,kM())}});return new kq(this.root,new k$(t))},t.prototype.installPropertyChangeHooks_=function(){var e=this,t=this.nativeControl_,n=Object.getPrototypeOf(t);Eb.forEach(function(i){var o=Object.getOwnPropertyDescriptor(n,i);if(E_(o)){var r=o.get,a={configurable:o.configurable,enumerable:o.enumerable,get:r,set:function(n){o.set.call(t,n),e.foundation.handleChange()}};Object.defineProperty(t,i,a)}})},t.prototype.uninstallPropertyChangeHooks_=function(){var e=this.nativeControl_,t=Object.getPrototypeOf(e);Eb.forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);E_(i)&&Object.defineProperty(e,n,i)})},Object.defineProperty(t.prototype,"nativeControl_",{get:function(){var e=Ef.NATIVE_CONTROL_SELECTOR,t=this.root.querySelector(e);if(!t)throw Error("Checkbox component requires a "+e+" element");return t},enumerable:!0,configurable:!0}),t}(kT);function E_(e){return!!e&&"function"==typeof e.set}var Ey={CHECKED:"mdc-switch--checked",DISABLED:"mdc-switch--disabled"},Ev={ARIA_CHECKED_ATTR:"aria-checked",NATIVE_CONTROL_SELECTOR:".mdc-switch__native-control",RIPPLE_SURFACE_SELECTOR:".mdc-switch__thumb-underlay"},EF=function(e){function t(n){return e.call(this,kx(kx({},t.defaultAdapter),n))||this}return kF(t,e),Object.defineProperty(t,"strings",{get:function(){return Ev},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return Ey},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNativeControlChecked:function(){},setNativeControlDisabled:function(){},setNativeControlAttr:function(){}}},enumerable:!0,configurable:!0}),t.prototype.setChecked=function(e){this.adapter.setNativeControlChecked(e),this.updateAriaChecked_(e),this.updateCheckedStyling_(e)},t.prototype.setDisabled=function(e){this.adapter.setNativeControlDisabled(e),e?this.adapter.addClass(Ey.DISABLED):this.adapter.removeClass(Ey.DISABLED)},t.prototype.handleChange=function(e){var t=e.target;this.updateAriaChecked_(t.checked),this.updateCheckedStyling_(t.checked)},t.prototype.updateCheckedStyling_=function(e){e?this.adapter.addClass(Ey.CHECKED):this.adapter.removeClass(Ey.CHECKED)},t.prototype.updateAriaChecked_=function(e){this.adapter.setNativeControlAttr(Ev.ARIA_CHECKED_ATTR,""+!!e)},t}(kE),Ex=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ripple_=t.createRipple_(),t}return kF(t,e),t.attachTo=function(e){return new t(e)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.ripple_.destroy(),this.nativeControl_.removeEventListener("change",this.changeHandler_)},t.prototype.initialSyncWithDOM=function(){var e=this;this.changeHandler_=function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return(t=e.foundation).handleChange.apply(t,kk(n))},this.nativeControl_.addEventListener("change",this.changeHandler_),this.checked=this.checked},t.prototype.getDefaultFoundation=function(){var e=this;return new EF({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},setNativeControlChecked:function(t){return e.nativeControl_.checked=t},setNativeControlDisabled:function(t){return e.nativeControl_.disabled=t},setNativeControlAttr:function(t,n){return e.nativeControl_.setAttribute(t,n)}})},Object.defineProperty(t.prototype,"ripple",{get:function(){return this.ripple_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this.nativeControl_.checked},set:function(e){this.foundation.setChecked(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.nativeControl_.disabled},set:function(e){this.foundation.setDisabled(e)},enumerable:!0,configurable:!0}),t.prototype.createRipple_=function(){var e=this,t=EF.strings.RIPPLE_SURFACE_SELECTOR,n=this.root.querySelector(t),i=kx(kx({},kq.createAdapter(this)),{addClass:function(e){return n.classList.add(e)},computeBoundingRect:function(){return n.getBoundingClientRect()},deregisterInteractionHandler:function(t,n){e.nativeControl_.removeEventListener(t,n,kM())},isSurfaceActive:function(){return kC(e.nativeControl_,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(t,n){e.nativeControl_.addEventListener(t,n,kM())},removeClass:function(e){n.classList.remove(e)},updateCssVariable:function(e,t){n.style.setProperty(e,t)}});return new kq(this.root,new k$(i))},Object.defineProperty(t.prototype,"nativeControl_",{get:function(){var e=EF.strings.NATIVE_CONTROL_SELECTOR;return this.root.querySelector(e)},enumerable:!0,configurable:!0}),t}(kT),Ew={DISABLED:"mdc-slider--disabled",DISCRETE:"mdc-slider--discrete",INPUT:"mdc-slider__input",RANGE:"mdc-slider--range",THUMB:"mdc-slider__thumb",THUMB_KNOB:"mdc-slider__thumb-knob",THUMB_TOP:"mdc-slider__thumb--top",THUMB_WITH_INDICATOR:"mdc-slider__thumb--with-indicator",TICK_MARKS:"mdc-slider--tick-marks",TICK_MARKS_CONTAINER:"mdc-slider__tick-marks",TICK_MARK_ACTIVE:"mdc-slider__tick-mark--active",TICK_MARK_INACTIVE:"mdc-slider__tick-mark--inactive",TRACK:"mdc-slider__track",TRACK_ACTIVE:"mdc-slider__track--active_fill",VALUE_INDICATOR_TEXT:"mdc-slider__value-indicator-text"},Ek={STEP_SIZE:1,THUMB_UPDATE_MIN_PX:5},EE={ARIA_VALUETEXT:"aria-valuetext",INPUT_DISABLED:"disabled",INPUT_MIN:"min",INPUT_MAX:"max",INPUT_VALUE:"value",INPUT_STEP:"step"},ET={CHANGE:"MDCSlider:change",INPUT:"MDCSlider:input"};!function(e){e[e.ACTIVE=0]="ACTIVE",e[e.INACTIVE=1]="INACTIVE"}(e6||(e6={})),function(e){e[e.START=1]="START",e[e.END=2]="END"}(e8||(e8={}));var EM="undefined"!=typeof window,EA=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.initialStylesRemoved=!1,i.isDisabled=!1,i.isDiscrete=!1,i.step=Ek.STEP_SIZE,i.hasTickMarks=!1,i.isRange=!1,i.thumb=null,i.downEventClientX=null,i.startThumbKnobWidth=0,i.endThumbKnobWidth=0,i}return kF(t,e),Object.defineProperty(t,"defaultAdapter",{get:function(){return{hasClass:function(){return!1},addClass:function(){},removeClass:function(){},addThumbClass:function(){},removeThumbClass:function(){},getAttribute:function(){return null},getInputValue:function(){return""},setInputValue:function(){},getInputAttribute:function(){return null},setInputAttribute:function(){return null},removeInputAttribute:function(){return null},focusInput:function(){},isInputFocused:function(){return!1},getThumbKnobWidth:function(){return 0},getThumbBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},isRTL:function(){return!1},setThumbStyleProperty:function(){},removeThumbStyleProperty:function(){},setTrackActiveStyleProperty:function(){},removeTrackActiveStyleProperty:function(){},setValueIndicatorText:function(){},getValueToAriaValueTextFn:function(){return null},updateTickMarks:function(){},setPointerCapture:function(){},emitChangeEvent:function(){},emitInputEvent:function(){},emitDragStartEvent:function(){},emitDragEndEvent:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){},registerThumbEventHandler:function(){},deregisterThumbEventHandler:function(){},registerInputEventHandler:function(){},deregisterInputEventHandler:function(){},registerBodyEventHandler:function(){},deregisterBodyEventHandler:function(){},registerWindowEventHandler:function(){},deregisterWindowEventHandler:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this;this.isDisabled=this.adapter.hasClass(Ew.DISABLED),this.isDiscrete=this.adapter.hasClass(Ew.DISCRETE),this.hasTickMarks=this.adapter.hasClass(Ew.TICK_MARKS),this.isRange=this.adapter.hasClass(Ew.RANGE);var t=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(EE.INPUT_MIN,this.isRange?e8.START:e8.END),EE.INPUT_MIN),n=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(EE.INPUT_MAX,e8.END),EE.INPUT_MAX),i=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(EE.INPUT_VALUE,e8.END),EE.INPUT_VALUE),o=this.isRange?this.convertAttributeValueToNumber(this.adapter.getInputAttribute(EE.INPUT_VALUE,e8.START),EE.INPUT_VALUE):t;this.validateProperties({min:t,max:n,value:i,valueStart:o}),this.min=t,this.max=n,this.value=i,this.valueStart=o,this.valueBeforeDownEvent=i,this.valueStartBeforeDownEvent=o;var r=this.adapter.getInputAttribute(EE.INPUT_STEP,e8.END);if(r&&(this.step=this.convertAttributeValueToNumber(r,EE.INPUT_STEP)),this.step<=0)throw Error("MDCSliderFoundation: step must be a positive number. Current step: "+this.step);this.mousedownOrTouchstartListener=this.handleMousedownOrTouchstart.bind(this),this.moveListener=this.handleMove.bind(this),this.pointerdownListener=this.handlePointerdown.bind(this),this.pointerupListener=this.handlePointerup.bind(this),this.thumbMouseenterListener=this.handleThumbMouseenter.bind(this),this.thumbMouseleaveListener=this.handleThumbMouseleave.bind(this),this.inputStartChangeListener=function(){e.handleInputChange(e8.START)},this.inputEndChangeListener=function(){e.handleInputChange(e8.END)},this.inputStartFocusListener=function(){e.handleInputFocus(e8.START)},this.inputEndFocusListener=function(){e.handleInputFocus(e8.END)},this.inputStartBlurListener=function(){e.handleInputBlur(e8.START)},this.inputEndBlurListener=function(){e.handleInputBlur(e8.END)},this.resizeListener=this.handleResize.bind(this),this.registerEventHandlers()},t.prototype.destroy=function(){this.deregisterEventHandlers()},t.prototype.getMin=function(){return this.min},t.prototype.getMax=function(){return this.max},t.prototype.getValue=function(){return this.value},t.prototype.setValue=function(e){if(this.isRange&&e<this.valueStart)throw Error("end thumb value ("+e+") must be >= start thumb value ("+this.valueStart+")");this.updateValue(e,e8.END)},t.prototype.getValueStart=function(){if(!this.isRange)throw Error("`valueStart` is only applicable for range sliders.");return this.valueStart},t.prototype.setValueStart=function(e){if(!this.isRange)throw Error("`valueStart` is only applicable for range sliders.");if(this.isRange&&e>this.value)throw Error("start thumb value ("+e+") must be <= end thumb value ("+this.value+")");this.updateValue(e,e8.START)},t.prototype.getStep=function(){return this.step},t.prototype.getDisabled=function(){return this.isDisabled},t.prototype.setDisabled=function(e){this.isDisabled=e,e?(this.adapter.addClass(Ew.DISABLED),this.isRange&&this.adapter.setInputAttribute(EE.INPUT_DISABLED,"",e8.START),this.adapter.setInputAttribute(EE.INPUT_DISABLED,"",e8.END)):(this.adapter.removeClass(Ew.DISABLED),this.isRange&&this.adapter.removeInputAttribute(EE.INPUT_DISABLED,e8.START),this.adapter.removeInputAttribute(EE.INPUT_DISABLED,e8.END))},t.prototype.getIsRange=function(){return this.isRange},t.prototype.layout=function(e){var t=(void 0===e?{}:e).skipUpdateUI;this.rect=this.adapter.getBoundingClientRect(),this.isRange&&(this.startThumbKnobWidth=this.adapter.getThumbKnobWidth(e8.START),this.endThumbKnobWidth=this.adapter.getThumbKnobWidth(e8.END)),t||this.updateUI()},t.prototype.handleResize=function(){this.layout()},t.prototype.handleDown=function(e){if(!this.isDisabled){this.valueStartBeforeDownEvent=this.valueStart,this.valueBeforeDownEvent=this.value;var t=null!=e.clientX?e.clientX:e.targetTouches[0].clientX;this.downEventClientX=t;var n=this.mapClientXOnSliderScale(t);this.thumb=this.getThumbFromDownEvent(t,n),null!==this.thumb&&(this.handleDragStart(e,n,this.thumb),this.isRange&&n>=this.valueStart&&n<=this.value||this.updateValue(n,this.thumb,{emitInputEvent:!0}))}},t.prototype.handleMove=function(e){if(!this.isDisabled){e.preventDefault();var t=null!=e.clientX?e.clientX:e.targetTouches[0].clientX,n=null!=this.thumb;if(this.thumb=this.getThumbFromMoveEvent(t),null!==this.thumb){var i=this.mapClientXOnSliderScale(t);n||(this.handleDragStart(e,i,this.thumb),this.adapter.emitDragStartEvent(i,this.thumb)),this.updateValue(i,this.thumb,{emitInputEvent:!0})}}},t.prototype.handleUp=function(){if(!this.isDisabled&&null!==this.thumb){var e=this.thumb===e8.START?this.valueStartBeforeDownEvent:this.valueBeforeDownEvent,t=this.thumb===e8.START?this.valueStart:this.value;e!==t&&this.adapter.emitChangeEvent(t,this.thumb),this.adapter.emitDragEndEvent(t,this.thumb),this.thumb=null}},t.prototype.handleThumbMouseenter=function(){this.isDiscrete&&this.isRange&&(this.adapter.addThumbClass(Ew.THUMB_WITH_INDICATOR,e8.START),this.adapter.addThumbClass(Ew.THUMB_WITH_INDICATOR,e8.END))},t.prototype.handleThumbMouseleave=function(){this.isDiscrete&&this.isRange&&(this.adapter.isInputFocused(e8.START)||this.adapter.isInputFocused(e8.END)||(this.adapter.removeThumbClass(Ew.THUMB_WITH_INDICATOR,e8.START),this.adapter.removeThumbClass(Ew.THUMB_WITH_INDICATOR,e8.END)))},t.prototype.handleMousedownOrTouchstart=function(e){var t=this,n="mousedown"===e.type?"mousemove":"touchmove";this.adapter.registerBodyEventHandler(n,this.moveListener);var i=function(){t.handleUp(),t.adapter.deregisterBodyEventHandler(n,t.moveListener),t.adapter.deregisterEventHandler("mouseup",i),t.adapter.deregisterEventHandler("touchend",i)};this.adapter.registerBodyEventHandler("mouseup",i),this.adapter.registerBodyEventHandler("touchend",i),this.handleDown(e)},t.prototype.handlePointerdown=function(e){this.adapter.setPointerCapture(e.pointerId),this.adapter.registerEventHandler("pointermove",this.moveListener),this.handleDown(e)},t.prototype.handleInputChange=function(e){var t=Number(this.adapter.getInputValue(e));e===e8.START?this.setValueStart(t):this.setValue(t)},t.prototype.handleInputFocus=function(e){if(this.isDiscrete&&(this.adapter.addThumbClass(Ew.THUMB_WITH_INDICATOR,e),this.isRange)){var t=e===e8.START?e8.END:e8.START;this.adapter.addThumbClass(Ew.THUMB_WITH_INDICATOR,t)}},t.prototype.handleInputBlur=function(e){if(this.isDiscrete&&(this.adapter.removeThumbClass(Ew.THUMB_WITH_INDICATOR,e),this.isRange)){var t=e===e8.START?e8.END:e8.START;this.adapter.removeThumbClass(Ew.THUMB_WITH_INDICATOR,t)}},t.prototype.handleDragStart=function(e,t,n){this.adapter.focusInput(n),e.preventDefault(),this.adapter.emitDragStartEvent(t,n)},t.prototype.getThumbFromDownEvent=function(e,t){if(!this.isRange)return e8.END;var n=this.adapter.getThumbBoundingClientRect(e8.START),i=this.adapter.getThumbBoundingClientRect(e8.END),o=e>=n.left&&e<=n.right,r=e>=i.left&&e<=i.right;return o&&r?null:o?e8.START:r?e8.END:t<this.valueStart?e8.START:t>this.value?e8.END:null},t.prototype.getThumbFromMoveEvent=function(e){if(null!==this.thumb)return this.thumb;if(null===this.downEventClientX)throw Error("`downEventClientX` is null after move event.");return Math.abs(this.downEventClientX-e)<Ek.THUMB_UPDATE_MIN_PX?this.thumb:e<this.downEventClientX?this.adapter.isRTL()?e8.END:e8.START:this.adapter.isRTL()?e8.START:e8.END},t.prototype.updateUI=function(e){this.updateThumbAndInputAttributes(e),this.updateThumbAndTrackUI(e),this.updateValueIndicatorUI(e),this.updateTickMarksUI()},t.prototype.updateThumbAndInputAttributes=function(e){if(e){var t=this.isRange&&e===e8.START?this.valueStart:this.value,n=String(t);this.adapter.setInputAttribute(EE.INPUT_VALUE,n,e),this.isRange&&e===e8.START?this.adapter.setInputAttribute(EE.INPUT_MIN,n,e8.END):this.isRange&&e===e8.END&&this.adapter.setInputAttribute(EE.INPUT_MAX,n,e8.START),this.adapter.getInputValue(e)!==n&&this.adapter.setInputValue(n,e);var i=this.adapter.getValueToAriaValueTextFn();i&&this.adapter.setInputAttribute(EE.ARIA_VALUETEXT,i(t),e)}},t.prototype.updateValueIndicatorUI=function(e){if(this.isDiscrete){var t=this.isRange&&e===e8.START?this.valueStart:this.value;this.adapter.setValueIndicatorText(t,e===e8.START?e8.START:e8.END),!e&&this.isRange&&this.adapter.setValueIndicatorText(this.valueStart,e8.START)}},t.prototype.updateTickMarksUI=function(){if(this.isDiscrete&&this.hasTickMarks){var e=(this.valueStart-this.min)/this.step,t=(this.value-this.valueStart)/this.step+1,n=(this.max-this.value)/this.step,i=Array.from({length:e}).fill(e6.INACTIVE),o=Array.from({length:t}).fill(e6.ACTIVE),r=Array.from({length:n}).fill(e6.INACTIVE);this.adapter.updateTickMarks(i.concat(o).concat(r))}},t.prototype.mapClientXOnSliderScale=function(e){var t=(e-this.rect.left)/this.rect.width;this.adapter.isRTL()&&(t=1-t);var n=this.min+t*(this.max-this.min);return n===this.max||n===this.min?n:this.quantize(n)},t.prototype.updateValue=function(e,t,n){var i=void 0===n?{}:n,o=i.emitInputEvent,r=i.emitChangeEvent;if(e=this.clampValue(e,t),this.isRange&&t===e8.START){if(this.valueStart===e)return;this.valueStart=e}else{if(this.value===e)return;this.value=e}this.updateUI(t),o&&this.adapter.emitInputEvent(t===e8.START?this.valueStart:this.value,t),r&&this.adapter.emitChangeEvent(t===e8.START?this.valueStart:this.value,t)},t.prototype.quantize=function(e){return Math.round(e/this.step)*this.step},t.prototype.clampValue=function(e,t){return(e=Math.min(Math.max(e,this.min),this.max),this.isRange&&t===e8.START&&e>this.value)?this.value:this.isRange&&t===e8.END&&e<this.valueStart?this.valueStart:e},t.prototype.updateThumbAndTrackUI=function(e){var t=this,n=this.max,i=this.min,o=(this.value-this.valueStart)/(n-i),r=o*this.rect.width,a=this.adapter.isRTL(),s=EM?Ed(window,"transform"):"transform";if(this.isRange){var l=this.adapter.isRTL()?(n-this.value)/(n-i)*this.rect.width:(this.valueStart-i)/(n-i)*this.rect.width,c=l+r;requestAnimationFrame(function(){!a&&e===e8.START||a&&e!==e8.START?(t.adapter.setTrackActiveStyleProperty("transform-origin","right"),t.adapter.setTrackActiveStyleProperty("left","unset"),t.adapter.setTrackActiveStyleProperty("right",t.rect.width-c+"px")):(t.adapter.setTrackActiveStyleProperty("transform-origin","left"),t.adapter.setTrackActiveStyleProperty("right","unset"),t.adapter.setTrackActiveStyleProperty("left",l+"px")),t.adapter.setTrackActiveStyleProperty(s,"scaleX("+o+")");var n=a?c:l,i=t.adapter.isRTL()?l:c;e!==e8.START&&e&&t.initialStylesRemoved||t.adapter.setThumbStyleProperty(s,"translateX("+n+"px)",e8.START),e!==e8.END&&e&&t.initialStylesRemoved||t.adapter.setThumbStyleProperty(s,"translateX("+i+"px)",e8.END),t.removeInitialStyles(a),t.updateOverlappingThumbsUI(n,i,e)})}else requestAnimationFrame(function(){var e=a?t.rect.width-r:r;t.adapter.setThumbStyleProperty(s,"translateX("+e+"px)",e8.END),t.adapter.setTrackActiveStyleProperty(s,"scaleX("+o+")"),t.removeInitialStyles(a)})},t.prototype.removeInitialStyles=function(e){if(!this.initialStylesRemoved){var t=e?"right":"left";this.adapter.removeThumbStyleProperty(t,e8.END),this.isRange&&this.adapter.removeThumbStyleProperty(t,e8.START),this.initialStylesRemoved=!0,this.resetTrackAndThumbAnimation()}},t.prototype.resetTrackAndThumbAnimation=function(){var e=this;if(this.isDiscrete){var t=EM?Ed(window,"transition"):"transition",n="all 0s ease 0s";this.adapter.setThumbStyleProperty(t,n,e8.END),this.isRange&&this.adapter.setThumbStyleProperty(t,n,e8.START),this.adapter.setTrackActiveStyleProperty(t,n),requestAnimationFrame(function(){e.adapter.removeThumbStyleProperty(t,e8.END),e.adapter.removeTrackActiveStyleProperty(t),e.isRange&&e.adapter.removeThumbStyleProperty(t,e8.START)})}},t.prototype.updateOverlappingThumbsUI=function(e,t,n){var i=!1;if(this.adapter.isRTL()){var o=e-this.startThumbKnobWidth/2;i=t+this.endThumbKnobWidth/2>=o}else i=e+this.startThumbKnobWidth/2>=t-this.endThumbKnobWidth/2;i?(this.adapter.addThumbClass(Ew.THUMB_TOP,n||e8.END),this.adapter.removeThumbClass(Ew.THUMB_TOP,n===e8.START?e8.END:e8.START)):(this.adapter.removeThumbClass(Ew.THUMB_TOP,e8.START),this.adapter.removeThumbClass(Ew.THUMB_TOP,e8.END))},t.prototype.convertAttributeValueToNumber=function(e,t){if(null===e)throw Error("MDCSliderFoundation: `"+t+"` must be non-null.");var n=Number(e);if(isNaN(n))throw Error("MDCSliderFoundation: `"+t+"` value is `"+e+"`, but must be a number.");return n},t.prototype.validateProperties=function(e){var t=e.min,n=e.max,i=e.value,o=e.valueStart;if(t>=n)throw Error("MDCSliderFoundation: min must be strictly less than max. "+("Current: [min: "+t+", max: ")+n+"]");if(this.isRange){if(i<t||i>n||o<t||o>n)throw Error("MDCSliderFoundation: values must be in [min, max] range. "+("Current values: [start value: "+o+", end value: ")+i+"]");if(o>i)throw Error("MDCSliderFoundation: start value must be <= end value. "+("Current values: [start value: "+o+", end value: ")+i+"]")}else if(i<t||i>n)throw Error("MDCSliderFoundation: value must be in [min, max] range. Current value: "+i)},t.prototype.registerEventHandlers=function(){this.adapter.registerWindowEventHandler("resize",this.resizeListener),t.SUPPORTS_POINTER_EVENTS?(this.adapter.registerEventHandler("pointerdown",this.pointerdownListener),this.adapter.registerEventHandler("pointerup",this.pointerupListener)):(this.adapter.registerEventHandler("mousedown",this.mousedownOrTouchstartListener),this.adapter.registerEventHandler("touchstart",this.mousedownOrTouchstartListener)),this.isRange&&(this.adapter.registerThumbEventHandler(e8.START,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(e8.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(e8.START,"change",this.inputStartChangeListener),this.adapter.registerInputEventHandler(e8.START,"focus",this.inputStartFocusListener),this.adapter.registerInputEventHandler(e8.START,"blur",this.inputStartBlurListener)),this.adapter.registerThumbEventHandler(e8.END,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(e8.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(e8.END,"change",this.inputEndChangeListener),this.adapter.registerInputEventHandler(e8.END,"focus",this.inputEndFocusListener),this.adapter.registerInputEventHandler(e8.END,"blur",this.inputEndBlurListener)},t.prototype.deregisterEventHandlers=function(){this.adapter.deregisterWindowEventHandler("resize",this.resizeListener),t.SUPPORTS_POINTER_EVENTS?(this.adapter.deregisterEventHandler("pointerdown",this.pointerdownListener),this.adapter.deregisterEventHandler("pointerup",this.pointerupListener)):(this.adapter.deregisterEventHandler("mousedown",this.mousedownOrTouchstartListener),this.adapter.deregisterEventHandler("touchstart",this.mousedownOrTouchstartListener)),this.isRange&&(this.adapter.deregisterThumbEventHandler(e8.START,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(e8.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(e8.START,"change",this.inputStartChangeListener),this.adapter.deregisterInputEventHandler(e8.START,"focus",this.inputStartFocusListener),this.adapter.deregisterInputEventHandler(e8.START,"blur",this.inputStartBlurListener)),this.adapter.deregisterThumbEventHandler(e8.END,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(e8.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(e8.END,"change",this.inputEndChangeListener),this.adapter.deregisterInputEventHandler(e8.END,"focus",this.inputEndFocusListener),this.adapter.deregisterInputEventHandler(e8.END,"blur",this.inputEndBlurListener)},t.prototype.handlePointerup=function(){this.handleUp(),this.adapter.deregisterEventHandler("pointermove",this.moveListener)},t.SUPPORTS_POINTER_EVENTS=EM&&!!window.PointerEvent,t}(kE),EC=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.skipInitialUIUpdate=!1,t.valueToAriaValueTextFn=null,t}return kF(t,e),t.attachTo=function(e,n){return void 0===n&&(n={}),new t(e,void 0,n)},t.prototype.getDefaultFoundation=function(){var e=this;return new EA({hasClass:function(t){return e.root.classList.contains(t)},addClass:function(t){e.root.classList.add(t)},removeClass:function(t){e.root.classList.remove(t)},addThumbClass:function(t,n){e.getThumbEl(n).classList.add(t)},removeThumbClass:function(t,n){e.getThumbEl(n).classList.remove(t)},getAttribute:function(t){return e.root.getAttribute(t)},getInputValue:function(t){return e.getInput(t).value},setInputValue:function(t,n){e.getInput(n).value=t},getInputAttribute:function(t,n){return e.getInput(n).getAttribute(t)},setInputAttribute:function(t,n,i){e.getInput(i).setAttribute(t,n)},removeInputAttribute:function(t,n){e.getInput(n).removeAttribute(t)},focusInput:function(t){e.getInput(t).focus()},isInputFocused:function(t){return e.getInput(t)===document.activeElement},getThumbKnobWidth:function(t){return e.getThumbEl(t).querySelector("."+Ew.THUMB_KNOB).getBoundingClientRect().width},getThumbBoundingClientRect:function(t){return e.getThumbEl(t).getBoundingClientRect()},getBoundingClientRect:function(){return e.root.getBoundingClientRect()},isRTL:function(){return"rtl"===getComputedStyle(e.root).direction},setThumbStyleProperty:function(t,n,i){e.getThumbEl(i).style.setProperty(t,n)},removeThumbStyleProperty:function(t,n){e.getThumbEl(n).style.removeProperty(t)},setTrackActiveStyleProperty:function(t,n){e.trackActive.style.setProperty(t,n)},removeTrackActiveStyleProperty:function(t){e.trackActive.style.removeProperty(t)},setValueIndicatorText:function(t,n){e.getThumbEl(n).querySelector("."+Ew.VALUE_INDICATOR_TEXT).textContent=String(t)},getValueToAriaValueTextFn:function(){return e.valueToAriaValueTextFn},updateTickMarks:function(t){var n=e.root.querySelector("."+Ew.TICK_MARKS_CONTAINER);n||((n=document.createElement("div")).classList.add(Ew.TICK_MARKS_CONTAINER),e.root.querySelector("."+Ew.TRACK).appendChild(n)),t.length!==n.children.length?(n.innerHTML="",e.addTickMarks(n,t)):e.updateTickMarks(n,t)},setPointerCapture:function(t){e.root.setPointerCapture(t)},emitChangeEvent:function(t,n){e.emit(ET.CHANGE,{value:t,thumb:n})},emitInputEvent:function(t,n){e.emit(ET.INPUT,{value:t,thumb:n})},emitDragStartEvent:function(t,n){e.getRipple(n).activate()},emitDragEndEvent:function(t,n){e.getRipple(n).deactivate()},registerEventHandler:function(t,n){e.listen(t,n)},deregisterEventHandler:function(t,n){e.unlisten(t,n)},registerThumbEventHandler:function(t,n,i){e.getThumbEl(t).addEventListener(n,i)},deregisterThumbEventHandler:function(t,n,i){e.getThumbEl(t).removeEventListener(n,i)},registerInputEventHandler:function(t,n,i){e.getInput(t).addEventListener(n,i)},deregisterInputEventHandler:function(t,n,i){e.getInput(t).removeEventListener(n,i)},registerBodyEventHandler:function(e,t){document.body.addEventListener(e,t)},deregisterBodyEventHandler:function(e,t){document.body.removeEventListener(e,t)},registerWindowEventHandler:function(e,t){window.addEventListener(e,t)},deregisterWindowEventHandler:function(e,t){window.removeEventListener(e,t)}})},t.prototype.initialize=function(e){var t=(void 0===e?{}:e).skipInitialUIUpdate;this.inputs=[].slice.call(this.root.querySelectorAll("."+Ew.INPUT)),this.thumbs=[].slice.call(this.root.querySelectorAll("."+Ew.THUMB)),this.trackActive=this.root.querySelector("."+Ew.TRACK_ACTIVE),this.ripples=this.createRipples(),t&&(this.skipInitialUIUpdate=!0)},t.prototype.initialSyncWithDOM=function(){this.foundation.layout({skipUpdateUI:this.skipInitialUIUpdate})},t.prototype.layout=function(){this.foundation.layout()},t.prototype.getValueStart=function(){return this.foundation.getValueStart()},t.prototype.setValueStart=function(e){this.foundation.setValueStart(e)},t.prototype.getValue=function(){return this.foundation.getValue()},t.prototype.setValue=function(e){this.foundation.setValue(e)},t.prototype.getDisabled=function(){return this.foundation.getDisabled()},t.prototype.setDisabled=function(e){this.foundation.setDisabled(e)},t.prototype.setValueToAriaValueTextFn=function(e){this.valueToAriaValueTextFn=e},t.prototype.getThumbEl=function(e){return e===e8.END?this.thumbs[this.thumbs.length-1]:this.thumbs[0]},t.prototype.getInput=function(e){return e===e8.END?this.inputs[this.inputs.length-1]:this.inputs[0]},t.prototype.getRipple=function(e){return e===e8.END?this.ripples[this.ripples.length-1]:this.ripples[0]},t.prototype.addTickMarks=function(e,t){for(var n=document.createDocumentFragment(),i=0;i<t.length;i++){var o=document.createElement("div"),r=t[i]===e6.ACTIVE?Ew.TICK_MARK_ACTIVE:Ew.TICK_MARK_INACTIVE;o.classList.add(r),n.appendChild(o)}e.appendChild(n)},t.prototype.updateTickMarks=function(e,t){for(var n=Array.from(e.children),i=0;i<n.length;i++)t[i]===e6.ACTIVE?(n[i].classList.add(Ew.TICK_MARK_ACTIVE),n[i].classList.remove(Ew.TICK_MARK_INACTIVE)):(n[i].classList.add(Ew.TICK_MARK_INACTIVE),n[i].classList.remove(Ew.TICK_MARK_ACTIVE))},t.prototype.createRipples=function(){for(var e=[],t=[].slice.call(this.root.querySelectorAll("."+Ew.THUMB)),n=this,i=0;i<t.length;i++)!function(i){var o=t[i],r=n.inputs[i],a=kx(kx({},kq.createAdapter(n)),{addClass:function(e){o.classList.add(e)},computeBoundingRect:function(){return o.getBoundingClientRect()},deregisterInteractionHandler:function(e,t){r.removeEventListener(e,t)},isSurfaceActive:function(){return kC(r,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(e,t){r.addEventListener(e,t)},removeClass:function(e){o.classList.remove(e)},updateCssVariable:function(e,t){o.style.setProperty(e,t)}}),s=new kq(o,new k$(a));s.unbounded=!0,e.push(s)}(i);return e},t}(kT),ED={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},ES={CLOSED_EVENT:"MDCMenuSurface:closed",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:'button:not(:disabled), [href]:not([aria-disabled="true"]), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'},EL={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67};!function(e){e[e.BOTTOM=1]="BOTTOM",e[e.CENTER=2]="CENTER",e[e.RIGHT=4]="RIGHT",e[e.FLIP_RTL=8]="FLIP_RTL"}(e7||(e7={})),function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=4]="TOP_RIGHT",e[e.BOTTOM_LEFT=1]="BOTTOM_LEFT",e[e.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",e[e.TOP_START=8]="TOP_START",e[e.TOP_END=12]="TOP_END",e[e.BOTTOM_START=9]="BOTTOM_START",e[e.BOTTOM_END=13]="BOTTOM_END"}(e9||(e9={}));var EI={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_DISABLED_CLASS:"mdc-list-item--disabled",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",LIST_ITEM_TEXT_CLASS:"mdc-list-item__text",LIST_ITEM_PRIMARY_TEXT_CLASS:"mdc-list-item__primary-text",ROOT:"mdc-list"},EO={ACTION_EVENT:"MDCList:action",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_DISABLED:"aria-disabled",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+EI.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+EI.LIST_ITEM_CLASS+" a\n ",FOCUSABLE_CHILD_ELEMENTS:"\n ."+EI.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+EI.LIST_ITEM_CLASS+" a,\n ."+EI.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+EI.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]'},ER={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300},EY={UNKNOWN:"Unknown",BACKSPACE:"Backspace",ENTER:"Enter",SPACEBAR:"Spacebar",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",END:"End",HOME:"Home",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",DELETE:"Delete",ESCAPE:"Escape"},EP=new Set;EP.add(EY.BACKSPACE),EP.add(EY.ENTER),EP.add(EY.SPACEBAR),EP.add(EY.PAGE_UP),EP.add(EY.PAGE_DOWN),EP.add(EY.END),EP.add(EY.HOME),EP.add(EY.ARROW_LEFT),EP.add(EY.ARROW_UP),EP.add(EY.ARROW_RIGHT),EP.add(EY.ARROW_DOWN),EP.add(EY.DELETE),EP.add(EY.ESCAPE);var EN={BACKSPACE:8,ENTER:13,SPACEBAR:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,DELETE:46,ESCAPE:27},EB=new Map;EB.set(EN.BACKSPACE,EY.BACKSPACE),EB.set(EN.ENTER,EY.ENTER),EB.set(EN.SPACEBAR,EY.SPACEBAR),EB.set(EN.PAGE_UP,EY.PAGE_UP),EB.set(EN.PAGE_DOWN,EY.PAGE_DOWN),EB.set(EN.END,EY.END),EB.set(EN.HOME,EY.HOME),EB.set(EN.ARROW_LEFT,EY.ARROW_LEFT),EB.set(EN.ARROW_UP,EY.ARROW_UP),EB.set(EN.ARROW_RIGHT,EY.ARROW_RIGHT),EB.set(EN.ARROW_DOWN,EY.ARROW_DOWN),EB.set(EN.DELETE,EY.DELETE),EB.set(EN.ESCAPE,EY.ESCAPE);var EH=new Set;function Ez(e){var t=e.key;if(EP.has(t))return t;var n=EB.get(e.keyCode);return n||EY.UNKNOWN}EH.add(EY.PAGE_UP),EH.add(EY.PAGE_DOWN),EH.add(EY.END),EH.add(EY.HOME),EH.add(EY.ARROW_LEFT),EH.add(EY.ARROW_UP),EH.add(EY.ARROW_RIGHT),EH.add(EY.ARROW_DOWN);var Ej=["input","button","textarea","select"],EU=function(e){var t=e.target;if(t){var n=(""+t.tagName).toLowerCase();-1===Ej.indexOf(n)&&e.preventDefault()}};function EW(e,t){var n,i=e.nextChar,o=e.focusItemAtIndex,r=e.sortedIndexByFirstChar,a=e.focusedItemIndex,s=e.skipFocus,l=e.isItemAtIndexDisabled;return clearTimeout(t.bufferClearTimeout),t.bufferClearTimeout=setTimeout(function(){EG(t)},ER.TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS),t.typeaheadBuffer=t.typeaheadBuffer+i,-1===(n=1===t.typeaheadBuffer.length?function(e,t,n,i){var o,r=i.typeaheadBuffer[0],a=e.get(r);if(!a)return -1;if(r===i.currentFirstChar&&a[i.sortedIndexCursor].index===t){i.sortedIndexCursor=(i.sortedIndexCursor+1)%a.length;var s=a[i.sortedIndexCursor].index;if(!n(s))return s}i.currentFirstChar=r;var l=-1;for(o=0;o<a.length;o++)if(!n(a[o].index)){l=o;break}for(;o<a.length;o++)if(a[o].index>t&&!n(a[o].index)){l=o;break}return -1!==l?(i.sortedIndexCursor=l,a[i.sortedIndexCursor].index):-1}(r,a,l,t):function(e,t,n){var i=n.typeaheadBuffer[0],o=e.get(i);if(!o)return -1;var r=o[n.sortedIndexCursor];if(0===r.text.lastIndexOf(n.typeaheadBuffer,0)&&!t(r.index))return r.index;for(var a=(n.sortedIndexCursor+1)%o.length,s=-1;a!==n.sortedIndexCursor;){var l=o[a],c=0===l.text.lastIndexOf(n.typeaheadBuffer,0),d=!t(l.index);if(c&&d){s=a;break}a=(a+1)%o.length}return -1!==s?(n.sortedIndexCursor=s,o[n.sortedIndexCursor].index):-1}(r,l,t))||s||o(n),n}function EV(e){return e.typeaheadBuffer.length>0}function EG(e){e.typeaheadBuffer=""}function E$(e,t){var n=e.event,i=e.isTargetListItem,o=e.focusedItemIndex,r=e.focusItemAtIndex,a=e.sortedIndexByFirstChar,s=e.isItemAtIndexDisabled,l="ArrowLeft"===Ez(n),c="ArrowUp"===Ez(n),d="ArrowRight"===Ez(n),u="ArrowDown"===Ez(n),m="Home"===Ez(n),f="End"===Ez(n),p="Enter"===Ez(n),h="Spacebar"===Ez(n);if(l||c||d||u||m||f||p)return -1;if(!h&&1===n.key.length){EU(n);var b={focusItemAtIndex:r,focusedItemIndex:o,nextChar:n.key.toLowerCase(),sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:s};return EW(b,t)}if(!h)return -1;if(i&&EU(n),i&&EV(t)){var b={focusItemAtIndex:r,focusedItemIndex:o,nextChar:" ",sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:s};return EW(b,t)}return -1}var Eq=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.wrapFocus_=!1,i.isVertical_=!0,i.isSingleSelectionList_=!1,i.selectedIndex_=ER.UNSET_INDEX,i.focusedItemIndex=ER.UNSET_INDEX,i.useActivatedClass_=!1,i.useSelectedAttr_=!1,i.ariaCurrentAttrValue_=null,i.isCheckboxList_=!1,i.isRadioList_=!1,i.hasTypeahead=!1,i.typeaheadState={bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""},i.sortedIndexByFirstChar=new Map,i}return kF(t,e),Object.defineProperty(t,"strings",{get:function(){return EO},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return EI},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return ER},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClassForElementIndex:function(){},focusItemAtIndex:function(){},getAttributeForElementIndex:function(){return null},getFocusedElementIndex:function(){return 0},getListItemCount:function(){return 0},hasCheckboxAtIndex:function(){return!1},hasRadioAtIndex:function(){return!1},isCheckboxCheckedAtIndex:function(){return!1},isFocusInsideList:function(){return!1},isRootFocused:function(){return!1},listItemAtIndexHasClass:function(){return!1},notifyAction:function(){},removeClassForElementIndex:function(){},setAttributeForElementIndex:function(){},setCheckedCheckboxOrRadioAtIndex:function(){},setTabIndexForListItemChildren:function(){},getPrimaryTextAtIndex:function(){return""}}},enumerable:!0,configurable:!0}),t.prototype.layout=function(){0!==this.adapter.getListItemCount()&&(this.adapter.hasCheckboxAtIndex(0)?this.isCheckboxList_=!0:this.adapter.hasRadioAtIndex(0)?this.isRadioList_=!0:this.maybeInitializeSingleSelection(),this.hasTypeahead&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex()))},t.prototype.setWrapFocus=function(e){this.wrapFocus_=e},t.prototype.setVerticalOrientation=function(e){this.isVertical_=e},t.prototype.setSingleSelection=function(e){this.isSingleSelectionList_=e,e&&this.maybeInitializeSingleSelection()},t.prototype.maybeInitializeSingleSelection=function(){for(var e=0;e<this.adapter.getListItemCount();e++){var t=this.adapter.listItemAtIndexHasClass(e,EI.LIST_ITEM_SELECTED_CLASS),n=this.adapter.listItemAtIndexHasClass(e,EI.LIST_ITEM_ACTIVATED_CLASS);if(t||n){n&&this.setUseActivatedClass(!0),this.isSingleSelectionList_=!0,this.selectedIndex_=e;return}}},t.prototype.setHasTypeahead=function(e){this.hasTypeahead=e,e&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex())},t.prototype.isTypeaheadInProgress=function(){return this.hasTypeahead&&EV(this.typeaheadState)},t.prototype.setUseActivatedClass=function(e){this.useActivatedClass_=e},t.prototype.setUseSelectedAttribute=function(e){this.useSelectedAttr_=e},t.prototype.getSelectedIndex=function(){return this.selectedIndex_},t.prototype.setSelectedIndex=function(e){this.isIndexValid_(e)&&(this.isCheckboxList_?this.setCheckboxAtIndex_(e):this.isRadioList_?this.setRadioAtIndex_(e):this.setSingleSelectionAtIndex_(e))},t.prototype.handleFocusIn=function(e,t){t>=0&&(this.focusedItemIndex=t,this.adapter.setAttributeForElementIndex(t,"tabindex","0"),this.adapter.setTabIndexForListItemChildren(t,"0"))},t.prototype.handleFocusOut=function(e,t){var n=this;t>=0&&(this.adapter.setAttributeForElementIndex(t,"tabindex","-1"),this.adapter.setTabIndexForListItemChildren(t,"-1")),setTimeout(function(){n.adapter.isFocusInsideList()||n.setTabindexToFirstSelectedOrFocusedItem()},0)},t.prototype.handleKeydown=function(e,t,n){var i=this,o="ArrowLeft"===Ez(e),r="ArrowUp"===Ez(e),a="ArrowRight"===Ez(e),s="ArrowDown"===Ez(e),l="Home"===Ez(e),c="End"===Ez(e),d="Enter"===Ez(e),u="Spacebar"===Ez(e),m="A"===e.key||"a"===e.key;if(this.adapter.isRootFocused()){if(r||c?(e.preventDefault(),this.focusLastElement()):(s||l)&&(e.preventDefault(),this.focusFirstElement()),this.hasTypeahead){var f={event:e,focusItemAtIndex:function(e){i.focusItemAtIndex(e)},focusedItemIndex:-1,isTargetListItem:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(e){return i.adapter.listItemAtIndexHasClass(e,EI.LIST_ITEM_DISABLED_CLASS)}};E$(f,this.typeaheadState)}return}var p=this.adapter.getFocusedElementIndex();if(-1!==p||!((p=n)<0)){if(this.isVertical_&&s||!this.isVertical_&&a)EU(e),this.focusNextElement(p);else if(this.isVertical_&&r||!this.isVertical_&&o)EU(e),this.focusPrevElement(p);else if(l)EU(e),this.focusFirstElement();else if(c)EU(e),this.focusLastElement();else if(m&&e.ctrlKey&&this.isCheckboxList_)e.preventDefault(),this.toggleAll(this.selectedIndex_===ER.UNSET_INDEX?[]:this.selectedIndex_);else if((d||u)&&t){var h=e.target;if(h&&"A"===h.tagName&&d||(EU(e),this.adapter.listItemAtIndexHasClass(p,EI.LIST_ITEM_DISABLED_CLASS)))return;this.isTypeaheadInProgress()||(this.isSelectableList_()&&this.setSelectedIndexOnAction_(p),this.adapter.notifyAction(p))}if(this.hasTypeahead){var f={event:e,focusItemAtIndex:function(e){i.focusItemAtIndex(e)},focusedItemIndex:this.focusedItemIndex,isTargetListItem:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(e){return i.adapter.listItemAtIndexHasClass(e,EI.LIST_ITEM_DISABLED_CLASS)}};E$(f,this.typeaheadState)}}},t.prototype.handleClick=function(e,t){e!==ER.UNSET_INDEX&&(this.adapter.listItemAtIndexHasClass(e,EI.LIST_ITEM_DISABLED_CLASS)||(this.isSelectableList_()&&this.setSelectedIndexOnAction_(e,t),this.adapter.notifyAction(e)))},t.prototype.focusNextElement=function(e){var t=this.adapter.getListItemCount(),n=e+1;if(n>=t)if(!this.wrapFocus_)return e;else n=0;return this.focusItemAtIndex(n),n},t.prototype.focusPrevElement=function(e){var t=e-1;if(t<0)if(!this.wrapFocus_)return e;else t=this.adapter.getListItemCount()-1;return this.focusItemAtIndex(t),t},t.prototype.focusFirstElement=function(){return this.focusItemAtIndex(0),0},t.prototype.focusLastElement=function(){var e=this.adapter.getListItemCount()-1;return this.focusItemAtIndex(e),e},t.prototype.focusInitialElement=function(){var e=this.getFirstSelectedOrFocusedItemIndex();return this.focusItemAtIndex(e),e},t.prototype.setEnabled=function(e,t){this.isIndexValid_(e)&&(t?(this.adapter.removeClassForElementIndex(e,EI.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(e,EO.ARIA_DISABLED,"false")):(this.adapter.addClassForElementIndex(e,EI.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(e,EO.ARIA_DISABLED,"true")))},t.prototype.setSingleSelectionAtIndex_=function(e){if(this.selectedIndex_!==e){var t=EI.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass_&&(t=EI.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex_!==ER.UNSET_INDEX&&this.adapter.removeClassForElementIndex(this.selectedIndex_,t),this.setAriaForSingleSelectionAtIndex_(e),this.setTabindexAtIndex(e),e!==ER.UNSET_INDEX&&this.adapter.addClassForElementIndex(e,t),this.selectedIndex_=e}},t.prototype.setAriaForSingleSelectionAtIndex_=function(e){this.selectedIndex_===ER.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter.getAttributeForElementIndex(e,EO.ARIA_CURRENT));var t=null!==this.ariaCurrentAttrValue_,n=t?EO.ARIA_CURRENT:EO.ARIA_SELECTED;if(this.selectedIndex_!==ER.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex_,n,"false"),e!==ER.UNSET_INDEX){var i=t?this.ariaCurrentAttrValue_:"true";this.adapter.setAttributeForElementIndex(e,n,i)}},t.prototype.getSelectionAttribute=function(){return this.useSelectedAttr_?EO.ARIA_SELECTED:EO.ARIA_CHECKED},t.prototype.setRadioAtIndex_=function(e){var t=this.getSelectionAttribute();this.adapter.setCheckedCheckboxOrRadioAtIndex(e,!0),this.selectedIndex_!==ER.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex_,t,"false"),this.adapter.setAttributeForElementIndex(e,t,"true"),this.selectedIndex_=e},t.prototype.setCheckboxAtIndex_=function(e){for(var t=this.getSelectionAttribute(),n=0;n<this.adapter.getListItemCount();n++){var i=!1;e.indexOf(n)>=0&&(i=!0),this.adapter.setCheckedCheckboxOrRadioAtIndex(n,i),this.adapter.setAttributeForElementIndex(n,t,i?"true":"false")}this.selectedIndex_=e},t.prototype.setTabindexAtIndex=function(e){this.focusedItemIndex===ER.UNSET_INDEX&&0!==e?this.adapter.setAttributeForElementIndex(0,"tabindex","-1"):this.focusedItemIndex>=0&&this.focusedItemIndex!==e&&this.adapter.setAttributeForElementIndex(this.focusedItemIndex,"tabindex","-1"),this.selectedIndex_ instanceof Array||this.selectedIndex_===e||this.adapter.setAttributeForElementIndex(this.selectedIndex_,"tabindex","-1"),e!==ER.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(e,"tabindex","0")},t.prototype.isSelectableList_=function(){return this.isSingleSelectionList_||this.isCheckboxList_||this.isRadioList_},t.prototype.setTabindexToFirstSelectedOrFocusedItem=function(){var e=this.getFirstSelectedOrFocusedItemIndex();this.setTabindexAtIndex(e)},t.prototype.getFirstSelectedOrFocusedItemIndex=function(){var e=this.focusedItemIndex>=0?this.focusedItemIndex:0;return this.isSelectableList_()&&("number"==typeof this.selectedIndex_&&this.selectedIndex_!==ER.UNSET_INDEX?e=this.selectedIndex_:this.selectedIndex_ instanceof Array&&this.selectedIndex_.length>0&&(e=this.selectedIndex_.reduce(function(e,t){return Math.min(e,t)}))),e},t.prototype.isIndexValid_=function(e){var t=this;if(e instanceof Array){if(!this.isCheckboxList_)throw Error("MDCListFoundation: Array of index is only supported for checkbox based list");return 0===e.length||e.some(function(e){return t.isIndexInRange_(e)})}if("number"!=typeof e)return!1;if(this.isCheckboxList_)throw Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+e);return this.isIndexInRange_(e)||this.isSingleSelectionList_&&e===ER.UNSET_INDEX},t.prototype.isIndexInRange_=function(e){var t=this.adapter.getListItemCount();return e>=0&&e<t},t.prototype.setSelectedIndexOnAction_=function(e,t){void 0===t&&(t=!0),this.isCheckboxList_?this.toggleCheckboxAtIndex_(e,t):this.setSelectedIndex(e)},t.prototype.toggleCheckboxAtIndex_=function(e,t){var n=this.getSelectionAttribute(),i=this.adapter.isCheckboxCheckedAtIndex(e);t&&(i=!i,this.adapter.setCheckedCheckboxOrRadioAtIndex(e,i)),this.adapter.setAttributeForElementIndex(e,n,i?"true":"false");var o=this.selectedIndex_===ER.UNSET_INDEX?[]:this.selectedIndex_.slice();i?o.push(e):o=o.filter(function(t){return t!==e}),this.selectedIndex_=o},t.prototype.focusItemAtIndex=function(e){this.adapter.focusItemAtIndex(e),this.focusedItemIndex=e},t.prototype.toggleAll=function(e){var t=this.adapter.getListItemCount();if(e.length===t)this.setCheckboxAtIndex_([]);else{for(var n=[],i=0;i<t;i++)(!this.adapter.listItemAtIndexHasClass(i,EI.LIST_ITEM_DISABLED_CLASS)||e.indexOf(i)>-1)&&n.push(i);this.setCheckboxAtIndex_(n)}},t.prototype.typeaheadMatchItem=function(e,t,n){var i=this;return void 0===n&&(n=!1),EW({focusItemAtIndex:function(e){i.focusItemAtIndex(e)},focusedItemIndex:t||this.focusedItemIndex,nextChar:e,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:n,isItemAtIndexDisabled:function(e){return i.adapter.listItemAtIndexHasClass(e,EI.LIST_ITEM_DISABLED_CLASS)}},this.typeaheadState)},t.prototype.typeaheadInitSortedIndex=function(){return function(e,t){for(var n=new Map,i=0;i<e;i++){var o=t(i).trim();if(o){var r=o[0].toLowerCase();n.has(r)||n.set(r,[]),n.get(r).push({text:o.toLowerCase(),index:i})}}return n.forEach(function(e){e.sort(function(e,t){return e.index-t.index})}),n}(this.adapter.getListItemCount(),this.adapter.getPrimaryTextAtIndex)},t.prototype.clearTypeaheadBuffer=function(){EG(this.typeaheadState)},t}(kE),EX=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),Object.defineProperty(t.prototype,"vertical",{set:function(e){this.foundation.setVerticalOrientation(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"listElements",{get:function(){return[].slice.call(this.root.querySelectorAll("."+EI.LIST_ITEM_CLASS))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wrapFocus",{set:function(e){this.foundation.setWrapFocus(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"typeaheadInProgress",{get:function(){return this.foundation.isTypeaheadInProgress()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasTypeahead",{set:function(e){this.foundation.setHasTypeahead(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"singleSelection",{set:function(e){this.foundation.setSingleSelection(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this.foundation.getSelectedIndex()},set:function(e){this.foundation.setSelectedIndex(e)},enumerable:!0,configurable:!0}),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){this.handleClick_=this.handleClickEvent_.bind(this),this.handleKeydown_=this.handleKeydownEvent_.bind(this),this.focusInEventListener_=this.handleFocusInEvent_.bind(this),this.focusOutEventListener_=this.handleFocusOutEvent_.bind(this),this.listen("keydown",this.handleKeydown_),this.listen("click",this.handleClick_),this.listen("focusin",this.focusInEventListener_),this.listen("focusout",this.focusOutEventListener_),this.layout(),this.initializeListType()},t.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown_),this.unlisten("click",this.handleClick_),this.unlisten("focusin",this.focusInEventListener_),this.unlisten("focusout",this.focusOutEventListener_)},t.prototype.layout=function(){var e=this.root.getAttribute(EO.ARIA_ORIENTATION);this.vertical=e!==EO.ARIA_ORIENTATION_HORIZONTAL,[].slice.call(this.root.querySelectorAll(".mdc-list-item:not([tabindex])")).forEach(function(e){e.setAttribute("tabindex","-1")}),[].slice.call(this.root.querySelectorAll(EO.FOCUSABLE_CHILD_ELEMENTS)).forEach(function(e){return e.setAttribute("tabindex","-1")}),this.foundation.layout()},t.prototype.getPrimaryText=function(e){var t=e.querySelector("."+EI.LIST_ITEM_PRIMARY_TEXT_CLASS);if(t)return t.textContent||"";var n=e.querySelector("."+EI.LIST_ITEM_TEXT_CLASS);return n&&n.textContent||""},t.prototype.initializeListType=function(){var e=this,t=this.root.querySelectorAll(EO.ARIA_ROLE_CHECKBOX_SELECTOR),n=this.root.querySelector(EO.ARIA_CHECKED_RADIO_SELECTOR);if(t.length){var i=this.root.querySelectorAll(EO.ARIA_CHECKED_CHECKBOX_SELECTOR);this.selectedIndex=[].map.call(i,function(t){return e.listElements.indexOf(t)})}else n&&(this.selectedIndex=this.listElements.indexOf(n))},t.prototype.setEnabled=function(e,t){this.foundation.setEnabled(e,t)},t.prototype.typeaheadMatchItem=function(e,t){return this.foundation.typeaheadMatchItem(e,t,!0)},t.prototype.getDefaultFoundation=function(){var e=this;return new Eq({addClassForElementIndex:function(t,n){var i=e.listElements[t];i&&i.classList.add(n)},focusItemAtIndex:function(t){var n=e.listElements[t];n&&n.focus()},getAttributeForElementIndex:function(t,n){return e.listElements[t].getAttribute(n)},getFocusedElementIndex:function(){return e.listElements.indexOf(document.activeElement)},getListItemCount:function(){return e.listElements.length},getPrimaryTextAtIndex:function(t){return e.getPrimaryText(e.listElements[t])},hasCheckboxAtIndex:function(t){return!!e.listElements[t].querySelector(EO.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(t){return!!e.listElements[t].querySelector(EO.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(t){return e.listElements[t].querySelector(EO.CHECKBOX_SELECTOR).checked},isFocusInsideList:function(){return e.root!==document.activeElement&&e.root.contains(document.activeElement)},isRootFocused:function(){return document.activeElement===e.root},listItemAtIndexHasClass:function(t,n){return e.listElements[t].classList.contains(n)},notifyAction:function(t){e.emit(EO.ACTION_EVENT,{index:t},!0)},removeClassForElementIndex:function(t,n){var i=e.listElements[t];i&&i.classList.remove(n)},setAttributeForElementIndex:function(t,n,i){var o=e.listElements[t];o&&o.setAttribute(n,i)},setCheckedCheckboxOrRadioAtIndex:function(t,n){var i=e.listElements[t].querySelector(EO.CHECKBOX_RADIO_SELECTOR);i.checked=n;var o=document.createEvent("Event");o.initEvent("change",!0,!0),i.dispatchEvent(o)},setTabIndexForListItemChildren:function(t,n){var i=e.listElements[t];[].slice.call(i.querySelectorAll(EO.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX)).forEach(function(e){return e.setAttribute("tabindex",n)})}})},t.prototype.getListItemIndex_=function(e){var t=kA(e.target,"."+EI.LIST_ITEM_CLASS+", ."+EI.ROOT);return t&&kC(t,"."+EI.LIST_ITEM_CLASS)?this.listElements.indexOf(t):-1},t.prototype.handleFocusInEvent_=function(e){var t=this.getListItemIndex_(e);this.foundation.handleFocusIn(e,t)},t.prototype.handleFocusOutEvent_=function(e){var t=this.getListItemIndex_(e);this.foundation.handleFocusOut(e,t)},t.prototype.handleKeydownEvent_=function(e){var t=this.getListItemIndex_(e),n=e.target;this.foundation.handleKeydown(e,n.classList.contains(EI.LIST_ITEM_CLASS),t)},t.prototype.handleClickEvent_=function(e){var t=this.getListItemIndex_(e),n=!kC(e.target,EO.CHECKBOX_RADIO_SELECTOR);this.foundation.handleClick(t,n)},t}(kT),EK=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.isSurfaceOpen=!1,i.isQuickOpen=!1,i.isHoistedElement=!1,i.isFixedPosition=!1,i.openAnimationEndTimerId=0,i.closeAnimationEndTimerId=0,i.animationRequestId=0,i.anchorCorner=e9.TOP_START,i.originCorner=e9.TOP_START,i.anchorMargin={top:0,right:0,bottom:0,left:0},i.position={x:0,y:0},i}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return ED},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ES},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return EL},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Corner",{get:function(){return e9},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyOpen:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=t.cssClasses,n=e.ROOT,i=e.OPEN;if(!this.adapter.hasClass(n))throw Error(n+" class required in root element.");this.adapter.hasClass(i)&&(this.isSurfaceOpen=!0)},t.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},t.prototype.setAnchorCorner=function(e){this.anchorCorner=e},t.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^e7.RIGHT},t.prototype.setAnchorMargin=function(e){this.anchorMargin.top=e.top||0,this.anchorMargin.right=e.right||0,this.anchorMargin.bottom=e.bottom||0,this.anchorMargin.left=e.left||0},t.prototype.setIsHoisted=function(e){this.isHoistedElement=e},t.prototype.setFixedPosition=function(e){this.isFixedPosition=e},t.prototype.setAbsolutePosition=function(e,t){this.position.x=this.isFinite(e)?e:0,this.position.y=this.isFinite(t)?t:0},t.prototype.setQuickOpen=function(e){this.isQuickOpen=e},t.prototype.isOpen=function(){return this.isSurfaceOpen},t.prototype.open=function(){var e=this;this.isSurfaceOpen||(this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(t.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(t.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame(function(){e.adapter.addClass(t.cssClasses.OPEN),e.dimensions=e.adapter.getInnerDimensions(),e.autoposition(),e.openAnimationEndTimerId=setTimeout(function(){e.openAnimationEndTimerId=0,e.adapter.removeClass(t.cssClasses.ANIMATING_OPEN),e.adapter.notifyOpen()},EL.TRANSITION_OPEN_DURATION)}),this.isSurfaceOpen=!0))},t.prototype.close=function(e){var n=this;void 0===e&&(e=!1),this.isSurfaceOpen&&(this.isQuickOpen?(this.isSurfaceOpen=!1,e||this.maybeRestoreFocus(),this.adapter.removeClass(t.cssClasses.OPEN),this.adapter.removeClass(t.cssClasses.IS_OPEN_BELOW),this.adapter.notifyClose()):(this.adapter.addClass(t.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){n.adapter.removeClass(t.cssClasses.OPEN),n.adapter.removeClass(t.cssClasses.IS_OPEN_BELOW),n.closeAnimationEndTimerId=setTimeout(function(){n.closeAnimationEndTimerId=0,n.adapter.removeClass(t.cssClasses.ANIMATING_CLOSED),n.adapter.notifyClose()},EL.TRANSITION_CLOSE_DURATION)}),this.isSurfaceOpen=!1,e||this.maybeRestoreFocus()))},t.prototype.handleBodyClick=function(e){var t=e.target;this.adapter.isElementInContainer(t)||this.close()},t.prototype.handleKeydown=function(e){var t=e.keyCode;("Escape"===e.key||27===t)&&this.close()},t.prototype.autoposition=function(){this.measurements=this.getAutoLayoutmeasurements();var e,n=this.getoriginCorner(),i=this.getMenuSurfaceMaxHeight(n),o=this.hasBit(n,e7.BOTTOM)?"bottom":"top",r=this.hasBit(n,e7.RIGHT)?"right":"left",a=this.getHorizontalOriginOffset(n),s=this.getVerticalOriginOffset(n),l=this.measurements,c=l.anchorSize,d=l.surfaceSize,u=((e={})[r]=a,e[o]=s,e);c.width/d.width>EL.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(r="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(u),this.adapter.setTransformOrigin(r+" "+o),this.adapter.setPosition(u),this.adapter.setMaxHeight(i?i+"px":""),this.hasBit(n,e7.BOTTOM)||this.adapter.addClass(t.cssClasses.IS_OPEN_BELOW)},t.prototype.getAutoLayoutmeasurements=function(){var e=this.adapter.getAnchorDimensions(),t=this.adapter.getBodyDimensions(),n=this.adapter.getWindowDimensions(),i=this.adapter.getWindowScroll();return e||(e={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:e,bodySize:t,surfaceSize:this.dimensions,viewportDistance:{top:e.top,right:n.width-e.right,bottom:n.height-e.bottom,left:e.left},viewportSize:n,windowScroll:i}},t.prototype.getoriginCorner=function(){var e,n,i,o,r=this.originCorner,a=this.measurements,s=a.viewportDistance,l=a.anchorSize,c=a.surfaceSize,d=t.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,e7.BOTTOM)?(e=s.top-d+l.height+this.anchorMargin.bottom,n=s.bottom-d-this.anchorMargin.bottom):(e=s.top-d+this.anchorMargin.top,n=s.bottom-d+l.height-this.anchorMargin.top),!(n-c.height>0)&&e>=n&&(r=this.setBit(r,e7.BOTTOM));var u=this.adapter.isRtl(),m=this.hasBit(this.anchorCorner,e7.FLIP_RTL),f=this.hasBit(this.anchorCorner,e7.RIGHT)||this.hasBit(r,e7.RIGHT),p=!1;(p=u&&m?!f:f)?(i=s.left+l.width+this.anchorMargin.right,o=s.right-this.anchorMargin.right):(i=s.left+this.anchorMargin.left,o=s.right+l.width-this.anchorMargin.left);var h=i-c.width>0,b=o-c.width>0,g=this.hasBit(r,e7.FLIP_RTL)&&this.hasBit(r,e7.RIGHT);return b&&g&&u||!h&&g?r=this.unsetBit(r,e7.RIGHT):(h&&p&&u||h&&!p&&f||!b&&i>=o)&&(r=this.setBit(r,e7.RIGHT)),r},t.prototype.getMenuSurfaceMaxHeight=function(e){var n=this.measurements.viewportDistance,i=0,o=this.hasBit(e,e7.BOTTOM),r=this.hasBit(this.anchorCorner,e7.BOTTOM),a=t.numbers.MARGIN_TO_EDGE;return o?(i=n.top+this.anchorMargin.top-a,r||(i+=this.measurements.anchorSize.height)):(i=n.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-a,r&&(i-=this.measurements.anchorSize.height)),i},t.prototype.getHorizontalOriginOffset=function(e){var t=this.measurements.anchorSize,n=this.hasBit(e,e7.RIGHT),i=this.hasBit(this.anchorCorner,e7.RIGHT);if(n){var o=i?t.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?o-(this.measurements.viewportSize.width-this.measurements.bodySize.width):o}return i?t.width-this.anchorMargin.right:this.anchorMargin.left},t.prototype.getVerticalOriginOffset=function(e){var t=this.measurements.anchorSize,n=this.hasBit(e,e7.BOTTOM),i=this.hasBit(this.anchorCorner,e7.BOTTOM);return n?i?t.height-this.anchorMargin.top:-this.anchorMargin.bottom:i?t.height+this.anchorMargin.bottom:this.anchorMargin.top},t.prototype.adjustPositionForHoistedElement=function(e){var t,n,i=this.measurements,o=i.windowScroll,r=i.viewportDistance,a=Object.keys(e);try{for(var s=kw(a),l=s.next();!l.done;l=s.next()){var c=l.value,d=e[c]||0;d+=r[c],this.isFixedPosition||("top"===c?d+=o.y:"bottom"===c?d-=o.y:"left"===c?d+=o.x:d-=o.x),e[c]=d}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}},t.prototype.maybeRestoreFocus=function(){var e=this.adapter.isFocused(),t=document.activeElement&&this.adapter.isElementInContainer(document.activeElement);(e||t)&&this.adapter.restoreFocus()},t.prototype.hasBit=function(e,t){return!!(e&t)},t.prototype.setBit=function(e,t){return e|t},t.prototype.unsetBit=function(e,t){return e^t},t.prototype.isFinite=function(e){return"number"==typeof e&&isFinite(e)},t}(kE),EJ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){var e=this,t=this.root.parentElement;this.anchorElement=t&&t.classList.contains(ED.ANCHOR)?t:null,this.root.classList.contains(ED.FIXED)&&this.setFixedPosition(!0),this.handleKeydown=function(t){e.foundation.handleKeydown(t)},this.handleBodyClick=function(t){e.foundation.handleBodyClick(t)},this.registerBodyClickListener=function(){document.body.addEventListener("click",e.handleBodyClick,{capture:!0})},this.deregisterBodyClickListener=function(){document.body.removeEventListener("click",e.handleBodyClick,{capture:!0})},this.listen("keydown",this.handleKeydown),this.listen(ES.OPENED_EVENT,this.registerBodyClickListener),this.listen(ES.CLOSED_EVENT,this.deregisterBodyClickListener)},t.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown),this.unlisten(ES.OPENED_EVENT,this.registerBodyClickListener),this.unlisten(ES.CLOSED_EVENT,this.deregisterBodyClickListener),e.prototype.destroy.call(this)},t.prototype.isOpen=function(){return this.foundation.isOpen()},t.prototype.open=function(){this.foundation.open()},t.prototype.close=function(e){void 0===e&&(e=!1),this.foundation.close(e)},Object.defineProperty(t.prototype,"quickOpen",{set:function(e){this.foundation.setQuickOpen(e)},enumerable:!0,configurable:!0}),t.prototype.setIsHoisted=function(e){this.foundation.setIsHoisted(e)},t.prototype.setMenuSurfaceAnchorElement=function(e){this.anchorElement=e},t.prototype.setFixedPosition=function(e){e?this.root.classList.add(ED.FIXED):this.root.classList.remove(ED.FIXED),this.foundation.setFixedPosition(e)},t.prototype.setAbsolutePosition=function(e,t){this.foundation.setAbsolutePosition(e,t),this.setIsHoisted(!0)},t.prototype.setAnchorCorner=function(e){this.foundation.setAnchorCorner(e)},t.prototype.setAnchorMargin=function(e){this.foundation.setAnchorMargin(e)},t.prototype.getDefaultFoundation=function(){var e=this;return new EK({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},hasAnchor:function(){return!!e.anchorElement},notifyClose:function(){return e.emit(EK.strings.CLOSED_EVENT,{})},notifyOpen:function(){return e.emit(EK.strings.OPENED_EVENT,{})},isElementInContainer:function(t){return e.root.contains(t)},isRtl:function(){return"rtl"===getComputedStyle(e.root).getPropertyValue("direction")},setTransformOrigin:function(t){var n,i,o=(n=window,void 0===i&&(i=!1),(void 0===te||i)&&(te="transform"in n.document.createElement("div").style?"transform":"webkitTransform"),te+"-origin");e.root.style.setProperty(o,t)},isFocused:function(){return document.activeElement===e.root},saveFocus:function(){e.previousFocus=document.activeElement},restoreFocus:function(){e.root.contains(document.activeElement)&&e.previousFocus&&e.previousFocus.focus&&e.previousFocus.focus()},getInnerDimensions:function(){return{width:e.root.offsetWidth,height:e.root.offsetHeight}},getAnchorDimensions:function(){return e.anchorElement?e.anchorElement.getBoundingClientRect():null},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(t){var n=e.root;n.style.left="left"in t?t.left+"px":"",n.style.right="right"in t?t.right+"px":"",n.style.top="top"in t?t.top+"px":"",n.style.bottom="bottom"in t?t.bottom+"px":""},setMaxHeight:function(t){e.root.style.maxHeight=t}})},t}(kT),EZ={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},EQ={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list",SELECTED_EVENT:"MDCMenu:selected"},E0={FOCUS_ROOT_INDEX:-1};!function(e){e[e.NONE=0]="NONE",e[e.LIST_ROOT=1]="LIST_ROOT",e[e.FIRST_ITEM=2]="FIRST_ITEM",e[e.LAST_ITEM=3]="LAST_ITEM"}(tt||(tt={}));var E1=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.closeAnimationEndTimerId_=0,i.defaultFocusState_=tt.LIST_ROOT,i}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return EZ},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return EQ},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return E0},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return -1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return -1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this.closeAnimationEndTimerId_&&clearTimeout(this.closeAnimationEndTimerId_),this.adapter.closeSurface()},t.prototype.handleKeydown=function(e){var t=e.key,n=e.keyCode;("Tab"===t||9===n)&&this.adapter.closeSurface(!0)},t.prototype.handleItemAction=function(e){var t=this,n=this.adapter.getElementIndex(e);n<0||(this.adapter.notifySelected({index:n}),this.adapter.closeSurface(),this.closeAnimationEndTimerId_=setTimeout(function(){var n=t.adapter.getElementIndex(e);n>=0&&t.adapter.isSelectableItemAtIndex(n)&&t.setSelectedIndex(n)},EK.numbers.TRANSITION_CLOSE_DURATION))},t.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState_){case tt.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case tt.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case tt.NONE:break;default:this.adapter.focusListRoot()}},t.prototype.setDefaultFocusState=function(e){this.defaultFocusState_=e},t.prototype.setSelectedIndex=function(e){if(this.validatedIndex_(e),!this.adapter.isSelectableItemAtIndex(e))throw Error("MDCMenuFoundation: No selection group at specified index.");var t=this.adapter.getSelectedSiblingOfItemAtIndex(e);t>=0&&(this.adapter.removeAttributeFromElementAtIndex(t,EQ.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(t,EZ.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(e,EZ.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(e,EQ.ARIA_CHECKED_ATTR,"true")},t.prototype.setEnabled=function(e,t){this.validatedIndex_(e),t?(this.adapter.removeClassFromElementAtIndex(e,EI.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(e,EQ.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(e,EI.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(e,EQ.ARIA_DISABLED_ATTR,"true"))},t.prototype.validatedIndex_=function(e){var t=this.adapter.getMenuItemCount();if(!(e>=0&&e<t))throw Error("MDCMenuFoundation: No list item at specified index.")},t}(kE),E2=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e,t){void 0===e&&(e=function(e){return new EJ(e)}),void 0===t&&(t=function(e){return new EX(e)}),this.menuSurfaceFactory_=e,this.listFactory_=t},t.prototype.initialSyncWithDOM=function(){var e=this;this.menuSurface_=this.menuSurfaceFactory_(this.root);var t=this.root.querySelector(EQ.LIST_SELECTOR);t?(this.list_=this.listFactory_(t),this.list_.wrapFocus=!0):this.list_=null,this.handleKeydown_=function(t){return e.foundation.handleKeydown(t)},this.handleItemAction_=function(t){return e.foundation.handleItemAction(e.items[t.detail.index])},this.handleMenuSurfaceOpened_=function(){return e.foundation.handleMenuSurfaceOpened()},this.menuSurface_.listen(EK.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.listen("keydown",this.handleKeydown_),this.listen(Eq.strings.ACTION_EVENT,this.handleItemAction_)},t.prototype.destroy=function(){this.list_&&this.list_.destroy(),this.menuSurface_.destroy(),this.menuSurface_.unlisten(EK.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.unlisten("keydown",this.handleKeydown_),this.unlisten(Eq.strings.ACTION_EVENT,this.handleItemAction_),e.prototype.destroy.call(this)},Object.defineProperty(t.prototype,"open",{get:function(){return this.menuSurface_.isOpen()},set:function(e){e?this.menuSurface_.open():this.menuSurface_.close()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wrapFocus",{get:function(){return!!this.list_&&this.list_.wrapFocus},set:function(e){this.list_&&(this.list_.wrapFocus=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasTypeahead",{set:function(e){this.list_&&(this.list_.hasTypeahead=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"typeaheadInProgress",{get:function(){return!!this.list_&&this.list_.typeaheadInProgress},enumerable:!0,configurable:!0}),t.prototype.typeaheadMatchItem=function(e,t){return this.list_?this.list_.typeaheadMatchItem(e,t):-1},t.prototype.layout=function(){this.list_&&this.list_.layout()},Object.defineProperty(t.prototype,"items",{get:function(){return this.list_?this.list_.listElements:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"singleSelection",{set:function(e){this.list_&&(this.list_.singleSelection=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this.list_?this.list_.selectedIndex:ER.UNSET_INDEX},set:function(e){this.list_&&(this.list_.selectedIndex=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"quickOpen",{set:function(e){this.menuSurface_.quickOpen=e},enumerable:!0,configurable:!0}),t.prototype.setDefaultFocusState=function(e){this.foundation.setDefaultFocusState(e)},t.prototype.setAnchorCorner=function(e){this.menuSurface_.setAnchorCorner(e)},t.prototype.setAnchorMargin=function(e){this.menuSurface_.setAnchorMargin(e)},t.prototype.setSelectedIndex=function(e){this.foundation.setSelectedIndex(e)},t.prototype.setEnabled=function(e,t){this.foundation.setEnabled(e,t)},t.prototype.getOptionByIndex=function(e){return e<this.items.length?this.items[e]:null},t.prototype.getPrimaryTextAtIndex=function(e){var t=this.getOptionByIndex(e);return t&&this.list_&&this.list_.getPrimaryText(t)||""},t.prototype.setFixedPosition=function(e){this.menuSurface_.setFixedPosition(e)},t.prototype.setIsHoisted=function(e){this.menuSurface_.setIsHoisted(e)},t.prototype.setAbsolutePosition=function(e,t){this.menuSurface_.setAbsolutePosition(e,t)},t.prototype.setAnchorElement=function(e){this.menuSurface_.anchorElement=e},t.prototype.getDefaultFoundation=function(){var e=this;return new E1({addClassToElementAtIndex:function(t,n){e.items[t].classList.add(n)},removeClassFromElementAtIndex:function(t,n){e.items[t].classList.remove(n)},addAttributeToElementAtIndex:function(t,n,i){e.items[t].setAttribute(n,i)},removeAttributeFromElementAtIndex:function(t,n){e.items[t].removeAttribute(n)},elementContainsClass:function(e,t){return e.classList.contains(t)},closeSurface:function(t){return e.menuSurface_.close(t)},getElementIndex:function(t){return e.items.indexOf(t)},notifySelected:function(t){return e.emit(EQ.SELECTED_EVENT,{index:t.index,item:e.items[t.index]})},getMenuItemCount:function(){return e.items.length},focusItemAtIndex:function(t){return e.items[t].focus()},focusListRoot:function(){return e.root.querySelector(EQ.LIST_SELECTOR).focus()},isSelectableItemAtIndex:function(t){return!!kA(e.items[t],"."+EZ.MENU_SELECTION_GROUP)},getSelectedSiblingOfItemAtIndex:function(t){var n=kA(e.items[t],"."+EZ.MENU_SELECTION_GROUP).querySelector("."+EZ.MENU_SELECTED_LIST_ITEM);return n?e.items.indexOf(n):-1}})},t}(kT),E5={ACTIVATED:"mdc-select--activated",DISABLED:"mdc-select--disabled",FOCUSED:"mdc-select--focused",INVALID:"mdc-select--invalid",MENU_INVALID:"mdc-select__menu--invalid",OUTLINED:"mdc-select--outlined",REQUIRED:"mdc-select--required",ROOT:"mdc-select",WITH_LEADING_ICON:"mdc-select--with-leading-icon"},E3={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",ARIA_SELECTED_ATTR:"aria-selected",CHANGE_EVENT:"MDCSelect:change",HIDDEN_INPUT_SELECTOR:'input[type="hidden"]',LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-select__icon",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",MENU_SELECTOR:".mdc-select__menu",OUTLINE_SELECTOR:".mdc-notched-outline",SELECTED_TEXT_SELECTOR:".mdc-select__selected-text",SELECT_ANCHOR_SELECTOR:".mdc-select__anchor",VALUE_ATTR:"data-value"},E4={LABEL_SCALE:.75,UNSET_INDEX:-1,CLICK_DEBOUNCE_TIMEOUT_MS:330},E6=function(e){function t(n,i){void 0===i&&(i={});var o=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return o.disabled=!1,o.isMenuOpen=!1,o.useDefaultValidation=!0,o.customValidity=!0,o.lastSelectedIndex=E4.UNSET_INDEX,o.clickDebounceTimeout=0,o.recentlyClicked=!1,o.leadingIcon=i.leadingIcon,o.helperText=i.helperText,o}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return E5},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return E4},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return E3},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},activateBottomLine:function(){},deactivateBottomLine:function(){},getSelectedIndex:function(){return -1},setSelectedIndex:function(){},hasLabel:function(){return!1},floatLabel:function(){},getLabelWidth:function(){return 0},setLabelRequired:function(){},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){},setRippleCenter:function(){},notifyChange:function(){},setSelectedText:function(){},isSelectAnchorFocused:function(){return!1},getSelectAnchorAttr:function(){return""},setSelectAnchorAttr:function(){},removeSelectAnchorAttr:function(){},addMenuClass:function(){},removeMenuClass:function(){},openMenu:function(){},closeMenu:function(){},getAnchorElement:function(){return null},setMenuAnchorElement:function(){},setMenuAnchorCorner:function(){},setMenuWrapFocus:function(){},focusMenuItemAtIndex:function(){},getMenuItemCount:function(){return 0},getMenuItemValues:function(){return[]},getMenuItemTextAtIndex:function(){return""},isTypeaheadInProgress:function(){return!1},typeaheadMatchItem:function(){return -1}}},enumerable:!0,configurable:!0}),t.prototype.getSelectedIndex=function(){return this.adapter.getSelectedIndex()},t.prototype.setSelectedIndex=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1),e>=this.adapter.getMenuItemCount()||(e===E4.UNSET_INDEX?this.adapter.setSelectedText(""):this.adapter.setSelectedText(this.adapter.getMenuItemTextAtIndex(e).trim()),this.adapter.setSelectedIndex(e),t&&this.adapter.closeMenu(),n||this.lastSelectedIndex===e||this.handleChange(),this.lastSelectedIndex=e)},t.prototype.setValue=function(e,t){void 0===t&&(t=!1);var n=this.adapter.getMenuItemValues().indexOf(e);this.setSelectedIndex(n,!1,t)},t.prototype.getValue=function(){var e=this.adapter.getSelectedIndex(),t=this.adapter.getMenuItemValues();return e!==E4.UNSET_INDEX?t[e]:""},t.prototype.getDisabled=function(){return this.disabled},t.prototype.setDisabled=function(e){this.disabled=e,this.disabled?(this.adapter.addClass(E5.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass(E5.DISABLED),this.leadingIcon&&this.leadingIcon.setDisabled(this.disabled),this.disabled?this.adapter.removeSelectAnchorAttr("tabindex"):this.adapter.setSelectAnchorAttr("tabindex","0"),this.adapter.setSelectAnchorAttr("aria-disabled",this.disabled.toString())},t.prototype.openMenu=function(){this.adapter.addClass(E5.ACTIVATED),this.adapter.openMenu(),this.isMenuOpen=!0,this.adapter.setSelectAnchorAttr("aria-expanded","true")},t.prototype.setHelperTextContent=function(e){this.helperText&&this.helperText.setContent(e)},t.prototype.layout=function(){if(this.adapter.hasLabel()){var e=this.getValue().length>0,t=this.adapter.hasClass(E5.FOCUSED),n=e||t,i=this.adapter.hasClass(E5.REQUIRED);this.notchOutline(n),this.adapter.floatLabel(n),this.adapter.setLabelRequired(i)}},t.prototype.layoutOptions=function(){var e=this.adapter.getMenuItemValues().indexOf(this.getValue());this.setSelectedIndex(e,!1,!0)},t.prototype.handleMenuOpened=function(){if(0!==this.adapter.getMenuItemValues().length){var e=this.getSelectedIndex();this.adapter.focusMenuItemAtIndex(e>=0?e:0)}},t.prototype.handleMenuClosed=function(){this.adapter.removeClass(E5.ACTIVATED),this.isMenuOpen=!1,this.adapter.setSelectAnchorAttr("aria-expanded","false"),this.adapter.isSelectAnchorFocused()||this.blur()},t.prototype.handleChange=function(){this.layout(),this.adapter.notifyChange(this.getValue()),this.adapter.hasClass(E5.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},t.prototype.handleMenuItemAction=function(e){this.setSelectedIndex(e,!0)},t.prototype.handleFocus=function(){this.adapter.addClass(E5.FOCUSED),this.layout(),this.adapter.activateBottomLine()},t.prototype.handleBlur=function(){this.isMenuOpen||this.blur()},t.prototype.handleClick=function(e){if(!this.disabled&&!this.recentlyClicked){if(this.setClickDebounceTimeout(),this.isMenuOpen)return void this.adapter.closeMenu();this.adapter.setRippleCenter(e),this.openMenu()}},t.prototype.handleKeydown=function(e){if(!this.isMenuOpen&&this.adapter.hasClass(E5.FOCUSED)){var t=Ez(e)===EY.ENTER,n=Ez(e)===EY.SPACEBAR,i=Ez(e)===EY.ARROW_UP,o=Ez(e)===EY.ARROW_DOWN;if(!n&&e.key&&1===e.key.length||n&&this.adapter.isTypeaheadInProgress()){var r=n?" ":e.key,a=this.adapter.typeaheadMatchItem(r,this.getSelectedIndex());a>=0&&this.setSelectedIndex(a),e.preventDefault();return}(t||n||i||o)&&(i&&this.getSelectedIndex()>0?this.setSelectedIndex(this.getSelectedIndex()-1):o&&this.getSelectedIndex()<this.adapter.getMenuItemCount()-1&&this.setSelectedIndex(this.getSelectedIndex()+1),this.openMenu(),e.preventDefault())}},t.prototype.notchOutline=function(e){if(this.adapter.hasOutline()){var t=this.adapter.hasClass(E5.FOCUSED);if(e){var n=E4.LABEL_SCALE,i=this.adapter.getLabelWidth()*n;this.adapter.notchOutline(i)}else t||this.adapter.closeOutline()}},t.prototype.setLeadingIconAriaLabel=function(e){this.leadingIcon&&this.leadingIcon.setAriaLabel(e)},t.prototype.setLeadingIconContent=function(e){this.leadingIcon&&this.leadingIcon.setContent(e)},t.prototype.setUseDefaultValidation=function(e){this.useDefaultValidation=e},t.prototype.setValid=function(e){this.useDefaultValidation||(this.customValidity=e),this.adapter.setSelectAnchorAttr("aria-invalid",(!e).toString()),e?(this.adapter.removeClass(E5.INVALID),this.adapter.removeMenuClass(E5.MENU_INVALID)):(this.adapter.addClass(E5.INVALID),this.adapter.addMenuClass(E5.MENU_INVALID)),this.syncHelperTextValidity(e)},t.prototype.isValid=function(){return this.useDefaultValidation&&this.adapter.hasClass(E5.REQUIRED)&&!this.adapter.hasClass(E5.DISABLED)?this.getSelectedIndex()!==E4.UNSET_INDEX&&(0!==this.getSelectedIndex()||!!this.getValue()):this.customValidity},t.prototype.setRequired=function(e){e?this.adapter.addClass(E5.REQUIRED):this.adapter.removeClass(E5.REQUIRED),this.adapter.setSelectAnchorAttr("aria-required",e.toString()),this.adapter.setLabelRequired(e)},t.prototype.getRequired=function(){return"true"===this.adapter.getSelectAnchorAttr("aria-required")},t.prototype.init=function(){var e=this.adapter.getAnchorElement();e&&(this.adapter.setMenuAnchorElement(e),this.adapter.setMenuAnchorCorner(e9.BOTTOM_START)),this.adapter.setMenuWrapFocus(!1),this.setDisabled(this.adapter.hasClass(E5.DISABLED)),this.syncHelperTextValidity(!this.adapter.hasClass(E5.INVALID)),this.layout(),this.layoutOptions()},t.prototype.blur=function(){this.adapter.removeClass(E5.FOCUSED),this.layout(),this.adapter.deactivateBottomLine(),this.adapter.hasClass(E5.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},t.prototype.syncHelperTextValidity=function(e){if(this.helperText){this.helperText.setValidity(e);var t=this.helperText.isVisible(),n=this.helperText.getId();t&&n?this.adapter.setSelectAnchorAttr(E3.ARIA_DESCRIBEDBY,n):this.adapter.removeSelectAnchorAttr(E3.ARIA_DESCRIBEDBY)}},t.prototype.setClickDebounceTimeout=function(){var e=this;clearTimeout(this.clickDebounceTimeout),this.clickDebounceTimeout=setTimeout(function(){e.recentlyClicked=!1},E4.CLICK_DEBOUNCE_TIMEOUT_MS),this.recentlyClicked=!0},t}(kE),E8={ARIA_HIDDEN:"aria-hidden",ROLE:"role"},E7={HELPER_TEXT_VALIDATION_MSG:"mdc-select-helper-text--validation-msg",HELPER_TEXT_VALIDATION_MSG_PERSISTENT:"mdc-select-helper-text--validation-msg-persistent"},E9=function(e){function t(n){return e.call(this,kx(kx({},t.defaultAdapter),n))||this}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return E7},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return E8},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setAttr:function(){},getAttr:function(){return null},removeAttr:function(){},setContent:function(){}}},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this.adapter.getAttr("id")},t.prototype.isVisible=function(){return"true"!==this.adapter.getAttr(E8.ARIA_HIDDEN)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.setValidation=function(e){e?this.adapter.addClass(E7.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(E7.HELPER_TEXT_VALIDATION_MSG)},t.prototype.setValidationMsgPersistent=function(e){e?this.adapter.addClass(E7.HELPER_TEXT_VALIDATION_MSG_PERSISTENT):this.adapter.removeClass(E7.HELPER_TEXT_VALIDATION_MSG_PERSISTENT)},t.prototype.setValidity=function(e){if(this.adapter.hasClass(E7.HELPER_TEXT_VALIDATION_MSG)){var t=this.adapter.hasClass(E7.HELPER_TEXT_VALIDATION_MSG_PERSISTENT);if(!e||t){this.showToScreenReader(),e?this.adapter.removeAttr(E8.ROLE):this.adapter.setAttr(E8.ROLE,"alert");return}this.adapter.removeAttr(E8.ROLE),this.hide()}},t.prototype.showToScreenReader=function(){this.adapter.removeAttr(E8.ARIA_HIDDEN)},t.prototype.hide=function(){this.adapter.setAttr(E8.ARIA_HIDDEN,"true")},t}(kE),Te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"foundationForSelect",{get:function(){return this.foundation},enumerable:!0,configurable:!0}),t.prototype.getDefaultFoundation=function(){var e=this;return new E9({addClass:function(t){return e.root.classList.add(t)},removeClass:function(t){return e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){return e.root.setAttribute(t,n)},removeAttr:function(t){return e.root.removeAttribute(t)},setContent:function(t){e.root.textContent=t}})},t}(kT),Tt={ICON_EVENT:"MDCSelect:icon",ICON_ROLE:"button"},Tn=["click","keydown"],Ti=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.savedTabIndex_=null,i.interactionHandler_=function(e){return i.handleInteraction(e)},i}return kF(t,e),Object.defineProperty(t,"strings",{get:function(){return Tt},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this;this.savedTabIndex_=this.adapter.getAttr("tabindex"),Tn.forEach(function(t){e.adapter.registerInteractionHandler(t,e.interactionHandler_)})},t.prototype.destroy=function(){var e=this;Tn.forEach(function(t){e.adapter.deregisterInteractionHandler(t,e.interactionHandler_)})},t.prototype.setDisabled=function(e){this.savedTabIndex_&&(e?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex_),this.adapter.setAttr("role",Tt.ICON_ROLE)))},t.prototype.setAriaLabel=function(e){this.adapter.setAttr("aria-label",e)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.handleInteraction=function(e){var t="Enter"===e.key||13===e.keyCode;("click"===e.type||t)&&this.adapter.notifyIconAction()},t}(kE),To=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"foundationForSelect",{get:function(){return this.foundation},enumerable:!0,configurable:!0}),t.prototype.getDefaultFoundation=function(){var e=this;return new Ti({getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){return e.root.setAttribute(t,n)},removeAttr:function(t){return e.root.removeAttribute(t)},setContent:function(t){e.root.textContent=t},registerInteractionHandler:function(t,n){return e.listen(t,n)},deregisterInteractionHandler:function(t,n){return e.unlisten(t,n)},notifyIconAction:function(){return e.emit(Ti.strings.ICON_EVENT,{},!0)}})},t}(kT),Tr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e,t,n,i,o,r){if(void 0===e&&(e=function(e){return new kL(e)}),void 0===t&&(t=function(e){return new kR(e)}),void 0===n&&(n=function(e){return new kH(e)}),void 0===i&&(i=function(e){return new E2(e)}),void 0===o&&(o=function(e){return new To(e)}),void 0===r&&(r=function(e){return new Te(e)}),this.selectAnchor=this.root.querySelector(E3.SELECT_ANCHOR_SELECTOR),this.selectedText=this.root.querySelector(E3.SELECTED_TEXT_SELECTOR),this.hiddenInput=this.root.querySelector(E3.HIDDEN_INPUT_SELECTOR),!this.selectedText)throw Error("MDCSelect: Missing required element: The following selector must be present: '"+E3.SELECTED_TEXT_SELECTOR+"'");if(this.selectAnchor.hasAttribute(E3.ARIA_CONTROLS)){var a=document.getElementById(this.selectAnchor.getAttribute(E3.ARIA_CONTROLS));a&&(this.helperText=r(a))}this.menuSetup(i);var s=this.root.querySelector(E3.LABEL_SELECTOR);this.label=s?e(s):null;var l=this.root.querySelector(E3.LINE_RIPPLE_SELECTOR);this.lineRipple=l?t(l):null;var c=this.root.querySelector(E3.OUTLINE_SELECTOR);this.outline=c?n(c):null;var d=this.root.querySelector(E3.LEADING_ICON_SELECTOR);d&&(this.leadingIcon=o(d)),this.root.classList.contains(E5.OUTLINED)||(this.ripple=this.createRipple())},t.prototype.initialSyncWithDOM=function(){var e=this;if(this.handleFocus=function(){e.foundation.handleFocus()},this.handleBlur=function(){e.foundation.handleBlur()},this.handleClick=function(t){e.selectAnchor.focus(),e.foundation.handleClick(e.getNormalizedXCoordinate(t))},this.handleKeydown=function(t){e.foundation.handleKeydown(t)},this.handleMenuItemAction=function(t){e.foundation.handleMenuItemAction(t.detail.index)},this.handleMenuOpened=function(){e.foundation.handleMenuOpened()},this.handleMenuClosed=function(){e.foundation.handleMenuClosed()},this.selectAnchor.addEventListener("focus",this.handleFocus),this.selectAnchor.addEventListener("blur",this.handleBlur),this.selectAnchor.addEventListener("click",this.handleClick),this.selectAnchor.addEventListener("keydown",this.handleKeydown),this.menu.listen(ES.CLOSED_EVENT,this.handleMenuClosed),this.menu.listen(ES.OPENED_EVENT,this.handleMenuOpened),this.menu.listen(EQ.SELECTED_EVENT,this.handleMenuItemAction),this.hiddenInput){if(this.hiddenInput.value){this.foundation.setValue(this.hiddenInput.value,!0),this.foundation.layout();return}this.hiddenInput.value=this.value}},t.prototype.destroy=function(){this.selectAnchor.removeEventListener("focus",this.handleFocus),this.selectAnchor.removeEventListener("blur",this.handleBlur),this.selectAnchor.removeEventListener("keydown",this.handleKeydown),this.selectAnchor.removeEventListener("click",this.handleClick),this.menu.unlisten(ES.CLOSED_EVENT,this.handleMenuClosed),this.menu.unlisten(ES.OPENED_EVENT,this.handleMenuOpened),this.menu.unlisten(EQ.SELECTED_EVENT,this.handleMenuItemAction),this.menu.destroy(),this.ripple&&this.ripple.destroy(),this.outline&&this.outline.destroy(),this.leadingIcon&&this.leadingIcon.destroy(),this.helperText&&this.helperText.destroy(),e.prototype.destroy.call(this)},Object.defineProperty(t.prototype,"value",{get:function(){return this.foundation.getValue()},set:function(e){this.foundation.setValue(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this.foundation.getSelectedIndex()},set:function(e){this.foundation.setSelectedIndex(e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.foundation.getDisabled()},set:function(e){this.foundation.setDisabled(e),this.hiddenInput&&(this.hiddenInput.disabled=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"leadingIconAriaLabel",{set:function(e){this.foundation.setLeadingIconAriaLabel(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"leadingIconContent",{set:function(e){this.foundation.setLeadingIconContent(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"helperTextContent",{set:function(e){this.foundation.setHelperTextContent(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"useDefaultValidation",{set:function(e){this.foundation.setUseDefaultValidation(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return this.foundation.isValid()},set:function(e){this.foundation.setValid(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return this.foundation.getRequired()},set:function(e){this.foundation.setRequired(e)},enumerable:!0,configurable:!0}),t.prototype.layout=function(){this.foundation.layout()},t.prototype.layoutOptions=function(){this.foundation.layoutOptions(),this.menu.layout(),this.menuItemValues=this.menu.items.map(function(e){return e.getAttribute(E3.VALUE_ATTR)||""}),this.hiddenInput&&(this.hiddenInput.value=this.value)},t.prototype.getDefaultFoundation=function(){return new E6(kx(kx(kx(kx({},this.getSelectAdapterMethods()),this.getCommonAdapterMethods()),this.getOutlineAdapterMethods()),this.getLabelAdapterMethods()),this.getFoundationMap())},t.prototype.menuSetup=function(e){this.menuElement=this.root.querySelector(E3.MENU_SELECTOR),this.menu=e(this.menuElement),this.menu.hasTypeahead=!0,this.menu.singleSelection=!0,this.menuItemValues=this.menu.items.map(function(e){return e.getAttribute(E3.VALUE_ATTR)||""})},t.prototype.createRipple=function(){var e=this,t=kx(kx({},kq.createAdapter({root:this.selectAnchor})),{registerInteractionHandler:function(t,n){e.selectAnchor.addEventListener(t,n)},deregisterInteractionHandler:function(t,n){e.selectAnchor.removeEventListener(t,n)}});return new kq(this.selectAnchor,new k$(t))},t.prototype.getSelectAdapterMethods=function(){var e=this;return{getMenuItemAttr:function(e,t){return e.getAttribute(t)},setSelectedText:function(t){e.selectedText.textContent=t},isSelectAnchorFocused:function(){return document.activeElement===e.selectAnchor},getSelectAnchorAttr:function(t){return e.selectAnchor.getAttribute(t)},setSelectAnchorAttr:function(t,n){e.selectAnchor.setAttribute(t,n)},removeSelectAnchorAttr:function(t){e.selectAnchor.removeAttribute(t)},addMenuClass:function(t){e.menuElement.classList.add(t)},removeMenuClass:function(t){e.menuElement.classList.remove(t)},openMenu:function(){e.menu.open=!0},closeMenu:function(){e.menu.open=!1},getAnchorElement:function(){return e.root.querySelector(E3.SELECT_ANCHOR_SELECTOR)},setMenuAnchorElement:function(t){e.menu.setAnchorElement(t)},setMenuAnchorCorner:function(t){e.menu.setAnchorCorner(t)},setMenuWrapFocus:function(t){e.menu.wrapFocus=t},getSelectedIndex:function(){var t=e.menu.selectedIndex;return t instanceof Array?t[0]:t},setSelectedIndex:function(t){e.menu.selectedIndex=t},focusMenuItemAtIndex:function(t){e.menu.items[t].focus()},getMenuItemCount:function(){return e.menu.items.length},getMenuItemValues:function(){return e.menuItemValues},getMenuItemTextAtIndex:function(t){return e.menu.getPrimaryTextAtIndex(t)},isTypeaheadInProgress:function(){return e.menu.typeaheadInProgress},typeaheadMatchItem:function(t,n){return e.menu.typeaheadMatchItem(t,n)}}},t.prototype.getCommonAdapterMethods=function(){var e=this;return{addClass:function(t){e.root.classList.add(t)},removeClass:function(t){e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},setRippleCenter:function(t){e.lineRipple&&e.lineRipple.setRippleCenter(t)},activateBottomLine:function(){e.lineRipple&&e.lineRipple.activate()},deactivateBottomLine:function(){e.lineRipple&&e.lineRipple.deactivate()},notifyChange:function(t){var n=e.selectedIndex;e.emit(E3.CHANGE_EVENT,{value:t,index:n},!0),e.hiddenInput&&(e.hiddenInput.value=t)}}},t.prototype.getOutlineAdapterMethods=function(){var e=this;return{hasOutline:function(){return!!e.outline},notchOutline:function(t){e.outline&&e.outline.notch(t)},closeOutline:function(){e.outline&&e.outline.closeNotch()}}},t.prototype.getLabelAdapterMethods=function(){var e=this;return{hasLabel:function(){return!!e.label},floatLabel:function(t){e.label&&e.label.float(t)},getLabelWidth:function(){return e.label?e.label.getWidth():0},setLabelRequired:function(t){e.label&&e.label.setRequired(t)}}},t.prototype.getNormalizedXCoordinate=function(e){var t=e.target.getBoundingClientRect();return(this.isTouchEvent(e)?e.touches[0].clientX:e.clientX)-t.left},t.prototype.isTouchEvent=function(e){return!!e.touches},t.prototype.getFoundationMap=function(){return{helperText:this.helperText?this.helperText.foundationForSelect:void 0,leadingIcon:this.leadingIcon?this.leadingIcon.foundationForSelect:void 0}},t}(kT),Ta={ROOT:"mdc-form-field"},Ts={LABEL_SELECTOR:".mdc-form-field > label"},Tl=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.click=function(){i.handleClick()},i}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Ta},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Ts},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.adapter.registerInteractionHandler("click",this.click)},t.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("click",this.click)},t.prototype.handleClick=function(){var e=this;this.adapter.activateInputRipple(),requestAnimationFrame(function(){e.adapter.deactivateInputRipple()})},t}(kE),Tc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kF(t,e),t.attachTo=function(e){return new t(e)},t.prototype.labelEl=function(){var e=Tl.strings.LABEL_SELECTOR;return this.root.querySelector(e)},t.prototype.getDefaultFoundation=function(){var e=this;return new Tl({activateInputRipple:function(){e.input&&e.input.ripple&&e.input.ripple.activate()},deactivateInputRipple:function(){e.input&&e.input.ripple&&e.input.ripple.deactivate()},deregisterInteractionHandler:function(t,n){var i=e.labelEl();i&&i.removeEventListener(t,n)},registerInteractionHandler:function(t,n){var i=e.labelEl();i&&i.addEventListener(t,n)}})},t}(kT),Td={ICON_BUTTON_ON:"mdc-icon-button--on",ROOT:"mdc-icon-button"},Tu={ARIA_LABEL:"aria-label",ARIA_PRESSED:"aria-pressed",DATA_ARIA_LABEL_OFF:"data-aria-label-off",DATA_ARIA_LABEL_ON:"data-aria-label-on",CHANGE_EVENT:"MDCIconButtonToggle:change"},Tm=function(e){function t(n){var i=e.call(this,kx(kx({},t.defaultAdapter),n))||this;return i.hasToggledAriaLabel=!1,i}return kF(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Td},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Tu},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},hasClass:function(){return!1},notifyChange:function(){},removeClass:function(){},getAttr:function(){return null},setAttr:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this.adapter.getAttr(Tu.DATA_ARIA_LABEL_ON),t=this.adapter.getAttr(Tu.DATA_ARIA_LABEL_OFF);if(e&&t){if(null!==this.adapter.getAttr(Tu.ARIA_PRESSED))throw Error("MDCIconButtonToggleFoundation: Button should not set `aria-pressed` if it has a toggled aria label.");this.hasToggledAriaLabel=!0}else this.adapter.setAttr(Tu.ARIA_PRESSED,String(this.isOn()))},t.prototype.handleClick=function(){this.toggle(),this.adapter.notifyChange({isOn:this.isOn()})},t.prototype.isOn=function(){return this.adapter.hasClass(Td.ICON_BUTTON_ON)},t.prototype.toggle=function(e){if(void 0===e&&(e=!this.isOn()),e?this.adapter.addClass(Td.ICON_BUTTON_ON):this.adapter.removeClass(Td.ICON_BUTTON_ON),this.hasToggledAriaLabel){var t=e?this.adapter.getAttr(Tu.DATA_ARIA_LABEL_ON):this.adapter.getAttr(Tu.DATA_ARIA_LABEL_OFF);this.adapter.setAttr(Tu.ARIA_LABEL,t||"")}else this.adapter.setAttr(Tu.ARIA_PRESSED,""+e)},t}(kE),Tf=Tm.strings,Tp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rippleComponent=t.createRipple(),t}return kF(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){var e=this;this.handleClick=function(){e.foundation.handleClick()},this.listen("click",this.handleClick)},t.prototype.destroy=function(){this.unlisten("click",this.handleClick),this.ripple.destroy(),e.prototype.destroy.call(this)},t.prototype.getDefaultFoundation=function(){var e=this;return new Tm({addClass:function(t){return e.root.classList.add(t)},hasClass:function(t){return e.root.classList.contains(t)},notifyChange:function(t){e.emit(Tf.CHANGE_EVENT,t)},removeClass:function(t){return e.root.classList.remove(t)},getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){return e.root.setAttribute(t,n)}})},Object.defineProperty(t.prototype,"ripple",{get:function(){return this.rippleComponent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"on",{get:function(){return this.foundation.isOn()},set:function(e){this.foundation.toggle(e)},enumerable:!0,configurable:!0}),t.prototype.createRipple=function(){var e=new kq(this.root);return e.unbounded=!0,e},t}(kT);let Th="important",Tb=" !"+Th,Tg=oz(class extends oj{constructor(e){if(super(e),e.type!==oH.ATTRIBUTE||"style"!==e.name||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,n)=>{let i=e[n];return null==i?t:t+`${n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(e,[t]){let{style:n}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(let e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?n.removeProperty(e):n[e]=null);for(let e in t){let i=t[e];if(null!=i){this.ft.add(e);let t="string"==typeof i&&i.endsWith(Tb);e.includes("-")||t?n.setProperty(e,t?i.slice(0,-11):i,t?Th:""):n[e]=i}}return tJ}});var T_=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let Ty=n(3041),Tv=n(1526);class TF extends CustomEvent{constructor(e){super(TF.NAME,{detail:e,bubbles:!0,composed:!0})}}function Tx(e,t,n,i,o){switch(i=i||"listbox",e){case tn.RADIO:i="radiogroup";break;case tn.MULTI_CHECKBOX:i="group"}return tK`
|
|
61
61
|
<ul id="list" class="mdc-list${n?" mdc-list--two-line":""}" role="${i??tZ}" @MDCList:action="${e=>o&&o(e)}" aria-hidden="true" aria-orientation="vertical" tabindex="-1">
|
|
62
62
|
${t}
|
|
63
63
|
</ul>
|