@openremote/or-log-viewer 1.11.2 → 1.11.3
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.
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
:host([hidden]) {
|
|
222
222
|
display: none;
|
|
223
223
|
}
|
|
224
|
-
`,nD([ef({type:String})],nS.prototype,"value",void 0),nD([ef({type:Object})],nS.prototype,"options",void 0),nS=nD([em("or-translate")],nS),function(e){e.CREATE="CREATE",e.UPDATE="UPDATE",e.DELETE="DELETE"}(eS||(eS={})),function(e){e.LOW="LOW",e.MEDIUM="MEDIUM",e.HIGH="HIGH"}(eI||(eI={})),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"}(eO||(eO={})),function(e){e.OPEN="OPEN",e.ACKNOWLEDGED="ACKNOWLEDGED",e.IN_PROGRESS="IN_PROGRESS",e.RESOLVED="RESOLVED",e.CLOSED="CLOSED"}(eY||(eY={})),function(e){e.BOTTOM_LEFT="BOTTOM_LEFT",e.BOTTOM_RIGHT="BOTTOM_RIGHT",e.TOP_LEFT="TOP_LEFT",e.TOP_RIGHT="TOP_RIGHT"}(eR||(eR={})),function(e){e.CREATE="CREATE",e.READ="READ",e.UPDATE="UPDATE",e.DELETE="DELETE"}(eB||(eB={})),function(e){e.NONE="NONE",e.FORECAST="FORECAST",e.SETPOINT="SETPOINT"}(eN||(eN={})),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"}(eP||(eP={})),function(e){e.EV="EV",e.PHEV="PHEV"}(eH||(eH={})),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"}(ej||(ej={})),function(e){e.SOUTH="SOUTH",e.EAST_WEST="EAST_WEST"}(ez||(ez={})),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"}(eU||(eU={})),function(e){e.TOGGLE="TOGGLE",e.INCREMENT="INCREMENT",e.DECREMENT="DECREMENT",e.NEGATE="NEGATE"}(eW||(eW={})),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"}(e$||(e$={})),function(e){e.PUBLIC="PUBLIC",e.SHARED="SHARED",e.PRIVATE="PRIVATE"}(eV||(eV={})),function(e){e.OFF="OFF",e.ONE_MIN="ONE_MIN",e.FIVE_MIN="FIVE_MIN",e.QUARTER="QUARTER",e.ONE_HOUR="ONE_HOUR"}(eG||(eG={})),function(e){e.WRAP_TO_SINGLE_COLUMN="WRAP_TO_SINGLE_COLUMN",e.KEEP_LAYOUT="KEEP_LAYOUT",e.REDIRECT="REDIRECT",e.BLOCK_DEVICE="BLOCK_DEVICE"}(eq||(eq={})),function(e){e.MINUTE="MINUTE",e.HOUR="HOUR",e.DAY="DAY",e.WEEK="WEEK",e.MONTH="MONTH",e.YEAR="YEAR"}(eX||(eX={})),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"}(eK||(eK={})),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"}(eJ||(eJ={})),function(e){e.HTTPS="HTTPS",e.HTTP="HTTP",e.TCP="TCP"}(eQ||(eQ={})),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.OPTIONS="OPTIONS",e.PATCH="PATCH"}(eZ||(eZ={})),function(e){e.KEYCLOAK="KEYCLOAK",e.BASIC="BASIC",e.NONE="NONE"}(e0||(e0={})),function(e){e.WEBSOCKET="WEBSOCKET",e.POLLING="POLLING"}(e1||(e1={})),function(e){e.VECTOR="VECTOR",e.RASTER="RASTER"}(e2||(e2={})),function(e){e.INTERNAL="INTERNAL",e.CLIENT="CLIENT",e.GLOBAL_RULESET="GLOBAL_RULESET",e.REALM_RULESET="REALM_RULESET",e.ASSET_RULESET="ASSET_RULESET"}(e5||(e5={})),function(e){e.REALM="REALM",e.USER="USER",e.ASSET="ASSET",e.CUSTOM="CUSTOM"}(e3||(e3={})),function(e){e.NORMAL="NORMAL",e.HIGH="HIGH"}(e4||(e4={})),function(e){e.DEVICE="DEVICE",e.TOPIC="TOPIC",e.CONDITION="CONDITION"}(e6||(e6={})),function(e){e.ALWAYS="ALWAYS",e.ONCE="ONCE",e.HOURLY="HOURLY",e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY",e.ANNUALLY="ANNUALLY"}(e8||(e8={})),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"}(e7||(e7={})),function(e){e.PRIVATE="PRIVATE",e.PROTECTED="PROTECTED",e.PUBLIC="PUBLIC"}(e9||(e9={})),function(e){e.EXACT="EXACT",e.BEGIN="BEGIN",e.END="END",e.CONTAINS="CONTAINS"}(te||(te={})),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"}(tt||(tt={})),function(e){e.CREATED_ON="CREATED_ON",e.NAME="NAME",e.ASSET_TYPE="ASSET_TYPE",e.PARENT_ID="PARENT_ID",e.REALM="REALM"}(tn||(tn={})),function(e){e.RESTRICTED="RESTRICTED",e.LINKED="LINKED",e.REALM="REALM"}(ti||(ti={})),function(e){e.AT_LEAST_ONE="AT_LEAST_ONE",e.ALL="ALL",e.NONE="NONE"}(to||(to={})),function(e){e.AND="AND",e.OR="OR"}(tr||(tr={})),function(e){e.CREATED_ON="CREATED_ON",e.FIRST_NAME="FIRST_NAME",e.LAST_NAME="LAST_NAME",e.USERNAME="USERNAME",e.EMAIL="EMAIL"}(ta||(ta={})),function(e){e.STOPPED="STOPPED",e.RUNNING="RUNNING",e.ERROR="ERROR"}(tc||(tc={})),function(e){e.JAVASCRIPT="JAVASCRIPT",e.GROOVY="GROOVY",e.JSON="JSON",e.FLOW="FLOW"}(td||(td={})),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"}(ts||(ts={})),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"}(tl||(tl={})),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"}(tm||(tm={})),function(e){e.NEW_LINE="NEW_LINE",e.SPACER="SPACER"}(tu||(tu={})),function(e){e.INPUT="INPUT",e.PROCESSOR="PROCESSOR",e.OUTPUT="OUTPUT",e.THEN="THEN"}(tf||(tf={})),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"}(tp||(tp={})),function(e){e.ADD="ADD",e.ADD_OR_REPLACE="ADD_OR_REPLACE",e.REPLACE="REPLACE",e.DELETE="DELETE",e.CLEAR="CLEAR"}(tb||(tb={})),function(e){e.PER_ASSET="PER_ASSET",e.GLOBAL="GLOBAL"}(th||(th={})),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"}(t_||(t_={})),function(e){e.REGISTER="REGISTER",e.UPDATE="UPDATE",e.DEREGISTER="DEREGISTER"}(tg||(tg={})),function(e){e.AVAILABLE="AVAILABLE",e.UNAVAILABLE="UNAVAILABLE"}(ty||(ty={})),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"}(tv||(tv={})),function(e){e.INFO="INFO",e.WARN="WARN",e.ERROR="ERROR"}(tF||(tF={})),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"}(tk||(tk={})),function(e){e.SECONDLY="SECONDLY",e.MINUTELY="MINUTELY",e.HOURLY="HOURLY",e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY",e.YEARLY="YEARLY"}(tx||(tx={})),function(e){e.OMIT="OMIT",e.BACKWARD="BACKWARD",e.FORWARD="FORWARD"}(tw||(tw={})),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"}(tE||(tE={})),function(e){e.SU="SU",e.MO="MO",e.TU="TU",e.WE="WE",e.TH="TH",e.FR="FR",e.SA="SA"}(tA||(tA={})),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"}(tT||(tT={})),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"}(tL||(tL={})),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"}(tM||(tM={})),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"}(tC||(tC={})),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"}(tD||(tD={})),tS||(tS={});class nI{static getAssetDescriptors(){return nI._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=nI.getValueDescriptor(t)),n=t.jsonType?t:nI.getValueDescriptor(t.type)),!n&&e&&(n=nI.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}}nI._assetTypeInfos=[],nI._metaItemDescriptors=[],nI._valueDescriptors=[],n(488);var nO=n(3348),nY=n.n(nO),nR=n(3806),nB=n.n(nR);n(2891);class nN{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 nP(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=>nP(e[n],t[n]))}return!1}var nH=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function c(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,c)}d((i=i.apply(e,t||[])).next())})};let nj=n(9916);class nz{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"),c=i.get("consoleProviders"),d=i.get("consoleAutoEnable"),s=c&&c.length>0?c.split(" "):["push"];this._pendingProviderEnables=s;let l=nz._createConsoleRegistration(),m=window.localStorage.getItem("OpenRemoteConsole:"+e);if(m)try{let e=JSON.parse(m);e.id&&(l.id=e.id),e.name&&(l.name=e.name),e.providers&&(l.providers=e.providers),e.apps&&(l.apps=e.apps)}catch(e){console.error("Failed to deserialise console registration")}let u=l.providers;for(let e of(l.providers={},s)){let t=u&&u.hasOwnProperty(e)?u[e]:{enabled:!1,disabled:!1};l.providers[e]=t}let f=ob.getAppName();f.length>0&&0>l.apps.indexOf(f)&&l.apps.push(f),this._registration=l,o&&(l.name=o),r&&(l.version=r),a&&(l.platform=a),d&&(this._autoEnable="TRUE"===d||"true"===d)}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 nH(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 nH(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 nH(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 nH(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 nH(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 nN,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={}),ob.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 nH(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:nj.name,version:nj.version,platform:nj.os.toString(),apps:[],model:((nj.manufacturer?nj.manufacturer+" ":"")+(nj.product?nj.product:"")).trim()}}_initialiseProvider(e){return nH(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 nU=n(3653),nW=n.n(nU);class n${constructor(e){this.httpClient=e}getApps(e){return this.httpClient.request({method:"GET",url:io`apps`,options:e})}getConsoleConfig(e){return this.httpClient.request({method:"GET",url:io`apps/consoleConfig`,options:e})}getAppInfos(e){return this.httpClient.request({method:"GET",url:io`apps/info`,options:e})}}class nV{constructor(e){this.httpClient=e}getSettings(e){return this.httpClient.request({method:"GET",url:io`map`,options:e})}saveSettings(e,t){return this.httpClient.request({method:"PUT",url:io`map`,data:e,options:t})}deleteMap(e){return this.httpClient.request({method:"DELETE",url:io`map/deleteMap`,options:e})}getCustomMapInfo(e){return this.httpClient.request({method:"GET",url:io`map/getCustomMapInfo`,options:e})}getSettingsJs(e){return this.httpClient.request({method:"GET",url:io`map/js`,options:e})}getTile(e,t,n,i){return this.httpClient.request({method:"GET",url:io`map/tile/${e}/${t}/${n}`,options:i})}uploadMap(e,t){return this.httpClient.request({method:"POST",url:io`map/upload`,queryParams:e,options:t})}}class nG{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:io`realm`,data:e,options:t})}getAll(e){return this.httpClient.request({method:"GET",url:io`realm`,options:e})}getAccessible(e){return this.httpClient.request({method:"GET",url:io`realm/accessible`,options:e})}delete(e,t){return this.httpClient.request({method:"DELETE",url:io`realm/${e}`,options:t})}get(e,t){return this.httpClient.request({method:"GET",url:io`realm/${e}`,options:t})}update(e,t,n){return this.httpClient.request({method:"PUT",url:io`realm/${e}`,data:t,options:n})}}class nq{constructor(e){this.httpClient=e}getNotifications(e,t){return this.httpClient.request({method:"GET",url:io`notification`,queryParams:e,options:t})}removeNotifications(e,t){return this.httpClient.request({method:"DELETE",url:io`notification`,queryParams:e,options:t})}sendNotification(e,t){return this.httpClient.request({method:"POST",url:io`notification/alert`,data:e,options:t})}removeNotification(e,t){return this.httpClient.request({method:"DELETE",url:io`notification/${e}`,options:t})}notificationAcknowledged(e,t,n,i){return this.httpClient.request({method:"PUT",url:io`notification/${e}/acknowledged`,queryParams:n,data:t,options:i})}notificationDelivered(e,t,n){return this.httpClient.request({method:"PUT",url:io`notification/${e}/delivered`,queryParams:t,options:n})}}class nX{constructor(e){this.httpClient=e}register(e,t){return this.httpClient.request({method:"POST",url:io`console/register`,data:e,options:t})}}class nK{constructor(e){this.httpClient=e}getServices(e,t){return this.httpClient.request({method:"GET",url:io`service`,queryParams:e,options:t})}registerService(e,t){return this.httpClient.request({method:"POST",url:io`service`,data:e,options:t})}getGlobalServices(e){return this.httpClient.request({method:"GET",url:io`service/global`,options:e})}registerGlobalService(e,t){return this.httpClient.request({method:"POST",url:io`service/global`,data:e,options:t})}deregisterService(e,t,n){return this.httpClient.request({method:"DELETE",url:io`service/${e}/${t}`,options:n})}getService(e,t,n){return this.httpClient.request({method:"GET",url:io`service/${e}/${t}`,options:n})}heartbeat(e,t,n){return this.httpClient.request({method:"PUT",url:io`service/${e}/${t}`,options:n})}}class nJ{constructor(e){this.httpClient=e}deleteConnections(e,t){return this.httpClient.request({method:"DELETE",url:io`gateway/connection`,queryParams:e,options:t})}getConnections(e){return this.httpClient.request({method:"GET",url:io`gateway/connection`,options:e})}deleteConnection(e,t){return this.httpClient.request({method:"DELETE",url:io`gateway/connection/${e}`,options:t})}getConnection(e,t){return this.httpClient.request({method:"GET",url:io`gateway/connection/${e}`,options:t})}setConnection(e,t,n){return this.httpClient.request({method:"PUT",url:io`gateway/connection/${e}`,data:t,options:n})}getConnectionStatus(e,t){return this.httpClient.request({method:"GET",url:io`gateway/status/${e}`,options:t})}}class nQ{constructor(e){this.httpClient=e}getDatapointExport(e,t){return this.httpClient.request({method:"GET",url:io`asset/datapoint/export`,queryParams:e,options:t})}getDatapointPeriod(e,t){return this.httpClient.request({method:"GET",url:io`asset/datapoint/periods`,queryParams:e,options:t})}getDatapoints(e,t,n,i){return this.httpClient.request({method:"POST",url:io`asset/datapoint/${e}/${t}`,data:n,options:i})}}class nZ{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:io`dashboard`,data:e,options:t})}update(e,t){return this.httpClient.request({method:"PUT",url:io`dashboard`,data:e,options:t})}getAllRealmDashboards(e,t){return this.httpClient.request({method:"GET",url:io`dashboard/all/${e}`,options:t})}query(e,t){return this.httpClient.request({method:"POST",url:io`dashboard/query`,data:e,options:t})}delete(e,t,n){return this.httpClient.request({method:"DELETE",url:io`dashboard/${e}/${t}`,options:n})}get(e,t,n){return this.httpClient.request({method:"GET",url:io`dashboard/${e}/${t}`,options:n})}}class n0{constructor(e){this.httpClient=e}createProvisioningConfig(e,t){return this.httpClient.request({method:"POST",url:io`provisioning`,data:e,options:t})}getProvisioningConfigs(e){return this.httpClient.request({method:"GET",url:io`provisioning`,options:e})}deleteProvisioningConfig(e,t){return this.httpClient.request({method:"DELETE",url:io`provisioning/${e}`,options:t})}updateProvisioningConfig(e,t,n){return this.httpClient.request({method:"PUT",url:io`provisioning/${e}`,data:t,options:n})}}class n1{constructor(e){this.httpClient=e}createAlarm(e,t,n){return this.httpClient.request({method:"POST",url:io`alarm`,queryParams:t,data:e,options:n})}getAlarms(e,t){return this.httpClient.request({method:"GET",url:io`alarm`,queryParams:e,options:t})}removeAlarms(e,t){return this.httpClient.request({method:"DELETE",url:io`alarm`,data:e,options:t})}setAssetLinks(e,t){return this.httpClient.request({method:"PUT",url:io`alarm/assets`,data:e,options:t})}getAlarm(e,t){return this.httpClient.request({method:"GET",url:io`alarm/${e}`,options:t})}removeAlarm(e,t){return this.httpClient.request({method:"DELETE",url:io`alarm/${e}`,options:t})}updateAlarm(e,t,n){return this.httpClient.request({method:"PUT",url:io`alarm/${e}`,data:t,options:n})}getAssetLinks(e,t,n){return this.httpClient.request({method:"GET",url:io`alarm/${e}/assets`,queryParams:t,options:n})}}class n2{constructor(e){this.httpClient=e}getHealthStatus(e){return this.httpClient.request({method:"GET",url:io`health`,options:e})}getInfo(e){return this.httpClient.request({method:"GET",url:io`info`,options:e})}}class n5{constructor(e){this.httpClient=e}getAllNodeDefinitions(e){return this.httpClient.request({method:"GET",url:io`flow`,options:e})}getNodeDefinition(e,t){return this.httpClient.request({method:"GET",url:io`flow/${e}`,options:t})}getAllNodeDefinitionsByType(e,t){return this.httpClient.request({method:"GET",url:io`flow/${e}`,options:t})}}class n3{constructor(e){this.httpClient=e}doProtocolAssetDiscovery(e,t,n){return this.httpClient.request({method:"GET",url:io`agent/assetDiscovery/${e}`,queryParams:t,options:n})}doProtocolAssetImport(e,t,n,i){return this.httpClient.request({method:"POST",url:io`agent/assetImport/${e}`,queryParams:n,data:t,options:i})}doProtocolInstanceDiscovery(e,t,n){return this.httpClient.request({method:"GET",url:io`agent/instanceDiscovery/${e}`,queryParams:t,options:n})}}class n4{constructor(e){this.httpClient=e}getPredictedDatapoints(e,t,n,i){return this.httpClient.request({method:"POST",url:io`asset/predicted/${e}/${t}`,data:n,options:i})}writePredictedDatapoints(e,t,n,i){return this.httpClient.request({method:"PUT",url:io`asset/predicted/${e}/${t}`,data:n,options:i})}}class n6{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:io`asset`,data:e,options:t})}delete(e,t){return this.httpClient.request({method:"DELETE",url:io`asset`,queryParams:e,options:t})}writeAttributeValues(e,t){return this.httpClient.request({method:"PUT",url:io`asset/attributes`,data:e,options:t})}writeAttributeEvents(e,t){return this.httpClient.request({method:"PUT",url:io`asset/attributes/timestamp`,data:e,options:t})}updateNoneParent(e,t){return this.httpClient.request({method:"DELETE",url:io`asset/parent`,queryParams:e,options:t})}getPartial(e,t){return this.httpClient.request({method:"GET",url:io`asset/partial/${e}`,options:t})}queryAssets(e,t){return this.httpClient.request({method:"POST",url:io`asset/query`,data:e,options:t})}queryAssetTree(e,t){return this.httpClient.request({method:"POST",url:io`asset/tree`,data:e,options:t})}getCurrentUserAssets(e){return this.httpClient.request({method:"GET",url:io`asset/user/current`,options:e})}createUserAssetLinks(e,t){return this.httpClient.request({method:"POST",url:io`asset/user/link`,data:e,options:t})}getUserAssetLinks(e,t){return this.httpClient.request({method:"GET",url:io`asset/user/link`,queryParams:e,options:t})}deleteUserAssetLinks(e,t){return this.httpClient.request({method:"POST",url:io`asset/user/link/delete`,data:e,options:t})}deleteAllUserAssetLinks(e,t,n){return this.httpClient.request({method:"DELETE",url:io`asset/user/link/${e}/${t}`,options:n})}deleteUserAssetLink(e,t,n,i){return this.httpClient.request({method:"DELETE",url:io`asset/user/link/${e}/${t}/${n}`,options:i})}get(e,t){return this.httpClient.request({method:"GET",url:io`asset/${e}`,options:t})}update(e,t,n){return this.httpClient.request({method:"PUT",url:io`asset/${e}`,data:t,options:n})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName(e,t,n,i){return this.httpClient.request({method:"PUT",url:io`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:io`asset/${e}/attribute/${t}/${n}`,data:i,options:o})}updateParent(e,t,n){return this.httpClient.request({method:"PUT",url:io`asset/${e}/child`,queryParams:t,options:n})}}class n8{constructor(e){this.httpClient=e}createGlobalRuleset(e,t){return this.httpClient.request({method:"POST",url:io`rules`,data:e,options:t})}getGlobalRulesets(e,t){return this.httpClient.request({method:"GET",url:io`rules`,queryParams:e,options:t})}createAssetRuleset(e,t){return this.httpClient.request({method:"POST",url:io`rules/asset`,data:e,options:t})}getAssetRulesets(e,t,n){return this.httpClient.request({method:"GET",url:io`rules/asset/for/${e}`,queryParams:t,options:n})}deleteAssetRuleset(e,t){return this.httpClient.request({method:"DELETE",url:io`rules/asset/${e}`,options:t})}getAssetRuleset(e,t){return this.httpClient.request({method:"GET",url:io`rules/asset/${e}`,options:t})}updateAssetRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:io`rules/asset/${e}`,data:t,options:n})}getAssetGeofences(e,t){return this.httpClient.request({method:"GET",url:io`rules/geofences/${e}`,options:t})}getAssetEngineInfo(e,t){return this.httpClient.request({method:"GET",url:io`rules/info/asset/${e}`,options:t})}getGlobalEngineInfo(e){return this.httpClient.request({method:"GET",url:io`rules/info/global`,options:e})}getRealmEngineInfo(e,t){return this.httpClient.request({method:"GET",url:io`rules/info/realm/${e}`,options:t})}createRealmRuleset(e,t){return this.httpClient.request({method:"POST",url:io`rules/realm`,data:e,options:t})}getRealmRulesets(e,t,n){return this.httpClient.request({method:"GET",url:io`rules/realm/for/${e}`,queryParams:t,options:n})}deleteRealmRuleset(e,t){return this.httpClient.request({method:"DELETE",url:io`rules/realm/${e}`,options:t})}getRealmRuleset(e,t){return this.httpClient.request({method:"GET",url:io`rules/realm/${e}`,options:t})}updateRealmRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:io`rules/realm/${e}`,data:t,options:n})}deleteGlobalRuleset(e,t){return this.httpClient.request({method:"DELETE",url:io`rules/${e}`,options:t})}getGlobalRuleset(e,t){return this.httpClient.request({method:"GET",url:io`rules/${e}`,options:t})}updateGlobalRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:io`rules/${e}`,data:t,options:n})}}class n7{constructor(e){this.httpClient=e}startTunnel(e,t){return this.httpClient.request({method:"POST",url:io`gateway/tunnel`,data:e,options:t})}stopTunnel(e,t){return this.httpClient.request({method:"DELETE",url:io`gateway/tunnel`,data:e,options:t})}getAllActiveTunnelInfos(e,t){return this.httpClient.request({method:"GET",url:io`gateway/tunnel/${e}`,options:t})}getGatewayActiveTunnelInfos(e,t,n){return this.httpClient.request({method:"GET",url:io`gateway/tunnel/${e}/${t}`,options:n})}getActiveTunnelInfo(e,t,n,i,o){return this.httpClient.request({method:"GET",url:io`gateway/tunnel/${e}/${t}/${n}/${i}`,options:o})}}class n9{constructor(e){this.httpClient=e}updateCurrentUserLocale(e,t){return this.httpClient.request({method:"PUT",url:io`user/locale`,data:e,options:t})}query(e,t){return this.httpClient.request({method:"POST",url:io`user/query`,data:e,options:t})}requestPasswordResetCurrent(e){return this.httpClient.request({method:"PUT",url:io`user/request-password-reset`,options:e})}updatePasswordCurrent(e,t){return this.httpClient.request({method:"PUT",url:io`user/reset-password`,data:e,options:t})}updateCurrent(e,t){return this.httpClient.request({method:"PUT",url:io`user/update`,data:e,options:t})}getCurrent(e){return this.httpClient.request({method:"GET",url:io`user/user`,options:e})}getCurrentUserRealmRoles(e){return this.httpClient.request({method:"GET",url:io`user/userRealmRoles`,options:e})}getCurrentUserClientRoles(e,t){return this.httpClient.request({method:"GET",url:io`user/userRoles/${e}`,options:t})}disconnectUserSession(e,t,n){return this.httpClient.request({method:"GET",url:io`user/${e}/disconnect/${t}`,options:n})}requestPasswordReset(e,t,n){return this.httpClient.request({method:"PUT",url:io`user/${e}/request-password-reset/${t}`,options:n})}updatePassword(e,t,n,i){return this.httpClient.request({method:"PUT",url:io`user/${e}/reset-password/${t}`,data:n,options:i})}resetSecret(e,t,n){return this.httpClient.request({method:"GET",url:io`user/${e}/reset-secret/${t}`,options:n})}updateRoles(e,t,n){return this.httpClient.request({method:"PUT",url:io`user/${e}/roles`,data:t,options:n})}getUserRealmRoles(e,t,n){return this.httpClient.request({method:"GET",url:io`user/${e}/userRealmRoles/${t}`,options:n})}updateUserRealmRoles(e,t,n,i){return this.httpClient.request({method:"PUT",url:io`user/${e}/userRealmRoles/${t}`,data:n,options:i})}getUserClientRoles(e,t,n,i){return this.httpClient.request({method:"GET",url:io`user/${e}/userRoles/${t}/${n}`,options:i})}updateUserClientRoles(e,t,n,i,o){return this.httpClient.request({method:"PUT",url:io`user/${e}/userRoles/${t}/${n}`,data:i,options:o})}getUserSessions(e,t,n){return this.httpClient.request({method:"GET",url:io`user/${e}/userSessions/${t}`,options:n})}create(e,t,n){return this.httpClient.request({method:"POST",url:io`user/${e}/users`,data:t,options:n})}update(e,t,n){return this.httpClient.request({method:"PUT",url:io`user/${e}/users`,data:t,options:n})}delete(e,t,n){return this.httpClient.request({method:"DELETE",url:io`user/${e}/users/${t}`,options:n})}getClientRoles(e,t,n){return this.httpClient.request({method:"GET",url:io`user/${e}/${t}/roles`,options:n})}updateClientRoles(e,t,n,i){return this.httpClient.request({method:"PUT",url:io`user/${e}/${t}/roles`,data:n,options:i})}get(e,t,n){return this.httpClient.request({method:"GET",url:io`user/${e}/${t}`,options:n})}}class ie{constructor(e){this.httpClient=e}getConfig(e){return this.httpClient.request({method:"GET",url:io`syslog/config`,options:e})}updateConfig(e,t){return this.httpClient.request({method:"PUT",url:io`syslog/config`,data:e,options:t})}clearEvents(e){return this.httpClient.request({method:"DELETE",url:io`syslog/event`,options:e})}getEvents(e,t){return this.httpClient.request({method:"GET",url:io`syslog/event`,queryParams:e,options:t})}}class it{constructor(e){this.httpClient=e}getManagerConfig(e){return this.httpClient.request({method:"GET",url:io`configuration/manager`,options:e})}update(e,t){return this.httpClient.request({method:"PUT",url:io`configuration/manager`,data:e,options:t})}fileUpload(e,t,n){return this.httpClient.request({method:"POST",url:io`configuration/manager/file`,queryParams:t,data:e,options:n})}getManagerConfigImage(e,t){return this.httpClient.request({method:"GET",url:io`configuration/manager/image/${e}`,options:t})}}class ii{constructor(e){this.httpClient=e}getAssetDescriptors(e,t){return this.httpClient.request({method:"GET",url:io`model/assetDescriptors`,queryParams:e,options:t})}getAssetInfo(e,t,n){return this.httpClient.request({method:"GET",url:io`model/assetInfo/${e}`,queryParams:t,options:n})}getAssetInfos(e,t){return this.httpClient.request({method:"GET",url:io`model/assetInfos`,queryParams:e,options:t})}getValueDescriptorSchema(e,t){return this.httpClient.request({method:"GET",url:io`model/getValueDescriptorSchema`,queryParams:e,options:t})}getMetaItemDescriptors(e,t){return this.httpClient.request({method:"GET",url:io`model/metaItemDescriptors`,queryParams:e,options:t})}getValueDescriptors(e,t){return this.httpClient.request({method:"GET",url:io`model/valueDescriptors`,queryParams:e,options:t})}}function io(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 ir{constructor(e,t=nW().create()){this._appResource=new ic(e,t),this._mapResource=new id(e,t),this._realmResource=new is(e,t),this._notificationResource=new il(e,t),this._consoleResource=new im(e,t),this._externalServiceResource=new iu(e,t),this._gatewayClientResource=new ip(e,t),this._assetDatapointResource=new ib(e,t),this._dashboardResource=new ih(e,t),this._provisioningResource=new i_(e,t),this._alarmResource=new ig(e,t),this._statusResource=new iy(e,t),this._flowResource=new iv(e,t),this._agentResource=new iF(e,t),this._assetPredictedDatapointResource=new ik(e,t),this._assetResource=new ix(e,t),this._rulesResource=new iw(e,t),this._gatewayServiceResource=new iE(e,t),this._userResource=new iA(e,t),this._syslogResource=new iT(e,t),this._configurationResource=new iL(e,t),this._assetModelResource=new iM(e,t),this._assetResource=new ix(e,t)}get AppResource(){return this._appResource}get MapResource(){return this._mapResource}get RealmResource(){return this._realmResource}get NotificationResource(){return this._notificationResource}get ConsoleResource(){return this._consoleResource}get ExternalServiceResource(){return this._externalServiceResource}get GatewayClientResource(){return this._gatewayClientResource}get AssetDatapointResource(){return this._assetDatapointResource}get DashboardResource(){return this._dashboardResource}get ProvisioningResource(){return this._provisioningResource}get AlarmResource(){return this._alarmResource}get StatusResource(){return this._statusResource}get FlowResource(){return this._flowResource}get AgentResource(){return this._agentResource}get AssetPredictedDatapointResource(){return this._assetPredictedDatapointResource}get AssetResource(){return this._assetResource}get RulesResource(){return this._rulesResource}get GatewayServiceResource(){return this._gatewayServiceResource}get UserResource(){return this._userResource}get SyslogResource(){return this._syslogResource}get ConfigurationResource(){return this._configurationResource}get AssetModelResource(){return this._assetModelResource}}class ia{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 ic extends n${constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class id extends nV{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class is extends nG{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class il extends nq{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class im extends nX{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class iu extends nK{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class ip extends nJ{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class ib extends nQ{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class ih extends nZ{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class i_ extends n0{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class ig extends n1{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class iy extends n2{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class iv extends n5{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class iF extends n3{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class ik extends n4{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class ix extends n6{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class iw extends n8{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class iE extends n7{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class iA extends n9{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class iT extends ie{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class iL extends it{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class iM extends ii{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}nW().isAxiosError;let iC=new class{get api(){return this._client}constructor(){this._axiosInstance=nW().create(),this._axiosInstance.defaults.headers.common["Content-Type"]="application/json",this._axiosInstance.interceptors.request.use(e=>(e.paramsSerializer=e=>nY().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 ir(e,this._axiosInstance)}};var iD=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function c(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,c)}d((i=i.apply(e,t||[])).next())})};!function(e){e.DISCONNECTED="DISCONNECTED",e.CONNECTED="CONNECTED",e.CONNECTING="CONNECTING"}(tI||(tI={}));let iS="SUBSCRIBED:",iI="UNAUTHORIZED:",iO="TRIGGERED:",iY="EVENT:";class iR{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=iB.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=tI.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===tI.CONNECTED)?Promise.resolve(!0):(this._disconnectRequested=!1,this._connectingDeferred||(this._onStatusChanged(tI.CONNECTING),this._connectingDeferred=new nN,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=iB.MIN_RECONNECT_DELAY,this._onStatusChanged(tI.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!==tI.DISCONNECTED&&this._doDisconnect())}subscribe(e,t){let n={eventSubscription:e,callback:t,deferred:new nN};return null!=this._pendingSubscription||this._status!==tI.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 iD(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===tI.CONNECTED&&this._doSend(e)}sendEventWithReply(e){return this._status!==tI.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(e)}subscribeAssetEvents(e,t,n){return iD(this,void 0,void 0,function*(){let i=e&&"string"!=typeof e[0]?e.map(e=>e.id):e,o="AssetEvent"+iR._subscriptionCounter++;if(!this._assetEventPromise){let e;ob.authenticated||(e={filterType:"asset",realm:ob.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===ob.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 iD(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"+iR._subscriptionCounter++;if(!this._attributeEventPromise){let e;ob.authenticated||(e={filterType:"asset",realm:ob.displayRealm});let t={eventType:"attribute",filter:e};this._attributeEventPromise=this.subscribe(t,e=>{this._attributeEventCallbackMap.forEach(t=>t(e))})}let c=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===ob.displayRealm&&n(t)};return this._attributeEventCallbackMap.set(a,c),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))&&c({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===tI.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===tI.CONNECTED&&this._onStatusChanged(tI.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(tI.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<iB.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(iB.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}iR.MIN_RECONNECT_DELAY=0,iR.MAX_RECONNECT_DELAY=3e4,iR._subscriptionCounter=0;class iB extends iR{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="+ob.config.realm;return ob.authenticated&&(e+="&Authorization="+ob.getAuthorizationHeader()),this._webSocket=new WebSocket(e),this._connectDeferred=new nN,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(iS)){let e=JSON.parse(t.substring(iS.length)),n=this._subscribeDeferred;this._subscribeDeferred=null,n&&n.resolve(e.subscriptionId)}else if(t.startsWith(iI)){let e=JSON.parse(t.substring(iI.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(iO)){let e=JSON.parse(t.substring(iO.length));e.events&&e.events.forEach(t=>{this._onMessageReceived(e.subscriptionId,t)})}else if(t.startsWith(iY)){let e=JSON.parse(t.substring(iY.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 nN,e.subscriptionId||(e.subscriptionId=iB._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=iY+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 nN;return this._repliesDeferred.set(e.messageID,t),this._webSocket.send(iY+JSON.stringify(e)),t.promise}}function iN(e){return(iN="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)}iB._subscriptionCounter=1;var iP=[],iH=iP.forEach,ij=iP.slice;function iz(e){return iH.call(ij.call(arguments,1),function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e}function iU(){return"function"==typeof XMLHttpRequest||("undefined"==typeof XMLHttpRequest?"undefined":iN(XMLHttpRequest))==="object"}var iW=n(6850),i$=n.t(iW,2);function iV(e){return(iV="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&&(tO="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),iU()&&("undefined"!=typeof global&&global.XMLHttpRequest?tY=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(tY=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?tR=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(tR=window.ActiveXObject)),tO||!i$||tY||tR||(tO=iW||i$),"function"!=typeof tO&&(tO=void 0);var iG=function(e,t){if(t&&"object"===iV(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},iq=function(e,t,n){tO(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)},iX=!1,iK=function(e,t,n,i){e.queryStringParams&&(t=iG(t,e.queryStringParams));var o=iz({},"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=iz({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o},iX?{}:r);try{iq(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]}),iq(t,a,i),iX=!0}catch(e){i(e)}}},iJ=function(e,t,n,i){n&&"object"===iV(n)&&(n=iG("",n).slice(1)),e.queryStringParams&&(t=iG(t,e.queryStringParams));try{(o=tY?new tY:new tR("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 iQ=function(e,t,n,i){return("function"==typeof n&&(i=n,n=void 0),i=i||function(){},tO)?iK(e,t,n,i):iU()||"function"==typeof ActiveXObject?iJ(e,t,n,i):void i(Error("No fetch and no xhr implementation found!"))};var iZ=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=iz(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:iQ,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,c=this,d=this.options.loadPath;"function"==typeof this.options.loadPath&&(d=this.options.loadPath(e,n)),(d=(a=r=d)&&"function"==typeof a.then?r:Promise.resolve(r)).then(function(r){if(!r)return o(null,{});var a=c.services.interpolator.interpolate(r,{lng:e.join("+"),ns:n.join("+")});c.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 c,d;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{c="string"==typeof a.data?o.options.parse(a.data,n,i):a.data}catch(t){d="failed parsing "+e+" to json"}if(d)return t(d,!1);t(null,c)})}},{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),c=0,d=[],s=[];e.forEach(function(n){var i=r.options.addPath;"function"==typeof r.options.addPath&&(i=r.options.addPath(n,t));var l=r.services.interpolator.interpolate(i,{lng:n,ns:t});r.options.request(r.options,l,a,function(t,n){c+=1,d.push(t),s.push(n),c===e.length&&o&&o(d,s)})})}}},{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=[],c=function(e){i.toResolveHierarchy(e).forEach(function(e){0>a.indexOf(e)&&a.push(e)})};c(r),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return c(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}();iZ.type="backend";let i0={ATTRIBUTE:1,CHILD:2},i1=e=>(...t)=>({_$litDirective$:e,values:t});class i2{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 i5 extends i2{constructor(e){if(super(e),this.it=G,e.type!==i0.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===G||null==e)return this._t=void 0,this.it=e;if(e===V)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:[]}}}i5.directiveName="unsafeHTML",i5.resultType=1,i1(i5);class i3 extends i5{}i3.directiveName="unsafeSVG",i3.resultType=2;let i4=i1(i3),i6={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 i8=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 c=e.length-1;c>=0;c--)(o=e[c])&&(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 i7=n(7319);class i9 extends CustomEvent{constructor(){super(i9.NAME,{bubbles:!0,composed:!0})}}i9.NAME="or-iconset-added";let oe=new class{constructor(){this._icons={}}addIconSet(e,t){this._icons[e]=t,this._defaultIconSet||(this._defaultIconSet=t),t.onAdd&&t.onAdd(),window.dispatchEvent(new i9)}getIconSet(e){return this._icons[e]}getIconTemplate(e){if(!e)return $``;let t=(e||"").split(":"),n=t.pop(),i=t.pop(),o=this._defaultIconSet;return(i&&(o=this.getIconSet(i)),n&&o)?o.getIconTemplate(n):$``}},ot=class extends es{constructor(){super(...arguments),this._handler=e=>{this._updateIcon()}}static get styles(){return[d`
|
|
224
|
+
`,nD([ef({type:String})],nS.prototype,"value",void 0),nD([ef({type:Object})],nS.prototype,"options",void 0),nS=nD([em("or-translate")],nS),function(e){e.CREATE="CREATE",e.UPDATE="UPDATE",e.DELETE="DELETE"}(eS||(eS={})),function(e){e.LOW="LOW",e.MEDIUM="MEDIUM",e.HIGH="HIGH"}(eI||(eI={})),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"}(eO||(eO={})),function(e){e.OPEN="OPEN",e.ACKNOWLEDGED="ACKNOWLEDGED",e.IN_PROGRESS="IN_PROGRESS",e.RESOLVED="RESOLVED",e.CLOSED="CLOSED"}(eY||(eY={})),function(e){e.BOTTOM_LEFT="BOTTOM_LEFT",e.BOTTOM_RIGHT="BOTTOM_RIGHT",e.TOP_LEFT="TOP_LEFT",e.TOP_RIGHT="TOP_RIGHT"}(eR||(eR={})),function(e){e.CREATE="CREATE",e.READ="READ",e.UPDATE="UPDATE",e.DELETE="DELETE"}(eB||(eB={})),function(e){e.NONE="NONE",e.FORECAST="FORECAST",e.SETPOINT="SETPOINT"}(eN||(eN={})),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"}(eP||(eP={})),function(e){e.EV="EV",e.PHEV="PHEV"}(eH||(eH={})),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"}(ej||(ej={})),function(e){e.SOUTH="SOUTH",e.EAST_WEST="EAST_WEST"}(ez||(ez={})),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"}(eU||(eU={})),function(e){e.TOGGLE="TOGGLE",e.INCREMENT="INCREMENT",e.DECREMENT="DECREMENT",e.NEGATE="NEGATE"}(eW||(eW={})),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"}(e$||(e$={})),function(e){e.PUBLIC="PUBLIC",e.SHARED="SHARED",e.PRIVATE="PRIVATE"}(eV||(eV={})),function(e){e.OFF="OFF",e.ONE_MIN="ONE_MIN",e.FIVE_MIN="FIVE_MIN",e.QUARTER="QUARTER",e.ONE_HOUR="ONE_HOUR"}(eG||(eG={})),function(e){e.WRAP_TO_SINGLE_COLUMN="WRAP_TO_SINGLE_COLUMN",e.KEEP_LAYOUT="KEEP_LAYOUT",e.REDIRECT="REDIRECT",e.BLOCK_DEVICE="BLOCK_DEVICE"}(eq||(eq={})),function(e){e.MINUTE="MINUTE",e.HOUR="HOUR",e.DAY="DAY",e.WEEK="WEEK",e.MONTH="MONTH",e.YEAR="YEAR"}(eX||(eX={})),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"}(eK||(eK={})),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"}(eJ||(eJ={})),function(e){e.HTTPS="HTTPS",e.HTTP="HTTP",e.TCP="TCP"}(eQ||(eQ={})),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.OPTIONS="OPTIONS",e.PATCH="PATCH"}(eZ||(eZ={})),function(e){e.KEYCLOAK="KEYCLOAK",e.BASIC="BASIC",e.NONE="NONE"}(e0||(e0={})),function(e){e.WEBSOCKET="WEBSOCKET",e.POLLING="POLLING"}(e1||(e1={})),function(e){e.VECTOR="VECTOR",e.RASTER="RASTER"}(e2||(e2={})),function(e){e.INTERNAL="INTERNAL",e.CLIENT="CLIENT",e.GLOBAL_RULESET="GLOBAL_RULESET",e.REALM_RULESET="REALM_RULESET",e.ASSET_RULESET="ASSET_RULESET"}(e5||(e5={})),function(e){e.REALM="REALM",e.USER="USER",e.ASSET="ASSET",e.CUSTOM="CUSTOM"}(e3||(e3={})),function(e){e.NORMAL="NORMAL",e.HIGH="HIGH"}(e4||(e4={})),function(e){e.DEVICE="DEVICE",e.TOPIC="TOPIC",e.CONDITION="CONDITION"}(e6||(e6={})),function(e){e.ALWAYS="ALWAYS",e.ONCE="ONCE",e.HOURLY="HOURLY",e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY",e.ANNUALLY="ANNUALLY"}(e8||(e8={})),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"}(e7||(e7={})),function(e){e.PRIVATE="PRIVATE",e.PROTECTED="PROTECTED",e.PUBLIC="PUBLIC"}(e9||(e9={})),function(e){e.EXACT="EXACT",e.BEGIN="BEGIN",e.END="END",e.CONTAINS="CONTAINS"}(te||(te={})),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"}(tt||(tt={})),function(e){e.CREATED_ON="CREATED_ON",e.NAME="NAME",e.ASSET_TYPE="ASSET_TYPE",e.PARENT_ID="PARENT_ID",e.REALM="REALM"}(tn||(tn={})),function(e){e.RESTRICTED="RESTRICTED",e.LINKED="LINKED",e.REALM="REALM"}(ti||(ti={})),function(e){e.AT_LEAST_ONE="AT_LEAST_ONE",e.ALL="ALL",e.NONE="NONE"}(to||(to={})),function(e){e.AND="AND",e.OR="OR"}(tr||(tr={})),function(e){e.CREATED_ON="CREATED_ON",e.FIRST_NAME="FIRST_NAME",e.LAST_NAME="LAST_NAME",e.USERNAME="USERNAME",e.EMAIL="EMAIL"}(ta||(ta={})),function(e){e.STOPPED="STOPPED",e.RUNNING="RUNNING",e.ERROR="ERROR"}(tc||(tc={})),function(e){e.JAVASCRIPT="JAVASCRIPT",e.GROOVY="GROOVY",e.JSON="JSON",e.FLOW="FLOW"}(td||(td={})),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"}(ts||(ts={})),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"}(tl||(tl={})),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"}(tm||(tm={})),function(e){e.NEW_LINE="NEW_LINE",e.SPACER="SPACER"}(tu||(tu={})),function(e){e.INPUT="INPUT",e.PROCESSOR="PROCESSOR",e.OUTPUT="OUTPUT",e.THEN="THEN"}(tf||(tf={})),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"}(tp||(tp={})),function(e){e.ADD="ADD",e.ADD_OR_REPLACE="ADD_OR_REPLACE",e.REPLACE="REPLACE",e.DELETE="DELETE",e.CLEAR="CLEAR"}(tb||(tb={})),function(e){e.PER_ASSET="PER_ASSET",e.GLOBAL="GLOBAL"}(th||(th={})),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"}(t_||(t_={})),function(e){e.REGISTER="REGISTER",e.UPDATE="UPDATE",e.DEREGISTER="DEREGISTER"}(tg||(tg={})),function(e){e.AVAILABLE="AVAILABLE",e.UNAVAILABLE="UNAVAILABLE"}(ty||(ty={})),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"}(tv||(tv={})),function(e){e.INFO="INFO",e.WARN="WARN",e.ERROR="ERROR"}(tF||(tF={})),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"}(tk||(tk={})),function(e){e.SECONDLY="SECONDLY",e.MINUTELY="MINUTELY",e.HOURLY="HOURLY",e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY",e.YEARLY="YEARLY"}(tx||(tx={})),function(e){e.OMIT="OMIT",e.BACKWARD="BACKWARD",e.FORWARD="FORWARD"}(tw||(tw={})),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"}(tE||(tE={})),function(e){e.SU="SU",e.MO="MO",e.TU="TU",e.WE="WE",e.TH="TH",e.FR="FR",e.SA="SA"}(tA||(tA={})),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"}(tT||(tT={})),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"}(tL||(tL={})),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"}(tM||(tM={})),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"}(tC||(tC={})),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"}(tD||(tD={})),tS||(tS={});class nI{static getAssetDescriptors(){return nI._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=nI.getValueDescriptor(t)),n=t.jsonType?t:nI.getValueDescriptor(t.type)),!n&&e&&(n=nI.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}}nI._assetTypeInfos=[],nI._metaItemDescriptors=[],nI._valueDescriptors=[],n(488);var nO=n(3348),nY=n.n(nO),nR=n(3806),nB=n.n(nR);n(2891);class nN{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 nP(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=>nP(e[n],t[n]))}return!1}var nH=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function c(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,c)}d((i=i.apply(e,t||[])).next())})};let nj=n(9916);class nz{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"),c=i.get("consoleProviders"),d=i.get("consoleAutoEnable"),s=c&&c.length>0?c.split(" "):["push"];this._pendingProviderEnables=s;let l=nz._createConsoleRegistration(),m=window.localStorage.getItem("OpenRemoteConsole:"+e);if(m)try{let e=JSON.parse(m);e.id&&(l.id=e.id),e.name&&(l.name=e.name),e.providers&&(l.providers=e.providers),e.apps&&(l.apps=e.apps)}catch(e){console.error("Failed to deserialise console registration")}let u=l.providers;for(let e of(l.providers={},s)){let t=u&&u.hasOwnProperty(e)?u[e]:{enabled:!1,disabled:!1};l.providers[e]=t}let f=ob.getAppName();f.length>0&&0>l.apps.indexOf(f)&&l.apps.push(f),this._registration=l,o&&(l.name=o),r&&(l.version=r),a&&(l.platform=a),d&&(this._autoEnable="TRUE"===d||"true"===d)}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 nH(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 nH(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 nH(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 nH(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 nH(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 nN,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={}),ob.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 nH(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:nj.name,version:nj.version,platform:nj.os.toString(),apps:[],model:((nj.manufacturer?nj.manufacturer+" ":"")+(nj.product?nj.product:"")).trim()}}_initialiseProvider(e){return nH(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 nU=n(3653),nW=n.n(nU);class n${constructor(e){this.httpClient=e}getPredictedDatapoints(e,t,n,i){return this.httpClient.request({method:"POST",url:io`asset/predicted/${e}/${t}`,data:n,options:i})}writePredictedDatapoints(e,t,n,i){return this.httpClient.request({method:"PUT",url:io`asset/predicted/${e}/${t}`,data:n,options:i})}}class nV{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:io`realm`,data:e,options:t})}getAll(e){return this.httpClient.request({method:"GET",url:io`realm`,options:e})}getAccessible(e){return this.httpClient.request({method:"GET",url:io`realm/accessible`,options:e})}delete(e,t){return this.httpClient.request({method:"DELETE",url:io`realm/${e}`,options:t})}get(e,t){return this.httpClient.request({method:"GET",url:io`realm/${e}`,options:t})}update(e,t,n){return this.httpClient.request({method:"PUT",url:io`realm/${e}`,data:t,options:n})}}class nG{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:io`asset`,data:e,options:t})}delete(e,t){return this.httpClient.request({method:"DELETE",url:io`asset`,queryParams:e,options:t})}writeAttributeValues(e,t){return this.httpClient.request({method:"PUT",url:io`asset/attributes`,data:e,options:t})}writeAttributeEvents(e,t){return this.httpClient.request({method:"PUT",url:io`asset/attributes/timestamp`,data:e,options:t})}updateNoneParent(e,t){return this.httpClient.request({method:"DELETE",url:io`asset/parent`,queryParams:e,options:t})}getPartial(e,t){return this.httpClient.request({method:"GET",url:io`asset/partial/${e}`,options:t})}queryAssets(e,t){return this.httpClient.request({method:"POST",url:io`asset/query`,data:e,options:t})}queryAssetTree(e,t){return this.httpClient.request({method:"POST",url:io`asset/tree`,data:e,options:t})}getCurrentUserAssets(e){return this.httpClient.request({method:"GET",url:io`asset/user/current`,options:e})}createUserAssetLinks(e,t){return this.httpClient.request({method:"POST",url:io`asset/user/link`,data:e,options:t})}getUserAssetLinks(e,t){return this.httpClient.request({method:"GET",url:io`asset/user/link`,queryParams:e,options:t})}deleteUserAssetLinks(e,t){return this.httpClient.request({method:"POST",url:io`asset/user/link/delete`,data:e,options:t})}deleteAllUserAssetLinks(e,t,n){return this.httpClient.request({method:"DELETE",url:io`asset/user/link/${e}/${t}`,options:n})}deleteUserAssetLink(e,t,n,i){return this.httpClient.request({method:"DELETE",url:io`asset/user/link/${e}/${t}/${n}`,options:i})}get(e,t){return this.httpClient.request({method:"GET",url:io`asset/${e}`,options:t})}update(e,t,n){return this.httpClient.request({method:"PUT",url:io`asset/${e}`,data:t,options:n})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName(e,t,n,i){return this.httpClient.request({method:"PUT",url:io`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:io`asset/${e}/attribute/${t}/${n}`,data:i,options:o})}updateParent(e,t,n){return this.httpClient.request({method:"PUT",url:io`asset/${e}/child`,queryParams:t,options:n})}}class nq{constructor(e){this.httpClient=e}createAlarm(e,t,n){return this.httpClient.request({method:"POST",url:io`alarm`,queryParams:t,data:e,options:n})}getAlarms(e,t){return this.httpClient.request({method:"GET",url:io`alarm`,queryParams:e,options:t})}removeAlarms(e,t){return this.httpClient.request({method:"DELETE",url:io`alarm`,data:e,options:t})}setAssetLinks(e,t){return this.httpClient.request({method:"PUT",url:io`alarm/assets`,data:e,options:t})}getAlarm(e,t){return this.httpClient.request({method:"GET",url:io`alarm/${e}`,options:t})}removeAlarm(e,t){return this.httpClient.request({method:"DELETE",url:io`alarm/${e}`,options:t})}updateAlarm(e,t,n){return this.httpClient.request({method:"PUT",url:io`alarm/${e}`,data:t,options:n})}getAssetLinks(e,t,n){return this.httpClient.request({method:"GET",url:io`alarm/${e}/assets`,queryParams:t,options:n})}}class nX{constructor(e){this.httpClient=e}deleteConnections(e,t){return this.httpClient.request({method:"DELETE",url:io`gateway/connection`,queryParams:e,options:t})}getConnections(e){return this.httpClient.request({method:"GET",url:io`gateway/connection`,options:e})}deleteConnection(e,t){return this.httpClient.request({method:"DELETE",url:io`gateway/connection/${e}`,options:t})}getConnection(e,t){return this.httpClient.request({method:"GET",url:io`gateway/connection/${e}`,options:t})}setConnection(e,t,n){return this.httpClient.request({method:"PUT",url:io`gateway/connection/${e}`,data:t,options:n})}getConnectionStatus(e,t){return this.httpClient.request({method:"GET",url:io`gateway/status/${e}`,options:t})}}class nK{constructor(e){this.httpClient=e}register(e,t){return this.httpClient.request({method:"POST",url:io`console/register`,data:e,options:t})}}class nJ{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:io`dashboard`,data:e,options:t})}update(e,t){return this.httpClient.request({method:"PUT",url:io`dashboard`,data:e,options:t})}getAllRealmDashboards(e,t){return this.httpClient.request({method:"GET",url:io`dashboard/all/${e}`,options:t})}query(e,t){return this.httpClient.request({method:"POST",url:io`dashboard/query`,data:e,options:t})}delete(e,t,n){return this.httpClient.request({method:"DELETE",url:io`dashboard/${e}/${t}`,options:n})}get(e,t,n){return this.httpClient.request({method:"GET",url:io`dashboard/${e}/${t}`,options:n})}}class nQ{constructor(e){this.httpClient=e}getManagerConfig(e){return this.httpClient.request({method:"GET",url:io`configuration/manager`,options:e})}update(e,t){return this.httpClient.request({method:"PUT",url:io`configuration/manager`,data:e,options:t})}fileUpload(e,t,n){return this.httpClient.request({method:"POST",url:io`configuration/manager/file`,queryParams:t,data:e,options:n})}getManagerConfigImage(e,t){return this.httpClient.request({method:"GET",url:io`configuration/manager/image/${e}`,options:t})}}class nZ{constructor(e){this.httpClient=e}doProtocolAssetDiscovery(e,t,n){return this.httpClient.request({method:"GET",url:io`agent/assetDiscovery/${e}`,queryParams:t,options:n})}doProtocolAssetImport(e,t,n,i){return this.httpClient.request({method:"POST",url:io`agent/assetImport/${e}`,queryParams:n,data:t,options:i})}doProtocolInstanceDiscovery(e,t,n){return this.httpClient.request({method:"GET",url:io`agent/instanceDiscovery/${e}`,queryParams:t,options:n})}}class n0{constructor(e){this.httpClient=e}startTunnel(e,t){return this.httpClient.request({method:"POST",url:io`gateway/tunnel`,data:e,options:t})}stopTunnel(e,t){return this.httpClient.request({method:"DELETE",url:io`gateway/tunnel`,data:e,options:t})}getAllActiveTunnelInfos(e,t){return this.httpClient.request({method:"GET",url:io`gateway/tunnel/${e}`,options:t})}getGatewayActiveTunnelInfos(e,t,n){return this.httpClient.request({method:"GET",url:io`gateway/tunnel/${e}/${t}`,options:n})}getActiveTunnelInfo(e,t,n,i,o){return this.httpClient.request({method:"GET",url:io`gateway/tunnel/${e}/${t}/${n}/${i}`,options:o})}}class n1{constructor(e){this.httpClient=e}getDatapointExport(e,t){return this.httpClient.request({method:"GET",url:io`asset/datapoint/export`,queryParams:e,options:t})}getDatapointPeriod(e,t){return this.httpClient.request({method:"GET",url:io`asset/datapoint/periods`,queryParams:e,options:t})}getDatapoints(e,t,n,i){return this.httpClient.request({method:"POST",url:io`asset/datapoint/${e}/${t}`,data:n,options:i})}}class n2{constructor(e){this.httpClient=e}updateCurrentUserLocale(e,t){return this.httpClient.request({method:"PUT",url:io`user/locale`,data:e,options:t})}query(e,t){return this.httpClient.request({method:"POST",url:io`user/query`,data:e,options:t})}requestPasswordResetCurrent(e){return this.httpClient.request({method:"PUT",url:io`user/request-password-reset`,options:e})}updatePasswordCurrent(e,t){return this.httpClient.request({method:"PUT",url:io`user/reset-password`,data:e,options:t})}updateCurrent(e,t){return this.httpClient.request({method:"PUT",url:io`user/update`,data:e,options:t})}getCurrent(e){return this.httpClient.request({method:"GET",url:io`user/user`,options:e})}getCurrentUserRealmRoles(e){return this.httpClient.request({method:"GET",url:io`user/userRealmRoles`,options:e})}getCurrentUserClientRoles(e,t){return this.httpClient.request({method:"GET",url:io`user/userRoles/${e}`,options:t})}disconnectUserSession(e,t,n){return this.httpClient.request({method:"GET",url:io`user/${e}/disconnect/${t}`,options:n})}requestPasswordReset(e,t,n){return this.httpClient.request({method:"PUT",url:io`user/${e}/request-password-reset/${t}`,options:n})}updatePassword(e,t,n,i){return this.httpClient.request({method:"PUT",url:io`user/${e}/reset-password/${t}`,data:n,options:i})}resetSecret(e,t,n){return this.httpClient.request({method:"GET",url:io`user/${e}/reset-secret/${t}`,options:n})}updateRoles(e,t,n){return this.httpClient.request({method:"PUT",url:io`user/${e}/roles`,data:t,options:n})}getUserRealmRoles(e,t,n){return this.httpClient.request({method:"GET",url:io`user/${e}/userRealmRoles/${t}`,options:n})}updateUserRealmRoles(e,t,n,i){return this.httpClient.request({method:"PUT",url:io`user/${e}/userRealmRoles/${t}`,data:n,options:i})}getUserClientRoles(e,t,n,i){return this.httpClient.request({method:"GET",url:io`user/${e}/userRoles/${t}/${n}`,options:i})}updateUserClientRoles(e,t,n,i,o){return this.httpClient.request({method:"PUT",url:io`user/${e}/userRoles/${t}/${n}`,data:i,options:o})}getUserSessions(e,t,n){return this.httpClient.request({method:"GET",url:io`user/${e}/userSessions/${t}`,options:n})}create(e,t,n){return this.httpClient.request({method:"POST",url:io`user/${e}/users`,data:t,options:n})}update(e,t,n){return this.httpClient.request({method:"PUT",url:io`user/${e}/users`,data:t,options:n})}delete(e,t,n){return this.httpClient.request({method:"DELETE",url:io`user/${e}/users/${t}`,options:n})}getClientRoles(e,t,n){return this.httpClient.request({method:"GET",url:io`user/${e}/${t}/roles`,options:n})}updateClientRoles(e,t,n,i){return this.httpClient.request({method:"PUT",url:io`user/${e}/${t}/roles`,data:n,options:i})}get(e,t,n){return this.httpClient.request({method:"GET",url:io`user/${e}/${t}`,options:n})}}class n5{constructor(e){this.httpClient=e}getNotifications(e,t){return this.httpClient.request({method:"GET",url:io`notification`,queryParams:e,options:t})}removeNotifications(e,t){return this.httpClient.request({method:"DELETE",url:io`notification`,queryParams:e,options:t})}sendNotification(e,t){return this.httpClient.request({method:"POST",url:io`notification/alert`,data:e,options:t})}removeNotification(e,t){return this.httpClient.request({method:"DELETE",url:io`notification/${e}`,options:t})}notificationAcknowledged(e,t,n,i){return this.httpClient.request({method:"PUT",url:io`notification/${e}/acknowledged`,queryParams:n,data:t,options:i})}notificationDelivered(e,t,n){return this.httpClient.request({method:"PUT",url:io`notification/${e}/delivered`,queryParams:t,options:n})}}class n3{constructor(e){this.httpClient=e}getHealthStatus(e){return this.httpClient.request({method:"GET",url:io`health`,options:e})}getInfo(e){return this.httpClient.request({method:"GET",url:io`info`,options:e})}}class n4{constructor(e){this.httpClient=e}getApps(e){return this.httpClient.request({method:"GET",url:io`apps`,options:e})}getConsoleConfig(e){return this.httpClient.request({method:"GET",url:io`apps/consoleConfig`,options:e})}getAppInfos(e){return this.httpClient.request({method:"GET",url:io`apps/info`,options:e})}}class n6{constructor(e){this.httpClient=e}getServices(e,t){return this.httpClient.request({method:"GET",url:io`service`,queryParams:e,options:t})}registerService(e,t){return this.httpClient.request({method:"POST",url:io`service`,data:e,options:t})}getGlobalServices(e){return this.httpClient.request({method:"GET",url:io`service/global`,options:e})}registerGlobalService(e,t){return this.httpClient.request({method:"POST",url:io`service/global`,data:e,options:t})}deregisterService(e,t,n){return this.httpClient.request({method:"DELETE",url:io`service/${e}/${t}`,options:n})}getService(e,t,n){return this.httpClient.request({method:"GET",url:io`service/${e}/${t}`,options:n})}heartbeat(e,t,n){return this.httpClient.request({method:"PUT",url:io`service/${e}/${t}`,options:n})}}class n8{constructor(e){this.httpClient=e}getConfig(e){return this.httpClient.request({method:"GET",url:io`syslog/config`,options:e})}updateConfig(e,t){return this.httpClient.request({method:"PUT",url:io`syslog/config`,data:e,options:t})}clearEvents(e){return this.httpClient.request({method:"DELETE",url:io`syslog/event`,options:e})}getEvents(e,t){return this.httpClient.request({method:"GET",url:io`syslog/event`,queryParams:e,options:t})}}class n7{constructor(e){this.httpClient=e}createGlobalRuleset(e,t){return this.httpClient.request({method:"POST",url:io`rules`,data:e,options:t})}getGlobalRulesets(e,t){return this.httpClient.request({method:"GET",url:io`rules`,queryParams:e,options:t})}createAssetRuleset(e,t){return this.httpClient.request({method:"POST",url:io`rules/asset`,data:e,options:t})}getAssetRulesets(e,t,n){return this.httpClient.request({method:"GET",url:io`rules/asset/for/${e}`,queryParams:t,options:n})}deleteAssetRuleset(e,t){return this.httpClient.request({method:"DELETE",url:io`rules/asset/${e}`,options:t})}getAssetRuleset(e,t){return this.httpClient.request({method:"GET",url:io`rules/asset/${e}`,options:t})}updateAssetRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:io`rules/asset/${e}`,data:t,options:n})}getAssetGeofences(e,t){return this.httpClient.request({method:"GET",url:io`rules/geofences/${e}`,options:t})}getAssetEngineInfo(e,t){return this.httpClient.request({method:"GET",url:io`rules/info/asset/${e}`,options:t})}getGlobalEngineInfo(e){return this.httpClient.request({method:"GET",url:io`rules/info/global`,options:e})}getRealmEngineInfo(e,t){return this.httpClient.request({method:"GET",url:io`rules/info/realm/${e}`,options:t})}createRealmRuleset(e,t){return this.httpClient.request({method:"POST",url:io`rules/realm`,data:e,options:t})}getRealmRulesets(e,t,n){return this.httpClient.request({method:"GET",url:io`rules/realm/for/${e}`,queryParams:t,options:n})}deleteRealmRuleset(e,t){return this.httpClient.request({method:"DELETE",url:io`rules/realm/${e}`,options:t})}getRealmRuleset(e,t){return this.httpClient.request({method:"GET",url:io`rules/realm/${e}`,options:t})}updateRealmRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:io`rules/realm/${e}`,data:t,options:n})}deleteGlobalRuleset(e,t){return this.httpClient.request({method:"DELETE",url:io`rules/${e}`,options:t})}getGlobalRuleset(e,t){return this.httpClient.request({method:"GET",url:io`rules/${e}`,options:t})}updateGlobalRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:io`rules/${e}`,data:t,options:n})}}class n9{constructor(e){this.httpClient=e}createProvisioningConfig(e,t){return this.httpClient.request({method:"POST",url:io`provisioning`,data:e,options:t})}getProvisioningConfigs(e){return this.httpClient.request({method:"GET",url:io`provisioning`,options:e})}deleteProvisioningConfig(e,t){return this.httpClient.request({method:"DELETE",url:io`provisioning/${e}`,options:t})}updateProvisioningConfig(e,t,n){return this.httpClient.request({method:"PUT",url:io`provisioning/${e}`,data:t,options:n})}}class ie{constructor(e){this.httpClient=e}getAssetDescriptors(e,t){return this.httpClient.request({method:"GET",url:io`model/assetDescriptors`,queryParams:e,options:t})}getAssetInfo(e,t,n){return this.httpClient.request({method:"GET",url:io`model/assetInfo/${e}`,queryParams:t,options:n})}getAssetInfos(e,t){return this.httpClient.request({method:"GET",url:io`model/assetInfos`,queryParams:e,options:t})}getValueDescriptorSchema(e,t){return this.httpClient.request({method:"GET",url:io`model/getValueDescriptorSchema`,queryParams:e,options:t})}getMetaItemDescriptors(e,t){return this.httpClient.request({method:"GET",url:io`model/metaItemDescriptors`,queryParams:e,options:t})}getValueDescriptors(e,t){return this.httpClient.request({method:"GET",url:io`model/valueDescriptors`,queryParams:e,options:t})}}class it{constructor(e){this.httpClient=e}getSettings(e){return this.httpClient.request({method:"GET",url:io`map`,options:e})}saveSettings(e,t){return this.httpClient.request({method:"PUT",url:io`map`,data:e,options:t})}deleteMap(e){return this.httpClient.request({method:"DELETE",url:io`map/deleteMap`,options:e})}getCustomMapInfo(e){return this.httpClient.request({method:"GET",url:io`map/getCustomMapInfo`,options:e})}getSettingsJs(e){return this.httpClient.request({method:"GET",url:io`map/js`,options:e})}getTile(e,t,n,i){return this.httpClient.request({method:"GET",url:io`map/tile/${e}/${t}/${n}`,options:i})}uploadMap(e,t){return this.httpClient.request({method:"POST",url:io`map/upload`,queryParams:e,options:t})}}class ii{constructor(e){this.httpClient=e}getAllNodeDefinitions(e){return this.httpClient.request({method:"GET",url:io`flow`,options:e})}getNodeDefinition(e,t){return this.httpClient.request({method:"GET",url:io`flow/${e}`,options:t})}getAllNodeDefinitionsByType(e,t){return this.httpClient.request({method:"GET",url:io`flow/${e}`,options:t})}}function io(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 ir{constructor(e,t=nW().create()){this._assetPredictedDatapointResource=new ic(e,t),this._realmResource=new id(e,t),this._assetResource=new is(e,t),this._alarmResource=new il(e,t),this._gatewayClientResource=new im(e,t),this._consoleResource=new iu(e,t),this._dashboardResource=new ip(e,t),this._configurationResource=new ib(e,t),this._agentResource=new ih(e,t),this._gatewayServiceResource=new i_(e,t),this._assetDatapointResource=new ig(e,t),this._userResource=new iy(e,t),this._notificationResource=new iv(e,t),this._statusResource=new iF(e,t),this._appResource=new ik(e,t),this._externalServiceResource=new ix(e,t),this._syslogResource=new iw(e,t),this._rulesResource=new iE(e,t),this._provisioningResource=new iA(e,t),this._assetModelResource=new iT(e,t),this._mapResource=new iL(e,t),this._flowResource=new iM(e,t),this._assetResource=new is(e,t)}get AssetPredictedDatapointResource(){return this._assetPredictedDatapointResource}get RealmResource(){return this._realmResource}get AssetResource(){return this._assetResource}get AlarmResource(){return this._alarmResource}get GatewayClientResource(){return this._gatewayClientResource}get ConsoleResource(){return this._consoleResource}get DashboardResource(){return this._dashboardResource}get ConfigurationResource(){return this._configurationResource}get AgentResource(){return this._agentResource}get GatewayServiceResource(){return this._gatewayServiceResource}get AssetDatapointResource(){return this._assetDatapointResource}get UserResource(){return this._userResource}get NotificationResource(){return this._notificationResource}get StatusResource(){return this._statusResource}get AppResource(){return this._appResource}get ExternalServiceResource(){return this._externalServiceResource}get SyslogResource(){return this._syslogResource}get RulesResource(){return this._rulesResource}get ProvisioningResource(){return this._provisioningResource}get AssetModelResource(){return this._assetModelResource}get MapResource(){return this._mapResource}get FlowResource(){return this._flowResource}}class ia{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 ic extends n${constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class id extends nV{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class is extends nG{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class il extends nq{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class im extends nX{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class iu extends nK{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class ip extends nJ{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class ib extends nQ{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class ih extends nZ{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class i_ extends n0{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class ig extends n1{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class iy extends n2{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class iv extends n5{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class iF extends n3{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class ik extends n4{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class ix extends n6{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class iw extends n8{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class iE extends n7{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class iA extends n9{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class iT extends ie{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class iL extends it{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}class iM extends ii{constructor(e,t=nW().create()){t.defaults.baseURL=e,super(new ia(t))}}nW().isAxiosError;let iC=new class{get api(){return this._client}constructor(){this._axiosInstance=nW().create(),this._axiosInstance.defaults.headers.common["Content-Type"]="application/json",this._axiosInstance.interceptors.request.use(e=>(e.paramsSerializer=e=>nY().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 ir(e,this._axiosInstance)}};var iD=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function c(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,c)}d((i=i.apply(e,t||[])).next())})};!function(e){e.DISCONNECTED="DISCONNECTED",e.CONNECTED="CONNECTED",e.CONNECTING="CONNECTING"}(tI||(tI={}));let iS="SUBSCRIBED:",iI="UNAUTHORIZED:",iO="TRIGGERED:",iY="EVENT:";class iR{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=iB.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=tI.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===tI.CONNECTED)?Promise.resolve(!0):(this._disconnectRequested=!1,this._connectingDeferred||(this._onStatusChanged(tI.CONNECTING),this._connectingDeferred=new nN,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=iB.MIN_RECONNECT_DELAY,this._onStatusChanged(tI.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!==tI.DISCONNECTED&&this._doDisconnect())}subscribe(e,t){let n={eventSubscription:e,callback:t,deferred:new nN};return null!=this._pendingSubscription||this._status!==tI.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 iD(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===tI.CONNECTED&&this._doSend(e)}sendEventWithReply(e){return this._status!==tI.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(e)}subscribeAssetEvents(e,t,n){return iD(this,void 0,void 0,function*(){let i=e&&"string"!=typeof e[0]?e.map(e=>e.id):e,o="AssetEvent"+iR._subscriptionCounter++;if(!this._assetEventPromise){let e;ob.authenticated||(e={filterType:"asset",realm:ob.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===ob.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 iD(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"+iR._subscriptionCounter++;if(!this._attributeEventPromise){let e;ob.authenticated||(e={filterType:"asset",realm:ob.displayRealm});let t={eventType:"attribute",filter:e};this._attributeEventPromise=this.subscribe(t,e=>{this._attributeEventCallbackMap.forEach(t=>t(e))})}let c=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===ob.displayRealm&&n(t)};return this._attributeEventCallbackMap.set(a,c),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))&&c({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===tI.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===tI.CONNECTED&&this._onStatusChanged(tI.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(tI.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<iB.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(iB.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}iR.MIN_RECONNECT_DELAY=0,iR.MAX_RECONNECT_DELAY=3e4,iR._subscriptionCounter=0;class iB extends iR{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="+ob.config.realm;return ob.authenticated&&(e+="&Authorization="+ob.getAuthorizationHeader()),this._webSocket=new WebSocket(e),this._connectDeferred=new nN,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(iS)){let e=JSON.parse(t.substring(iS.length)),n=this._subscribeDeferred;this._subscribeDeferred=null,n&&n.resolve(e.subscriptionId)}else if(t.startsWith(iI)){let e=JSON.parse(t.substring(iI.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(iO)){let e=JSON.parse(t.substring(iO.length));e.events&&e.events.forEach(t=>{this._onMessageReceived(e.subscriptionId,t)})}else if(t.startsWith(iY)){let e=JSON.parse(t.substring(iY.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 nN,e.subscriptionId||(e.subscriptionId=iB._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=iY+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 nN;return this._repliesDeferred.set(e.messageID,t),this._webSocket.send(iY+JSON.stringify(e)),t.promise}}function iN(e){return(iN="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)}iB._subscriptionCounter=1;var iP=[],iH=iP.forEach,ij=iP.slice;function iz(e){return iH.call(ij.call(arguments,1),function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e}function iU(){return"function"==typeof XMLHttpRequest||("undefined"==typeof XMLHttpRequest?"undefined":iN(XMLHttpRequest))==="object"}var iW=n(6850),i$=n.t(iW,2);function iV(e){return(iV="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&&(tO="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),iU()&&("undefined"!=typeof global&&global.XMLHttpRequest?tY=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(tY=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?tR=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(tR=window.ActiveXObject)),tO||!i$||tY||tR||(tO=iW||i$),"function"!=typeof tO&&(tO=void 0);var iG=function(e,t){if(t&&"object"===iV(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},iq=function(e,t,n){tO(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)},iX=!1,iK=function(e,t,n,i){e.queryStringParams&&(t=iG(t,e.queryStringParams));var o=iz({},"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=iz({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o},iX?{}:r);try{iq(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]}),iq(t,a,i),iX=!0}catch(e){i(e)}}},iJ=function(e,t,n,i){n&&"object"===iV(n)&&(n=iG("",n).slice(1)),e.queryStringParams&&(t=iG(t,e.queryStringParams));try{(o=tY?new tY:new tR("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 iQ=function(e,t,n,i){return("function"==typeof n&&(i=n,n=void 0),i=i||function(){},tO)?iK(e,t,n,i):iU()||"function"==typeof ActiveXObject?iJ(e,t,n,i):void i(Error("No fetch and no xhr implementation found!"))};var iZ=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=iz(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:iQ,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,c=this,d=this.options.loadPath;"function"==typeof this.options.loadPath&&(d=this.options.loadPath(e,n)),(d=(a=r=d)&&"function"==typeof a.then?r:Promise.resolve(r)).then(function(r){if(!r)return o(null,{});var a=c.services.interpolator.interpolate(r,{lng:e.join("+"),ns:n.join("+")});c.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 c,d;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{c="string"==typeof a.data?o.options.parse(a.data,n,i):a.data}catch(t){d="failed parsing "+e+" to json"}if(d)return t(d,!1);t(null,c)})}},{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),c=0,d=[],s=[];e.forEach(function(n){var i=r.options.addPath;"function"==typeof r.options.addPath&&(i=r.options.addPath(n,t));var l=r.services.interpolator.interpolate(i,{lng:n,ns:t});r.options.request(r.options,l,a,function(t,n){c+=1,d.push(t),s.push(n),c===e.length&&o&&o(d,s)})})}}},{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=[],c=function(e){i.toResolveHierarchy(e).forEach(function(e){0>a.indexOf(e)&&a.push(e)})};c(r),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return c(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}();iZ.type="backend";let i0={ATTRIBUTE:1,CHILD:2},i1=e=>(...t)=>({_$litDirective$:e,values:t});class i2{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 i5 extends i2{constructor(e){if(super(e),this.it=G,e.type!==i0.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===G||null==e)return this._t=void 0,this.it=e;if(e===V)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:[]}}}i5.directiveName="unsafeHTML",i5.resultType=1,i1(i5);class i3 extends i5{}i3.directiveName="unsafeSVG",i3.resultType=2;let i4=i1(i3),i6={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 i8=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 c=e.length-1;c>=0;c--)(o=e[c])&&(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 i7=n(7319);class i9 extends CustomEvent{constructor(){super(i9.NAME,{bubbles:!0,composed:!0})}}i9.NAME="or-iconset-added";let oe=new class{constructor(){this._icons={}}addIconSet(e,t){this._icons[e]=t,this._defaultIconSet||(this._defaultIconSet=t),t.onAdd&&t.onAdd(),window.dispatchEvent(new i9)}getIconSet(e){return this._icons[e]}getIconTemplate(e){if(!e)return $``;let t=(e||"").split(":"),n=t.pop(),i=t.pop(),o=this._defaultIconSet;return(i&&(o=this.getIconSet(i)),n&&o)?o.getIconTemplate(n):$``}},ot=class extends es{constructor(){super(...arguments),this._handler=e=>{this._updateIcon()}}static get styles(){return[d`
|
|
225
225
|
:host {
|
|
226
226
|
--internal-or-icon-width: var(--or-icon-width, 24px);
|
|
227
227
|
--internal-or-icon-height: var(--or-icon-height, 24px);
|
|
@@ -269,7 +269,7 @@
|
|
|
269
269
|
viewBox="0 0 ${t} ${t}" preserveAspectRatio="xMidYMid meet" focusable="false">
|
|
270
270
|
${i4(i.startsWith("<")?i:'<path xmlns="http://www.w3.org/2000/svg" d="'+i+'" />')}
|
|
271
271
|
</svg>
|
|
272
|
-
`:$``},onAdd:void 0})))}getConsoleAppConfig(){return om(this,void 0,void 0,function*(){var e;try{let t=yield fetch((null!=(e=op.managerUrl)?e:"")+"/consoleappconfig/"+op.displayRealm+".json");return this._consoleAppConfig=yield t.json(),!0}catch(e){return!0}})}getConsolePreferredLanguage(){return om(this,arguments,void 0,function*(e=this.console){return e.retrieveData("LANGUAGE")})}getUserPreferredLanguage(){return om(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 om(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 om(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 om(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 iC.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 iC.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 om(this,void 0,void 0,function*(){var e,t,n,i;try{this._keycloak=new or({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(tB.AUTH_FAILED),console.error("Failed to initialise Keycloak: "+e),!1}})}_createTokenUpdateInterval(){this._keycloakUpdateTokenInterval||(this._keycloakUpdateTokenInterval=window.setInterval(()=>om(this,void 0,void 0,function*(){yield this._updateKeycloakAccessToken().catch(()=>{console.debug("Keycloak failed to refresh the access token"),this._onDisconnect()})}),1e4))}_updateKeycloakAccessToken(){return om(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 om(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(tN.ERROR),console.warn("Error set: "+e)}_clearWebHistory(){var e;null==(e=this.console)||e._doSendGenericMessage("CLEAR_WEB_HISTORY",void 0)}_onDisconnect(){return om(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(tN.OFFLINE),this.reconnect())})}_onReconnected(){console.debug("Reconnected"),this._disconnected=!1,this._createTokenUpdateInterval(),this._emitEvent(tN.ONLINE)}reconnect(){return om(this,arguments,void 0,function*(e=3e3){if(!this._disconnected)return;this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=void 0);let t=()=>om(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===tI.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(of.MAX_RECONNECT_DELAY,e+3e3))),this._reconnectTimer=window.setTimeout(()=>this.reconnect(e),e);return}this._onReconnected()}})}isKeycloakReachable(){return om(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)}})}}of.MAX_RECONNECT_DELAY=45e3;let op=new of,ob=op,{I:oh}={M:T,P:L,A:M,C:1,L:J,R:ee,D:Y,V:Z,I:et,H:en,N:eo,U:er,B:ei,F:ea},o_=(e,t)=>{let n=e._$AN;if(void 0===n)return!1;for(let e of n)e._$AO?.(t,!1),o_(e,t);return!0},og=e=>{let t,n;do{if(void 0===(t=e._$AM))break;(n=t._$AN).delete(e),e=t}while(0===n?.size)},oy=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),ok(t)}};function ov(e){void 0!==this._$AN?(og(this),this._$AM=e,oy(this)):this._$AM=e}function oF(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++)o_(i[e],!1),og(i[e]);else null!=i&&(o_(i,!1),og(i));else o_(this,e)}let ok=e=>{e.type==i0.CHILD&&(e._$AP??=oF,e._$AQ??=ov)};class ox extends i2{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),oy(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(o_(this,e),og(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 ow=new WeakMap,oE=i1(class extends ox{render(e){return G}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)),G}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){let t=this.ht??globalThis,n=ow.get(t);void 0===n&&(n=new WeakMap,ow.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?ow.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),oA=i1(class extends i2{constructor(e){if(super(e),e.type!==i0.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 V}});function oT(e,t,n){return e?t(e):n?.(e)}class oL{constructor(e){this.G=e}disconnect(){this.G=void 0}reconnect(e){this.G=e}deref(){return this.G}}class oM{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 oC=e=>!(e=>null===e||"object"!=typeof e&&"function"!=typeof e)(e)&&"function"==typeof e.then,oD=i1(class extends ox{constructor(){super(...arguments),this._$Cwt=0x3fffffff,this._$Cbt=[],this._$CK=new oL(this),this._$CX=new oM}render(...e){return e.find(e=>!oC(e))??V}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(!oC(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 V}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}});var oS=function(e,t){return(oS=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 oI(e,t){function n(){this.constructor=e}oS(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var oO=function(){return(oO=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 oY(){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 oR=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}(),oB=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,oY(n)),this.foundation=void 0===t?this.getDefaultFoundation():t,this.foundation.init(),this.initialSyncWithDOM()}return e.attachTo=function(t){return new e(t,new oR({}))},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 oN(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 oP(e,t){if(e.closest)return e.closest(t);for(var n=e;n;){if(oH(n,t))return n;n=n.parentElement}return null}function oH(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}var oj={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},oz=function(e){function t(n){var i=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return i.shakeAnimationEndHandler_=function(){return i.handleShakeAnimationEnd_()},i}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return oj},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}(oR),oU=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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 oz({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}(oB),oW={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},o$=function(e){function t(n){var i=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return i.transitionEndHandler_=function(e){return i.handleTransitionEnd(e)},i}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return oW},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(oW.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(oW.LINE_RIPPLE_ACTIVE)},t.prototype.setRippleCenter=function(e){this.adapter.setStyle("transform-origin",e+"px center")},t.prototype.deactivate=function(){this.adapter.addClass(oW.LINE_RIPPLE_DEACTIVATING)},t.prototype.handleTransitionEnd=function(e){var t=this.adapter.hasClass(oW.LINE_RIPPLE_DEACTIVATING);"opacity"===e.propertyName&&t&&(this.adapter.removeClass(oW.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(oW.LINE_RIPPLE_DEACTIVATING))},t}(oR),oV=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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 o$({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}(oB),oG={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},oq={NOTCH_ELEMENT_PADDING:8},oX={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},oK=function(e){function t(n){return e.call(this,oO(oO({},t.defaultAdapter),n))||this}return oI(t,e),Object.defineProperty(t,"strings",{get:function(){return oG},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return oX},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return oq},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+=oq.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}(oR),oJ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){this.notchElement_=this.root.querySelector(oG.NOTCH_ELEMENT_SELECTOR);var e=this.root.querySelector("."+oz.cssClasses.ROOT);e?(e.style.transitionDuration="0s",this.root.classList.add(oX.OUTLINE_UPGRADED),requestAnimationFrame(function(){e.style.transitionDuration=""})):this.root.classList.add(oX.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 oK({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}(oB),oQ={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"},oZ={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"},o0={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},o1=["touchstart","pointerdown","mousedown","keydown"],o2=["touchend","pointerup","mouseup","contextmenu"],o5=[],o3=function(e){function t(n){var i=e.call(this,oO(oO({},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 oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return oQ},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return oZ},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return o0},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&&(o1.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_):o2.forEach(function(e){t.adapter.registerDocumentInteractionHandler(e,t.deactivateHandler_)})},t.prototype.deregisterRootHandlers_=function(){var e=this;o1.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_),o2.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&&o5.length>0&&o5.some(function(e){return t.adapter.containsEventTarget(e)}))return void this.resetActivationState_();void 0!==e&&(o5.push(e.target),this.registerDeactivationHandlers_(e)),n.wasElementMadeActive=this.checkElementMadeActive_(e),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame(function(){o5=[],!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,c=r.FG_ACTIVATION,d=t.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var s="",l="";if(!this.adapter.isUnbounded()){var m=this.getFgTranslationCoordinates_(),u=m.startPoint,f=m.endPoint;s=u.x+"px, "+u.y+"px",l=f.x+"px, "+f.y+"px"}this.adapter.updateCssVariable(i,s),this.adapter.updateCssVariable(o,l),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter.removeClass(a),this.adapter.computeBoundingRect(),this.adapter.addClass(c),this.activationTimer_=setTimeout(function(){return e.activationTimerCallback_()},d)},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,c=r+n.left,d=a+n.top;return"touchstart"===e.type?(i=e.changedTouches[0].pageX-c,o=e.changedTouches[0].pageY-d):(i=e.pageX-c,o=e.pageY-d),{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)},o0.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=oO({},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}(oR),o4=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.disabled=!1,t}return oI(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=tP;if("boolean"==typeof tP&&!t)return tP;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||(tP=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,oN())},deregisterInteractionHandler:function(t,n){return e.root.removeEventListener(t,n,oN())},deregisterResizeHandler:function(e){return window.removeEventListener("resize",e)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return oH(e.root,":active")},isSurfaceDisabled:function(){return!!e.disabled},isUnbounded:function(){return!!e.unbounded},registerDocumentInteractionHandler:function(e,t){return document.documentElement.addEventListener(e,t,oN())},registerInteractionHandler:function(t,n){return e.root.addEventListener(t,n,oN())},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 o3(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}(oB),o6={ROOT:"mdc-text-field-character-counter"},o8={ROOT_SELECTOR:"."+o6.ROOT},o7=function(e){function t(n){return e.call(this,oO(oO({},t.defaultAdapter),n))||this}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return o6},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return o8},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}(oR),o9=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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 o7({setContent:function(t){e.root.textContent=t}})},t}(oB),re={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"},rt={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"},rn={LABEL_SCALE:.75},ri=["pattern","min","max","required","step","minlength","maxlength"],ro=["color","date","datetime-local","month","range","time","week"],rr=["mousedown","touchstart"],ra=["click","keydown"],rc=function(e){function t(n,i){void 0===i&&(i={});var o=e.call(this,oO(oO({},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 oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return rt},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return re},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return rn},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shouldAlwaysFloat_",{get:function(){var e=this.getNativeInput_().type;return ro.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_),rr.forEach(function(t){e.adapter.registerInputInteractionHandler(t,e.setPointerXOffset_)}),ra.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_),rr.forEach(function(t){e.adapter.deregisterInputInteractionHandler(t,e.setPointerXOffset_)}),ra.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 ri.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()*rn.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(re.ARIA_DESCRIBEDBY,o):this.adapter.removeInputAttr(re.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}(oR),rd={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"},rs={ARIA_HIDDEN:"aria-hidden",ROLE:"role",ROOT_SELECTOR:"."+rd.ROOT},rl=function(e){function t(n){return e.call(this,oO(oO({},t.defaultAdapter),n))||this}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return rd},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return rs},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(rs.ARIA_HIDDEN)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.isPersistent=function(){return this.adapter.hasClass(rd.HELPER_TEXT_PERSISTENT)},t.prototype.setPersistent=function(e){e?this.adapter.addClass(rd.HELPER_TEXT_PERSISTENT):this.adapter.removeClass(rd.HELPER_TEXT_PERSISTENT)},t.prototype.isValidation=function(){return this.adapter.hasClass(rd.HELPER_TEXT_VALIDATION_MSG)},t.prototype.setValidation=function(e){e?this.adapter.addClass(rd.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(rd.HELPER_TEXT_VALIDATION_MSG)},t.prototype.showToScreenReader=function(){this.adapter.removeAttr(rs.ARIA_HIDDEN)},t.prototype.setValidity=function(e){var t=this.adapter.hasClass(rd.HELPER_TEXT_PERSISTENT),n=this.adapter.hasClass(rd.HELPER_TEXT_VALIDATION_MSG)&&!e;n?(this.showToScreenReader(),this.adapter.setAttr(rs.ROLE,"alert")):this.adapter.removeAttr(rs.ROLE),t||n||this.hide_()},t.prototype.hide_=function(){this.adapter.setAttr(rs.ARIA_HIDDEN,"true")},t}(oR),rm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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 rl({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}(oB),ru={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"},rf={ROOT:"mdc-text-field__icon"},rp=["click","keydown"],rb=function(e){function t(n){var i=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return i.savedTabIndex_=null,i.interactionHandler_=function(e){return i.handleInteraction(e)},i}return oI(t,e),Object.defineProperty(t,"strings",{get:function(){return ru},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return rf},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"),rp.forEach(function(t){e.adapter.registerInteractionHandler(t,e.interactionHandler_)})},t.prototype.destroy=function(){var e=this;rp.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",ru.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}(oR),rh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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 rb({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(rb.strings.ICON_EVENT,{},!0)}})},t}(oB),r_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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 o4(e,t)}),void 0===t&&(t=function(e){return new oV(e)}),void 0===n&&(n=function(e){return new rm(e)}),void 0===i&&(i=function(e){return new o9(e)}),void 0===o&&(o=function(e){return new rh(e)}),void 0===r&&(r=function(e){return new oU(e)}),void 0===a&&(a=function(e){return new oJ(e)}),this.input_=this.root.querySelector(re.INPUT_SELECTOR);var c=this.root.querySelector(re.LABEL_SELECTOR);this.label_=c?r(c):null;var d=this.root.querySelector(re.LINE_RIPPLE_SELECTOR);this.lineRipple_=d?t(d):null;var s=this.root.querySelector(re.OUTLINE_SELECTOR);this.outline_=s?a(s):null;var l=rl.strings,m=this.root.nextElementSibling,u=m&&m.classList.contains(rt.HELPER_LINE),f=u&&m&&m.querySelector(l.ROOT_SELECTOR);this.helperText_=f?n(f):null;var p=o7.strings,b=this.root.querySelector(p.ROOT_SELECTOR);!b&&u&&m&&(b=m.querySelector(p.ROOT_SELECTOR)),this.characterCounter_=b?i(b):null;var h=this.root.querySelector(re.LEADING_ICON_SELECTOR);this.leadingIcon_=h?o(h):null;var _=this.root.querySelector(re.TRAILING_ICON_SELECTOR);this.trailingIcon_=_?o(_):null,this.prefix_=this.root.querySelector(re.PREFIX_SELECTOR),this.suffix_=this.root.querySelector(re.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 rc(oO(oO(oO(oO(oO({},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,oN())},deregisterInputInteractionHandler:function(t,n){e.input_.removeEventListener(t,n,oN())}}},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(rt.TEXTAREA),i=this.root.classList.contains(rt.OUTLINED);if(n||i)return null;var o=oO(oO({},o4.createAdapter(this)),{isSurfaceActive:function(){return oH(t.input_,":active")},registerInteractionHandler:function(e,n){return t.input_.addEventListener(e,n,oN())},deregisterInteractionHandler:function(e,n){return t.input_.removeEventListener(e,n,oN())}});return e(this.root,new o3(o))},t}(oB),rg={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}},ry={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 rv(e){return!!e.document&&"function"==typeof e.document.createElement}function rF(e,t){if(rv(e)&&t in rg){var n=e.document.createElement("div"),i=rg[t],o=i.standard,r=i.prefixed;return o in n.style?o:r}return t}function rk(e,t){if(rv(e)&&t in ry){var n=e.document.createElement("div"),i=ry[t],o=i.standard,r=i.prefixed;return i.cssProperty in n.style?o:r}return t}var rx={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"},rw={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"},rE={ANIM_END_LATCH_MS:250},rA=function(e){function t(n){var i=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return i.currentCheckState_=rw.TRANSITION_STATE_INIT,i.currentAnimationClass_="",i.animEndLatchTimer_=0,i.enableAnimationEndHandler_=!1,i}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return rx},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return rw},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return rE},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(rx.UPGRADED)},t.prototype.destroy=function(){clearTimeout(this.animEndLatchTimer_)},t.prototype.setDisabled=function(e){this.adapter.setNativeControlDisabled(e),e?this.adapter.addClass(rx.DISABLED):this.adapter.removeClass(rx.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},rE.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=rw.TRANSITION_STATE_UNCHECKED,i=rx.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=rw.TRANSITION_STATE_INDETERMINATE,t=rw.TRANSITION_STATE_CHECKED,n=rw.TRANSITION_STATE_UNCHECKED;return this.adapter.isIndeterminate()?e:this.adapter.isChecked()?t:n},t.prototype.getTransitionAnimationClass_=function(e,n){var i=rw.TRANSITION_STATE_INIT,o=rw.TRANSITION_STATE_CHECKED,r=rw.TRANSITION_STATE_UNCHECKED,a=t.cssClasses,c=a.ANIM_UNCHECKED_CHECKED,d=a.ANIM_UNCHECKED_INDETERMINATE,s=a.ANIM_CHECKED_UNCHECKED,l=a.ANIM_CHECKED_INDETERMINATE,m=a.ANIM_INDETERMINATE_CHECKED,u=a.ANIM_INDETERMINATE_UNCHECKED;switch(e){case i:if(n===r)return"";return n===o?m:u;case r:return n===o?c:d;case o:return n===r?s:l;default:return n===o?m:u}},t.prototype.updateAriaChecked_=function(){this.adapter.isIndeterminate()?this.adapter.setNativeControlAttr(rw.ARIA_CHECKED_ATTR,rw.ARIA_CHECKED_INDETERMINATE_VALUE):this.adapter.removeNativeControlAttr(rw.ARIA_CHECKED_ATTR)},t}(oR),rT=["checked","indeterminate"],rL=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ripple_=t.createRipple_(),t}return oI(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=rw.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(rk(window,"animationend"),this.handleAnimationEnd_),this.installPropertyChangeHooks_()},t.prototype.destroy=function(){this.ripple_.destroy(),this.nativeControl_.removeEventListener("change",this.handleChange_),this.unlisten(rk(window,"animationend"),this.handleAnimationEnd_),this.uninstallPropertyChangeHooks_(),e.prototype.destroy.call(this)},t.prototype.getDefaultFoundation=function(){var e=this;return new rA({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=oO(oO({},o4.createAdapter(this)),{deregisterInteractionHandler:function(t,n){return e.nativeControl_.removeEventListener(t,n,oN())},isSurfaceActive:function(){return oH(e.nativeControl_,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(t,n){return e.nativeControl_.addEventListener(t,n,oN())}});return new o4(this.root,new o3(t))},t.prototype.installPropertyChangeHooks_=function(){var e=this,t=this.nativeControl_,n=Object.getPrototypeOf(t);rT.forEach(function(i){var o=Object.getOwnPropertyDescriptor(n,i);if(rM(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);rT.forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);rM(i)&&Object.defineProperty(e,n,i)})},Object.defineProperty(t.prototype,"nativeControl_",{get:function(){var e=rw.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}(oB);function rM(e){return!!e&&"function"==typeof e.set}var rC={CHECKED:"mdc-switch--checked",DISABLED:"mdc-switch--disabled"},rD={ARIA_CHECKED_ATTR:"aria-checked",NATIVE_CONTROL_SELECTOR:".mdc-switch__native-control",RIPPLE_SURFACE_SELECTOR:".mdc-switch__thumb-underlay"},rS=function(e){function t(n){return e.call(this,oO(oO({},t.defaultAdapter),n))||this}return oI(t,e),Object.defineProperty(t,"strings",{get:function(){return rD},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return rC},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(rC.DISABLED):this.adapter.removeClass(rC.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(rC.CHECKED):this.adapter.removeClass(rC.CHECKED)},t.prototype.updateAriaChecked_=function(e){this.adapter.setNativeControlAttr(rD.ARIA_CHECKED_ATTR,""+!!e)},t}(oR),rI=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ripple_=t.createRipple_(),t}return oI(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,oY(n))},this.nativeControl_.addEventListener("change",this.changeHandler_),this.checked=this.checked},t.prototype.getDefaultFoundation=function(){var e=this;return new rS({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=rS.strings.RIPPLE_SURFACE_SELECTOR,n=this.root.querySelector(t),i=oO(oO({},o4.createAdapter(this)),{addClass:function(e){return n.classList.add(e)},computeBoundingRect:function(){return n.getBoundingClientRect()},deregisterInteractionHandler:function(t,n){e.nativeControl_.removeEventListener(t,n,oN())},isSurfaceActive:function(){return oH(e.nativeControl_,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(t,n){e.nativeControl_.addEventListener(t,n,oN())},removeClass:function(e){n.classList.remove(e)},updateCssVariable:function(e,t){n.style.setProperty(e,t)}});return new o4(this.root,new o3(i))},Object.defineProperty(t.prototype,"nativeControl_",{get:function(){var e=rS.strings.NATIVE_CONTROL_SELECTOR;return this.root.querySelector(e)},enumerable:!0,configurable:!0}),t}(oB),rO={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"},rY={STEP_SIZE:1,THUMB_UPDATE_MIN_PX:5},rR={ARIA_VALUETEXT:"aria-valuetext",INPUT_DISABLED:"disabled",INPUT_MIN:"min",INPUT_MAX:"max",INPUT_VALUE:"value",INPUT_STEP:"step"},rB={CHANGE:"MDCSlider:change",INPUT:"MDCSlider:input"};!function(e){e[e.ACTIVE=0]="ACTIVE",e[e.INACTIVE=1]="INACTIVE"}(tH||(tH={})),function(e){e[e.START=1]="START",e[e.END=2]="END"}(tj||(tj={}));var rN="undefined"!=typeof window,rP=function(e){function t(n){var i=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return i.initialStylesRemoved=!1,i.isDisabled=!1,i.isDiscrete=!1,i.step=rY.STEP_SIZE,i.hasTickMarks=!1,i.isRange=!1,i.thumb=null,i.downEventClientX=null,i.startThumbKnobWidth=0,i.endThumbKnobWidth=0,i}return oI(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(rO.DISABLED),this.isDiscrete=this.adapter.hasClass(rO.DISCRETE),this.hasTickMarks=this.adapter.hasClass(rO.TICK_MARKS),this.isRange=this.adapter.hasClass(rO.RANGE);var t=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(rR.INPUT_MIN,this.isRange?tj.START:tj.END),rR.INPUT_MIN),n=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(rR.INPUT_MAX,tj.END),rR.INPUT_MAX),i=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(rR.INPUT_VALUE,tj.END),rR.INPUT_VALUE),o=this.isRange?this.convertAttributeValueToNumber(this.adapter.getInputAttribute(rR.INPUT_VALUE,tj.START),rR.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(rR.INPUT_STEP,tj.END);if(r&&(this.step=this.convertAttributeValueToNumber(r,rR.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(tj.START)},this.inputEndChangeListener=function(){e.handleInputChange(tj.END)},this.inputStartFocusListener=function(){e.handleInputFocus(tj.START)},this.inputEndFocusListener=function(){e.handleInputFocus(tj.END)},this.inputStartBlurListener=function(){e.handleInputBlur(tj.START)},this.inputEndBlurListener=function(){e.handleInputBlur(tj.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,tj.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,tj.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(rO.DISABLED),this.isRange&&this.adapter.setInputAttribute(rR.INPUT_DISABLED,"",tj.START),this.adapter.setInputAttribute(rR.INPUT_DISABLED,"",tj.END)):(this.adapter.removeClass(rO.DISABLED),this.isRange&&this.adapter.removeInputAttribute(rR.INPUT_DISABLED,tj.START),this.adapter.removeInputAttribute(rR.INPUT_DISABLED,tj.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(tj.START),this.endThumbKnobWidth=this.adapter.getThumbKnobWidth(tj.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===tj.START?this.valueStartBeforeDownEvent:this.valueBeforeDownEvent,t=this.thumb===tj.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(rO.THUMB_WITH_INDICATOR,tj.START),this.adapter.addThumbClass(rO.THUMB_WITH_INDICATOR,tj.END))},t.prototype.handleThumbMouseleave=function(){this.isDiscrete&&this.isRange&&(this.adapter.isInputFocused(tj.START)||this.adapter.isInputFocused(tj.END)||(this.adapter.removeThumbClass(rO.THUMB_WITH_INDICATOR,tj.START),this.adapter.removeThumbClass(rO.THUMB_WITH_INDICATOR,tj.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===tj.START?this.setValueStart(t):this.setValue(t)},t.prototype.handleInputFocus=function(e){if(this.isDiscrete&&(this.adapter.addThumbClass(rO.THUMB_WITH_INDICATOR,e),this.isRange)){var t=e===tj.START?tj.END:tj.START;this.adapter.addThumbClass(rO.THUMB_WITH_INDICATOR,t)}},t.prototype.handleInputBlur=function(e){if(this.isDiscrete&&(this.adapter.removeThumbClass(rO.THUMB_WITH_INDICATOR,e),this.isRange)){var t=e===tj.START?tj.END:tj.START;this.adapter.removeThumbClass(rO.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 tj.END;var n=this.adapter.getThumbBoundingClientRect(tj.START),i=this.adapter.getThumbBoundingClientRect(tj.END),o=e>=n.left&&e<=n.right,r=e>=i.left&&e<=i.right;return o&&r?null:o?tj.START:r?tj.END:t<this.valueStart?tj.START:t>this.value?tj.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)<rY.THUMB_UPDATE_MIN_PX?this.thumb:e<this.downEventClientX?this.adapter.isRTL()?tj.END:tj.START:this.adapter.isRTL()?tj.START:tj.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===tj.START?this.valueStart:this.value,n=String(t);this.adapter.setInputAttribute(rR.INPUT_VALUE,n,e),this.isRange&&e===tj.START?this.adapter.setInputAttribute(rR.INPUT_MIN,n,tj.END):this.isRange&&e===tj.END&&this.adapter.setInputAttribute(rR.INPUT_MAX,n,tj.START),this.adapter.getInputValue(e)!==n&&this.adapter.setInputValue(n,e);var i=this.adapter.getValueToAriaValueTextFn();i&&this.adapter.setInputAttribute(rR.ARIA_VALUETEXT,i(t),e)}},t.prototype.updateValueIndicatorUI=function(e){if(this.isDiscrete){var t=this.isRange&&e===tj.START?this.valueStart:this.value;this.adapter.setValueIndicatorText(t,e===tj.START?tj.START:tj.END),!e&&this.isRange&&this.adapter.setValueIndicatorText(this.valueStart,tj.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(tH.INACTIVE),o=Array.from({length:t}).fill(tH.ACTIVE),r=Array.from({length:n}).fill(tH.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===tj.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===tj.START?this.valueStart:this.value,t),r&&this.adapter.emitChangeEvent(t===tj.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===tj.START&&e>this.value)?this.value:this.isRange&&t===tj.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(),c=rN?rF(window,"transform"):"transform";if(this.isRange){var d=this.adapter.isRTL()?(n-this.value)/(n-i)*this.rect.width:(this.valueStart-i)/(n-i)*this.rect.width,s=d+r;requestAnimationFrame(function(){!a&&e===tj.START||a&&e!==tj.START?(t.adapter.setTrackActiveStyleProperty("transform-origin","right"),t.adapter.setTrackActiveStyleProperty("left","unset"),t.adapter.setTrackActiveStyleProperty("right",t.rect.width-s+"px")):(t.adapter.setTrackActiveStyleProperty("transform-origin","left"),t.adapter.setTrackActiveStyleProperty("right","unset"),t.adapter.setTrackActiveStyleProperty("left",d+"px")),t.adapter.setTrackActiveStyleProperty(c,"scaleX("+o+")");var n=a?s:d,i=t.adapter.isRTL()?d:s;e!==tj.START&&e&&t.initialStylesRemoved||t.adapter.setThumbStyleProperty(c,"translateX("+n+"px)",tj.START),e!==tj.END&&e&&t.initialStylesRemoved||t.adapter.setThumbStyleProperty(c,"translateX("+i+"px)",tj.END),t.removeInitialStyles(a),t.updateOverlappingThumbsUI(n,i,e)})}else requestAnimationFrame(function(){var e=a?t.rect.width-r:r;t.adapter.setThumbStyleProperty(c,"translateX("+e+"px)",tj.END),t.adapter.setTrackActiveStyleProperty(c,"scaleX("+o+")"),t.removeInitialStyles(a)})},t.prototype.removeInitialStyles=function(e){if(!this.initialStylesRemoved){var t=e?"right":"left";this.adapter.removeThumbStyleProperty(t,tj.END),this.isRange&&this.adapter.removeThumbStyleProperty(t,tj.START),this.initialStylesRemoved=!0,this.resetTrackAndThumbAnimation()}},t.prototype.resetTrackAndThumbAnimation=function(){var e=this;if(this.isDiscrete){var t=rN?rF(window,"transition"):"transition",n="all 0s ease 0s";this.adapter.setThumbStyleProperty(t,n,tj.END),this.isRange&&this.adapter.setThumbStyleProperty(t,n,tj.START),this.adapter.setTrackActiveStyleProperty(t,n),requestAnimationFrame(function(){e.adapter.removeThumbStyleProperty(t,tj.END),e.adapter.removeTrackActiveStyleProperty(t),e.isRange&&e.adapter.removeThumbStyleProperty(t,tj.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(rO.THUMB_TOP,n||tj.END),this.adapter.removeThumbClass(rO.THUMB_TOP,n===tj.START?tj.END:tj.START)):(this.adapter.removeThumbClass(rO.THUMB_TOP,tj.START),this.adapter.removeThumbClass(rO.THUMB_TOP,tj.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(tj.START,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(tj.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(tj.START,"change",this.inputStartChangeListener),this.adapter.registerInputEventHandler(tj.START,"focus",this.inputStartFocusListener),this.adapter.registerInputEventHandler(tj.START,"blur",this.inputStartBlurListener)),this.adapter.registerThumbEventHandler(tj.END,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(tj.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(tj.END,"change",this.inputEndChangeListener),this.adapter.registerInputEventHandler(tj.END,"focus",this.inputEndFocusListener),this.adapter.registerInputEventHandler(tj.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(tj.START,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(tj.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(tj.START,"change",this.inputStartChangeListener),this.adapter.deregisterInputEventHandler(tj.START,"focus",this.inputStartFocusListener),this.adapter.deregisterInputEventHandler(tj.START,"blur",this.inputStartBlurListener)),this.adapter.deregisterThumbEventHandler(tj.END,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(tj.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(tj.END,"change",this.inputEndChangeListener),this.adapter.deregisterInputEventHandler(tj.END,"focus",this.inputEndFocusListener),this.adapter.deregisterInputEventHandler(tj.END,"blur",this.inputEndBlurListener)},t.prototype.handlePointerup=function(){this.handleUp(),this.adapter.deregisterEventHandler("pointermove",this.moveListener)},t.SUPPORTS_POINTER_EVENTS=rN&&!!window.PointerEvent,t}(oR),rH=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.skipInitialUIUpdate=!1,t.valueToAriaValueTextFn=null,t}return oI(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 rP({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("."+rO.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("."+rO.VALUE_INDICATOR_TEXT).textContent=String(t)},getValueToAriaValueTextFn:function(){return e.valueToAriaValueTextFn},updateTickMarks:function(t){var n=e.root.querySelector("."+rO.TICK_MARKS_CONTAINER);n||((n=document.createElement("div")).classList.add(rO.TICK_MARKS_CONTAINER),e.root.querySelector("."+rO.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(rB.CHANGE,{value:t,thumb:n})},emitInputEvent:function(t,n){e.emit(rB.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("."+rO.INPUT)),this.thumbs=[].slice.call(this.root.querySelectorAll("."+rO.THUMB)),this.trackActive=this.root.querySelector("."+rO.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===tj.END?this.thumbs[this.thumbs.length-1]:this.thumbs[0]},t.prototype.getInput=function(e){return e===tj.END?this.inputs[this.inputs.length-1]:this.inputs[0]},t.prototype.getRipple=function(e){return e===tj.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]===tH.ACTIVE?rO.TICK_MARK_ACTIVE:rO.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]===tH.ACTIVE?(n[i].classList.add(rO.TICK_MARK_ACTIVE),n[i].classList.remove(rO.TICK_MARK_INACTIVE)):(n[i].classList.add(rO.TICK_MARK_INACTIVE),n[i].classList.remove(rO.TICK_MARK_ACTIVE))},t.prototype.createRipples=function(){for(var e=[],t=[].slice.call(this.root.querySelectorAll("."+rO.THUMB)),n=this,i=0;i<t.length;i++)!function(i){var o=t[i],r=n.inputs[i],a=oO(oO({},o4.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 oH(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)}}),c=new o4(o,new o3(a));c.unbounded=!0,e.push(c)}(i);return e},t}(oB),rj={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"},rz={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"])'},rU={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"}(tz||(tz={})),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"}(tU||(tU={}));var rW={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"},r$={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 ."+rW.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+rW.LIST_ITEM_CLASS+" a\n ",FOCUSABLE_CHILD_ELEMENTS:"\n ."+rW.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+rW.LIST_ITEM_CLASS+" a,\n ."+rW.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+rW.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]'},rV={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300},rG={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"},rq=new Set;rq.add(rG.BACKSPACE),rq.add(rG.ENTER),rq.add(rG.SPACEBAR),rq.add(rG.PAGE_UP),rq.add(rG.PAGE_DOWN),rq.add(rG.END),rq.add(rG.HOME),rq.add(rG.ARROW_LEFT),rq.add(rG.ARROW_UP),rq.add(rG.ARROW_RIGHT),rq.add(rG.ARROW_DOWN),rq.add(rG.DELETE),rq.add(rG.ESCAPE);var rX={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},rK=new Map;rK.set(rX.BACKSPACE,rG.BACKSPACE),rK.set(rX.ENTER,rG.ENTER),rK.set(rX.SPACEBAR,rG.SPACEBAR),rK.set(rX.PAGE_UP,rG.PAGE_UP),rK.set(rX.PAGE_DOWN,rG.PAGE_DOWN),rK.set(rX.END,rG.END),rK.set(rX.HOME,rG.HOME),rK.set(rX.ARROW_LEFT,rG.ARROW_LEFT),rK.set(rX.ARROW_UP,rG.ARROW_UP),rK.set(rX.ARROW_RIGHT,rG.ARROW_RIGHT),rK.set(rX.ARROW_DOWN,rG.ARROW_DOWN),rK.set(rX.DELETE,rG.DELETE),rK.set(rX.ESCAPE,rG.ESCAPE);var rJ=new Set;function rQ(e){var t=e.key;if(rq.has(t))return t;var n=rK.get(e.keyCode);return n||rG.UNKNOWN}rJ.add(rG.PAGE_UP),rJ.add(rG.PAGE_DOWN),rJ.add(rG.END),rJ.add(rG.HOME),rJ.add(rG.ARROW_LEFT),rJ.add(rG.ARROW_UP),rJ.add(rG.ARROW_RIGHT),rJ.add(rG.ARROW_DOWN);var rZ=["input","button","textarea","select"],r0=function(e){var t=e.target;if(t){var n=(""+t.tagName).toLowerCase();-1===rZ.indexOf(n)&&e.preventDefault()}};function r1(e,t){var n,i=e.nextChar,o=e.focusItemAtIndex,r=e.sortedIndexByFirstChar,a=e.focusedItemIndex,c=e.skipFocus,d=e.isItemAtIndexDisabled;return clearTimeout(t.bufferClearTimeout),t.bufferClearTimeout=setTimeout(function(){r5(t)},rV.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 c=a[i.sortedIndexCursor].index;if(!n(c))return c}i.currentFirstChar=r;var d=-1;for(o=0;o<a.length;o++)if(!n(a[o].index)){d=o;break}for(;o<a.length;o++)if(a[o].index>t&&!n(a[o].index)){d=o;break}return -1!==d?(i.sortedIndexCursor=d,a[i.sortedIndexCursor].index):-1}(r,a,d,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,c=-1;a!==n.sortedIndexCursor;){var d=o[a],s=0===d.text.lastIndexOf(n.typeaheadBuffer,0),l=!t(d.index);if(s&&l){c=a;break}a=(a+1)%o.length}return -1!==c?(n.sortedIndexCursor=c,o[n.sortedIndexCursor].index):-1}(r,d,t))||c||o(n),n}function r2(e){return e.typeaheadBuffer.length>0}function r5(e){e.typeaheadBuffer=""}function r3(e,t){var n=e.event,i=e.isTargetListItem,o=e.focusedItemIndex,r=e.focusItemAtIndex,a=e.sortedIndexByFirstChar,c=e.isItemAtIndexDisabled,d="ArrowLeft"===rQ(n),s="ArrowUp"===rQ(n),l="ArrowRight"===rQ(n),m="ArrowDown"===rQ(n),u="Home"===rQ(n),f="End"===rQ(n),p="Enter"===rQ(n),b="Spacebar"===rQ(n);if(d||s||l||m||u||f||p)return -1;if(!b&&1===n.key.length){r0(n);var h={focusItemAtIndex:r,focusedItemIndex:o,nextChar:n.key.toLowerCase(),sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:c};return r1(h,t)}if(!b)return -1;if(i&&r0(n),i&&r2(t)){var h={focusItemAtIndex:r,focusedItemIndex:o,nextChar:" ",sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:c};return r1(h,t)}return -1}var r4=function(e){function t(n){var i=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return i.wrapFocus_=!1,i.isVertical_=!0,i.isSingleSelectionList_=!1,i.selectedIndex_=rV.UNSET_INDEX,i.focusedItemIndex=rV.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 oI(t,e),Object.defineProperty(t,"strings",{get:function(){return r$},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return rW},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return rV},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,rW.LIST_ITEM_SELECTED_CLASS),n=this.adapter.listItemAtIndexHasClass(e,rW.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&&r2(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"===rQ(e),r="ArrowUp"===rQ(e),a="ArrowRight"===rQ(e),c="ArrowDown"===rQ(e),d="Home"===rQ(e),s="End"===rQ(e),l="Enter"===rQ(e),m="Spacebar"===rQ(e),u="A"===e.key||"a"===e.key;if(this.adapter.isRootFocused()){if(r||s?(e.preventDefault(),this.focusLastElement()):(c||d)&&(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,rW.LIST_ITEM_DISABLED_CLASS)}};r3(f,this.typeaheadState)}return}var p=this.adapter.getFocusedElementIndex();if(-1!==p||!((p=n)<0)){if(this.isVertical_&&c||!this.isVertical_&&a)r0(e),this.focusNextElement(p);else if(this.isVertical_&&r||!this.isVertical_&&o)r0(e),this.focusPrevElement(p);else if(d)r0(e),this.focusFirstElement();else if(s)r0(e),this.focusLastElement();else if(u&&e.ctrlKey&&this.isCheckboxList_)e.preventDefault(),this.toggleAll(this.selectedIndex_===rV.UNSET_INDEX?[]:this.selectedIndex_);else if((l||m)&&t){var b=e.target;if(b&&"A"===b.tagName&&l||(r0(e),this.adapter.listItemAtIndexHasClass(p,rW.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,rW.LIST_ITEM_DISABLED_CLASS)}};r3(f,this.typeaheadState)}}},t.prototype.handleClick=function(e,t){e!==rV.UNSET_INDEX&&(this.adapter.listItemAtIndexHasClass(e,rW.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,rW.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(e,r$.ARIA_DISABLED,"false")):(this.adapter.addClassForElementIndex(e,rW.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(e,r$.ARIA_DISABLED,"true")))},t.prototype.setSingleSelectionAtIndex_=function(e){if(this.selectedIndex_!==e){var t=rW.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass_&&(t=rW.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex_!==rV.UNSET_INDEX&&this.adapter.removeClassForElementIndex(this.selectedIndex_,t),this.setAriaForSingleSelectionAtIndex_(e),this.setTabindexAtIndex(e),e!==rV.UNSET_INDEX&&this.adapter.addClassForElementIndex(e,t),this.selectedIndex_=e}},t.prototype.setAriaForSingleSelectionAtIndex_=function(e){this.selectedIndex_===rV.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter.getAttributeForElementIndex(e,r$.ARIA_CURRENT));var t=null!==this.ariaCurrentAttrValue_,n=t?r$.ARIA_CURRENT:r$.ARIA_SELECTED;if(this.selectedIndex_!==rV.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex_,n,"false"),e!==rV.UNSET_INDEX){var i=t?this.ariaCurrentAttrValue_:"true";this.adapter.setAttributeForElementIndex(e,n,i)}},t.prototype.getSelectionAttribute=function(){return this.useSelectedAttr_?r$.ARIA_SELECTED:r$.ARIA_CHECKED},t.prototype.setRadioAtIndex_=function(e){var t=this.getSelectionAttribute();this.adapter.setCheckedCheckboxOrRadioAtIndex(e,!0),this.selectedIndex_!==rV.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===rV.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!==rV.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_!==rV.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===rV.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_===rV.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,rW.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),r1({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,rW.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(){r5(this.typeaheadState)},t}(oR),r6=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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("."+rW.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(r$.ARIA_ORIENTATION);this.vertical=e!==r$.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(r$.FOCUSABLE_CHILD_ELEMENTS)).forEach(function(e){return e.setAttribute("tabindex","-1")}),this.foundation.layout()},t.prototype.getPrimaryText=function(e){var t=e.querySelector("."+rW.LIST_ITEM_PRIMARY_TEXT_CLASS);if(t)return t.textContent||"";var n=e.querySelector("."+rW.LIST_ITEM_TEXT_CLASS);return n&&n.textContent||""},t.prototype.initializeListType=function(){var e=this,t=this.root.querySelectorAll(r$.ARIA_ROLE_CHECKBOX_SELECTOR),n=this.root.querySelector(r$.ARIA_CHECKED_RADIO_SELECTOR);if(t.length){var i=this.root.querySelectorAll(r$.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 r4({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(r$.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(t){return!!e.listElements[t].querySelector(r$.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(t){return e.listElements[t].querySelector(r$.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(r$.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(r$.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(r$.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX)).forEach(function(e){return e.setAttribute("tabindex",n)})}})},t.prototype.getListItemIndex_=function(e){var t=oP(e.target,"."+rW.LIST_ITEM_CLASS+", ."+rW.ROOT);return t&&oH(t,"."+rW.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(rW.LIST_ITEM_CLASS),t)},t.prototype.handleClickEvent_=function(e){var t=this.getListItemIndex_(e),n=!oH(e.target,r$.CHECKBOX_RADIO_SELECTOR);this.foundation.handleClick(t,n)},t}(oB),r8=function(e){function t(n){var i=e.call(this,oO(oO({},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=tU.TOP_START,i.originCorner=tU.TOP_START,i.anchorMargin={top:0,right:0,bottom:0,left:0},i.position={x:0,y:0},i}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return rj},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return rz},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return rU},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Corner",{get:function(){return tU},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^tz.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()},rU.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()},rU.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,tz.BOTTOM)?"bottom":"top",r=this.hasBit(n,tz.RIGHT)?"right":"left",a=this.getHorizontalOriginOffset(n),c=this.getVerticalOriginOffset(n),d=this.measurements,s=d.anchorSize,l=d.surfaceSize,m=((e={})[r]=a,e[o]=c,e);s.width/l.width>rU.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(r="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(m),this.adapter.setTransformOrigin(r+" "+o),this.adapter.setPosition(m),this.adapter.setMaxHeight(i?i+"px":""),this.hasBit(n,tz.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,c=a.viewportDistance,d=a.anchorSize,s=a.surfaceSize,l=t.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,tz.BOTTOM)?(e=c.top-l+d.height+this.anchorMargin.bottom,n=c.bottom-l-this.anchorMargin.bottom):(e=c.top-l+this.anchorMargin.top,n=c.bottom-l+d.height-this.anchorMargin.top),!(n-s.height>0)&&e>=n&&(r=this.setBit(r,tz.BOTTOM));var m=this.adapter.isRtl(),u=this.hasBit(this.anchorCorner,tz.FLIP_RTL),f=this.hasBit(this.anchorCorner,tz.RIGHT)||this.hasBit(r,tz.RIGHT),p=!1;(p=m&&u?!f:f)?(i=c.left+d.width+this.anchorMargin.right,o=c.right-this.anchorMargin.right):(i=c.left+this.anchorMargin.left,o=c.right+d.width-this.anchorMargin.left);var b=i-s.width>0,h=o-s.width>0,_=this.hasBit(r,tz.FLIP_RTL)&&this.hasBit(r,tz.RIGHT);return h&&_&&m||!b&&_?r=this.unsetBit(r,tz.RIGHT):(b&&p&&m||b&&!p&&f||!h&&i>=o)&&(r=this.setBit(r,tz.RIGHT)),r},t.prototype.getMenuSurfaceMaxHeight=function(e){var n=this.measurements.viewportDistance,i=0,o=this.hasBit(e,tz.BOTTOM),r=this.hasBit(this.anchorCorner,tz.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,tz.RIGHT),i=this.hasBit(this.anchorCorner,tz.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,tz.BOTTOM),i=this.hasBit(this.anchorCorner,tz.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 c=function(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.")}(a),d=c.next();!d.done;d=c.next()){var s=d.value,l=e[s]||0;l+=r[s],this.isFixedPosition||("top"===s?l+=o.y:"bottom"===s?l-=o.y:"left"===s?l+=o.x:l-=o.x),e[s]=l}}catch(e){t={error:e}}finally{try{d&&!d.done&&(n=c.return)&&n.call(c)}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}(oR),r7=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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(rj.ANCHOR)?t:null,this.root.classList.contains(rj.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(rz.OPENED_EVENT,this.registerBodyClickListener),this.listen(rz.CLOSED_EVENT,this.deregisterBodyClickListener)},t.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown),this.unlisten(rz.OPENED_EVENT,this.registerBodyClickListener),this.unlisten(rz.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(rj.FIXED):this.root.classList.remove(rj.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 r8({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(r8.strings.CLOSED_EVENT,{})},notifyOpen:function(){return e.emit(r8.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===tW||i)&&(tW="transform"in n.document.createElement("div").style?"transform":"webkitTransform"),tW+"-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}(oB),r9={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},ae={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list",SELECTED_EVENT:"MDCMenu:selected"},at={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"}(t$||(t$={}));var an=function(e){function t(n){var i=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return i.closeAnimationEndTimerId_=0,i.defaultFocusState_=t$.LIST_ROOT,i}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return r9},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ae},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return at},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)},r8.numbers.TRANSITION_CLOSE_DURATION))},t.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState_){case t$.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case t$.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case t$.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,ae.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(t,r9.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(e,r9.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(e,ae.ARIA_CHECKED_ATTR,"true")},t.prototype.setEnabled=function(e,t){this.validatedIndex_(e),t?(this.adapter.removeClassFromElementAtIndex(e,rW.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(e,ae.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(e,rW.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(e,ae.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}(oR),ai=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e,t){void 0===e&&(e=function(e){return new r7(e)}),void 0===t&&(t=function(e){return new r6(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(ae.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(r8.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.listen("keydown",this.handleKeydown_),this.listen(r4.strings.ACTION_EVENT,this.handleItemAction_)},t.prototype.destroy=function(){this.list_&&this.list_.destroy(),this.menuSurface_.destroy(),this.menuSurface_.unlisten(r8.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.unlisten("keydown",this.handleKeydown_),this.unlisten(r4.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:rV.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 an({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(ae.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(ae.LIST_SELECTOR).focus()},isSelectableItemAtIndex:function(t){return!!oP(e.items[t],"."+r9.MENU_SELECTION_GROUP)},getSelectedSiblingOfItemAtIndex:function(t){var n=oP(e.items[t],"."+r9.MENU_SELECTION_GROUP).querySelector("."+r9.MENU_SELECTED_LIST_ITEM);return n?e.items.indexOf(n):-1}})},t}(oB),ao={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"},ar={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"},aa={LABEL_SCALE:.75,UNSET_INDEX:-1,CLICK_DEBOUNCE_TIMEOUT_MS:330},ac=function(e){function t(n,i){void 0===i&&(i={});var o=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return o.disabled=!1,o.isMenuOpen=!1,o.useDefaultValidation=!0,o.customValidity=!0,o.lastSelectedIndex=aa.UNSET_INDEX,o.clickDebounceTimeout=0,o.recentlyClicked=!1,o.leadingIcon=i.leadingIcon,o.helperText=i.helperText,o}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return ao},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return aa},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ar},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===aa.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!==aa.UNSET_INDEX?t[e]:""},t.prototype.getDisabled=function(){return this.disabled},t.prototype.setDisabled=function(e){this.disabled=e,this.disabled?(this.adapter.addClass(ao.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass(ao.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(ao.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(ao.FOCUSED),n=e||t,i=this.adapter.hasClass(ao.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(ao.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(ao.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},t.prototype.handleMenuItemAction=function(e){this.setSelectedIndex(e,!0)},t.prototype.handleFocus=function(){this.adapter.addClass(ao.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(ao.FOCUSED)){var t=rQ(e)===rG.ENTER,n=rQ(e)===rG.SPACEBAR,i=rQ(e)===rG.ARROW_UP,o=rQ(e)===rG.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(ao.FOCUSED);if(e){var n=aa.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(ao.INVALID),this.adapter.removeMenuClass(ao.MENU_INVALID)):(this.adapter.addClass(ao.INVALID),this.adapter.addMenuClass(ao.MENU_INVALID)),this.syncHelperTextValidity(e)},t.prototype.isValid=function(){return this.useDefaultValidation&&this.adapter.hasClass(ao.REQUIRED)&&!this.adapter.hasClass(ao.DISABLED)?this.getSelectedIndex()!==aa.UNSET_INDEX&&(0!==this.getSelectedIndex()||!!this.getValue()):this.customValidity},t.prototype.setRequired=function(e){e?this.adapter.addClass(ao.REQUIRED):this.adapter.removeClass(ao.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(tU.BOTTOM_START)),this.adapter.setMenuWrapFocus(!1),this.setDisabled(this.adapter.hasClass(ao.DISABLED)),this.syncHelperTextValidity(!this.adapter.hasClass(ao.INVALID)),this.layout(),this.layoutOptions()},t.prototype.blur=function(){this.adapter.removeClass(ao.FOCUSED),this.layout(),this.adapter.deactivateBottomLine(),this.adapter.hasClass(ao.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(ar.ARIA_DESCRIBEDBY,n):this.adapter.removeSelectAnchorAttr(ar.ARIA_DESCRIBEDBY)}},t.prototype.setClickDebounceTimeout=function(){var e=this;clearTimeout(this.clickDebounceTimeout),this.clickDebounceTimeout=setTimeout(function(){e.recentlyClicked=!1},aa.CLICK_DEBOUNCE_TIMEOUT_MS),this.recentlyClicked=!0},t}(oR),ad={ARIA_HIDDEN:"aria-hidden",ROLE:"role"},as={HELPER_TEXT_VALIDATION_MSG:"mdc-select-helper-text--validation-msg",HELPER_TEXT_VALIDATION_MSG_PERSISTENT:"mdc-select-helper-text--validation-msg-persistent"},al=function(e){function t(n){return e.call(this,oO(oO({},t.defaultAdapter),n))||this}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return as},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ad},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(ad.ARIA_HIDDEN)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.setValidation=function(e){e?this.adapter.addClass(as.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(as.HELPER_TEXT_VALIDATION_MSG)},t.prototype.setValidationMsgPersistent=function(e){e?this.adapter.addClass(as.HELPER_TEXT_VALIDATION_MSG_PERSISTENT):this.adapter.removeClass(as.HELPER_TEXT_VALIDATION_MSG_PERSISTENT)},t.prototype.setValidity=function(e){if(this.adapter.hasClass(as.HELPER_TEXT_VALIDATION_MSG)){var t=this.adapter.hasClass(as.HELPER_TEXT_VALIDATION_MSG_PERSISTENT);if(!e||t){this.showToScreenReader(),e?this.adapter.removeAttr(ad.ROLE):this.adapter.setAttr(ad.ROLE,"alert");return}this.adapter.removeAttr(ad.ROLE),this.hide()}},t.prototype.showToScreenReader=function(){this.adapter.removeAttr(ad.ARIA_HIDDEN)},t.prototype.hide=function(){this.adapter.setAttr(ad.ARIA_HIDDEN,"true")},t}(oR),am=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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 al({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}(oB),au={ICON_EVENT:"MDCSelect:icon",ICON_ROLE:"button"},af=["click","keydown"],ap=function(e){function t(n){var i=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return i.savedTabIndex_=null,i.interactionHandler_=function(e){return i.handleInteraction(e)},i}return oI(t,e),Object.defineProperty(t,"strings",{get:function(){return au},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"),af.forEach(function(t){e.adapter.registerInteractionHandler(t,e.interactionHandler_)})},t.prototype.destroy=function(){var e=this;af.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",au.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}(oR),ab=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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 ap({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(ap.strings.ICON_EVENT,{},!0)}})},t}(oB),ah=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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 oU(e)}),void 0===t&&(t=function(e){return new oV(e)}),void 0===n&&(n=function(e){return new oJ(e)}),void 0===i&&(i=function(e){return new ai(e)}),void 0===o&&(o=function(e){return new ab(e)}),void 0===r&&(r=function(e){return new am(e)}),this.selectAnchor=this.root.querySelector(ar.SELECT_ANCHOR_SELECTOR),this.selectedText=this.root.querySelector(ar.SELECTED_TEXT_SELECTOR),this.hiddenInput=this.root.querySelector(ar.HIDDEN_INPUT_SELECTOR),!this.selectedText)throw Error("MDCSelect: Missing required element: The following selector must be present: '"+ar.SELECTED_TEXT_SELECTOR+"'");if(this.selectAnchor.hasAttribute(ar.ARIA_CONTROLS)){var a=document.getElementById(this.selectAnchor.getAttribute(ar.ARIA_CONTROLS));a&&(this.helperText=r(a))}this.menuSetup(i);var c=this.root.querySelector(ar.LABEL_SELECTOR);this.label=c?e(c):null;var d=this.root.querySelector(ar.LINE_RIPPLE_SELECTOR);this.lineRipple=d?t(d):null;var s=this.root.querySelector(ar.OUTLINE_SELECTOR);this.outline=s?n(s):null;var l=this.root.querySelector(ar.LEADING_ICON_SELECTOR);l&&(this.leadingIcon=o(l)),this.root.classList.contains(ao.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(rz.CLOSED_EVENT,this.handleMenuClosed),this.menu.listen(rz.OPENED_EVENT,this.handleMenuOpened),this.menu.listen(ae.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(rz.CLOSED_EVENT,this.handleMenuClosed),this.menu.unlisten(rz.OPENED_EVENT,this.handleMenuOpened),this.menu.unlisten(ae.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(ar.VALUE_ATTR)||""}),this.hiddenInput&&(this.hiddenInput.value=this.value)},t.prototype.getDefaultFoundation=function(){return new ac(oO(oO(oO(oO({},this.getSelectAdapterMethods()),this.getCommonAdapterMethods()),this.getOutlineAdapterMethods()),this.getLabelAdapterMethods()),this.getFoundationMap())},t.prototype.menuSetup=function(e){this.menuElement=this.root.querySelector(ar.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(ar.VALUE_ATTR)||""})},t.prototype.createRipple=function(){var e=this,t=oO(oO({},o4.createAdapter({root:this.selectAnchor})),{registerInteractionHandler:function(t,n){e.selectAnchor.addEventListener(t,n)},deregisterInteractionHandler:function(t,n){e.selectAnchor.removeEventListener(t,n)}});return new o4(this.selectAnchor,new o3(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(ar.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(ar.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}(oB),a_={ROOT:"mdc-form-field"},ag={LABEL_SELECTOR:".mdc-form-field > label"},ay=function(e){function t(n){var i=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return i.click=function(){i.handleClick()},i}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return a_},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ag},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}(oR),av=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(t,e),t.attachTo=function(e){return new t(e)},t.prototype.labelEl=function(){var e=ay.strings.LABEL_SELECTOR;return this.root.querySelector(e)},t.prototype.getDefaultFoundation=function(){var e=this;return new ay({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}(oB),aF={ICON_BUTTON_ON:"mdc-icon-button--on",ROOT:"mdc-icon-button"},ak={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"},ax=function(e){function t(n){var i=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return i.hasToggledAriaLabel=!1,i}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return aF},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ak},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(ak.DATA_ARIA_LABEL_ON),t=this.adapter.getAttr(ak.DATA_ARIA_LABEL_OFF);if(e&&t){if(null!==this.adapter.getAttr(ak.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(ak.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(aF.ICON_BUTTON_ON)},t.prototype.toggle=function(e){if(void 0===e&&(e=!this.isOn()),e?this.adapter.addClass(aF.ICON_BUTTON_ON):this.adapter.removeClass(aF.ICON_BUTTON_ON),this.hasToggledAriaLabel){var t=e?this.adapter.getAttr(ak.DATA_ARIA_LABEL_ON):this.adapter.getAttr(ak.DATA_ARIA_LABEL_OFF);this.adapter.setAttr(ak.ARIA_LABEL,t||"")}else this.adapter.setAttr(ak.ARIA_PRESSED,""+e)},t}(oR),aw=ax.strings,aE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rippleComponent=t.createRipple(),t}return oI(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 ax({addClass:function(t){return e.root.classList.add(t)},hasClass:function(t){return e.root.classList.contains(t)},notifyChange:function(t){e.emit(aw.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 o4(this.root);return e.unbounded=!0,e},t}(oB);let aA="important",aT=" !"+aA,aL=i1(class extends i2{constructor(e){if(super(e),e.type!==i0.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(aT);e.includes("-")||t?n.setProperty(e,t?i.slice(0,-11):i,t?aA:""):n[e]=i}}return V}});var aM=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 c=e.length-1;c>=0;c--)(o=e[c])&&(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 aC=n(3041),aD=n(1526);class aS extends CustomEvent{constructor(e){super(aS.NAME,{detail:e,bubbles:!0,composed:!0})}}function aI(e,t,n,i,o){switch(i=i||"listbox",e){case tV.RADIO:i="radiogroup";break;case tV.MULTI_CHECKBOX:i="group"}return $`
|
|
272
|
+
`:$``},onAdd:void 0})))}getConsoleAppConfig(){return om(this,void 0,void 0,function*(){var e;try{let t=yield fetch((null!=(e=op.managerUrl)?e:"")+"/consoleappconfig/"+op.displayRealm+".json");return this._consoleAppConfig=yield t.json(),!0}catch(e){return!0}})}getConsolePreferredLanguage(){return om(this,arguments,void 0,function*(e=this.console){return e.retrieveData("LANGUAGE")})}getUserPreferredLanguage(){return om(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 om(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 om(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 om(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 iC.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 iC.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 om(this,void 0,void 0,function*(){var e,t,n,i;try{this._keycloak=new or({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(tB.AUTH_FAILED),console.error("Failed to initialise Keycloak: "+e),!1}})}_createTokenUpdateInterval(){this._keycloakUpdateTokenInterval||(this._keycloakUpdateTokenInterval=window.setInterval(()=>om(this,void 0,void 0,function*(){yield this._updateKeycloakAccessToken().catch(()=>{console.debug("Keycloak failed to refresh the access token"),this._onDisconnect()})}),1e4))}_updateKeycloakAccessToken(){return om(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 om(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(tN.ERROR),console.warn("Error set: "+e)}_clearWebHistory(){var e;this.isMobile()&&(null==(e=this.console)||e._doSendGenericMessage("CLEAR_WEB_HISTORY",void 0))}_onDisconnect(){return om(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(tN.OFFLINE),this.reconnect())})}_onReconnected(){console.debug("Reconnected"),this._disconnected=!1,this._createTokenUpdateInterval(),this._emitEvent(tN.ONLINE)}reconnect(){return om(this,arguments,void 0,function*(e=3e3){if(!this._disconnected)return;this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=void 0);let t=()=>om(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===tI.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(of.MAX_RECONNECT_DELAY,e+3e3))),this._reconnectTimer=window.setTimeout(()=>this.reconnect(e),e);return}this._onReconnected()}})}isKeycloakReachable(){return om(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)}})}}of.MAX_RECONNECT_DELAY=45e3;let op=new of,ob=op,{I:oh}={M:T,P:L,A:M,C:1,L:J,R:ee,D:Y,V:Z,I:et,H:en,N:eo,U:er,B:ei,F:ea},o_=(e,t)=>{let n=e._$AN;if(void 0===n)return!1;for(let e of n)e._$AO?.(t,!1),o_(e,t);return!0},og=e=>{let t,n;do{if(void 0===(t=e._$AM))break;(n=t._$AN).delete(e),e=t}while(0===n?.size)},oy=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),ok(t)}};function ov(e){void 0!==this._$AN?(og(this),this._$AM=e,oy(this)):this._$AM=e}function oF(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++)o_(i[e],!1),og(i[e]);else null!=i&&(o_(i,!1),og(i));else o_(this,e)}let ok=e=>{e.type==i0.CHILD&&(e._$AP??=oF,e._$AQ??=ov)};class ox extends i2{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),oy(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(o_(this,e),og(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 ow=new WeakMap,oE=i1(class extends ox{render(e){return G}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)),G}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){let t=this.ht??globalThis,n=ow.get(t);void 0===n&&(n=new WeakMap,ow.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?ow.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),oA=i1(class extends i2{constructor(e){if(super(e),e.type!==i0.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 V}});function oT(e,t,n){return e?t(e):n?.(e)}class oL{constructor(e){this.G=e}disconnect(){this.G=void 0}reconnect(e){this.G=e}deref(){return this.G}}class oM{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 oC=e=>!(e=>null===e||"object"!=typeof e&&"function"!=typeof e)(e)&&"function"==typeof e.then,oD=i1(class extends ox{constructor(){super(...arguments),this._$Cwt=0x3fffffff,this._$Cbt=[],this._$CK=new oL(this),this._$CX=new oM}render(...e){return e.find(e=>!oC(e))??V}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(!oC(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 V}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}});var oS=function(e,t){return(oS=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 oI(e,t){function n(){this.constructor=e}oS(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var oO=function(){return(oO=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 oY(){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 oR=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}(),oB=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,oY(n)),this.foundation=void 0===t?this.getDefaultFoundation():t,this.foundation.init(),this.initialSyncWithDOM()}return e.attachTo=function(t){return new e(t,new oR({}))},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 oN(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 oP(e,t){if(e.closest)return e.closest(t);for(var n=e;n;){if(oH(n,t))return n;n=n.parentElement}return null}function oH(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}var oj={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},oz=function(e){function t(n){var i=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return i.shakeAnimationEndHandler_=function(){return i.handleShakeAnimationEnd_()},i}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return oj},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}(oR),oU=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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 oz({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}(oB),oW={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},o$=function(e){function t(n){var i=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return i.transitionEndHandler_=function(e){return i.handleTransitionEnd(e)},i}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return oW},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(oW.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(oW.LINE_RIPPLE_ACTIVE)},t.prototype.setRippleCenter=function(e){this.adapter.setStyle("transform-origin",e+"px center")},t.prototype.deactivate=function(){this.adapter.addClass(oW.LINE_RIPPLE_DEACTIVATING)},t.prototype.handleTransitionEnd=function(e){var t=this.adapter.hasClass(oW.LINE_RIPPLE_DEACTIVATING);"opacity"===e.propertyName&&t&&(this.adapter.removeClass(oW.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(oW.LINE_RIPPLE_DEACTIVATING))},t}(oR),oV=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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 o$({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}(oB),oG={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},oq={NOTCH_ELEMENT_PADDING:8},oX={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},oK=function(e){function t(n){return e.call(this,oO(oO({},t.defaultAdapter),n))||this}return oI(t,e),Object.defineProperty(t,"strings",{get:function(){return oG},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return oX},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return oq},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+=oq.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}(oR),oJ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){this.notchElement_=this.root.querySelector(oG.NOTCH_ELEMENT_SELECTOR);var e=this.root.querySelector("."+oz.cssClasses.ROOT);e?(e.style.transitionDuration="0s",this.root.classList.add(oX.OUTLINE_UPGRADED),requestAnimationFrame(function(){e.style.transitionDuration=""})):this.root.classList.add(oX.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 oK({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}(oB),oQ={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"},oZ={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"},o0={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},o1=["touchstart","pointerdown","mousedown","keydown"],o2=["touchend","pointerup","mouseup","contextmenu"],o5=[],o3=function(e){function t(n){var i=e.call(this,oO(oO({},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 oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return oQ},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return oZ},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return o0},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&&(o1.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_):o2.forEach(function(e){t.adapter.registerDocumentInteractionHandler(e,t.deactivateHandler_)})},t.prototype.deregisterRootHandlers_=function(){var e=this;o1.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_),o2.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&&o5.length>0&&o5.some(function(e){return t.adapter.containsEventTarget(e)}))return void this.resetActivationState_();void 0!==e&&(o5.push(e.target),this.registerDeactivationHandlers_(e)),n.wasElementMadeActive=this.checkElementMadeActive_(e),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame(function(){o5=[],!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,c=r.FG_ACTIVATION,d=t.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var s="",l="";if(!this.adapter.isUnbounded()){var m=this.getFgTranslationCoordinates_(),u=m.startPoint,f=m.endPoint;s=u.x+"px, "+u.y+"px",l=f.x+"px, "+f.y+"px"}this.adapter.updateCssVariable(i,s),this.adapter.updateCssVariable(o,l),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter.removeClass(a),this.adapter.computeBoundingRect(),this.adapter.addClass(c),this.activationTimer_=setTimeout(function(){return e.activationTimerCallback_()},d)},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,c=r+n.left,d=a+n.top;return"touchstart"===e.type?(i=e.changedTouches[0].pageX-c,o=e.changedTouches[0].pageY-d):(i=e.pageX-c,o=e.pageY-d),{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)},o0.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=oO({},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}(oR),o4=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.disabled=!1,t}return oI(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=tP;if("boolean"==typeof tP&&!t)return tP;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||(tP=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,oN())},deregisterInteractionHandler:function(t,n){return e.root.removeEventListener(t,n,oN())},deregisterResizeHandler:function(e){return window.removeEventListener("resize",e)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return oH(e.root,":active")},isSurfaceDisabled:function(){return!!e.disabled},isUnbounded:function(){return!!e.unbounded},registerDocumentInteractionHandler:function(e,t){return document.documentElement.addEventListener(e,t,oN())},registerInteractionHandler:function(t,n){return e.root.addEventListener(t,n,oN())},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 o3(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}(oB),o6={ROOT:"mdc-text-field-character-counter"},o8={ROOT_SELECTOR:"."+o6.ROOT},o7=function(e){function t(n){return e.call(this,oO(oO({},t.defaultAdapter),n))||this}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return o6},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return o8},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}(oR),o9=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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 o7({setContent:function(t){e.root.textContent=t}})},t}(oB),re={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"},rt={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"},rn={LABEL_SCALE:.75},ri=["pattern","min","max","required","step","minlength","maxlength"],ro=["color","date","datetime-local","month","range","time","week"],rr=["mousedown","touchstart"],ra=["click","keydown"],rc=function(e){function t(n,i){void 0===i&&(i={});var o=e.call(this,oO(oO({},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 oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return rt},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return re},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return rn},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shouldAlwaysFloat_",{get:function(){var e=this.getNativeInput_().type;return ro.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_),rr.forEach(function(t){e.adapter.registerInputInteractionHandler(t,e.setPointerXOffset_)}),ra.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_),rr.forEach(function(t){e.adapter.deregisterInputInteractionHandler(t,e.setPointerXOffset_)}),ra.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 ri.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()*rn.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(re.ARIA_DESCRIBEDBY,o):this.adapter.removeInputAttr(re.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}(oR),rd={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"},rs={ARIA_HIDDEN:"aria-hidden",ROLE:"role",ROOT_SELECTOR:"."+rd.ROOT},rl=function(e){function t(n){return e.call(this,oO(oO({},t.defaultAdapter),n))||this}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return rd},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return rs},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(rs.ARIA_HIDDEN)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.isPersistent=function(){return this.adapter.hasClass(rd.HELPER_TEXT_PERSISTENT)},t.prototype.setPersistent=function(e){e?this.adapter.addClass(rd.HELPER_TEXT_PERSISTENT):this.adapter.removeClass(rd.HELPER_TEXT_PERSISTENT)},t.prototype.isValidation=function(){return this.adapter.hasClass(rd.HELPER_TEXT_VALIDATION_MSG)},t.prototype.setValidation=function(e){e?this.adapter.addClass(rd.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(rd.HELPER_TEXT_VALIDATION_MSG)},t.prototype.showToScreenReader=function(){this.adapter.removeAttr(rs.ARIA_HIDDEN)},t.prototype.setValidity=function(e){var t=this.adapter.hasClass(rd.HELPER_TEXT_PERSISTENT),n=this.adapter.hasClass(rd.HELPER_TEXT_VALIDATION_MSG)&&!e;n?(this.showToScreenReader(),this.adapter.setAttr(rs.ROLE,"alert")):this.adapter.removeAttr(rs.ROLE),t||n||this.hide_()},t.prototype.hide_=function(){this.adapter.setAttr(rs.ARIA_HIDDEN,"true")},t}(oR),rm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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 rl({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}(oB),ru={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"},rf={ROOT:"mdc-text-field__icon"},rp=["click","keydown"],rb=function(e){function t(n){var i=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return i.savedTabIndex_=null,i.interactionHandler_=function(e){return i.handleInteraction(e)},i}return oI(t,e),Object.defineProperty(t,"strings",{get:function(){return ru},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return rf},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"),rp.forEach(function(t){e.adapter.registerInteractionHandler(t,e.interactionHandler_)})},t.prototype.destroy=function(){var e=this;rp.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",ru.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}(oR),rh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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 rb({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(rb.strings.ICON_EVENT,{},!0)}})},t}(oB),r_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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 o4(e,t)}),void 0===t&&(t=function(e){return new oV(e)}),void 0===n&&(n=function(e){return new rm(e)}),void 0===i&&(i=function(e){return new o9(e)}),void 0===o&&(o=function(e){return new rh(e)}),void 0===r&&(r=function(e){return new oU(e)}),void 0===a&&(a=function(e){return new oJ(e)}),this.input_=this.root.querySelector(re.INPUT_SELECTOR);var c=this.root.querySelector(re.LABEL_SELECTOR);this.label_=c?r(c):null;var d=this.root.querySelector(re.LINE_RIPPLE_SELECTOR);this.lineRipple_=d?t(d):null;var s=this.root.querySelector(re.OUTLINE_SELECTOR);this.outline_=s?a(s):null;var l=rl.strings,m=this.root.nextElementSibling,u=m&&m.classList.contains(rt.HELPER_LINE),f=u&&m&&m.querySelector(l.ROOT_SELECTOR);this.helperText_=f?n(f):null;var p=o7.strings,b=this.root.querySelector(p.ROOT_SELECTOR);!b&&u&&m&&(b=m.querySelector(p.ROOT_SELECTOR)),this.characterCounter_=b?i(b):null;var h=this.root.querySelector(re.LEADING_ICON_SELECTOR);this.leadingIcon_=h?o(h):null;var _=this.root.querySelector(re.TRAILING_ICON_SELECTOR);this.trailingIcon_=_?o(_):null,this.prefix_=this.root.querySelector(re.PREFIX_SELECTOR),this.suffix_=this.root.querySelector(re.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 rc(oO(oO(oO(oO(oO({},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,oN())},deregisterInputInteractionHandler:function(t,n){e.input_.removeEventListener(t,n,oN())}}},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(rt.TEXTAREA),i=this.root.classList.contains(rt.OUTLINED);if(n||i)return null;var o=oO(oO({},o4.createAdapter(this)),{isSurfaceActive:function(){return oH(t.input_,":active")},registerInteractionHandler:function(e,n){return t.input_.addEventListener(e,n,oN())},deregisterInteractionHandler:function(e,n){return t.input_.removeEventListener(e,n,oN())}});return e(this.root,new o3(o))},t}(oB),rg={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}},ry={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 rv(e){return!!e.document&&"function"==typeof e.document.createElement}function rF(e,t){if(rv(e)&&t in rg){var n=e.document.createElement("div"),i=rg[t],o=i.standard,r=i.prefixed;return o in n.style?o:r}return t}function rk(e,t){if(rv(e)&&t in ry){var n=e.document.createElement("div"),i=ry[t],o=i.standard,r=i.prefixed;return i.cssProperty in n.style?o:r}return t}var rx={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"},rw={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"},rE={ANIM_END_LATCH_MS:250},rA=function(e){function t(n){var i=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return i.currentCheckState_=rw.TRANSITION_STATE_INIT,i.currentAnimationClass_="",i.animEndLatchTimer_=0,i.enableAnimationEndHandler_=!1,i}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return rx},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return rw},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return rE},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(rx.UPGRADED)},t.prototype.destroy=function(){clearTimeout(this.animEndLatchTimer_)},t.prototype.setDisabled=function(e){this.adapter.setNativeControlDisabled(e),e?this.adapter.addClass(rx.DISABLED):this.adapter.removeClass(rx.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},rE.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=rw.TRANSITION_STATE_UNCHECKED,i=rx.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=rw.TRANSITION_STATE_INDETERMINATE,t=rw.TRANSITION_STATE_CHECKED,n=rw.TRANSITION_STATE_UNCHECKED;return this.adapter.isIndeterminate()?e:this.adapter.isChecked()?t:n},t.prototype.getTransitionAnimationClass_=function(e,n){var i=rw.TRANSITION_STATE_INIT,o=rw.TRANSITION_STATE_CHECKED,r=rw.TRANSITION_STATE_UNCHECKED,a=t.cssClasses,c=a.ANIM_UNCHECKED_CHECKED,d=a.ANIM_UNCHECKED_INDETERMINATE,s=a.ANIM_CHECKED_UNCHECKED,l=a.ANIM_CHECKED_INDETERMINATE,m=a.ANIM_INDETERMINATE_CHECKED,u=a.ANIM_INDETERMINATE_UNCHECKED;switch(e){case i:if(n===r)return"";return n===o?m:u;case r:return n===o?c:d;case o:return n===r?s:l;default:return n===o?m:u}},t.prototype.updateAriaChecked_=function(){this.adapter.isIndeterminate()?this.adapter.setNativeControlAttr(rw.ARIA_CHECKED_ATTR,rw.ARIA_CHECKED_INDETERMINATE_VALUE):this.adapter.removeNativeControlAttr(rw.ARIA_CHECKED_ATTR)},t}(oR),rT=["checked","indeterminate"],rL=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ripple_=t.createRipple_(),t}return oI(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=rw.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(rk(window,"animationend"),this.handleAnimationEnd_),this.installPropertyChangeHooks_()},t.prototype.destroy=function(){this.ripple_.destroy(),this.nativeControl_.removeEventListener("change",this.handleChange_),this.unlisten(rk(window,"animationend"),this.handleAnimationEnd_),this.uninstallPropertyChangeHooks_(),e.prototype.destroy.call(this)},t.prototype.getDefaultFoundation=function(){var e=this;return new rA({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=oO(oO({},o4.createAdapter(this)),{deregisterInteractionHandler:function(t,n){return e.nativeControl_.removeEventListener(t,n,oN())},isSurfaceActive:function(){return oH(e.nativeControl_,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(t,n){return e.nativeControl_.addEventListener(t,n,oN())}});return new o4(this.root,new o3(t))},t.prototype.installPropertyChangeHooks_=function(){var e=this,t=this.nativeControl_,n=Object.getPrototypeOf(t);rT.forEach(function(i){var o=Object.getOwnPropertyDescriptor(n,i);if(rM(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);rT.forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);rM(i)&&Object.defineProperty(e,n,i)})},Object.defineProperty(t.prototype,"nativeControl_",{get:function(){var e=rw.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}(oB);function rM(e){return!!e&&"function"==typeof e.set}var rC={CHECKED:"mdc-switch--checked",DISABLED:"mdc-switch--disabled"},rD={ARIA_CHECKED_ATTR:"aria-checked",NATIVE_CONTROL_SELECTOR:".mdc-switch__native-control",RIPPLE_SURFACE_SELECTOR:".mdc-switch__thumb-underlay"},rS=function(e){function t(n){return e.call(this,oO(oO({},t.defaultAdapter),n))||this}return oI(t,e),Object.defineProperty(t,"strings",{get:function(){return rD},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return rC},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(rC.DISABLED):this.adapter.removeClass(rC.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(rC.CHECKED):this.adapter.removeClass(rC.CHECKED)},t.prototype.updateAriaChecked_=function(e){this.adapter.setNativeControlAttr(rD.ARIA_CHECKED_ATTR,""+!!e)},t}(oR),rI=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ripple_=t.createRipple_(),t}return oI(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,oY(n))},this.nativeControl_.addEventListener("change",this.changeHandler_),this.checked=this.checked},t.prototype.getDefaultFoundation=function(){var e=this;return new rS({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=rS.strings.RIPPLE_SURFACE_SELECTOR,n=this.root.querySelector(t),i=oO(oO({},o4.createAdapter(this)),{addClass:function(e){return n.classList.add(e)},computeBoundingRect:function(){return n.getBoundingClientRect()},deregisterInteractionHandler:function(t,n){e.nativeControl_.removeEventListener(t,n,oN())},isSurfaceActive:function(){return oH(e.nativeControl_,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(t,n){e.nativeControl_.addEventListener(t,n,oN())},removeClass:function(e){n.classList.remove(e)},updateCssVariable:function(e,t){n.style.setProperty(e,t)}});return new o4(this.root,new o3(i))},Object.defineProperty(t.prototype,"nativeControl_",{get:function(){var e=rS.strings.NATIVE_CONTROL_SELECTOR;return this.root.querySelector(e)},enumerable:!0,configurable:!0}),t}(oB),rO={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"},rY={STEP_SIZE:1,THUMB_UPDATE_MIN_PX:5},rR={ARIA_VALUETEXT:"aria-valuetext",INPUT_DISABLED:"disabled",INPUT_MIN:"min",INPUT_MAX:"max",INPUT_VALUE:"value",INPUT_STEP:"step"},rB={CHANGE:"MDCSlider:change",INPUT:"MDCSlider:input"};!function(e){e[e.ACTIVE=0]="ACTIVE",e[e.INACTIVE=1]="INACTIVE"}(tH||(tH={})),function(e){e[e.START=1]="START",e[e.END=2]="END"}(tj||(tj={}));var rN="undefined"!=typeof window,rP=function(e){function t(n){var i=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return i.initialStylesRemoved=!1,i.isDisabled=!1,i.isDiscrete=!1,i.step=rY.STEP_SIZE,i.hasTickMarks=!1,i.isRange=!1,i.thumb=null,i.downEventClientX=null,i.startThumbKnobWidth=0,i.endThumbKnobWidth=0,i}return oI(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(rO.DISABLED),this.isDiscrete=this.adapter.hasClass(rO.DISCRETE),this.hasTickMarks=this.adapter.hasClass(rO.TICK_MARKS),this.isRange=this.adapter.hasClass(rO.RANGE);var t=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(rR.INPUT_MIN,this.isRange?tj.START:tj.END),rR.INPUT_MIN),n=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(rR.INPUT_MAX,tj.END),rR.INPUT_MAX),i=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(rR.INPUT_VALUE,tj.END),rR.INPUT_VALUE),o=this.isRange?this.convertAttributeValueToNumber(this.adapter.getInputAttribute(rR.INPUT_VALUE,tj.START),rR.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(rR.INPUT_STEP,tj.END);if(r&&(this.step=this.convertAttributeValueToNumber(r,rR.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(tj.START)},this.inputEndChangeListener=function(){e.handleInputChange(tj.END)},this.inputStartFocusListener=function(){e.handleInputFocus(tj.START)},this.inputEndFocusListener=function(){e.handleInputFocus(tj.END)},this.inputStartBlurListener=function(){e.handleInputBlur(tj.START)},this.inputEndBlurListener=function(){e.handleInputBlur(tj.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,tj.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,tj.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(rO.DISABLED),this.isRange&&this.adapter.setInputAttribute(rR.INPUT_DISABLED,"",tj.START),this.adapter.setInputAttribute(rR.INPUT_DISABLED,"",tj.END)):(this.adapter.removeClass(rO.DISABLED),this.isRange&&this.adapter.removeInputAttribute(rR.INPUT_DISABLED,tj.START),this.adapter.removeInputAttribute(rR.INPUT_DISABLED,tj.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(tj.START),this.endThumbKnobWidth=this.adapter.getThumbKnobWidth(tj.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===tj.START?this.valueStartBeforeDownEvent:this.valueBeforeDownEvent,t=this.thumb===tj.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(rO.THUMB_WITH_INDICATOR,tj.START),this.adapter.addThumbClass(rO.THUMB_WITH_INDICATOR,tj.END))},t.prototype.handleThumbMouseleave=function(){this.isDiscrete&&this.isRange&&(this.adapter.isInputFocused(tj.START)||this.adapter.isInputFocused(tj.END)||(this.adapter.removeThumbClass(rO.THUMB_WITH_INDICATOR,tj.START),this.adapter.removeThumbClass(rO.THUMB_WITH_INDICATOR,tj.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===tj.START?this.setValueStart(t):this.setValue(t)},t.prototype.handleInputFocus=function(e){if(this.isDiscrete&&(this.adapter.addThumbClass(rO.THUMB_WITH_INDICATOR,e),this.isRange)){var t=e===tj.START?tj.END:tj.START;this.adapter.addThumbClass(rO.THUMB_WITH_INDICATOR,t)}},t.prototype.handleInputBlur=function(e){if(this.isDiscrete&&(this.adapter.removeThumbClass(rO.THUMB_WITH_INDICATOR,e),this.isRange)){var t=e===tj.START?tj.END:tj.START;this.adapter.removeThumbClass(rO.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 tj.END;var n=this.adapter.getThumbBoundingClientRect(tj.START),i=this.adapter.getThumbBoundingClientRect(tj.END),o=e>=n.left&&e<=n.right,r=e>=i.left&&e<=i.right;return o&&r?null:o?tj.START:r?tj.END:t<this.valueStart?tj.START:t>this.value?tj.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)<rY.THUMB_UPDATE_MIN_PX?this.thumb:e<this.downEventClientX?this.adapter.isRTL()?tj.END:tj.START:this.adapter.isRTL()?tj.START:tj.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===tj.START?this.valueStart:this.value,n=String(t);this.adapter.setInputAttribute(rR.INPUT_VALUE,n,e),this.isRange&&e===tj.START?this.adapter.setInputAttribute(rR.INPUT_MIN,n,tj.END):this.isRange&&e===tj.END&&this.adapter.setInputAttribute(rR.INPUT_MAX,n,tj.START),this.adapter.getInputValue(e)!==n&&this.adapter.setInputValue(n,e);var i=this.adapter.getValueToAriaValueTextFn();i&&this.adapter.setInputAttribute(rR.ARIA_VALUETEXT,i(t),e)}},t.prototype.updateValueIndicatorUI=function(e){if(this.isDiscrete){var t=this.isRange&&e===tj.START?this.valueStart:this.value;this.adapter.setValueIndicatorText(t,e===tj.START?tj.START:tj.END),!e&&this.isRange&&this.adapter.setValueIndicatorText(this.valueStart,tj.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(tH.INACTIVE),o=Array.from({length:t}).fill(tH.ACTIVE),r=Array.from({length:n}).fill(tH.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===tj.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===tj.START?this.valueStart:this.value,t),r&&this.adapter.emitChangeEvent(t===tj.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===tj.START&&e>this.value)?this.value:this.isRange&&t===tj.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(),c=rN?rF(window,"transform"):"transform";if(this.isRange){var d=this.adapter.isRTL()?(n-this.value)/(n-i)*this.rect.width:(this.valueStart-i)/(n-i)*this.rect.width,s=d+r;requestAnimationFrame(function(){!a&&e===tj.START||a&&e!==tj.START?(t.adapter.setTrackActiveStyleProperty("transform-origin","right"),t.adapter.setTrackActiveStyleProperty("left","unset"),t.adapter.setTrackActiveStyleProperty("right",t.rect.width-s+"px")):(t.adapter.setTrackActiveStyleProperty("transform-origin","left"),t.adapter.setTrackActiveStyleProperty("right","unset"),t.adapter.setTrackActiveStyleProperty("left",d+"px")),t.adapter.setTrackActiveStyleProperty(c,"scaleX("+o+")");var n=a?s:d,i=t.adapter.isRTL()?d:s;e!==tj.START&&e&&t.initialStylesRemoved||t.adapter.setThumbStyleProperty(c,"translateX("+n+"px)",tj.START),e!==tj.END&&e&&t.initialStylesRemoved||t.adapter.setThumbStyleProperty(c,"translateX("+i+"px)",tj.END),t.removeInitialStyles(a),t.updateOverlappingThumbsUI(n,i,e)})}else requestAnimationFrame(function(){var e=a?t.rect.width-r:r;t.adapter.setThumbStyleProperty(c,"translateX("+e+"px)",tj.END),t.adapter.setTrackActiveStyleProperty(c,"scaleX("+o+")"),t.removeInitialStyles(a)})},t.prototype.removeInitialStyles=function(e){if(!this.initialStylesRemoved){var t=e?"right":"left";this.adapter.removeThumbStyleProperty(t,tj.END),this.isRange&&this.adapter.removeThumbStyleProperty(t,tj.START),this.initialStylesRemoved=!0,this.resetTrackAndThumbAnimation()}},t.prototype.resetTrackAndThumbAnimation=function(){var e=this;if(this.isDiscrete){var t=rN?rF(window,"transition"):"transition",n="all 0s ease 0s";this.adapter.setThumbStyleProperty(t,n,tj.END),this.isRange&&this.adapter.setThumbStyleProperty(t,n,tj.START),this.adapter.setTrackActiveStyleProperty(t,n),requestAnimationFrame(function(){e.adapter.removeThumbStyleProperty(t,tj.END),e.adapter.removeTrackActiveStyleProperty(t),e.isRange&&e.adapter.removeThumbStyleProperty(t,tj.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(rO.THUMB_TOP,n||tj.END),this.adapter.removeThumbClass(rO.THUMB_TOP,n===tj.START?tj.END:tj.START)):(this.adapter.removeThumbClass(rO.THUMB_TOP,tj.START),this.adapter.removeThumbClass(rO.THUMB_TOP,tj.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(tj.START,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(tj.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(tj.START,"change",this.inputStartChangeListener),this.adapter.registerInputEventHandler(tj.START,"focus",this.inputStartFocusListener),this.adapter.registerInputEventHandler(tj.START,"blur",this.inputStartBlurListener)),this.adapter.registerThumbEventHandler(tj.END,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(tj.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(tj.END,"change",this.inputEndChangeListener),this.adapter.registerInputEventHandler(tj.END,"focus",this.inputEndFocusListener),this.adapter.registerInputEventHandler(tj.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(tj.START,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(tj.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(tj.START,"change",this.inputStartChangeListener),this.adapter.deregisterInputEventHandler(tj.START,"focus",this.inputStartFocusListener),this.adapter.deregisterInputEventHandler(tj.START,"blur",this.inputStartBlurListener)),this.adapter.deregisterThumbEventHandler(tj.END,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(tj.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(tj.END,"change",this.inputEndChangeListener),this.adapter.deregisterInputEventHandler(tj.END,"focus",this.inputEndFocusListener),this.adapter.deregisterInputEventHandler(tj.END,"blur",this.inputEndBlurListener)},t.prototype.handlePointerup=function(){this.handleUp(),this.adapter.deregisterEventHandler("pointermove",this.moveListener)},t.SUPPORTS_POINTER_EVENTS=rN&&!!window.PointerEvent,t}(oR),rH=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.skipInitialUIUpdate=!1,t.valueToAriaValueTextFn=null,t}return oI(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 rP({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("."+rO.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("."+rO.VALUE_INDICATOR_TEXT).textContent=String(t)},getValueToAriaValueTextFn:function(){return e.valueToAriaValueTextFn},updateTickMarks:function(t){var n=e.root.querySelector("."+rO.TICK_MARKS_CONTAINER);n||((n=document.createElement("div")).classList.add(rO.TICK_MARKS_CONTAINER),e.root.querySelector("."+rO.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(rB.CHANGE,{value:t,thumb:n})},emitInputEvent:function(t,n){e.emit(rB.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("."+rO.INPUT)),this.thumbs=[].slice.call(this.root.querySelectorAll("."+rO.THUMB)),this.trackActive=this.root.querySelector("."+rO.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===tj.END?this.thumbs[this.thumbs.length-1]:this.thumbs[0]},t.prototype.getInput=function(e){return e===tj.END?this.inputs[this.inputs.length-1]:this.inputs[0]},t.prototype.getRipple=function(e){return e===tj.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]===tH.ACTIVE?rO.TICK_MARK_ACTIVE:rO.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]===tH.ACTIVE?(n[i].classList.add(rO.TICK_MARK_ACTIVE),n[i].classList.remove(rO.TICK_MARK_INACTIVE)):(n[i].classList.add(rO.TICK_MARK_INACTIVE),n[i].classList.remove(rO.TICK_MARK_ACTIVE))},t.prototype.createRipples=function(){for(var e=[],t=[].slice.call(this.root.querySelectorAll("."+rO.THUMB)),n=this,i=0;i<t.length;i++)!function(i){var o=t[i],r=n.inputs[i],a=oO(oO({},o4.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 oH(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)}}),c=new o4(o,new o3(a));c.unbounded=!0,e.push(c)}(i);return e},t}(oB),rj={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"},rz={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"])'},rU={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"}(tz||(tz={})),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"}(tU||(tU={}));var rW={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"},r$={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 ."+rW.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+rW.LIST_ITEM_CLASS+" a\n ",FOCUSABLE_CHILD_ELEMENTS:"\n ."+rW.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+rW.LIST_ITEM_CLASS+" a,\n ."+rW.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+rW.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]'},rV={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300},rG={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"},rq=new Set;rq.add(rG.BACKSPACE),rq.add(rG.ENTER),rq.add(rG.SPACEBAR),rq.add(rG.PAGE_UP),rq.add(rG.PAGE_DOWN),rq.add(rG.END),rq.add(rG.HOME),rq.add(rG.ARROW_LEFT),rq.add(rG.ARROW_UP),rq.add(rG.ARROW_RIGHT),rq.add(rG.ARROW_DOWN),rq.add(rG.DELETE),rq.add(rG.ESCAPE);var rX={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},rK=new Map;rK.set(rX.BACKSPACE,rG.BACKSPACE),rK.set(rX.ENTER,rG.ENTER),rK.set(rX.SPACEBAR,rG.SPACEBAR),rK.set(rX.PAGE_UP,rG.PAGE_UP),rK.set(rX.PAGE_DOWN,rG.PAGE_DOWN),rK.set(rX.END,rG.END),rK.set(rX.HOME,rG.HOME),rK.set(rX.ARROW_LEFT,rG.ARROW_LEFT),rK.set(rX.ARROW_UP,rG.ARROW_UP),rK.set(rX.ARROW_RIGHT,rG.ARROW_RIGHT),rK.set(rX.ARROW_DOWN,rG.ARROW_DOWN),rK.set(rX.DELETE,rG.DELETE),rK.set(rX.ESCAPE,rG.ESCAPE);var rJ=new Set;function rQ(e){var t=e.key;if(rq.has(t))return t;var n=rK.get(e.keyCode);return n||rG.UNKNOWN}rJ.add(rG.PAGE_UP),rJ.add(rG.PAGE_DOWN),rJ.add(rG.END),rJ.add(rG.HOME),rJ.add(rG.ARROW_LEFT),rJ.add(rG.ARROW_UP),rJ.add(rG.ARROW_RIGHT),rJ.add(rG.ARROW_DOWN);var rZ=["input","button","textarea","select"],r0=function(e){var t=e.target;if(t){var n=(""+t.tagName).toLowerCase();-1===rZ.indexOf(n)&&e.preventDefault()}};function r1(e,t){var n,i=e.nextChar,o=e.focusItemAtIndex,r=e.sortedIndexByFirstChar,a=e.focusedItemIndex,c=e.skipFocus,d=e.isItemAtIndexDisabled;return clearTimeout(t.bufferClearTimeout),t.bufferClearTimeout=setTimeout(function(){r5(t)},rV.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 c=a[i.sortedIndexCursor].index;if(!n(c))return c}i.currentFirstChar=r;var d=-1;for(o=0;o<a.length;o++)if(!n(a[o].index)){d=o;break}for(;o<a.length;o++)if(a[o].index>t&&!n(a[o].index)){d=o;break}return -1!==d?(i.sortedIndexCursor=d,a[i.sortedIndexCursor].index):-1}(r,a,d,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,c=-1;a!==n.sortedIndexCursor;){var d=o[a],s=0===d.text.lastIndexOf(n.typeaheadBuffer,0),l=!t(d.index);if(s&&l){c=a;break}a=(a+1)%o.length}return -1!==c?(n.sortedIndexCursor=c,o[n.sortedIndexCursor].index):-1}(r,d,t))||c||o(n),n}function r2(e){return e.typeaheadBuffer.length>0}function r5(e){e.typeaheadBuffer=""}function r3(e,t){var n=e.event,i=e.isTargetListItem,o=e.focusedItemIndex,r=e.focusItemAtIndex,a=e.sortedIndexByFirstChar,c=e.isItemAtIndexDisabled,d="ArrowLeft"===rQ(n),s="ArrowUp"===rQ(n),l="ArrowRight"===rQ(n),m="ArrowDown"===rQ(n),u="Home"===rQ(n),f="End"===rQ(n),p="Enter"===rQ(n),b="Spacebar"===rQ(n);if(d||s||l||m||u||f||p)return -1;if(!b&&1===n.key.length){r0(n);var h={focusItemAtIndex:r,focusedItemIndex:o,nextChar:n.key.toLowerCase(),sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:c};return r1(h,t)}if(!b)return -1;if(i&&r0(n),i&&r2(t)){var h={focusItemAtIndex:r,focusedItemIndex:o,nextChar:" ",sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:c};return r1(h,t)}return -1}var r4=function(e){function t(n){var i=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return i.wrapFocus_=!1,i.isVertical_=!0,i.isSingleSelectionList_=!1,i.selectedIndex_=rV.UNSET_INDEX,i.focusedItemIndex=rV.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 oI(t,e),Object.defineProperty(t,"strings",{get:function(){return r$},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return rW},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return rV},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,rW.LIST_ITEM_SELECTED_CLASS),n=this.adapter.listItemAtIndexHasClass(e,rW.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&&r2(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"===rQ(e),r="ArrowUp"===rQ(e),a="ArrowRight"===rQ(e),c="ArrowDown"===rQ(e),d="Home"===rQ(e),s="End"===rQ(e),l="Enter"===rQ(e),m="Spacebar"===rQ(e),u="A"===e.key||"a"===e.key;if(this.adapter.isRootFocused()){if(r||s?(e.preventDefault(),this.focusLastElement()):(c||d)&&(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,rW.LIST_ITEM_DISABLED_CLASS)}};r3(f,this.typeaheadState)}return}var p=this.adapter.getFocusedElementIndex();if(-1!==p||!((p=n)<0)){if(this.isVertical_&&c||!this.isVertical_&&a)r0(e),this.focusNextElement(p);else if(this.isVertical_&&r||!this.isVertical_&&o)r0(e),this.focusPrevElement(p);else if(d)r0(e),this.focusFirstElement();else if(s)r0(e),this.focusLastElement();else if(u&&e.ctrlKey&&this.isCheckboxList_)e.preventDefault(),this.toggleAll(this.selectedIndex_===rV.UNSET_INDEX?[]:this.selectedIndex_);else if((l||m)&&t){var b=e.target;if(b&&"A"===b.tagName&&l||(r0(e),this.adapter.listItemAtIndexHasClass(p,rW.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,rW.LIST_ITEM_DISABLED_CLASS)}};r3(f,this.typeaheadState)}}},t.prototype.handleClick=function(e,t){e!==rV.UNSET_INDEX&&(this.adapter.listItemAtIndexHasClass(e,rW.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,rW.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(e,r$.ARIA_DISABLED,"false")):(this.adapter.addClassForElementIndex(e,rW.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(e,r$.ARIA_DISABLED,"true")))},t.prototype.setSingleSelectionAtIndex_=function(e){if(this.selectedIndex_!==e){var t=rW.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass_&&(t=rW.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex_!==rV.UNSET_INDEX&&this.adapter.removeClassForElementIndex(this.selectedIndex_,t),this.setAriaForSingleSelectionAtIndex_(e),this.setTabindexAtIndex(e),e!==rV.UNSET_INDEX&&this.adapter.addClassForElementIndex(e,t),this.selectedIndex_=e}},t.prototype.setAriaForSingleSelectionAtIndex_=function(e){this.selectedIndex_===rV.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter.getAttributeForElementIndex(e,r$.ARIA_CURRENT));var t=null!==this.ariaCurrentAttrValue_,n=t?r$.ARIA_CURRENT:r$.ARIA_SELECTED;if(this.selectedIndex_!==rV.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex_,n,"false"),e!==rV.UNSET_INDEX){var i=t?this.ariaCurrentAttrValue_:"true";this.adapter.setAttributeForElementIndex(e,n,i)}},t.prototype.getSelectionAttribute=function(){return this.useSelectedAttr_?r$.ARIA_SELECTED:r$.ARIA_CHECKED},t.prototype.setRadioAtIndex_=function(e){var t=this.getSelectionAttribute();this.adapter.setCheckedCheckboxOrRadioAtIndex(e,!0),this.selectedIndex_!==rV.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===rV.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!==rV.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_!==rV.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===rV.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_===rV.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,rW.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),r1({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,rW.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(){r5(this.typeaheadState)},t}(oR),r6=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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("."+rW.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(r$.ARIA_ORIENTATION);this.vertical=e!==r$.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(r$.FOCUSABLE_CHILD_ELEMENTS)).forEach(function(e){return e.setAttribute("tabindex","-1")}),this.foundation.layout()},t.prototype.getPrimaryText=function(e){var t=e.querySelector("."+rW.LIST_ITEM_PRIMARY_TEXT_CLASS);if(t)return t.textContent||"";var n=e.querySelector("."+rW.LIST_ITEM_TEXT_CLASS);return n&&n.textContent||""},t.prototype.initializeListType=function(){var e=this,t=this.root.querySelectorAll(r$.ARIA_ROLE_CHECKBOX_SELECTOR),n=this.root.querySelector(r$.ARIA_CHECKED_RADIO_SELECTOR);if(t.length){var i=this.root.querySelectorAll(r$.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 r4({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(r$.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(t){return!!e.listElements[t].querySelector(r$.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(t){return e.listElements[t].querySelector(r$.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(r$.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(r$.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(r$.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX)).forEach(function(e){return e.setAttribute("tabindex",n)})}})},t.prototype.getListItemIndex_=function(e){var t=oP(e.target,"."+rW.LIST_ITEM_CLASS+", ."+rW.ROOT);return t&&oH(t,"."+rW.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(rW.LIST_ITEM_CLASS),t)},t.prototype.handleClickEvent_=function(e){var t=this.getListItemIndex_(e),n=!oH(e.target,r$.CHECKBOX_RADIO_SELECTOR);this.foundation.handleClick(t,n)},t}(oB),r8=function(e){function t(n){var i=e.call(this,oO(oO({},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=tU.TOP_START,i.originCorner=tU.TOP_START,i.anchorMargin={top:0,right:0,bottom:0,left:0},i.position={x:0,y:0},i}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return rj},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return rz},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return rU},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Corner",{get:function(){return tU},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^tz.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()},rU.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()},rU.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,tz.BOTTOM)?"bottom":"top",r=this.hasBit(n,tz.RIGHT)?"right":"left",a=this.getHorizontalOriginOffset(n),c=this.getVerticalOriginOffset(n),d=this.measurements,s=d.anchorSize,l=d.surfaceSize,m=((e={})[r]=a,e[o]=c,e);s.width/l.width>rU.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(r="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(m),this.adapter.setTransformOrigin(r+" "+o),this.adapter.setPosition(m),this.adapter.setMaxHeight(i?i+"px":""),this.hasBit(n,tz.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,c=a.viewportDistance,d=a.anchorSize,s=a.surfaceSize,l=t.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,tz.BOTTOM)?(e=c.top-l+d.height+this.anchorMargin.bottom,n=c.bottom-l-this.anchorMargin.bottom):(e=c.top-l+this.anchorMargin.top,n=c.bottom-l+d.height-this.anchorMargin.top),!(n-s.height>0)&&e>=n&&(r=this.setBit(r,tz.BOTTOM));var m=this.adapter.isRtl(),u=this.hasBit(this.anchorCorner,tz.FLIP_RTL),f=this.hasBit(this.anchorCorner,tz.RIGHT)||this.hasBit(r,tz.RIGHT),p=!1;(p=m&&u?!f:f)?(i=c.left+d.width+this.anchorMargin.right,o=c.right-this.anchorMargin.right):(i=c.left+this.anchorMargin.left,o=c.right+d.width-this.anchorMargin.left);var b=i-s.width>0,h=o-s.width>0,_=this.hasBit(r,tz.FLIP_RTL)&&this.hasBit(r,tz.RIGHT);return h&&_&&m||!b&&_?r=this.unsetBit(r,tz.RIGHT):(b&&p&&m||b&&!p&&f||!h&&i>=o)&&(r=this.setBit(r,tz.RIGHT)),r},t.prototype.getMenuSurfaceMaxHeight=function(e){var n=this.measurements.viewportDistance,i=0,o=this.hasBit(e,tz.BOTTOM),r=this.hasBit(this.anchorCorner,tz.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,tz.RIGHT),i=this.hasBit(this.anchorCorner,tz.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,tz.BOTTOM),i=this.hasBit(this.anchorCorner,tz.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 c=function(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.")}(a),d=c.next();!d.done;d=c.next()){var s=d.value,l=e[s]||0;l+=r[s],this.isFixedPosition||("top"===s?l+=o.y:"bottom"===s?l-=o.y:"left"===s?l+=o.x:l-=o.x),e[s]=l}}catch(e){t={error:e}}finally{try{d&&!d.done&&(n=c.return)&&n.call(c)}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}(oR),r7=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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(rj.ANCHOR)?t:null,this.root.classList.contains(rj.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(rz.OPENED_EVENT,this.registerBodyClickListener),this.listen(rz.CLOSED_EVENT,this.deregisterBodyClickListener)},t.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown),this.unlisten(rz.OPENED_EVENT,this.registerBodyClickListener),this.unlisten(rz.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(rj.FIXED):this.root.classList.remove(rj.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 r8({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(r8.strings.CLOSED_EVENT,{})},notifyOpen:function(){return e.emit(r8.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===tW||i)&&(tW="transform"in n.document.createElement("div").style?"transform":"webkitTransform"),tW+"-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}(oB),r9={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},ae={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list",SELECTED_EVENT:"MDCMenu:selected"},at={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"}(t$||(t$={}));var an=function(e){function t(n){var i=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return i.closeAnimationEndTimerId_=0,i.defaultFocusState_=t$.LIST_ROOT,i}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return r9},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ae},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return at},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)},r8.numbers.TRANSITION_CLOSE_DURATION))},t.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState_){case t$.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case t$.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case t$.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,ae.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(t,r9.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(e,r9.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(e,ae.ARIA_CHECKED_ATTR,"true")},t.prototype.setEnabled=function(e,t){this.validatedIndex_(e),t?(this.adapter.removeClassFromElementAtIndex(e,rW.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(e,ae.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(e,rW.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(e,ae.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}(oR),ai=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e,t){void 0===e&&(e=function(e){return new r7(e)}),void 0===t&&(t=function(e){return new r6(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(ae.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(r8.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.listen("keydown",this.handleKeydown_),this.listen(r4.strings.ACTION_EVENT,this.handleItemAction_)},t.prototype.destroy=function(){this.list_&&this.list_.destroy(),this.menuSurface_.destroy(),this.menuSurface_.unlisten(r8.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.unlisten("keydown",this.handleKeydown_),this.unlisten(r4.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:rV.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 an({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(ae.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(ae.LIST_SELECTOR).focus()},isSelectableItemAtIndex:function(t){return!!oP(e.items[t],"."+r9.MENU_SELECTION_GROUP)},getSelectedSiblingOfItemAtIndex:function(t){var n=oP(e.items[t],"."+r9.MENU_SELECTION_GROUP).querySelector("."+r9.MENU_SELECTED_LIST_ITEM);return n?e.items.indexOf(n):-1}})},t}(oB),ao={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"},ar={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"},aa={LABEL_SCALE:.75,UNSET_INDEX:-1,CLICK_DEBOUNCE_TIMEOUT_MS:330},ac=function(e){function t(n,i){void 0===i&&(i={});var o=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return o.disabled=!1,o.isMenuOpen=!1,o.useDefaultValidation=!0,o.customValidity=!0,o.lastSelectedIndex=aa.UNSET_INDEX,o.clickDebounceTimeout=0,o.recentlyClicked=!1,o.leadingIcon=i.leadingIcon,o.helperText=i.helperText,o}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return ao},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return aa},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ar},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===aa.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!==aa.UNSET_INDEX?t[e]:""},t.prototype.getDisabled=function(){return this.disabled},t.prototype.setDisabled=function(e){this.disabled=e,this.disabled?(this.adapter.addClass(ao.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass(ao.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(ao.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(ao.FOCUSED),n=e||t,i=this.adapter.hasClass(ao.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(ao.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(ao.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},t.prototype.handleMenuItemAction=function(e){this.setSelectedIndex(e,!0)},t.prototype.handleFocus=function(){this.adapter.addClass(ao.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(ao.FOCUSED)){var t=rQ(e)===rG.ENTER,n=rQ(e)===rG.SPACEBAR,i=rQ(e)===rG.ARROW_UP,o=rQ(e)===rG.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(ao.FOCUSED);if(e){var n=aa.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(ao.INVALID),this.adapter.removeMenuClass(ao.MENU_INVALID)):(this.adapter.addClass(ao.INVALID),this.adapter.addMenuClass(ao.MENU_INVALID)),this.syncHelperTextValidity(e)},t.prototype.isValid=function(){return this.useDefaultValidation&&this.adapter.hasClass(ao.REQUIRED)&&!this.adapter.hasClass(ao.DISABLED)?this.getSelectedIndex()!==aa.UNSET_INDEX&&(0!==this.getSelectedIndex()||!!this.getValue()):this.customValidity},t.prototype.setRequired=function(e){e?this.adapter.addClass(ao.REQUIRED):this.adapter.removeClass(ao.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(tU.BOTTOM_START)),this.adapter.setMenuWrapFocus(!1),this.setDisabled(this.adapter.hasClass(ao.DISABLED)),this.syncHelperTextValidity(!this.adapter.hasClass(ao.INVALID)),this.layout(),this.layoutOptions()},t.prototype.blur=function(){this.adapter.removeClass(ao.FOCUSED),this.layout(),this.adapter.deactivateBottomLine(),this.adapter.hasClass(ao.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(ar.ARIA_DESCRIBEDBY,n):this.adapter.removeSelectAnchorAttr(ar.ARIA_DESCRIBEDBY)}},t.prototype.setClickDebounceTimeout=function(){var e=this;clearTimeout(this.clickDebounceTimeout),this.clickDebounceTimeout=setTimeout(function(){e.recentlyClicked=!1},aa.CLICK_DEBOUNCE_TIMEOUT_MS),this.recentlyClicked=!0},t}(oR),ad={ARIA_HIDDEN:"aria-hidden",ROLE:"role"},as={HELPER_TEXT_VALIDATION_MSG:"mdc-select-helper-text--validation-msg",HELPER_TEXT_VALIDATION_MSG_PERSISTENT:"mdc-select-helper-text--validation-msg-persistent"},al=function(e){function t(n){return e.call(this,oO(oO({},t.defaultAdapter),n))||this}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return as},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ad},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(ad.ARIA_HIDDEN)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.setValidation=function(e){e?this.adapter.addClass(as.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(as.HELPER_TEXT_VALIDATION_MSG)},t.prototype.setValidationMsgPersistent=function(e){e?this.adapter.addClass(as.HELPER_TEXT_VALIDATION_MSG_PERSISTENT):this.adapter.removeClass(as.HELPER_TEXT_VALIDATION_MSG_PERSISTENT)},t.prototype.setValidity=function(e){if(this.adapter.hasClass(as.HELPER_TEXT_VALIDATION_MSG)){var t=this.adapter.hasClass(as.HELPER_TEXT_VALIDATION_MSG_PERSISTENT);if(!e||t){this.showToScreenReader(),e?this.adapter.removeAttr(ad.ROLE):this.adapter.setAttr(ad.ROLE,"alert");return}this.adapter.removeAttr(ad.ROLE),this.hide()}},t.prototype.showToScreenReader=function(){this.adapter.removeAttr(ad.ARIA_HIDDEN)},t.prototype.hide=function(){this.adapter.setAttr(ad.ARIA_HIDDEN,"true")},t}(oR),am=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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 al({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}(oB),au={ICON_EVENT:"MDCSelect:icon",ICON_ROLE:"button"},af=["click","keydown"],ap=function(e){function t(n){var i=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return i.savedTabIndex_=null,i.interactionHandler_=function(e){return i.handleInteraction(e)},i}return oI(t,e),Object.defineProperty(t,"strings",{get:function(){return au},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"),af.forEach(function(t){e.adapter.registerInteractionHandler(t,e.interactionHandler_)})},t.prototype.destroy=function(){var e=this;af.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",au.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}(oR),ab=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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 ap({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(ap.strings.ICON_EVENT,{},!0)}})},t}(oB),ah=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(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 oU(e)}),void 0===t&&(t=function(e){return new oV(e)}),void 0===n&&(n=function(e){return new oJ(e)}),void 0===i&&(i=function(e){return new ai(e)}),void 0===o&&(o=function(e){return new ab(e)}),void 0===r&&(r=function(e){return new am(e)}),this.selectAnchor=this.root.querySelector(ar.SELECT_ANCHOR_SELECTOR),this.selectedText=this.root.querySelector(ar.SELECTED_TEXT_SELECTOR),this.hiddenInput=this.root.querySelector(ar.HIDDEN_INPUT_SELECTOR),!this.selectedText)throw Error("MDCSelect: Missing required element: The following selector must be present: '"+ar.SELECTED_TEXT_SELECTOR+"'");if(this.selectAnchor.hasAttribute(ar.ARIA_CONTROLS)){var a=document.getElementById(this.selectAnchor.getAttribute(ar.ARIA_CONTROLS));a&&(this.helperText=r(a))}this.menuSetup(i);var c=this.root.querySelector(ar.LABEL_SELECTOR);this.label=c?e(c):null;var d=this.root.querySelector(ar.LINE_RIPPLE_SELECTOR);this.lineRipple=d?t(d):null;var s=this.root.querySelector(ar.OUTLINE_SELECTOR);this.outline=s?n(s):null;var l=this.root.querySelector(ar.LEADING_ICON_SELECTOR);l&&(this.leadingIcon=o(l)),this.root.classList.contains(ao.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(rz.CLOSED_EVENT,this.handleMenuClosed),this.menu.listen(rz.OPENED_EVENT,this.handleMenuOpened),this.menu.listen(ae.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(rz.CLOSED_EVENT,this.handleMenuClosed),this.menu.unlisten(rz.OPENED_EVENT,this.handleMenuOpened),this.menu.unlisten(ae.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(ar.VALUE_ATTR)||""}),this.hiddenInput&&(this.hiddenInput.value=this.value)},t.prototype.getDefaultFoundation=function(){return new ac(oO(oO(oO(oO({},this.getSelectAdapterMethods()),this.getCommonAdapterMethods()),this.getOutlineAdapterMethods()),this.getLabelAdapterMethods()),this.getFoundationMap())},t.prototype.menuSetup=function(e){this.menuElement=this.root.querySelector(ar.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(ar.VALUE_ATTR)||""})},t.prototype.createRipple=function(){var e=this,t=oO(oO({},o4.createAdapter({root:this.selectAnchor})),{registerInteractionHandler:function(t,n){e.selectAnchor.addEventListener(t,n)},deregisterInteractionHandler:function(t,n){e.selectAnchor.removeEventListener(t,n)}});return new o4(this.selectAnchor,new o3(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(ar.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(ar.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}(oB),a_={ROOT:"mdc-form-field"},ag={LABEL_SELECTOR:".mdc-form-field > label"},ay=function(e){function t(n){var i=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return i.click=function(){i.handleClick()},i}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return a_},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ag},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}(oR),av=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oI(t,e),t.attachTo=function(e){return new t(e)},t.prototype.labelEl=function(){var e=ay.strings.LABEL_SELECTOR;return this.root.querySelector(e)},t.prototype.getDefaultFoundation=function(){var e=this;return new ay({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}(oB),aF={ICON_BUTTON_ON:"mdc-icon-button--on",ROOT:"mdc-icon-button"},ak={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"},ax=function(e){function t(n){var i=e.call(this,oO(oO({},t.defaultAdapter),n))||this;return i.hasToggledAriaLabel=!1,i}return oI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return aF},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ak},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(ak.DATA_ARIA_LABEL_ON),t=this.adapter.getAttr(ak.DATA_ARIA_LABEL_OFF);if(e&&t){if(null!==this.adapter.getAttr(ak.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(ak.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(aF.ICON_BUTTON_ON)},t.prototype.toggle=function(e){if(void 0===e&&(e=!this.isOn()),e?this.adapter.addClass(aF.ICON_BUTTON_ON):this.adapter.removeClass(aF.ICON_BUTTON_ON),this.hasToggledAriaLabel){var t=e?this.adapter.getAttr(ak.DATA_ARIA_LABEL_ON):this.adapter.getAttr(ak.DATA_ARIA_LABEL_OFF);this.adapter.setAttr(ak.ARIA_LABEL,t||"")}else this.adapter.setAttr(ak.ARIA_PRESSED,""+e)},t}(oR),aw=ax.strings,aE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rippleComponent=t.createRipple(),t}return oI(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 ax({addClass:function(t){return e.root.classList.add(t)},hasClass:function(t){return e.root.classList.contains(t)},notifyChange:function(t){e.emit(aw.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 o4(this.root);return e.unbounded=!0,e},t}(oB);let aA="important",aT=" !"+aA,aL=i1(class extends i2{constructor(e){if(super(e),e.type!==i0.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(aT);e.includes("-")||t?n.setProperty(e,t?i.slice(0,-11):i,t?aA:""):n[e]=i}}return V}});var aM=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 c=e.length-1;c>=0;c--)(o=e[c])&&(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 aC=n(3041),aD=n(1526);class aS extends CustomEvent{constructor(e){super(aS.NAME,{detail:e,bubbles:!0,composed:!0})}}function aI(e,t,n,i,o){switch(i=i||"listbox",e){case tV.RADIO:i="radiogroup";break;case tV.MULTI_CHECKBOX:i="group"}return $`
|
|
273
273
|
<ul id="list" class="mdc-list${n?" mdc-list--two-line":""}" role="${i??G}" @MDCList:action="${e=>o&&o(e)}" aria-hidden="true" aria-orientation="vertical" tabindex="-1">
|
|
274
274
|
${t}
|
|
275
275
|
</ul>
|