@openremote/or-attribute-input 1.9.0-snapshot.20250826113849 → 1.9.0-snapshot.20250828102241

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.
@@ -65,7 +65,7 @@ uniform ${n} ${i} u_${r};
65
65
  :host([hidden]) {
66
66
  display: none;
67
67
  }
68
- `,tz([eb({type:String})],tj.prototype,"value",void 0),tz([eb({type:Object})],tj.prototype,"options",void 0),tj=tz([ep("or-translate")],tj),function(e){e.CREATE="CREATE",e.UPDATE="UPDATE",e.DELETE="DELETE"}(sr||(sr={})),function(e){e.LOW="LOW",e.MEDIUM="MEDIUM",e.HIGH="HIGH"}(so||(so={})),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"}(sa||(sa={})),function(e){e.OPEN="OPEN",e.ACKNOWLEDGED="ACKNOWLEDGED",e.IN_PROGRESS="IN_PROGRESS",e.RESOLVED="RESOLVED",e.CLOSED="CLOSED"}(ss||(ss={})),function(e){e.BOTTOM_LEFT="BOTTOM_LEFT",e.BOTTOM_RIGHT="BOTTOM_RIGHT",e.TOP_LEFT="TOP_LEFT",e.TOP_RIGHT="TOP_RIGHT"}(sl||(sl={})),function(e){e.CREATE="CREATE",e.READ="READ",e.UPDATE="UPDATE",e.DELETE="DELETE"}(sc||(sc={})),function(e){e.NONE="NONE",e.FORECAST="FORECAST",e.SETPOINT="SETPOINT"}(sd||(sd={})),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"}(su||(su={})),function(e){e.EV="EV",e.PHEV="PHEV"}(sh||(sh={})),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"}(sm||(sm={})),function(e){e.SOUTH="SOUTH",e.EAST_WEST="EAST_WEST"}(sf||(sf={})),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"}(sp||(sp={})),function(e){e.TOGGLE="TOGGLE",e.INCREMENT="INCREMENT",e.DECREMENT="DECREMENT",e.NEGATE="NEGATE"}(sg||(sg={})),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"}(sb||(sb={})),function(e){e.PUBLIC="PUBLIC",e.SHARED="SHARED",e.PRIVATE="PRIVATE"}(s_||(s_={})),function(e){e.OFF="OFF",e.ONE_MIN="ONE_MIN",e.FIVE_MIN="FIVE_MIN",e.QUARTER="QUARTER",e.ONE_HOUR="ONE_HOUR"}(sy||(sy={})),function(e){e.WRAP_TO_SINGLE_COLUMN="WRAP_TO_SINGLE_COLUMN",e.KEEP_LAYOUT="KEEP_LAYOUT",e.REDIRECT="REDIRECT",e.BLOCK_DEVICE="BLOCK_DEVICE"}(sv||(sv={})),function(e){e.MINUTE="MINUTE",e.HOUR="HOUR",e.DAY="DAY",e.WEEK="WEEK",e.MONTH="MONTH",e.YEAR="YEAR"}(sx||(sx={})),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"}(sw||(sw={})),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"}(sF||(sF={})),function(e){e.HTTPS="HTTPS",e.HTTP="HTTP",e.TCP="TCP"}(sk||(sk={})),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.OPTIONS="OPTIONS",e.PATCH="PATCH"}(sE||(sE={})),function(e){e.KEYCLOAK="KEYCLOAK",e.BASIC="BASIC",e.NONE="NONE"}(sA||(sA={})),function(e){e.WEBSOCKET="WEBSOCKET",e.POLLING="POLLING"}(sC||(sC={})),function(e){e.VECTOR="VECTOR",e.RASTER="RASTER"}(sT||(sT={})),function(e){e.INTERNAL="INTERNAL",e.CLIENT="CLIENT",e.GLOBAL_RULESET="GLOBAL_RULESET",e.REALM_RULESET="REALM_RULESET",e.ASSET_RULESET="ASSET_RULESET"}(sS||(sS={})),function(e){e.REALM="REALM",e.USER="USER",e.ASSET="ASSET",e.CUSTOM="CUSTOM"}(sM||(sM={})),function(e){e.NORMAL="NORMAL",e.HIGH="HIGH"}(sL||(sL={})),function(e){e.DEVICE="DEVICE",e.TOPIC="TOPIC",e.CONDITION="CONDITION"}(sD||(sD={})),function(e){e.ALWAYS="ALWAYS",e.ONCE="ONCE",e.HOURLY="HOURLY",e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY",e.ANNUALLY="ANNUALLY"}(sI||(sI={})),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"}(sO||(sO={})),function(e){e.PRIVATE="PRIVATE",e.PROTECTED="PROTECTED",e.PUBLIC="PUBLIC"}(sR||(sR={})),function(e){e.EXACT="EXACT",e.BEGIN="BEGIN",e.END="END",e.CONTAINS="CONTAINS"}(sP||(sP={})),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"}(s$||(s$={})),function(e){e.CREATED_ON="CREATED_ON",e.NAME="NAME",e.ASSET_TYPE="ASSET_TYPE",e.PARENT_ID="PARENT_ID",e.REALM="REALM"}(sN||(sN={})),function(e){e.RESTRICTED="RESTRICTED",e.LINKED="LINKED",e.REALM="REALM"}(sB||(sB={})),function(e){e.AT_LEAST_ONE="AT_LEAST_ONE",e.ALL="ALL",e.NONE="NONE"}(sz||(sz={})),function(e){e.AND="AND",e.OR="OR"}(sj||(sj={})),function(e){e.CREATED_ON="CREATED_ON",e.FIRST_NAME="FIRST_NAME",e.LAST_NAME="LAST_NAME",e.USERNAME="USERNAME",e.EMAIL="EMAIL"}(sY||(sY={})),function(e){e.STOPPED="STOPPED",e.RUNNING="RUNNING",e.ERROR="ERROR"}(sH||(sH={})),function(e){e.JAVASCRIPT="JAVASCRIPT",e.GROOVY="GROOVY",e.JSON="JSON",e.FLOW="FLOW"}(sU||(sU={})),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"}(sV||(sV={})),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"}(sW||(sW={})),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"}(sG||(sG={})),function(e){e.NEW_LINE="NEW_LINE",e.SPACER="SPACER"}(sq||(sq={})),function(e){e.INPUT="INPUT",e.PROCESSOR="PROCESSOR",e.OUTPUT="OUTPUT",e.THEN="THEN"}(sK||(sK={})),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"}(sX||(sX={})),function(e){e.ADD="ADD",e.ADD_OR_REPLACE="ADD_OR_REPLACE",e.REPLACE="REPLACE",e.DELETE="DELETE",e.CLEAR="CLEAR"}(sZ||(sZ={})),function(e){e.PER_ASSET="PER_ASSET",e.GLOBAL="GLOBAL"}(sJ||(sJ={})),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.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"}(sQ||(sQ={})),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"}(s0||(s0={})),function(e){e.INFO="INFO",e.WARN="WARN",e.ERROR="ERROR"}(s1||(s1={})),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"}(s2||(s2={})),function(e){e.SECONDLY="SECONDLY",e.MINUTELY="MINUTELY",e.HOURLY="HOURLY",e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY",e.YEARLY="YEARLY"}(s5||(s5={})),function(e){e.OMIT="OMIT",e.BACKWARD="BACKWARD",e.FORWARD="FORWARD"}(s3||(s3={})),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"}(s4||(s4={})),function(e){e.SU="SU",e.MO="MO",e.TU="TU",e.WE="WE",e.TH="TH",e.FR="FR",e.SA="SA"}(s6||(s6={})),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.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.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"}(s8||(s8={})),function(e){e.SUPPORTSEXPORT="supportsExport",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.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.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.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.PANELORIENTATION="panelOrientation",e.LENGTH="length",e.USERNAMEPASSWORD="usernamePassword",e.POWERFORECAST="powerForecast",e.SETACTUALSOLARVALUEWITHFORECAST="setActualSolarValueWithForecast",e.REQUESTQUERYPARAMETERS="requestQueryParameters",e.PROXYADDRESS="proxyAddress",e.ENERGYLOCAL="energyLocal",e.ENERGYAUTARKY="energyAutarky",e.MODEL="model",e.MANUFACTURER="manufacturer",e.ONOFF="onOff",e.RESUMESESSION="resumeSession",e.TARIFFEXPORT="tariffExport",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.INCLUDEFORECASTSOLARSERVICE="includeForecastSolarService",e.REQUESTHEADERS="requestHeaders",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.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"}(s7||(s7={})),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.FORECAST="forecast",e.UNITS="units",e.USERCONNECTED="userConnected",e.ACCESSPUBLICREAD="accessPublicRead"}(s9||(s9={})),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"}(le||(le={})),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"}(lt||(lt={})),ln||(ln={});class tY{static getAssetDescriptors(){return tY._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=tY.getValueDescriptor(t)),n=t.jsonType?t:tY.getValueDescriptor(t.type)),!n&&e&&(n=tY.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,r;if(t&&"string"!=typeof t)i=t;else{let r=this.getAssetTypeInfo(e||"ThingAsset");if(!r)return[void 0,void 0];"string"==typeof t&&(i=this.getAttributeDescriptor(t,r)),!i&&n&&(i={type:n.type,name:n.name,meta:n.meta})}return i&&(r=this.getValueDescriptor(i.type)),[i,r]}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}}tY._assetTypeInfos=[],tY._metaItemDescriptors=[],tY._valueDescriptors=[],n(50488);var tH=n(33348),tU=n.n(tH),tV=n(53806),tW=n.n(tV),tG=n(92891);class tq{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 tK(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=>tK(e[n],t[n]))}return!1}function tX(e){if(null==e)return"";let t=!1;return e.split(/([A-Z]|\d)/).map((e,n,i)=>{if(!e)return e;if(!t)return t=!0,e.charAt(0).toUpperCase()+e.slice(1);if("_"===e)return" ";if(1===e.length&&e===e.toUpperCase()){let t=!i[n-1]||"_"===i[n-1],r=n+1<i.length&&i[n+1]&&"_"!==i[n+1],o=n+3>i.length||!i[n+1]&&!i[n+3];(!t||r)&&(e=" "+e),!r&&(t||o)||(e=e.toLowerCase())}return e}).join("").trim()}function tZ(e,t,n){let i="string"==typeof e?e:e.name;return t&&t.meta&&t.meta.hasOwnProperty(i)?t.meta[i]:n&&n.meta?n.meta[i]:void 0}function tJ(e,t){let n="string"==typeof e?tY.getMetaItemDescriptor(e):e;return n?{name:n.name,type:n.type,value:t}:{name:typeof e,type:tY.resolveValueTypeFromValue(t),value:t}}function tQ(e,t,n,i,r,o){let a=t3("label",e,t,n,r),s="";if(a||(a=tZ("label",e,t&&t.meta?t:void 0)),i&&(s=t2(t5("units",e,t,n,r))),!a){let n=e?e.name:t?"string"==typeof t?t:t.name:void 0;a=o||(n?tX(n):void 0)}return a?a+(s?" ("+s+")":""):s}function t0(e,t,n,i,r,o){let a=t1(e?e.value:void 0,()=>t5("format",e,t,n,r),void 0,o),s=t5("units",e,t,n,!0);return i&&s&&s.length&&(a=t2(t5("units",e,t,n,r),a)),a}function t1(e,t,n,i){let r="";if(null==e)r=i||"";else if("string"==typeof e)r=e;else if("number"==typeof e||"boolean"==typeof e||e instanceof Date){let i=t&&t();if(i&&0!==Object.keys(i).length)switch("number"==typeof e?i.asBoolean?e=!!e:i.asDate&&(e=new Date(e)):"boolean"==typeof e&&i.asNumber&&(e=+!!e),typeof e){case"number":r=new Intl.NumberFormat(n||tB.language,i).format(e);break;case"boolean":i.asOnOff&&(r=e?tB.t("on"):tB.t("off")),i.asOpenClosed&&(r=e?tB.t("open"):tB.t("closed")),i.asPressedReleased&&(r=e?tB.t("pressed"):tB.t("released"));break;case"object":if(i.momentJsFormat)r=tW()(e).format(i.momentJsFormat);else if(i.iso8601)r=e.toISOString();else if(i.week){var o;let t,n=((o=new Date(Date.UTC((o=e).getFullYear(),o.getMonth(),o.getDate()))).setUTCDate(o.getUTCDate()+4-(o.getUTCDay()||7)),t=new Date(Date.UTC(o.getUTCFullYear(),0,1)),Math.ceil(((o.getTime()-t.getTime())/864e5+1)/7));r="2-digit"===i.week?String(n).padStart(2,"0"):Number(n).toString(10)}else r=new Intl.DateTimeFormat(n||tB.language,i).format(e)}else r=Object(e).toString()}return r}function t2(e,t){if(!e)return"";t||(t="");let n=e.map((e,n)=>{if(3!==e.length||e.toUpperCase()!==e)return tB.t(["units."+e,"or:units."+e]);{let i=new Intl.NumberFormat(tB.language,{currency:e,style:"currency"}).formatToParts();if(0!==n||"currency"!==i[0].type)return"currency"===i[0].type?i[0].value:i[i.length-1].value;if(!t)return i[0].value;t=i[0].value+t}}).join("");return t.length>0?t+" "+n:n}function t5(e,t,n,i,r){let o,a=[],s=t3(e,t&&"string"==typeof t?t:t?t.name:n?"string"==typeof n?n:n.name:void 0,n,i,r);if(s&&(o=JSON.parse(s)))if("format"!==e)return o;else a.push(o);if(t&&t.meta&&(o=tZ(e,t,n)))if("format"!==e)return o;else a.push(o);if(n&&"string"!=typeof n&&n.hasOwnProperty(e)){if(o=n[e],"format"!==e)return o;a.push(o)}if(n&&n.type){if(o=tY.getValueDescriptor(n.type)[e],"format"!==e)return o;a.push(o)}if("format"!==e||0===a.length)return o;let l={};return a.reverse().forEach(e=>{l=Object.assign(Object.assign({},l),e)}),l}function t3(e,t,n,i,r,o){let a;if(t?a="string"==typeof t?t:t.name:n&&(a="string"==typeof n?n:n.name),!a)return;let s=[],l=e+"."+(r?"attribute":"meta")+".";if(i&&s.push(l+i+"."+a),n&&"string"!=typeof n&&(s.push(l+n.type+"."+a),s.push(l+n.type)),s.push(l+a),s.length>0)return tB.t(s,{defaultValue:o||""})}function t4(e,t){let n=t.ref.name;if(e.attributes)if(t.deleted)delete e.attributes[n];else{let i=e.attributes[n];i&&(i.value=t.value,i.timestamp=t.timestamp)}return Object.assign({},e)}var t6=function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})};let t8=n(89916);class t7{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),r=i.get("consoleName"),o=i.get("consoleVersion"),a=i.get("consolePlatform"),s=i.get("consoleProviders"),l=i.get("consoleAutoEnable"),c=s&&s.length>0?s.split(" "):["push"];this._pendingProviderEnables=c;let d=t7._createConsoleRegistration(),u=window.localStorage.getItem("OpenRemoteConsole:"+e);if(u)try{let e=JSON.parse(u);e.id&&(d.id=e.id),e.name&&(d.name=e.name),e.providers&&(d.providers=e.providers),e.apps&&(d.apps=e.apps)}catch(e){console.error("Failed to deserialise console registration")}let h=d.providers;for(let e of(d.providers={},c)){let t=h&&h.hasOwnProperty(e)?h[e]:{enabled:!1,disabled:!1};d.providers[e]=t}let m=iI.getAppName();m.length>0&&0>d.apps.indexOf(m)&&d.apps.push(m),this._registration=d,r&&(d.name=r),o&&(d.version=o),a&&(d.platform=a),l&&(this._autoEnable="TRUE"===l||"true"===l)}get registration(){return this._registration}get autoEnable(){return this._autoEnable}get pendingProviderEnables(){return this._pendingProviderEnables.slice(0)}get shellApple(){let e=navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform:navigator.platform;return e&&("iP"===e.substring(0,2)||"Mac"===e.substring(0,3))&&window.webkit&&window.webkit.messageHandlers}get shellAndroid(){return!!window.MobileInterface}get isMobile(){return this.shellApple||this.shellAndroid}initialise(){return t6(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 t6(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 t6(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 r=this._pendingProviderEnables.indexOf(e);return r>=0&&(this._pendingProviderEnables.splice(r,1),0===this._pendingProviderEnables.length&&(this.sendRegistration(),this._callCompletedCallback())),i})}disableProvider(e){return t6(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 t6(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 tq,r=()=>{delete this._pendingProviderPromises[n],i.reject("No response from provider")};return this._pendingProviderPromises[n]=[i,window.setTimeout(r,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={}),iI.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 t6(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,r=this._pendingProviderPromises[n+i];r&&(window.clearTimeout(r[1]),delete this._pendingProviderPromises[n+i],r[0].resolve(t));let o=this._providerMessageListeners[n+i];o&&o(t)}_callCompletedCallback(){let e=this._enableCompleteCallback;this._enableCompleteCallback=null,e&&window.setTimeout(()=>{e()},0)}static _createConsoleRegistration(){return{name:t8.name,version:t8.version,platform:t8.os.toString(),apps:[],model:((t8.manufacturer?t8.manufacturer+" ":"")+(t8.product?t8.product:"")).trim()}}_initialiseProvider(e){return t6(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 t9=n(43653),ne=n.n(t9);class nt{constructor(e){this.httpClient=e}getAssetDescriptors(e,t){return this.httpClient.request({method:"GET",url:nw`model/assetDescriptors`,queryParams:e,options:t})}getAssetInfo(e,t,n){return this.httpClient.request({method:"GET",url:nw`model/assetInfo/${e}`,queryParams:t,options:n})}getAssetInfos(e,t){return this.httpClient.request({method:"GET",url:nw`model/assetInfos`,queryParams:e,options:t})}getMetaItemDescriptors(e,t){return this.httpClient.request({method:"GET",url:nw`model/metaItemDescriptors`,queryParams:e,options:t})}getValueDescriptors(e,t){return this.httpClient.request({method:"GET",url:nw`model/valueDescriptors`,queryParams:e,options:t})}}class nn{constructor(e){this.httpClient=e}createProvisioningConfig(e,t){return this.httpClient.request({method:"POST",url:nw`provisioning`,data:e,options:t})}getProvisioningConfigs(e){return this.httpClient.request({method:"GET",url:nw`provisioning`,options:e})}deleteProvisioningConfig(e,t){return this.httpClient.request({method:"DELETE",url:nw`provisioning/${e}`,options:t})}updateProvisioningConfig(e,t,n){return this.httpClient.request({method:"PUT",url:nw`provisioning/${e}`,data:t,options:n})}}class ni{constructor(e){this.httpClient=e}getAllNodeDefinitions(e){return this.httpClient.request({method:"GET",url:nw`flow`,options:e})}getNodeDefinition(e,t){return this.httpClient.request({method:"GET",url:nw`flow/${e}`,options:t})}getAllNodeDefinitionsByType(e,t){return this.httpClient.request({method:"GET",url:nw`flow/${e}`,options:t})}}class nr{constructor(e){this.httpClient=e}createGlobalRuleset(e,t){return this.httpClient.request({method:"POST",url:nw`rules`,data:e,options:t})}getGlobalRulesets(e,t){return this.httpClient.request({method:"GET",url:nw`rules`,queryParams:e,options:t})}createAssetRuleset(e,t){return this.httpClient.request({method:"POST",url:nw`rules/asset`,data:e,options:t})}getAssetRulesets(e,t,n){return this.httpClient.request({method:"GET",url:nw`rules/asset/for/${e}`,queryParams:t,options:n})}deleteAssetRuleset(e,t){return this.httpClient.request({method:"DELETE",url:nw`rules/asset/${e}`,options:t})}getAssetRuleset(e,t){return this.httpClient.request({method:"GET",url:nw`rules/asset/${e}`,options:t})}updateAssetRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:nw`rules/asset/${e}`,data:t,options:n})}getAssetGeofences(e,t){return this.httpClient.request({method:"GET",url:nw`rules/geofences/${e}`,options:t})}getAssetEngineInfo(e,t){return this.httpClient.request({method:"GET",url:nw`rules/info/asset/${e}`,options:t})}getGlobalEngineInfo(e){return this.httpClient.request({method:"GET",url:nw`rules/info/global`,options:e})}getRealmEngineInfo(e,t){return this.httpClient.request({method:"GET",url:nw`rules/info/realm/${e}`,options:t})}createRealmRuleset(e,t){return this.httpClient.request({method:"POST",url:nw`rules/realm`,data:e,options:t})}getRealmRulesets(e,t,n){return this.httpClient.request({method:"GET",url:nw`rules/realm/for/${e}`,queryParams:t,options:n})}deleteRealmRuleset(e,t){return this.httpClient.request({method:"DELETE",url:nw`rules/realm/${e}`,options:t})}getRealmRuleset(e,t){return this.httpClient.request({method:"GET",url:nw`rules/realm/${e}`,options:t})}updateRealmRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:nw`rules/realm/${e}`,data:t,options:n})}deleteGlobalRuleset(e,t){return this.httpClient.request({method:"DELETE",url:nw`rules/${e}`,options:t})}getGlobalRuleset(e,t){return this.httpClient.request({method:"GET",url:nw`rules/${e}`,options:t})}updateGlobalRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:nw`rules/${e}`,data:t,options:n})}}class no{constructor(e){this.httpClient=e}getSettings(e){return this.httpClient.request({method:"GET",url:nw`map`,options:e})}saveSettings(e,t){return this.httpClient.request({method:"PUT",url:nw`map`,data:e,options:t})}deleteMap(e){return this.httpClient.request({method:"DELETE",url:nw`map/deleteMap`,options:e})}getCustomMapInfo(e){return this.httpClient.request({method:"GET",url:nw`map/getCustomMapInfo`,options:e})}getSettingsJs(e){return this.httpClient.request({method:"GET",url:nw`map/js`,options:e})}getTile(e,t,n,i){return this.httpClient.request({method:"GET",url:nw`map/tile/${e}/${t}/${n}`,options:i})}uploadMap(e,t){return this.httpClient.request({method:"POST",url:nw`map/upload`,queryParams:e,options:t})}}class na{constructor(e){this.httpClient=e}startTunnel(e,t){return this.httpClient.request({method:"POST",url:nw`gateway/tunnel`,data:e,options:t})}stopTunnel(e,t){return this.httpClient.request({method:"DELETE",url:nw`gateway/tunnel`,data:e,options:t})}getAllActiveTunnelInfos(e,t){return this.httpClient.request({method:"GET",url:nw`gateway/tunnel/${e}`,options:t})}getGatewayActiveTunnelInfos(e,t,n){return this.httpClient.request({method:"GET",url:nw`gateway/tunnel/${e}/${t}`,options:n})}getActiveTunnelInfo(e,t,n,i,r){return this.httpClient.request({method:"GET",url:nw`gateway/tunnel/${e}/${t}/${n}/${i}`,options:r})}}class ns{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:nw`asset`,data:e,options:t})}delete(e,t){return this.httpClient.request({method:"DELETE",url:nw`asset`,queryParams:e,options:t})}writeAttributeValues(e,t){return this.httpClient.request({method:"PUT",url:nw`asset/attributes`,data:e,options:t})}writeAttributeEvents(e,t){return this.httpClient.request({method:"PUT",url:nw`asset/attributes/timestamp`,data:e,options:t})}updateNoneParent(e,t){return this.httpClient.request({method:"DELETE",url:nw`asset/parent`,queryParams:e,options:t})}getPartial(e,t){return this.httpClient.request({method:"GET",url:nw`asset/partial/${e}`,options:t})}queryAssets(e,t){return this.httpClient.request({method:"POST",url:nw`asset/query`,data:e,options:t})}getCurrentUserAssets(e){return this.httpClient.request({method:"GET",url:nw`asset/user/current`,options:e})}createUserAssetLinks(e,t){return this.httpClient.request({method:"POST",url:nw`asset/user/link`,data:e,options:t})}getUserAssetLinks(e,t){return this.httpClient.request({method:"GET",url:nw`asset/user/link`,queryParams:e,options:t})}deleteUserAssetLinks(e,t){return this.httpClient.request({method:"POST",url:nw`asset/user/link/delete`,data:e,options:t})}deleteAllUserAssetLinks(e,t,n){return this.httpClient.request({method:"DELETE",url:nw`asset/user/link/${e}/${t}`,options:n})}deleteUserAssetLink(e,t,n,i){return this.httpClient.request({method:"DELETE",url:nw`asset/user/link/${e}/${t}/${n}`,options:i})}get(e,t){return this.httpClient.request({method:"GET",url:nw`asset/${e}`,options:t})}update(e,t,n){return this.httpClient.request({method:"PUT",url:nw`asset/${e}`,data:t,options:n})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName(e,t,n,i){return this.httpClient.request({method:"PUT",url:nw`asset/${e}/attribute/${t}`,data:n,options:i})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName_timestamp(e,t,n,i,r){return this.httpClient.request({method:"PUT",url:nw`asset/${e}/attribute/${t}/${n}`,data:i,options:r})}updateParent(e,t,n){return this.httpClient.request({method:"PUT",url:nw`asset/${e}/child`,queryParams:t,options:n})}}class nl{constructor(e){this.httpClient=e}createAlarm(e,t,n){return this.httpClient.request({method:"POST",url:nw`alarm`,queryParams:t,data:e,options:n})}getAlarms(e,t){return this.httpClient.request({method:"GET",url:nw`alarm`,queryParams:e,options:t})}removeAlarms(e,t){return this.httpClient.request({method:"DELETE",url:nw`alarm`,data:e,options:t})}setAssetLinks(e,t){return this.httpClient.request({method:"PUT",url:nw`alarm/assets`,data:e,options:t})}getAlarm(e,t){return this.httpClient.request({method:"GET",url:nw`alarm/${e}`,options:t})}removeAlarm(e,t){return this.httpClient.request({method:"DELETE",url:nw`alarm/${e}`,options:t})}updateAlarm(e,t,n){return this.httpClient.request({method:"PUT",url:nw`alarm/${e}`,data:t,options:n})}getAssetLinks(e,t,n){return this.httpClient.request({method:"GET",url:nw`alarm/${e}/assets`,queryParams:t,options:n})}}class nc{constructor(e){this.httpClient=e}getConfig(e){return this.httpClient.request({method:"GET",url:nw`syslog/config`,options:e})}updateConfig(e,t){return this.httpClient.request({method:"PUT",url:nw`syslog/config`,data:e,options:t})}clearEvents(e){return this.httpClient.request({method:"DELETE",url:nw`syslog/event`,options:e})}getEvents(e,t){return this.httpClient.request({method:"GET",url:nw`syslog/event`,queryParams:e,options:t})}}class nd{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:nw`dashboard`,data:e,options:t})}update(e,t){return this.httpClient.request({method:"PUT",url:nw`dashboard`,data:e,options:t})}getAllRealmDashboards(e,t){return this.httpClient.request({method:"GET",url:nw`dashboard/all/${e}`,options:t})}query(e,t){return this.httpClient.request({method:"POST",url:nw`dashboard/query`,data:e,options:t})}delete(e,t,n){return this.httpClient.request({method:"DELETE",url:nw`dashboard/${e}/${t}`,options:n})}get(e,t,n){return this.httpClient.request({method:"GET",url:nw`dashboard/${e}/${t}`,options:n})}}class nu{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:nw`realm`,data:e,options:t})}getAll(e){return this.httpClient.request({method:"GET",url:nw`realm`,options:e})}getAccessible(e){return this.httpClient.request({method:"GET",url:nw`realm/accessible`,options:e})}delete(e,t){return this.httpClient.request({method:"DELETE",url:nw`realm/${e}`,options:t})}get(e,t){return this.httpClient.request({method:"GET",url:nw`realm/${e}`,options:t})}update(e,t,n){return this.httpClient.request({method:"PUT",url:nw`realm/${e}`,data:t,options:n})}}class nh{constructor(e){this.httpClient=e}register(e,t){return this.httpClient.request({method:"POST",url:nw`console/register`,data:e,options:t})}}class nm{constructor(e){this.httpClient=e}getDatapointExport(e,t){return this.httpClient.request({method:"GET",url:nw`asset/datapoint/export`,queryParams:e,options:t})}getDatapointPeriod(e,t){return this.httpClient.request({method:"GET",url:nw`asset/datapoint/periods`,queryParams:e,options:t})}getDatapoints(e,t,n,i){return this.httpClient.request({method:"POST",url:nw`asset/datapoint/${e}/${t}`,data:n,options:i})}}class nf{constructor(e){this.httpClient=e}getNotifications(e,t){return this.httpClient.request({method:"GET",url:nw`notification`,queryParams:e,options:t})}removeNotifications(e,t){return this.httpClient.request({method:"DELETE",url:nw`notification`,queryParams:e,options:t})}sendNotification(e,t){return this.httpClient.request({method:"POST",url:nw`notification/alert`,data:e,options:t})}removeNotification(e,t){return this.httpClient.request({method:"DELETE",url:nw`notification/${e}`,options:t})}notificationAcknowledged(e,t,n,i){return this.httpClient.request({method:"PUT",url:nw`notification/${e}/acknowledged`,queryParams:n,data:t,options:i})}notificationDelivered(e,t,n){return this.httpClient.request({method:"PUT",url:nw`notification/${e}/delivered`,queryParams:t,options:n})}}class np{constructor(e){this.httpClient=e}getApps(e){return this.httpClient.request({method:"GET",url:nw`apps`,options:e})}getConsoleConfig(e){return this.httpClient.request({method:"GET",url:nw`apps/consoleConfig`,options:e})}getAppInfos(e){return this.httpClient.request({method:"GET",url:nw`apps/info`,options:e})}}class ng{constructor(e){this.httpClient=e}getManagerConfig(e){return this.httpClient.request({method:"GET",url:nw`configuration/manager`,options:e})}update(e,t){return this.httpClient.request({method:"PUT",url:nw`configuration/manager`,data:e,options:t})}fileUpload(e,t,n){return this.httpClient.request({method:"POST",url:nw`configuration/manager/file`,queryParams:t,data:e,options:n})}getManagerConfigImage(e,t){return this.httpClient.request({method:"GET",url:nw`configuration/manager/image/${e}`,options:t})}}class nb{constructor(e){this.httpClient=e}getPredictedDatapoints(e,t,n,i){return this.httpClient.request({method:"POST",url:nw`asset/predicted/${e}/${t}`,data:n,options:i})}writePredictedDatapoints(e,t,n,i){return this.httpClient.request({method:"PUT",url:nw`asset/predicted/${e}/${t}`,data:n,options:i})}}class n_{constructor(e){this.httpClient=e}doProtocolAssetDiscovery(e,t,n){return this.httpClient.request({method:"GET",url:nw`agent/assetDiscovery/${e}`,queryParams:t,options:n})}doProtocolAssetImport(e,t,n,i){return this.httpClient.request({method:"POST",url:nw`agent/assetImport/${e}`,queryParams:n,data:t,options:i})}doProtocolInstanceDiscovery(e,t,n){return this.httpClient.request({method:"GET",url:nw`agent/instanceDiscovery/${e}`,queryParams:t,options:n})}}class ny{constructor(e){this.httpClient=e}updateCurrentUserLocale(e,t){return this.httpClient.request({method:"PUT",url:nw`user/locale`,data:e,options:t})}query(e,t){return this.httpClient.request({method:"POST",url:nw`user/query`,data:e,options:t})}requestPasswordResetCurrent(e){return this.httpClient.request({method:"PUT",url:nw`user/request-password-reset`,options:e})}updatePasswordCurrent(e,t){return this.httpClient.request({method:"PUT",url:nw`user/reset-password`,data:e,options:t})}updateCurrent(e,t){return this.httpClient.request({method:"PUT",url:nw`user/update`,data:e,options:t})}getCurrent(e){return this.httpClient.request({method:"GET",url:nw`user/user`,options:e})}getCurrentUserRealmRoles(e){return this.httpClient.request({method:"GET",url:nw`user/userRealmRoles`,options:e})}getCurrentUserClientRoles(e,t){return this.httpClient.request({method:"GET",url:nw`user/userRoles/${e}`,options:t})}disconnectUserSession(e,t,n){return this.httpClient.request({method:"GET",url:nw`user/${e}/disconnect/${t}`,options:n})}requestPasswordReset(e,t,n){return this.httpClient.request({method:"PUT",url:nw`user/${e}/request-password-reset/${t}`,options:n})}updatePassword(e,t,n,i){return this.httpClient.request({method:"PUT",url:nw`user/${e}/reset-password/${t}`,data:n,options:i})}resetSecret(e,t,n){return this.httpClient.request({method:"GET",url:nw`user/${e}/reset-secret/${t}`,options:n})}updateRoles(e,t,n){return this.httpClient.request({method:"PUT",url:nw`user/${e}/roles`,data:t,options:n})}getUserRealmRoles(e,t,n){return this.httpClient.request({method:"GET",url:nw`user/${e}/userRealmRoles/${t}`,options:n})}updateUserRealmRoles(e,t,n,i){return this.httpClient.request({method:"PUT",url:nw`user/${e}/userRealmRoles/${t}`,data:n,options:i})}getUserClientRoles(e,t,n,i){return this.httpClient.request({method:"GET",url:nw`user/${e}/userRoles/${t}/${n}`,options:i})}updateUserClientRoles(e,t,n,i,r){return this.httpClient.request({method:"PUT",url:nw`user/${e}/userRoles/${t}/${n}`,data:i,options:r})}getUserSessions(e,t,n){return this.httpClient.request({method:"GET",url:nw`user/${e}/userSessions/${t}`,options:n})}create(e,t,n){return this.httpClient.request({method:"POST",url:nw`user/${e}/users`,data:t,options:n})}update(e,t,n){return this.httpClient.request({method:"PUT",url:nw`user/${e}/users`,data:t,options:n})}delete(e,t,n){return this.httpClient.request({method:"DELETE",url:nw`user/${e}/users/${t}`,options:n})}getClientRoles(e,t,n){return this.httpClient.request({method:"GET",url:nw`user/${e}/${t}/roles`,options:n})}updateClientRoles(e,t,n,i){return this.httpClient.request({method:"PUT",url:nw`user/${e}/${t}/roles`,data:n,options:i})}get(e,t,n){return this.httpClient.request({method:"GET",url:nw`user/${e}/${t}`,options:n})}}class nv{constructor(e){this.httpClient=e}getHealthStatus(e){return this.httpClient.request({method:"GET",url:nw`health`,options:e})}getInfo(e){return this.httpClient.request({method:"GET",url:nw`info`,options:e})}}class nx{constructor(e){this.httpClient=e}deleteConnections(e,t){return this.httpClient.request({method:"DELETE",url:nw`gateway/connection`,queryParams:e,options:t})}getConnections(e){return this.httpClient.request({method:"GET",url:nw`gateway/connection`,options:e})}deleteConnection(e,t){return this.httpClient.request({method:"DELETE",url:nw`gateway/connection/${e}`,options:t})}getConnection(e,t){return this.httpClient.request({method:"GET",url:nw`gateway/connection/${e}`,options:t})}setConnection(e,t,n){return this.httpClient.request({method:"PUT",url:nw`gateway/connection/${e}`,data:t,options:n})}getConnectionStatus(e,t){return this.httpClient.request({method:"GET",url:nw`gateway/status/${e}`,options:t})}}function nw(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 nF{constructor(e,t=ne().create()){this._assetModelResource=new nE(e,t),this._provisioningResource=new nA(e,t),this._flowResource=new nC(e,t),this._rulesResource=new nT(e,t),this._mapResource=new nS(e,t),this._gatewayServiceResource=new nM(e,t),this._assetResource=new nL(e,t),this._alarmResource=new nD(e,t),this._syslogResource=new nI(e,t),this._dashboardResource=new nO(e,t),this._realmResource=new nR(e,t),this._consoleResource=new nP(e,t),this._assetDatapointResource=new n$(e,t),this._notificationResource=new nN(e,t),this._appResource=new nB(e,t),this._configurationResource=new nz(e,t),this._assetPredictedDatapointResource=new nj(e,t),this._agentResource=new nY(e,t),this._userResource=new nH(e,t),this._statusResource=new nU(e,t),this._gatewayClientResource=new nV(e,t),this._assetResource=new nL(e,t)}get AssetModelResource(){return this._assetModelResource}get ProvisioningResource(){return this._provisioningResource}get FlowResource(){return this._flowResource}get RulesResource(){return this._rulesResource}get MapResource(){return this._mapResource}get GatewayServiceResource(){return this._gatewayServiceResource}get AssetResource(){return this._assetResource}get AlarmResource(){return this._alarmResource}get SyslogResource(){return this._syslogResource}get DashboardResource(){return this._dashboardResource}get RealmResource(){return this._realmResource}get ConsoleResource(){return this._consoleResource}get AssetDatapointResource(){return this._assetDatapointResource}get NotificationResource(){return this._notificationResource}get AppResource(){return this._appResource}get ConfigurationResource(){return this._configurationResource}get AssetPredictedDatapointResource(){return this._assetPredictedDatapointResource}get AgentResource(){return this._agentResource}get UserResource(){return this._userResource}get StatusResource(){return this._statusResource}get GatewayClientResource(){return this._gatewayClientResource}}class nk{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 nE extends nt{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nA extends nn{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nC extends ni{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nT extends nr{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nS extends no{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nM extends na{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nL extends ns{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nD extends nl{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nI extends nc{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nO extends nd{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nR extends nu{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nP extends nh{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class n$ extends nm{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nN extends nf{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nB extends np{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nz extends ng{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nj extends nb{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nY extends n_{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nH extends ny{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nU extends nv{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nV extends nx{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}ne().isAxiosError;let nW=new class{get api(){return this._client}constructor(){this._axiosInstance=ne().create(),this._axiosInstance.defaults.headers.common["Content-Type"]="application/json",this._axiosInstance.interceptors.request.use(e=>(e.paramsSerializer=e=>tU().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 nF(e,this._axiosInstance)}};var nG=function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})};!function(e){e.DISCONNECTED="DISCONNECTED",e.CONNECTED="CONNECTED",e.CONNECTING="CONNECTING"}(li||(li={}));let nq="SUBSCRIBED:",nK="UNAUTHORIZED:",nX="TRIGGERED:",nZ="EVENT:";class nJ{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=nQ.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=li.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===li.CONNECTED)?Promise.resolve(!0):(this._disconnectRequested=!1,this._connectingDeferred||(this._onStatusChanged(li.CONNECTING),this._connectingDeferred=new tq,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=nQ.MIN_RECONNECT_DELAY,this._onStatusChanged(li.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!==li.DISCONNECTED&&this._doDisconnect())}subscribe(e,t){let n={eventSubscription:e,callback:t,deferred:new tq};return null!=this._pendingSubscription||this._status!==li.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 nG(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===li.CONNECTED&&this._doSend(e)}sendEventWithReply(e){return this._status!==li.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(e)}subscribeAssetEvents(e,t,n){return nG(this,void 0,void 0,function*(){let i=e&&"string"!=typeof e[0]?e.map(e=>e.id):e,r="AssetEvent"+nJ._subscriptionCounter++;if(!this._assetEventPromise){let e;iI.authenticated||(e={filterType:"asset",realm:iI.displayRealm});let t={eventType:"asset",filter:e};this._assetEventPromise=this.subscribe(t,e=>{this._assetEventCallbackMap.forEach(t=>t(e))})}return this._assetEventCallbackMap.set(r,e=>{let t=e.asset.id;i?i.find(e=>t===e)&&n(e):e.asset.realm===iI.displayRealm&&n(e)}),this._assetEventPromise.then(()=>{try{if(i&&t){let e={messageID:"read-assets:"+i.join(",")+":"+r,eventType:"read-assets",assetQuery:{ids:i}};this.sendEventWithReply(e).then(e=>{e.assets&&this._assetEventCallbackMap.has(r)&&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),r&&this.unsubscribe(r),t}return r})})}subscribeAttributeEvents(e,t,n){return nG(this,void 0,void 0,function*(){let i=e&&"string"!=typeof e[0],r=i?e.map(e=>e.id):e,o=i?e:void 0,a="AttributeEvent"+nJ._subscriptionCounter++;if(!this._attributeEventPromise){let e;iI.authenticated||(e={filterType:"asset",realm:iI.displayRealm});let t={eventType:"attribute",filter:e};this._attributeEventPromise=this.subscribe(t,e=>{this._attributeEventCallbackMap.forEach(t=>t(e))})}let s=t=>{let o=t.ref;i?e.forEach(e=>{o.id===e.id&&o.name===e.name&&n(t)}):r?r.find(e=>o.id===e)&&n(t):t.realm===iI.displayRealm&&n(t)};return this._attributeEventCallbackMap.set(a,s),this._attributeEventPromise.then(()=>{try{if(t&&r){let e={messageID:"read-assets:"+r.join(",")+":"+a,eventType:"read-assets",assetQuery:{ids:r}};this.sendEventWithReply(e).then(e=>{e.assets&&this._attributeEventCallbackMap.has(a)&&e.assets.forEach(e=>{e.attributes&&Object.entries(e.attributes).forEach(([t,n])=>{(!o||o.find(n=>n.id===e.id&&n.name===t))&&s({eventType:"attribute",timestamp:n.timestamp,value:n.value,ref:{id:e.id,name:t}})})})})}}catch(t){throw console.error("Failed to subscribe to asset events for assets: "+e),a&&this.unsubscribe(a),t}return a})})}_processNextSubscription(){this._status===li.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===li.CONNECTED&&this._onStatusChanged(li.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(li.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<nQ.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(nQ.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}nJ.MIN_RECONNECT_DELAY=0,nJ.MAX_RECONNECT_DELAY=3e4,nJ._subscriptionCounter=0;class nQ extends nJ{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="+iI.config.realm;return iI.authenticated&&(e+="&Authorization="+iI.getAuthorizationHeader()),this._webSocket=new WebSocket(e),this._connectDeferred=new tq,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(nq)){let e=JSON.parse(t.substring(nq.length)),n=this._subscribeDeferred;this._subscribeDeferred=null,n&&n.resolve(e.subscriptionId)}else if(t.startsWith(nK)){let e=JSON.parse(t.substring(nK.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(nX)){let e=JSON.parse(t.substring(nX.length));e.events&&e.events.forEach(t=>{this._onMessageReceived(e.subscriptionId,t)})}else if(t.startsWith(nZ)){let e=JSON.parse(t.substring(nZ.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 tq,e.subscriptionId||(e.subscriptionId=nQ._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=nZ+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 tq;return this._repliesDeferred.set(e.messageID,t),this._webSocket.send(nZ+JSON.stringify(e)),t.promise}}function n0(e){return(n0="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)}nQ._subscriptionCounter=1;var n1=[],n2=n1.forEach,n5=n1.slice;function n3(e){return n2.call(n5.call(arguments,1),function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e}function n4(){return"function"==typeof XMLHttpRequest||("undefined"==typeof XMLHttpRequest?"undefined":n0(XMLHttpRequest))==="object"}var n6=n(46850),n8=n.t(n6,2);function n7(e){return(n7="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&&(lr="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),n4()&&("undefined"!=typeof global&&global.XMLHttpRequest?lo=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(lo=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?la=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(la=window.ActiveXObject)),lr||!n8||lo||la||(lr=n6||n8),"function"!=typeof lr&&(lr=void 0);var n9=function(e,t){if(t&&"object"===n7(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},ie=function(e,t,n){lr(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)},it=!1,ii=function(e,t,n,i){e.queryStringParams&&(t=n9(t,e.queryStringParams));var r=n3({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);n&&(r["Content-Type"]="application/json");var o="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,a=n3({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:r},it?{}:o);try{ie(t,a,i)}catch(e){if(!o||0===Object.keys(o).length||!e.message||0>e.message.indexOf("not implemented"))return i(e);try{Object.keys(o).forEach(function(e){delete a[e]}),ie(t,a,i),it=!0}catch(e){i(e)}}},ir=function(e,t,n,i){n&&"object"===n7(n)&&(n=n9("",n).slice(1)),e.queryStringParams&&(t=n9(t,e.queryStringParams));try{(r=lo?new lo:new la("MSXML2.XMLHTTP.3.0")).open(n?"POST":"GET",t,1),e.crossDomain||r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r.withCredentials=!!e.withCredentials,n&&r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.overrideMimeType&&r.overrideMimeType("application/json");var r,o=e.customHeaders;if(o="function"==typeof o?o():o)for(var a in o)r.setRequestHeader(a,o[a]);r.onreadystatechange=function(){r.readyState>3&&i(r.status>=400?r.statusText:null,{status:r.status,data:r.responseText})},r.send(n)}catch(e){console&&console.log(e)}};let io=function(e,t,n,i){return("function"==typeof n&&(i=n,n=void 0),i=i||function(){},lr)?ii(e,t,n,i):n4()||"function"==typeof ActiveXObject?ir(e,t,n,i):void i(Error("No fetch and no xhr implementation found!"))};var ia=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=n3(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,r;return i={},r=n||"",t in i?Object.defineProperty(i,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[t]=r,i},request:io,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,r){var o,a,s=this,l=this.options.loadPath;"function"==typeof this.options.loadPath&&(l=this.options.loadPath(e,n)),(l=(a=o=l)&&"function"==typeof a.then?o:Promise.resolve(o)).then(function(o){if(!o)return r(null,{});var a=s.services.interpolator.interpolate(o,{lng:e.join("+"),ns:n.join("+")});s.loadUrl(a,r,t,i)})}},{key:"loadUrl",value:function(e,t,n,i){var r=this;this.options.request(this.options,e,void 0,function(o,a){var s,l;if(a&&(a.status>=500&&a.status<600||!a.status))return t("failed loading "+e+"; status code: "+a.status,!0);if(a&&a.status>=400&&a.status<500)return t("failed loading "+e+"; status code: "+a.status,!1);if(!a&&o&&o.message&&o.message.indexOf("Failed to fetch")>-1)return t("failed loading "+e+": "+o.message,!0);if(o)return t(o,!1);try{s="string"==typeof a.data?r.options.parse(a.data,n,i):a.data}catch(t){l="failed parsing "+e+" to json"}if(l)return t(l,!1);t(null,s)})}},{key:"create",value:function(e,t,n,i,r){var o=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var a=this.options.parsePayload(t,n,i),s=0,l=[],c=[];e.forEach(function(n){var i=o.options.addPath;"function"==typeof o.options.addPath&&(i=o.options.addPath(n,t));var d=o.services.interpolator.interpolate(i,{lng:n,ns:t});o.options.request(o.options,d,a,function(t,n){s+=1,l.push(t),c.push(n),s===e.length&&r&&r(l,c)})})}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,i=t.languageUtils,r=t.logger,o=n.language;if(!o||"cimode"!==o.toLowerCase()){var a=[],s=function(e){i.toResolveHierarchy(e).forEach(function(e){0>a.indexOf(e)&&a.push(e)})};s(o),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return s(e)}),a.forEach(function(t){e.allOptions.ns.forEach(function(e){n.read(t,e,"read",null,null,function(i,o){i&&r.warn("loading namespace ".concat(e," for language ").concat(t," failed"),i),!i&&o&&r.log("loaded namespace ".concat(e," for language ").concat(t),o),n.loaded("".concat(t,"|").concat(e),i,o)})})})}}}],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}();ia.type="backend";class is extends ek{constructor(e){if(super(e),this.it=Z,e.type!==ew.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===Z||null==e)return this._t=void 0,this.it=e;if(e===X)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:[]}}}is.directiveName="unsafeHTML",is.resultType=1,eF(is);class il extends is{}il.directiveName="unsafeSVG",il.resultType=2;let ic=eF(il),id={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 iu=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};let ih=n(7319);class im extends CustomEvent{constructor(){super(im.NAME,{bubbles:!0,composed:!0})}}im.NAME="or-iconset-added";let ip=new class{constructor(){this._icons={}}addIconSet(e,t){this._icons[e]=t,this._defaultIconSet||(this._defaultIconSet=t),t.onAdd&&t.onAdd(),window.dispatchEvent(new im)}getIconSet(e){return this._icons[e]}getIconTemplate(e){if(!e)return K``;let t=(e||"").split(":"),n=t.pop(),i=t.pop(),r=this._defaultIconSet;return(i&&(r=this.getIconSet(i)),n&&r)?r.getIconTemplate(n):K``}},ig=class extends em{constructor(){super(...arguments),this._handler=e=>{this._updateIcon()}}static get styles(){return[u`
68
+ `,tz([eb({type:String})],tj.prototype,"value",void 0),tz([eb({type:Object})],tj.prototype,"options",void 0),tj=tz([ep("or-translate")],tj),function(e){e.CREATE="CREATE",e.UPDATE="UPDATE",e.DELETE="DELETE"}(sr||(sr={})),function(e){e.LOW="LOW",e.MEDIUM="MEDIUM",e.HIGH="HIGH"}(so||(so={})),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"}(sa||(sa={})),function(e){e.OPEN="OPEN",e.ACKNOWLEDGED="ACKNOWLEDGED",e.IN_PROGRESS="IN_PROGRESS",e.RESOLVED="RESOLVED",e.CLOSED="CLOSED"}(ss||(ss={})),function(e){e.BOTTOM_LEFT="BOTTOM_LEFT",e.BOTTOM_RIGHT="BOTTOM_RIGHT",e.TOP_LEFT="TOP_LEFT",e.TOP_RIGHT="TOP_RIGHT"}(sl||(sl={})),function(e){e.CREATE="CREATE",e.READ="READ",e.UPDATE="UPDATE",e.DELETE="DELETE"}(sc||(sc={})),function(e){e.NONE="NONE",e.FORECAST="FORECAST",e.SETPOINT="SETPOINT"}(sd||(sd={})),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"}(su||(su={})),function(e){e.EV="EV",e.PHEV="PHEV"}(sh||(sh={})),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"}(sm||(sm={})),function(e){e.SOUTH="SOUTH",e.EAST_WEST="EAST_WEST"}(sf||(sf={})),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"}(sp||(sp={})),function(e){e.TOGGLE="TOGGLE",e.INCREMENT="INCREMENT",e.DECREMENT="DECREMENT",e.NEGATE="NEGATE"}(sg||(sg={})),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"}(sb||(sb={})),function(e){e.PUBLIC="PUBLIC",e.SHARED="SHARED",e.PRIVATE="PRIVATE"}(s_||(s_={})),function(e){e.OFF="OFF",e.ONE_MIN="ONE_MIN",e.FIVE_MIN="FIVE_MIN",e.QUARTER="QUARTER",e.ONE_HOUR="ONE_HOUR"}(sy||(sy={})),function(e){e.WRAP_TO_SINGLE_COLUMN="WRAP_TO_SINGLE_COLUMN",e.KEEP_LAYOUT="KEEP_LAYOUT",e.REDIRECT="REDIRECT",e.BLOCK_DEVICE="BLOCK_DEVICE"}(sv||(sv={})),function(e){e.MINUTE="MINUTE",e.HOUR="HOUR",e.DAY="DAY",e.WEEK="WEEK",e.MONTH="MONTH",e.YEAR="YEAR"}(sx||(sx={})),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"}(sw||(sw={})),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"}(sF||(sF={})),function(e){e.HTTPS="HTTPS",e.HTTP="HTTP",e.TCP="TCP"}(sk||(sk={})),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.OPTIONS="OPTIONS",e.PATCH="PATCH"}(sE||(sE={})),function(e){e.KEYCLOAK="KEYCLOAK",e.BASIC="BASIC",e.NONE="NONE"}(sA||(sA={})),function(e){e.WEBSOCKET="WEBSOCKET",e.POLLING="POLLING"}(sC||(sC={})),function(e){e.VECTOR="VECTOR",e.RASTER="RASTER"}(sT||(sT={})),function(e){e.INTERNAL="INTERNAL",e.CLIENT="CLIENT",e.GLOBAL_RULESET="GLOBAL_RULESET",e.REALM_RULESET="REALM_RULESET",e.ASSET_RULESET="ASSET_RULESET"}(sS||(sS={})),function(e){e.REALM="REALM",e.USER="USER",e.ASSET="ASSET",e.CUSTOM="CUSTOM"}(sM||(sM={})),function(e){e.NORMAL="NORMAL",e.HIGH="HIGH"}(sL||(sL={})),function(e){e.DEVICE="DEVICE",e.TOPIC="TOPIC",e.CONDITION="CONDITION"}(sD||(sD={})),function(e){e.ALWAYS="ALWAYS",e.ONCE="ONCE",e.HOURLY="HOURLY",e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY",e.ANNUALLY="ANNUALLY"}(sI||(sI={})),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"}(sO||(sO={})),function(e){e.PRIVATE="PRIVATE",e.PROTECTED="PROTECTED",e.PUBLIC="PUBLIC"}(sR||(sR={})),function(e){e.EXACT="EXACT",e.BEGIN="BEGIN",e.END="END",e.CONTAINS="CONTAINS"}(sP||(sP={})),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"}(s$||(s$={})),function(e){e.CREATED_ON="CREATED_ON",e.NAME="NAME",e.ASSET_TYPE="ASSET_TYPE",e.PARENT_ID="PARENT_ID",e.REALM="REALM"}(sN||(sN={})),function(e){e.RESTRICTED="RESTRICTED",e.LINKED="LINKED",e.REALM="REALM"}(sB||(sB={})),function(e){e.AT_LEAST_ONE="AT_LEAST_ONE",e.ALL="ALL",e.NONE="NONE"}(sz||(sz={})),function(e){e.AND="AND",e.OR="OR"}(sj||(sj={})),function(e){e.CREATED_ON="CREATED_ON",e.FIRST_NAME="FIRST_NAME",e.LAST_NAME="LAST_NAME",e.USERNAME="USERNAME",e.EMAIL="EMAIL"}(sY||(sY={})),function(e){e.STOPPED="STOPPED",e.RUNNING="RUNNING",e.ERROR="ERROR"}(sH||(sH={})),function(e){e.JAVASCRIPT="JAVASCRIPT",e.GROOVY="GROOVY",e.JSON="JSON",e.FLOW="FLOW"}(sU||(sU={})),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"}(sV||(sV={})),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"}(sW||(sW={})),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"}(sG||(sG={})),function(e){e.NEW_LINE="NEW_LINE",e.SPACER="SPACER"}(sq||(sq={})),function(e){e.INPUT="INPUT",e.PROCESSOR="PROCESSOR",e.OUTPUT="OUTPUT",e.THEN="THEN"}(sK||(sK={})),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"}(sX||(sX={})),function(e){e.ADD="ADD",e.ADD_OR_REPLACE="ADD_OR_REPLACE",e.REPLACE="REPLACE",e.DELETE="DELETE",e.CLEAR="CLEAR"}(sZ||(sZ={})),function(e){e.PER_ASSET="PER_ASSET",e.GLOBAL="GLOBAL"}(sJ||(sJ={})),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.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"}(sQ||(sQ={})),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"}(s0||(s0={})),function(e){e.INFO="INFO",e.WARN="WARN",e.ERROR="ERROR"}(s1||(s1={})),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"}(s2||(s2={})),function(e){e.SECONDLY="SECONDLY",e.MINUTELY="MINUTELY",e.HOURLY="HOURLY",e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY",e.YEARLY="YEARLY"}(s5||(s5={})),function(e){e.OMIT="OMIT",e.BACKWARD="BACKWARD",e.FORWARD="FORWARD"}(s3||(s3={})),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"}(s4||(s4={})),function(e){e.SU="SU",e.MO="MO",e.TU="TU",e.WE="WE",e.TH="TH",e.FR="FR",e.SA="SA"}(s6||(s6={})),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.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.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"}(s8||(s8={})),function(e){e.SUPPORTSEXPORT="supportsExport",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.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.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.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.PANELORIENTATION="panelOrientation",e.LENGTH="length",e.USERNAMEPASSWORD="usernamePassword",e.POWERFORECAST="powerForecast",e.SETACTUALSOLARVALUEWITHFORECAST="setActualSolarValueWithForecast",e.REQUESTQUERYPARAMETERS="requestQueryParameters",e.PROXYADDRESS="proxyAddress",e.ENERGYLOCAL="energyLocal",e.ENERGYAUTARKY="energyAutarky",e.MODEL="model",e.MANUFACTURER="manufacturer",e.ONOFF="onOff",e.RESUMESESSION="resumeSession",e.TARIFFEXPORT="tariffExport",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.INCLUDEFORECASTSOLARSERVICE="includeForecastSolarService",e.REQUESTHEADERS="requestHeaders",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.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"}(s7||(s7={})),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.FORECAST="forecast",e.UNITS="units",e.USERCONNECTED="userConnected",e.ACCESSPUBLICREAD="accessPublicRead"}(s9||(s9={})),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"}(le||(le={})),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"}(lt||(lt={})),ln||(ln={});class tY{static getAssetDescriptors(){return tY._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=tY.getValueDescriptor(t)),n=t.jsonType?t:tY.getValueDescriptor(t.type)),!n&&e&&(n=tY.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,r;if(t&&"string"!=typeof t)i=t;else{let r=this.getAssetTypeInfo(e||"ThingAsset");if(!r)return[void 0,void 0];"string"==typeof t&&(i=this.getAttributeDescriptor(t,r)),!i&&n&&(i={type:n.type,name:n.name,meta:n.meta})}return i&&(r=this.getValueDescriptor(i.type)),[i,r]}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}}tY._assetTypeInfos=[],tY._metaItemDescriptors=[],tY._valueDescriptors=[],n(50488);var tH=n(33348),tU=n.n(tH),tV=n(53806),tW=n.n(tV),tG=n(92891);class tq{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 tK(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=>tK(e[n],t[n]))}return!1}function tX(e){if(null==e)return"";let t=!1;return e.split(/([A-Z]|\d)/).map((e,n,i)=>{if(!e)return e;if(!t)return t=!0,e.charAt(0).toUpperCase()+e.slice(1);if("_"===e)return" ";if(1===e.length&&e===e.toUpperCase()){let t=!i[n-1]||"_"===i[n-1],r=n+1<i.length&&i[n+1]&&"_"!==i[n+1],o=n+3>i.length||!i[n+1]&&!i[n+3];(!t||r)&&(e=" "+e),!r&&(t||o)||(e=e.toLowerCase())}return e}).join("").trim()}function tZ(e,t,n){let i="string"==typeof e?e:e.name;return t&&t.meta&&t.meta.hasOwnProperty(i)?t.meta[i]:n&&n.meta?n.meta[i]:void 0}function tJ(e,t){let n="string"==typeof e?tY.getMetaItemDescriptor(e):e;return n?{name:n.name,type:n.type,value:t}:{name:typeof e,type:tY.resolveValueTypeFromValue(t),value:t}}function tQ(e,t,n,i,r,o){let a=t3("label",e,t,n,r),s="";if(a||(a=tZ("label",e,t&&t.meta?t:void 0)),i&&(s=t2(t5("units",e,t,n,r))),!a){let n=e?e.name:t?"string"==typeof t?t:t.name:void 0;a=o||(n?tX(n):void 0)}return a?a+(s?" ("+s+")":""):s}function t0(e,t,n,i,r,o){let a=t1(e?e.value:void 0,()=>t5("format",e,t,n,r),void 0,o),s=t5("units",e,t,n,!0);return i&&s&&s.length&&(a=t2(t5("units",e,t,n,r),a)),a}function t1(e,t,n,i){let r="";if(null==e)r=i||"";else if("string"==typeof e)r=e;else if("number"==typeof e||"boolean"==typeof e||e instanceof Date){let i=t&&t();if(i&&0!==Object.keys(i).length)switch("number"==typeof e?i.asBoolean?e=!!e:i.asDate&&(e=new Date(e)):"boolean"==typeof e&&i.asNumber&&(e=+!!e),typeof e){case"number":r=new Intl.NumberFormat(n||tB.language,i).format(e);break;case"boolean":i.asOnOff&&(r=e?tB.t("on"):tB.t("off")),i.asOpenClosed&&(r=e?tB.t("open"):tB.t("closed")),i.asPressedReleased&&(r=e?tB.t("pressed"):tB.t("released"));break;case"object":if(i.momentJsFormat)r=tW()(e).format(i.momentJsFormat);else if(i.iso8601)r=e.toISOString();else if(i.week){var o;let t,n=((o=new Date(Date.UTC((o=e).getFullYear(),o.getMonth(),o.getDate()))).setUTCDate(o.getUTCDate()+4-(o.getUTCDay()||7)),t=new Date(Date.UTC(o.getUTCFullYear(),0,1)),Math.ceil(((o.getTime()-t.getTime())/864e5+1)/7));r="2-digit"===i.week?String(n).padStart(2,"0"):Number(n).toString(10)}else r=new Intl.DateTimeFormat(n||tB.language,i).format(e)}else r=Object(e).toString()}return r}function t2(e,t){if(!e)return"";t||(t="");let n=e.map((e,n)=>{if(3!==e.length||e.toUpperCase()!==e)return tB.t(["units."+e,"or:units."+e]);{let i=new Intl.NumberFormat(tB.language,{currency:e,style:"currency"}).formatToParts();if(0!==n||"currency"!==i[0].type)return"currency"===i[0].type?i[0].value:i[i.length-1].value;if(!t)return i[0].value;t=i[0].value+t}}).join("");return t.length>0?t+" "+n:n}function t5(e,t,n,i,r){let o,a=[],s=t3(e,t&&"string"==typeof t?t:t?t.name:n?"string"==typeof n?n:n.name:void 0,n,i,r);if(s&&(o=JSON.parse(s)))if("format"!==e)return o;else a.push(o);if(t&&t.meta&&(o=tZ(e,t,n)))if("format"!==e)return o;else a.push(o);if(n&&"string"!=typeof n&&n.hasOwnProperty(e)){if(o=n[e],"format"!==e)return o;a.push(o)}if(n&&n.type){if(o=tY.getValueDescriptor(n.type)[e],"format"!==e)return o;a.push(o)}if("format"!==e||0===a.length)return o;let l={};return a.reverse().forEach(e=>{l=Object.assign(Object.assign({},l),e)}),l}function t3(e,t,n,i,r,o){let a;if(t?a="string"==typeof t?t:t.name:n&&(a="string"==typeof n?n:n.name),!a)return;let s=[],l=e+"."+(r?"attribute":"meta")+".";if(i&&s.push(l+i+"."+a),n&&"string"!=typeof n&&(s.push(l+n.type+"."+a),s.push(l+n.type)),s.push(l+a),s.length>0)return tB.t(s,{defaultValue:o||""})}function t4(e,t){let n=t.ref.name;if(e.attributes)if(t.deleted)delete e.attributes[n];else{let i=e.attributes[n];i&&(i.value=t.value,i.timestamp=t.timestamp)}return Object.assign({},e)}var t6=function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})};let t8=n(89916);class t7{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),r=i.get("consoleName"),o=i.get("consoleVersion"),a=i.get("consolePlatform"),s=i.get("consoleProviders"),l=i.get("consoleAutoEnable"),c=s&&s.length>0?s.split(" "):["push"];this._pendingProviderEnables=c;let d=t7._createConsoleRegistration(),u=window.localStorage.getItem("OpenRemoteConsole:"+e);if(u)try{let e=JSON.parse(u);e.id&&(d.id=e.id),e.name&&(d.name=e.name),e.providers&&(d.providers=e.providers),e.apps&&(d.apps=e.apps)}catch(e){console.error("Failed to deserialise console registration")}let h=d.providers;for(let e of(d.providers={},c)){let t=h&&h.hasOwnProperty(e)?h[e]:{enabled:!1,disabled:!1};d.providers[e]=t}let m=iI.getAppName();m.length>0&&0>d.apps.indexOf(m)&&d.apps.push(m),this._registration=d,r&&(d.name=r),o&&(d.version=o),a&&(d.platform=a),l&&(this._autoEnable="TRUE"===l||"true"===l)}get registration(){return this._registration}get autoEnable(){return this._autoEnable}get pendingProviderEnables(){return this._pendingProviderEnables.slice(0)}get shellApple(){let e=navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform:navigator.platform;return e&&("iP"===e.substring(0,2)||"Mac"===e.substring(0,3))&&window.webkit&&window.webkit.messageHandlers}get shellAndroid(){return!!window.MobileInterface}get isMobile(){return this.shellApple||this.shellAndroid}initialise(){return t6(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 t6(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 t6(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 r=this._pendingProviderEnables.indexOf(e);return r>=0&&(this._pendingProviderEnables.splice(r,1),0===this._pendingProviderEnables.length&&(this.sendRegistration(),this._callCompletedCallback())),i})}disableProvider(e){return t6(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 t6(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 tq,r=()=>{delete this._pendingProviderPromises[n],i.reject("No response from provider")};return this._pendingProviderPromises[n]=[i,window.setTimeout(r,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={}),iI.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 t6(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,r=this._pendingProviderPromises[n+i];r&&(window.clearTimeout(r[1]),delete this._pendingProviderPromises[n+i],r[0].resolve(t));let o=this._providerMessageListeners[n+i];o&&o(t)}_callCompletedCallback(){let e=this._enableCompleteCallback;this._enableCompleteCallback=null,e&&window.setTimeout(()=>{e()},0)}static _createConsoleRegistration(){return{name:t8.name,version:t8.version,platform:t8.os.toString(),apps:[],model:((t8.manufacturer?t8.manufacturer+" ":"")+(t8.product?t8.product:"")).trim()}}_initialiseProvider(e){return t6(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 t9=n(43653),ne=n.n(t9);class nt{constructor(e){this.httpClient=e}register(e,t){return this.httpClient.request({method:"POST",url:nw`console/register`,data:e,options:t})}}class nn{constructor(e){this.httpClient=e}getHealthStatus(e){return this.httpClient.request({method:"GET",url:nw`health`,options:e})}getInfo(e){return this.httpClient.request({method:"GET",url:nw`info`,options:e})}}class ni{constructor(e){this.httpClient=e}createProvisioningConfig(e,t){return this.httpClient.request({method:"POST",url:nw`provisioning`,data:e,options:t})}getProvisioningConfigs(e){return this.httpClient.request({method:"GET",url:nw`provisioning`,options:e})}deleteProvisioningConfig(e,t){return this.httpClient.request({method:"DELETE",url:nw`provisioning/${e}`,options:t})}updateProvisioningConfig(e,t,n){return this.httpClient.request({method:"PUT",url:nw`provisioning/${e}`,data:t,options:n})}}class nr{constructor(e){this.httpClient=e}getManagerConfig(e){return this.httpClient.request({method:"GET",url:nw`configuration/manager`,options:e})}update(e,t){return this.httpClient.request({method:"PUT",url:nw`configuration/manager`,data:e,options:t})}fileUpload(e,t,n){return this.httpClient.request({method:"POST",url:nw`configuration/manager/file`,queryParams:t,data:e,options:n})}getManagerConfigImage(e,t){return this.httpClient.request({method:"GET",url:nw`configuration/manager/image/${e}`,options:t})}}class no{constructor(e){this.httpClient=e}deleteConnections(e,t){return this.httpClient.request({method:"DELETE",url:nw`gateway/connection`,queryParams:e,options:t})}getConnections(e){return this.httpClient.request({method:"GET",url:nw`gateway/connection`,options:e})}deleteConnection(e,t){return this.httpClient.request({method:"DELETE",url:nw`gateway/connection/${e}`,options:t})}getConnection(e,t){return this.httpClient.request({method:"GET",url:nw`gateway/connection/${e}`,options:t})}setConnection(e,t,n){return this.httpClient.request({method:"PUT",url:nw`gateway/connection/${e}`,data:t,options:n})}getConnectionStatus(e,t){return this.httpClient.request({method:"GET",url:nw`gateway/status/${e}`,options:t})}}class na{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:nw`realm`,data:e,options:t})}getAll(e){return this.httpClient.request({method:"GET",url:nw`realm`,options:e})}getAccessible(e){return this.httpClient.request({method:"GET",url:nw`realm/accessible`,options:e})}delete(e,t){return this.httpClient.request({method:"DELETE",url:nw`realm/${e}`,options:t})}get(e,t){return this.httpClient.request({method:"GET",url:nw`realm/${e}`,options:t})}update(e,t,n){return this.httpClient.request({method:"PUT",url:nw`realm/${e}`,data:t,options:n})}}class ns{constructor(e){this.httpClient=e}getSettings(e){return this.httpClient.request({method:"GET",url:nw`map`,options:e})}saveSettings(e,t){return this.httpClient.request({method:"PUT",url:nw`map`,data:e,options:t})}deleteMap(e){return this.httpClient.request({method:"DELETE",url:nw`map/deleteMap`,options:e})}getCustomMapInfo(e){return this.httpClient.request({method:"GET",url:nw`map/getCustomMapInfo`,options:e})}getSettingsJs(e){return this.httpClient.request({method:"GET",url:nw`map/js`,options:e})}getTile(e,t,n,i){return this.httpClient.request({method:"GET",url:nw`map/tile/${e}/${t}/${n}`,options:i})}uploadMap(e,t){return this.httpClient.request({method:"POST",url:nw`map/upload`,queryParams:e,options:t})}}class nl{constructor(e){this.httpClient=e}getPredictedDatapoints(e,t,n,i){return this.httpClient.request({method:"POST",url:nw`asset/predicted/${e}/${t}`,data:n,options:i})}writePredictedDatapoints(e,t,n,i){return this.httpClient.request({method:"PUT",url:nw`asset/predicted/${e}/${t}`,data:n,options:i})}}class nc{constructor(e){this.httpClient=e}updateCurrentUserLocale(e,t){return this.httpClient.request({method:"PUT",url:nw`user/locale`,data:e,options:t})}query(e,t){return this.httpClient.request({method:"POST",url:nw`user/query`,data:e,options:t})}requestPasswordResetCurrent(e){return this.httpClient.request({method:"PUT",url:nw`user/request-password-reset`,options:e})}updatePasswordCurrent(e,t){return this.httpClient.request({method:"PUT",url:nw`user/reset-password`,data:e,options:t})}updateCurrent(e,t){return this.httpClient.request({method:"PUT",url:nw`user/update`,data:e,options:t})}getCurrent(e){return this.httpClient.request({method:"GET",url:nw`user/user`,options:e})}getCurrentUserRealmRoles(e){return this.httpClient.request({method:"GET",url:nw`user/userRealmRoles`,options:e})}getCurrentUserClientRoles(e,t){return this.httpClient.request({method:"GET",url:nw`user/userRoles/${e}`,options:t})}disconnectUserSession(e,t,n){return this.httpClient.request({method:"GET",url:nw`user/${e}/disconnect/${t}`,options:n})}requestPasswordReset(e,t,n){return this.httpClient.request({method:"PUT",url:nw`user/${e}/request-password-reset/${t}`,options:n})}updatePassword(e,t,n,i){return this.httpClient.request({method:"PUT",url:nw`user/${e}/reset-password/${t}`,data:n,options:i})}resetSecret(e,t,n){return this.httpClient.request({method:"GET",url:nw`user/${e}/reset-secret/${t}`,options:n})}updateRoles(e,t,n){return this.httpClient.request({method:"PUT",url:nw`user/${e}/roles`,data:t,options:n})}getUserRealmRoles(e,t,n){return this.httpClient.request({method:"GET",url:nw`user/${e}/userRealmRoles/${t}`,options:n})}updateUserRealmRoles(e,t,n,i){return this.httpClient.request({method:"PUT",url:nw`user/${e}/userRealmRoles/${t}`,data:n,options:i})}getUserClientRoles(e,t,n,i){return this.httpClient.request({method:"GET",url:nw`user/${e}/userRoles/${t}/${n}`,options:i})}updateUserClientRoles(e,t,n,i,r){return this.httpClient.request({method:"PUT",url:nw`user/${e}/userRoles/${t}/${n}`,data:i,options:r})}getUserSessions(e,t,n){return this.httpClient.request({method:"GET",url:nw`user/${e}/userSessions/${t}`,options:n})}create(e,t,n){return this.httpClient.request({method:"POST",url:nw`user/${e}/users`,data:t,options:n})}update(e,t,n){return this.httpClient.request({method:"PUT",url:nw`user/${e}/users`,data:t,options:n})}delete(e,t,n){return this.httpClient.request({method:"DELETE",url:nw`user/${e}/users/${t}`,options:n})}getClientRoles(e,t,n){return this.httpClient.request({method:"GET",url:nw`user/${e}/${t}/roles`,options:n})}updateClientRoles(e,t,n,i){return this.httpClient.request({method:"PUT",url:nw`user/${e}/${t}/roles`,data:n,options:i})}get(e,t,n){return this.httpClient.request({method:"GET",url:nw`user/${e}/${t}`,options:n})}}class nd{constructor(e){this.httpClient=e}getDatapointExport(e,t){return this.httpClient.request({method:"GET",url:nw`asset/datapoint/export`,queryParams:e,options:t})}getDatapointPeriod(e,t){return this.httpClient.request({method:"GET",url:nw`asset/datapoint/periods`,queryParams:e,options:t})}getDatapoints(e,t,n,i){return this.httpClient.request({method:"POST",url:nw`asset/datapoint/${e}/${t}`,data:n,options:i})}}class nu{constructor(e){this.httpClient=e}createAlarm(e,t,n){return this.httpClient.request({method:"POST",url:nw`alarm`,queryParams:t,data:e,options:n})}getAlarms(e,t){return this.httpClient.request({method:"GET",url:nw`alarm`,queryParams:e,options:t})}removeAlarms(e,t){return this.httpClient.request({method:"DELETE",url:nw`alarm`,data:e,options:t})}setAssetLinks(e,t){return this.httpClient.request({method:"PUT",url:nw`alarm/assets`,data:e,options:t})}getAlarm(e,t){return this.httpClient.request({method:"GET",url:nw`alarm/${e}`,options:t})}removeAlarm(e,t){return this.httpClient.request({method:"DELETE",url:nw`alarm/${e}`,options:t})}updateAlarm(e,t,n){return this.httpClient.request({method:"PUT",url:nw`alarm/${e}`,data:t,options:n})}getAssetLinks(e,t,n){return this.httpClient.request({method:"GET",url:nw`alarm/${e}/assets`,queryParams:t,options:n})}}class nh{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:nw`dashboard`,data:e,options:t})}update(e,t){return this.httpClient.request({method:"PUT",url:nw`dashboard`,data:e,options:t})}getAllRealmDashboards(e,t){return this.httpClient.request({method:"GET",url:nw`dashboard/all/${e}`,options:t})}query(e,t){return this.httpClient.request({method:"POST",url:nw`dashboard/query`,data:e,options:t})}delete(e,t,n){return this.httpClient.request({method:"DELETE",url:nw`dashboard/${e}/${t}`,options:n})}get(e,t,n){return this.httpClient.request({method:"GET",url:nw`dashboard/${e}/${t}`,options:n})}}class nm{constructor(e){this.httpClient=e}create(e,t){return this.httpClient.request({method:"POST",url:nw`asset`,data:e,options:t})}delete(e,t){return this.httpClient.request({method:"DELETE",url:nw`asset`,queryParams:e,options:t})}writeAttributeValues(e,t){return this.httpClient.request({method:"PUT",url:nw`asset/attributes`,data:e,options:t})}writeAttributeEvents(e,t){return this.httpClient.request({method:"PUT",url:nw`asset/attributes/timestamp`,data:e,options:t})}updateNoneParent(e,t){return this.httpClient.request({method:"DELETE",url:nw`asset/parent`,queryParams:e,options:t})}getPartial(e,t){return this.httpClient.request({method:"GET",url:nw`asset/partial/${e}`,options:t})}queryAssets(e,t){return this.httpClient.request({method:"POST",url:nw`asset/query`,data:e,options:t})}getCurrentUserAssets(e){return this.httpClient.request({method:"GET",url:nw`asset/user/current`,options:e})}createUserAssetLinks(e,t){return this.httpClient.request({method:"POST",url:nw`asset/user/link`,data:e,options:t})}getUserAssetLinks(e,t){return this.httpClient.request({method:"GET",url:nw`asset/user/link`,queryParams:e,options:t})}deleteUserAssetLinks(e,t){return this.httpClient.request({method:"POST",url:nw`asset/user/link/delete`,data:e,options:t})}deleteAllUserAssetLinks(e,t,n){return this.httpClient.request({method:"DELETE",url:nw`asset/user/link/${e}/${t}`,options:n})}deleteUserAssetLink(e,t,n,i){return this.httpClient.request({method:"DELETE",url:nw`asset/user/link/${e}/${t}/${n}`,options:i})}get(e,t){return this.httpClient.request({method:"GET",url:nw`asset/${e}`,options:t})}update(e,t,n){return this.httpClient.request({method:"PUT",url:nw`asset/${e}`,data:t,options:n})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName(e,t,n,i){return this.httpClient.request({method:"PUT",url:nw`asset/${e}/attribute/${t}`,data:n,options:i})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName_timestamp(e,t,n,i,r){return this.httpClient.request({method:"PUT",url:nw`asset/${e}/attribute/${t}/${n}`,data:i,options:r})}updateParent(e,t,n){return this.httpClient.request({method:"PUT",url:nw`asset/${e}/child`,queryParams:t,options:n})}}class nf{constructor(e){this.httpClient=e}doProtocolAssetDiscovery(e,t,n){return this.httpClient.request({method:"GET",url:nw`agent/assetDiscovery/${e}`,queryParams:t,options:n})}doProtocolAssetImport(e,t,n,i){return this.httpClient.request({method:"POST",url:nw`agent/assetImport/${e}`,queryParams:n,data:t,options:i})}doProtocolInstanceDiscovery(e,t,n){return this.httpClient.request({method:"GET",url:nw`agent/instanceDiscovery/${e}`,queryParams:t,options:n})}}class np{constructor(e){this.httpClient=e}getAssetDescriptors(e,t){return this.httpClient.request({method:"GET",url:nw`model/assetDescriptors`,queryParams:e,options:t})}getAssetInfo(e,t,n){return this.httpClient.request({method:"GET",url:nw`model/assetInfo/${e}`,queryParams:t,options:n})}getAssetInfos(e,t){return this.httpClient.request({method:"GET",url:nw`model/assetInfos`,queryParams:e,options:t})}getMetaItemDescriptors(e,t){return this.httpClient.request({method:"GET",url:nw`model/metaItemDescriptors`,queryParams:e,options:t})}getValueDescriptors(e,t){return this.httpClient.request({method:"GET",url:nw`model/valueDescriptors`,queryParams:e,options:t})}}class ng{constructor(e){this.httpClient=e}createGlobalRuleset(e,t){return this.httpClient.request({method:"POST",url:nw`rules`,data:e,options:t})}getGlobalRulesets(e,t){return this.httpClient.request({method:"GET",url:nw`rules`,queryParams:e,options:t})}createAssetRuleset(e,t){return this.httpClient.request({method:"POST",url:nw`rules/asset`,data:e,options:t})}getAssetRulesets(e,t,n){return this.httpClient.request({method:"GET",url:nw`rules/asset/for/${e}`,queryParams:t,options:n})}deleteAssetRuleset(e,t){return this.httpClient.request({method:"DELETE",url:nw`rules/asset/${e}`,options:t})}getAssetRuleset(e,t){return this.httpClient.request({method:"GET",url:nw`rules/asset/${e}`,options:t})}updateAssetRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:nw`rules/asset/${e}`,data:t,options:n})}getAssetGeofences(e,t){return this.httpClient.request({method:"GET",url:nw`rules/geofences/${e}`,options:t})}getAssetEngineInfo(e,t){return this.httpClient.request({method:"GET",url:nw`rules/info/asset/${e}`,options:t})}getGlobalEngineInfo(e){return this.httpClient.request({method:"GET",url:nw`rules/info/global`,options:e})}getRealmEngineInfo(e,t){return this.httpClient.request({method:"GET",url:nw`rules/info/realm/${e}`,options:t})}createRealmRuleset(e,t){return this.httpClient.request({method:"POST",url:nw`rules/realm`,data:e,options:t})}getRealmRulesets(e,t,n){return this.httpClient.request({method:"GET",url:nw`rules/realm/for/${e}`,queryParams:t,options:n})}deleteRealmRuleset(e,t){return this.httpClient.request({method:"DELETE",url:nw`rules/realm/${e}`,options:t})}getRealmRuleset(e,t){return this.httpClient.request({method:"GET",url:nw`rules/realm/${e}`,options:t})}updateRealmRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:nw`rules/realm/${e}`,data:t,options:n})}deleteGlobalRuleset(e,t){return this.httpClient.request({method:"DELETE",url:nw`rules/${e}`,options:t})}getGlobalRuleset(e,t){return this.httpClient.request({method:"GET",url:nw`rules/${e}`,options:t})}updateGlobalRuleset(e,t,n){return this.httpClient.request({method:"PUT",url:nw`rules/${e}`,data:t,options:n})}}class nb{constructor(e){this.httpClient=e}getAllNodeDefinitions(e){return this.httpClient.request({method:"GET",url:nw`flow`,options:e})}getNodeDefinition(e,t){return this.httpClient.request({method:"GET",url:nw`flow/${e}`,options:t})}getAllNodeDefinitionsByType(e,t){return this.httpClient.request({method:"GET",url:nw`flow/${e}`,options:t})}}class n_{constructor(e){this.httpClient=e}getNotifications(e,t){return this.httpClient.request({method:"GET",url:nw`notification`,queryParams:e,options:t})}removeNotifications(e,t){return this.httpClient.request({method:"DELETE",url:nw`notification`,queryParams:e,options:t})}sendNotification(e,t){return this.httpClient.request({method:"POST",url:nw`notification/alert`,data:e,options:t})}removeNotification(e,t){return this.httpClient.request({method:"DELETE",url:nw`notification/${e}`,options:t})}notificationAcknowledged(e,t,n,i){return this.httpClient.request({method:"PUT",url:nw`notification/${e}/acknowledged`,queryParams:n,data:t,options:i})}notificationDelivered(e,t,n){return this.httpClient.request({method:"PUT",url:nw`notification/${e}/delivered`,queryParams:t,options:n})}}class ny{constructor(e){this.httpClient=e}getApps(e){return this.httpClient.request({method:"GET",url:nw`apps`,options:e})}getConsoleConfig(e){return this.httpClient.request({method:"GET",url:nw`apps/consoleConfig`,options:e})}getAppInfos(e){return this.httpClient.request({method:"GET",url:nw`apps/info`,options:e})}}class nv{constructor(e){this.httpClient=e}getConfig(e){return this.httpClient.request({method:"GET",url:nw`syslog/config`,options:e})}updateConfig(e,t){return this.httpClient.request({method:"PUT",url:nw`syslog/config`,data:e,options:t})}clearEvents(e){return this.httpClient.request({method:"DELETE",url:nw`syslog/event`,options:e})}getEvents(e,t){return this.httpClient.request({method:"GET",url:nw`syslog/event`,queryParams:e,options:t})}}class nx{constructor(e){this.httpClient=e}startTunnel(e,t){return this.httpClient.request({method:"POST",url:nw`gateway/tunnel`,data:e,options:t})}stopTunnel(e,t){return this.httpClient.request({method:"DELETE",url:nw`gateway/tunnel`,data:e,options:t})}getAllActiveTunnelInfos(e,t){return this.httpClient.request({method:"GET",url:nw`gateway/tunnel/${e}`,options:t})}getGatewayActiveTunnelInfos(e,t,n){return this.httpClient.request({method:"GET",url:nw`gateway/tunnel/${e}/${t}`,options:n})}getActiveTunnelInfo(e,t,n,i,r){return this.httpClient.request({method:"GET",url:nw`gateway/tunnel/${e}/${t}/${n}/${i}`,options:r})}}function nw(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 nF{constructor(e,t=ne().create()){this._consoleResource=new nE(e,t),this._statusResource=new nA(e,t),this._provisioningResource=new nC(e,t),this._configurationResource=new nT(e,t),this._gatewayClientResource=new nS(e,t),this._realmResource=new nM(e,t),this._mapResource=new nL(e,t),this._assetPredictedDatapointResource=new nD(e,t),this._userResource=new nI(e,t),this._assetDatapointResource=new nO(e,t),this._alarmResource=new nR(e,t),this._dashboardResource=new nP(e,t),this._assetResource=new n$(e,t),this._agentResource=new nN(e,t),this._assetModelResource=new nB(e,t),this._rulesResource=new nz(e,t),this._flowResource=new nj(e,t),this._notificationResource=new nY(e,t),this._appResource=new nH(e,t),this._syslogResource=new nU(e,t),this._gatewayServiceResource=new nV(e,t),this._assetResource=new n$(e,t)}get ConsoleResource(){return this._consoleResource}get StatusResource(){return this._statusResource}get ProvisioningResource(){return this._provisioningResource}get ConfigurationResource(){return this._configurationResource}get GatewayClientResource(){return this._gatewayClientResource}get RealmResource(){return this._realmResource}get MapResource(){return this._mapResource}get AssetPredictedDatapointResource(){return this._assetPredictedDatapointResource}get UserResource(){return this._userResource}get AssetDatapointResource(){return this._assetDatapointResource}get AlarmResource(){return this._alarmResource}get DashboardResource(){return this._dashboardResource}get AssetResource(){return this._assetResource}get AgentResource(){return this._agentResource}get AssetModelResource(){return this._assetModelResource}get RulesResource(){return this._rulesResource}get FlowResource(){return this._flowResource}get NotificationResource(){return this._notificationResource}get AppResource(){return this._appResource}get SyslogResource(){return this._syslogResource}get GatewayServiceResource(){return this._gatewayServiceResource}}class nk{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 nE extends nt{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nA extends nn{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nC extends ni{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nT extends nr{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nS extends no{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nM extends na{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nL extends ns{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nD extends nl{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nI extends nc{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nO extends nd{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nR extends nu{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nP extends nh{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class n$ extends nm{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nN extends nf{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nB extends np{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nz extends ng{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nj extends nb{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nY extends n_{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nH extends ny{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nU extends nv{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}class nV extends nx{constructor(e,t=ne().create()){t.defaults.baseURL=e,super(new nk(t))}}ne().isAxiosError;let nW=new class{get api(){return this._client}constructor(){this._axiosInstance=ne().create(),this._axiosInstance.defaults.headers.common["Content-Type"]="application/json",this._axiosInstance.interceptors.request.use(e=>(e.paramsSerializer=e=>tU().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 nF(e,this._axiosInstance)}};var nG=function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})};!function(e){e.DISCONNECTED="DISCONNECTED",e.CONNECTED="CONNECTED",e.CONNECTING="CONNECTING"}(li||(li={}));let nq="SUBSCRIBED:",nK="UNAUTHORIZED:",nX="TRIGGERED:",nZ="EVENT:";class nJ{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=nQ.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=li.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===li.CONNECTED)?Promise.resolve(!0):(this._disconnectRequested=!1,this._connectingDeferred||(this._onStatusChanged(li.CONNECTING),this._connectingDeferred=new tq,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=nQ.MIN_RECONNECT_DELAY,this._onStatusChanged(li.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!==li.DISCONNECTED&&this._doDisconnect())}subscribe(e,t){let n={eventSubscription:e,callback:t,deferred:new tq};return null!=this._pendingSubscription||this._status!==li.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 nG(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===li.CONNECTED&&this._doSend(e)}sendEventWithReply(e){return this._status!==li.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(e)}subscribeAssetEvents(e,t,n){return nG(this,void 0,void 0,function*(){let i=e&&"string"!=typeof e[0]?e.map(e=>e.id):e,r="AssetEvent"+nJ._subscriptionCounter++;if(!this._assetEventPromise){let e;iI.authenticated||(e={filterType:"asset",realm:iI.displayRealm});let t={eventType:"asset",filter:e};this._assetEventPromise=this.subscribe(t,e=>{this._assetEventCallbackMap.forEach(t=>t(e))})}return this._assetEventCallbackMap.set(r,e=>{let t=e.asset.id;i?i.find(e=>t===e)&&n(e):e.asset.realm===iI.displayRealm&&n(e)}),this._assetEventPromise.then(()=>{try{if(i&&t){let e={messageID:"read-assets:"+i.join(",")+":"+r,eventType:"read-assets",assetQuery:{ids:i}};this.sendEventWithReply(e).then(e=>{e.assets&&this._assetEventCallbackMap.has(r)&&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),r&&this.unsubscribe(r),t}return r})})}subscribeAttributeEvents(e,t,n){return nG(this,void 0,void 0,function*(){let i=e&&"string"!=typeof e[0],r=i?e.map(e=>e.id):e,o=i?e:void 0,a="AttributeEvent"+nJ._subscriptionCounter++;if(!this._attributeEventPromise){let e;iI.authenticated||(e={filterType:"asset",realm:iI.displayRealm});let t={eventType:"attribute",filter:e};this._attributeEventPromise=this.subscribe(t,e=>{this._attributeEventCallbackMap.forEach(t=>t(e))})}let s=t=>{let o=t.ref;i?e.forEach(e=>{o.id===e.id&&o.name===e.name&&n(t)}):r?r.find(e=>o.id===e)&&n(t):t.realm===iI.displayRealm&&n(t)};return this._attributeEventCallbackMap.set(a,s),this._attributeEventPromise.then(()=>{try{if(t&&r){let e={messageID:"read-assets:"+r.join(",")+":"+a,eventType:"read-assets",assetQuery:{ids:r}};this.sendEventWithReply(e).then(e=>{e.assets&&this._attributeEventCallbackMap.has(a)&&e.assets.forEach(e=>{e.attributes&&Object.entries(e.attributes).forEach(([t,n])=>{(!o||o.find(n=>n.id===e.id&&n.name===t))&&s({eventType:"attribute",timestamp:n.timestamp,value:n.value,ref:{id:e.id,name:t}})})})})}}catch(t){throw console.error("Failed to subscribe to asset events for assets: "+e),a&&this.unsubscribe(a),t}return a})})}_processNextSubscription(){this._status===li.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===li.CONNECTED&&this._onStatusChanged(li.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(li.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<nQ.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(nQ.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}nJ.MIN_RECONNECT_DELAY=0,nJ.MAX_RECONNECT_DELAY=3e4,nJ._subscriptionCounter=0;class nQ extends nJ{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="+iI.config.realm;return iI.authenticated&&(e+="&Authorization="+iI.getAuthorizationHeader()),this._webSocket=new WebSocket(e),this._connectDeferred=new tq,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(nq)){let e=JSON.parse(t.substring(nq.length)),n=this._subscribeDeferred;this._subscribeDeferred=null,n&&n.resolve(e.subscriptionId)}else if(t.startsWith(nK)){let e=JSON.parse(t.substring(nK.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(nX)){let e=JSON.parse(t.substring(nX.length));e.events&&e.events.forEach(t=>{this._onMessageReceived(e.subscriptionId,t)})}else if(t.startsWith(nZ)){let e=JSON.parse(t.substring(nZ.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 tq,e.subscriptionId||(e.subscriptionId=nQ._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=nZ+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 tq;return this._repliesDeferred.set(e.messageID,t),this._webSocket.send(nZ+JSON.stringify(e)),t.promise}}function n0(e){return(n0="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)}nQ._subscriptionCounter=1;var n1=[],n2=n1.forEach,n5=n1.slice;function n3(e){return n2.call(n5.call(arguments,1),function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e}function n4(){return"function"==typeof XMLHttpRequest||("undefined"==typeof XMLHttpRequest?"undefined":n0(XMLHttpRequest))==="object"}var n6=n(46850),n8=n.t(n6,2);function n7(e){return(n7="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&&(lr="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),n4()&&("undefined"!=typeof global&&global.XMLHttpRequest?lo=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(lo=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?la=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(la=window.ActiveXObject)),lr||!n8||lo||la||(lr=n6||n8),"function"!=typeof lr&&(lr=void 0);var n9=function(e,t){if(t&&"object"===n7(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},ie=function(e,t,n){lr(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)},it=!1,ii=function(e,t,n,i){e.queryStringParams&&(t=n9(t,e.queryStringParams));var r=n3({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);n&&(r["Content-Type"]="application/json");var o="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,a=n3({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:r},it?{}:o);try{ie(t,a,i)}catch(e){if(!o||0===Object.keys(o).length||!e.message||0>e.message.indexOf("not implemented"))return i(e);try{Object.keys(o).forEach(function(e){delete a[e]}),ie(t,a,i),it=!0}catch(e){i(e)}}},ir=function(e,t,n,i){n&&"object"===n7(n)&&(n=n9("",n).slice(1)),e.queryStringParams&&(t=n9(t,e.queryStringParams));try{(r=lo?new lo:new la("MSXML2.XMLHTTP.3.0")).open(n?"POST":"GET",t,1),e.crossDomain||r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r.withCredentials=!!e.withCredentials,n&&r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.overrideMimeType&&r.overrideMimeType("application/json");var r,o=e.customHeaders;if(o="function"==typeof o?o():o)for(var a in o)r.setRequestHeader(a,o[a]);r.onreadystatechange=function(){r.readyState>3&&i(r.status>=400?r.statusText:null,{status:r.status,data:r.responseText})},r.send(n)}catch(e){console&&console.log(e)}};let io=function(e,t,n,i){return("function"==typeof n&&(i=n,n=void 0),i=i||function(){},lr)?ii(e,t,n,i):n4()||"function"==typeof ActiveXObject?ir(e,t,n,i):void i(Error("No fetch and no xhr implementation found!"))};var ia=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=n3(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,r;return i={},r=n||"",t in i?Object.defineProperty(i,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[t]=r,i},request:io,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,r){var o,a,s=this,l=this.options.loadPath;"function"==typeof this.options.loadPath&&(l=this.options.loadPath(e,n)),(l=(a=o=l)&&"function"==typeof a.then?o:Promise.resolve(o)).then(function(o){if(!o)return r(null,{});var a=s.services.interpolator.interpolate(o,{lng:e.join("+"),ns:n.join("+")});s.loadUrl(a,r,t,i)})}},{key:"loadUrl",value:function(e,t,n,i){var r=this;this.options.request(this.options,e,void 0,function(o,a){var s,l;if(a&&(a.status>=500&&a.status<600||!a.status))return t("failed loading "+e+"; status code: "+a.status,!0);if(a&&a.status>=400&&a.status<500)return t("failed loading "+e+"; status code: "+a.status,!1);if(!a&&o&&o.message&&o.message.indexOf("Failed to fetch")>-1)return t("failed loading "+e+": "+o.message,!0);if(o)return t(o,!1);try{s="string"==typeof a.data?r.options.parse(a.data,n,i):a.data}catch(t){l="failed parsing "+e+" to json"}if(l)return t(l,!1);t(null,s)})}},{key:"create",value:function(e,t,n,i,r){var o=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var a=this.options.parsePayload(t,n,i),s=0,l=[],c=[];e.forEach(function(n){var i=o.options.addPath;"function"==typeof o.options.addPath&&(i=o.options.addPath(n,t));var d=o.services.interpolator.interpolate(i,{lng:n,ns:t});o.options.request(o.options,d,a,function(t,n){s+=1,l.push(t),c.push(n),s===e.length&&r&&r(l,c)})})}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,i=t.languageUtils,r=t.logger,o=n.language;if(!o||"cimode"!==o.toLowerCase()){var a=[],s=function(e){i.toResolveHierarchy(e).forEach(function(e){0>a.indexOf(e)&&a.push(e)})};s(o),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return s(e)}),a.forEach(function(t){e.allOptions.ns.forEach(function(e){n.read(t,e,"read",null,null,function(i,o){i&&r.warn("loading namespace ".concat(e," for language ").concat(t," failed"),i),!i&&o&&r.log("loaded namespace ".concat(e," for language ").concat(t),o),n.loaded("".concat(t,"|").concat(e),i,o)})})})}}}],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}();ia.type="backend";class is extends ek{constructor(e){if(super(e),this.it=Z,e.type!==ew.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===Z||null==e)return this._t=void 0,this.it=e;if(e===X)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:[]}}}is.directiveName="unsafeHTML",is.resultType=1,eF(is);class il extends is{}il.directiveName="unsafeSVG",il.resultType=2;let ic=eF(il),id={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 iu=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};let ih=n(7319);class im extends CustomEvent{constructor(){super(im.NAME,{bubbles:!0,composed:!0})}}im.NAME="or-iconset-added";let ip=new class{constructor(){this._icons={}}addIconSet(e,t){this._icons[e]=t,this._defaultIconSet||(this._defaultIconSet=t),t.onAdd&&t.onAdd(),window.dispatchEvent(new im)}getIconSet(e){return this._icons[e]}getIconTemplate(e){if(!e)return K``;let t=(e||"").split(":"),n=t.pop(),i=t.pop(),r=this._defaultIconSet;return(i&&(r=this.getIconSet(i)),n&&r)?r.getIconTemplate(n):K``}},ig=class extends em{constructor(){super(...arguments),this._handler=e=>{this._updateIcon()}}static get styles(){return[u`
69
69
  :host {
70
70
  --internal-or-icon-width: var(--or-icon-width, 24px);
71
71
  --internal-or-icon-height: var(--or-icon-height, 24px);
@@ -108,12 +108,12 @@ uniform ${n} ${i} u_${r};
108
108
  width: var(--internal-or-icon-width);
109
109
  height: var(--internal-or-icon-height);
110
110
  }
111
- `,u`${d(ih)}`]}render(){return this._iconTemplate||K``}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener(im.NAME,this._handler)}shouldUpdate(e){return e.has("icon")&&this._updateIcon(),!0}_updateIcon(){this._iconTemplate=void 0,window.removeEventListener(im.NAME,this._handler),this._iconTemplate=ip.getIconTemplate(this.icon),this.icon&&!this._iconTemplate&&window.addEventListener(im.NAME,this._handler)}};iu([eb({type:String,reflect:!0})],ig.prototype,"icon",void 0),iu([e_()],ig.prototype,"_iconTemplate",void 0),ig=iu([ep("or-icon")],ig);var ib=n(50921);class i_ extends Error{}function iy(e,t){let n;if("string"!=typeof e)throw new i_("Invalid token specified: must be a string");t||(t={});let i=+(!0!==t.header),r=e.split(".")[i];if("string"!=typeof r)throw new i_(`Invalid token specified: missing part #${i+1}`);try{n=function(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw Error("base64 string is not of the correct length")}try{var n;return n=t,decodeURIComponent(atob(n).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}catch(e){return atob(t)}}(r)}catch(e){throw new i_(`Invalid token specified: invalid base64 for part #${i+1} (${e.message})`)}try{return JSON.parse(n)}catch(e){throw new i_(`Invalid token specified: invalid json for part #${i+1} (${e.message})`)}}if(i_.prototype.name="InvalidTokenError","undefined"==typeof Promise)throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function iv(e){if(!(this instanceof iv))throw Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var t,n,i=this,r=[],o={enable:!0,callbackList:[],interval:5},a=document.getElementsByTagName("script"),s=0;s<a.length;s++)(-1!==a[s].src.indexOf("keycloak.js")||-1!==a[s].src.indexOf("keycloak.min.js"))&&-1!==a[s].src.indexOf("version=")&&(i.iframeVersion=a[s].src.substring(a[s].src.indexOf("version=")+8).split("&")[0]);var l=!0,c=C(console.info),d=C(console.warn);function u(e,t){for(var n=function(e){var t=null,n=window.crypto||window.msCrypto;if(n&&n.getRandomValues&&window.Uint8Array)return t=new Uint8Array(e),n.getRandomValues(t),t;t=Array(e);for(var i=0;i<t.length;i++)t[i]=Math.floor(256*Math.random());return t}(e),i=Array(e),r=0;r<e;r++)i[r]=t.charCodeAt(n[r]%t.length);return String.fromCharCode.apply(null,i)}function h(){return void 0===i.authServerUrl?void 0:"/"==i.authServerUrl.charAt(i.authServerUrl.length-1)?i.authServerUrl+"realms/"+encodeURIComponent(i.realm):i.authServerUrl+"/realms/"+encodeURIComponent(i.realm)}function m(e,t){var n=e.code,r=e.error,o=e.prompt,a=new Date().getTime();if(e.kc_action_status&&i.onActionUpdate&&i.onActionUpdate(e.kc_action_status),r){if("none"!=o)if(e.error_description&&"authentication_expired"===e.error_description)i.login(e.loginOptions);else{var s={error:r,error_description:e.error_description};i.onAuthError&&i.onAuthError(s),t&&t.setError(s)}else t&&t.setSuccess();return}if("standard"!=i.flow&&(e.access_token||e.id_token)&&m(e.access_token,null,e.id_token,!0),"implicit"!=i.flow&&n){var d="code="+n+"&grant_type=authorization_code",u=i.endpoints.token(),h=new XMLHttpRequest;h.open("POST",u,!0),h.setRequestHeader("Content-type","application/x-www-form-urlencoded"),d+="&client_id="+encodeURIComponent(i.clientId)+"&redirect_uri="+e.redirectUri,e.pkceCodeVerifier&&(d+="&code_verifier="+e.pkceCodeVerifier),h.withCredentials=!0,h.onreadystatechange=function(){if(4==h.readyState)if(200==h.status){var e=JSON.parse(h.responseText);m(e.access_token,e.refresh_token,e.id_token,"standard"===i.flow),x()}else i.onAuthError&&i.onAuthError(),t&&t.setError()},h.send(d)}function m(n,r,o,s){p(n,r,o,a=(a+new Date().getTime())/2),l&&i.idTokenParsed&&i.idTokenParsed.nonce!=e.storedNonce?(c("[KEYCLOAK] Invalid nonce, clearing token"),i.clearToken(),t&&t.setError()):s&&(i.onAuthSuccess&&i.onAuthSuccess(),t&&t.setSuccess())}}function f(e){return 0==e.status&&e.responseText&&e.responseURL.startsWith("file:")}function p(e,t,n,r){if(i.tokenTimeoutHandle&&(clearTimeout(i.tokenTimeoutHandle),i.tokenTimeoutHandle=null),t?(i.refreshToken=t,i.refreshTokenParsed=iy(t)):(delete i.refreshToken,delete i.refreshTokenParsed),n?(i.idToken=n,i.idTokenParsed=iy(n)):(delete i.idToken,delete i.idTokenParsed),e){if(i.token=e,i.tokenParsed=iy(e),i.sessionId=i.tokenParsed.sid,i.authenticated=!0,i.subject=i.tokenParsed.sub,i.realmAccess=i.tokenParsed.realm_access,i.resourceAccess=i.tokenParsed.resource_access,r&&(i.timeSkew=Math.floor(r/1e3)-i.tokenParsed.iat),null!=i.timeSkew&&(c("[KEYCLOAK] Estimated time difference between browser and server is "+i.timeSkew+" seconds"),i.onTokenExpired)){var o=(i.tokenParsed.exp-new Date().getTime()/1e3+i.timeSkew)*1e3;c("[KEYCLOAK] Token expires in "+Math.round(o/1e3)+" s"),o<=0?i.onTokenExpired():i.tokenTimeoutHandle=setTimeout(i.onTokenExpired,o)}}else delete i.token,delete i.tokenParsed,delete i.subject,delete i.realmAccess,delete i.resourceAccess,i.authenticated=!1}function g(){var e="0123456789abcdef",t=u(36,e).split("");return t[14]="4",t[19]=e.substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-",t.join("")}function b(e){var t=function(e){switch(i.flow){case"standard":t=["code","state","session_state","kc_action_status","iss"];break;case"implicit":t=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":t=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"]}t.push("error"),t.push("error_description"),t.push("error_uri");var t,n,r,o=e.indexOf("?"),a=e.indexOf("#");if("query"===i.responseMode&&-1!==o?(n=e.substring(0,o),""!==(r=_(e.substring(o+1,-1!==a?a:e.length),t)).paramsString&&(n+="?"+r.paramsString),-1!==a&&(n+=e.substring(a))):"fragment"===i.responseMode&&-1!==a&&(n=e.substring(0,a),""!==(r=_(e.substring(a+1),t)).paramsString&&(n+="#"+r.paramsString)),r&&r.oauthParams){if("standard"===i.flow||"hybrid"===i.flow){if((r.oauthParams.code||r.oauthParams.error)&&r.oauthParams.state)return r.oauthParams.newUrl=n,r.oauthParams}else if("implicit"===i.flow&&(r.oauthParams.access_token||r.oauthParams.error)&&r.oauthParams.state)return r.oauthParams.newUrl=n,r.oauthParams}}(e);if(t){var r=n.get(t.state);return r&&(t.valid=!0,t.redirectUri=r.redirectUri,t.storedNonce=r.nonce,t.prompt=r.prompt,t.pkceCodeVerifier=r.pkceCodeVerifier,t.loginOptions=r.loginOptions),t}}function _(e,t){for(var n=e.split("&"),i={paramsString:"",oauthParams:{}},r=0;r<n.length;r++){var o=n[r].indexOf("="),a=n[r].slice(0,o);-1!==t.indexOf(a)?i.oauthParams[a]=n[r].slice(o+1):(""!==i.paramsString&&(i.paramsString+="&"),i.paramsString+=n[r])}return i}function y(){var e={setSuccess:function(t){e.resolve(t)},setError:function(t){e.reject(t)}};return e.promise=new Promise(function(t,n){e.resolve=t,e.reject=n}),e}function v(){var e=y();if(!o.enable||o.iframe)return e.setSuccess(),e.promise;var t=document.createElement("iframe");o.iframe=t,t.onload=function(){var t=i.endpoints.authorize();"/"===t.charAt(0)?o.iframeOrigin=window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""):o.iframeOrigin=t.substring(0,t.indexOf("/",8)),e.setSuccess()};var n=i.endpoints.checkSessionIframe();return t.setAttribute("src",n),t.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),t.setAttribute("title","keycloak-session-iframe"),t.style.display="none",document.body.appendChild(t),window.addEventListener("message",function(e){if(e.origin===o.iframeOrigin&&o.iframe.contentWindow===e.source&&("unchanged"==e.data||"changed"==e.data||"error"==e.data)){"unchanged"!=e.data&&i.clearToken();for(var t=o.callbackList.splice(0,o.callbackList.length),n=t.length-1;n>=0;--n){var r=t[n];"error"==e.data?r.setError():r.setSuccess("unchanged"==e.data)}}},!1),e.promise}function x(){o.enable&&i.token&&setTimeout(function(){w().then(function(e){e&&x()})},1e3*o.interval)}function w(){var e=y();if(o.iframe&&o.iframeOrigin){var t=i.clientId+" "+(i.sessionId?i.sessionId:"");o.callbackList.push(e);var n=o.iframeOrigin;1==o.callbackList.length&&o.iframe.contentWindow.postMessage(t,n)}else e.setSuccess();return e.promise}function F(){var e,t,n,r=y();if(o.enable||i.silentCheckSsoRedirectUri){var a=document.createElement("iframe");a.setAttribute("src",i.endpoints.thirdPartyCookiesIframe()),a.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),a.setAttribute("title","keycloak-3p-check-iframe"),a.style.display="none",document.body.appendChild(a);var s=function(e){a.contentWindow===e.source&&("supported"===e.data||"unsupported"===e.data)&&("unsupported"===e.data&&(d("[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:\n\n - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).\n - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).\n\nFor more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers"),o.enable=!1,i.silentCheckSsoFallback&&(i.silentCheckSsoRedirectUri=!1)),document.body.removeChild(a),window.removeEventListener("message",s),r.setSuccess())};window.addEventListener("message",s,!1)}else r.setSuccess();return e=r.promise,t=i.messageReceiveTimeout,n=null,Promise.race([e,new Promise(function(e,i){n=setTimeout(function(){i({error:"Timeout when waiting for 3rd party check iframe message."})},t)})]).finally(function(){clearTimeout(n)})}function k(e){if(!e||"default"==e)return{login:function(e){return window.location.assign(i.createLoginUrl(e)),y().promise},logout:async function(e){if("GET"===(e?.logoutMethod??i.logoutMethod))return void window.location.replace(i.createLogoutUrl(e));let n=i.createLogoutUrl(e),r=await fetch(n,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({id_token_hint:i.idToken,client_id:i.clientId,post_logout_redirect_uri:t.redirectUri(e,!1)})});if(r.redirected){window.location.href=r.url;return}if(r.ok)return void window.location.reload();throw Error("Logout failed, request returned an error code.")},register:function(e){return window.location.assign(i.createRegisterUrl(e)),y().promise},accountManagement:function(){var e=i.createAccountUrl();if(void 0!==e)window.location.href=e;else throw"Not supported by the OIDC server";return y().promise},redirectUri:function(e,t){return e&&e.redirectUri?e.redirectUri:i.redirectUri?i.redirectUri:location.href}};if("cordova"==e){o.enable=!1;var n=function(e,t,n){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(e,t,n):window.open(e,t,n)},r=function(e){var t=e&&e.cordovaOptions?Object.keys(e.cordovaOptions).reduce(function(t,n){return t[n]=e.cordovaOptions[n],t},{}):{};return t.location="no",e&&"none"==e.prompt&&(t.hidden="yes"),Object.keys(t).reduce(function(e,n){return e.push(n+"="+t[n]),e},[]).join(",")},a=function(){return i.redirectUri||"http://localhost"};return{login:function(e){var t=y(),o=r(e),s=n(i.createLoginUrl(e),"_blank",o),l=!1,c=!1,d=function(){c=!0,s.close()};return s.addEventListener("loadstart",function(e){0==e.url.indexOf(a())&&(m(b(e.url),t),d(),l=!0)}),s.addEventListener("loaderror",function(e){l||(0==e.url.indexOf(a())?(m(b(e.url),t),d(),l=!0):(t.setError(),d()))}),s.addEventListener("exit",function(e){c||t.setError({reason:"closed_by_user"})}),t.promise},logout:function(e){var t,r=y(),o=n(i.createLogoutUrl(e),"_blank","location=no,hidden=yes,clearcache=yes");return o.addEventListener("loadstart",function(e){0==e.url.indexOf(a())&&o.close()}),o.addEventListener("loaderror",function(e){0==e.url.indexOf(a())||(t=!0),o.close()}),o.addEventListener("exit",function(e){t?r.setError():(i.clearToken(),r.setSuccess())}),r.promise},register:function(e){var t=y(),o=n(i.createRegisterUrl(),"_blank",r(e));return o.addEventListener("loadstart",function(e){0==e.url.indexOf(a())&&(o.close(),m(b(e.url),t))}),t.promise},accountManagement:function(){var e=i.createAccountUrl();if(void 0!==e){var t=n(e,"_blank","location=no");t.addEventListener("loadstart",function(e){0==e.url.indexOf(a())&&t.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(e){return a()}}}if("cordova-native"==e)return o.enable=!1,{login:function(e){var t=y(),n=i.createLoginUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),m(b(e.url),t)}),window.cordova.plugins.browsertab.openUrl(n),t.promise},logout:function(e){var t=y(),n=i.createLogoutUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),i.clearToken(),t.setSuccess()}),window.cordova.plugins.browsertab.openUrl(n),t.promise},register:function(e){var t=y(),n=i.createRegisterUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),m(b(e.url),t)}),window.cordova.plugins.browsertab.openUrl(n),t.promise},accountManagement:function(){var e=i.createAccountUrl();if(void 0!==e)window.cordova.plugins.browsertab.openUrl(e);else throw"Not supported by the OIDC server"},redirectUri:function(e){return e&&e.redirectUri?e.redirectUri:i.redirectUri?i.redirectUri:"http://localhost"}};throw"invalid adapter type: "+e}i.init=function(r){if(i.didInitialize)throw Error("A 'Keycloak' instance can only be initialized once.");if(i.didInitialize=!0,i.authenticated=!1,n=function(){try{return new E}catch(e){}return new A}(),t=r&&["default","cordova","cordova-native"].indexOf(r.adapter)>-1?k(r.adapter):r&&"object"==typeof r.adapter?r.adapter:window.Cordova||window.cordova?k("cordova"):k(),r){if(void 0!==r.useNonce&&(l=r.useNonce),void 0!==r.checkLoginIframe&&(o.enable=r.checkLoginIframe),r.checkLoginIframeInterval&&(o.interval=r.checkLoginIframeInterval),"login-required"===r.onLoad&&(i.loginRequired=!0),r.responseMode)if("query"===r.responseMode||"fragment"===r.responseMode)i.responseMode=r.responseMode;else throw"Invalid value for responseMode";if(r.flow){switch(r.flow){case"standard":i.responseType="code";break;case"implicit":i.responseType="id_token token";break;case"hybrid":i.responseType="code id_token token";break;default:throw"Invalid value for flow"}i.flow=r.flow}if(null!=r.timeSkew&&(i.timeSkew=r.timeSkew),r.redirectUri&&(i.redirectUri=r.redirectUri),r.silentCheckSsoRedirectUri&&(i.silentCheckSsoRedirectUri=r.silentCheckSsoRedirectUri),"boolean"==typeof r.silentCheckSsoFallback?i.silentCheckSsoFallback=r.silentCheckSsoFallback:i.silentCheckSsoFallback=!0,void 0!==r.pkceMethod){if("S256"!==r.pkceMethod&&!1!==r.pkceMethod)throw TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${r.pkceMethod}.`);i.pkceMethod=r.pkceMethod}else i.pkceMethod="S256";"boolean"==typeof r.enableLogging?i.enableLogging=r.enableLogging:i.enableLogging=!1,"POST"===r.logoutMethod?i.logoutMethod="POST":i.logoutMethod="GET","string"==typeof r.scope&&(i.scope=r.scope),"string"==typeof r.acrValues&&(i.acrValues=r.acrValues),"number"==typeof r.messageReceiveTimeout&&r.messageReceiveTimeout>0?i.messageReceiveTimeout=r.messageReceiveTimeout:i.messageReceiveTimeout=1e4}i.responseMode||(i.responseMode="fragment"),i.responseType||(i.responseType="code",i.flow="standard");var a=y(),s=y();s.promise.then(function(){i.onReady&&i.onReady(i.authenticated),a.setSuccess(i.authenticated)}).catch(function(e){a.setError(e)});var c=function(t){var n=y();function r(e){e?i.endpoints={authorize:function(){return e.authorization_endpoint},token:function(){return e.token_endpoint},logout:function(){if(!e.end_session_endpoint)throw"Not supported by the OIDC server";return e.end_session_endpoint},checkSessionIframe:function(){if(!e.check_session_iframe)throw"Not supported by the OIDC server";return e.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!e.userinfo_endpoint)throw"Not supported by the OIDC server";return e.userinfo_endpoint}}:i.endpoints={authorize:function(){return h()+"/protocol/openid-connect/auth"},token:function(){return h()+"/protocol/openid-connect/token"},logout:function(){return h()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var e=h()+"/protocol/openid-connect/login-status-iframe.html";return i.iframeVersion&&(e=e+"?version="+i.iframeVersion),e},thirdPartyCookiesIframe:function(){var e=h()+"/protocol/openid-connect/3p-cookies/step1.html";return i.iframeVersion&&(e=e+"?version="+i.iframeVersion),e},register:function(){return h()+"/protocol/openid-connect/registrations"},userinfo:function(){return h()+"/protocol/openid-connect/userinfo"}}}if(e?"string"==typeof e&&(s=e):s="keycloak.json",s){var o=new XMLHttpRequest;o.open("GET",s,!0),o.setRequestHeader("Accept","application/json"),o.onreadystatechange=function(){if(4==o.readyState)if(200==o.status||f(o)){var e=JSON.parse(o.responseText);i.authServerUrl=e["auth-server-url"],i.realm=e.realm,i.clientId=e.resource,r(null),n.setSuccess()}else n.setError()},o.send()}else{if(!e.clientId)throw"clientId missing";i.clientId=e.clientId;var a=e.oidcProvider;if(a)if("string"==typeof a){var s,l="/"==a.charAt(a.length-1)?a+".well-known/openid-configuration":a+"/.well-known/openid-configuration",o=new XMLHttpRequest;o.open("GET",l,!0),o.setRequestHeader("Accept","application/json"),o.onreadystatechange=function(){4==o.readyState&&(200==o.status||f(o)?(r(JSON.parse(o.responseText)),n.setSuccess()):n.setError())},o.send()}else r(a),n.setSuccess();else{if(!e.url){for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++)if(c[d].src.match(/.*keycloak\.js/)){e.url=c[d].src.substr(0,c[d].src.indexOf("/js/keycloak.js"));break}}if(!e.realm)throw"realm missing";i.authServerUrl=e.url,i.realm=e.realm,r(null),n.setSuccess()}}return n.promise}();function d(){var e=function(e){e||(n.prompt="none"),r&&r.locale&&(n.locale=r.locale),i.login(n).then(function(){s.setSuccess()}).catch(function(e){s.setError(e)})},t=function(){var e=document.createElement("iframe"),t=i.createLoginUrl({prompt:"none",redirectUri:i.silentCheckSsoRedirectUri});e.setAttribute("src",t),e.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),e.setAttribute("title","keycloak-silent-check-sso"),e.style.display="none",document.body.appendChild(e);var n=function(t){t.origin===window.location.origin&&e.contentWindow===t.source&&(m(b(t.data),s),document.body.removeChild(e),window.removeEventListener("message",n))};window.addEventListener("message",n)},n={};switch(r.onLoad){case"check-sso":o.enable?v().then(function(){w().then(function(n){n?s.setSuccess():i.silentCheckSsoRedirectUri?t():e(!1)}).catch(function(e){s.setError(e)})}):i.silentCheckSsoRedirectUri?t():e(!1);break;case"login-required":e(!0);break;default:throw"Invalid value for onLoad"}}function u(){var e=b(window.location.href);if(e&&window.history.replaceState(window.history.state,null,e.newUrl),e&&e.valid)return v().then(function(){m(e,s)}).catch(function(e){s.setError(e)});r?r.token&&r.refreshToken?(p(r.token,r.refreshToken,r.idToken),o.enable?v().then(function(){w().then(function(e){e?(i.onAuthSuccess&&i.onAuthSuccess(),s.setSuccess(),x()):s.setSuccess()}).catch(function(e){s.setError(e)})}):i.updateToken(-1).then(function(){i.onAuthSuccess&&i.onAuthSuccess(),s.setSuccess()}).catch(function(e){i.onAuthError&&i.onAuthError(),r.onLoad?d():s.setError(e)})):r.onLoad?d():s.setSuccess():s.setSuccess()}return c.then(function(){var e,t;(e=y(),t=function(){("interactive"===document.readyState||"complete"===document.readyState)&&(document.removeEventListener("readystatechange",t),e.setSuccess())},document.addEventListener("readystatechange",t),t(),e.promise).then(F).then(u).catch(function(e){a.setError(e)})}),c.catch(function(e){a.setError(e)}),a.promise},i.login=function(e){return t.login(e)},i.createLoginUrl=function(e){var r,o=g(),a=g(),s=t.redirectUri(e),c={state:o,nonce:a,redirectUri:encodeURIComponent(s),loginOptions:e};e&&e.prompt&&(c.prompt=e.prompt),r=e&&"register"==e.action?i.endpoints.register():i.endpoints.authorize();var d=e&&e.scope||i.scope;d?-1===d.indexOf("openid")&&(d="openid "+d):d="openid";var h=r+"?client_id="+encodeURIComponent(i.clientId)+"&redirect_uri="+encodeURIComponent(s)+"&state="+encodeURIComponent(o)+"&response_mode="+encodeURIComponent(i.responseMode)+"&response_type="+encodeURIComponent(i.responseType)+"&scope="+encodeURIComponent(d);if(l&&(h=h+"&nonce="+encodeURIComponent(a)),e&&e.prompt&&(h+="&prompt="+encodeURIComponent(e.prompt)),e&&e.maxAge&&(h+="&max_age="+encodeURIComponent(e.maxAge)),e&&e.loginHint&&(h+="&login_hint="+encodeURIComponent(e.loginHint)),e&&e.idpHint&&(h+="&kc_idp_hint="+encodeURIComponent(e.idpHint)),e&&e.action&&"register"!=e.action&&(h+="&kc_action="+encodeURIComponent(e.action)),e&&e.locale&&(h+="&ui_locales="+encodeURIComponent(e.locale)),e&&e.acr&&(h+="&claims="+encodeURIComponent(JSON.stringify({id_token:{acr:e.acr}}))),(e&&e.acrValues||i.acrValues)&&(h+="&acr_values="+encodeURIComponent(e.acrValues||i.acrValues)),i.pkceMethod){var m=u(96,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");c.pkceCodeVerifier=m,h+="&code_challenge="+function(e,t){if("S256"!==e)throw TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${e}'.`);return btoa(String.fromCodePoint(...new Uint8Array(ib.arrayBuffer(t)))).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}(i.pkceMethod,m)+"&code_challenge_method="+i.pkceMethod}return n.add(c),h},i.logout=function(e){return t.logout(e)},i.createLogoutUrl=function(e){if("POST"===(e?.logoutMethod??i.logoutMethod))return i.endpoints.logout();var n=i.endpoints.logout()+"?client_id="+encodeURIComponent(i.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(t.redirectUri(e,!1));return i.idToken&&(n+="&id_token_hint="+encodeURIComponent(i.idToken)),n},i.register=function(e){return t.register(e)},i.createRegisterUrl=function(e){return e||(e={}),e.action="register",i.createLoginUrl(e)},i.createAccountUrl=function(e){var n=h(),r=void 0;return void 0!==n&&(r=n+"/account?referrer="+encodeURIComponent(i.clientId)+"&referrer_uri="+encodeURIComponent(t.redirectUri(e))),r},i.accountManagement=function(){return t.accountManagement()},i.hasRealmRole=function(e){var t=i.realmAccess;return!!t&&t.roles.indexOf(e)>=0},i.hasResourceRole=function(e,t){if(!i.resourceAccess)return!1;var n=i.resourceAccess[t||i.clientId];return!!n&&n.roles.indexOf(e)>=0},i.loadUserProfile=function(){var e=h()+"/account",t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+i.token);var n=y();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(i.profile=JSON.parse(t.responseText),n.setSuccess(i.profile)):n.setError())},t.send(),n.promise},i.loadUserInfo=function(){var e=i.endpoints.userinfo(),t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+i.token);var n=y();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(i.userInfo=JSON.parse(t.responseText),n.setSuccess(i.userInfo)):n.setError())},t.send(),n.promise},i.isTokenExpired=function(e){if(!i.tokenParsed||!i.refreshToken&&"implicit"!=i.flow)throw"Not authenticated";if(null==i.timeSkew)return c("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var t=i.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+i.timeSkew;if(e){if(isNaN(e))throw"Invalid minValidity";t-=e}return t<0},i.updateToken=function(e){var t=y();if(!i.refreshToken)return t.setError(),t.promise;e=e||5;var n=function(){var n=!1;if(-1==e?(n=!0,c("[KEYCLOAK] Refreshing token: forced refresh")):(!i.tokenParsed||i.isTokenExpired(e))&&(n=!0,c("[KEYCLOAK] Refreshing token: token expired")),n){var o="grant_type=refresh_token&refresh_token="+i.refreshToken,a=i.endpoints.token();if(r.push(t),1==r.length){var s=new XMLHttpRequest;s.open("POST",a,!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.withCredentials=!0,o+="&client_id="+encodeURIComponent(i.clientId);var l=new Date().getTime();s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status){c("[KEYCLOAK] Token refreshed"),l=(l+new Date().getTime())/2;var e=JSON.parse(s.responseText);p(e.access_token,e.refresh_token,e.id_token,l),i.onAuthRefreshSuccess&&i.onAuthRefreshSuccess();for(var t=r.pop();null!=t;t=r.pop())t.setSuccess(!0)}else{d("[KEYCLOAK] Failed to refresh token"),400==s.status&&i.clearToken(),i.onAuthRefreshError&&i.onAuthRefreshError();for(var t=r.pop();null!=t;t=r.pop())t.setError(!0)}},s.send(o)}}else t.setSuccess(!1)};return o.enable?w().then(function(){n()}).catch(function(e){t.setError(e)}):n(),t.promise},i.clearToken=function(){i.token&&(p(null,null,null),i.onAuthLogout&&i.onAuthLogout(),i.loginRequired&&i.login())};var E=function(){if(!(this instanceof E))return new E;function e(){for(var e=new Date().getTime(),t=0;t<localStorage.length;t++){var n=localStorage.key(t);if(n&&0==n.indexOf("kc-callback-")){var i=localStorage.getItem(n);if(i)try{var r=JSON.parse(i).expires;(!r||r<e)&&localStorage.removeItem(n)}catch(e){localStorage.removeItem(n)}}}}localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test"),this.get=function(t){if(t){var n="kc-callback-"+t,i=localStorage.getItem(n);return i&&(localStorage.removeItem(n),i=JSON.parse(i)),e(),i}},this.add=function(t){e();var n="kc-callback-"+t.state;t.expires=new Date().getTime()+36e5,localStorage.setItem(n,JSON.stringify(t))}},A=function(){if(!(this instanceof A))return new A;this.get=function(i){if(i){var r=t("kc-callback-"+i);if(n("kc-callback-"+i,"",e(-100)),r)return JSON.parse(r)}},this.add=function(t){n("kc-callback-"+t.state,JSON.stringify(t),e(60))},this.removeItem=function(t){n(t,"",e(-100))};var e=function(e){var t=new Date;return t.setTime(t.getTime()+60*e*1e3),t},t=function(e){for(var t=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var r=n[i];" "==r.charAt(0);)r=r.substring(1);if(0==r.indexOf(t))return r.substring(t.length,r.length)}return""},n=function(e,t,n){var i=e+"="+t+"; expires="+n.toUTCString()+"; ";document.cookie=i}};function C(e){return function(){i.enableLogging&&e.apply(console,Array.prototype.slice.call(arguments))}}}var ix=function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})};let iw=e=>t=>class extends t{constructor(){super(...arguments),this._connectRequested=!1,this._status=li.DISCONNECTED,this._statusCallback=e=>this._onEventProviderStatusChanged(e)}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this.connectEvents()}disconnectedCallback(){this.disconnectEvents(),super.disconnectedCallback&&super.disconnectedCallback()}connectEvents(){if(!e.getEventProvider())return void console.log("No event provider available so cannot subscribe");this._connectRequested||(this._connectRequested=!0,e.getEventProvider().subscribeStatusChange(this._statusCallback),this._doConnect())}disconnectEvents(){this._connectRequested&&(this._connectRequested=!1,e.getEventProvider().unsubscribeStatusChange(this._statusCallback),this._onEventsDisconnect())}_doConnect(){return ix(this,void 0,void 0,function*(){this.eventsConnected&&this._onEventsConnect()})}get eventsConnected(){return this._connectRequested&&e.getEventProvider().status===li.CONNECTED}_onEventProviderStatusChanged(e){switch(e){case li.DISCONNECTED:this._onEventsDisconnect();break;case li.CONNECTED:this._doConnect()}}_onEventsConnect(){this._addEventSubscriptions(),this.onEventsConnect()}_onEventsDisconnect(){this._removeEventSubscriptions(),this.onEventsDisconnect()}_addEventSubscriptions(){return ix(this,void 0,void 0,function*(){let t=!!this._attributeRefs,n=!!this._assetIds,i=this._attributeRefs?this._attributeRefs:this._assetIds;if(i&&i.length>0){if(this._subscriptionIds=[],n){let t=yield e.getEventProvider().subscribeAssetEvents(i,!0,e=>this._onEvent(e)),n=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!tK(i,n))return void e.getEventProvider().unsubscribe(t);this._subscriptionIds.push(t)}let r=yield e.getEventProvider().subscribeAttributeEvents(i,t,e=>this._onEvent(e)),o=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!tK(i,o))return void e.getEventProvider().unsubscribe(r);this._subscriptionIds.push(r)}})}_removeEventSubscriptions(){this._subscriptionIds&&(this._subscriptionIds.forEach(t=>{e.getEventProvider().unsubscribe(t)}),this._subscriptionIds=void 0)}_refreshEventSubscriptions(){this._removeEventSubscriptions(),this._addEventSubscriptions()}set assetIds(e){tK(this._assetIds,e)||(this._assetIds=e,this._refreshEventSubscriptions(),this.requestUpdate("assetIds"))}get assetIds(){return this._assetIds}set attributeRefs(e){tK(this._attributeRefs,e)||(this._attributeRefs=e,this._refreshEventSubscriptions())}get attributeRefs(){return this._attributeRefs}_sendEvent(t){e.getEventProvider().sendEvent(t)}_sendEventWithReply(t){return e.getEventProvider().sendEventWithReply(t)}onEventsConnect(){}onEventsDisconnect(){}_onEvent(e){}},iF="#4d9d2a",ik="#FFFFFF",iE="#CCCCCC",iA="#FFFFFF",iC="#4c4c4c",iT="0 1px 3px 0 rgba(0,0,0,0.21)";var iS=function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})};let iM="openremote";!function(e){e.MANAGER_FAILED_TO_LOAD="MANAGER_FAILED_TO_LOAD",e.AUTH_FAILED="AUTH_FAILED",e.AUTH_TYPE_UNSUPPORTED="AUTH_TYPE_UNSUPPORTED",e.CONSOLE_ERROR="CONSOLE_INIT_ERROR",e.EVENTS_CONNECTION_ERROR="EVENTS_CONNECTION_ERROR",e.TRANSLATION_ERROR="TRANSLATION_ERROR"}(ls||(ls={})),function(e){e.ERROR="ERROR",e.READY="READY",e.ONLINE="ONLINE",e.OFFLINE="OFFLINE",e.CONNECTING="CONNECTING",e.CONSOLE_INIT="CONSOLE_INIT",e.CONSOLE_READY="CONSOLE_READY",e.TRANSLATE_INIT="TRANSLATE_INIT",e.TRANSLATE_LANGUAGE_CHANGED="TRANSLATE_LANGUAGE_CHANGED",e.DISPLAY_REALM_CHANGED="DISPLAY_REALM_CHANGED"}(ll||(ll={}));class iL{constructor(){this._authenticated=!1,this._ready=!1,this._name="",this._username="",this._keycloakUpdateTokenInterval=void 0,this._managerVersion="",this._authServerUrl="",this._listeners=[],this._disconnected=!1}get username(){return this._username}get error(){return this._error}get authenticated(){return this._authenticated}get ready(){return this._ready}get config(){return this._config}get roles(){let e=new Map;return this._keycloak?this._keycloak.resourceAccess&&this._config.clientId&&this._keycloak.resourceAccess&&Object.entries(this._keycloak.resourceAccess).forEach(([t,n])=>{let i=n.roles;e.set(t,i)}):this._basicIdentity&&this._basicIdentity.roles&&e.set(this._config.clientId,this._basicIdentity.roles),e}get managerVersion(){return this._managerVersion}get isManagerAvailable(){return this._managerVersion&&""!==this._managerVersion}get managerUrl(){var e;return null==(e=this._config)?void 0:e.managerUrl}get keycloakUrl(){var e;return null==(e=this._config)?void 0:e.keycloakUrl}get isError(){return!!this._error}get connectionStatus(){return this._events&&this._events.status}get console(){return this._console}get consoleAppConfig(){return this._consoleAppConfig}get events(){return this._events}get rest(){return nW}get language(){return tB.language}set language(e){console.debug(`Changing language to ${e}.`),e&&(tB.changeLanguage(e),this.console.storeData("LANGUAGE",e),this.authenticated&&this.updateKeycloakUserLanguage(e).catch(e=>console.error(e)))}get displayRealm(){return this._displayRealm||this._config.realm}set displayRealm(e){this.isSuperUser()&&this._displayRealm!==e&&(this._displayRealm=e,this._emitEvent(ll.DISPLAY_REALM_CHANGED))}get clientId(){return this._config.clientId||iM}getEventProvider(){return this.events}get mapType(){return this._config.mapType||"VECTOR"}isManagerSameOrigin(){if(!this.ready)return!1;let e=new URL(this._config.managerUrl),t=window.location;return e.protocol===t.protocol&&e.hostname===t.hostname&&e.port===t.port}addListener(e){0>this._listeners.indexOf(e)&&this._listeners.push(e)}removeListener(e){let t=this._listeners.indexOf(e);t>=0&&this._listeners.splice(t,1)}init(e){return iS(this,void 0,void 0,function*(){let t;this._config&&console.debug("Already initialised"),this._config=((t=e?Object.assign({},e):{}).managerUrl&&""!==t.managerUrl?t.managerUrl=t.managerUrl.replace(/\/+$/,""):t.managerUrl=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+window.location.pathname.replace(/\/[^/]+\/?$/,""),t.realm&&""!==t.realm||(t.realm="master"),t.auth||(t.auth="KEYCLOAK"),void 0===t.consoleAutoEnable&&(t.consoleAutoEnable=!0),void 0===t.applyConfigToAdmin&&(t.applyConfigToAdmin=!0),t.eventProviderType||(t.eventProviderType="WEBSOCKET"),(!t.pollingIntervalMillis||t.pollingIntervalMillis<5e3)&&(t.pollingIntervalMillis=1e4),void 0===t.loadIcons&&(t.loadIcons=!0),void 0===t.loadTranslations&&(t.loadTranslations=["or"]),void 0===t.translationsLoadPath&&(t.translationsLoadPath="locales/{{lng}}/{{ns}}.json"),void 0===t.loadDescriptors&&(t.loadDescriptors=!0),void 0===t.clientId&&(t.clientId=iM),t);let n=yield this.loadManagerInfo(),i=new t7(this._config.realm,this._config.consoleAutoEnable,()=>{this._emitEvent(ll.CONSOLE_READY)});if(this._console=i,"BASIC"===this._config.auth)n=(yield this.doTranslateInit())&&n,n=yield this.doAuthInit();else if("KEYCLOAK"===this._config.auth){if(!this._config.keycloakUrl&&this._authServerUrl){let e,t=new URL(this._config.managerUrl);this._authServerUrl.startsWith("//")&&(this._authServerUrl=t.protocol+this._authServerUrl);try{e=new URL(this._authServerUrl)}catch(n){(e=new URL(t)).pathname=this._authServerUrl}e.protocol||(e.protocol=t.protocol),e.hostname||(e.hostname=t.hostname),e.port||(e.port=t.port),this._config.keycloakUrl=e.toString()}this._config.keycloakUrl||(this._config.keycloakUrl=this._config.managerUrl+"/auth"),this._config.keycloakUrl=this._config.keycloakUrl.replace(/\/+$/,""),(n=yield this.doAuthInit())||this._config.skipFallbackToBasicAuth||(console.debug("Falling back to basic auth"),this._config.auth="BASIC",n=yield this.doAuthInit())}return!!n&&(n&&(n=this.doRestApiInit()),(yield this.doConsoleInit())&&this._clearWebHistory(),(n=(yield this.doTranslateInit())&&n)&&(n=yield this.doDescriptorsInit(),n=yield this.getConsoleAppConfig()),this.doIconInit(),n?(this._readyCallback&&(yield this._readyCallback()),this._ready=!0,this._emitEvent(ll.READY)):(this._config=void 0,console.warn("Failed to initialise the manager")),this.displayRealm=e.realm||"master",n)})}loadManagerInfo(){return iS(this,void 0,void 0,function*(){try{let e=yield new Promise((e,t)=>{let n=new XMLHttpRequest;n.addEventListener("load",()=>{e(JSON.parse(n.responseText))}),n.addEventListener("error",()=>{t(Error("Failed to contact the manager"))}),n.open("GET",this._config.managerUrl+"/api/master/info"),n.send()});return this._managerVersion=e&&e.version?e.version:"",this._authServerUrl=e&&e.authServerUrl?e.authServerUrl:"",!0}catch(e){return console.error("Failed to contact the manager",e),this._setError(ls.MANAGER_FAILED_TO_LOAD),!1}})}doTranslateInit(){return iS(this,void 0,void 0,function*(){if(tB.isInitialized)return!0;tB.on("initialized",e=>{this._emitEvent(ll.TRANSLATE_INIT)}),tB.on("languageChanged",e=>{tW().locale(e),this._emitEvent(ll.TRANSLATE_LANGUAGE_CHANGED)});let e={lng:(yield this.getConsolePreferredLanguage())||(yield this.getUserPreferredLanguage())||this.config.defaultLanguage||"en",fallbackLng:"en",defaultNS:"app",fallbackNS:"or",ns:this.config.loadTranslations,interpolation:{format:(e,t,n)=>"uppercase"===t?e.toUpperCase():e instanceof Date?tW()(e).format(t):e},backend:{loadPath:(e,t)=>1===t.length&&"or"===t[0]?this.config.managerUrl+"/shared/locales/{{lng}}/{{ns}}.json":this.config.translationsLoadPath?this.config.translationsLoadPath:"locales/{{lng}}/{{ns}}.json"}};this.config.configureTranslationsOptions&&this.config.configureTranslationsOptions(e);try{yield tB.use(ia).init(e)}catch(e){return console.error(e),this._setError(ls.TRANSLATION_ERROR),!1}return!0})}doDescriptorsInit(){return iS(this,void 0,void 0,function*(){if(!this.config.loadDescriptors)return!0;try{let e=yield nW.api.AssetModelResource.getAssetInfos(),t=yield nW.api.AssetModelResource.getMetaItemDescriptors(),n=yield nW.api.AssetModelResource.getValueDescriptors();tY._assetTypeInfos=e.data,tY._metaItemDescriptors=Object.values(t.data),tY._valueDescriptors=Object.values(n.data)}catch(e){return console.error(e),!1}return!0})}doAuthInit(){return iS(this,void 0,void 0,function*(){let e=!0;switch(this._config.auth){case"BASIC":e=yield this.initialiseBasicAuth();break;case"KEYCLOAK":e=yield this.loadAndInitialiseKeycloak();break;case"NONE":return!0;default:return this._setError(ls.AUTH_TYPE_UNSUPPORTED),!1}return!!e&&(nW.addRequestInterceptor(e=>{if(!e.headers.Authorization){let t=this.getAuthorizationHeader();t&&(e.headers.Authorization=t)}return e}),e)})}doRestApiInit(){return nW.setTimeout(2e4),nW.initialise(this.getApiBaseUrl()),!0}doEventsSubscriptionInit(){return iS(this,void 0,void 0,function*(){let e=!1;return"WEBSOCKET"===this._config.eventProviderType&&(this._events=new nQ(this._config.managerUrl),this._events.subscribeStatusChange(e=>this._onEventProviderStatusChanged(e)),e=yield this._events.connect()),e||this._setError(ls.EVENTS_CONNECTION_ERROR),e})}_connectEvents(){var e;(null==(e=this.events)?void 0:e.status)===li.DISCONNECTED?this.events.connect().catch(e=>{console.error("Failed to connect EventProvider."),console.error(e)}):console.warn("Tried to connect EventProvider, but it wasn't disconnected!")}_onEventProviderStatusChanged(e){switch(e){case li.DISCONNECTED:this._onDisconnect();break;case li.CONNECTED:break;case li.CONNECTING:this._emitEvent(ll.CONNECTING)}}doConsoleInit(){return iS(this,void 0,void 0,function*(){try{return yield this.console.initialise(),this._emitEvent(ll.CONSOLE_INIT),!0}catch(e){return this._setError(ls.CONSOLE_ERROR),!1}})}doIconInit(){var e,t,n;this._config.loadIcons&&(ip.addIconSet("mdi",(e=iD.managerUrl,{getIconTemplate:e=>K`<span style="font-family: 'Material Design Icons';" class="mdi-${e}"></span>`,onAdd(){let t=document.createElement("style");t.id="mdiFontStyle",t.textContent='@font-face {\n font-family: "Material Design Icons";\n src: url("'+e+'/shared/fonts/Material Design Icons/fonts/materialdesignicons-webfont.eot");\n src: url("'+e+'/shared/fonts/Material Design Icons/fonts/materialdesignicons-webfont.eot") format("embedded-opentype"), url("'+e+'/shared/fonts/Material Design Icons/fonts/materialdesignicons-webfont.woff2") format("woff2"), url("'+e+'/shared/fonts/Material Design Icons/fonts/materialdesignicons-webfont.woff") format("woff"), url("'+e+'/shared/fonts/Material Design Icons//fonts/materialdesignicons-webfont.ttf") format("truetype");\n font-weight: normal;\n font-style: normal;\n}',document.head.appendChild(t)}})),ip.addIconSet("or",(t=id.size,n=id.icons,{getIconTemplate:e=>{let i=n[e];return i?K`
111
+ `,u`${d(ih)}`]}render(){return this._iconTemplate||K``}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener(im.NAME,this._handler)}shouldUpdate(e){return e.has("icon")&&this._updateIcon(),!0}_updateIcon(){this._iconTemplate=void 0,window.removeEventListener(im.NAME,this._handler),this._iconTemplate=ip.getIconTemplate(this.icon),this.icon&&!this._iconTemplate&&window.addEventListener(im.NAME,this._handler)}};iu([eb({type:String,reflect:!0})],ig.prototype,"icon",void 0),iu([e_()],ig.prototype,"_iconTemplate",void 0),ig=iu([ep("or-icon")],ig);var ib=n(50921);class i_ extends Error{}function iy(e,t){let n;if("string"!=typeof e)throw new i_("Invalid token specified: must be a string");t||(t={});let i=+(!0!==t.header),r=e.split(".")[i];if("string"!=typeof r)throw new i_(`Invalid token specified: missing part #${i+1}`);try{n=function(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw Error("base64 string is not of the correct length")}try{var n;return n=t,decodeURIComponent(atob(n).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}catch(e){return atob(t)}}(r)}catch(e){throw new i_(`Invalid token specified: invalid base64 for part #${i+1} (${e.message})`)}try{return JSON.parse(n)}catch(e){throw new i_(`Invalid token specified: invalid json for part #${i+1} (${e.message})`)}}if(i_.prototype.name="InvalidTokenError","undefined"==typeof Promise)throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function iv(e){if(!(this instanceof iv))throw Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var t,n,i=this,r=[],o={enable:!0,callbackList:[],interval:5},a=document.getElementsByTagName("script"),s=0;s<a.length;s++)(-1!==a[s].src.indexOf("keycloak.js")||-1!==a[s].src.indexOf("keycloak.min.js"))&&-1!==a[s].src.indexOf("version=")&&(i.iframeVersion=a[s].src.substring(a[s].src.indexOf("version=")+8).split("&")[0]);var l=!0,c=C(console.info),d=C(console.warn);function u(e,t){for(var n=function(e){var t=null,n=window.crypto||window.msCrypto;if(n&&n.getRandomValues&&window.Uint8Array)return t=new Uint8Array(e),n.getRandomValues(t),t;t=Array(e);for(var i=0;i<t.length;i++)t[i]=Math.floor(256*Math.random());return t}(e),i=Array(e),r=0;r<e;r++)i[r]=t.charCodeAt(n[r]%t.length);return String.fromCharCode.apply(null,i)}function h(){return void 0===i.authServerUrl?void 0:"/"==i.authServerUrl.charAt(i.authServerUrl.length-1)?i.authServerUrl+"realms/"+encodeURIComponent(i.realm):i.authServerUrl+"/realms/"+encodeURIComponent(i.realm)}function m(e,t){var n=e.code,r=e.error,o=e.prompt,a=new Date().getTime();if(e.kc_action_status&&i.onActionUpdate&&i.onActionUpdate(e.kc_action_status),r){if("none"!=o)if(e.error_description&&"authentication_expired"===e.error_description)i.login(e.loginOptions);else{var s={error:r,error_description:e.error_description};i.onAuthError&&i.onAuthError(s),t&&t.setError(s)}else t&&t.setSuccess();return}if("standard"!=i.flow&&(e.access_token||e.id_token)&&m(e.access_token,null,e.id_token,!0),"implicit"!=i.flow&&n){var d="code="+n+"&grant_type=authorization_code",u=i.endpoints.token(),h=new XMLHttpRequest;h.open("POST",u,!0),h.setRequestHeader("Content-type","application/x-www-form-urlencoded"),d+="&client_id="+encodeURIComponent(i.clientId)+"&redirect_uri="+e.redirectUri,e.pkceCodeVerifier&&(d+="&code_verifier="+e.pkceCodeVerifier),h.withCredentials=!0,h.onreadystatechange=function(){if(4==h.readyState)if(200==h.status){var e=JSON.parse(h.responseText);m(e.access_token,e.refresh_token,e.id_token,"standard"===i.flow),x()}else i.onAuthError&&i.onAuthError(),t&&t.setError()},h.send(d)}function m(n,r,o,s){p(n,r,o,a=(a+new Date().getTime())/2),l&&i.idTokenParsed&&i.idTokenParsed.nonce!=e.storedNonce?(c("[KEYCLOAK] Invalid nonce, clearing token"),i.clearToken(),t&&t.setError()):s&&(i.onAuthSuccess&&i.onAuthSuccess(),t&&t.setSuccess())}}function f(e){return 0==e.status&&e.responseText&&e.responseURL.startsWith("file:")}function p(e,t,n,r){if(i.tokenTimeoutHandle&&(clearTimeout(i.tokenTimeoutHandle),i.tokenTimeoutHandle=null),t?(i.refreshToken=t,i.refreshTokenParsed=iy(t)):(delete i.refreshToken,delete i.refreshTokenParsed),n?(i.idToken=n,i.idTokenParsed=iy(n)):(delete i.idToken,delete i.idTokenParsed),e){if(i.token=e,i.tokenParsed=iy(e),i.sessionId=i.tokenParsed.sid,i.authenticated=!0,i.subject=i.tokenParsed.sub,i.realmAccess=i.tokenParsed.realm_access,i.resourceAccess=i.tokenParsed.resource_access,r&&(i.timeSkew=Math.floor(r/1e3)-i.tokenParsed.iat),null!=i.timeSkew&&(c("[KEYCLOAK] Estimated time difference between browser and server is "+i.timeSkew+" seconds"),i.onTokenExpired)){var o=(i.tokenParsed.exp-new Date().getTime()/1e3+i.timeSkew)*1e3;c("[KEYCLOAK] Token expires in "+Math.round(o/1e3)+" s"),o<=0?i.onTokenExpired():i.tokenTimeoutHandle=setTimeout(i.onTokenExpired,o)}}else delete i.token,delete i.tokenParsed,delete i.subject,delete i.realmAccess,delete i.resourceAccess,i.authenticated=!1}function g(){var e="0123456789abcdef",t=u(36,e).split("");return t[14]="4",t[19]=e.substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-",t.join("")}function b(e){var t=function(e){switch(i.flow){case"standard":t=["code","state","session_state","kc_action_status","iss"];break;case"implicit":t=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":t=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"]}t.push("error"),t.push("error_description"),t.push("error_uri");var t,n,r,o=e.indexOf("?"),a=e.indexOf("#");if("query"===i.responseMode&&-1!==o?(n=e.substring(0,o),""!==(r=_(e.substring(o+1,-1!==a?a:e.length),t)).paramsString&&(n+="?"+r.paramsString),-1!==a&&(n+=e.substring(a))):"fragment"===i.responseMode&&-1!==a&&(n=e.substring(0,a),""!==(r=_(e.substring(a+1),t)).paramsString&&(n+="#"+r.paramsString)),r&&r.oauthParams){if("standard"===i.flow||"hybrid"===i.flow){if((r.oauthParams.code||r.oauthParams.error)&&r.oauthParams.state)return r.oauthParams.newUrl=n,r.oauthParams}else if("implicit"===i.flow&&(r.oauthParams.access_token||r.oauthParams.error)&&r.oauthParams.state)return r.oauthParams.newUrl=n,r.oauthParams}}(e);if(t){var r=n.get(t.state);return r&&(t.valid=!0,t.redirectUri=r.redirectUri,t.storedNonce=r.nonce,t.prompt=r.prompt,t.pkceCodeVerifier=r.pkceCodeVerifier,t.loginOptions=r.loginOptions),t}}function _(e,t){for(var n=e.split("&"),i={paramsString:"",oauthParams:{}},r=0;r<n.length;r++){var o=n[r].indexOf("="),a=n[r].slice(0,o);-1!==t.indexOf(a)?i.oauthParams[a]=n[r].slice(o+1):(""!==i.paramsString&&(i.paramsString+="&"),i.paramsString+=n[r])}return i}function y(){var e={setSuccess:function(t){e.resolve(t)},setError:function(t){e.reject(t)}};return e.promise=new Promise(function(t,n){e.resolve=t,e.reject=n}),e}function v(){var e=y();if(!o.enable||o.iframe)return e.setSuccess(),e.promise;var t=document.createElement("iframe");o.iframe=t,t.onload=function(){var t=i.endpoints.authorize();"/"===t.charAt(0)?o.iframeOrigin=window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""):o.iframeOrigin=t.substring(0,t.indexOf("/",8)),e.setSuccess()};var n=i.endpoints.checkSessionIframe();return t.setAttribute("src",n),t.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),t.setAttribute("title","keycloak-session-iframe"),t.style.display="none",document.body.appendChild(t),window.addEventListener("message",function(e){if(e.origin===o.iframeOrigin&&o.iframe.contentWindow===e.source&&("unchanged"==e.data||"changed"==e.data||"error"==e.data)){"unchanged"!=e.data&&i.clearToken();for(var t=o.callbackList.splice(0,o.callbackList.length),n=t.length-1;n>=0;--n){var r=t[n];"error"==e.data?r.setError():r.setSuccess("unchanged"==e.data)}}},!1),e.promise}function x(){o.enable&&i.token&&setTimeout(function(){w().then(function(e){e&&x()})},1e3*o.interval)}function w(){var e=y();if(o.iframe&&o.iframeOrigin){var t=i.clientId+" "+(i.sessionId?i.sessionId:"");o.callbackList.push(e);var n=o.iframeOrigin;1==o.callbackList.length&&o.iframe.contentWindow.postMessage(t,n)}else e.setSuccess();return e.promise}function F(){var e,t,n,r=y();if(o.enable||i.silentCheckSsoRedirectUri){var a=document.createElement("iframe");a.setAttribute("src",i.endpoints.thirdPartyCookiesIframe()),a.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),a.setAttribute("title","keycloak-3p-check-iframe"),a.style.display="none",document.body.appendChild(a);var s=function(e){a.contentWindow===e.source&&("supported"===e.data||"unsupported"===e.data)&&("unsupported"===e.data&&(d("[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:\n\n - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).\n - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).\n\nFor more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers"),o.enable=!1,i.silentCheckSsoFallback&&(i.silentCheckSsoRedirectUri=!1)),document.body.removeChild(a),window.removeEventListener("message",s),r.setSuccess())};window.addEventListener("message",s,!1)}else r.setSuccess();return e=r.promise,t=i.messageReceiveTimeout,n=null,Promise.race([e,new Promise(function(e,i){n=setTimeout(function(){i({error:"Timeout when waiting for 3rd party check iframe message."})},t)})]).finally(function(){clearTimeout(n)})}function k(e){if(!e||"default"==e)return{login:function(e){return window.location.assign(i.createLoginUrl(e)),y().promise},logout:async function(e){if("GET"===(e?.logoutMethod??i.logoutMethod))return void window.location.replace(i.createLogoutUrl(e));let n=i.createLogoutUrl(e),r=await fetch(n,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({id_token_hint:i.idToken,client_id:i.clientId,post_logout_redirect_uri:t.redirectUri(e,!1)})});if(r.redirected){window.location.href=r.url;return}if(r.ok)return void window.location.reload();throw Error("Logout failed, request returned an error code.")},register:function(e){return window.location.assign(i.createRegisterUrl(e)),y().promise},accountManagement:function(){var e=i.createAccountUrl();if(void 0!==e)window.location.href=e;else throw"Not supported by the OIDC server";return y().promise},redirectUri:function(e,t){return e&&e.redirectUri?e.redirectUri:i.redirectUri?i.redirectUri:location.href}};if("cordova"==e){o.enable=!1;var n=function(e,t,n){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(e,t,n):window.open(e,t,n)},r=function(e){var t=e&&e.cordovaOptions?Object.keys(e.cordovaOptions).reduce(function(t,n){return t[n]=e.cordovaOptions[n],t},{}):{};return t.location="no",e&&"none"==e.prompt&&(t.hidden="yes"),Object.keys(t).reduce(function(e,n){return e.push(n+"="+t[n]),e},[]).join(",")},a=function(){return i.redirectUri||"http://localhost"};return{login:function(e){var t=y(),o=r(e),s=n(i.createLoginUrl(e),"_blank",o),l=!1,c=!1,d=function(){c=!0,s.close()};return s.addEventListener("loadstart",function(e){0==e.url.indexOf(a())&&(m(b(e.url),t),d(),l=!0)}),s.addEventListener("loaderror",function(e){l||(0==e.url.indexOf(a())?(m(b(e.url),t),d(),l=!0):(t.setError(),d()))}),s.addEventListener("exit",function(e){c||t.setError({reason:"closed_by_user"})}),t.promise},logout:function(e){var t,r=y(),o=n(i.createLogoutUrl(e),"_blank","location=no,hidden=yes,clearcache=yes");return o.addEventListener("loadstart",function(e){0==e.url.indexOf(a())&&o.close()}),o.addEventListener("loaderror",function(e){0==e.url.indexOf(a())||(t=!0),o.close()}),o.addEventListener("exit",function(e){t?r.setError():(i.clearToken(),r.setSuccess())}),r.promise},register:function(e){var t=y(),o=n(i.createRegisterUrl(),"_blank",r(e));return o.addEventListener("loadstart",function(e){0==e.url.indexOf(a())&&(o.close(),m(b(e.url),t))}),t.promise},accountManagement:function(){var e=i.createAccountUrl();if(void 0!==e){var t=n(e,"_blank","location=no");t.addEventListener("loadstart",function(e){0==e.url.indexOf(a())&&t.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(e){return a()}}}if("cordova-native"==e)return o.enable=!1,{login:function(e){var t=y(),n=i.createLoginUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),m(b(e.url),t)}),window.cordova.plugins.browsertab.openUrl(n),t.promise},logout:function(e){var t=y(),n=i.createLogoutUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),i.clearToken(),t.setSuccess()}),window.cordova.plugins.browsertab.openUrl(n),t.promise},register:function(e){var t=y(),n=i.createRegisterUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),m(b(e.url),t)}),window.cordova.plugins.browsertab.openUrl(n),t.promise},accountManagement:function(){var e=i.createAccountUrl();if(void 0!==e)window.cordova.plugins.browsertab.openUrl(e);else throw"Not supported by the OIDC server"},redirectUri:function(e){return e&&e.redirectUri?e.redirectUri:i.redirectUri?i.redirectUri:"http://localhost"}};throw"invalid adapter type: "+e}i.init=function(r){if(i.didInitialize)throw Error("A 'Keycloak' instance can only be initialized once.");if(i.didInitialize=!0,i.authenticated=!1,n=function(){try{return new E}catch(e){}return new A}(),t=r&&["default","cordova","cordova-native"].indexOf(r.adapter)>-1?k(r.adapter):r&&"object"==typeof r.adapter?r.adapter:window.Cordova||window.cordova?k("cordova"):k(),r){if(void 0!==r.useNonce&&(l=r.useNonce),void 0!==r.checkLoginIframe&&(o.enable=r.checkLoginIframe),r.checkLoginIframeInterval&&(o.interval=r.checkLoginIframeInterval),"login-required"===r.onLoad&&(i.loginRequired=!0),r.responseMode)if("query"===r.responseMode||"fragment"===r.responseMode)i.responseMode=r.responseMode;else throw"Invalid value for responseMode";if(r.flow){switch(r.flow){case"standard":i.responseType="code";break;case"implicit":i.responseType="id_token token";break;case"hybrid":i.responseType="code id_token token";break;default:throw"Invalid value for flow"}i.flow=r.flow}if(null!=r.timeSkew&&(i.timeSkew=r.timeSkew),r.redirectUri&&(i.redirectUri=r.redirectUri),r.silentCheckSsoRedirectUri&&(i.silentCheckSsoRedirectUri=r.silentCheckSsoRedirectUri),"boolean"==typeof r.silentCheckSsoFallback?i.silentCheckSsoFallback=r.silentCheckSsoFallback:i.silentCheckSsoFallback=!0,void 0!==r.pkceMethod){if("S256"!==r.pkceMethod&&!1!==r.pkceMethod)throw TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${r.pkceMethod}.`);i.pkceMethod=r.pkceMethod}else i.pkceMethod="S256";"boolean"==typeof r.enableLogging?i.enableLogging=r.enableLogging:i.enableLogging=!1,"POST"===r.logoutMethod?i.logoutMethod="POST":i.logoutMethod="GET","string"==typeof r.scope&&(i.scope=r.scope),"string"==typeof r.acrValues&&(i.acrValues=r.acrValues),"number"==typeof r.messageReceiveTimeout&&r.messageReceiveTimeout>0?i.messageReceiveTimeout=r.messageReceiveTimeout:i.messageReceiveTimeout=1e4}i.responseMode||(i.responseMode="fragment"),i.responseType||(i.responseType="code",i.flow="standard");var a=y(),s=y();s.promise.then(function(){i.onReady&&i.onReady(i.authenticated),a.setSuccess(i.authenticated)}).catch(function(e){a.setError(e)});var c=function(t){var n=y();function r(e){e?i.endpoints={authorize:function(){return e.authorization_endpoint},token:function(){return e.token_endpoint},logout:function(){if(!e.end_session_endpoint)throw"Not supported by the OIDC server";return e.end_session_endpoint},checkSessionIframe:function(){if(!e.check_session_iframe)throw"Not supported by the OIDC server";return e.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!e.userinfo_endpoint)throw"Not supported by the OIDC server";return e.userinfo_endpoint}}:i.endpoints={authorize:function(){return h()+"/protocol/openid-connect/auth"},token:function(){return h()+"/protocol/openid-connect/token"},logout:function(){return h()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var e=h()+"/protocol/openid-connect/login-status-iframe.html";return i.iframeVersion&&(e=e+"?version="+i.iframeVersion),e},thirdPartyCookiesIframe:function(){var e=h()+"/protocol/openid-connect/3p-cookies/step1.html";return i.iframeVersion&&(e=e+"?version="+i.iframeVersion),e},register:function(){return h()+"/protocol/openid-connect/registrations"},userinfo:function(){return h()+"/protocol/openid-connect/userinfo"}}}if(e?"string"==typeof e&&(s=e):s="keycloak.json",s){var o=new XMLHttpRequest;o.open("GET",s,!0),o.setRequestHeader("Accept","application/json"),o.onreadystatechange=function(){if(4==o.readyState)if(200==o.status||f(o)){var e=JSON.parse(o.responseText);i.authServerUrl=e["auth-server-url"],i.realm=e.realm,i.clientId=e.resource,r(null),n.setSuccess()}else n.setError()},o.send()}else{if(!e.clientId)throw"clientId missing";i.clientId=e.clientId;var a=e.oidcProvider;if(a)if("string"==typeof a){var s,l="/"==a.charAt(a.length-1)?a+".well-known/openid-configuration":a+"/.well-known/openid-configuration",o=new XMLHttpRequest;o.open("GET",l,!0),o.setRequestHeader("Accept","application/json"),o.onreadystatechange=function(){4==o.readyState&&(200==o.status||f(o)?(r(JSON.parse(o.responseText)),n.setSuccess()):n.setError())},o.send()}else r(a),n.setSuccess();else{if(!e.url){for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++)if(c[d].src.match(/.*keycloak\.js/)){e.url=c[d].src.substr(0,c[d].src.indexOf("/js/keycloak.js"));break}}if(!e.realm)throw"realm missing";i.authServerUrl=e.url,i.realm=e.realm,r(null),n.setSuccess()}}return n.promise}();function d(){var e=function(e){e||(n.prompt="none"),r&&r.locale&&(n.locale=r.locale),i.login(n).then(function(){s.setSuccess()}).catch(function(e){s.setError(e)})},t=function(){var e=document.createElement("iframe"),t=i.createLoginUrl({prompt:"none",redirectUri:i.silentCheckSsoRedirectUri});e.setAttribute("src",t),e.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),e.setAttribute("title","keycloak-silent-check-sso"),e.style.display="none",document.body.appendChild(e);var n=function(t){t.origin===window.location.origin&&e.contentWindow===t.source&&(m(b(t.data),s),document.body.removeChild(e),window.removeEventListener("message",n))};window.addEventListener("message",n)},n={};switch(r.onLoad){case"check-sso":o.enable?v().then(function(){w().then(function(n){n?s.setSuccess():i.silentCheckSsoRedirectUri?t():e(!1)}).catch(function(e){s.setError(e)})}):i.silentCheckSsoRedirectUri?t():e(!1);break;case"login-required":e(!0);break;default:throw"Invalid value for onLoad"}}function u(){var e=b(window.location.href);if(e&&window.history.replaceState(window.history.state,null,e.newUrl),e&&e.valid)return v().then(function(){m(e,s)}).catch(function(e){s.setError(e)});r?r.token&&r.refreshToken?(p(r.token,r.refreshToken,r.idToken),o.enable?v().then(function(){w().then(function(e){e?(i.onAuthSuccess&&i.onAuthSuccess(),s.setSuccess(),x()):s.setSuccess()}).catch(function(e){s.setError(e)})}):i.updateToken(-1).then(function(){i.onAuthSuccess&&i.onAuthSuccess(),s.setSuccess()}).catch(function(e){i.onAuthError&&i.onAuthError(),r.onLoad?d():s.setError(e)})):r.onLoad?d():s.setSuccess():s.setSuccess()}return c.then(function(){var e,t;(e=y(),t=function(){("interactive"===document.readyState||"complete"===document.readyState)&&(document.removeEventListener("readystatechange",t),e.setSuccess())},document.addEventListener("readystatechange",t),t(),e.promise).then(F).then(u).catch(function(e){a.setError(e)})}),c.catch(function(e){a.setError(e)}),a.promise},i.login=function(e){return t.login(e)},i.createLoginUrl=function(e){var r,o=g(),a=g(),s=t.redirectUri(e),c={state:o,nonce:a,redirectUri:encodeURIComponent(s),loginOptions:e};e&&e.prompt&&(c.prompt=e.prompt),r=e&&"register"==e.action?i.endpoints.register():i.endpoints.authorize();var d=e&&e.scope||i.scope;d?-1===d.indexOf("openid")&&(d="openid "+d):d="openid";var h=r+"?client_id="+encodeURIComponent(i.clientId)+"&redirect_uri="+encodeURIComponent(s)+"&state="+encodeURIComponent(o)+"&response_mode="+encodeURIComponent(i.responseMode)+"&response_type="+encodeURIComponent(i.responseType)+"&scope="+encodeURIComponent(d);if(l&&(h=h+"&nonce="+encodeURIComponent(a)),e&&e.prompt&&(h+="&prompt="+encodeURIComponent(e.prompt)),e&&e.maxAge&&(h+="&max_age="+encodeURIComponent(e.maxAge)),e&&e.loginHint&&(h+="&login_hint="+encodeURIComponent(e.loginHint)),e&&e.idpHint&&(h+="&kc_idp_hint="+encodeURIComponent(e.idpHint)),e&&e.action&&"register"!=e.action&&(h+="&kc_action="+encodeURIComponent(e.action)),e&&e.locale&&(h+="&ui_locales="+encodeURIComponent(e.locale)),e&&e.acr&&(h+="&claims="+encodeURIComponent(JSON.stringify({id_token:{acr:e.acr}}))),(e&&e.acrValues||i.acrValues)&&(h+="&acr_values="+encodeURIComponent(e.acrValues||i.acrValues)),i.pkceMethod){var m=u(96,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");c.pkceCodeVerifier=m,h+="&code_challenge="+function(e,t){if("S256"!==e)throw TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${e}'.`);return btoa(String.fromCodePoint(...new Uint8Array(ib.arrayBuffer(t)))).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}(i.pkceMethod,m)+"&code_challenge_method="+i.pkceMethod}return n.add(c),h},i.logout=function(e){return t.logout(e)},i.createLogoutUrl=function(e){if("POST"===(e?.logoutMethod??i.logoutMethod))return i.endpoints.logout();var n=i.endpoints.logout()+"?client_id="+encodeURIComponent(i.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(t.redirectUri(e,!1));return i.idToken&&(n+="&id_token_hint="+encodeURIComponent(i.idToken)),n},i.register=function(e){return t.register(e)},i.createRegisterUrl=function(e){return e||(e={}),e.action="register",i.createLoginUrl(e)},i.createAccountUrl=function(e){var n=h(),r=void 0;return void 0!==n&&(r=n+"/account?referrer="+encodeURIComponent(i.clientId)+"&referrer_uri="+encodeURIComponent(t.redirectUri(e))),r},i.accountManagement=function(){return t.accountManagement()},i.hasRealmRole=function(e){var t=i.realmAccess;return!!t&&t.roles.indexOf(e)>=0},i.hasResourceRole=function(e,t){if(!i.resourceAccess)return!1;var n=i.resourceAccess[t||i.clientId];return!!n&&n.roles.indexOf(e)>=0},i.loadUserProfile=function(){var e=h()+"/account",t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+i.token);var n=y();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(i.profile=JSON.parse(t.responseText),n.setSuccess(i.profile)):n.setError())},t.send(),n.promise},i.loadUserInfo=function(){var e=i.endpoints.userinfo(),t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+i.token);var n=y();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(i.userInfo=JSON.parse(t.responseText),n.setSuccess(i.userInfo)):n.setError())},t.send(),n.promise},i.isTokenExpired=function(e){if(!i.tokenParsed||!i.refreshToken&&"implicit"!=i.flow)throw"Not authenticated";if(null==i.timeSkew)return c("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var t=i.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+i.timeSkew;if(e){if(isNaN(e))throw"Invalid minValidity";t-=e}return t<0},i.updateToken=function(e){var t=y();if(!i.refreshToken)return t.setError(),t.promise;e=e||5;var n=function(){var n=!1;if(-1==e?(n=!0,c("[KEYCLOAK] Refreshing token: forced refresh")):(!i.tokenParsed||i.isTokenExpired(e))&&(n=!0,c("[KEYCLOAK] Refreshing token: token expired")),n){var o="grant_type=refresh_token&refresh_token="+i.refreshToken,a=i.endpoints.token();if(r.push(t),1==r.length){var s=new XMLHttpRequest;s.open("POST",a,!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.withCredentials=!0,o+="&client_id="+encodeURIComponent(i.clientId);var l=new Date().getTime();s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status){c("[KEYCLOAK] Token refreshed"),l=(l+new Date().getTime())/2;var e=JSON.parse(s.responseText);p(e.access_token,e.refresh_token,e.id_token,l),i.onAuthRefreshSuccess&&i.onAuthRefreshSuccess();for(var t=r.pop();null!=t;t=r.pop())t.setSuccess(!0)}else{d("[KEYCLOAK] Failed to refresh token"),400==s.status&&i.clearToken(),i.onAuthRefreshError&&i.onAuthRefreshError();for(var t=r.pop();null!=t;t=r.pop())t.setError(!0)}},s.send(o)}}else t.setSuccess(!1)};return o.enable?w().then(function(){n()}).catch(function(e){t.setError(e)}):n(),t.promise},i.clearToken=function(){i.token&&(p(null,null,null),i.onAuthLogout&&i.onAuthLogout(),i.loginRequired&&i.login())};var E=function(){if(!(this instanceof E))return new E;function e(){for(var e=new Date().getTime(),t=0;t<localStorage.length;t++){var n=localStorage.key(t);if(n&&0==n.indexOf("kc-callback-")){var i=localStorage.getItem(n);if(i)try{var r=JSON.parse(i).expires;(!r||r<e)&&localStorage.removeItem(n)}catch(e){localStorage.removeItem(n)}}}}localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test"),this.get=function(t){if(t){var n="kc-callback-"+t,i=localStorage.getItem(n);return i&&(localStorage.removeItem(n),i=JSON.parse(i)),e(),i}},this.add=function(t){e();var n="kc-callback-"+t.state;t.expires=new Date().getTime()+36e5,localStorage.setItem(n,JSON.stringify(t))}},A=function(){if(!(this instanceof A))return new A;this.get=function(i){if(i){var r=t("kc-callback-"+i);if(n("kc-callback-"+i,"",e(-100)),r)return JSON.parse(r)}},this.add=function(t){n("kc-callback-"+t.state,JSON.stringify(t),e(60))},this.removeItem=function(t){n(t,"",e(-100))};var e=function(e){var t=new Date;return t.setTime(t.getTime()+60*e*1e3),t},t=function(e){for(var t=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var r=n[i];" "==r.charAt(0);)r=r.substring(1);if(0==r.indexOf(t))return r.substring(t.length,r.length)}return""},n=function(e,t,n){var i=e+"="+t+"; expires="+n.toUTCString()+"; ";document.cookie=i}};function C(e){return function(){i.enableLogging&&e.apply(console,Array.prototype.slice.call(arguments))}}}var ix=function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})};let iw=e=>t=>class extends t{constructor(){super(...arguments),this._connectRequested=!1,this._status=li.DISCONNECTED,this._statusCallback=e=>this._onEventProviderStatusChanged(e)}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this.connectEvents()}disconnectedCallback(){this.disconnectEvents(),super.disconnectedCallback&&super.disconnectedCallback()}connectEvents(){if(!e.getEventProvider())return void console.log("No event provider available so cannot subscribe");this._connectRequested||(this._connectRequested=!0,e.getEventProvider().subscribeStatusChange(this._statusCallback),this._doConnect())}disconnectEvents(){this._connectRequested&&(this._connectRequested=!1,e.getEventProvider().unsubscribeStatusChange(this._statusCallback),this._onEventsDisconnect())}_doConnect(){return ix(this,void 0,void 0,function*(){this.eventsConnected&&this._onEventsConnect()})}get eventsConnected(){return this._connectRequested&&e.getEventProvider().status===li.CONNECTED}_onEventProviderStatusChanged(e){switch(e){case li.DISCONNECTED:this._onEventsDisconnect();break;case li.CONNECTED:this._doConnect()}}_onEventsConnect(){this._addEventSubscriptions(),this.onEventsConnect()}_onEventsDisconnect(){this._removeEventSubscriptions(),this.onEventsDisconnect()}_addEventSubscriptions(){return ix(this,void 0,void 0,function*(){let t=!!this._attributeRefs,n=!!this._assetIds,i=this._attributeRefs?this._attributeRefs:this._assetIds;if(i&&i.length>0){if(this._subscriptionIds=[],n){let t=yield e.getEventProvider().subscribeAssetEvents(i,!0,e=>this._onEvent(e)),n=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!tK(i,n))return void e.getEventProvider().unsubscribe(t);this._subscriptionIds.push(t)}let r=yield e.getEventProvider().subscribeAttributeEvents(i,t,e=>this._onEvent(e)),o=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!tK(i,o))return void e.getEventProvider().unsubscribe(r);this._subscriptionIds.push(r)}})}_removeEventSubscriptions(){this._subscriptionIds&&(this._subscriptionIds.forEach(t=>{e.getEventProvider().unsubscribe(t)}),this._subscriptionIds=void 0)}_refreshEventSubscriptions(){this._removeEventSubscriptions(),this._addEventSubscriptions()}set assetIds(e){tK(this._assetIds,e)||(this._assetIds=e,this._refreshEventSubscriptions(),this.requestUpdate("assetIds"))}get assetIds(){return this._assetIds}set attributeRefs(e){tK(this._attributeRefs,e)||(this._attributeRefs=e,this._refreshEventSubscriptions())}get attributeRefs(){return this._attributeRefs}_sendEvent(t){e.getEventProvider().sendEvent(t)}_sendEventWithReply(t){return e.getEventProvider().sendEventWithReply(t)}onEventsConnect(){}onEventsDisconnect(){}_onEvent(e){}},iF="#4d9d2a",ik="#FFFFFF",iE="#CCCCCC",iA="#FFFFFF",iC="#4c4c4c",iT="0 1px 3px 0 rgba(0,0,0,0.21)";var iS=function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})};let iM="openremote";!function(e){e.MANAGER_FAILED_TO_LOAD="MANAGER_FAILED_TO_LOAD",e.AUTH_FAILED="AUTH_FAILED",e.AUTH_TYPE_UNSUPPORTED="AUTH_TYPE_UNSUPPORTED",e.CONSOLE_ERROR="CONSOLE_INIT_ERROR",e.EVENTS_CONNECTION_ERROR="EVENTS_CONNECTION_ERROR",e.TRANSLATION_ERROR="TRANSLATION_ERROR"}(ls||(ls={})),function(e){e.ERROR="ERROR",e.READY="READY",e.ONLINE="ONLINE",e.OFFLINE="OFFLINE",e.CONNECTING="CONNECTING",e.CONSOLE_INIT="CONSOLE_INIT",e.CONSOLE_READY="CONSOLE_READY",e.TRANSLATE_INIT="TRANSLATE_INIT",e.TRANSLATE_LANGUAGE_CHANGED="TRANSLATE_LANGUAGE_CHANGED",e.DISPLAY_REALM_CHANGED="DISPLAY_REALM_CHANGED"}(ll||(ll={}));class iL{constructor(){this._authenticated=!1,this._ready=!1,this._name="",this._username="",this._keycloakUpdateTokenInterval=void 0,this._managerVersion="",this._authServerUrl="",this._listeners=[],this._disconnected=!1}get username(){return this._username}get error(){return this._error}get authenticated(){return this._authenticated}get ready(){return this._ready}get config(){return this._config}get roles(){let e=new Map;return this._keycloak?this._keycloak.resourceAccess&&this._config.clientId&&this._keycloak.resourceAccess&&Object.entries(this._keycloak.resourceAccess).forEach(([t,n])=>{let i=n.roles;e.set(t,i)}):this._basicIdentity&&this._basicIdentity.roles&&e.set(this._config.clientId,this._basicIdentity.roles),e}get managerVersion(){return this._managerVersion}get isManagerAvailable(){return this._managerVersion&&""!==this._managerVersion}get managerUrl(){var e;return null==(e=this._config)?void 0:e.managerUrl}get keycloakUrl(){var e;return null==(e=this._config)?void 0:e.keycloakUrl}get isError(){return!!this._error}get connectionStatus(){return this._events&&this._events.status}get console(){return this._console}get consoleAppConfig(){return this._consoleAppConfig}get events(){return this._events}get rest(){return nW}get language(){return tB.language}set language(e){console.debug(`Changing language to ${e}.`),e&&(tB.changeLanguage(e),this.console.storeData("LANGUAGE",e),this.authenticated&&this.updateKeycloakUserLanguage(e).catch(e=>console.error(e)))}get displayRealm(){return this._displayRealm||this._config.realm}set displayRealm(e){this.isSuperUser()&&this._displayRealm!==e&&(this._displayRealm=e,this._emitEvent(ll.DISPLAY_REALM_CHANGED))}get clientId(){return this._config.clientId||iM}getEventProvider(){return this.events}get mapType(){return this._config.mapType||"VECTOR"}isManagerSameOrigin(){if(!this.ready)return!1;let e=new URL(this._config.managerUrl),t=window.location;return e.protocol===t.protocol&&e.hostname===t.hostname&&e.port===t.port}addListener(e){0>this._listeners.indexOf(e)&&this._listeners.push(e)}removeListener(e){let t=this._listeners.indexOf(e);t>=0&&this._listeners.splice(t,1)}init(e){return iS(this,void 0,void 0,function*(){let t;this._config&&console.debug("Already initialised"),this._config=((t=e?Object.assign({},e):{}).managerUrl&&""!==t.managerUrl?t.managerUrl=t.managerUrl.replace(/\/+$/,""):t.managerUrl=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+window.location.pathname.replace(/\/[^/]+\/?$/,""),t.realm&&""!==t.realm||(t.realm="master"),t.auth||(t.auth="KEYCLOAK"),void 0===t.consoleAutoEnable&&(t.consoleAutoEnable=!0),void 0===t.applyConfigToAdmin&&(t.applyConfigToAdmin=!0),t.eventProviderType||(t.eventProviderType="WEBSOCKET"),(!t.pollingIntervalMillis||t.pollingIntervalMillis<5e3)&&(t.pollingIntervalMillis=1e4),void 0===t.loadIcons&&(t.loadIcons=!0),void 0===t.loadTranslations&&(t.loadTranslations=["or"]),void 0===t.translationsLoadPath&&(t.translationsLoadPath="locales/{{lng}}/{{ns}}.json"),void 0===t.loadDescriptors&&(t.loadDescriptors=!0),void 0===t.clientId&&(t.clientId=iM),t);let n=yield this.loadManagerInfo(),i=new t7(this._config.realm,this._config.consoleAutoEnable,()=>{this._emitEvent(ll.CONSOLE_READY)});if(this._console=i,"BASIC"===this._config.auth)n=(yield this.doTranslateInit())&&n,n=yield this.doAuthInit();else if("KEYCLOAK"===this._config.auth){if(!this._config.keycloakUrl&&this._authServerUrl){let e,t=new URL(this._config.managerUrl);this._authServerUrl.startsWith("//")&&(this._authServerUrl=t.protocol+this._authServerUrl);try{e=new URL(this._authServerUrl)}catch(n){(e=new URL(t)).pathname=this._authServerUrl}e.protocol||(e.protocol=t.protocol),e.hostname||(e.hostname=t.hostname),e.port||(e.port=t.port),this._config.keycloakUrl=e.toString()}this._config.keycloakUrl||(this._config.keycloakUrl=this._config.managerUrl+"/auth"),this._config.keycloakUrl=this._config.keycloakUrl.replace(/\/+$/,""),(n=yield this.doAuthInit())||this._config.skipFallbackToBasicAuth||(console.debug("Falling back to basic auth"),this._config.auth="BASIC",n=yield this.doAuthInit())}return!!n&&(n&&(n=this.doRestApiInit()),(yield this.doConsoleInit())&&this._clearWebHistory(),(n=(yield this.doTranslateInit())&&n)&&(n=yield this.doDescriptorsInit(),n=yield this.getConsoleAppConfig()),this.doIconInit(),n?(n=yield this.doEventsSubscriptionInit(),this._readyCallback&&(yield this._readyCallback()),this._ready=!0,this._emitEvent(ll.READY)):(this._config=void 0,console.warn("Failed to initialise the manager")),this.displayRealm=e.realm||"master",n)})}loadManagerInfo(){return iS(this,void 0,void 0,function*(){try{let e=yield new Promise((e,t)=>{let n=new XMLHttpRequest;n.addEventListener("load",()=>{e(JSON.parse(n.responseText))}),n.addEventListener("error",()=>{t(Error("Failed to contact the manager"))}),n.open("GET",this._config.managerUrl+"/api/master/info"),n.send()});return this._managerVersion=e&&e.version?e.version:"",this._authServerUrl=e&&e.authServerUrl?e.authServerUrl:"",!0}catch(e){return console.error("Failed to contact the manager",e),this._setError(ls.MANAGER_FAILED_TO_LOAD),!1}})}doTranslateInit(){return iS(this,void 0,void 0,function*(){if(tB.isInitialized)return!0;tB.on("initialized",e=>{this._emitEvent(ll.TRANSLATE_INIT)}),tB.on("languageChanged",e=>{tW().locale(e),this._emitEvent(ll.TRANSLATE_LANGUAGE_CHANGED)});let e={lng:(yield this.getConsolePreferredLanguage())||(yield this.getUserPreferredLanguage())||this.config.defaultLanguage||"en",fallbackLng:"en",defaultNS:"app",fallbackNS:"or",ns:this.config.loadTranslations,interpolation:{format:(e,t,n)=>"uppercase"===t?e.toUpperCase():e instanceof Date?tW()(e).format(t):e},backend:{loadPath:(e,t)=>1===t.length&&"or"===t[0]?this.config.managerUrl+"/shared/locales/{{lng}}/{{ns}}.json":this.config.translationsLoadPath?this.config.translationsLoadPath:"locales/{{lng}}/{{ns}}.json"}};this.config.configureTranslationsOptions&&this.config.configureTranslationsOptions(e);try{yield tB.use(ia).init(e)}catch(e){return console.error(e),this._setError(ls.TRANSLATION_ERROR),!1}return!0})}doDescriptorsInit(){return iS(this,void 0,void 0,function*(){if(!this.config.loadDescriptors)return!0;try{let e=yield nW.api.AssetModelResource.getAssetInfos(),t=yield nW.api.AssetModelResource.getMetaItemDescriptors(),n=yield nW.api.AssetModelResource.getValueDescriptors();tY._assetTypeInfos=e.data,tY._metaItemDescriptors=Object.values(t.data),tY._valueDescriptors=Object.values(n.data)}catch(e){return console.error(e),!1}return!0})}doAuthInit(){return iS(this,void 0,void 0,function*(){let e=!0;switch(this._config.auth){case"BASIC":e=yield this.initialiseBasicAuth();break;case"KEYCLOAK":e=yield this.loadAndInitialiseKeycloak();break;case"NONE":return!0;default:return this._setError(ls.AUTH_TYPE_UNSUPPORTED),!1}return!!e&&(nW.addRequestInterceptor(e=>{if(!e.headers.Authorization){let t=this.getAuthorizationHeader();t&&(e.headers.Authorization=t)}return e}),e)})}doRestApiInit(){return nW.setTimeout(2e4),nW.initialise(this.getApiBaseUrl()),!0}doEventsSubscriptionInit(){return iS(this,void 0,void 0,function*(){let e=!1;return"WEBSOCKET"===this._config.eventProviderType&&(this._events=new nQ(this._config.managerUrl),this._events.subscribeStatusChange(e=>this._onEventProviderStatusChanged(e)),e=yield this._events.connect()),e||this._setError(ls.EVENTS_CONNECTION_ERROR),e})}_connectEvents(){var e;(null==(e=this.events)?void 0:e.status)===li.DISCONNECTED?this.events.connect().catch(e=>{console.error("Failed to connect EventProvider."),console.error(e)}):console.warn("Tried to connect EventProvider, but it wasn't disconnected!")}_onEventProviderStatusChanged(e){switch(e){case li.DISCONNECTED:this._onDisconnect();break;case li.CONNECTED:break;case li.CONNECTING:this._emitEvent(ll.CONNECTING)}}doConsoleInit(){return iS(this,void 0,void 0,function*(){try{return yield this.console.initialise(),this._emitEvent(ll.CONSOLE_INIT),!0}catch(e){return this._setError(ls.CONSOLE_ERROR),!1}})}doIconInit(){var e,t,n;this._config.loadIcons&&(ip.addIconSet("mdi",(e=iD.managerUrl,{getIconTemplate:e=>K`<span style="font-family: 'Material Design Icons';" class="mdi-${e}"></span>`,onAdd(){let t=document.createElement("style");t.id="mdiFontStyle",t.textContent='@font-face {\n font-family: "Material Design Icons";\n src: url("'+e+'/shared/fonts/Material Design Icons/fonts/materialdesignicons-webfont.eot");\n src: url("'+e+'/shared/fonts/Material Design Icons/fonts/materialdesignicons-webfont.eot") format("embedded-opentype"), url("'+e+'/shared/fonts/Material Design Icons/fonts/materialdesignicons-webfont.woff2") format("woff2"), url("'+e+'/shared/fonts/Material Design Icons/fonts/materialdesignicons-webfont.woff") format("woff"), url("'+e+'/shared/fonts/Material Design Icons//fonts/materialdesignicons-webfont.ttf") format("truetype");\n font-weight: normal;\n font-style: normal;\n}',document.head.appendChild(t)}})),ip.addIconSet("or",(t=id.size,n=id.icons,{getIconTemplate:e=>{let i=n[e];return i?K`
112
112
  <svg xmlns="http://www.w3.org/2000/svg"
113
113
  viewBox="0 0 ${t} ${t}" preserveAspectRatio="xMidYMid meet" focusable="false">
114
114
  ${ic(i.startsWith("<")?i:'<path xmlns="http://www.w3.org/2000/svg" d="'+i+'" />')}
115
115
  </svg>
116
- `:K``},onAdd:void 0})))}getConsoleAppConfig(){return iS(this,void 0,void 0,function*(){var e;try{let t=yield fetch((null!=(e=iD.managerUrl)?e:"")+"/consoleappconfig/"+iD.displayRealm+".json");return this._consoleAppConfig=yield t.json(),!0}catch(e){return!0}})}getConsolePreferredLanguage(){return iS(this,arguments,void 0,function*(e=this.console){return e.retrieveData("LANGUAGE")})}getUserPreferredLanguage(){return iS(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 iS(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 iS(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 iS(this,void 0,void 0,function*(){var e,t,n,i;if(!this.config.basicLoginProvider)return;let r={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},o=!1;for(this._basicIdentity={roles:void 0,token:void 0,user:void 0};!o;){if((r=yield this.config.basicLoginProvider(r.username,r.password)).cancel){console.debug("Basic authentication cancelled by user");break}if(!r.username||!r.password)continue;this._basicIdentity.token=btoa(r.username+":"+r.password);let e=!1;try{let t=yield nW.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"),o=!0;let e=yield nW.api.UserResource.getCurrentUserClientRoles(this.clientId);this._basicIdentity.roles=e.data}else{console.debug("Unknown response so aborting"),this._basicIdentity=void 0;break}}o&&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,this._events||this.doEventsSubscriptionInit()}loadAndInitialiseKeycloak(){return iS(this,void 0,void 0,function*(){var e,t,n,i;try{this._keycloak=new iv({clientId:this._config.clientId,realm:this._config.realm,url:this._config.keycloakUrl});let r=yield this._getNativeOfflineRefreshToken(),o=yield this._keycloak.init({checkLoginIframe:!1,onLoad:"check-sso"});if(!o&&r)try{console.error("SETTING OFFLINE TOKEN"),this._keycloak.refreshToken=r,o=yield this._updateKeycloakAccessToken()}catch(e){console.error("Failed to authenticate using offline token")}if(o)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(ls.AUTH_FAILED),console.error("Failed to initialise Keycloak: "+e),!1}})}_createTokenUpdateInterval(){this._keycloakUpdateTokenInterval||(this._keycloakUpdateTokenInterval=window.setInterval(()=>iS(this,void 0,void 0,function*(){yield this._updateKeycloakAccessToken().catch(()=>{console.debug("Keycloak failed to refresh the access token"),this._onDisconnect()})}),1e4))}_updateKeycloakAccessToken(){return iS(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 iS(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(ll.ERROR),console.warn("Error set: "+e)}_clearWebHistory(){var e;null==(e=this.console)||e._doSendGenericMessage("CLEAR_WEB_HISTORY",void 0)}_onDisconnect(){return iS(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(ll.OFFLINE),this.reconnect())})}_onReconnected(){console.debug("Reconnected"),this._disconnected=!1,this._createTokenUpdateInterval(),this._emitEvent(ll.ONLINE)}reconnect(){return iS(this,arguments,void 0,function*(e=3e3){if(!this._disconnected)return;this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=void 0);let t=()=>iS(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===li.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(iL.MAX_RECONNECT_DELAY,e+3e3))),this._reconnectTimer=window.setTimeout(()=>this.reconnect(e),e);return}this._onReconnected()}})}isKeycloakReachable(){return iS(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)}})}}iL.MAX_RECONNECT_DELAY=45e3;let iD=new iL,iI=iD,iO=eF(class extends ek{constructor(e){if(super(e),e.type!==ew.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 X}});var iR=function(e,t){return(iR=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 iP(e,t){function n(){this.constructor=e}iR(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i$=function(){return(i$=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},iN=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}(),iB=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,function(){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,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}(arguments[t]));return e}(n)),this.foundation=void 0===t?this.getDefaultFoundation():t,this.foundation.init(),this.initialSyncWithDOM()}return e.attachTo=function(t){return new e(t,new iN({}))},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 iz(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 ij(e,t){if(e.closest)return e.closest(t);for(var n=e;n;){if(iY(n,t))return n;n=n.parentElement}return null}function iY(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}var iH=function(e,t){return(iH=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 iU(e,t){function n(){this.constructor=e}iH(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var iV=function(){return(iV=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},iW={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},iG=function(e){function t(n){var i=e.call(this,iV(iV({},t.defaultAdapter),n))||this;return i.shakeAnimationEndHandler_=function(){return i.handleShakeAnimationEnd_()},i}return iU(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return iW},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,r=n.LABEL_SHAKE;e?this.adapter.addClass(i):(this.adapter.removeClass(i),this.adapter.removeClass(r))},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}(iN),iq=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return iU(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 iG({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}(iB),iK=function(e,t){return(iK=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 iX(e,t){function n(){this.constructor=e}iK(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var iZ=function(){return(iZ=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},iJ={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},iQ=function(e){function t(n){var i=e.call(this,iZ(iZ({},t.defaultAdapter),n))||this;return i.transitionEndHandler_=function(e){return i.handleTransitionEnd(e)},i}return iX(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return iJ},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(iJ.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(iJ.LINE_RIPPLE_ACTIVE)},t.prototype.setRippleCenter=function(e){this.adapter.setStyle("transform-origin",e+"px center")},t.prototype.deactivate=function(){this.adapter.addClass(iJ.LINE_RIPPLE_DEACTIVATING)},t.prototype.handleTransitionEnd=function(e){var t=this.adapter.hasClass(iJ.LINE_RIPPLE_DEACTIVATING);"opacity"===e.propertyName&&t&&(this.adapter.removeClass(iJ.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(iJ.LINE_RIPPLE_DEACTIVATING))},t}(iN),i0=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return iX(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 iQ({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}(iB),i1=function(e,t){return(i1=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 i2(e,t){function n(){this.constructor=e}i1(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i5=function(){return(i5=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},i3={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},i4={NOTCH_ELEMENT_PADDING:8},i6={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},i8=function(e){function t(n){return e.call(this,i5(i5({},t.defaultAdapter),n))||this}return i2(t,e),Object.defineProperty(t,"strings",{get:function(){return i3},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return i6},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return i4},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+=i4.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}(iN),i7=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i2(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){this.notchElement_=this.root.querySelector(i3.NOTCH_ELEMENT_SELECTOR);var e=this.root.querySelector("."+iG.cssClasses.ROOT);e?(e.style.transitionDuration="0s",this.root.classList.add(i6.OUTLINE_UPGRADED),requestAnimationFrame(function(){e.style.transitionDuration=""})):this.root.classList.add(i6.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 i8({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}(iB),i9=function(e,t){return(i9=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 re(e,t){function n(){this.constructor=e}i9(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var rt=function(){return(rt=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},rn={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"},ri={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"},rr={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},ro=["touchstart","pointerdown","mousedown","keydown"],ra=["touchend","pointerup","mouseup","contextmenu"],rs=[],rl=function(e){function t(n){var i=e.call(this,rt(rt({},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 re(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return rn},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ri},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return rr},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,r=i.ROOT,o=i.UNBOUNDED;requestAnimationFrame(function(){e.adapter.addClass(r),e.adapter.isUnbounded()&&(e.adapter.addClass(o),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,r=n.UNBOUNDED;requestAnimationFrame(function(){e.adapter.removeClass(i),e.adapter.removeClass(r),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&&(ro.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_):ra.forEach(function(e){t.adapter.registerDocumentInteractionHandler(e,t.deactivateHandler_)})},t.prototype.deregisterRootHandlers_=function(){var e=this;ro.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_),ra.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&&rs.length>0&&rs.some(function(e){return t.adapter.containsEventTarget(e)}))return void this.resetActivationState_();void 0!==e&&(rs.push(e.target),this.registerDeactivationHandlers_(e)),n.wasElementMadeActive=this.checkElementMadeActive_(e),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame(function(){rs=[],!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,r=n.VAR_FG_TRANSLATE_END,o=t.cssClasses,a=o.FG_DEACTIVATION,s=o.FG_ACTIVATION,l=t.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var c="",d="";if(!this.adapter.isUnbounded()){var u=this.getFgTranslationCoordinates_(),h=u.startPoint,m=u.endPoint;c=h.x+"px, "+h.y+"px",d=m.x+"px, "+m.y+"px"}this.adapter.updateCssVariable(i,c),this.adapter.updateCssVariable(r,d),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter.removeClass(a),this.adapter.computeBoundingRect(),this.adapter.addClass(s),this.activationTimer_=setTimeout(function(){return e.activationTimerCallback_()},l)},t.prototype.getFgTranslationCoordinates_=function(){var e,t=this.activationState_,n=t.activationEvent;return{startPoint:e={x:(e=t.wasActivatedByPointer?function(e,t,n){if(!e)return{x:0,y:0};var i,r,o=t.x,a=t.y,s=o+n.left,l=a+n.top;return"touchstart"===e.type?(i=e.changedTouches[0].pageX-s,r=e.changedTouches[0].pageY-l):(i=e.pageX-s,r=e.pageY-l),{x:i,y:r}}(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_,r=i.hasDeactivationUXRun,o=i.isActivated;(r||!o)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter.addClass(n),this.fgDeactivationRemovalTimer_=setTimeout(function(){e.adapter.removeClass(n)},rr.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=rt({},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,r=e.VAR_TOP,o=e.VAR_FG_SCALE;this.adapter.updateCssVariable(n,this.initialSize_+"px"),this.adapter.updateCssVariable(o,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(r,this.unboundedCoords_.top+"px"))},t}(iN),rc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.disabled=!1,t}return re(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=lc;if("boolean"==typeof lc&&!t)return lc;if(!(n&&"function"==typeof n.supports))return!1;var r=n.supports("--css-vars","yes"),o=n.supports("(--css-vars: yes)")&&n.supports("color","#00000000");return i=r||o,t||(lc=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,iz())},deregisterInteractionHandler:function(t,n){return e.root.removeEventListener(t,n,iz())},deregisterResizeHandler:function(e){return window.removeEventListener("resize",e)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return iY(e.root,":active")},isSurfaceDisabled:function(){return!!e.disabled},isUnbounded:function(){return!!e.unbounded},registerDocumentInteractionHandler:function(e,t){return document.documentElement.addEventListener(e,t,iz())},registerInteractionHandler:function(t,n){return e.root.addEventListener(t,n,iz())},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 rl(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}(iB),rd={ROOT:"mdc-text-field-character-counter"},ru={ROOT_SELECTOR:"."+rd.ROOT},rh=function(e){function t(n){return e.call(this,i$(i$({},t.defaultAdapter),n))||this}return iP(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return rd},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ru},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}(iN),rm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return iP(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 rh({setContent:function(t){e.root.textContent=t}})},t}(iB),rf={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"},rp={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"},rg={LABEL_SCALE:.75},rb=["pattern","min","max","required","step","minlength","maxlength"],r_=["color","date","datetime-local","month","range","time","week"],ry=["mousedown","touchstart"],rv=["click","keydown"],rx=function(e){function t(n,i){void 0===i&&(i={});var r=e.call(this,i$(i$({},t.defaultAdapter),n))||this;return r.isFocused_=!1,r.receivedUserInput_=!1,r.isValid_=!0,r.useNativeValidation_=!0,r.validateOnValueChange_=!0,r.helperText_=i.helperText,r.characterCounter_=i.characterCounter,r.leadingIcon_=i.leadingIcon,r.trailingIcon_=i.trailingIcon,r.inputFocusHandler_=function(){return r.activateFocus()},r.inputBlurHandler_=function(){return r.deactivateFocus()},r.inputInputHandler_=function(){return r.handleInput()},r.setPointerXOffset_=function(e){return r.setTransformOrigin(e)},r.textFieldInteractionHandler_=function(){return r.handleTextFieldInteraction()},r.validationAttributeChangeHandler_=function(e){return r.handleValidationAttributeChange(e)},r}return iP(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return rp},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return rf},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return rg},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shouldAlwaysFloat_",{get:function(){var e=this.getNativeInput_().type;return r_.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_),ry.forEach(function(t){e.adapter.registerInputInteractionHandler(t,e.setPointerXOffset_)}),rv.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_),ry.forEach(function(t){e.adapter.deregisterInputInteractionHandler(t,e.setPointerXOffset_)}),rv.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 rb.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()*rg.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(),r=n.clientX-i.left;this.adapter.setLineRippleTransformOrigin(r)}},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(),r=this.helperText_.getId();i&&r?this.adapter.setInputAttr(rf.ARIA_DESCRIBEDBY,r):this.adapter.removeInputAttr(rf.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,r=n.INVALID;e?(this.adapter.addClass(i),this.adapter.removeClass(r)):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}(iN),rw={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"},rF={ARIA_HIDDEN:"aria-hidden",ROLE:"role",ROOT_SELECTOR:"."+rw.ROOT},rk=function(e){function t(n){return e.call(this,i$(i$({},t.defaultAdapter),n))||this}return iP(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return rw},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return rF},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(rF.ARIA_HIDDEN)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.isPersistent=function(){return this.adapter.hasClass(rw.HELPER_TEXT_PERSISTENT)},t.prototype.setPersistent=function(e){e?this.adapter.addClass(rw.HELPER_TEXT_PERSISTENT):this.adapter.removeClass(rw.HELPER_TEXT_PERSISTENT)},t.prototype.isValidation=function(){return this.adapter.hasClass(rw.HELPER_TEXT_VALIDATION_MSG)},t.prototype.setValidation=function(e){e?this.adapter.addClass(rw.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(rw.HELPER_TEXT_VALIDATION_MSG)},t.prototype.showToScreenReader=function(){this.adapter.removeAttr(rF.ARIA_HIDDEN)},t.prototype.setValidity=function(e){var t=this.adapter.hasClass(rw.HELPER_TEXT_PERSISTENT),n=this.adapter.hasClass(rw.HELPER_TEXT_VALIDATION_MSG)&&!e;n?(this.showToScreenReader(),this.adapter.setAttr(rF.ROLE,"alert")):this.adapter.removeAttr(rF.ROLE),t||n||this.hide_()},t.prototype.hide_=function(){this.adapter.setAttr(rF.ARIA_HIDDEN,"true")},t}(iN),rE=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return iP(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 rk({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}(iB),rA={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"},rC={ROOT:"mdc-text-field__icon"},rT=["click","keydown"],rS=function(e){function t(n){var i=e.call(this,i$(i$({},t.defaultAdapter),n))||this;return i.savedTabIndex_=null,i.interactionHandler_=function(e){return i.handleInteraction(e)},i}return iP(t,e),Object.defineProperty(t,"strings",{get:function(){return rA},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return rC},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"),rT.forEach(function(t){e.adapter.registerInteractionHandler(t,e.interactionHandler_)})},t.prototype.destroy=function(){var e=this;rT.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",rA.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}(iN),rM=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return iP(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 rS({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(rS.strings.ICON_EVENT,{},!0)}})},t}(iB),rL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return iP(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e,t,n,i,r,o,a){void 0===e&&(e=function(e,t){return new rc(e,t)}),void 0===t&&(t=function(e){return new i0(e)}),void 0===n&&(n=function(e){return new rE(e)}),void 0===i&&(i=function(e){return new rm(e)}),void 0===r&&(r=function(e){return new rM(e)}),void 0===o&&(o=function(e){return new iq(e)}),void 0===a&&(a=function(e){return new i7(e)}),this.input_=this.root.querySelector(rf.INPUT_SELECTOR);var s=this.root.querySelector(rf.LABEL_SELECTOR);this.label_=s?o(s):null;var l=this.root.querySelector(rf.LINE_RIPPLE_SELECTOR);this.lineRipple_=l?t(l):null;var c=this.root.querySelector(rf.OUTLINE_SELECTOR);this.outline_=c?a(c):null;var d=rk.strings,u=this.root.nextElementSibling,h=u&&u.classList.contains(rp.HELPER_LINE),m=h&&u&&u.querySelector(d.ROOT_SELECTOR);this.helperText_=m?n(m):null;var f=rh.strings,p=this.root.querySelector(f.ROOT_SELECTOR);!p&&h&&u&&(p=u.querySelector(f.ROOT_SELECTOR)),this.characterCounter_=p?i(p):null;var g=this.root.querySelector(rf.LEADING_ICON_SELECTOR);this.leadingIcon_=g?r(g):null;var b=this.root.querySelector(rf.TRAILING_ICON_SELECTOR);this.trailingIcon_=b?r(b):null,this.prefix_=this.root.querySelector(rf.PREFIX_SELECTOR),this.suffix_=this.root.querySelector(rf.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 rx(i$(i$(i$(i$(i$({},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,iz())},deregisterInputInteractionHandler:function(t,n){e.input_.removeEventListener(t,n,iz())}}},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(rp.TEXTAREA),i=this.root.classList.contains(rp.OUTLINED);if(n||i)return null;var r=i$(i$({},rc.createAdapter(this)),{isSurfaceActive:function(){return iY(t.input_,":active")},registerInteractionHandler:function(e,n){return t.input_.addEventListener(e,n,iz())},deregisterInteractionHandler:function(e,n){return t.input_.removeEventListener(e,n,iz())}});return e(this.root,new rl(r))},t}(iB),rD=function(e,t){return(rD=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 rI(e,t){function n(){this.constructor=e}rD(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var rO=function(){return(rO=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},rR={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}},rP={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 r$(e){return!!e.document&&"function"==typeof e.document.createElement}function rN(e,t){if(r$(e)&&t in rR){var n=e.document.createElement("div"),i=rR[t],r=i.standard,o=i.prefixed;return r in n.style?r:o}return t}function rB(e,t){if(r$(e)&&t in rP){var n=e.document.createElement("div"),i=rP[t],r=i.standard,o=i.prefixed;return i.cssProperty in n.style?r:o}return t}var rz={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"},rj={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"},rY={ANIM_END_LATCH_MS:250},rH=function(e){function t(n){var i=e.call(this,rO(rO({},t.defaultAdapter),n))||this;return i.currentCheckState_=rj.TRANSITION_STATE_INIT,i.currentAnimationClass_="",i.animEndLatchTimer_=0,i.enableAnimationEndHandler_=!1,i}return rI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return rz},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return rj},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return rY},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(rz.UPGRADED)},t.prototype.destroy=function(){clearTimeout(this.animEndLatchTimer_)},t.prototype.setDisabled=function(e){this.adapter.setNativeControlDisabled(e),e?this.adapter.addClass(rz.DISABLED):this.adapter.removeClass(rz.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},rY.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=rj.TRANSITION_STATE_UNCHECKED,i=rz.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=rj.TRANSITION_STATE_INDETERMINATE,t=rj.TRANSITION_STATE_CHECKED,n=rj.TRANSITION_STATE_UNCHECKED;return this.adapter.isIndeterminate()?e:this.adapter.isChecked()?t:n},t.prototype.getTransitionAnimationClass_=function(e,n){var i=rj.TRANSITION_STATE_INIT,r=rj.TRANSITION_STATE_CHECKED,o=rj.TRANSITION_STATE_UNCHECKED,a=t.cssClasses,s=a.ANIM_UNCHECKED_CHECKED,l=a.ANIM_UNCHECKED_INDETERMINATE,c=a.ANIM_CHECKED_UNCHECKED,d=a.ANIM_CHECKED_INDETERMINATE,u=a.ANIM_INDETERMINATE_CHECKED,h=a.ANIM_INDETERMINATE_UNCHECKED;switch(e){case i:if(n===o)return"";return n===r?u:h;case o:return n===r?s:l;case r:return n===o?c:d;default:return n===r?u:h}},t.prototype.updateAriaChecked_=function(){this.adapter.isIndeterminate()?this.adapter.setNativeControlAttr(rj.ARIA_CHECKED_ATTR,rj.ARIA_CHECKED_INDETERMINATE_VALUE):this.adapter.removeNativeControlAttr(rj.ARIA_CHECKED_ATTR)},t}(iN),rU=["checked","indeterminate"],rV=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ripple_=t.createRipple_(),t}return rI(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=rj.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(rB(window,"animationend"),this.handleAnimationEnd_),this.installPropertyChangeHooks_()},t.prototype.destroy=function(){this.ripple_.destroy(),this.nativeControl_.removeEventListener("change",this.handleChange_),this.unlisten(rB(window,"animationend"),this.handleAnimationEnd_),this.uninstallPropertyChangeHooks_(),e.prototype.destroy.call(this)},t.prototype.getDefaultFoundation=function(){var e=this;return new rH({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=rO(rO({},rc.createAdapter(this)),{deregisterInteractionHandler:function(t,n){return e.nativeControl_.removeEventListener(t,n,iz())},isSurfaceActive:function(){return iY(e.nativeControl_,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(t,n){return e.nativeControl_.addEventListener(t,n,iz())}});return new rc(this.root,new rl(t))},t.prototype.installPropertyChangeHooks_=function(){var e=this,t=this.nativeControl_,n=Object.getPrototypeOf(t);rU.forEach(function(i){var r=Object.getOwnPropertyDescriptor(n,i);if(rW(r)){var o=r.get,a={configurable:r.configurable,enumerable:r.enumerable,get:o,set:function(n){r.set.call(t,n),e.foundation.handleChange()}};Object.defineProperty(t,i,a)}})},t.prototype.uninstallPropertyChangeHooks_=function(){var e=this.nativeControl_,t=Object.getPrototypeOf(e);rU.forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);rW(i)&&Object.defineProperty(e,n,i)})},Object.defineProperty(t.prototype,"nativeControl_",{get:function(){var e=rj.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}(iB);function rW(e){return!!e&&"function"==typeof e.set}var rG=function(e,t){return(rG=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 rq(e,t){function n(){this.constructor=e}rG(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var rK=function(){return(rK=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},rX={CHECKED:"mdc-switch--checked",DISABLED:"mdc-switch--disabled"},rZ={ARIA_CHECKED_ATTR:"aria-checked",NATIVE_CONTROL_SELECTOR:".mdc-switch__native-control",RIPPLE_SURFACE_SELECTOR:".mdc-switch__thumb-underlay"},rJ=function(e){function t(n){return e.call(this,rK(rK({},t.defaultAdapter),n))||this}return rq(t,e),Object.defineProperty(t,"strings",{get:function(){return rZ},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return rX},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(rX.DISABLED):this.adapter.removeClass(rX.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(rX.CHECKED):this.adapter.removeClass(rX.CHECKED)},t.prototype.updateAriaChecked_=function(e){this.adapter.setNativeControlAttr(rZ.ARIA_CHECKED_ATTR,""+!!e)},t}(iN),rQ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ripple_=t.createRipple_(),t}return rq(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,function(){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,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}(arguments[t]));return e}(n))},this.nativeControl_.addEventListener("change",this.changeHandler_),this.checked=this.checked},t.prototype.getDefaultFoundation=function(){var e=this;return new rJ({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=rJ.strings.RIPPLE_SURFACE_SELECTOR,n=this.root.querySelector(t),i=rK(rK({},rc.createAdapter(this)),{addClass:function(e){return n.classList.add(e)},computeBoundingRect:function(){return n.getBoundingClientRect()},deregisterInteractionHandler:function(t,n){e.nativeControl_.removeEventListener(t,n,iz())},isSurfaceActive:function(){return iY(e.nativeControl_,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(t,n){e.nativeControl_.addEventListener(t,n,iz())},removeClass:function(e){n.classList.remove(e)},updateCssVariable:function(e,t){n.style.setProperty(e,t)}});return new rc(this.root,new rl(i))},Object.defineProperty(t.prototype,"nativeControl_",{get:function(){var e=rJ.strings.NATIVE_CONTROL_SELECTOR;return this.root.querySelector(e)},enumerable:!0,configurable:!0}),t}(iB),r0=function(e,t){return(r0=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 r1(e,t){function n(){this.constructor=e}r0(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var r2=function(){return(r2=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r5={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"},r3={STEP_SIZE:1,THUMB_UPDATE_MIN_PX:5},r4={ARIA_VALUETEXT:"aria-valuetext",INPUT_DISABLED:"disabled",INPUT_MIN:"min",INPUT_MAX:"max",INPUT_VALUE:"value",INPUT_STEP:"step"},r6={CHANGE:"MDCSlider:change",INPUT:"MDCSlider:input"};!function(e){e[e.ACTIVE=0]="ACTIVE",e[e.INACTIVE=1]="INACTIVE"}(ld||(ld={})),function(e){e[e.START=1]="START",e[e.END=2]="END"}(lu||(lu={}));var r8="undefined"!=typeof window,r7=function(e){function t(n){var i=e.call(this,r2(r2({},t.defaultAdapter),n))||this;return i.initialStylesRemoved=!1,i.isDisabled=!1,i.isDiscrete=!1,i.step=r3.STEP_SIZE,i.hasTickMarks=!1,i.isRange=!1,i.thumb=null,i.downEventClientX=null,i.startThumbKnobWidth=0,i.endThumbKnobWidth=0,i}return r1(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(r5.DISABLED),this.isDiscrete=this.adapter.hasClass(r5.DISCRETE),this.hasTickMarks=this.adapter.hasClass(r5.TICK_MARKS),this.isRange=this.adapter.hasClass(r5.RANGE);var t=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(r4.INPUT_MIN,this.isRange?lu.START:lu.END),r4.INPUT_MIN),n=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(r4.INPUT_MAX,lu.END),r4.INPUT_MAX),i=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(r4.INPUT_VALUE,lu.END),r4.INPUT_VALUE),r=this.isRange?this.convertAttributeValueToNumber(this.adapter.getInputAttribute(r4.INPUT_VALUE,lu.START),r4.INPUT_VALUE):t;this.validateProperties({min:t,max:n,value:i,valueStart:r}),this.min=t,this.max=n,this.value=i,this.valueStart=r,this.valueBeforeDownEvent=i,this.valueStartBeforeDownEvent=r;var o=this.adapter.getInputAttribute(r4.INPUT_STEP,lu.END);if(o&&(this.step=this.convertAttributeValueToNumber(o,r4.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(lu.START)},this.inputEndChangeListener=function(){e.handleInputChange(lu.END)},this.inputStartFocusListener=function(){e.handleInputFocus(lu.START)},this.inputEndFocusListener=function(){e.handleInputFocus(lu.END)},this.inputStartBlurListener=function(){e.handleInputBlur(lu.START)},this.inputEndBlurListener=function(){e.handleInputBlur(lu.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,lu.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,lu.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(r5.DISABLED),this.isRange&&this.adapter.setInputAttribute(r4.INPUT_DISABLED,"",lu.START),this.adapter.setInputAttribute(r4.INPUT_DISABLED,"",lu.END)):(this.adapter.removeClass(r5.DISABLED),this.isRange&&this.adapter.removeInputAttribute(r4.INPUT_DISABLED,lu.START),this.adapter.removeInputAttribute(r4.INPUT_DISABLED,lu.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(lu.START),this.endThumbKnobWidth=this.adapter.getThumbKnobWidth(lu.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===lu.START?this.valueStartBeforeDownEvent:this.valueBeforeDownEvent,t=this.thumb===lu.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(r5.THUMB_WITH_INDICATOR,lu.START),this.adapter.addThumbClass(r5.THUMB_WITH_INDICATOR,lu.END))},t.prototype.handleThumbMouseleave=function(){this.isDiscrete&&this.isRange&&(this.adapter.isInputFocused(lu.START)||this.adapter.isInputFocused(lu.END)||(this.adapter.removeThumbClass(r5.THUMB_WITH_INDICATOR,lu.START),this.adapter.removeThumbClass(r5.THUMB_WITH_INDICATOR,lu.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===lu.START?this.setValueStart(t):this.setValue(t)},t.prototype.handleInputFocus=function(e){if(this.isDiscrete&&(this.adapter.addThumbClass(r5.THUMB_WITH_INDICATOR,e),this.isRange)){var t=e===lu.START?lu.END:lu.START;this.adapter.addThumbClass(r5.THUMB_WITH_INDICATOR,t)}},t.prototype.handleInputBlur=function(e){if(this.isDiscrete&&(this.adapter.removeThumbClass(r5.THUMB_WITH_INDICATOR,e),this.isRange)){var t=e===lu.START?lu.END:lu.START;this.adapter.removeThumbClass(r5.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 lu.END;var n=this.adapter.getThumbBoundingClientRect(lu.START),i=this.adapter.getThumbBoundingClientRect(lu.END),r=e>=n.left&&e<=n.right,o=e>=i.left&&e<=i.right;return r&&o?null:r?lu.START:o?lu.END:t<this.valueStart?lu.START:t>this.value?lu.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)<r3.THUMB_UPDATE_MIN_PX?this.thumb:e<this.downEventClientX?this.adapter.isRTL()?lu.END:lu.START:this.adapter.isRTL()?lu.START:lu.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===lu.START?this.valueStart:this.value,n=String(t);this.adapter.setInputAttribute(r4.INPUT_VALUE,n,e),this.isRange&&e===lu.START?this.adapter.setInputAttribute(r4.INPUT_MIN,n,lu.END):this.isRange&&e===lu.END&&this.adapter.setInputAttribute(r4.INPUT_MAX,n,lu.START),this.adapter.getInputValue(e)!==n&&this.adapter.setInputValue(n,e);var i=this.adapter.getValueToAriaValueTextFn();i&&this.adapter.setInputAttribute(r4.ARIA_VALUETEXT,i(t),e)}},t.prototype.updateValueIndicatorUI=function(e){if(this.isDiscrete){var t=this.isRange&&e===lu.START?this.valueStart:this.value;this.adapter.setValueIndicatorText(t,e===lu.START?lu.START:lu.END),!e&&this.isRange&&this.adapter.setValueIndicatorText(this.valueStart,lu.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(ld.INACTIVE),r=Array.from({length:t}).fill(ld.ACTIVE),o=Array.from({length:n}).fill(ld.INACTIVE);this.adapter.updateTickMarks(i.concat(r).concat(o))}},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,r=i.emitInputEvent,o=i.emitChangeEvent;if(e=this.clampValue(e,t),this.isRange&&t===lu.START){if(this.valueStart===e)return;this.valueStart=e}else{if(this.value===e)return;this.value=e}this.updateUI(t),r&&this.adapter.emitInputEvent(t===lu.START?this.valueStart:this.value,t),o&&this.adapter.emitChangeEvent(t===lu.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===lu.START&&e>this.value)?this.value:this.isRange&&t===lu.END&&e<this.valueStart?this.valueStart:e},t.prototype.updateThumbAndTrackUI=function(e){var t=this,n=this.max,i=this.min,r=(this.value-this.valueStart)/(n-i),o=r*this.rect.width,a=this.adapter.isRTL(),s=r8?rN(window,"transform"):"transform";if(this.isRange){var l=this.adapter.isRTL()?(n-this.value)/(n-i)*this.rect.width:(this.valueStart-i)/(n-i)*this.rect.width,c=l+o;requestAnimationFrame(function(){!a&&e===lu.START||a&&e!==lu.START?(t.adapter.setTrackActiveStyleProperty("transform-origin","right"),t.adapter.setTrackActiveStyleProperty("left","unset"),t.adapter.setTrackActiveStyleProperty("right",t.rect.width-c+"px")):(t.adapter.setTrackActiveStyleProperty("transform-origin","left"),t.adapter.setTrackActiveStyleProperty("right","unset"),t.adapter.setTrackActiveStyleProperty("left",l+"px")),t.adapter.setTrackActiveStyleProperty(s,"scaleX("+r+")");var n=a?c:l,i=t.adapter.isRTL()?l:c;e!==lu.START&&e&&t.initialStylesRemoved||t.adapter.setThumbStyleProperty(s,"translateX("+n+"px)",lu.START),e!==lu.END&&e&&t.initialStylesRemoved||t.adapter.setThumbStyleProperty(s,"translateX("+i+"px)",lu.END),t.removeInitialStyles(a),t.updateOverlappingThumbsUI(n,i,e)})}else requestAnimationFrame(function(){var e=a?t.rect.width-o:o;t.adapter.setThumbStyleProperty(s,"translateX("+e+"px)",lu.END),t.adapter.setTrackActiveStyleProperty(s,"scaleX("+r+")"),t.removeInitialStyles(a)})},t.prototype.removeInitialStyles=function(e){if(!this.initialStylesRemoved){var t=e?"right":"left";this.adapter.removeThumbStyleProperty(t,lu.END),this.isRange&&this.adapter.removeThumbStyleProperty(t,lu.START),this.initialStylesRemoved=!0,this.resetTrackAndThumbAnimation()}},t.prototype.resetTrackAndThumbAnimation=function(){var e=this;if(this.isDiscrete){var t=r8?rN(window,"transition"):"transition",n="all 0s ease 0s";this.adapter.setThumbStyleProperty(t,n,lu.END),this.isRange&&this.adapter.setThumbStyleProperty(t,n,lu.START),this.adapter.setTrackActiveStyleProperty(t,n),requestAnimationFrame(function(){e.adapter.removeThumbStyleProperty(t,lu.END),e.adapter.removeTrackActiveStyleProperty(t),e.isRange&&e.adapter.removeThumbStyleProperty(t,lu.START)})}},t.prototype.updateOverlappingThumbsUI=function(e,t,n){var i=!1;if(this.adapter.isRTL()){var r=e-this.startThumbKnobWidth/2;i=t+this.endThumbKnobWidth/2>=r}else i=e+this.startThumbKnobWidth/2>=t-this.endThumbKnobWidth/2;i?(this.adapter.addThumbClass(r5.THUMB_TOP,n||lu.END),this.adapter.removeThumbClass(r5.THUMB_TOP,n===lu.START?lu.END:lu.START)):(this.adapter.removeThumbClass(r5.THUMB_TOP,lu.START),this.adapter.removeThumbClass(r5.THUMB_TOP,lu.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,r=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||r<t||r>n)throw Error("MDCSliderFoundation: values must be in [min, max] range. "+("Current values: [start value: "+r+", end value: ")+i+"]");if(r>i)throw Error("MDCSliderFoundation: start value must be <= end value. "+("Current values: [start value: "+r+", 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(lu.START,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(lu.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(lu.START,"change",this.inputStartChangeListener),this.adapter.registerInputEventHandler(lu.START,"focus",this.inputStartFocusListener),this.adapter.registerInputEventHandler(lu.START,"blur",this.inputStartBlurListener)),this.adapter.registerThumbEventHandler(lu.END,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(lu.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(lu.END,"change",this.inputEndChangeListener),this.adapter.registerInputEventHandler(lu.END,"focus",this.inputEndFocusListener),this.adapter.registerInputEventHandler(lu.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(lu.START,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(lu.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(lu.START,"change",this.inputStartChangeListener),this.adapter.deregisterInputEventHandler(lu.START,"focus",this.inputStartFocusListener),this.adapter.deregisterInputEventHandler(lu.START,"blur",this.inputStartBlurListener)),this.adapter.deregisterThumbEventHandler(lu.END,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(lu.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(lu.END,"change",this.inputEndChangeListener),this.adapter.deregisterInputEventHandler(lu.END,"focus",this.inputEndFocusListener),this.adapter.deregisterInputEventHandler(lu.END,"blur",this.inputEndBlurListener)},t.prototype.handlePointerup=function(){this.handleUp(),this.adapter.deregisterEventHandler("pointermove",this.moveListener)},t.SUPPORTS_POINTER_EVENTS=r8&&!!window.PointerEvent,t}(iN),r9=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.skipInitialUIUpdate=!1,t.valueToAriaValueTextFn=null,t}return r1(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 r7({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("."+r5.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("."+r5.VALUE_INDICATOR_TEXT).textContent=String(t)},getValueToAriaValueTextFn:function(){return e.valueToAriaValueTextFn},updateTickMarks:function(t){var n=e.root.querySelector("."+r5.TICK_MARKS_CONTAINER);n||((n=document.createElement("div")).classList.add(r5.TICK_MARKS_CONTAINER),e.root.querySelector("."+r5.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(r6.CHANGE,{value:t,thumb:n})},emitInputEvent:function(t,n){e.emit(r6.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("."+r5.INPUT)),this.thumbs=[].slice.call(this.root.querySelectorAll("."+r5.THUMB)),this.trackActive=this.root.querySelector("."+r5.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===lu.END?this.thumbs[this.thumbs.length-1]:this.thumbs[0]},t.prototype.getInput=function(e){return e===lu.END?this.inputs[this.inputs.length-1]:this.inputs[0]},t.prototype.getRipple=function(e){return e===lu.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 r=document.createElement("div"),o=t[i]===ld.ACTIVE?r5.TICK_MARK_ACTIVE:r5.TICK_MARK_INACTIVE;r.classList.add(o),n.appendChild(r)}e.appendChild(n)},t.prototype.updateTickMarks=function(e,t){for(var n=Array.from(e.children),i=0;i<n.length;i++)t[i]===ld.ACTIVE?(n[i].classList.add(r5.TICK_MARK_ACTIVE),n[i].classList.remove(r5.TICK_MARK_INACTIVE)):(n[i].classList.add(r5.TICK_MARK_INACTIVE),n[i].classList.remove(r5.TICK_MARK_ACTIVE))},t.prototype.createRipples=function(){for(var e=[],t=[].slice.call(this.root.querySelectorAll("."+r5.THUMB)),n=this,i=0;i<t.length;i++)!function(i){var r=t[i],o=n.inputs[i],a=r2(r2({},rc.createAdapter(n)),{addClass:function(e){r.classList.add(e)},computeBoundingRect:function(){return r.getBoundingClientRect()},deregisterInteractionHandler:function(e,t){o.removeEventListener(e,t)},isSurfaceActive:function(){return iY(o,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(e,t){o.addEventListener(e,t)},removeClass:function(e){r.classList.remove(e)},updateCssVariable:function(e,t){r.style.setProperty(e,t)}}),s=new rc(r,new rl(a));s.unbounded=!0,e.push(s)}(i);return e},t}(iB),oe=function(e,t){return(oe=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 ot(e,t){function n(){this.constructor=e}oe(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var on=function(){return(on=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},oi={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"},or={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"])'},oo={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"}(lh||(lh={})),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"}(lm||(lm={}));var oa=function(e,t){return(oa=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 os(e,t){function n(){this.constructor=e}oa(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var ol=function(){return(ol=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},oc=function(e,t){return(oc=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 od(e,t){function n(){this.constructor=e}oc(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var ou=function(){return(ou=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},oh={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"},om={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 ."+oh.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+oh.LIST_ITEM_CLASS+" a\n ",FOCUSABLE_CHILD_ELEMENTS:"\n ."+oh.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+oh.LIST_ITEM_CLASS+" a,\n ."+oh.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+oh.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]'},of={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300},op={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"},og=new Set;og.add(op.BACKSPACE),og.add(op.ENTER),og.add(op.SPACEBAR),og.add(op.PAGE_UP),og.add(op.PAGE_DOWN),og.add(op.END),og.add(op.HOME),og.add(op.ARROW_LEFT),og.add(op.ARROW_UP),og.add(op.ARROW_RIGHT),og.add(op.ARROW_DOWN),og.add(op.DELETE),og.add(op.ESCAPE);var ob={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},o_=new Map;o_.set(ob.BACKSPACE,op.BACKSPACE),o_.set(ob.ENTER,op.ENTER),o_.set(ob.SPACEBAR,op.SPACEBAR),o_.set(ob.PAGE_UP,op.PAGE_UP),o_.set(ob.PAGE_DOWN,op.PAGE_DOWN),o_.set(ob.END,op.END),o_.set(ob.HOME,op.HOME),o_.set(ob.ARROW_LEFT,op.ARROW_LEFT),o_.set(ob.ARROW_UP,op.ARROW_UP),o_.set(ob.ARROW_RIGHT,op.ARROW_RIGHT),o_.set(ob.ARROW_DOWN,op.ARROW_DOWN),o_.set(ob.DELETE,op.DELETE),o_.set(ob.ESCAPE,op.ESCAPE);var oy=new Set;function ov(e){var t=e.key;if(og.has(t))return t;var n=o_.get(e.keyCode);return n||op.UNKNOWN}oy.add(op.PAGE_UP),oy.add(op.PAGE_DOWN),oy.add(op.END),oy.add(op.HOME),oy.add(op.ARROW_LEFT),oy.add(op.ARROW_UP),oy.add(op.ARROW_RIGHT),oy.add(op.ARROW_DOWN);var ox=["input","button","textarea","select"],ow=function(e){var t=e.target;if(t){var n=(""+t.tagName).toLowerCase();-1===ox.indexOf(n)&&e.preventDefault()}};function oF(e,t){var n,i=e.nextChar,r=e.focusItemAtIndex,o=e.sortedIndexByFirstChar,a=e.focusedItemIndex,s=e.skipFocus,l=e.isItemAtIndexDisabled;return clearTimeout(t.bufferClearTimeout),t.bufferClearTimeout=setTimeout(function(){oE(t)},of.TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS),t.typeaheadBuffer=t.typeaheadBuffer+i,-1===(n=1===t.typeaheadBuffer.length?function(e,t,n,i){var r,o=i.typeaheadBuffer[0],a=e.get(o);if(!a)return -1;if(o===i.currentFirstChar&&a[i.sortedIndexCursor].index===t){i.sortedIndexCursor=(i.sortedIndexCursor+1)%a.length;var s=a[i.sortedIndexCursor].index;if(!n(s))return s}i.currentFirstChar=o;var l=-1;for(r=0;r<a.length;r++)if(!n(a[r].index)){l=r;break}for(;r<a.length;r++)if(a[r].index>t&&!n(a[r].index)){l=r;break}return -1!==l?(i.sortedIndexCursor=l,a[i.sortedIndexCursor].index):-1}(o,a,l,t):function(e,t,n){var i=n.typeaheadBuffer[0],r=e.get(i);if(!r)return -1;var o=r[n.sortedIndexCursor];if(0===o.text.lastIndexOf(n.typeaheadBuffer,0)&&!t(o.index))return o.index;for(var a=(n.sortedIndexCursor+1)%r.length,s=-1;a!==n.sortedIndexCursor;){var l=r[a],c=0===l.text.lastIndexOf(n.typeaheadBuffer,0),d=!t(l.index);if(c&&d){s=a;break}a=(a+1)%r.length}return -1!==s?(n.sortedIndexCursor=s,r[n.sortedIndexCursor].index):-1}(o,l,t))||s||r(n),n}function ok(e){return e.typeaheadBuffer.length>0}function oE(e){e.typeaheadBuffer=""}function oA(e,t){var n=e.event,i=e.isTargetListItem,r=e.focusedItemIndex,o=e.focusItemAtIndex,a=e.sortedIndexByFirstChar,s=e.isItemAtIndexDisabled,l="ArrowLeft"===ov(n),c="ArrowUp"===ov(n),d="ArrowRight"===ov(n),u="ArrowDown"===ov(n),h="Home"===ov(n),m="End"===ov(n),f="Enter"===ov(n),p="Spacebar"===ov(n);if(l||c||d||u||h||m||f)return -1;if(!p&&1===n.key.length){ow(n);var g={focusItemAtIndex:o,focusedItemIndex:r,nextChar:n.key.toLowerCase(),sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:s};return oF(g,t)}if(!p)return -1;if(i&&ow(n),i&&ok(t)){var g={focusItemAtIndex:o,focusedItemIndex:r,nextChar:" ",sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:s};return oF(g,t)}return -1}var oC=function(e){function t(n){var i=e.call(this,ou(ou({},t.defaultAdapter),n))||this;return i.wrapFocus_=!1,i.isVertical_=!0,i.isSingleSelectionList_=!1,i.selectedIndex_=of.UNSET_INDEX,i.focusedItemIndex=of.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 od(t,e),Object.defineProperty(t,"strings",{get:function(){return om},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return oh},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return of},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,oh.LIST_ITEM_SELECTED_CLASS),n=this.adapter.listItemAtIndexHasClass(e,oh.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&&ok(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,r="ArrowLeft"===ov(e),o="ArrowUp"===ov(e),a="ArrowRight"===ov(e),s="ArrowDown"===ov(e),l="Home"===ov(e),c="End"===ov(e),d="Enter"===ov(e),u="Spacebar"===ov(e),h="A"===e.key||"a"===e.key;if(this.adapter.isRootFocused()){if(o||c?(e.preventDefault(),this.focusLastElement()):(s||l)&&(e.preventDefault(),this.focusFirstElement()),this.hasTypeahead){var m={event:e,focusItemAtIndex:function(e){i.focusItemAtIndex(e)},focusedItemIndex:-1,isTargetListItem:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(e){return i.adapter.listItemAtIndexHasClass(e,oh.LIST_ITEM_DISABLED_CLASS)}};oA(m,this.typeaheadState)}return}var f=this.adapter.getFocusedElementIndex();if(-1!==f||!((f=n)<0)){if(this.isVertical_&&s||!this.isVertical_&&a)ow(e),this.focusNextElement(f);else if(this.isVertical_&&o||!this.isVertical_&&r)ow(e),this.focusPrevElement(f);else if(l)ow(e),this.focusFirstElement();else if(c)ow(e),this.focusLastElement();else if(h&&e.ctrlKey&&this.isCheckboxList_)e.preventDefault(),this.toggleAll(this.selectedIndex_===of.UNSET_INDEX?[]:this.selectedIndex_);else if((d||u)&&t){var p=e.target;if(p&&"A"===p.tagName&&d||(ow(e),this.adapter.listItemAtIndexHasClass(f,oh.LIST_ITEM_DISABLED_CLASS)))return;this.isTypeaheadInProgress()||(this.isSelectableList_()&&this.setSelectedIndexOnAction_(f),this.adapter.notifyAction(f))}if(this.hasTypeahead){var m={event:e,focusItemAtIndex:function(e){i.focusItemAtIndex(e)},focusedItemIndex:this.focusedItemIndex,isTargetListItem:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(e){return i.adapter.listItemAtIndexHasClass(e,oh.LIST_ITEM_DISABLED_CLASS)}};oA(m,this.typeaheadState)}}},t.prototype.handleClick=function(e,t){e!==of.UNSET_INDEX&&(this.adapter.listItemAtIndexHasClass(e,oh.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,oh.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(e,om.ARIA_DISABLED,"false")):(this.adapter.addClassForElementIndex(e,oh.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(e,om.ARIA_DISABLED,"true")))},t.prototype.setSingleSelectionAtIndex_=function(e){if(this.selectedIndex_!==e){var t=oh.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass_&&(t=oh.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex_!==of.UNSET_INDEX&&this.adapter.removeClassForElementIndex(this.selectedIndex_,t),this.setAriaForSingleSelectionAtIndex_(e),this.setTabindexAtIndex(e),e!==of.UNSET_INDEX&&this.adapter.addClassForElementIndex(e,t),this.selectedIndex_=e}},t.prototype.setAriaForSingleSelectionAtIndex_=function(e){this.selectedIndex_===of.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter.getAttributeForElementIndex(e,om.ARIA_CURRENT));var t=null!==this.ariaCurrentAttrValue_,n=t?om.ARIA_CURRENT:om.ARIA_SELECTED;if(this.selectedIndex_!==of.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex_,n,"false"),e!==of.UNSET_INDEX){var i=t?this.ariaCurrentAttrValue_:"true";this.adapter.setAttributeForElementIndex(e,n,i)}},t.prototype.getSelectionAttribute=function(){return this.useSelectedAttr_?om.ARIA_SELECTED:om.ARIA_CHECKED},t.prototype.setRadioAtIndex_=function(e){var t=this.getSelectionAttribute();this.adapter.setCheckedCheckboxOrRadioAtIndex(e,!0),this.selectedIndex_!==of.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===of.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!==of.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_!==of.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===of.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 r=this.selectedIndex_===of.UNSET_INDEX?[]:this.selectedIndex_.slice();i?r.push(e):r=r.filter(function(t){return t!==e}),this.selectedIndex_=r},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,oh.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),oF({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,oh.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 r=t(i).trim();if(r){var o=r[0].toLowerCase();n.has(o)||n.set(o,[]),n.get(o).push({text:r.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(){oE(this.typeaheadState)},t}(iN),oT=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return od(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("."+oh.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(om.ARIA_ORIENTATION);this.vertical=e!==om.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(om.FOCUSABLE_CHILD_ELEMENTS)).forEach(function(e){return e.setAttribute("tabindex","-1")}),this.foundation.layout()},t.prototype.getPrimaryText=function(e){var t=e.querySelector("."+oh.LIST_ITEM_PRIMARY_TEXT_CLASS);if(t)return t.textContent||"";var n=e.querySelector("."+oh.LIST_ITEM_TEXT_CLASS);return n&&n.textContent||""},t.prototype.initializeListType=function(){var e=this,t=this.root.querySelectorAll(om.ARIA_ROLE_CHECKBOX_SELECTOR),n=this.root.querySelector(om.ARIA_CHECKED_RADIO_SELECTOR);if(t.length){var i=this.root.querySelectorAll(om.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 oC({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(om.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(t){return!!e.listElements[t].querySelector(om.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(t){return e.listElements[t].querySelector(om.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(om.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 r=e.listElements[t];r&&r.setAttribute(n,i)},setCheckedCheckboxOrRadioAtIndex:function(t,n){var i=e.listElements[t].querySelector(om.CHECKBOX_RADIO_SELECTOR);i.checked=n;var r=document.createEvent("Event");r.initEvent("change",!0,!0),i.dispatchEvent(r)},setTabIndexForListItemChildren:function(t,n){var i=e.listElements[t];[].slice.call(i.querySelectorAll(om.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX)).forEach(function(e){return e.setAttribute("tabindex",n)})}})},t.prototype.getListItemIndex_=function(e){var t=ij(e.target,"."+oh.LIST_ITEM_CLASS+", ."+oh.ROOT);return t&&iY(t,"."+oh.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(oh.LIST_ITEM_CLASS),t)},t.prototype.handleClickEvent_=function(e){var t=this.getListItemIndex_(e),n=!iY(e.target,om.CHECKBOX_RADIO_SELECTOR);this.foundation.handleClick(t,n)},t}(iB),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 oM(e,t){function n(){this.constructor=e}oS(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var oL=function(){return(oL=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},oD=function(e){function t(n){var i=e.call(this,oL(oL({},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=lm.TOP_START,i.originCorner=lm.TOP_START,i.anchorMargin={top:0,right:0,bottom:0,left:0},i.position={x:0,y:0},i}return oM(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return oi},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return or},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return oo},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Corner",{get:function(){return lm},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^lh.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()},oo.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()},oo.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),r=this.hasBit(n,lh.BOTTOM)?"bottom":"top",o=this.hasBit(n,lh.RIGHT)?"right":"left",a=this.getHorizontalOriginOffset(n),s=this.getVerticalOriginOffset(n),l=this.measurements,c=l.anchorSize,d=l.surfaceSize,u=((e={})[o]=a,e[r]=s,e);c.width/d.width>oo.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(o="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(u),this.adapter.setTransformOrigin(o+" "+r),this.adapter.setPosition(u),this.adapter.setMaxHeight(i?i+"px":""),this.hasBit(n,lh.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,r,o=this.originCorner,a=this.measurements,s=a.viewportDistance,l=a.anchorSize,c=a.surfaceSize,d=t.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,lh.BOTTOM)?(e=s.top-d+l.height+this.anchorMargin.bottom,n=s.bottom-d-this.anchorMargin.bottom):(e=s.top-d+this.anchorMargin.top,n=s.bottom-d+l.height-this.anchorMargin.top),!(n-c.height>0)&&e>=n&&(o=this.setBit(o,lh.BOTTOM));var u=this.adapter.isRtl(),h=this.hasBit(this.anchorCorner,lh.FLIP_RTL),m=this.hasBit(this.anchorCorner,lh.RIGHT)||this.hasBit(o,lh.RIGHT),f=!1;(f=u&&h?!m:m)?(i=s.left+l.width+this.anchorMargin.right,r=s.right-this.anchorMargin.right):(i=s.left+this.anchorMargin.left,r=s.right+l.width-this.anchorMargin.left);var p=i-c.width>0,g=r-c.width>0,b=this.hasBit(o,lh.FLIP_RTL)&&this.hasBit(o,lh.RIGHT);return g&&b&&u||!p&&b?o=this.unsetBit(o,lh.RIGHT):(p&&f&&u||p&&!f&&m||!g&&i>=r)&&(o=this.setBit(o,lh.RIGHT)),o},t.prototype.getMenuSurfaceMaxHeight=function(e){var n=this.measurements.viewportDistance,i=0,r=this.hasBit(e,lh.BOTTOM),o=this.hasBit(this.anchorCorner,lh.BOTTOM),a=t.numbers.MARGIN_TO_EDGE;return r?(i=n.top+this.anchorMargin.top-a,o||(i+=this.measurements.anchorSize.height)):(i=n.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-a,o&&(i-=this.measurements.anchorSize.height)),i},t.prototype.getHorizontalOriginOffset=function(e){var t=this.measurements.anchorSize,n=this.hasBit(e,lh.RIGHT),i=this.hasBit(this.anchorCorner,lh.RIGHT);if(n){var r=i?t.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?r-(this.measurements.viewportSize.width-this.measurements.bodySize.width):r}return i?t.width-this.anchorMargin.right:this.anchorMargin.left},t.prototype.getVerticalOriginOffset=function(e){var t=this.measurements.anchorSize,n=this.hasBit(e,lh.BOTTOM),i=this.hasBit(this.anchorCorner,lh.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,r=i.windowScroll,o=i.viewportDistance,a=Object.keys(e);try{for(var s=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),l=s.next();!l.done;l=s.next()){var c=l.value,d=e[c]||0;d+=o[c],this.isFixedPosition||("top"===c?d+=r.y:"bottom"===c?d-=r.y:"left"===c?d+=r.x:d-=r.x),e[c]=d}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}},t.prototype.maybeRestoreFocus=function(){var e=this.adapter.isFocused(),t=document.activeElement&&this.adapter.isElementInContainer(document.activeElement);(e||t)&&this.adapter.restoreFocus()},t.prototype.hasBit=function(e,t){return!!(e&t)},t.prototype.setBit=function(e,t){return e|t},t.prototype.unsetBit=function(e,t){return e^t},t.prototype.isFinite=function(e){return"number"==typeof e&&isFinite(e)},t}(iN),oI=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oM(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(oi.ANCHOR)?t:null,this.root.classList.contains(oi.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(or.OPENED_EVENT,this.registerBodyClickListener),this.listen(or.CLOSED_EVENT,this.deregisterBodyClickListener)},t.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown),this.unlisten(or.OPENED_EVENT,this.registerBodyClickListener),this.unlisten(or.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(oi.FIXED):this.root.classList.remove(oi.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 oD({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(oD.strings.CLOSED_EVENT,{})},notifyOpen:function(){return e.emit(oD.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,r=(n=window,void 0===i&&(i=!1),(void 0===lf||i)&&(lf="transform"in n.document.createElement("div").style?"transform":"webkitTransform"),lf+"-origin");e.root.style.setProperty(r,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}(iB),oO={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},oR={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list",SELECTED_EVENT:"MDCMenu:selected"},oP={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"}(lp||(lp={}));var o$=function(e){function t(n){var i=e.call(this,ol(ol({},t.defaultAdapter),n))||this;return i.closeAnimationEndTimerId_=0,i.defaultFocusState_=lp.LIST_ROOT,i}return os(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return oO},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return oR},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return oP},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)},oD.numbers.TRANSITION_CLOSE_DURATION))},t.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState_){case lp.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case lp.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case lp.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,oR.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(t,oO.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(e,oO.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(e,oR.ARIA_CHECKED_ATTR,"true")},t.prototype.setEnabled=function(e,t){this.validatedIndex_(e),t?(this.adapter.removeClassFromElementAtIndex(e,oh.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(e,oR.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(e,oh.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(e,oR.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}(iN),oN=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return os(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e,t){void 0===e&&(e=function(e){return new oI(e)}),void 0===t&&(t=function(e){return new oT(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(oR.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(oD.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.listen("keydown",this.handleKeydown_),this.listen(oC.strings.ACTION_EVENT,this.handleItemAction_)},t.prototype.destroy=function(){this.list_&&this.list_.destroy(),this.menuSurface_.destroy(),this.menuSurface_.unlisten(oD.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.unlisten("keydown",this.handleKeydown_),this.unlisten(oC.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:of.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 o$({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(oR.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(oR.LIST_SELECTOR).focus()},isSelectableItemAtIndex:function(t){return!!ij(e.items[t],"."+oO.MENU_SELECTION_GROUP)},getSelectedSiblingOfItemAtIndex:function(t){var n=ij(e.items[t],"."+oO.MENU_SELECTION_GROUP).querySelector("."+oO.MENU_SELECTED_LIST_ITEM);return n?e.items.indexOf(n):-1}})},t}(iB),oB={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"},oz={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"},oj={LABEL_SCALE:.75,UNSET_INDEX:-1,CLICK_DEBOUNCE_TIMEOUT_MS:330},oY=function(e){function t(n,i){void 0===i&&(i={});var r=e.call(this,on(on({},t.defaultAdapter),n))||this;return r.disabled=!1,r.isMenuOpen=!1,r.useDefaultValidation=!0,r.customValidity=!0,r.lastSelectedIndex=oj.UNSET_INDEX,r.clickDebounceTimeout=0,r.recentlyClicked=!1,r.leadingIcon=i.leadingIcon,r.helperText=i.helperText,r}return ot(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return oB},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return oj},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return oz},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===oj.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!==oj.UNSET_INDEX?t[e]:""},t.prototype.getDisabled=function(){return this.disabled},t.prototype.setDisabled=function(e){this.disabled=e,this.disabled?(this.adapter.addClass(oB.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass(oB.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(oB.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(oB.FOCUSED),n=e||t,i=this.adapter.hasClass(oB.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(oB.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(oB.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},t.prototype.handleMenuItemAction=function(e){this.setSelectedIndex(e,!0)},t.prototype.handleFocus=function(){this.adapter.addClass(oB.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(oB.FOCUSED)){var t=ov(e)===op.ENTER,n=ov(e)===op.SPACEBAR,i=ov(e)===op.ARROW_UP,r=ov(e)===op.ARROW_DOWN;if(!n&&e.key&&1===e.key.length||n&&this.adapter.isTypeaheadInProgress()){var o=n?" ":e.key,a=this.adapter.typeaheadMatchItem(o,this.getSelectedIndex());a>=0&&this.setSelectedIndex(a),e.preventDefault();return}(t||n||i||r)&&(i&&this.getSelectedIndex()>0?this.setSelectedIndex(this.getSelectedIndex()-1):r&&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(oB.FOCUSED);if(e){var n=oj.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(oB.INVALID),this.adapter.removeMenuClass(oB.MENU_INVALID)):(this.adapter.addClass(oB.INVALID),this.adapter.addMenuClass(oB.MENU_INVALID)),this.syncHelperTextValidity(e)},t.prototype.isValid=function(){return this.useDefaultValidation&&this.adapter.hasClass(oB.REQUIRED)&&!this.adapter.hasClass(oB.DISABLED)?this.getSelectedIndex()!==oj.UNSET_INDEX&&(0!==this.getSelectedIndex()||!!this.getValue()):this.customValidity},t.prototype.setRequired=function(e){e?this.adapter.addClass(oB.REQUIRED):this.adapter.removeClass(oB.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(lm.BOTTOM_START)),this.adapter.setMenuWrapFocus(!1),this.setDisabled(this.adapter.hasClass(oB.DISABLED)),this.syncHelperTextValidity(!this.adapter.hasClass(oB.INVALID)),this.layout(),this.layoutOptions()},t.prototype.blur=function(){this.adapter.removeClass(oB.FOCUSED),this.layout(),this.adapter.deactivateBottomLine(),this.adapter.hasClass(oB.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(oz.ARIA_DESCRIBEDBY,n):this.adapter.removeSelectAnchorAttr(oz.ARIA_DESCRIBEDBY)}},t.prototype.setClickDebounceTimeout=function(){var e=this;clearTimeout(this.clickDebounceTimeout),this.clickDebounceTimeout=setTimeout(function(){e.recentlyClicked=!1},oj.CLICK_DEBOUNCE_TIMEOUT_MS),this.recentlyClicked=!0},t}(iN),oH={ARIA_HIDDEN:"aria-hidden",ROLE:"role"},oU={HELPER_TEXT_VALIDATION_MSG:"mdc-select-helper-text--validation-msg",HELPER_TEXT_VALIDATION_MSG_PERSISTENT:"mdc-select-helper-text--validation-msg-persistent"},oV=function(e){function t(n){return e.call(this,on(on({},t.defaultAdapter),n))||this}return ot(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return oU},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return oH},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(oH.ARIA_HIDDEN)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.setValidation=function(e){e?this.adapter.addClass(oU.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(oU.HELPER_TEXT_VALIDATION_MSG)},t.prototype.setValidationMsgPersistent=function(e){e?this.adapter.addClass(oU.HELPER_TEXT_VALIDATION_MSG_PERSISTENT):this.adapter.removeClass(oU.HELPER_TEXT_VALIDATION_MSG_PERSISTENT)},t.prototype.setValidity=function(e){if(this.adapter.hasClass(oU.HELPER_TEXT_VALIDATION_MSG)){var t=this.adapter.hasClass(oU.HELPER_TEXT_VALIDATION_MSG_PERSISTENT);if(!e||t){this.showToScreenReader(),e?this.adapter.removeAttr(oH.ROLE):this.adapter.setAttr(oH.ROLE,"alert");return}this.adapter.removeAttr(oH.ROLE),this.hide()}},t.prototype.showToScreenReader=function(){this.adapter.removeAttr(oH.ARIA_HIDDEN)},t.prototype.hide=function(){this.adapter.setAttr(oH.ARIA_HIDDEN,"true")},t}(iN),oW=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ot(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 oV({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}(iB),oG={ICON_EVENT:"MDCSelect:icon",ICON_ROLE:"button"},oq=["click","keydown"],oK=function(e){function t(n){var i=e.call(this,on(on({},t.defaultAdapter),n))||this;return i.savedTabIndex_=null,i.interactionHandler_=function(e){return i.handleInteraction(e)},i}return ot(t,e),Object.defineProperty(t,"strings",{get:function(){return oG},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"),oq.forEach(function(t){e.adapter.registerInteractionHandler(t,e.interactionHandler_)})},t.prototype.destroy=function(){var e=this;oq.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",oG.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}(iN),oX=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ot(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 oK({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(oK.strings.ICON_EVENT,{},!0)}})},t}(iB),oZ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ot(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e,t,n,i,r,o){if(void 0===e&&(e=function(e){return new iq(e)}),void 0===t&&(t=function(e){return new i0(e)}),void 0===n&&(n=function(e){return new i7(e)}),void 0===i&&(i=function(e){return new oN(e)}),void 0===r&&(r=function(e){return new oX(e)}),void 0===o&&(o=function(e){return new oW(e)}),this.selectAnchor=this.root.querySelector(oz.SELECT_ANCHOR_SELECTOR),this.selectedText=this.root.querySelector(oz.SELECTED_TEXT_SELECTOR),this.hiddenInput=this.root.querySelector(oz.HIDDEN_INPUT_SELECTOR),!this.selectedText)throw Error("MDCSelect: Missing required element: The following selector must be present: '"+oz.SELECTED_TEXT_SELECTOR+"'");if(this.selectAnchor.hasAttribute(oz.ARIA_CONTROLS)){var a=document.getElementById(this.selectAnchor.getAttribute(oz.ARIA_CONTROLS));a&&(this.helperText=o(a))}this.menuSetup(i);var s=this.root.querySelector(oz.LABEL_SELECTOR);this.label=s?e(s):null;var l=this.root.querySelector(oz.LINE_RIPPLE_SELECTOR);this.lineRipple=l?t(l):null;var c=this.root.querySelector(oz.OUTLINE_SELECTOR);this.outline=c?n(c):null;var d=this.root.querySelector(oz.LEADING_ICON_SELECTOR);d&&(this.leadingIcon=r(d)),this.root.classList.contains(oB.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(or.CLOSED_EVENT,this.handleMenuClosed),this.menu.listen(or.OPENED_EVENT,this.handleMenuOpened),this.menu.listen(oR.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(or.CLOSED_EVENT,this.handleMenuClosed),this.menu.unlisten(or.OPENED_EVENT,this.handleMenuOpened),this.menu.unlisten(oR.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(oz.VALUE_ATTR)||""}),this.hiddenInput&&(this.hiddenInput.value=this.value)},t.prototype.getDefaultFoundation=function(){return new oY(on(on(on(on({},this.getSelectAdapterMethods()),this.getCommonAdapterMethods()),this.getOutlineAdapterMethods()),this.getLabelAdapterMethods()),this.getFoundationMap())},t.prototype.menuSetup=function(e){this.menuElement=this.root.querySelector(oz.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(oz.VALUE_ATTR)||""})},t.prototype.createRipple=function(){var e=this,t=on(on({},rc.createAdapter({root:this.selectAnchor})),{registerInteractionHandler:function(t,n){e.selectAnchor.addEventListener(t,n)},deregisterInteractionHandler:function(t,n){e.selectAnchor.removeEventListener(t,n)}});return new rc(this.selectAnchor,new rl(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(oz.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(oz.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}(iB),oJ=function(e,t){return(oJ=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 oQ(e,t){function n(){this.constructor=e}oJ(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o0=function(){return(o0=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o1={ROOT:"mdc-form-field"},o2={LABEL_SELECTOR:".mdc-form-field > label"},o5=function(e){function t(n){var i=e.call(this,o0(o0({},t.defaultAdapter),n))||this;return i.click=function(){i.handleClick()},i}return oQ(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return o1},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return o2},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}(iN),o3=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oQ(t,e),t.attachTo=function(e){return new t(e)},t.prototype.labelEl=function(){var e=o5.strings.LABEL_SELECTOR;return this.root.querySelector(e)},t.prototype.getDefaultFoundation=function(){var e=this;return new o5({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}(iB),o4=function(e,t){return(o4=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 o6(e,t){function n(){this.constructor=e}o4(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o8=function(){return(o8=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o7={ICON_BUTTON_ON:"mdc-icon-button--on",ROOT:"mdc-icon-button"},o9={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"},ae=function(e){function t(n){var i=e.call(this,o8(o8({},t.defaultAdapter),n))||this;return i.hasToggledAriaLabel=!1,i}return o6(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return o7},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return o9},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(o9.DATA_ARIA_LABEL_ON),t=this.adapter.getAttr(o9.DATA_ARIA_LABEL_OFF);if(e&&t){if(null!==this.adapter.getAttr(o9.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(o9.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(o7.ICON_BUTTON_ON)},t.prototype.toggle=function(e){if(void 0===e&&(e=!this.isOn()),e?this.adapter.addClass(o7.ICON_BUTTON_ON):this.adapter.removeClass(o7.ICON_BUTTON_ON),this.hasToggledAriaLabel){var t=e?this.adapter.getAttr(o9.DATA_ARIA_LABEL_ON):this.adapter.getAttr(o9.DATA_ARIA_LABEL_OFF);this.adapter.setAttr(o9.ARIA_LABEL,t||"")}else this.adapter.setAttr(o9.ARIA_PRESSED,""+e)},t}(iN),at=ae.strings,an=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rippleComponent=t.createRipple(),t}return o6(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 ae({addClass:function(t){return e.root.classList.add(t)},hasClass:function(t){return e.root.classList.contains(t)},notifyChange:function(t){e.emit(at.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 rc(this.root);return e.unbounded=!0,e},t}(iB);let ai="important",ar=" !"+ai,ao=eF(class extends ek{constructor(e){if(super(e),e.type!==ew.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(ar);e.includes("-")||t?n.setProperty(e,t?i.slice(0,-11):i,t?ai:""):n[e]=i}}return X}});var aa=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};let as=n(73041),al=n(61526);class ac extends CustomEvent{constructor(e){super(ac.NAME,{detail:e,bubbles:!0,composed:!0})}}function ad(e,t,n,i,r){switch(i=i||"listbox",e){case lg.RADIO:i="radiogroup";break;case lg.MULTI_CHECKBOX:i="group"}return K`
116
+ `:K``},onAdd:void 0})))}getConsoleAppConfig(){return iS(this,void 0,void 0,function*(){var e;try{let t=yield fetch((null!=(e=iD.managerUrl)?e:"")+"/consoleappconfig/"+iD.displayRealm+".json");return this._consoleAppConfig=yield t.json(),!0}catch(e){return!0}})}getConsolePreferredLanguage(){return iS(this,arguments,void 0,function*(e=this.console){return e.retrieveData("LANGUAGE")})}getUserPreferredLanguage(){return iS(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 iS(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 iS(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 iS(this,void 0,void 0,function*(){var e,t,n,i;if(!this.config.basicLoginProvider)return;let r={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},o=!1;for(this._basicIdentity={roles:void 0,token:void 0,user:void 0};!o;){if((r=yield this.config.basicLoginProvider(r.username,r.password)).cancel){console.debug("Basic authentication cancelled by user");break}if(!r.username||!r.password)continue;this._basicIdentity.token=btoa(r.username+":"+r.password);let e=!1;try{let t=yield nW.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"),o=!0;let e=yield nW.api.UserResource.getCurrentUserClientRoles(this.clientId);this._basicIdentity.roles=e.data}else{console.debug("Unknown response so aborting"),this._basicIdentity=void 0;break}}o&&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 iS(this,void 0,void 0,function*(){var e,t,n,i;try{this._keycloak=new iv({clientId:this._config.clientId,realm:this._config.realm,url:this._config.keycloakUrl});let r=yield this._getNativeOfflineRefreshToken(),o=yield this._keycloak.init({checkLoginIframe:!1,onLoad:"check-sso"});if(!o&&r)try{console.error("SETTING OFFLINE TOKEN"),this._keycloak.refreshToken=r,o=yield this._updateKeycloakAccessToken()}catch(e){console.error("Failed to authenticate using offline token")}if(o)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(ls.AUTH_FAILED),console.error("Failed to initialise Keycloak: "+e),!1}})}_createTokenUpdateInterval(){this._keycloakUpdateTokenInterval||(this._keycloakUpdateTokenInterval=window.setInterval(()=>iS(this,void 0,void 0,function*(){yield this._updateKeycloakAccessToken().catch(()=>{console.debug("Keycloak failed to refresh the access token"),this._onDisconnect()})}),1e4))}_updateKeycloakAccessToken(){return iS(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 iS(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(ll.ERROR),console.warn("Error set: "+e)}_clearWebHistory(){var e;null==(e=this.console)||e._doSendGenericMessage("CLEAR_WEB_HISTORY",void 0)}_onDisconnect(){return iS(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(ll.OFFLINE),this.reconnect())})}_onReconnected(){console.debug("Reconnected"),this._disconnected=!1,this._createTokenUpdateInterval(),this._emitEvent(ll.ONLINE)}reconnect(){return iS(this,arguments,void 0,function*(e=3e3){if(!this._disconnected)return;this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=void 0);let t=()=>iS(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===li.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(iL.MAX_RECONNECT_DELAY,e+3e3))),this._reconnectTimer=window.setTimeout(()=>this.reconnect(e),e);return}this._onReconnected()}})}isKeycloakReachable(){return iS(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)}})}}iL.MAX_RECONNECT_DELAY=45e3;let iD=new iL,iI=iD,iO=eF(class extends ek{constructor(e){if(super(e),e.type!==ew.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 X}});var iR=function(e,t){return(iR=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 iP(e,t){function n(){this.constructor=e}iR(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i$=function(){return(i$=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},iN=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}(),iB=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,function(){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,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}(arguments[t]));return e}(n)),this.foundation=void 0===t?this.getDefaultFoundation():t,this.foundation.init(),this.initialSyncWithDOM()}return e.attachTo=function(t){return new e(t,new iN({}))},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 iz(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 ij(e,t){if(e.closest)return e.closest(t);for(var n=e;n;){if(iY(n,t))return n;n=n.parentElement}return null}function iY(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}var iH=function(e,t){return(iH=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 iU(e,t){function n(){this.constructor=e}iH(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var iV=function(){return(iV=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},iW={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},iG=function(e){function t(n){var i=e.call(this,iV(iV({},t.defaultAdapter),n))||this;return i.shakeAnimationEndHandler_=function(){return i.handleShakeAnimationEnd_()},i}return iU(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return iW},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,r=n.LABEL_SHAKE;e?this.adapter.addClass(i):(this.adapter.removeClass(i),this.adapter.removeClass(r))},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}(iN),iq=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return iU(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 iG({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}(iB),iK=function(e,t){return(iK=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 iX(e,t){function n(){this.constructor=e}iK(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var iZ=function(){return(iZ=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},iJ={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},iQ=function(e){function t(n){var i=e.call(this,iZ(iZ({},t.defaultAdapter),n))||this;return i.transitionEndHandler_=function(e){return i.handleTransitionEnd(e)},i}return iX(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return iJ},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(iJ.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(iJ.LINE_RIPPLE_ACTIVE)},t.prototype.setRippleCenter=function(e){this.adapter.setStyle("transform-origin",e+"px center")},t.prototype.deactivate=function(){this.adapter.addClass(iJ.LINE_RIPPLE_DEACTIVATING)},t.prototype.handleTransitionEnd=function(e){var t=this.adapter.hasClass(iJ.LINE_RIPPLE_DEACTIVATING);"opacity"===e.propertyName&&t&&(this.adapter.removeClass(iJ.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(iJ.LINE_RIPPLE_DEACTIVATING))},t}(iN),i0=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return iX(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 iQ({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}(iB),i1=function(e,t){return(i1=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 i2(e,t){function n(){this.constructor=e}i1(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i5=function(){return(i5=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},i3={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},i4={NOTCH_ELEMENT_PADDING:8},i6={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},i8=function(e){function t(n){return e.call(this,i5(i5({},t.defaultAdapter),n))||this}return i2(t,e),Object.defineProperty(t,"strings",{get:function(){return i3},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return i6},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return i4},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+=i4.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}(iN),i7=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i2(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){this.notchElement_=this.root.querySelector(i3.NOTCH_ELEMENT_SELECTOR);var e=this.root.querySelector("."+iG.cssClasses.ROOT);e?(e.style.transitionDuration="0s",this.root.classList.add(i6.OUTLINE_UPGRADED),requestAnimationFrame(function(){e.style.transitionDuration=""})):this.root.classList.add(i6.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 i8({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}(iB),i9=function(e,t){return(i9=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 re(e,t){function n(){this.constructor=e}i9(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var rt=function(){return(rt=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},rn={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"},ri={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"},rr={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},ro=["touchstart","pointerdown","mousedown","keydown"],ra=["touchend","pointerup","mouseup","contextmenu"],rs=[],rl=function(e){function t(n){var i=e.call(this,rt(rt({},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 re(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return rn},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ri},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return rr},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,r=i.ROOT,o=i.UNBOUNDED;requestAnimationFrame(function(){e.adapter.addClass(r),e.adapter.isUnbounded()&&(e.adapter.addClass(o),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,r=n.UNBOUNDED;requestAnimationFrame(function(){e.adapter.removeClass(i),e.adapter.removeClass(r),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&&(ro.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_):ra.forEach(function(e){t.adapter.registerDocumentInteractionHandler(e,t.deactivateHandler_)})},t.prototype.deregisterRootHandlers_=function(){var e=this;ro.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_),ra.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&&rs.length>0&&rs.some(function(e){return t.adapter.containsEventTarget(e)}))return void this.resetActivationState_();void 0!==e&&(rs.push(e.target),this.registerDeactivationHandlers_(e)),n.wasElementMadeActive=this.checkElementMadeActive_(e),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame(function(){rs=[],!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,r=n.VAR_FG_TRANSLATE_END,o=t.cssClasses,a=o.FG_DEACTIVATION,s=o.FG_ACTIVATION,l=t.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var c="",d="";if(!this.adapter.isUnbounded()){var u=this.getFgTranslationCoordinates_(),h=u.startPoint,m=u.endPoint;c=h.x+"px, "+h.y+"px",d=m.x+"px, "+m.y+"px"}this.adapter.updateCssVariable(i,c),this.adapter.updateCssVariable(r,d),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter.removeClass(a),this.adapter.computeBoundingRect(),this.adapter.addClass(s),this.activationTimer_=setTimeout(function(){return e.activationTimerCallback_()},l)},t.prototype.getFgTranslationCoordinates_=function(){var e,t=this.activationState_,n=t.activationEvent;return{startPoint:e={x:(e=t.wasActivatedByPointer?function(e,t,n){if(!e)return{x:0,y:0};var i,r,o=t.x,a=t.y,s=o+n.left,l=a+n.top;return"touchstart"===e.type?(i=e.changedTouches[0].pageX-s,r=e.changedTouches[0].pageY-l):(i=e.pageX-s,r=e.pageY-l),{x:i,y:r}}(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_,r=i.hasDeactivationUXRun,o=i.isActivated;(r||!o)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter.addClass(n),this.fgDeactivationRemovalTimer_=setTimeout(function(){e.adapter.removeClass(n)},rr.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=rt({},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,r=e.VAR_TOP,o=e.VAR_FG_SCALE;this.adapter.updateCssVariable(n,this.initialSize_+"px"),this.adapter.updateCssVariable(o,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(r,this.unboundedCoords_.top+"px"))},t}(iN),rc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.disabled=!1,t}return re(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=lc;if("boolean"==typeof lc&&!t)return lc;if(!(n&&"function"==typeof n.supports))return!1;var r=n.supports("--css-vars","yes"),o=n.supports("(--css-vars: yes)")&&n.supports("color","#00000000");return i=r||o,t||(lc=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,iz())},deregisterInteractionHandler:function(t,n){return e.root.removeEventListener(t,n,iz())},deregisterResizeHandler:function(e){return window.removeEventListener("resize",e)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return iY(e.root,":active")},isSurfaceDisabled:function(){return!!e.disabled},isUnbounded:function(){return!!e.unbounded},registerDocumentInteractionHandler:function(e,t){return document.documentElement.addEventListener(e,t,iz())},registerInteractionHandler:function(t,n){return e.root.addEventListener(t,n,iz())},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 rl(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}(iB),rd={ROOT:"mdc-text-field-character-counter"},ru={ROOT_SELECTOR:"."+rd.ROOT},rh=function(e){function t(n){return e.call(this,i$(i$({},t.defaultAdapter),n))||this}return iP(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return rd},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ru},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}(iN),rm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return iP(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 rh({setContent:function(t){e.root.textContent=t}})},t}(iB),rf={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"},rp={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"},rg={LABEL_SCALE:.75},rb=["pattern","min","max","required","step","minlength","maxlength"],r_=["color","date","datetime-local","month","range","time","week"],ry=["mousedown","touchstart"],rv=["click","keydown"],rx=function(e){function t(n,i){void 0===i&&(i={});var r=e.call(this,i$(i$({},t.defaultAdapter),n))||this;return r.isFocused_=!1,r.receivedUserInput_=!1,r.isValid_=!0,r.useNativeValidation_=!0,r.validateOnValueChange_=!0,r.helperText_=i.helperText,r.characterCounter_=i.characterCounter,r.leadingIcon_=i.leadingIcon,r.trailingIcon_=i.trailingIcon,r.inputFocusHandler_=function(){return r.activateFocus()},r.inputBlurHandler_=function(){return r.deactivateFocus()},r.inputInputHandler_=function(){return r.handleInput()},r.setPointerXOffset_=function(e){return r.setTransformOrigin(e)},r.textFieldInteractionHandler_=function(){return r.handleTextFieldInteraction()},r.validationAttributeChangeHandler_=function(e){return r.handleValidationAttributeChange(e)},r}return iP(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return rp},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return rf},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return rg},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shouldAlwaysFloat_",{get:function(){var e=this.getNativeInput_().type;return r_.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_),ry.forEach(function(t){e.adapter.registerInputInteractionHandler(t,e.setPointerXOffset_)}),rv.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_),ry.forEach(function(t){e.adapter.deregisterInputInteractionHandler(t,e.setPointerXOffset_)}),rv.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 rb.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()*rg.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(),r=n.clientX-i.left;this.adapter.setLineRippleTransformOrigin(r)}},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(),r=this.helperText_.getId();i&&r?this.adapter.setInputAttr(rf.ARIA_DESCRIBEDBY,r):this.adapter.removeInputAttr(rf.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,r=n.INVALID;e?(this.adapter.addClass(i),this.adapter.removeClass(r)):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}(iN),rw={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"},rF={ARIA_HIDDEN:"aria-hidden",ROLE:"role",ROOT_SELECTOR:"."+rw.ROOT},rk=function(e){function t(n){return e.call(this,i$(i$({},t.defaultAdapter),n))||this}return iP(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return rw},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return rF},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(rF.ARIA_HIDDEN)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.isPersistent=function(){return this.adapter.hasClass(rw.HELPER_TEXT_PERSISTENT)},t.prototype.setPersistent=function(e){e?this.adapter.addClass(rw.HELPER_TEXT_PERSISTENT):this.adapter.removeClass(rw.HELPER_TEXT_PERSISTENT)},t.prototype.isValidation=function(){return this.adapter.hasClass(rw.HELPER_TEXT_VALIDATION_MSG)},t.prototype.setValidation=function(e){e?this.adapter.addClass(rw.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(rw.HELPER_TEXT_VALIDATION_MSG)},t.prototype.showToScreenReader=function(){this.adapter.removeAttr(rF.ARIA_HIDDEN)},t.prototype.setValidity=function(e){var t=this.adapter.hasClass(rw.HELPER_TEXT_PERSISTENT),n=this.adapter.hasClass(rw.HELPER_TEXT_VALIDATION_MSG)&&!e;n?(this.showToScreenReader(),this.adapter.setAttr(rF.ROLE,"alert")):this.adapter.removeAttr(rF.ROLE),t||n||this.hide_()},t.prototype.hide_=function(){this.adapter.setAttr(rF.ARIA_HIDDEN,"true")},t}(iN),rE=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return iP(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 rk({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}(iB),rA={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"},rC={ROOT:"mdc-text-field__icon"},rT=["click","keydown"],rS=function(e){function t(n){var i=e.call(this,i$(i$({},t.defaultAdapter),n))||this;return i.savedTabIndex_=null,i.interactionHandler_=function(e){return i.handleInteraction(e)},i}return iP(t,e),Object.defineProperty(t,"strings",{get:function(){return rA},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return rC},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"),rT.forEach(function(t){e.adapter.registerInteractionHandler(t,e.interactionHandler_)})},t.prototype.destroy=function(){var e=this;rT.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",rA.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}(iN),rM=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return iP(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 rS({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(rS.strings.ICON_EVENT,{},!0)}})},t}(iB),rL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return iP(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e,t,n,i,r,o,a){void 0===e&&(e=function(e,t){return new rc(e,t)}),void 0===t&&(t=function(e){return new i0(e)}),void 0===n&&(n=function(e){return new rE(e)}),void 0===i&&(i=function(e){return new rm(e)}),void 0===r&&(r=function(e){return new rM(e)}),void 0===o&&(o=function(e){return new iq(e)}),void 0===a&&(a=function(e){return new i7(e)}),this.input_=this.root.querySelector(rf.INPUT_SELECTOR);var s=this.root.querySelector(rf.LABEL_SELECTOR);this.label_=s?o(s):null;var l=this.root.querySelector(rf.LINE_RIPPLE_SELECTOR);this.lineRipple_=l?t(l):null;var c=this.root.querySelector(rf.OUTLINE_SELECTOR);this.outline_=c?a(c):null;var d=rk.strings,u=this.root.nextElementSibling,h=u&&u.classList.contains(rp.HELPER_LINE),m=h&&u&&u.querySelector(d.ROOT_SELECTOR);this.helperText_=m?n(m):null;var f=rh.strings,p=this.root.querySelector(f.ROOT_SELECTOR);!p&&h&&u&&(p=u.querySelector(f.ROOT_SELECTOR)),this.characterCounter_=p?i(p):null;var g=this.root.querySelector(rf.LEADING_ICON_SELECTOR);this.leadingIcon_=g?r(g):null;var b=this.root.querySelector(rf.TRAILING_ICON_SELECTOR);this.trailingIcon_=b?r(b):null,this.prefix_=this.root.querySelector(rf.PREFIX_SELECTOR),this.suffix_=this.root.querySelector(rf.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 rx(i$(i$(i$(i$(i$({},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,iz())},deregisterInputInteractionHandler:function(t,n){e.input_.removeEventListener(t,n,iz())}}},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(rp.TEXTAREA),i=this.root.classList.contains(rp.OUTLINED);if(n||i)return null;var r=i$(i$({},rc.createAdapter(this)),{isSurfaceActive:function(){return iY(t.input_,":active")},registerInteractionHandler:function(e,n){return t.input_.addEventListener(e,n,iz())},deregisterInteractionHandler:function(e,n){return t.input_.removeEventListener(e,n,iz())}});return e(this.root,new rl(r))},t}(iB),rD=function(e,t){return(rD=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 rI(e,t){function n(){this.constructor=e}rD(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var rO=function(){return(rO=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},rR={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}},rP={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 r$(e){return!!e.document&&"function"==typeof e.document.createElement}function rN(e,t){if(r$(e)&&t in rR){var n=e.document.createElement("div"),i=rR[t],r=i.standard,o=i.prefixed;return r in n.style?r:o}return t}function rB(e,t){if(r$(e)&&t in rP){var n=e.document.createElement("div"),i=rP[t],r=i.standard,o=i.prefixed;return i.cssProperty in n.style?r:o}return t}var rz={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"},rj={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"},rY={ANIM_END_LATCH_MS:250},rH=function(e){function t(n){var i=e.call(this,rO(rO({},t.defaultAdapter),n))||this;return i.currentCheckState_=rj.TRANSITION_STATE_INIT,i.currentAnimationClass_="",i.animEndLatchTimer_=0,i.enableAnimationEndHandler_=!1,i}return rI(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return rz},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return rj},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return rY},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(rz.UPGRADED)},t.prototype.destroy=function(){clearTimeout(this.animEndLatchTimer_)},t.prototype.setDisabled=function(e){this.adapter.setNativeControlDisabled(e),e?this.adapter.addClass(rz.DISABLED):this.adapter.removeClass(rz.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},rY.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=rj.TRANSITION_STATE_UNCHECKED,i=rz.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=rj.TRANSITION_STATE_INDETERMINATE,t=rj.TRANSITION_STATE_CHECKED,n=rj.TRANSITION_STATE_UNCHECKED;return this.adapter.isIndeterminate()?e:this.adapter.isChecked()?t:n},t.prototype.getTransitionAnimationClass_=function(e,n){var i=rj.TRANSITION_STATE_INIT,r=rj.TRANSITION_STATE_CHECKED,o=rj.TRANSITION_STATE_UNCHECKED,a=t.cssClasses,s=a.ANIM_UNCHECKED_CHECKED,l=a.ANIM_UNCHECKED_INDETERMINATE,c=a.ANIM_CHECKED_UNCHECKED,d=a.ANIM_CHECKED_INDETERMINATE,u=a.ANIM_INDETERMINATE_CHECKED,h=a.ANIM_INDETERMINATE_UNCHECKED;switch(e){case i:if(n===o)return"";return n===r?u:h;case o:return n===r?s:l;case r:return n===o?c:d;default:return n===r?u:h}},t.prototype.updateAriaChecked_=function(){this.adapter.isIndeterminate()?this.adapter.setNativeControlAttr(rj.ARIA_CHECKED_ATTR,rj.ARIA_CHECKED_INDETERMINATE_VALUE):this.adapter.removeNativeControlAttr(rj.ARIA_CHECKED_ATTR)},t}(iN),rU=["checked","indeterminate"],rV=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ripple_=t.createRipple_(),t}return rI(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=rj.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(rB(window,"animationend"),this.handleAnimationEnd_),this.installPropertyChangeHooks_()},t.prototype.destroy=function(){this.ripple_.destroy(),this.nativeControl_.removeEventListener("change",this.handleChange_),this.unlisten(rB(window,"animationend"),this.handleAnimationEnd_),this.uninstallPropertyChangeHooks_(),e.prototype.destroy.call(this)},t.prototype.getDefaultFoundation=function(){var e=this;return new rH({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=rO(rO({},rc.createAdapter(this)),{deregisterInteractionHandler:function(t,n){return e.nativeControl_.removeEventListener(t,n,iz())},isSurfaceActive:function(){return iY(e.nativeControl_,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(t,n){return e.nativeControl_.addEventListener(t,n,iz())}});return new rc(this.root,new rl(t))},t.prototype.installPropertyChangeHooks_=function(){var e=this,t=this.nativeControl_,n=Object.getPrototypeOf(t);rU.forEach(function(i){var r=Object.getOwnPropertyDescriptor(n,i);if(rW(r)){var o=r.get,a={configurable:r.configurable,enumerable:r.enumerable,get:o,set:function(n){r.set.call(t,n),e.foundation.handleChange()}};Object.defineProperty(t,i,a)}})},t.prototype.uninstallPropertyChangeHooks_=function(){var e=this.nativeControl_,t=Object.getPrototypeOf(e);rU.forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);rW(i)&&Object.defineProperty(e,n,i)})},Object.defineProperty(t.prototype,"nativeControl_",{get:function(){var e=rj.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}(iB);function rW(e){return!!e&&"function"==typeof e.set}var rG=function(e,t){return(rG=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 rq(e,t){function n(){this.constructor=e}rG(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var rK=function(){return(rK=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},rX={CHECKED:"mdc-switch--checked",DISABLED:"mdc-switch--disabled"},rZ={ARIA_CHECKED_ATTR:"aria-checked",NATIVE_CONTROL_SELECTOR:".mdc-switch__native-control",RIPPLE_SURFACE_SELECTOR:".mdc-switch__thumb-underlay"},rJ=function(e){function t(n){return e.call(this,rK(rK({},t.defaultAdapter),n))||this}return rq(t,e),Object.defineProperty(t,"strings",{get:function(){return rZ},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return rX},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(rX.DISABLED):this.adapter.removeClass(rX.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(rX.CHECKED):this.adapter.removeClass(rX.CHECKED)},t.prototype.updateAriaChecked_=function(e){this.adapter.setNativeControlAttr(rZ.ARIA_CHECKED_ATTR,""+!!e)},t}(iN),rQ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ripple_=t.createRipple_(),t}return rq(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,function(){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,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}(arguments[t]));return e}(n))},this.nativeControl_.addEventListener("change",this.changeHandler_),this.checked=this.checked},t.prototype.getDefaultFoundation=function(){var e=this;return new rJ({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=rJ.strings.RIPPLE_SURFACE_SELECTOR,n=this.root.querySelector(t),i=rK(rK({},rc.createAdapter(this)),{addClass:function(e){return n.classList.add(e)},computeBoundingRect:function(){return n.getBoundingClientRect()},deregisterInteractionHandler:function(t,n){e.nativeControl_.removeEventListener(t,n,iz())},isSurfaceActive:function(){return iY(e.nativeControl_,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(t,n){e.nativeControl_.addEventListener(t,n,iz())},removeClass:function(e){n.classList.remove(e)},updateCssVariable:function(e,t){n.style.setProperty(e,t)}});return new rc(this.root,new rl(i))},Object.defineProperty(t.prototype,"nativeControl_",{get:function(){var e=rJ.strings.NATIVE_CONTROL_SELECTOR;return this.root.querySelector(e)},enumerable:!0,configurable:!0}),t}(iB),r0=function(e,t){return(r0=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 r1(e,t){function n(){this.constructor=e}r0(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var r2=function(){return(r2=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r5={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"},r3={STEP_SIZE:1,THUMB_UPDATE_MIN_PX:5},r4={ARIA_VALUETEXT:"aria-valuetext",INPUT_DISABLED:"disabled",INPUT_MIN:"min",INPUT_MAX:"max",INPUT_VALUE:"value",INPUT_STEP:"step"},r6={CHANGE:"MDCSlider:change",INPUT:"MDCSlider:input"};!function(e){e[e.ACTIVE=0]="ACTIVE",e[e.INACTIVE=1]="INACTIVE"}(ld||(ld={})),function(e){e[e.START=1]="START",e[e.END=2]="END"}(lu||(lu={}));var r8="undefined"!=typeof window,r7=function(e){function t(n){var i=e.call(this,r2(r2({},t.defaultAdapter),n))||this;return i.initialStylesRemoved=!1,i.isDisabled=!1,i.isDiscrete=!1,i.step=r3.STEP_SIZE,i.hasTickMarks=!1,i.isRange=!1,i.thumb=null,i.downEventClientX=null,i.startThumbKnobWidth=0,i.endThumbKnobWidth=0,i}return r1(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(r5.DISABLED),this.isDiscrete=this.adapter.hasClass(r5.DISCRETE),this.hasTickMarks=this.adapter.hasClass(r5.TICK_MARKS),this.isRange=this.adapter.hasClass(r5.RANGE);var t=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(r4.INPUT_MIN,this.isRange?lu.START:lu.END),r4.INPUT_MIN),n=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(r4.INPUT_MAX,lu.END),r4.INPUT_MAX),i=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(r4.INPUT_VALUE,lu.END),r4.INPUT_VALUE),r=this.isRange?this.convertAttributeValueToNumber(this.adapter.getInputAttribute(r4.INPUT_VALUE,lu.START),r4.INPUT_VALUE):t;this.validateProperties({min:t,max:n,value:i,valueStart:r}),this.min=t,this.max=n,this.value=i,this.valueStart=r,this.valueBeforeDownEvent=i,this.valueStartBeforeDownEvent=r;var o=this.adapter.getInputAttribute(r4.INPUT_STEP,lu.END);if(o&&(this.step=this.convertAttributeValueToNumber(o,r4.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(lu.START)},this.inputEndChangeListener=function(){e.handleInputChange(lu.END)},this.inputStartFocusListener=function(){e.handleInputFocus(lu.START)},this.inputEndFocusListener=function(){e.handleInputFocus(lu.END)},this.inputStartBlurListener=function(){e.handleInputBlur(lu.START)},this.inputEndBlurListener=function(){e.handleInputBlur(lu.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,lu.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,lu.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(r5.DISABLED),this.isRange&&this.adapter.setInputAttribute(r4.INPUT_DISABLED,"",lu.START),this.adapter.setInputAttribute(r4.INPUT_DISABLED,"",lu.END)):(this.adapter.removeClass(r5.DISABLED),this.isRange&&this.adapter.removeInputAttribute(r4.INPUT_DISABLED,lu.START),this.adapter.removeInputAttribute(r4.INPUT_DISABLED,lu.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(lu.START),this.endThumbKnobWidth=this.adapter.getThumbKnobWidth(lu.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===lu.START?this.valueStartBeforeDownEvent:this.valueBeforeDownEvent,t=this.thumb===lu.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(r5.THUMB_WITH_INDICATOR,lu.START),this.adapter.addThumbClass(r5.THUMB_WITH_INDICATOR,lu.END))},t.prototype.handleThumbMouseleave=function(){this.isDiscrete&&this.isRange&&(this.adapter.isInputFocused(lu.START)||this.adapter.isInputFocused(lu.END)||(this.adapter.removeThumbClass(r5.THUMB_WITH_INDICATOR,lu.START),this.adapter.removeThumbClass(r5.THUMB_WITH_INDICATOR,lu.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===lu.START?this.setValueStart(t):this.setValue(t)},t.prototype.handleInputFocus=function(e){if(this.isDiscrete&&(this.adapter.addThumbClass(r5.THUMB_WITH_INDICATOR,e),this.isRange)){var t=e===lu.START?lu.END:lu.START;this.adapter.addThumbClass(r5.THUMB_WITH_INDICATOR,t)}},t.prototype.handleInputBlur=function(e){if(this.isDiscrete&&(this.adapter.removeThumbClass(r5.THUMB_WITH_INDICATOR,e),this.isRange)){var t=e===lu.START?lu.END:lu.START;this.adapter.removeThumbClass(r5.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 lu.END;var n=this.adapter.getThumbBoundingClientRect(lu.START),i=this.adapter.getThumbBoundingClientRect(lu.END),r=e>=n.left&&e<=n.right,o=e>=i.left&&e<=i.right;return r&&o?null:r?lu.START:o?lu.END:t<this.valueStart?lu.START:t>this.value?lu.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)<r3.THUMB_UPDATE_MIN_PX?this.thumb:e<this.downEventClientX?this.adapter.isRTL()?lu.END:lu.START:this.adapter.isRTL()?lu.START:lu.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===lu.START?this.valueStart:this.value,n=String(t);this.adapter.setInputAttribute(r4.INPUT_VALUE,n,e),this.isRange&&e===lu.START?this.adapter.setInputAttribute(r4.INPUT_MIN,n,lu.END):this.isRange&&e===lu.END&&this.adapter.setInputAttribute(r4.INPUT_MAX,n,lu.START),this.adapter.getInputValue(e)!==n&&this.adapter.setInputValue(n,e);var i=this.adapter.getValueToAriaValueTextFn();i&&this.adapter.setInputAttribute(r4.ARIA_VALUETEXT,i(t),e)}},t.prototype.updateValueIndicatorUI=function(e){if(this.isDiscrete){var t=this.isRange&&e===lu.START?this.valueStart:this.value;this.adapter.setValueIndicatorText(t,e===lu.START?lu.START:lu.END),!e&&this.isRange&&this.adapter.setValueIndicatorText(this.valueStart,lu.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(ld.INACTIVE),r=Array.from({length:t}).fill(ld.ACTIVE),o=Array.from({length:n}).fill(ld.INACTIVE);this.adapter.updateTickMarks(i.concat(r).concat(o))}},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,r=i.emitInputEvent,o=i.emitChangeEvent;if(e=this.clampValue(e,t),this.isRange&&t===lu.START){if(this.valueStart===e)return;this.valueStart=e}else{if(this.value===e)return;this.value=e}this.updateUI(t),r&&this.adapter.emitInputEvent(t===lu.START?this.valueStart:this.value,t),o&&this.adapter.emitChangeEvent(t===lu.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===lu.START&&e>this.value)?this.value:this.isRange&&t===lu.END&&e<this.valueStart?this.valueStart:e},t.prototype.updateThumbAndTrackUI=function(e){var t=this,n=this.max,i=this.min,r=(this.value-this.valueStart)/(n-i),o=r*this.rect.width,a=this.adapter.isRTL(),s=r8?rN(window,"transform"):"transform";if(this.isRange){var l=this.adapter.isRTL()?(n-this.value)/(n-i)*this.rect.width:(this.valueStart-i)/(n-i)*this.rect.width,c=l+o;requestAnimationFrame(function(){!a&&e===lu.START||a&&e!==lu.START?(t.adapter.setTrackActiveStyleProperty("transform-origin","right"),t.adapter.setTrackActiveStyleProperty("left","unset"),t.adapter.setTrackActiveStyleProperty("right",t.rect.width-c+"px")):(t.adapter.setTrackActiveStyleProperty("transform-origin","left"),t.adapter.setTrackActiveStyleProperty("right","unset"),t.adapter.setTrackActiveStyleProperty("left",l+"px")),t.adapter.setTrackActiveStyleProperty(s,"scaleX("+r+")");var n=a?c:l,i=t.adapter.isRTL()?l:c;e!==lu.START&&e&&t.initialStylesRemoved||t.adapter.setThumbStyleProperty(s,"translateX("+n+"px)",lu.START),e!==lu.END&&e&&t.initialStylesRemoved||t.adapter.setThumbStyleProperty(s,"translateX("+i+"px)",lu.END),t.removeInitialStyles(a),t.updateOverlappingThumbsUI(n,i,e)})}else requestAnimationFrame(function(){var e=a?t.rect.width-o:o;t.adapter.setThumbStyleProperty(s,"translateX("+e+"px)",lu.END),t.adapter.setTrackActiveStyleProperty(s,"scaleX("+r+")"),t.removeInitialStyles(a)})},t.prototype.removeInitialStyles=function(e){if(!this.initialStylesRemoved){var t=e?"right":"left";this.adapter.removeThumbStyleProperty(t,lu.END),this.isRange&&this.adapter.removeThumbStyleProperty(t,lu.START),this.initialStylesRemoved=!0,this.resetTrackAndThumbAnimation()}},t.prototype.resetTrackAndThumbAnimation=function(){var e=this;if(this.isDiscrete){var t=r8?rN(window,"transition"):"transition",n="all 0s ease 0s";this.adapter.setThumbStyleProperty(t,n,lu.END),this.isRange&&this.adapter.setThumbStyleProperty(t,n,lu.START),this.adapter.setTrackActiveStyleProperty(t,n),requestAnimationFrame(function(){e.adapter.removeThumbStyleProperty(t,lu.END),e.adapter.removeTrackActiveStyleProperty(t),e.isRange&&e.adapter.removeThumbStyleProperty(t,lu.START)})}},t.prototype.updateOverlappingThumbsUI=function(e,t,n){var i=!1;if(this.adapter.isRTL()){var r=e-this.startThumbKnobWidth/2;i=t+this.endThumbKnobWidth/2>=r}else i=e+this.startThumbKnobWidth/2>=t-this.endThumbKnobWidth/2;i?(this.adapter.addThumbClass(r5.THUMB_TOP,n||lu.END),this.adapter.removeThumbClass(r5.THUMB_TOP,n===lu.START?lu.END:lu.START)):(this.adapter.removeThumbClass(r5.THUMB_TOP,lu.START),this.adapter.removeThumbClass(r5.THUMB_TOP,lu.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,r=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||r<t||r>n)throw Error("MDCSliderFoundation: values must be in [min, max] range. "+("Current values: [start value: "+r+", end value: ")+i+"]");if(r>i)throw Error("MDCSliderFoundation: start value must be <= end value. "+("Current values: [start value: "+r+", 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(lu.START,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(lu.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(lu.START,"change",this.inputStartChangeListener),this.adapter.registerInputEventHandler(lu.START,"focus",this.inputStartFocusListener),this.adapter.registerInputEventHandler(lu.START,"blur",this.inputStartBlurListener)),this.adapter.registerThumbEventHandler(lu.END,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(lu.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(lu.END,"change",this.inputEndChangeListener),this.adapter.registerInputEventHandler(lu.END,"focus",this.inputEndFocusListener),this.adapter.registerInputEventHandler(lu.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(lu.START,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(lu.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(lu.START,"change",this.inputStartChangeListener),this.adapter.deregisterInputEventHandler(lu.START,"focus",this.inputStartFocusListener),this.adapter.deregisterInputEventHandler(lu.START,"blur",this.inputStartBlurListener)),this.adapter.deregisterThumbEventHandler(lu.END,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(lu.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(lu.END,"change",this.inputEndChangeListener),this.adapter.deregisterInputEventHandler(lu.END,"focus",this.inputEndFocusListener),this.adapter.deregisterInputEventHandler(lu.END,"blur",this.inputEndBlurListener)},t.prototype.handlePointerup=function(){this.handleUp(),this.adapter.deregisterEventHandler("pointermove",this.moveListener)},t.SUPPORTS_POINTER_EVENTS=r8&&!!window.PointerEvent,t}(iN),r9=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.skipInitialUIUpdate=!1,t.valueToAriaValueTextFn=null,t}return r1(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 r7({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("."+r5.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("."+r5.VALUE_INDICATOR_TEXT).textContent=String(t)},getValueToAriaValueTextFn:function(){return e.valueToAriaValueTextFn},updateTickMarks:function(t){var n=e.root.querySelector("."+r5.TICK_MARKS_CONTAINER);n||((n=document.createElement("div")).classList.add(r5.TICK_MARKS_CONTAINER),e.root.querySelector("."+r5.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(r6.CHANGE,{value:t,thumb:n})},emitInputEvent:function(t,n){e.emit(r6.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("."+r5.INPUT)),this.thumbs=[].slice.call(this.root.querySelectorAll("."+r5.THUMB)),this.trackActive=this.root.querySelector("."+r5.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===lu.END?this.thumbs[this.thumbs.length-1]:this.thumbs[0]},t.prototype.getInput=function(e){return e===lu.END?this.inputs[this.inputs.length-1]:this.inputs[0]},t.prototype.getRipple=function(e){return e===lu.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 r=document.createElement("div"),o=t[i]===ld.ACTIVE?r5.TICK_MARK_ACTIVE:r5.TICK_MARK_INACTIVE;r.classList.add(o),n.appendChild(r)}e.appendChild(n)},t.prototype.updateTickMarks=function(e,t){for(var n=Array.from(e.children),i=0;i<n.length;i++)t[i]===ld.ACTIVE?(n[i].classList.add(r5.TICK_MARK_ACTIVE),n[i].classList.remove(r5.TICK_MARK_INACTIVE)):(n[i].classList.add(r5.TICK_MARK_INACTIVE),n[i].classList.remove(r5.TICK_MARK_ACTIVE))},t.prototype.createRipples=function(){for(var e=[],t=[].slice.call(this.root.querySelectorAll("."+r5.THUMB)),n=this,i=0;i<t.length;i++)!function(i){var r=t[i],o=n.inputs[i],a=r2(r2({},rc.createAdapter(n)),{addClass:function(e){r.classList.add(e)},computeBoundingRect:function(){return r.getBoundingClientRect()},deregisterInteractionHandler:function(e,t){o.removeEventListener(e,t)},isSurfaceActive:function(){return iY(o,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(e,t){o.addEventListener(e,t)},removeClass:function(e){r.classList.remove(e)},updateCssVariable:function(e,t){r.style.setProperty(e,t)}}),s=new rc(r,new rl(a));s.unbounded=!0,e.push(s)}(i);return e},t}(iB),oe=function(e,t){return(oe=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 ot(e,t){function n(){this.constructor=e}oe(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var on=function(){return(on=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},oi={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"},or={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"])'},oo={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"}(lh||(lh={})),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"}(lm||(lm={}));var oa=function(e,t){return(oa=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 os(e,t){function n(){this.constructor=e}oa(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var ol=function(){return(ol=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},oc=function(e,t){return(oc=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 od(e,t){function n(){this.constructor=e}oc(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var ou=function(){return(ou=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},oh={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"},om={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 ."+oh.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+oh.LIST_ITEM_CLASS+" a\n ",FOCUSABLE_CHILD_ELEMENTS:"\n ."+oh.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+oh.LIST_ITEM_CLASS+" a,\n ."+oh.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+oh.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]'},of={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300},op={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"},og=new Set;og.add(op.BACKSPACE),og.add(op.ENTER),og.add(op.SPACEBAR),og.add(op.PAGE_UP),og.add(op.PAGE_DOWN),og.add(op.END),og.add(op.HOME),og.add(op.ARROW_LEFT),og.add(op.ARROW_UP),og.add(op.ARROW_RIGHT),og.add(op.ARROW_DOWN),og.add(op.DELETE),og.add(op.ESCAPE);var ob={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},o_=new Map;o_.set(ob.BACKSPACE,op.BACKSPACE),o_.set(ob.ENTER,op.ENTER),o_.set(ob.SPACEBAR,op.SPACEBAR),o_.set(ob.PAGE_UP,op.PAGE_UP),o_.set(ob.PAGE_DOWN,op.PAGE_DOWN),o_.set(ob.END,op.END),o_.set(ob.HOME,op.HOME),o_.set(ob.ARROW_LEFT,op.ARROW_LEFT),o_.set(ob.ARROW_UP,op.ARROW_UP),o_.set(ob.ARROW_RIGHT,op.ARROW_RIGHT),o_.set(ob.ARROW_DOWN,op.ARROW_DOWN),o_.set(ob.DELETE,op.DELETE),o_.set(ob.ESCAPE,op.ESCAPE);var oy=new Set;function ov(e){var t=e.key;if(og.has(t))return t;var n=o_.get(e.keyCode);return n||op.UNKNOWN}oy.add(op.PAGE_UP),oy.add(op.PAGE_DOWN),oy.add(op.END),oy.add(op.HOME),oy.add(op.ARROW_LEFT),oy.add(op.ARROW_UP),oy.add(op.ARROW_RIGHT),oy.add(op.ARROW_DOWN);var ox=["input","button","textarea","select"],ow=function(e){var t=e.target;if(t){var n=(""+t.tagName).toLowerCase();-1===ox.indexOf(n)&&e.preventDefault()}};function oF(e,t){var n,i=e.nextChar,r=e.focusItemAtIndex,o=e.sortedIndexByFirstChar,a=e.focusedItemIndex,s=e.skipFocus,l=e.isItemAtIndexDisabled;return clearTimeout(t.bufferClearTimeout),t.bufferClearTimeout=setTimeout(function(){oE(t)},of.TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS),t.typeaheadBuffer=t.typeaheadBuffer+i,-1===(n=1===t.typeaheadBuffer.length?function(e,t,n,i){var r,o=i.typeaheadBuffer[0],a=e.get(o);if(!a)return -1;if(o===i.currentFirstChar&&a[i.sortedIndexCursor].index===t){i.sortedIndexCursor=(i.sortedIndexCursor+1)%a.length;var s=a[i.sortedIndexCursor].index;if(!n(s))return s}i.currentFirstChar=o;var l=-1;for(r=0;r<a.length;r++)if(!n(a[r].index)){l=r;break}for(;r<a.length;r++)if(a[r].index>t&&!n(a[r].index)){l=r;break}return -1!==l?(i.sortedIndexCursor=l,a[i.sortedIndexCursor].index):-1}(o,a,l,t):function(e,t,n){var i=n.typeaheadBuffer[0],r=e.get(i);if(!r)return -1;var o=r[n.sortedIndexCursor];if(0===o.text.lastIndexOf(n.typeaheadBuffer,0)&&!t(o.index))return o.index;for(var a=(n.sortedIndexCursor+1)%r.length,s=-1;a!==n.sortedIndexCursor;){var l=r[a],c=0===l.text.lastIndexOf(n.typeaheadBuffer,0),d=!t(l.index);if(c&&d){s=a;break}a=(a+1)%r.length}return -1!==s?(n.sortedIndexCursor=s,r[n.sortedIndexCursor].index):-1}(o,l,t))||s||r(n),n}function ok(e){return e.typeaheadBuffer.length>0}function oE(e){e.typeaheadBuffer=""}function oA(e,t){var n=e.event,i=e.isTargetListItem,r=e.focusedItemIndex,o=e.focusItemAtIndex,a=e.sortedIndexByFirstChar,s=e.isItemAtIndexDisabled,l="ArrowLeft"===ov(n),c="ArrowUp"===ov(n),d="ArrowRight"===ov(n),u="ArrowDown"===ov(n),h="Home"===ov(n),m="End"===ov(n),f="Enter"===ov(n),p="Spacebar"===ov(n);if(l||c||d||u||h||m||f)return -1;if(!p&&1===n.key.length){ow(n);var g={focusItemAtIndex:o,focusedItemIndex:r,nextChar:n.key.toLowerCase(),sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:s};return oF(g,t)}if(!p)return -1;if(i&&ow(n),i&&ok(t)){var g={focusItemAtIndex:o,focusedItemIndex:r,nextChar:" ",sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:s};return oF(g,t)}return -1}var oC=function(e){function t(n){var i=e.call(this,ou(ou({},t.defaultAdapter),n))||this;return i.wrapFocus_=!1,i.isVertical_=!0,i.isSingleSelectionList_=!1,i.selectedIndex_=of.UNSET_INDEX,i.focusedItemIndex=of.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 od(t,e),Object.defineProperty(t,"strings",{get:function(){return om},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return oh},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return of},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,oh.LIST_ITEM_SELECTED_CLASS),n=this.adapter.listItemAtIndexHasClass(e,oh.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&&ok(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,r="ArrowLeft"===ov(e),o="ArrowUp"===ov(e),a="ArrowRight"===ov(e),s="ArrowDown"===ov(e),l="Home"===ov(e),c="End"===ov(e),d="Enter"===ov(e),u="Spacebar"===ov(e),h="A"===e.key||"a"===e.key;if(this.adapter.isRootFocused()){if(o||c?(e.preventDefault(),this.focusLastElement()):(s||l)&&(e.preventDefault(),this.focusFirstElement()),this.hasTypeahead){var m={event:e,focusItemAtIndex:function(e){i.focusItemAtIndex(e)},focusedItemIndex:-1,isTargetListItem:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(e){return i.adapter.listItemAtIndexHasClass(e,oh.LIST_ITEM_DISABLED_CLASS)}};oA(m,this.typeaheadState)}return}var f=this.adapter.getFocusedElementIndex();if(-1!==f||!((f=n)<0)){if(this.isVertical_&&s||!this.isVertical_&&a)ow(e),this.focusNextElement(f);else if(this.isVertical_&&o||!this.isVertical_&&r)ow(e),this.focusPrevElement(f);else if(l)ow(e),this.focusFirstElement();else if(c)ow(e),this.focusLastElement();else if(h&&e.ctrlKey&&this.isCheckboxList_)e.preventDefault(),this.toggleAll(this.selectedIndex_===of.UNSET_INDEX?[]:this.selectedIndex_);else if((d||u)&&t){var p=e.target;if(p&&"A"===p.tagName&&d||(ow(e),this.adapter.listItemAtIndexHasClass(f,oh.LIST_ITEM_DISABLED_CLASS)))return;this.isTypeaheadInProgress()||(this.isSelectableList_()&&this.setSelectedIndexOnAction_(f),this.adapter.notifyAction(f))}if(this.hasTypeahead){var m={event:e,focusItemAtIndex:function(e){i.focusItemAtIndex(e)},focusedItemIndex:this.focusedItemIndex,isTargetListItem:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(e){return i.adapter.listItemAtIndexHasClass(e,oh.LIST_ITEM_DISABLED_CLASS)}};oA(m,this.typeaheadState)}}},t.prototype.handleClick=function(e,t){e!==of.UNSET_INDEX&&(this.adapter.listItemAtIndexHasClass(e,oh.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,oh.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(e,om.ARIA_DISABLED,"false")):(this.adapter.addClassForElementIndex(e,oh.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(e,om.ARIA_DISABLED,"true")))},t.prototype.setSingleSelectionAtIndex_=function(e){if(this.selectedIndex_!==e){var t=oh.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass_&&(t=oh.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex_!==of.UNSET_INDEX&&this.adapter.removeClassForElementIndex(this.selectedIndex_,t),this.setAriaForSingleSelectionAtIndex_(e),this.setTabindexAtIndex(e),e!==of.UNSET_INDEX&&this.adapter.addClassForElementIndex(e,t),this.selectedIndex_=e}},t.prototype.setAriaForSingleSelectionAtIndex_=function(e){this.selectedIndex_===of.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter.getAttributeForElementIndex(e,om.ARIA_CURRENT));var t=null!==this.ariaCurrentAttrValue_,n=t?om.ARIA_CURRENT:om.ARIA_SELECTED;if(this.selectedIndex_!==of.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex_,n,"false"),e!==of.UNSET_INDEX){var i=t?this.ariaCurrentAttrValue_:"true";this.adapter.setAttributeForElementIndex(e,n,i)}},t.prototype.getSelectionAttribute=function(){return this.useSelectedAttr_?om.ARIA_SELECTED:om.ARIA_CHECKED},t.prototype.setRadioAtIndex_=function(e){var t=this.getSelectionAttribute();this.adapter.setCheckedCheckboxOrRadioAtIndex(e,!0),this.selectedIndex_!==of.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===of.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!==of.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_!==of.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===of.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 r=this.selectedIndex_===of.UNSET_INDEX?[]:this.selectedIndex_.slice();i?r.push(e):r=r.filter(function(t){return t!==e}),this.selectedIndex_=r},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,oh.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),oF({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,oh.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 r=t(i).trim();if(r){var o=r[0].toLowerCase();n.has(o)||n.set(o,[]),n.get(o).push({text:r.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(){oE(this.typeaheadState)},t}(iN),oT=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return od(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("."+oh.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(om.ARIA_ORIENTATION);this.vertical=e!==om.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(om.FOCUSABLE_CHILD_ELEMENTS)).forEach(function(e){return e.setAttribute("tabindex","-1")}),this.foundation.layout()},t.prototype.getPrimaryText=function(e){var t=e.querySelector("."+oh.LIST_ITEM_PRIMARY_TEXT_CLASS);if(t)return t.textContent||"";var n=e.querySelector("."+oh.LIST_ITEM_TEXT_CLASS);return n&&n.textContent||""},t.prototype.initializeListType=function(){var e=this,t=this.root.querySelectorAll(om.ARIA_ROLE_CHECKBOX_SELECTOR),n=this.root.querySelector(om.ARIA_CHECKED_RADIO_SELECTOR);if(t.length){var i=this.root.querySelectorAll(om.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 oC({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(om.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(t){return!!e.listElements[t].querySelector(om.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(t){return e.listElements[t].querySelector(om.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(om.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 r=e.listElements[t];r&&r.setAttribute(n,i)},setCheckedCheckboxOrRadioAtIndex:function(t,n){var i=e.listElements[t].querySelector(om.CHECKBOX_RADIO_SELECTOR);i.checked=n;var r=document.createEvent("Event");r.initEvent("change",!0,!0),i.dispatchEvent(r)},setTabIndexForListItemChildren:function(t,n){var i=e.listElements[t];[].slice.call(i.querySelectorAll(om.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX)).forEach(function(e){return e.setAttribute("tabindex",n)})}})},t.prototype.getListItemIndex_=function(e){var t=ij(e.target,"."+oh.LIST_ITEM_CLASS+", ."+oh.ROOT);return t&&iY(t,"."+oh.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(oh.LIST_ITEM_CLASS),t)},t.prototype.handleClickEvent_=function(e){var t=this.getListItemIndex_(e),n=!iY(e.target,om.CHECKBOX_RADIO_SELECTOR);this.foundation.handleClick(t,n)},t}(iB),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 oM(e,t){function n(){this.constructor=e}oS(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var oL=function(){return(oL=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},oD=function(e){function t(n){var i=e.call(this,oL(oL({},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=lm.TOP_START,i.originCorner=lm.TOP_START,i.anchorMargin={top:0,right:0,bottom:0,left:0},i.position={x:0,y:0},i}return oM(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return oi},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return or},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return oo},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Corner",{get:function(){return lm},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^lh.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()},oo.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()},oo.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),r=this.hasBit(n,lh.BOTTOM)?"bottom":"top",o=this.hasBit(n,lh.RIGHT)?"right":"left",a=this.getHorizontalOriginOffset(n),s=this.getVerticalOriginOffset(n),l=this.measurements,c=l.anchorSize,d=l.surfaceSize,u=((e={})[o]=a,e[r]=s,e);c.width/d.width>oo.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(o="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(u),this.adapter.setTransformOrigin(o+" "+r),this.adapter.setPosition(u),this.adapter.setMaxHeight(i?i+"px":""),this.hasBit(n,lh.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,r,o=this.originCorner,a=this.measurements,s=a.viewportDistance,l=a.anchorSize,c=a.surfaceSize,d=t.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,lh.BOTTOM)?(e=s.top-d+l.height+this.anchorMargin.bottom,n=s.bottom-d-this.anchorMargin.bottom):(e=s.top-d+this.anchorMargin.top,n=s.bottom-d+l.height-this.anchorMargin.top),!(n-c.height>0)&&e>=n&&(o=this.setBit(o,lh.BOTTOM));var u=this.adapter.isRtl(),h=this.hasBit(this.anchorCorner,lh.FLIP_RTL),m=this.hasBit(this.anchorCorner,lh.RIGHT)||this.hasBit(o,lh.RIGHT),f=!1;(f=u&&h?!m:m)?(i=s.left+l.width+this.anchorMargin.right,r=s.right-this.anchorMargin.right):(i=s.left+this.anchorMargin.left,r=s.right+l.width-this.anchorMargin.left);var p=i-c.width>0,g=r-c.width>0,b=this.hasBit(o,lh.FLIP_RTL)&&this.hasBit(o,lh.RIGHT);return g&&b&&u||!p&&b?o=this.unsetBit(o,lh.RIGHT):(p&&f&&u||p&&!f&&m||!g&&i>=r)&&(o=this.setBit(o,lh.RIGHT)),o},t.prototype.getMenuSurfaceMaxHeight=function(e){var n=this.measurements.viewportDistance,i=0,r=this.hasBit(e,lh.BOTTOM),o=this.hasBit(this.anchorCorner,lh.BOTTOM),a=t.numbers.MARGIN_TO_EDGE;return r?(i=n.top+this.anchorMargin.top-a,o||(i+=this.measurements.anchorSize.height)):(i=n.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-a,o&&(i-=this.measurements.anchorSize.height)),i},t.prototype.getHorizontalOriginOffset=function(e){var t=this.measurements.anchorSize,n=this.hasBit(e,lh.RIGHT),i=this.hasBit(this.anchorCorner,lh.RIGHT);if(n){var r=i?t.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?r-(this.measurements.viewportSize.width-this.measurements.bodySize.width):r}return i?t.width-this.anchorMargin.right:this.anchorMargin.left},t.prototype.getVerticalOriginOffset=function(e){var t=this.measurements.anchorSize,n=this.hasBit(e,lh.BOTTOM),i=this.hasBit(this.anchorCorner,lh.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,r=i.windowScroll,o=i.viewportDistance,a=Object.keys(e);try{for(var s=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),l=s.next();!l.done;l=s.next()){var c=l.value,d=e[c]||0;d+=o[c],this.isFixedPosition||("top"===c?d+=r.y:"bottom"===c?d-=r.y:"left"===c?d+=r.x:d-=r.x),e[c]=d}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}},t.prototype.maybeRestoreFocus=function(){var e=this.adapter.isFocused(),t=document.activeElement&&this.adapter.isElementInContainer(document.activeElement);(e||t)&&this.adapter.restoreFocus()},t.prototype.hasBit=function(e,t){return!!(e&t)},t.prototype.setBit=function(e,t){return e|t},t.prototype.unsetBit=function(e,t){return e^t},t.prototype.isFinite=function(e){return"number"==typeof e&&isFinite(e)},t}(iN),oI=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oM(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(oi.ANCHOR)?t:null,this.root.classList.contains(oi.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(or.OPENED_EVENT,this.registerBodyClickListener),this.listen(or.CLOSED_EVENT,this.deregisterBodyClickListener)},t.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown),this.unlisten(or.OPENED_EVENT,this.registerBodyClickListener),this.unlisten(or.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(oi.FIXED):this.root.classList.remove(oi.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 oD({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(oD.strings.CLOSED_EVENT,{})},notifyOpen:function(){return e.emit(oD.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,r=(n=window,void 0===i&&(i=!1),(void 0===lf||i)&&(lf="transform"in n.document.createElement("div").style?"transform":"webkitTransform"),lf+"-origin");e.root.style.setProperty(r,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}(iB),oO={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},oR={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list",SELECTED_EVENT:"MDCMenu:selected"},oP={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"}(lp||(lp={}));var o$=function(e){function t(n){var i=e.call(this,ol(ol({},t.defaultAdapter),n))||this;return i.closeAnimationEndTimerId_=0,i.defaultFocusState_=lp.LIST_ROOT,i}return os(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return oO},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return oR},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return oP},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)},oD.numbers.TRANSITION_CLOSE_DURATION))},t.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState_){case lp.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case lp.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case lp.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,oR.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(t,oO.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(e,oO.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(e,oR.ARIA_CHECKED_ATTR,"true")},t.prototype.setEnabled=function(e,t){this.validatedIndex_(e),t?(this.adapter.removeClassFromElementAtIndex(e,oh.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(e,oR.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(e,oh.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(e,oR.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}(iN),oN=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return os(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e,t){void 0===e&&(e=function(e){return new oI(e)}),void 0===t&&(t=function(e){return new oT(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(oR.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(oD.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.listen("keydown",this.handleKeydown_),this.listen(oC.strings.ACTION_EVENT,this.handleItemAction_)},t.prototype.destroy=function(){this.list_&&this.list_.destroy(),this.menuSurface_.destroy(),this.menuSurface_.unlisten(oD.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.unlisten("keydown",this.handleKeydown_),this.unlisten(oC.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:of.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 o$({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(oR.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(oR.LIST_SELECTOR).focus()},isSelectableItemAtIndex:function(t){return!!ij(e.items[t],"."+oO.MENU_SELECTION_GROUP)},getSelectedSiblingOfItemAtIndex:function(t){var n=ij(e.items[t],"."+oO.MENU_SELECTION_GROUP).querySelector("."+oO.MENU_SELECTED_LIST_ITEM);return n?e.items.indexOf(n):-1}})},t}(iB),oB={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"},oz={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"},oj={LABEL_SCALE:.75,UNSET_INDEX:-1,CLICK_DEBOUNCE_TIMEOUT_MS:330},oY=function(e){function t(n,i){void 0===i&&(i={});var r=e.call(this,on(on({},t.defaultAdapter),n))||this;return r.disabled=!1,r.isMenuOpen=!1,r.useDefaultValidation=!0,r.customValidity=!0,r.lastSelectedIndex=oj.UNSET_INDEX,r.clickDebounceTimeout=0,r.recentlyClicked=!1,r.leadingIcon=i.leadingIcon,r.helperText=i.helperText,r}return ot(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return oB},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return oj},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return oz},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===oj.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!==oj.UNSET_INDEX?t[e]:""},t.prototype.getDisabled=function(){return this.disabled},t.prototype.setDisabled=function(e){this.disabled=e,this.disabled?(this.adapter.addClass(oB.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass(oB.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(oB.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(oB.FOCUSED),n=e||t,i=this.adapter.hasClass(oB.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(oB.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(oB.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},t.prototype.handleMenuItemAction=function(e){this.setSelectedIndex(e,!0)},t.prototype.handleFocus=function(){this.adapter.addClass(oB.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(oB.FOCUSED)){var t=ov(e)===op.ENTER,n=ov(e)===op.SPACEBAR,i=ov(e)===op.ARROW_UP,r=ov(e)===op.ARROW_DOWN;if(!n&&e.key&&1===e.key.length||n&&this.adapter.isTypeaheadInProgress()){var o=n?" ":e.key,a=this.adapter.typeaheadMatchItem(o,this.getSelectedIndex());a>=0&&this.setSelectedIndex(a),e.preventDefault();return}(t||n||i||r)&&(i&&this.getSelectedIndex()>0?this.setSelectedIndex(this.getSelectedIndex()-1):r&&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(oB.FOCUSED);if(e){var n=oj.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(oB.INVALID),this.adapter.removeMenuClass(oB.MENU_INVALID)):(this.adapter.addClass(oB.INVALID),this.adapter.addMenuClass(oB.MENU_INVALID)),this.syncHelperTextValidity(e)},t.prototype.isValid=function(){return this.useDefaultValidation&&this.adapter.hasClass(oB.REQUIRED)&&!this.adapter.hasClass(oB.DISABLED)?this.getSelectedIndex()!==oj.UNSET_INDEX&&(0!==this.getSelectedIndex()||!!this.getValue()):this.customValidity},t.prototype.setRequired=function(e){e?this.adapter.addClass(oB.REQUIRED):this.adapter.removeClass(oB.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(lm.BOTTOM_START)),this.adapter.setMenuWrapFocus(!1),this.setDisabled(this.adapter.hasClass(oB.DISABLED)),this.syncHelperTextValidity(!this.adapter.hasClass(oB.INVALID)),this.layout(),this.layoutOptions()},t.prototype.blur=function(){this.adapter.removeClass(oB.FOCUSED),this.layout(),this.adapter.deactivateBottomLine(),this.adapter.hasClass(oB.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(oz.ARIA_DESCRIBEDBY,n):this.adapter.removeSelectAnchorAttr(oz.ARIA_DESCRIBEDBY)}},t.prototype.setClickDebounceTimeout=function(){var e=this;clearTimeout(this.clickDebounceTimeout),this.clickDebounceTimeout=setTimeout(function(){e.recentlyClicked=!1},oj.CLICK_DEBOUNCE_TIMEOUT_MS),this.recentlyClicked=!0},t}(iN),oH={ARIA_HIDDEN:"aria-hidden",ROLE:"role"},oU={HELPER_TEXT_VALIDATION_MSG:"mdc-select-helper-text--validation-msg",HELPER_TEXT_VALIDATION_MSG_PERSISTENT:"mdc-select-helper-text--validation-msg-persistent"},oV=function(e){function t(n){return e.call(this,on(on({},t.defaultAdapter),n))||this}return ot(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return oU},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return oH},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(oH.ARIA_HIDDEN)},t.prototype.setContent=function(e){this.adapter.setContent(e)},t.prototype.setValidation=function(e){e?this.adapter.addClass(oU.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(oU.HELPER_TEXT_VALIDATION_MSG)},t.prototype.setValidationMsgPersistent=function(e){e?this.adapter.addClass(oU.HELPER_TEXT_VALIDATION_MSG_PERSISTENT):this.adapter.removeClass(oU.HELPER_TEXT_VALIDATION_MSG_PERSISTENT)},t.prototype.setValidity=function(e){if(this.adapter.hasClass(oU.HELPER_TEXT_VALIDATION_MSG)){var t=this.adapter.hasClass(oU.HELPER_TEXT_VALIDATION_MSG_PERSISTENT);if(!e||t){this.showToScreenReader(),e?this.adapter.removeAttr(oH.ROLE):this.adapter.setAttr(oH.ROLE,"alert");return}this.adapter.removeAttr(oH.ROLE),this.hide()}},t.prototype.showToScreenReader=function(){this.adapter.removeAttr(oH.ARIA_HIDDEN)},t.prototype.hide=function(){this.adapter.setAttr(oH.ARIA_HIDDEN,"true")},t}(iN),oW=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ot(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 oV({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}(iB),oG={ICON_EVENT:"MDCSelect:icon",ICON_ROLE:"button"},oq=["click","keydown"],oK=function(e){function t(n){var i=e.call(this,on(on({},t.defaultAdapter),n))||this;return i.savedTabIndex_=null,i.interactionHandler_=function(e){return i.handleInteraction(e)},i}return ot(t,e),Object.defineProperty(t,"strings",{get:function(){return oG},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"),oq.forEach(function(t){e.adapter.registerInteractionHandler(t,e.interactionHandler_)})},t.prototype.destroy=function(){var e=this;oq.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",oG.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}(iN),oX=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ot(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 oK({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(oK.strings.ICON_EVENT,{},!0)}})},t}(iB),oZ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ot(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e,t,n,i,r,o){if(void 0===e&&(e=function(e){return new iq(e)}),void 0===t&&(t=function(e){return new i0(e)}),void 0===n&&(n=function(e){return new i7(e)}),void 0===i&&(i=function(e){return new oN(e)}),void 0===r&&(r=function(e){return new oX(e)}),void 0===o&&(o=function(e){return new oW(e)}),this.selectAnchor=this.root.querySelector(oz.SELECT_ANCHOR_SELECTOR),this.selectedText=this.root.querySelector(oz.SELECTED_TEXT_SELECTOR),this.hiddenInput=this.root.querySelector(oz.HIDDEN_INPUT_SELECTOR),!this.selectedText)throw Error("MDCSelect: Missing required element: The following selector must be present: '"+oz.SELECTED_TEXT_SELECTOR+"'");if(this.selectAnchor.hasAttribute(oz.ARIA_CONTROLS)){var a=document.getElementById(this.selectAnchor.getAttribute(oz.ARIA_CONTROLS));a&&(this.helperText=o(a))}this.menuSetup(i);var s=this.root.querySelector(oz.LABEL_SELECTOR);this.label=s?e(s):null;var l=this.root.querySelector(oz.LINE_RIPPLE_SELECTOR);this.lineRipple=l?t(l):null;var c=this.root.querySelector(oz.OUTLINE_SELECTOR);this.outline=c?n(c):null;var d=this.root.querySelector(oz.LEADING_ICON_SELECTOR);d&&(this.leadingIcon=r(d)),this.root.classList.contains(oB.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(or.CLOSED_EVENT,this.handleMenuClosed),this.menu.listen(or.OPENED_EVENT,this.handleMenuOpened),this.menu.listen(oR.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(or.CLOSED_EVENT,this.handleMenuClosed),this.menu.unlisten(or.OPENED_EVENT,this.handleMenuOpened),this.menu.unlisten(oR.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(oz.VALUE_ATTR)||""}),this.hiddenInput&&(this.hiddenInput.value=this.value)},t.prototype.getDefaultFoundation=function(){return new oY(on(on(on(on({},this.getSelectAdapterMethods()),this.getCommonAdapterMethods()),this.getOutlineAdapterMethods()),this.getLabelAdapterMethods()),this.getFoundationMap())},t.prototype.menuSetup=function(e){this.menuElement=this.root.querySelector(oz.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(oz.VALUE_ATTR)||""})},t.prototype.createRipple=function(){var e=this,t=on(on({},rc.createAdapter({root:this.selectAnchor})),{registerInteractionHandler:function(t,n){e.selectAnchor.addEventListener(t,n)},deregisterInteractionHandler:function(t,n){e.selectAnchor.removeEventListener(t,n)}});return new rc(this.selectAnchor,new rl(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(oz.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(oz.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}(iB),oJ=function(e,t){return(oJ=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 oQ(e,t){function n(){this.constructor=e}oJ(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o0=function(){return(o0=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o1={ROOT:"mdc-form-field"},o2={LABEL_SELECTOR:".mdc-form-field > label"},o5=function(e){function t(n){var i=e.call(this,o0(o0({},t.defaultAdapter),n))||this;return i.click=function(){i.handleClick()},i}return oQ(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return o1},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return o2},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}(iN),o3=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oQ(t,e),t.attachTo=function(e){return new t(e)},t.prototype.labelEl=function(){var e=o5.strings.LABEL_SELECTOR;return this.root.querySelector(e)},t.prototype.getDefaultFoundation=function(){var e=this;return new o5({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}(iB),o4=function(e,t){return(o4=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 o6(e,t){function n(){this.constructor=e}o4(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o8=function(){return(o8=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o7={ICON_BUTTON_ON:"mdc-icon-button--on",ROOT:"mdc-icon-button"},o9={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"},ae=function(e){function t(n){var i=e.call(this,o8(o8({},t.defaultAdapter),n))||this;return i.hasToggledAriaLabel=!1,i}return o6(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return o7},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return o9},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(o9.DATA_ARIA_LABEL_ON),t=this.adapter.getAttr(o9.DATA_ARIA_LABEL_OFF);if(e&&t){if(null!==this.adapter.getAttr(o9.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(o9.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(o7.ICON_BUTTON_ON)},t.prototype.toggle=function(e){if(void 0===e&&(e=!this.isOn()),e?this.adapter.addClass(o7.ICON_BUTTON_ON):this.adapter.removeClass(o7.ICON_BUTTON_ON),this.hasToggledAriaLabel){var t=e?this.adapter.getAttr(o9.DATA_ARIA_LABEL_ON):this.adapter.getAttr(o9.DATA_ARIA_LABEL_OFF);this.adapter.setAttr(o9.ARIA_LABEL,t||"")}else this.adapter.setAttr(o9.ARIA_PRESSED,""+e)},t}(iN),at=ae.strings,an=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rippleComponent=t.createRipple(),t}return o6(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 ae({addClass:function(t){return e.root.classList.add(t)},hasClass:function(t){return e.root.classList.contains(t)},notifyChange:function(t){e.emit(at.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 rc(this.root);return e.unbounded=!0,e},t}(iB);let ai="important",ar=" !"+ai,ao=eF(class extends ek{constructor(e){if(super(e),e.type!==ew.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(ar);e.includes("-")||t?n.setProperty(e,t?i.slice(0,-11):i,t?ai:""):n[e]=i}}return X}});var aa=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};let as=n(73041),al=n(61526);class ac extends CustomEvent{constructor(e){super(ac.NAME,{detail:e,bubbles:!0,composed:!0})}}function ad(e,t,n,i,r){switch(i=i||"listbox",e){case lg.RADIO:i="radiogroup";break;case lg.MULTI_CHECKBOX:i="group"}return K`
117
117
  <ul id="list" class="mdc-list${n?" mdc-list--two-line":""}" role="${i??Z}" @MDCList:action="${e=>r&&r(e)}" aria-hidden="true" aria-orientation="vertical" tabindex="-1">
118
118
  ${t}
119
119
  </ul>